作者 xudada

过卡日志

@@ -34,6 +34,7 @@ import java.net.URLConnection; @@ -34,6 +34,7 @@ import java.net.URLConnection;
34 import java.util.Date; 34 import java.util.Date;
35 import java.util.List; 35 import java.util.List;
36 import java.util.Map; 36 import java.util.Map;
  37 +import java.util.UUID;
37 38
38 39
39 @Component 40 @Component
@@ -52,6 +53,8 @@ public class LiftBar { @@ -52,6 +53,8 @@ public class LiftBar {
52 private BusnesslistinfoService busnesslistinfoService; 53 private BusnesslistinfoService busnesslistinfoService;
53 @Autowired 54 @Autowired
54 BusnessViewService busnessViewService; 55 BusnessViewService busnessViewService;
  56 + @Autowired
  57 + CommandLogService commandLogService;
55 58
56 @Autowired 59 @Autowired
57 WeightCheckHandleService weightCheckHandleService; 60 WeightCheckHandleService weightCheckHandleService;
@@ -81,6 +84,9 @@ public class LiftBar { @@ -81,6 +84,9 @@ public class LiftBar {
81 private static String ALLOCATE_01 = "39301 分拨申请审核通过。"; 84 private static String ALLOCATE_01 = "39301 分拨申请审核通过。";
82 private static String ALLOCATE_04 = "39103 分拨申请重复传输,海关审核不通过。"; 85 private static String ALLOCATE_04 = "39103 分拨申请重复传输,海关审核不通过。";
83 86
  87 + //初始化装载货物重量
  88 + private double goodsWt=0.0,inWt=0.0,diffVal=0.0,selfWt=0.0;
  89 +
84 @Autowired 90 @Autowired
85 private FeignService feignService; 91 private FeignService feignService;
86 92
@@ -102,6 +108,7 @@ public class LiftBar { @@ -102,6 +108,7 @@ public class LiftBar {
102 logic.nmmsHost=this.nmmsHost; 108 logic.nmmsHost=this.nmmsHost;
103 logic.feignService=this.feignService; 109 logic.feignService=this.feignService;
104 logic.nmmsService=this.nmmsService; 110 logic.nmmsService=this.nmmsService;
  111 + logic.commandLogService=this.commandLogService;
105 } 112 }
106 113
107 /** 114 /**
@@ -115,16 +122,14 @@ public class LiftBar { @@ -115,16 +122,14 @@ public class LiftBar {
115 //获取过磅重量 122 //获取过磅重量
116 double growssWt = info.getGrosswt().doubleValue(); 123 double growssWt = info.getGrosswt().doubleValue();
117 124
118 - //初始化装载货物重量  
119 - double goodsWt=0.0,inWt=0.0,diffVal=0.0;  
120 //取车牌号,判定卡口是否取到车牌号 125 //取车牌号,判定卡口是否取到车牌号
121 String vaName = info.getVename(); 126 String vaName = info.getVename();
122 127
123 //1. 若无车牌号,返回未识别错误 128 //1. 若无车牌号,返回未识别错误
124 if (vaName.length() <= 0) { 129 if (vaName.length() <= 0) {
125 logger.error(NO_CHEPAI+vaName); 130 logger.error(NO_CHEPAI+vaName);
126 - CommandClient.Client(info, NO_CHEPAI + vaName);  
127 - 131 + logic.sendBw(info,false,NO_CHEPAI + vaName,new LandBusinessTypeList());
  132 + //CommandClient.Client(info, NO_CHEPAI + vaName);
128 return result; 133 return result;
129 } 134 }
130 135
@@ -133,10 +138,11 @@ public class LiftBar { @@ -133,10 +138,11 @@ public class LiftBar {
133 //若无备案信息,返回车辆未备案或者识别错误 138 //若无备案信息,返回车辆未备案或者识别错误
134 if (ve == null) { 139 if (ve == null) {
135 logger.error(NORECORD+vaName); 140 logger.error(NORECORD+vaName);
136 - CommandClient.Client(info, NORECORD + vaName); 141 + logic.sendBw(info,false,NORECORD + vaName,new LandBusinessTypeList());
  142 + //CommandClient.Client(info, NORECORD + vaName);
137 return result; 143 return result;
138 } 144 }
139 - 145 + selfWt=Double.parseDouble(ve.getSelfWt());//车辆备案我不是
140 /** 146 /**
141 * 3. 车牌号,二维码,场站ID/号,通道ID/号,进出业务类型标识I/E 147 * 3. 车牌号,二维码,场站ID/号,通道ID/号,进出业务类型标识I/E
142 * 查询是否已有此场站通道的申请 148 * 查询是否已有此场站通道的申请
@@ -146,7 +152,8 @@ public class LiftBar { @@ -146,7 +152,8 @@ public class LiftBar {
146 //4. 若查询结果为null,返回无相对应进出场申请 152 //4. 若查询结果为null,返回无相对应进出场申请
147 if (list == null) { 153 if (list == null) {
148 logger.error(vaName+IEPORSE); 154 logger.error(vaName+IEPORSE);
149 - CommandClient.Client(info, IEPORSE); 155 + logic.sendBw(info,false,vaName+IEPORSE,list);
  156 + //CommandClient.Client(info, IEPORSE);
150 return result; 157 return result;
151 } 158 }
152 159
@@ -212,7 +219,8 @@ public class LiftBar { @@ -212,7 +219,8 @@ public class LiftBar {
212 checkResult=true; 219 checkResult=true;
213 }else{ 220 }else{
214 logger.error("[出口送货]-出场重量未通过校验:"+GROWSSEXCETION); 221 logger.error("[出口送货]-出场重量未通过校验:"+GROWSSEXCETION);
215 - CommandClient.Client(info, GROWSSEXCETION); 222 + logic.sendBw(info,false,GROWSSEXCETION,list);
  223 + //CommandClient.Client(info, GROWSSEXCETION);
216 return false; 224 return false;
217 } 225 }
218 break; 226 break;
@@ -226,14 +234,16 @@ public class LiftBar { @@ -226,14 +234,16 @@ public class LiftBar {
226 }else { 234 }else {
227 //有运单未放行 235 //有运单未放行
228 logger.error("[进口提货]-出场未通过校验:"+FANGXING+list.getMasterList()); 236 logger.error("[进口提货]-出场未通过校验:"+FANGXING+list.getMasterList());
229 - CommandClient.Client(info, FANGXING); 237 + logic.sendBw(info,false,FANGXING+list.getMasterList(),list);
  238 + //CommandClient.Client(info, FANGXING);
230 return false; 239 return false;
231 } 240 }
232 241
233 //todo:装载运单历史数据累加超重判定 242 //todo:装载运单历史数据累加超重判定
234 }else{ 243 }else{
235 logger.error("[进口提货]-出场重量未通过校验:"+GROWSSEXCETION); 244 logger.error("[进口提货]-出场重量未通过校验:"+GROWSSEXCETION);
236 - CommandClient.Client(info, GROWSSEXCETION); 245 + logic.sendBw(info,false,GROWSSEXCETION,list);
  246 + //CommandClient.Client(info, GROWSSEXCETION);
237 return false; 247 return false;
238 } 248 }
239 break; 249 break;
@@ -243,14 +253,16 @@ public class LiftBar { @@ -243,14 +253,16 @@ public class LiftBar {
243 boolean allocatCheck = checkNmmsAllocate(list.getMasterList()); 253 boolean allocatCheck = checkNmmsAllocate(list.getMasterList());
244 if(!allocatCheck){ 254 if(!allocatCheck){
245 logger.error("[分拨业务]-分拨申请舱单未通过校验:"+FENBO); 255 logger.error("[分拨业务]-分拨申请舱单未通过校验:"+FENBO);
246 - CommandClient.Client(info, FENBO); 256 + logic.sendBw(info,false,FENBO,list);
  257 + //CommandClient.Client(info, FENBO);
247 return false; 258 return false;
248 } 259 }
249 checkResult=true; 260 checkResult=true;
250 //todo:分拨运抵通知,重车入场视为运抵 261 //todo:分拨运抵通知,重车入场视为运抵
251 }else{ 262 }else{
252 logger.error("[分拨业务]-出场重量未通过校验:"+GROWSSEXCETION); 263 logger.error("[分拨业务]-出场重量未通过校验:"+GROWSSEXCETION);
253 - CommandClient.Client(info, GROWSSEXCETION); 264 + logic.sendBw(info,false,GROWSSEXCETION,list);
  265 + //CommandClient.Client(info, GROWSSEXCETION);
254 return false; 266 return false;
255 } 267 }
256 break; 268 break;
@@ -263,13 +275,15 @@ public class LiftBar { @@ -263,13 +275,15 @@ public class LiftBar {
263 }else { 275 }else {
264 //有运单未放行 276 //有运单未放行
265 logger.error("[调拨业务]-出场未通过校验:"+FANGXING+list.getMasterList()); 277 logger.error("[调拨业务]-出场未通过校验:"+FANGXING+list.getMasterList());
266 - CommandClient.Client(info, FANGXING); 278 + logic.sendBw(info,false,FANGXING,list);
  279 + //CommandClient.Client(info, FANGXING);
267 return false; 280 return false;
268 } 281 }
269 //todo:检查ULD放行. 282 //todo:检查ULD放行.
270 }else{ 283 }else{
271 logger.error("[调拨业务]-出场未通过校验:"+GROWSSEXCETION); 284 logger.error("[调拨业务]-出场未通过校验:"+GROWSSEXCETION);
272 - CommandClient.Client(info, GROWSSEXCETION); 285 + logic.sendBw(info,false,GROWSSEXCETION,list);
  286 + //CommandClient.Client(info, GROWSSEXCETION);
273 return false; 287 return false;
274 } 288 }
275 break; 289 break;
@@ -303,7 +317,7 @@ public class LiftBar { @@ -303,7 +317,7 @@ public class LiftBar {
303 } 317 }
304 318
305 //发送抬杆指令,todo:生产环境去掉下面注释 319 //发送抬杆指令,todo:生产环境去掉下面注释
306 - boolean commandResult = logic.sendBw(info, checkResult); 320 + boolean commandResult = logic.sendBw(info, checkResult,null,list);
307 //fortest 正式环境删除 321 //fortest 正式环境删除
308 // boolean commandResult = true; 322 // boolean commandResult = true;
309 if(commandResult){//发送抬杆儿报文 323 if(commandResult){//发送抬杆儿报文
@@ -404,7 +418,7 @@ public class LiftBar { @@ -404,7 +418,7 @@ public class LiftBar {
404 * @param info 车辆过卡信息 418 * @param info 车辆过卡信息
405 * @param check 是否放行抬杆 419 * @param check 是否放行抬杆
406 */ 420 */
407 - public boolean sendBw(GatherInfo info, boolean check) { 421 + public boolean sendBw(GatherInfo info, boolean check,String reason,LandBusinessTypeList land) {
408 logger.info(String.format("开始发送指令:车牌%s,场站%s,通道%s,重量%s",info.getVename(),info.getAreaid(),info.getChnlno(),info.getGrosswt())); 422 logger.info(String.format("开始发送指令:车牌%s,场站%s,通道%s,重量%s",info.getVename(),info.getAreaid(),info.getChnlno(),info.getGrosswt()));
409 boolean flag = false; 423 boolean flag = false;
410 if (check) { 424 if (check) {
@@ -412,12 +426,42 @@ public class LiftBar { @@ -412,12 +426,42 @@ public class LiftBar {
412 logger.info("=============>>>>>>>>放行报文发送成功<<<<<<<<<=============="); 426 logger.info("=============>>>>>>>>放行报文发送成功<<<<<<<<<==============");
413 flag = true; 427 flag = true;
414 } else { 428 } else {
415 - CommandClient.Client(info, GROWSSEXCETION); 429 + CommandClient.Client(info, reason);
416 logger.info("=============>>>>>>>>重量异常报文发送成功<<<<<<<<<=============="); 430 logger.info("=============>>>>>>>>重量异常报文发送成功<<<<<<<<<==============");
417 } 431 }
  432 + logic.commandlog(info,check,reason,land);
418 return flag; 433 return flag;
419 } 434 }
420 - 435 + public void commandlog(GatherInfo info,boolean check,String reason,LandBusinessTypeList land){
  436 + String flag="",type="";
  437 + commandLog command=new commandLog();
  438 + command.setId(UUID.randomUUID().toString());
  439 + command.setBarcode(land.getBarcode());
  440 + command.setAreaId(info.getAreaid());
  441 + command.setChnlNo(info.getChnlno());
  442 + command.setBusnessType(land.getBusinesstype());
  443 + if (check){
  444 + flag = "00";
  445 + } else{
  446 + flag = "11";
  447 + }
  448 + if("I".equals(info.getIetype())){
  449 + type="000000200000000000";
  450 + }else{
  451 + type="000000100000000000";
  452 + }
  453 + command.setReasonCode(flag+type);
  454 + command.setReasonText(reason);
  455 + command.setVeName(info.getVename());
  456 + command.setVeWeight(selfWt);
  457 + command.setIeType(info.getIetype());
  458 + command.setExitGrossWeight(info.getGrosswt().doubleValue());
  459 + command.setInGrossWeight(inWt);
  460 + command.setGoodsWeight(goodsWt);
  461 + command.setActualGoodsWeight(diffVal);
  462 + command.setMasterList(land.getMasterList());
  463 + logic.commandLogService.insert(command);
  464 + }
421 /** 465 /**
422 * 给码头发送卡口数据 466 * 给码头发送卡口数据
423 * 467 *
  1 +package com.sy.mapper;
  2 +
  3 +import com.sy.model.commandLog;
  4 +
  5 +public interface commandLogMapper {
  6 + int deleteByPrimaryKey(String id);
  7 +
  8 + int insert(commandLog record);
  9 +
  10 + int insertSelective(commandLog record);
  11 +
  12 + commandLog selectByPrimaryKey(String id);
  13 +
  14 + int updateByPrimaryKeySelective(commandLog record);
  15 +
  16 + int updateByPrimaryKey(commandLog record);
  17 +}
  1 +package com.sy.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class commandLog {
  6 + private String id;
  7 +
  8 + private String barcode;
  9 +
  10 + private String areaId;
  11 +
  12 + private String chnlNo;
  13 +
  14 + private String busnessType;
  15 +
  16 + private String reasonCode;
  17 +
  18 + private String reasonText;
  19 +
  20 + private String veName;
  21 +
  22 + private Double veWeight;
  23 +
  24 + private String ieType;
  25 +
  26 + private Double exitGrossWeight;
  27 +
  28 + private Double inGrossWeight;
  29 +
  30 + private Double goodsWeight;
  31 +
  32 + private Double actualGoodsWeight;
  33 +
  34 + private Date creatTime;
  35 +
  36 + private Date updateTime;
  37 +
  38 + private String masterList;
  39 +
  40 + public String getId() {
  41 + return id;
  42 + }
  43 +
  44 + public void setId(String id) {
  45 + this.id = id == null ? null : id.trim();
  46 + }
  47 +
  48 + public String getBarcode() {
  49 + return barcode;
  50 + }
  51 +
  52 + public void setBarcode(String barcode) {
  53 + this.barcode = barcode == null ? null : barcode.trim();
  54 + }
  55 +
  56 + public String getAreaId() {
  57 + return areaId;
  58 + }
  59 +
  60 + public void setAreaId(String areaId) {
  61 + this.areaId = areaId == null ? null : areaId.trim();
  62 + }
  63 +
  64 + public String getChnlNo() {
  65 + return chnlNo;
  66 + }
  67 +
  68 + public void setChnlNo(String chnlNo) {
  69 + this.chnlNo = chnlNo == null ? null : chnlNo.trim();
  70 + }
  71 +
  72 + public String getBusnessType() {
  73 + return busnessType;
  74 + }
  75 +
  76 + public void setBusnessType(String busnessType) {
  77 + this.busnessType = busnessType == null ? null : busnessType.trim();
  78 + }
  79 +
  80 + public String getReasonCode() {
  81 + return reasonCode;
  82 + }
  83 +
  84 + public void setReasonCode(String reasonCode) {
  85 + this.reasonCode = reasonCode == null ? null : reasonCode.trim();
  86 + }
  87 +
  88 + public String getReasonText() {
  89 + return reasonText;
  90 + }
  91 +
  92 + public void setReasonText(String reasonText) {
  93 + this.reasonText = reasonText == null ? null : reasonText.trim();
  94 + }
  95 +
  96 + public String getVeName() {
  97 + return veName;
  98 + }
  99 +
  100 + public void setVeName(String veName) {
  101 + this.veName = veName == null ? null : veName.trim();
  102 + }
  103 +
  104 + public Double getVeWeight() {
  105 + return veWeight;
  106 + }
  107 +
  108 + public void setVeWeight(Double veWeight) {
  109 + this.veWeight = veWeight;
  110 + }
  111 +
  112 + public String getIeType() {
  113 + return ieType;
  114 + }
  115 +
  116 + public void setIeType(String ieType) {
  117 + this.ieType = ieType == null ? null : ieType.trim();
  118 + }
  119 +
  120 + public Double getExitGrossWeight() {
  121 + return exitGrossWeight;
  122 + }
  123 +
  124 + public void setExitGrossWeight(Double exitGrossWeight) {
  125 + this.exitGrossWeight = exitGrossWeight;
  126 + }
  127 +
  128 + public Double getInGrossWeight() {
  129 + return inGrossWeight;
  130 + }
  131 +
  132 + public void setInGrossWeight(Double inGrossWeight) {
  133 + this.inGrossWeight = inGrossWeight;
  134 + }
  135 +
  136 + public Double getGoodsWeight() {
  137 + return goodsWeight;
  138 + }
  139 +
  140 + public void setGoodsWeight(Double goodsWeight) {
  141 + this.goodsWeight = goodsWeight;
  142 + }
  143 +
  144 + public Double getActualGoodsWeight() {
  145 + return actualGoodsWeight;
  146 + }
  147 +
  148 + public void setActualGoodsWeight(Double actualGoodsWeight) {
  149 + this.actualGoodsWeight = actualGoodsWeight;
  150 + }
  151 +
  152 + public Date getCreatTime() {
  153 + return creatTime;
  154 + }
  155 +
  156 + public void setCreatTime(Date creatTime) {
  157 + this.creatTime = creatTime;
  158 + }
  159 +
  160 + public Date getUpdateTime() {
  161 + return updateTime;
  162 + }
  163 +
  164 + public void setUpdateTime(Date updateTime) {
  165 + this.updateTime = updateTime;
  166 + }
  167 +
  168 + public String getMasterList() {
  169 + return masterList;
  170 + }
  171 +
  172 + public void setMasterList(String masterList) {
  173 + this.masterList = masterList == null ? null : masterList.trim();
  174 + }
  175 +}
  1 +package com.sy.service;
  2 +
  3 +import com.sy.model.commandLog;
  4 +
  5 +public interface CommandLogService {
  6 + int insert(commandLog command);
  7 +}
  1 +package com.sy.service.impl;
  2 +
  3 +import com.sy.mapper.commandLogMapper;
  4 +import com.sy.model.commandLog;
  5 +import com.sy.service.CommandLogService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +@Service
  10 +public class CommandLogImpl implements CommandLogService {
  11 + @Autowired
  12 + commandLogMapper mapper;
  13 + @Override
  14 + public int insert(commandLog command) {
  15 + return mapper.insertSelective(command);
  16 + }
  17 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.sy.mapper.commandLogMapper">
  4 + <resultMap id="BaseResultMap" type="com.sy.model.commandLog">
  5 + <id column="id" jdbcType="VARCHAR" property="id" />
  6 + <result column="barcode" jdbcType="VARCHAR" property="barcode" />
  7 + <result column="area_id" jdbcType="VARCHAR" property="areaId" />
  8 + <result column="chnl_no" jdbcType="VARCHAR" property="chnlNo" />
  9 + <result column="busness_type" jdbcType="VARCHAR" property="busnessType" />
  10 + <result column="reason_code" jdbcType="VARCHAR" property="reasonCode" />
  11 + <result column="reason_text" jdbcType="VARCHAR" property="reasonText" />
  12 + <result column="ve_name" jdbcType="VARCHAR" property="veName" />
  13 + <result column="ve_weight" jdbcType="DOUBLE" property="veWeight" />
  14 + <result column="ie_type" jdbcType="VARCHAR" property="ieType" />
  15 + <result column="exit_gross_weight" jdbcType="DOUBLE" property="exitGrossWeight" />
  16 + <result column="in_gross_weight" jdbcType="DOUBLE" property="inGrossWeight" />
  17 + <result column="goods_weight" jdbcType="DOUBLE" property="goodsWeight" />
  18 + <result column="actual_goods_weight" jdbcType="DOUBLE" property="actualGoodsWeight" />
  19 + <result column="creat_time" jdbcType="TIMESTAMP" property="creatTime" />
  20 + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  21 + <result column="master_list" jdbcType="VARCHAR" property="masterList" />
  22 + </resultMap>
  23 + <sql id="Base_Column_List">
  24 + id, barcode, area_id, chnl_no, busness_type, reason_code, reason_text, ve_name, ve_weight,
  25 + ie_type, exit_gross_weight, in_gross_weight, goods_weight, actual_goods_weight, creat_time,
  26 + update_time, master_list
  27 + </sql>
  28 + <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  29 + select
  30 + <include refid="Base_Column_List" />
  31 + from command_log
  32 + where id = #{id,jdbcType=VARCHAR}
  33 + </select>
  34 + <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  35 + delete from command_log
  36 + where id = #{id,jdbcType=VARCHAR}
  37 + </delete>
  38 + <insert id="insert" parameterType="com.sy.model.commandLog">
  39 + insert into command_log (id, barcode, area_id,
  40 + chnl_no, busness_type, reason_code,
  41 + reason_text, ve_name, ve_weight,
  42 + ie_type, exit_gross_weight, in_gross_weight,
  43 + goods_weight, actual_goods_weight, creat_time,
  44 + update_time, master_list)
  45 + values (#{id,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR},
  46 + #{chnlNo,jdbcType=VARCHAR}, #{busnessType,jdbcType=VARCHAR}, #{reasonCode,jdbcType=VARCHAR},
  47 + #{reasonText,jdbcType=VARCHAR}, #{veName,jdbcType=VARCHAR}, #{veWeight,jdbcType=DOUBLE},
  48 + #{ieType,jdbcType=VARCHAR}, #{exitGrossWeight,jdbcType=DOUBLE}, #{inGrossWeight,jdbcType=DOUBLE},
  49 + #{goodsWeight,jdbcType=DOUBLE}, #{actualGoodsWeight,jdbcType=DOUBLE}, #{creatTime,jdbcType=TIMESTAMP},
  50 + #{updateTime,jdbcType=TIMESTAMP}, #{masterList,jdbcType=VARCHAR})
  51 + </insert>
  52 + <insert id="insertSelective" parameterType="com.sy.model.commandLog">
  53 + insert into command_log
  54 + <trim prefix="(" suffix=")" suffixOverrides=",">
  55 + <if test="id != null">
  56 + id,
  57 + </if>
  58 + <if test="barcode != null">
  59 + barcode,
  60 + </if>
  61 + <if test="areaId != null">
  62 + area_id,
  63 + </if>
  64 + <if test="chnlNo != null">
  65 + chnl_no,
  66 + </if>
  67 + <if test="busnessType != null">
  68 + busness_type,
  69 + </if>
  70 + <if test="reasonCode != null">
  71 + reason_code,
  72 + </if>
  73 + <if test="reasonText != null">
  74 + reason_text,
  75 + </if>
  76 + <if test="veName != null">
  77 + ve_name,
  78 + </if>
  79 + <if test="veWeight != null">
  80 + ve_weight,
  81 + </if>
  82 + <if test="ieType != null">
  83 + ie_type,
  84 + </if>
  85 + <if test="exitGrossWeight != null">
  86 + exit_gross_weight,
  87 + </if>
  88 + <if test="inGrossWeight != null">
  89 + in_gross_weight,
  90 + </if>
  91 + <if test="goodsWeight != null">
  92 + goods_weight,
  93 + </if>
  94 + <if test="actualGoodsWeight != null">
  95 + actual_goods_weight,
  96 + </if>
  97 + <if test="creatTime != null">
  98 + creat_time,
  99 + </if>
  100 + <if test="updateTime != null">
  101 + update_time,
  102 + </if>
  103 + <if test="masterList != null">
  104 + master_list,
  105 + </if>
  106 + </trim>
  107 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  108 + <if test="id != null">
  109 + #{id,jdbcType=VARCHAR},
  110 + </if>
  111 + <if test="barcode != null">
  112 + #{barcode,jdbcType=VARCHAR},
  113 + </if>
  114 + <if test="areaId != null">
  115 + #{areaId,jdbcType=VARCHAR},
  116 + </if>
  117 + <if test="chnlNo != null">
  118 + #{chnlNo,jdbcType=VARCHAR},
  119 + </if>
  120 + <if test="busnessType != null">
  121 + #{busnessType,jdbcType=VARCHAR},
  122 + </if>
  123 + <if test="reasonCode != null">
  124 + #{reasonCode,jdbcType=VARCHAR},
  125 + </if>
  126 + <if test="reasonText != null">
  127 + #{reasonText,jdbcType=VARCHAR},
  128 + </if>
  129 + <if test="veName != null">
  130 + #{veName,jdbcType=VARCHAR},
  131 + </if>
  132 + <if test="veWeight != null">
  133 + #{veWeight,jdbcType=DOUBLE},
  134 + </if>
  135 + <if test="ieType != null">
  136 + #{ieType,jdbcType=VARCHAR},
  137 + </if>
  138 + <if test="exitGrossWeight != null">
  139 + #{exitGrossWeight,jdbcType=DOUBLE},
  140 + </if>
  141 + <if test="inGrossWeight != null">
  142 + #{inGrossWeight,jdbcType=DOUBLE},
  143 + </if>
  144 + <if test="goodsWeight != null">
  145 + #{goodsWeight,jdbcType=DOUBLE},
  146 + </if>
  147 + <if test="actualGoodsWeight != null">
  148 + #{actualGoodsWeight,jdbcType=DOUBLE},
  149 + </if>
  150 + <if test="creatTime != null">
  151 + #{creatTime,jdbcType=TIMESTAMP},
  152 + </if>
  153 + <if test="updateTime != null">
  154 + #{updateTime,jdbcType=TIMESTAMP},
  155 + </if>
  156 + <if test="masterList != null">
  157 + #{masterList,jdbcType=VARCHAR},
  158 + </if>
  159 + </trim>
  160 + </insert>
  161 + <update id="updateByPrimaryKeySelective" parameterType="com.sy.model.commandLog">
  162 + update command_log
  163 + <set>
  164 + <if test="barcode != null">
  165 + barcode = #{barcode,jdbcType=VARCHAR},
  166 + </if>
  167 + <if test="areaId != null">
  168 + area_id = #{areaId,jdbcType=VARCHAR},
  169 + </if>
  170 + <if test="chnlNo != null">
  171 + chnl_no = #{chnlNo,jdbcType=VARCHAR},
  172 + </if>
  173 + <if test="busnessType != null">
  174 + busness_type = #{busnessType,jdbcType=VARCHAR},
  175 + </if>
  176 + <if test="reasonCode != null">
  177 + reason_code = #{reasonCode,jdbcType=VARCHAR},
  178 + </if>
  179 + <if test="reasonText != null">
  180 + reason_text = #{reasonText,jdbcType=VARCHAR},
  181 + </if>
  182 + <if test="veName != null">
  183 + ve_name = #{veName,jdbcType=VARCHAR},
  184 + </if>
  185 + <if test="veWeight != null">
  186 + ve_weight = #{veWeight,jdbcType=DOUBLE},
  187 + </if>
  188 + <if test="ieType != null">
  189 + ie_type = #{ieType,jdbcType=VARCHAR},
  190 + </if>
  191 + <if test="exitGrossWeight != null">
  192 + exit_gross_weight = #{exitGrossWeight,jdbcType=DOUBLE},
  193 + </if>
  194 + <if test="inGrossWeight != null">
  195 + in_gross_weight = #{inGrossWeight,jdbcType=DOUBLE},
  196 + </if>
  197 + <if test="goodsWeight != null">
  198 + goods_weight = #{goodsWeight,jdbcType=DOUBLE},
  199 + </if>
  200 + <if test="actualGoodsWeight != null">
  201 + actual_goods_weight = #{actualGoodsWeight,jdbcType=DOUBLE},
  202 + </if>
  203 + <if test="creatTime != null">
  204 + creat_time = #{creatTime,jdbcType=TIMESTAMP},
  205 + </if>
  206 + <if test="updateTime != null">
  207 + update_time = #{updateTime,jdbcType=TIMESTAMP},
  208 + </if>
  209 + <if test="masterList != null">
  210 + master_list = #{masterList,jdbcType=VARCHAR},
  211 + </if>
  212 + </set>
  213 + where id = #{id,jdbcType=VARCHAR}
  214 + </update>
  215 + <update id="updateByPrimaryKey" parameterType="com.sy.model.commandLog">
  216 + update command_log
  217 + set barcode = #{barcode,jdbcType=VARCHAR},
  218 + area_id = #{areaId,jdbcType=VARCHAR},
  219 + chnl_no = #{chnlNo,jdbcType=VARCHAR},
  220 + busness_type = #{busnessType,jdbcType=VARCHAR},
  221 + reason_code = #{reasonCode,jdbcType=VARCHAR},
  222 + reason_text = #{reasonText,jdbcType=VARCHAR},
  223 + ve_name = #{veName,jdbcType=VARCHAR},
  224 + ve_weight = #{veWeight,jdbcType=DOUBLE},
  225 + ie_type = #{ieType,jdbcType=VARCHAR},
  226 + exit_gross_weight = #{exitGrossWeight,jdbcType=DOUBLE},
  227 + in_gross_weight = #{inGrossWeight,jdbcType=DOUBLE},
  228 + goods_weight = #{goodsWeight,jdbcType=DOUBLE},
  229 + actual_goods_weight = #{actualGoodsWeight,jdbcType=DOUBLE},
  230 + creat_time = #{creatTime,jdbcType=TIMESTAMP},
  231 + update_time = #{updateTime,jdbcType=TIMESTAMP},
  232 + master_list = #{masterList,jdbcType=VARCHAR}
  233 + where id = #{id,jdbcType=VARCHAR}
  234 + </update>
  235 +</mapper>