作者 朱兆平

理货回执解析入库OK

@@ -44,3 +44,20 @@ @@ -44,3 +44,20 @@
44 * 配合微信前端定时监控3个回执目录的文件数量,超过警戒值 微信发出提醒 44 * 配合微信前端定时监控3个回执目录的文件数量,超过警戒值 微信发出提醒
45 * path = /devops/watchdir?dir=tcs 45 * path = /devops/watchdir?dir=tcs
46 参数dir,可以是指定目录值,也可以是stcs、tcs、cfps 分别代表单一窗口回执目录、商务节点回执目录、CFPS数据订阅目录 46 参数dir,可以是指定目录值,也可以是stcs、tcs、cfps 分别代表单一窗口回执目录、商务节点回执目录、CFPS数据订阅目录
  47 +
  48 +* 回执解析code设置
  49 + * 01代表可自动发送
  50 + * 02代表已发送
  51 + * 入库03代表收到回执但是非正常,对应回执报文中的02、03、12、13
  52 + * 入库04代表回执正常,对应回执报文中的01、11
  53 + * 08代表发送删除报
  54 + * 12代表发送修改报
  55 + * 17代表未发送可人工发送/未发送
  56 +
  57 +* 海关返回code说明
  58 + * 01-接受申报;
  59 + * 02-待人工审核;
  60 + * 03-退单;
  61 + * 11-放行;
  62 + * 12-拒装;
  63 + * 13-禁卸。
