欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

POC网关项目联调

程序员文章站 2022-06-03 20:29:52
...

POC网关项目联调:

根据国标协议提供如下:

车辆vin:12345678901234567
ICCID:12345123451234512345

修改阿里云上的
vsp_vehicle_information 鉴权表

CREATE TABLE `vsp_vehicle_information` (
  `id` bigint(8) unsigned NOT NULL AUTO_INCREMENT,
  `vin` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '车架号VIN',
  `plate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '车牌号',
  `vehicle_interior_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '车型内部编码',
  `da_sw_version_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'DA_软件版本码',
  `da_hw_version_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'DA_硬件版本码',
  `da_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'DA_设备号',
  `tcu_sw_version_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'TCU_软件版本码',
  `tcu_hw_version_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'TCU_硬件版本码',
  `tcu_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'TCU_设备号',
  `tsu_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'TSU_设备号',
  `model_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车型',
  `factory_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '车厂',
  `version_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '版本',
  `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `is_deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '1表示删除, 0表示未删除',
  `sae_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车上的SAE编码',
  `device_id` bigint(8) DEFAULT NULL COMMENT '设备id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ind_1` (`vin`),
  KEY `loadtest_tsu_sn` (`tsu_sn`)
) ENGINE=InnoDB AUTO_INCREMENT=6000004 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC

STG地址:123.56.75.80:20202
普通网关:39.97.198.170:9999

车辆vin:12345678901234567
ICCID:12345123451234512345 鉴权使用配置
18746045555
网关地址已提供,请如下邮件,提供一下车辆和Evcc的相关信息。
userid:23131313212312312erwerwerwef

hbaseuserd项目生成报文,sockettool提前测试

Recive data:232307fe3132333435363738393031323334353637010000c9

ErrorCode]: NoSuchKey
[RequestId]: 5ED705EF18F6573838BAF095
[HostId]: dbcnamestatic.oss-cn-beijing.aliyuncs.com
[ResponseError]:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <RequestId>5ED705EF18F6573838BAF095</RequestId>
  <HostId>dbcnamestatic.oss-cn-beijing.aliyuncs.com</HostId>
  <Key>63074-7_1.xml</Key>
</Error>

com.aliyun.oss.OSSException: The specified key does not exist.
[ErrorCode]: NoSuchKey
[RequestId]: 5ED705EF18F6573838BAF095
[HostId]: dbcnamestatic.oss-cn-beijing.aliyuncs.com
[ResponseError]:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <RequestId>5ED705EF18F6573838BAF095</RequestId>
  <HostId>dbcnamestatic.oss-cn-beijing.aliyuncs.com</HostId>
  <Key>63074-7_1.xml</Key>
</Error>

看代码梳理:
tb_sync_user_data 验证DMS数据匹配
tb_user_info tb_user_info_details

Recive data:232307fe3132333435363738393031323334353637010000c
蓝牙下发需要配置的表:
vsp_vehicle_information
device_information 的主键是vsp_vehicle_information的device_id

SELECT
        vvi.id,
        vvi.vin,
        vvi.model_id,
        vvi.factory_id,
        vvi.version_id,
        vvi.create_time,
        vvi.update_time,
        di.tsu_sn,
        di.sim_id
        FROM
        vsp_vehicle_information vvi,
        device_information di
        WHERE
        vvi.device_id = di.id
        AND vvi.vin = #{vin,jdbcType=VARCHAR}
        AND vvi.is_deleted = 0
        AND di.is_deleted = 0
        
        
SELECT
        vvi.id,
        vvi.vin,
        vvi.model_id,
        vvi.factory_id,
        vvi.version_id,
        vvi.create_time,
        vvi.update_time,
        di.tsu_sn,
        di.sim_id
        FROM
        vsp_vehicle_information vvi,
        device_information di
        WHERE
        vvi.device_id = di.id
        AND vvi.vin = "12345678901234567"
        AND vvi.is_deleted = 0
        AND di.is_deleted = 0
