对接冷链车定位数据

master
YIN 2024-12-18 20:24:04 +08:00
parent 507c6ca6bf
commit dd1dee67b2
5 changed files with 17 additions and 17 deletions

View File

@ -61,7 +61,7 @@ public class GetLocationTask {
GetVehicleInfoVO vehicleInfoVO = e6SdkApi.GetVehcileInfo("-1");
System.out.println(vehicleInfoVO);
if (vehicleInfoVO.getCode().equals("1")){
if (Helper.FInt(vehicleInfoVO.getCode())==1){
List<VehicleInfoResp> list = vehicleInfoVO.getData();
for (VehicleInfoResp info : list) {
String carNo = info.getVehicleNO();
@ -73,7 +73,7 @@ public class GetLocationTask {
newstate.setCarId(dbcar.getId());
newstate.setCarNo(dbcar.getCarNo());
newstate.setVin(dbcar.getVin());
newstate.setVehicleNo(info.getVehicleNo());
newstate.setVehicleNo(info.getVehicleNO());
newstate.setRegName(info.getRegName());
if (!Helper.NStr(info.getGpsTime()).equals(""))
newstate.setGpsTime(DateUtils.parseDate(Helper.NStr(info.getGpsTime()).replace(".0","")));
@ -145,8 +145,8 @@ public class GetLocationTask {
// 插入轨迹信息
try {
TrackTemp track = new TrackTemp();
PropertyUtils.copyProperties(newstate, track);
getLocationTask.trackMapper.insert(track);
PropertyUtils.copyProperties(track, newstate);
getLocationTask.trackMapper.insertTrack(track);
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -54,7 +54,7 @@ public class Main {
newstate.setCarId(dbcar.getId());
newstate.setCarNo(dbcar.getCarNo());
newstate.setVin(dbcar.getVin());
newstate.setVehicleNo(info.getVehicleNo());
newstate.setVehicleNo(info.getVehicleNO());
newstate.setRegName(info.getRegName());
if (!Helper.NStr(info.getGpsTime()).equals(""))
newstate.setGpsTime(DateUtils.parseDate(Helper.NStr(info.getGpsTime()).replace(".0", "")));

View File

@ -59,7 +59,7 @@ public class VehicleInfoResp {
private String height ; //海拔高度 单位米 1423
private String stopSec; //停车时长 单位秒 300
private Integer acc; //ACC状态;0 无,1关,2开 1
private String vehicleNo; //真实车牌 苏AF5595
// private String vehicleNo; //真实车牌 苏AF5595
private String ohm; //油量欧姆值 1180
private Integer curAccSta; //当前ACC状态;1:在线 0:不在线 2:未知 1
private String commIds; //中心识别码 12123222
@ -512,13 +512,13 @@ public class VehicleInfoResp {
this.acc = acc;
}
public String getVehicleNo() {
return vehicleNo;
}
public void setVehicleNo(String vehicleNo) {
this.vehicleNo = vehicleNo;
}
// public String getVehicleNo() {
// return vehicleNo;
// }
//
// public void setVehicleNo(String vehicleNo) {
// this.vehicleNo = vehicleNo;
// }
public String getOhm() {
return ohm;

View File

@ -163,7 +163,7 @@ public class Constants
/**
* 访
*/
public static final String[] JOB_WHITELIST_STR = { "com.cpxt.quartz.task" };
public static final String[] JOB_WHITELIST_STR = { "com.cpxt.quartz.task", "com.cpxt.web.task" };
/**
*

View File

@ -66,12 +66,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="acc" column="acc" />
<result property="ohm" column="ohm" />
<result property="curAccSta" column="cur_acc_sta" />
<result property="commIds" column="commIds" />
<result property="commIds" column="comm_ids" />
<result property="createTime" column="create_time" />
</resultMap>
<insert id="insertTrack" parameterType="TrackTemp" useGeneratedKeys="true" keyProperty="id">
insert into track_#{carId}
insert into track_${carId}
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carId != null">car_id,</if>
<if test="carNo != null">car_no,</if>
@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="acc != null">acc,</if>
<if test="ohm != null">ohm,</if>
<if test="curAccSta != null">cur_acc_sta,</if>
<if test="commIds != null">commIds,</if>
<if test="commIds != null">comm_ids,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">