@@ -196,10 +196,10 @@ public class CustomXmlHandleThread implements Runnable{ @@ -196,10 +196,10 @@ public class CustomXmlHandleThread implements Runnable{
196 i= customXmlHandle.arrivedmasterService.insertRecept(customReception); 196 i= customXmlHandle.arrivedmasterService.insertRecept(customReception);
197 break; 197 break;
198 case "MT5202": 198 case "MT5202":
199 - i = customXmlHandle.tallymasterService.insertRecept(customReception, "MT5202"); 199 + i = customXmlHandle.tallymasterService.insertRecept(customReception);
200 break; 200 break;
201 case "MT5201": 201 case "MT5201":
202 - i = customXmlHandle.tallymasterService.insertRecept(customReception, "MT5201"); 202 + i = customXmlHandle.tallymasterService.insertRecept(customReception);
203 break; 203 break;
204 case "MT4201": 204 case "MT4201":
205 i = customXmlHandle.departuresloadingService.insertRecept(customReception); 205 i = customXmlHandle.departuresloadingService.insertRecept(customReception);
  1 +package com.tianbo.analysis.service;
  2 +
  3 +import com.tianbo.analysis.model.CustomReception;
  4 +import com.tianbo.analysis.service.imp.CoustomAnalysisServiceImp;
  5 +import com.tianbo.analysis.service.imp.ShareServiceImp;
  6 +import com.tianbo.analysis.tools.AWBTools;
  7 +
  8 +public class NmmsBaseService {
  9 + public ShareServiceImp shareServiceImp;
  10 + public CoustomAnalysisServiceImp coustomAnalysisServiceImp;
  11 + public String awbA ;
  12 + public String awbH ;
  13 + public String rspCode;
  14 + public String nmsStatusCode;
  15 + public String reception;
  16 + public String flightDateStr;
  17 + public CustomReception customReception;
  18 +
  19 + public int insertRecept(CustomReception customReception){
  20 + this.shareServiceImp = new ShareServiceImp();
  21 + // 发送日志 插入
  22 + this.coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
  23 + this.customReception = customReception;
  24 +
  25 + // 主单号;处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  26 + this.awbA = AWBTools.awbFormat(customReception.getWayBillMaster());
  27 + this.awbH = customReception.getWayBillSecond();
  28 + this.rspCode = customReception.getResponseCode();
  29 + this.nmsStatusCode = AWBTools.transCusRspCode(rspCode);
  30 +
  31 + this.reception = customReception.getResponseText();
  32 + this.flightDateStr = customReception.getFlightDate();
  33 + return 0;
  34 +
  35 + }
  36 +}
@@ -8,5 +8,5 @@ import com.tianbo.analysis.model.CustomReception; @@ -8,5 +8,5 @@ import com.tianbo.analysis.model.CustomReception;
8 */ 8 */
9 public interface TALLYMASTERService { 9 public interface TALLYMASTERService {
10 10
11 - int insertRecept(CustomReception customReception, String mt); 11 + int insertRecept(CustomReception customReception);
12 } 12 }
@@ -6,6 +6,7 @@ import com.tianbo.analysis.model.ARRIVEDMASTER; @@ -6,6 +6,7 @@ import com.tianbo.analysis.model.ARRIVEDMASTER;
6 import com.tianbo.analysis.model.ARRIVEDSECONDARY; 6 import com.tianbo.analysis.model.ARRIVEDSECONDARY;
7 import com.tianbo.analysis.model.CustomReception; 7 import com.tianbo.analysis.model.CustomReception;
8 import com.tianbo.analysis.service.ARRIVEDMASTERService; 8 import com.tianbo.analysis.service.ARRIVEDMASTERService;
  9 +import com.tianbo.analysis.service.NmmsBaseService;
9 import com.tianbo.analysis.tools.AWBTools; 10 import com.tianbo.analysis.tools.AWBTools;
10 import com.tianbo.util.Date.DateUtil; 11 import com.tianbo.util.Date.DateUtil;
11 import lombok.extern.slf4j.Slf4j; 12 import lombok.extern.slf4j.Slf4j;
@@ -22,7 +23,7 @@ import java.util.List; @@ -22,7 +23,7 @@ import java.util.List;
22 */ 23 */
23 @Service 24 @Service
24 @Slf4j 25 @Slf4j
25 -public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService { 26 +public class ARRIVEDMASTERServiceImp extends NmmsBaseService implements ARRIVEDMASTERService{
26 27
27 28
28 @Autowired 29 @Autowired
@@ -36,18 +37,6 @@ public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService { @@ -36,18 +37,6 @@ public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService {
36 // 货物接收运抵主分单 37 // 货物接收运抵主分单
37 public int insertRecept(CustomReception customReception) { 38 public int insertRecept(CustomReception customReception) {
38 39
39 - ShareServiceImp shareServiceImp = new ShareServiceImp();  
40 -  
41 - // 发送日志 插入  
42 - CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();  
43 -  
44 - // 主单号  
45 - String awbA = customReception.getWayBillMaster();  
46 - String awbH = customReception.getWayBillSecond();  
47 - //回执内容  
48 - String reception = customReception.getResponseText();  
49 - String flightDateStr = customReception.getFlightDate();  
50 -  
51 if (!StringUtils.isEmpty(flightDateStr)) { 40 if (!StringUtils.isEmpty(flightDateStr)) {
52 Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr); 41 Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
53 42
@@ -31,7 +31,7 @@ public class CoustomAnalysisServiceImp implements CoustomAnalysisService { @@ -31,7 +31,7 @@ public class CoustomAnalysisServiceImp implements CoustomAnalysisService {
31 @Autowired 31 @Autowired
32 OriginmanifestsecondaryMapper originmanifestsecondaryMapper; 32 OriginmanifestsecondaryMapper originmanifestsecondaryMapper;
33 33
34 - CoustomAnalysisServiceImp(){ 34 + public CoustomAnalysisServiceImp(){
35 //处理多线程时 springboot 无法注入bean的问题 35 //处理多线程时 springboot 无法注入bean的问题
36 if (this.sendlogMapper==null){ 36 if (this.sendlogMapper==null){
37 this.sendlogMapper = SpringBeanUtitl.getBean(SENDLOGMapper.class); 37 this.sendlogMapper = SpringBeanUtitl.getBean(SENDLOGMapper.class);
@@ -49,7 +49,7 @@ public class ShareServiceImp { @@ -49,7 +49,7 @@ public class ShareServiceImp {
49 @Autowired 49 @Autowired
50 CUSTOMSMESSAGEMapper customsmessageMapper; 50 CUSTOMSMESSAGEMapper customsmessageMapper;
51 51
52 - ShareServiceImp(){ 52 + public ShareServiceImp(){
53 customsmessageMapper = SpringBeanUtitl.getBean(CUSTOMSMESSAGEMapper.class); 53 customsmessageMapper = SpringBeanUtitl.getBean(CUSTOMSMESSAGEMapper.class);
54 } 54 }
55 55
@@ -5,6 +5,7 @@ import com.tianbo.analysis.dao.TALLYSECONDARYMapper; @@ -5,6 +5,7 @@ import com.tianbo.analysis.dao.TALLYSECONDARYMapper;
5 import com.tianbo.analysis.model.CustomReception; 5 import com.tianbo.analysis.model.CustomReception;
6 import com.tianbo.analysis.model.TALLYMASTER; 6 import com.tianbo.analysis.model.TALLYMASTER;
7 import com.tianbo.analysis.model.TALLYSECONDARY; 7 import com.tianbo.analysis.model.TALLYSECONDARY;
  8 +import com.tianbo.analysis.service.NmmsBaseService;
8 import com.tianbo.analysis.service.TALLYMASTERService; 9 import com.tianbo.analysis.service.TALLYMASTERService;
9 import com.tianbo.util.Date.DateUtil; 10 import com.tianbo.util.Date.DateUtil;
10 import lombok.extern.slf4j.Slf4j; 11 import lombok.extern.slf4j.Slf4j;
@@ -16,13 +17,14 @@ import java.util.Date; @@ -16,13 +17,14 @@ import java.util.Date;
16 import java.util.List; 17 import java.util.List;
17 18
18 /** 19 /**
  20 + * 进出港理货回执解析入库
19 * @Auther: shenhl 21 * @Auther: shenhl
20 * @Date: 2019/8/23 17:17 22 * @Date: 2019/8/23 17:17
21 */ 23 */
22 24
23 @Service 25 @Service
24 @Slf4j 26 @Slf4j
25 -public class TALLYMASTERServiceImp implements TALLYMASTERService{ 27 +public class TALLYMASTERServiceImp extends NmmsBaseService implements TALLYMASTERService{
26 28
27 @Autowired 29 @Autowired
28 TALLYMASTERMapper tallymasterMapper; 30 TALLYMASTERMapper tallymasterMapper;
@@ -30,48 +32,84 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{ @@ -30,48 +32,84 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{
30 @Autowired 32 @Autowired
31 TALLYSECONDARYMapper tallysecondaryMapper; 33 TALLYSECONDARYMapper tallysecondaryMapper;
32 34
  35 + private Date flightDate;
  36 +
33 @Override 37 @Override
34 // 进出港理货 38 // 进出港理货
35 - public int insertRecept(CustomReception customReception, String mt) { 39 + public int insertRecept(CustomReception customReception) {
  40 + super.insertRecept(customReception);
36 41
  42 + if (!StringUtils.isEmpty(flightDateStr)) {
  43 + flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
37 44
38 - ShareServiceImp shareServiceImp = new ShareServiceImp(); 45 + // 判断航班号 航班日期 是否为空
  46 + if (flightDate != null && customReception.getFlightNo() != null){
39 47
40 - // 发送日志 插入  
41 - CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp(); 48 + //有分单号 更新分单
  49 + if(!StringUtils.isEmpty(awbH)){
  50 + second();
  51 + }
42 52
43 - // 主单号  
44 - String awbA = customReception.getWayBillMaster();  
45 - String awbH = customReception.getWayBillSecond();  
46 - //回执内容  
47 - String reception = customReception.getResponseText();  
48 - String flightDateStr = customReception.getFlightDate();  
49 53
50 - if (!StringUtils.isEmpty(flightDateStr)) {  
51 - Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
52 - // 设置 进出港理货 回执  
53 - TALLYSECONDARY tallysecondary = new TALLYSECONDARY();  
54 - tallysecondary.setReceiptinformation(reception); 54 + if (!StringUtils.isEmpty(awbA)){
  55 + master();
  56 + }
  57 + }else {
  58 +
  59 + return shareServiceImp.share(customReception.getMessageType(), customReception);
  60 + }
  61 + }
  62 +
  63 + //未进入主分单解析 返回0 失败
  64 + return 0;
  65 + }
55 66
  67 + /**
  68 + * 入库主单回执信息
  69 + * @return 成功返回1,失败返回0。
  70 + */
  71 + public int master(){
  72 + String mt = customReception.getMessageType();
56 //设置进出港理货回执、航班号、航班日期 73 //设置进出港理货回执、航班号、航班日期
57 TALLYMASTER tallymaster = new TALLYMASTER(); 74 TALLYMASTER tallymaster = new TALLYMASTER();
  75 + tallymaster.setWaybillnomaster(awbA);
58 tallymaster.setReceiptinformation(reception); 76 tallymaster.setReceiptinformation(reception);
59 tallymaster.setFlightno(customReception.getFlightNo()); 77 tallymaster.setFlightno(customReception.getFlightNo());
60 tallymaster.setFlightdate(flightDate); 78 tallymaster.setFlightdate(flightDate);
61 - // 判断航班号 航班日期 是否为空  
62 - if (flightDate != null && customReception.getFlightNo() != null){  
63 - if (awbA!=null && awbA.length()>0){  
64 - StringBuffer stringBuffer = new StringBuffer(awbA);  
65 - stringBuffer.insert(3,"-");  
66 - awbA = stringBuffer.toString(); 79 + tallymaster.setTalltype(mt);
  80 + tallymaster.setStatus(nmsStatusCode);
  81 + //更新主单回执
  82 + int i = tallymasterMapper.updateRECEIPTION(tallymaster);
  83 + //获取主单autoid
  84 + List<TALLYMASTER> arrivedmasterList = tallymasterMapper.selectAutoIdByAwb(tallymaster);
  85 + if(!arrivedmasterList.isEmpty()){
  86 + TALLYMASTER originMaster = arrivedmasterList.get(0);
  87 + String autoId = originMaster.getAutoid();
67 88
68 - //设置主分单的 主单号  
69 - tallysecondary.setWaybillnomaster(awbA);  
70 - tallymaster.setWaybillnomaster(awbA); 89 + int ii =coustomAnalysisServiceImp.insertSendlog(mt,reception,autoId);
  90 +
  91 + int iii = shareServiceImp.updateMessages(customReception);
  92 + if (i>0 && ii>0 ){
  93 + log.info("运单号 {} 理货回执更新成功",awbA);
  94 + return 1;
  95 + }
  96 + if (iii > 0){
  97 + return 1;
  98 + }
  99 + }
  100 + return 0;
71 } 101 }
72 102
73 - //有分单号 更新分单  
74 - if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){ 103 + /**
  104 + * 入库分单回执信息
  105 + * @return
  106 + */
  107 + public int second(){
  108 + TALLYSECONDARY tallysecondary = new TALLYSECONDARY();
  109 + tallysecondary.setReceiptinformation(reception);
  110 + tallysecondary.setStatus(nmsStatusCode);
  111 + //设置主分单的 主单号
  112 + tallysecondary.setWaybillnomaster(awbA);
75 //取分单号 113 //取分单号
76 String[] awbhArr = awbH.split("_"); 114 String[] awbhArr = awbH.split("_");
77 String awbh = awbhArr[1]; 115 String awbh = awbhArr[1];
@@ -80,49 +118,25 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{ @@ -80,49 +118,25 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{
80 int i = tallysecondaryMapper.updateRECEIPTION(tallysecondary); 118 int i = tallysecondaryMapper.updateRECEIPTION(tallysecondary);
81 //获取分单autoid 119 //获取分单autoid
82 List<TALLYSECONDARY> tallysecondaryList = tallysecondaryMapper.selectAutoIdByawbAawbH(tallysecondary); 120 List<TALLYSECONDARY> tallysecondaryList = tallysecondaryMapper.selectAutoIdByawbAawbH(tallysecondary);
  121 +
83 if(!tallysecondaryList.isEmpty()){ 122 if(!tallysecondaryList.isEmpty()){
84 TALLYSECONDARY arrivedSecond = tallysecondaryList.get(0); 123 TALLYSECONDARY arrivedSecond = tallysecondaryList.get(0);
85 String autoId = arrivedSecond.getAutoid(); 124 String autoId = arrivedSecond.getAutoid();
86 //插入sendlog记录表 125 //插入sendlog记录表
87 - log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);  
88 - int ii = coustomAnalysisServiceImp.insertSendlog(mt,reception,autoId); 126 + log.info("即将插入理货分单回执,运单号为:{},autoid:{}",awbH,autoId);
  127 + int ii = coustomAnalysisServiceImp.insertSendlog(customReception.getMessageType(),reception,autoId);
89 128
  129 + //通过messageid适配发送日志表并更新
90 int iii = shareServiceImp.updateMessages(customReception); 130 int iii = shareServiceImp.updateMessages(customReception);
91 - if (i>0 && ii>0 && iii > 0){ 131 + if (i>0 && ii>0){
  132 + log.info("运单号 {} 理货回执更新成功",awbH);
92 return 1; 133 return 1;
93 } 134 }
94 - }  
95 - return 0;  
96 - }  
97 -  
98 - //处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
99 - if (awbA!=null && awbA.length()>0){  
100 - //更新主单回执  
101 - int i = tallymasterMapper.updateRECEIPTION(tallymaster);  
102 - //获取分单autoid  
103 - List<TALLYMASTER> arrivedmasterList = tallymasterMapper.selectAutoIdByAwb(tallymaster);  
104 - if(!arrivedmasterList.isEmpty()){  
105 - TALLYMASTER originMaster = arrivedmasterList.get(0);  
106 - String autoId = originMaster.getAutoid();  
107 -  
108 - //插入sendlog记录表  
109 - log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);  
110 - int ii =coustomAnalysisServiceImp.insertSendlog(mt,reception,autoId);  
111 -  
112 - int iii = shareServiceImp.updateMessages(customReception);  
113 - if (i>0 && ii>0 && iii > 0){ 135 + if (iii > 0){
114 return 1; 136 return 1;
115 } 137 }
116 - }  
117 - return 0;  
118 - }  
119 - }else {  
120 138
121 - return shareServiceImp.share("MT5202", customReception);  
122 - }  
123 } 139 }
124 -  
125 - //未进入主分单解析 返回0 失败  
126 return 0; 140 return 0;
127 } 141 }
128 } 142 }
1 package com.tianbo.analysis.tools; 1 package com.tianbo.analysis.tools;
2 2
  3 +import org.apache.commons.lang.StringUtils;
  4 +
3 public class AWBTools { 5 public class AWBTools {
4 6
5 public static String awbFormat(String awbNo) { 7 public static String awbFormat(String awbNo) {
6 - if (awbNo != null && awbNo.length() > 0) { 8 + if (!StringUtils.isEmpty(awbNo)) {
7 StringBuffer stringBuffer = new StringBuffer(awbNo); 9 StringBuffer stringBuffer = new StringBuffer(awbNo);
8 stringBuffer.insert(3, "-"); 10 stringBuffer.insert(3, "-");
9 awbNo = stringBuffer.toString(); 11 awbNo = stringBuffer.toString();
@@ -18,4 +20,37 @@ public class AWBTools { @@ -18,4 +20,37 @@ public class AWBTools {
18 flight[1] = flightNo.substring(2); 20 flight[1] = flightNo.substring(2);
19 return flight; 21 return flight;
20 } 22 }
  23 +
  24 + /**
  25 + * 将海关回执中的response code 转换成新舱单1.0数据库中的相关状态,相关状态码参考readme.md
  26 + * @param rspCode
  27 + * @return
  28 + */
  29 + public static String transCusRspCode(String rspCode){
  30 + String nmsCode = "03";
  31 + switch (rspCode){
  32 + case "01":
  33 + nmsCode="04";
  34 + break;
  35 + case "02":
  36 + nmsCode="03";
  37 + break;
  38 + case "03":
  39 + nmsCode="03";
  40 + break;
  41 + case "11":
  42 + nmsCode="04";
  43 + break;
  44 + case "12":
  45 + nmsCode="03";
  46 + break;
  47 + case "13":
  48 + nmsCode="03";
  49 + break;
  50 + default:
  51 + nmsCode="03";
  52 + break;
  53 + }
  54 + return nmsCode;
  55 + }
21 } 56 }
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <result column="TCD_NAME" property="tcdName" jdbcType="VARCHAR" /> 7 <result column="TCD_NAME" property="tcdName" jdbcType="VARCHAR" />
8 <result column="TCD_TYPECODE" property="tcdTypecode" jdbcType="VARCHAR" /> 8 <result column="TCD_TYPECODE" property="tcdTypecode" jdbcType="VARCHAR" />
9 <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" /> 9 <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
10 - <result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" /> 10 + <result column="FLIGHTDATE" property="flightDate" jdbcType="DATE" />
11 <result column="CARRIER" property="carrier" jdbcType="VARCHAR" /> 11 <result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
12 <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" /> 12 <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
13 <result column="O_NAME" property="oName" jdbcType="VARCHAR" /> 13 <result column="O_NAME" property="oName" jdbcType="VARCHAR" />
@@ -349,13 +349,14 @@ @@ -349,13 +349,14 @@
349 UPDATE 349 UPDATE
350 ARRIVEDMASTER 350 ARRIVEDMASTER
351 SET 351 SET
352 - RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 352 + RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR},
  353 + STATUS = #{status,jdbcType=VARCHAR}
353 WHERE 354 WHERE
354 FLIGHTNO = #{flightno,jdbcType=VARCHAR} 355 FLIGHTNO = #{flightno,jdbcType=VARCHAR}
355 AND 356 AND
356 CARRIER = #{carrier,jdbcType=VARCHAR} 357 CARRIER = #{carrier,jdbcType=VARCHAR}
357 AND 358 AND
358 - FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP} 359 + FLIGHTDATE= #{flightDate,jdbcType=DATE}
359 AND 360 AND
360 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 361 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
361 </update> 362 </update>
@@ -366,7 +367,7 @@ @@ -366,7 +367,7 @@
366 WHERE 367 WHERE
367 FLIGHTNO= #{flightno,jdbcType=VARCHAR} 368 FLIGHTNO= #{flightno,jdbcType=VARCHAR}
368 AND 369 AND
369 - FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP} 370 + FLIGHTDATE= #{flightDate,jdbcType=DATE}
370 AND 371 AND
371 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 372 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
372 </select> 373 </select>
@@ -233,7 +233,7 @@ @@ -233,7 +233,7 @@
233 233
234 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ARRIVEDSECONDARY" > 234 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ARRIVEDSECONDARY" >
235 UPDATE ARRIVEDSECONDARY 235 UPDATE ARRIVEDSECONDARY
236 - SET RECEIPTION= #{receiption,jdbcType=VARCHAR} 236 + SET RECEIPTION= #{receiption,jdbcType=VARCHAR},STATUS = #{status,jdbcType=VARCHAR}
237 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 237 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
238 AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR} 238 AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
239 </update> 239 </update>
@@ -249,10 +249,12 @@ @@ -249,10 +249,12 @@
249 249
250 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.TALLYMASTER" > 250 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.TALLYMASTER" >
251 UPDATE TALLYMASTER 251 UPDATE TALLYMASTER
252 - SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 252 + SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR},
  253 + STATUS = #{status,jdbcType=VARCHAR}
253 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 254 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
254 - AND FLIGHTNO = #{flghtno, jdbcType=VARCHAR}  
255 - AND FLIGHTDATE = #{flightdate, jdbcType=TIMESTAMP} 255 + AND FLIGHTNO = #{flightno, jdbcType=VARCHAR}
  256 + AND FLIGHTDATE = #{flightdate, jdbcType=DATE}
  257 + AND TALLTYPE = #{talltype,jdbcType=VARCHAR }
256 </update> 258 </update>
257 259
258 <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER"> 260 <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER">
@@ -260,8 +262,9 @@ @@ -260,8 +262,9 @@
260 FROM TALLYMASTER 262 FROM TALLYMASTER
261 WHERE 263 WHERE
262 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 264 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
263 - AND FLIGHTNO = #{flghtno, jdbcType=VARCHAR}  
264 - AND FLIGHTDATE = #{flightdate, jdbcType=TIMESTAMP} 265 + AND FLIGHTNO = #{flightno, jdbcType=VARCHAR}
  266 + AND FLIGHTDATE = #{flightdate, jdbcType=DATE}
  267 + AND TALLTYPE = #{talltype,jdbcType=VARCHAR }
265 </select> 268 </select>
266 269
267 </mapper> 270 </mapper>
@@ -162,7 +162,8 @@ @@ -162,7 +162,8 @@
162 162
163 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.TALLYSECONDARY" > 163 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.TALLYSECONDARY" >
164 UPDATE TALLYSECONDARY 164 UPDATE TALLYSECONDARY
165 - SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 165 + SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR},
  166 + STATUS = #{status,jdbcType=VARCHAR}
166 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 167 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
167 AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR} 168 AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
168 </update> 169 </update>