14:25:30.984 [container-2] ERROR c.r.vspcloud.gateway.redis.Receiver[31][GW] - Receiving instruction information:[{"bodyData":{"eventid":"97685702453726414193197831750916","carowner":"23131313212312312erwerwerwef","pinCode":"347019","communicationKey":"3938945618667834","messageId":"0","applicationId":"177","sendingTime":"1591165530976","radioName":"12345678901234567"},"businessType":"177","requestId":"4bf07443e20247bd8192ac5cf99d2409","vin":"12345678901234567"}]
14:25:30.993 [container-2] ERROR c.r.v.g.s.i.DataDownLoadServiceImpl[33][GW] - channel:[[id: 0x826380aa, /192.168.14.131:20021 => /172.20.13.66:9999]], channel
14:25:30.993 [container-2] ERROR c.r.v.g.s.i.DataDownLoadServiceImpl[39][GW] - NettyChannelCache.getChannelFactoryId(channel):[6], 
14:25:30.998 [container-2] ERROR c.r.v.g.s.i.DataDownLoadServiceImpl[40][GW] - NettyChannelCache.getChannelModelId(channel):[8], 
14:25:31.000 [container-2] ERROR c.r.v.g.s.i.DataDownLoadServiceImpl[41][GW] - NettyChannelCache.getChannelVersionId(channel):[1], 
14:25:31.001 [container-2] ERROR c.r.v.g.s.i.DataDownLoadServiceImpl[42][GW] - getTripId(channel):[0], 
14:25:31.001 [container-2] ERROR c.r.v.g.s.i.DataDownLoadServiceImpl[51][GW] - downloadDataBO:[DownloadDataBO(businessType=177, tripId=1, vin=12345678901234567, factoryId=6, modelId=8, versionId=1, requestId=4bf07443e20247bd8192ac5cf99d2409, bodyData={eventid=97685702453726414193197831750916, carowner=23131313212312312erwerwerwef, requestId=4bf07443e20247bd8192ac5cf99d2409, pinCode=347019, communicationKey=3938945618667834, messageId=0, applicationId=177, sendingTime=1591165530976, radioName=12345678901234567}, AckSign=0)], 
14:25:31.009 [nioEventLoopGroup-3-12] WARN  c.r.v.gateway.netty.EncoderForPOC[18][GW] - EncoderForPOC -- encode ,downloadDataBODownloadDataBO(businessType=177, tripId=1, vin=12345678901234567, factoryId=6, modelId=8, versionId=1, requestId=4bf07443e20247bd8192ac5cf99d2409, bodyData={eventid=97685702453726414193197831750916, carowner=23131313212312312erwerwerwef, requestId=4bf07443e20247bd8192ac5cf99d2409, pinCode=347019, communicationKey=3938945618667834, messageId=0, applicationId=177, sendingTime=1591165530976, radioName=12345678901234567}, AckSign=0)
14:25:31.009 [nioEventLoopGroup-3-12] ERROR c.k.d.p.DBCDownProtocolService[50][GW] - encodeData -- -- -- applicationId:177,messageId:0
14:25:31.009 [nioEventLoopGroup-3-12] ERROR c.k.d.p.DBCDownProtocolService[61][GW] - DBCDownProtocolService -- key:681-177_0.xml
14:25:31.009 [nioEventLoopGroup-3-12] ERROR c.k.d.p.DBCDownProtocolService[66][GW] - pb -- :null
14:25:31.009 [nioEventLoopGroup-3-12] WARN  c.k.d.p.DBCDownProtocolService[68][GW] - DBC--url:681-177_0.xml
14:25:31.009 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[75][GW] - getDBCContentBODown----------------
14:25:31.010 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[124][GW] - getDBCContentBODown - xmlPath:681-177_0.xml
14:25:31.079 [nioEventLoopGroup-3-12] WARN  com.kora.dbc.dom.DBCDownUtils[129][GW] - ossObject = OSSObject [key=681-177_0.xml,bucket=dbcnamestatic]
14:25:31.079 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:<?xml version="1.0"?>
14:25:31.079 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:<protocol xmlns="http://www.w3school.com.cn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14:25:31.079 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:      xsi:schemaLocation="D:/workspace3/test/src/main/java/test/xmltest/t2/t2.xsd">
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:      <header>
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="crcCode" type="WORD" length="2" defaultValue="8995" />
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="commandID" type="BYTE" length="1" defaultValue="177" />
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="ack_flag" type="BYTE" length="1" defaultValue="254" />
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="vin" type="String" length="17" />
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="messageSize" type="WORD" length="2" logic="bodySize"/>
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:      </header>
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:      <body>
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="sendingTime" logic="systemTime2G" />
14:25:31.080 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="eventid" type="STRING" length="32"/>
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="carowner" type="STRING" length="32"/>
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="communicationKey" type="STRING" length="16" />
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="pinCode" type="STRING" length="6"/>
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:              <column fieldName="radioName" type="STRING" length="17"/>
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:      </body>
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[139][GW] - line:</protocol>
14:25:31.081 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDownUtils[146][GW] - xmlContent -------- : <?xml version="1.0"?><protocol xmlns="http://www.w3school.com.cn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="D:/workspace3/test/src/main/java/test/xmltest/t2/t2.xsd">     <header>                <column fieldName="crcCode" type="WORD" length="2" defaultValue="8995" />               <column fieldName="commandID" type="BYTE" length="1" defaultValue="177" />                <column fieldName="ack_flag" type="BYTE" length="1" defaultValue="254" />               <column fieldName="vin" type="String" length="17" />            <column fieldName="messageSize" type="WORD" length="2" logic="bodySize"/> </header>       <body>          <column fieldName="sendingTime" logic="systemTime2G" />         <column fieldName="eventid" type="STRING" length="32"/>         <column fieldName="carowner" type="STRING" length="32"/>         <column fieldName="communicationKey" type="STRING" length="16" />                <column fieldName="pinCode" type="STRING" length="6"/>          <column fieldName="radioName" type="STRING" length="17"/>       </body></protocol>
14:25:31.084 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[91][GW] - header  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "crcCode"], [email protected] [Attribute: name type value "WORD"], [email protected] [Attribute: name length value "2"], [email protected] [Attribute: name defaultValue value "8995"]]/>]
14:25:31.084 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[91][GW] - header  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "commandID"], [email protected] [Attribute: name type value "BYTE"], [email protected] [Attribute: name length value "1"], [email protected] [Attribute: name defaultValue value "177"]]/>]
14:25:31.084 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[91][GW] - header  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "ack_flag"], [email protected] [Attribute: name type value "BYTE"], [email protected] [Attribute: name length value "1"], [email protected] [Attribute: name defaultValue value "254"]]/>]
14:25:31.084 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[91][GW] - header  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "vin"], [email protected] [Attribute: name type value "String"], [email protected] [Attribute: name length value "17"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[91][GW] - header  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "messageSize"], [email protected] [Attribute: name type value "WORD"], [email protected] [Attribute: name length value "2"], [email protected] [Attribute: name logic value "bodySize"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[96][GW] - body  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "sendingTime"], [email protected] [Attribute: name logic value "systemTime2G"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[96][GW] - body  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "eventid"], [email protected] [Attribute: name type value "STRING"], [email protected] [Attribute: name length value "32"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[96][GW] - body  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "carowner"], [email protected] [Attribute: name type value "STRING"], [email protected] [Attribute: name length value "32"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[96][GW] - body  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "communicationKey"], [email protected] [Attribute: name type value "STRING"], [email protected] [Attribute: name length value "16"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[96][GW] - body  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "pinCode"], [email protected] [Attribute: name type value "STRING"], [email protected] [Attribute: name length value "6"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[96][GW] - body  [email protected] [Element: <column uri: http://www.w3school.com.cn attributes: [[email protected] [Attribute: name fieldName value "radioName"], [email protected] [Attribute: name type value "STRING"], [email protected] [Attribute: name length value "17"]]/>]
14:25:31.085 [nioEventLoopGroup-3-12] ERROR com.kora.dbc.dom.DBCDomService[115][GW] - keykeykeykeykey:681-177_0.xml
14:25:31.086 [nioEventLoopGroup-3-12] ERROR c.k.d.p.DBCDownProtocolService[80][GW] - pb2 -- :[email protected]
14:25:31.086 [nioEventLoopGroup-3-12] ERROR c.k.d.p.DBCDownProtocolService[83][GW] - header -- [[email protected], [email protected], [email protected], [email protected], [email protected]]:
14:25:31.086 [nioEventLoopGroup-3-12] ERROR c.k.d.p.DBCDownProtocolService[84][GW] - datalist -- [[email protected], [email protected], [email protected], [email protected], [email protected], [email protected]]:
14:25:31.086 [nioEventLoopGroup-3-12] ERROR c.r.v.gateway.netty.EncoderForPOC[26][GW] - Encoder message,msgId:null,msgInfo:2323b1fe3132333435363738393031323334353637006d1406030e191f393736383537303234353337323634313431393331393738333137353039313632333133313331333231323331323331326572776572776572776566303030303339333839343536313836363738333433343730313931323334353637383930313233343536376e