作者 朱兆平

Merge remote-tracking branch 'origin/master'

正在显示 26 个修改的文件 包含 1682 行增加320 行删除
  1 +package com.tianbo.analysis.dao;
  2 +
  3 +import com.tianbo.analysis.model.ALLOCATEARRIVAL;
  4 +
  5 +import java.util.List;
  6 +
  7 +public interface ALLOCATEARRIVALMapper {
  8 + int insert(ALLOCATEARRIVAL record);
  9 +
  10 + int insertSelective(ALLOCATEARRIVAL record);
  11 +
  12 + int updateRECEIPTION(ALLOCATEARRIVAL record);
  13 +
  14 + List<ALLOCATEARRIVAL> selectAutoIdByAwb(ALLOCATEARRIVAL record);
  15 +}
  1 +package com.tianbo.analysis.dao;
  2 +
  3 +import com.tianbo.analysis.model.INPORTALLOCATE;
  4 +
  5 +import java.util.List;
  6 +
  7 +public interface INPORTALLOCATEMapper {
  8 + int insert(INPORTALLOCATE record);
  9 +
  10 + int insertSelective(INPORTALLOCATE record);
  11 +
  12 + int updateRECEIPTION(INPORTALLOCATE record);
  13 +
  14 + List<INPORTALLOCATE> selectAutoIdByAwb(INPORTALLOCATE record);
  15 +}
  1 +package com.tianbo.analysis.dao;
  2 +
  3 +import com.tianbo.analysis.model.INTERNATIONALTRANSIT;
  4 +
  5 +import java.util.List;
  6 +
  7 +public interface INTERNATIONALTRANSITMapper {
  8 + int insert(INTERNATIONALTRANSIT record);
  9 +
  10 + int insertSelective(INTERNATIONALTRANSIT record);
  11 +
  12 + int updateRECEIPTION(INTERNATIONALTRANSIT record);
  13 +
  14 + List<INTERNATIONALTRANSIT> selectAutoIdByAwb(INTERNATIONALTRANSIT record);
  15 +}
@@ -60,6 +60,12 @@ public class CustomXmlHandle{ @@ -60,6 +60,12 @@ public class CustomXmlHandle{
60 @Autowired 60 @Autowired
61 private PREPAREMASTERService preparemasterService; 61 private PREPAREMASTERService preparemasterService;
62 62
  63 + @Autowired
  64 + private ALLOCATEARRIVALService allocatearrivalService;
  65 +
  66 + @Autowired
  67 + private INPORTALLOCATEService inportallocateService;
  68 +
63 //通过@PostConstruct实现初始化bean之前进行的操作,解决service调用空指针问题 69 //通过@PostConstruct实现初始化bean之前进行的操作,解决service调用空指针问题
64 @PostConstruct 70 @PostConstruct
65 public void init() { 71 public void init() {
@@ -73,6 +79,10 @@ public class CustomXmlHandle{ @@ -73,6 +79,10 @@ public class CustomXmlHandle{
73 customXmlHandle.departuresloadingService = this.departuresloadingService; 79 customXmlHandle.departuresloadingService = this.departuresloadingService;
74 80
75 customXmlHandle.preparemasterService = this.preparemasterService; 81 customXmlHandle.preparemasterService = this.preparemasterService;
  82 +
  83 + customXmlHandle.allocatearrivalService = this.allocatearrivalService;
  84 +
  85 + customXmlHandle.inportallocateService = this.inportallocateService;
76 // 初使化时将已静态化的testService实例化 86 // 初使化时将已静态化的testService实例化
77 } 87 }
78 88
@@ -107,9 +117,12 @@ public class CustomXmlHandle{ @@ -107,9 +117,12 @@ public class CustomXmlHandle{
107 if(journeyid != null){ 117 if(journeyid != null){
108 118
109 String[] flightList = journeyid.split("/"); 119 String[] flightList = journeyid.split("/");
  120 + if(flightList.length > 0){
  121 + flightNo = flightList[0];
  122 + flightDate = flightList[1];
  123 + }
  124 +
110 125
111 - flightNo = flightList[0];  
112 - flightDate = flightList[1];  
113 } 126 }
114 127
115 String awbA = XMLXPath.getSingleValueByPath(document,waybillMaster); 128 String awbA = XMLXPath.getSingleValueByPath(document,waybillMaster);
@@ -141,6 +154,15 @@ public class CustomXmlHandle{ @@ -141,6 +154,15 @@ public class CustomXmlHandle{
141 case "MT2201": 154 case "MT2201":
142 i = customXmlHandle.preparemasterService.insertRecept(customReception); 155 i = customXmlHandle.preparemasterService.insertRecept(customReception);
143 break; 156 break;
  157 + case "MT6202":
  158 + i = customXmlHandle.inportallocateService.insertRecept(customReception);
  159 + break;
  160 + case "MT3202":
  161 + i = customXmlHandle.allocatearrivalService.insertRecept(customReception);
  162 + break;
  163 + case "MT8205":
  164 +
  165 + break;
144 166
145 } 167 }
146 168
  1 +package com.tianbo.analysis.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class ALLOCATEARRIVAL {
  6 + private String id;
  7 +
  8 + private Date createdate;
  9 +
  10 + private String waybillno;
  11 +
  12 + private String carrier;
  13 +
  14 + private String flightno;
  15 +
  16 + private Date flightdate;
  17 +
  18 + private String customos;
  19 +
  20 + private String arrivalpieces;
  21 +
  22 + private String arrivalweight;
  23 +
  24 + private String unloadingland;
  25 +
  26 + private String productcode;
  27 +
  28 + private String status;
  29 +
  30 + private String receiptinformation;
  31 +
  32 + public String getId() {
  33 + return id;
  34 + }
  35 +
  36 + public void setId(String id) {
  37 + this.id = id == null ? null : id.trim();
  38 + }
  39 +
  40 + public Date getCreatedate() {
  41 + return createdate;
  42 + }
  43 +
  44 + public void setCreatedate(Date createdate) {
  45 + this.createdate = createdate;
  46 + }
  47 +
  48 + public String getWaybillno() {
  49 + return waybillno;
  50 + }
  51 +
  52 + public void setWaybillno(String waybillno) {
  53 + this.waybillno = waybillno == null ? null : waybillno.trim();
  54 + }
  55 +
  56 + public String getCarrier() {
  57 + return carrier;
  58 + }
  59 +
  60 + public void setCarrier(String carrier) {
  61 + this.carrier = carrier == null ? null : carrier.trim();
  62 + }
  63 +
  64 + public String getFlightno() {
  65 + return flightno;
  66 + }
  67 +
  68 + public void setFlightno(String flightno) {
  69 + this.flightno = flightno == null ? null : flightno.trim();
  70 + }
  71 +
  72 + public Date getFlightdate() {
  73 + return flightdate;
  74 + }
  75 +
  76 + public void setFlightdate(Date flightdate) {
  77 + this.flightdate = flightdate;
  78 + }
  79 +
  80 + public String getCustomos() {
  81 + return customos;
  82 + }
  83 +
  84 + public void setCustomos(String customos) {
  85 + this.customos = customos == null ? null : customos.trim();
  86 + }
  87 +
  88 + public String getArrivalpieces() {
  89 + return arrivalpieces;
  90 + }
  91 +
  92 + public void setArrivalpieces(String arrivalpieces) {
  93 + this.arrivalpieces = arrivalpieces == null ? null : arrivalpieces.trim();
  94 + }
  95 +
  96 + public String getArrivalweight() {
  97 + return arrivalweight;
  98 + }
  99 +
  100 + public void setArrivalweight(String arrivalweight) {
  101 + this.arrivalweight = arrivalweight == null ? null : arrivalweight.trim();
  102 + }
  103 +
  104 + public String getUnloadingland() {
  105 + return unloadingland;
  106 + }
  107 +
  108 + public void setUnloadingland(String unloadingland) {
  109 + this.unloadingland = unloadingland == null ? null : unloadingland.trim();
  110 + }
  111 +
  112 + public String getProductcode() {
  113 + return productcode;
  114 + }
  115 +
  116 + public void setProductcode(String productcode) {
  117 + this.productcode = productcode == null ? null : productcode.trim();
  118 + }
  119 +
  120 + public String getStatus() {
  121 + return status;
  122 + }
  123 +
  124 + public void setStatus(String status) {
  125 + this.status = status == null ? null : status.trim();
  126 + }
  127 +
  128 + public String getReceiptinformation() {
  129 + return receiptinformation;
  130 + }
  131 +
  132 + public void setReceiptinformation(String receiptinformation) {
  133 + this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();
  134 + }
  135 +}
  1 +package com.tianbo.analysis.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class INPORTALLOCATE {
  6 + private String id;
  7 +
  8 + private Date createdate;
  9 +
  10 + private String waybillno;
  11 +
  12 + private String carrier;
  13 +
  14 + private String flightno;
  15 +
  16 + private Date flightdate;
  17 +
  18 + private String customos;
  19 +
  20 + private String tallypieces;
  21 +
  22 + private String tallyweight;
  23 +
  24 + private String allocatepieces;
  25 +
  26 + private String allocateweight;
  27 +
  28 + private String allocatedestination;
  29 +
  30 + private String trailernumber;
  31 +
  32 + private String status;
  33 +
  34 + private String receiptinformation;
  35 +
  36 + public String getId() {
  37 + return id;
  38 + }
  39 +
  40 + public void setId(String id) {
  41 + this.id = id == null ? null : id.trim();
  42 + }
  43 +
  44 + public Date getCreatedate() {
  45 + return createdate;
  46 + }
  47 +
  48 + public void setCreatedate(Date createdate) {
  49 + this.createdate = createdate;
  50 + }
  51 +
  52 + public String getWaybillno() {
  53 + return waybillno;
  54 + }
  55 +
  56 + public void setWaybillno(String waybillno) {
  57 + this.waybillno = waybillno == null ? null : waybillno.trim();
  58 + }
  59 +
  60 + public String getCarrier() {
  61 + return carrier;
  62 + }
  63 +
  64 + public void setCarrier(String carrier) {
  65 + this.carrier = carrier == null ? null : carrier.trim();
  66 + }
  67 +
  68 + public String getFlightno() {
  69 + return flightno;
  70 + }
  71 +
  72 + public void setFlightno(String flightno) {
  73 + this.flightno = flightno == null ? null : flightno.trim();
  74 + }
  75 +
  76 + public Date getFlightdate() {
  77 + return flightdate;
  78 + }
  79 +
  80 + public void setFlightdate(Date flightdate) {
  81 + this.flightdate = flightdate;
  82 + }
  83 +
  84 + public String getCustomos() {
  85 + return customos;
  86 + }
  87 +
  88 + public void setCustomos(String customos) {
  89 + this.customos = customos == null ? null : customos.trim();
  90 + }
  91 +
  92 + public String getTallypieces() {
  93 + return tallypieces;
  94 + }
  95 +
  96 + public void setTallypieces(String tallypieces) {
  97 + this.tallypieces = tallypieces == null ? null : tallypieces.trim();
  98 + }
  99 +
  100 + public String getTallyweight() {
  101 + return tallyweight;
  102 + }
  103 +
  104 + public void setTallyweight(String tallyweight) {
  105 + this.tallyweight = tallyweight == null ? null : tallyweight.trim();
  106 + }
  107 +
  108 + public String getAllocatepieces() {
  109 + return allocatepieces;
  110 + }
  111 +
  112 + public void setAllocatepieces(String allocatepieces) {
  113 + this.allocatepieces = allocatepieces == null ? null : allocatepieces.trim();
  114 + }
  115 +
  116 + public String getAllocateweight() {
  117 + return allocateweight;
  118 + }
  119 +
  120 + public void setAllocateweight(String allocateweight) {
  121 + this.allocateweight = allocateweight == null ? null : allocateweight.trim();
  122 + }
  123 +
  124 + public String getAllocatedestination() {
  125 + return allocatedestination;
  126 + }
  127 +
  128 + public void setAllocatedestination(String allocatedestination) {
  129 + this.allocatedestination = allocatedestination == null ? null : allocatedestination.trim();
  130 + }
  131 +
  132 + public String getTrailernumber() {
  133 + return trailernumber;
  134 + }
  135 +
  136 + public void setTrailernumber(String trailernumber) {
  137 + this.trailernumber = trailernumber == null ? null : trailernumber.trim();
  138 + }
  139 +
  140 + public String getStatus() {
  141 + return status;
  142 + }
  143 +
  144 + public void setStatus(String status) {
  145 + this.status = status == null ? null : status.trim();
  146 + }
  147 +
  148 + public String getReceiptinformation() {
  149 + return receiptinformation;
  150 + }
  151 +
  152 + public void setReceiptinformation(String receiptinformation) {
  153 + this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();
  154 + }
  155 +}
  1 +package com.tianbo.analysis.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class INTERNATIONALTRANSIT {
  6 + private String autoid;
  7 +
  8 + private Date createdate;
  9 +
  10 + private String originalCarrier;
  11 +
  12 + private String originalFlightno;
  13 +
  14 + private Date originalFlightdate;
  15 +
  16 + private String originalBillno;
  17 +
  18 + private String originalSubNumber;
  19 +
  20 + private String preCarrier;
  21 +
  22 + private String preFlightno;
  23 +
  24 + private Date preFlightdate;
  25 +
  26 + private String preBillno;
  27 +
  28 + private String preSubNumber;
  29 +
  30 + private String billpiece;
  31 +
  32 + private String billweight;
  33 +
  34 + private String product;
  35 +
  36 + private String originatingstation;
  37 +
  38 + private String packagingtype;
  39 +
  40 + private String status;
  41 +
  42 + private String receiption;
  43 +
  44 + private String destinationstationBill;
  45 +
  46 + public String getAutoid() {
  47 + return autoid;
  48 + }
  49 +
  50 + public void setAutoid(String autoid) {
  51 + this.autoid = autoid == null ? null : autoid.trim();
  52 + }
  53 +
  54 + public Date getCreatedate() {
  55 + return createdate;
  56 + }
  57 +
  58 + public void setCreatedate(Date createdate) {
  59 + this.createdate = createdate;
  60 + }
  61 +
  62 + public String getOriginalCarrier() {
  63 + return originalCarrier;
  64 + }
  65 +
  66 + public void setOriginalCarrier(String originalCarrier) {
  67 + this.originalCarrier = originalCarrier == null ? null : originalCarrier.trim();
  68 + }
  69 +
  70 + public String getOriginalFlightno() {
  71 + return originalFlightno;
  72 + }
  73 +
  74 + public void setOriginalFlightno(String originalFlightno) {
  75 + this.originalFlightno = originalFlightno == null ? null : originalFlightno.trim();
  76 + }
  77 +
  78 + public Date getOriginalFlightdate() {
  79 + return originalFlightdate;
  80 + }
  81 +
  82 + public void setOriginalFlightdate(Date originalFlightdate) {
  83 + this.originalFlightdate = originalFlightdate;
  84 + }
  85 +
  86 + public String getOriginalBillno() {
  87 + return originalBillno;
  88 + }
  89 +
  90 + public void setOriginalBillno(String originalBillno) {
  91 + this.originalBillno = originalBillno == null ? null : originalBillno.trim();
  92 + }
  93 +
  94 + public String getOriginalSubNumber() {
  95 + return originalSubNumber;
  96 + }
  97 +
  98 + public void setOriginalSubNumber(String originalSubNumber) {
  99 + this.originalSubNumber = originalSubNumber == null ? null : originalSubNumber.trim();
  100 + }
  101 +
  102 + public String getPreCarrier() {
  103 + return preCarrier;
  104 + }
  105 +
  106 + public void setPreCarrier(String preCarrier) {
  107 + this.preCarrier = preCarrier == null ? null : preCarrier.trim();
  108 + }
  109 +
  110 + public String getPreFlightno() {
  111 + return preFlightno;
  112 + }
  113 +
  114 + public void setPreFlightno(String preFlightno) {
  115 + this.preFlightno = preFlightno == null ? null : preFlightno.trim();
  116 + }
  117 +
  118 + public Date getPreFlightdate() {
  119 + return preFlightdate;
  120 + }
  121 +
  122 + public void setPreFlightdate(Date preFlightdate) {
  123 + this.preFlightdate = preFlightdate;
  124 + }
  125 +
  126 + public String getPreBillno() {
  127 + return preBillno;
  128 + }
  129 +
  130 + public void setPreBillno(String preBillno) {
  131 + this.preBillno = preBillno == null ? null : preBillno.trim();
  132 + }
  133 +
  134 + public String getPreSubNumber() {
  135 + return preSubNumber;
  136 + }
  137 +
  138 + public void setPreSubNumber(String preSubNumber) {
  139 + this.preSubNumber = preSubNumber == null ? null : preSubNumber.trim();
  140 + }
  141 +
  142 + public String getBillpiece() {
  143 + return billpiece;
  144 + }
  145 +
  146 + public void setBillpiece(String billpiece) {
  147 + this.billpiece = billpiece == null ? null : billpiece.trim();
  148 + }
  149 +
  150 + public String getBillweight() {
  151 + return billweight;
  152 + }
  153 +
  154 + public void setBillweight(String billweight) {
  155 + this.billweight = billweight == null ? null : billweight.trim();
  156 + }
  157 +
  158 + public String getProduct() {
  159 + return product;
  160 + }
  161 +
  162 + public void setProduct(String product) {
  163 + this.product = product == null ? null : product.trim();
  164 + }
  165 +
  166 + public String getOriginatingstation() {
  167 + return originatingstation;
  168 + }
  169 +
  170 + public void setOriginatingstation(String originatingstation) {
  171 + this.originatingstation = originatingstation == null ? null : originatingstation.trim();
  172 + }
  173 +
  174 + public String getPackagingtype() {
  175 + return packagingtype;
  176 + }
  177 +
  178 + public void setPackagingtype(String packagingtype) {
  179 + this.packagingtype = packagingtype == null ? null : packagingtype.trim();
  180 + }
  181 +
  182 + public String getStatus() {
  183 + return status;
  184 + }
  185 +
  186 + public void setStatus(String status) {
  187 + this.status = status == null ? null : status.trim();
  188 + }
  189 +
  190 + public String getReceiption() {
  191 + return receiption;
  192 + }
  193 +
  194 + public void setReceiption(String receiption) {
  195 + this.receiption = receiption == null ? null : receiption.trim();
  196 + }
  197 +
  198 + public String getDestinationstationBill() {
  199 + return destinationstationBill;
  200 + }
  201 +
  202 + public void setDestinationstationBill(String destinationstationBill) {
  203 + this.destinationstationBill = destinationstationBill == null ? null : destinationstationBill.trim();
  204 + }
  205 +}
  1 +package com.tianbo.analysis.service;
  2 +
  3 +import com.tianbo.analysis.model.CustomReception;
  4 +
  5 +/**
  6 + * @Auther: shenhl
  7 + * @Date: 2019/8/28 11:07
  8 + */
  9 +public interface ALLOCATEARRIVALService {
  10 +
  11 + int insertRecept(CustomReception customReception);
  12 +}
  1 +package com.tianbo.analysis.service;
  2 +
  3 +import com.tianbo.analysis.model.CustomReception;
  4 +
  5 +/**
  6 + * @Auther: shenhl
  7 + * @Date: 2019/8/28 11:21
  8 + */
  9 +public interface INPORTALLOCATEService {
  10 +
  11 + int insertRecept(CustomReception customReception);
  12 +
  13 +}
  1 +package com.tianbo.analysis.service;
  2 +
  3 +import com.tianbo.analysis.model.CustomReception;
  4 +
  5 +/**
  6 + * @Auther: shenhl
  7 + * @Date: 2019/8/28 11:52
  8 + */
  9 +public interface INTERNATIONALTRANSITService {
  10 +
  11 + int insertRecept(CustomReception customReception);
  12 +}
  1 +package com.tianbo.analysis.service.imp;
  2 +
  3 +import com.tianbo.analysis.dao.ALLOCATEARRIVALMapper;
  4 +import com.tianbo.analysis.model.ALLOCATEARRIVAL;
  5 +import com.tianbo.analysis.model.CustomReception;
  6 +import com.tianbo.analysis.service.ALLOCATEARRIVALService;
  7 +import com.tianbo.util.Date.DateUtil;
  8 +import lombok.extern.slf4j.Slf4j;
  9 +import org.apache.commons.lang.StringUtils;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.stereotype.Service;
  12 +
  13 +import java.util.Date;
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * @Auther: shenhl
  18 + * @Date: 2019/8/28 11:08
  19 + */
  20 +@Service
  21 +@Slf4j
  22 +public class ALLOCATEARRIVALServiceImp implements ALLOCATEARRIVALService {
  23 +
  24 + @Autowired
  25 + ALLOCATEARRIVALMapper allocatearrivalMapper;
  26 +
  27 +
  28 + @Override
  29 + public int insertRecept(CustomReception customReception) {
  30 + ShareServiceImp shareServiceImp = new ShareServiceImp();
  31 +
  32 + // 发送日志 插入
  33 + CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
  34 +
  35 + // 主单号
  36 + String awbA = customReception.getWayBillMaster();
  37 + //回执内容
  38 + String reception = customReception.getResponseText();
  39 + String flightDateStr = customReception.getFlightDate();
  40 + if (!StringUtils.isEmpty(flightDateStr)) {
  41 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  42 + //设置主单回执、航班号、航班日期
  43 + ALLOCATEARRIVAL allocatearrival = new ALLOCATEARRIVAL();
  44 + allocatearrival.setReceiptinformation(reception);
  45 + allocatearrival.setFlightno(customReception.getFlightNo().substring(2));
  46 + allocatearrival.setFlightdate(flightDate);
  47 +
  48 + if (awbA!=null && awbA.length()>0){
  49 + StringBuffer stringBuffer = new StringBuffer(awbA);
  50 + stringBuffer.insert(3,"-");
  51 + awbA = stringBuffer.toString();
  52 +
  53 + //设置主分单的 主单号
  54 + allocatearrival.setWaybillno(awbA);
  55 + }
  56 +
  57 +
  58 + // 判断航班号 航班日期 是否为空
  59 + if (flightDate != null && customReception.getFlightNo() != null){
  60 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  61 + if (awbA!=null && awbA.length()>0){
  62 + //更新主单回执
  63 + int i = allocatearrivalMapper.updateRECEIPTION(allocatearrival);
  64 + //获取分单autoid
  65 + List<ALLOCATEARRIVAL> arrivedmasterList = allocatearrivalMapper.selectAutoIdByAwb(allocatearrival);
  66 + if(!arrivedmasterList.isEmpty()){
  67 + ALLOCATEARRIVAL departuresloading1 = arrivedmasterList.get(0);
  68 + String autoId = departuresloading1.getId();
  69 +
  70 + //插入sendlog记录表
  71 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  72 + int ii =coustomAnalysisServiceImp.insertSendlog("MT3202",reception,autoId);
  73 +
  74 + int iii = shareServiceImp.updateMessages(customReception);
  75 + if (i>0 && ii>0 && iii > 0){
  76 + return 1;
  77 + }
  78 + }
  79 + return 0;
  80 + }
  81 + }else {
  82 +
  83 + return shareServiceImp.share("MT3202", customReception);
  84 + }
  85 +
  86 + }
  87 +
  88 + //未进入主分单解析 返回0 失败
  89 + return 0;
  90 + }
  91 +}
@@ -8,6 +8,7 @@ import com.tianbo.analysis.model.CustomReception; @@ -8,6 +8,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.util.Date.DateUtil; 9 import com.tianbo.util.Date.DateUtil;
10 import lombok.extern.slf4j.Slf4j; 10 import lombok.extern.slf4j.Slf4j;
  11 +import org.apache.commons.lang.StringUtils;
11 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
13 14
@@ -45,85 +46,84 @@ public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService { @@ -45,85 +46,84 @@ public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService {
45 //回执内容 46 //回执内容
46 String reception = customReception.getResponseText(); 47 String reception = customReception.getResponseText();
47 String flightDateStr = customReception.getFlightDate(); 48 String flightDateStr = customReception.getFlightDate();
48 - Date flightDate = new Date();  
49 - if (flightDateStr != null){  
50 - flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
51 - }  
52 49
53 - // 设置 接收运抵分单 回执  
54 - ARRIVEDSECONDARY arrivedsecondary = new ARRIVEDSECONDARY();  
55 - arrivedsecondary.setReceiption(reception);  
56 -  
57 - //设置主单回执、航班号、航班日期  
58 - ARRIVEDMASTER arrivedmaster = new ARRIVEDMASTER();  
59 - arrivedmaster.setReceiptinformation(reception);  
60 - arrivedmaster.setFlightno(customReception.getFlightNo());  
61 - arrivedmaster.setFlightdate(flightDate);  
62 -  
63 - // 判断航班号 航班日期 是否为空  
64 - if (flightDate != null && customReception.getFlightNo() != null){  
65 - if (awbA!=null && awbA.length()>0){  
66 - StringBuffer stringBuffer = new StringBuffer(awbA);  
67 - stringBuffer.insert(3,"-");  
68 - awbA = stringBuffer.toString();  
69 -  
70 - //设置主分单的 主单号  
71 - arrivedsecondary.setWaybillnomaster(awbA);  
72 - arrivedmaster.setWaybillnomaster(awbA);  
73 - } 50 + if (!StringUtils.isEmpty(flightDateStr)) {
  51 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  52 +
  53 + // 设置 接收运抵分单 回执
  54 + ARRIVEDSECONDARY arrivedsecondary = new ARRIVEDSECONDARY();
  55 + arrivedsecondary.setReceiption(reception);
  56 +
  57 + //设置主单回执、航班号、航班日期
  58 + ARRIVEDMASTER arrivedmaster = new ARRIVEDMASTER();
  59 + arrivedmaster.setReceiptinformation(reception);
  60 + arrivedmaster.setFlightno(customReception.getFlightNo());
  61 + arrivedmaster.setFlightdate(flightDate);
  62 +
  63 + // 判断航班号 航班日期 是否为空
  64 + if (flightDate != null && customReception.getFlightNo() != null){
  65 + if (awbA!=null && awbA.length()>0){
  66 + StringBuffer stringBuffer = new StringBuffer(awbA);
  67 + stringBuffer.insert(3,"-");
  68 + awbA = stringBuffer.toString();
  69 +
  70 + //设置主分单的 主单号
  71 + arrivedsecondary.setWaybillnomaster(awbA);
  72 + arrivedmaster.setWaybillnomaster(awbA);
  73 + }
74 74
75 - //有分单号 更新分单  
76 - if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){  
77 - //取分单号  
78 - String[] awbhArr = awbH.split("_");  
79 - String awbh = awbhArr[1];  
80 - arrivedsecondary.setWaybillnosecondary(awbh);  
81 - //更新分单回执  
82 - int i = arrivedsecondaryMapper.updateRECEIPTION(arrivedsecondary);  
83 - //获取分单autoid  
84 - List<ARRIVEDSECONDARY> arrivedsecondaryList = arrivedsecondaryMapper.selectAutoIdByawbAawbH(arrivedsecondary);  
85 - if(!arrivedsecondaryList.isEmpty()){  
86 - ARRIVEDSECONDARY arrivedSecond = arrivedsecondaryList.get(0);  
87 - String autoId = arrivedSecond.getAutoid();  
88 - //插入sendlog记录表  
89 - log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);  
90 - int ii = coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);  
91 -  
92 - int iii = shareServiceImp.updateMessages(customReception);  
93 - if (i>0 && ii>0 && iii > 0){  
94 - return 1; 75 + //有分单号 更新分单
  76 + if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){
  77 + //取分单号
  78 + String[] awbhArr = awbH.split("_");
  79 + String awbh = awbhArr[1];
  80 + arrivedsecondary.setWaybillnosecondary(awbh);
  81 + //更新分单回执
  82 + int i = arrivedsecondaryMapper.updateRECEIPTION(arrivedsecondary);
  83 + //获取分单autoid
  84 + List<ARRIVEDSECONDARY> arrivedsecondaryList = arrivedsecondaryMapper.selectAutoIdByawbAawbH(arrivedsecondary);
  85 + if(!arrivedsecondaryList.isEmpty()){
  86 + ARRIVEDSECONDARY arrivedSecond = arrivedsecondaryList.get(0);
  87 + String autoId = arrivedSecond.getAutoid();
  88 + //插入sendlog记录表
  89 + log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);
  90 + int ii = coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);
  91 +
  92 + int iii = shareServiceImp.updateMessages(customReception);
  93 + if (i>0 && ii>0 && iii > 0){
  94 + return 1;
  95 + }
95 } 96 }
  97 + return 0;
96 } 98 }
97 - return 0;  
98 - }  
99 99
100 - //处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
101 - if (awbA!=null && awbA.length()>0){  
102 - //更新主单回执  
103 - int i = arrivedmasterMapper.updateRECEIPTION(arrivedmaster);  
104 - //获取分单autoid  
105 - List<ARRIVEDMASTER> arrivedmasterList = arrivedmasterMapper.selectAutoIdByAwb(arrivedmaster);  
106 - if(!arrivedmasterList.isEmpty()){  
107 - ARRIVEDMASTER originMaster = arrivedmasterList.get(0);  
108 - String autoId = originMaster.getAutoid();  
109 -  
110 - //插入sendlog记录表  
111 - log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);  
112 - int ii =coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);  
113 -  
114 - int iii = shareServiceImp.updateMessages(customReception);  
115 - if (i>0 && ii>0 && iii > 0){  
116 - return 1; 100 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  101 + if (awbA!=null && awbA.length()>0){
  102 + //更新主单回执
  103 + int i = arrivedmasterMapper.updateRECEIPTION(arrivedmaster);
  104 + //获取分单autoid
  105 + List<ARRIVEDMASTER> arrivedmasterList = arrivedmasterMapper.selectAutoIdByAwb(arrivedmaster);
  106 + if(!arrivedmasterList.isEmpty()){
  107 + ARRIVEDMASTER originMaster = arrivedmasterList.get(0);
  108 + String autoId = originMaster.getAutoid();
  109 +
  110 + //插入sendlog记录表
  111 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  112 + int ii =coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);
  113 +
  114 + int iii = shareServiceImp.updateMessages(customReception);
  115 + if (i>0 && ii>0 && iii > 0){
  116 + return 1;
  117 + }
117 } 118 }
  119 + return 0;
118 } 120 }
119 - return 0;  
120 - }  
121 - }else { 121 + }else {
122 122
123 - return shareServiceImp.share("MT3201", customReception); 123 + return shareServiceImp.share("MT3201", customReception);
  124 + }
124 } 125 }
125 126
126 -  
127 //未进入主分单解析 返回0 失败 127 //未进入主分单解析 返回0 失败
128 return 0; 128 return 0;
129 } 129 }
@@ -11,6 +11,7 @@ import com.tianbo.analysis.service.CoustomAnalysisService; @@ -11,6 +11,7 @@ import com.tianbo.analysis.service.CoustomAnalysisService;
11 import com.tianbo.util.Date.DateUtil; 11 import com.tianbo.util.Date.DateUtil;
12 import com.tianbo.util.Helper; 12 import com.tianbo.util.Helper;
13 import lombok.extern.slf4j.Slf4j; 13 import lombok.extern.slf4j.Slf4j;
  14 +import org.apache.commons.lang.StringUtils;
14 import org.springframework.beans.factory.annotation.Autowired; 15 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Service; 16 import org.springframework.stereotype.Service;
16 17
@@ -42,84 +43,81 @@ public class CoustomAnalysisServiceImp implements CoustomAnalysisService { @@ -42,84 +43,81 @@ public class CoustomAnalysisServiceImp implements CoustomAnalysisService {
42 String reception = customReception.getResponseText(); 43 String reception = customReception.getResponseText();
43 String flightDateStr = customReception.getFlightDate(); 44 String flightDateStr = customReception.getFlightDate();
44 45
45 - Date flightDate = new Date();  
46 - if (flightDateStr != null){  
47 - flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
48 - }  
49 -  
50 -  
51 - // 设置分单回执  
52 - Originmanifestsecondary originmanifestsecondary = new Originmanifestsecondary();  
53 - originmanifestsecondary.setReceiption(reception);  
54 -  
55 - // 设置主单回执、航班号、航班日期  
56 - ORIGINMANIFESTMASTER originmanifestmaster = new ORIGINMANIFESTMASTER();  
57 - originmanifestmaster.setReceiptinformation(reception);  
58 - originmanifestmaster.setFlightno(customReception.getFlightNo());  
59 - originmanifestmaster.setFlightDate(flightDate);  
60 -  
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();  
67 -  
68 - //设置主分单的 主单号  
69 - originmanifestsecondary.setWaybillnomaster(awbA);  
70 - originmanifestmaster.setWaybillnomaster(awbA);  
71 - } 46 +// Date flightDate = new Date();
  47 + if (!StringUtils.isEmpty(flightDateStr)){
  48 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  49 +
  50 + // 设置分单回执
  51 + Originmanifestsecondary originmanifestsecondary = new Originmanifestsecondary();
  52 + originmanifestsecondary.setReceiption(reception);
  53 +
  54 + // 设置主单回执、航班号、航班日期
  55 + ORIGINMANIFESTMASTER originmanifestmaster = new ORIGINMANIFESTMASTER();
  56 + originmanifestmaster.setReceiptinformation(reception);
  57 + originmanifestmaster.setFlightno(customReception.getFlightNo());
  58 + originmanifestmaster.setFlightDate(flightDate);
  59 +
  60 + // 判断航班号 航班日期 是否为空
  61 + if (flightDate != null && customReception.getFlightNo() != null){
  62 + if (awbA!=null && awbA.length()>0){
  63 + StringBuffer stringBuffer = new StringBuffer(awbA);
  64 + stringBuffer.insert(3,"-");
  65 + awbA = stringBuffer.toString();
  66 +
  67 + //设置主分单的 主单号
  68 + originmanifestsecondary.setWaybillnomaster(awbA);
  69 + originmanifestmaster.setWaybillnomaster(awbA);
  70 + }
72 71
73 - //有分单号 更新分单  
74 - if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){  
75 - //取分单号  
76 - String[] awbhArr = awbH.split("_");  
77 - String awbh = awbhArr[1];  
78 - originmanifestsecondary.setWaybillnosecondary(awbh);  
79 - //更新分单回执  
80 - int i = originmanifestsecondaryMapper.updateRECEIPTION(originmanifestsecondary);  
81 - //获取分单autoid  
82 - List<Originmanifestsecondary> originmanifestsecondaryList = originmanifestsecondaryMapper.selectAutoIdByawbAawbH(originmanifestsecondary);  
83 - if(!originmanifestsecondaryList.isEmpty()){  
84 - Originmanifestsecondary originSecond = originmanifestsecondaryList.get(0);  
85 - String autoId = originSecond.getAutoid();  
86 - //插入sendlog记录表  
87 - log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);  
88 - int ii = insertSendlog("MT1201",reception,autoId);  
89 -  
90 - int iii = shareServiceImp.updateMessages(customReception);  
91 - if (i>0 && ii>0 && iii > 0){  
92 - return 1; 72 + //有分单号 更新分单
  73 + if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){
  74 + //取分单号
  75 + String[] awbhArr = awbH.split("_");
  76 + String awbh = awbhArr[1];
  77 + originmanifestsecondary.setWaybillnosecondary(awbh);
  78 + //更新分单回执
  79 + int i = originmanifestsecondaryMapper.updateRECEIPTION(originmanifestsecondary);
  80 + //获取分单autoid
  81 + List<Originmanifestsecondary> originmanifestsecondaryList = originmanifestsecondaryMapper.selectAutoIdByawbAawbH(originmanifestsecondary);
  82 + if(!originmanifestsecondaryList.isEmpty()){
  83 + Originmanifestsecondary originSecond = originmanifestsecondaryList.get(0);
  84 + String autoId = originSecond.getAutoid();
  85 + //插入sendlog记录表
  86 + log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);
  87 + int ii = insertSendlog("MT1201",reception,autoId);
  88 +
  89 + int iii = shareServiceImp.updateMessages(customReception);
  90 + if (i>0 && ii>0 && iii > 0){
  91 + return 1;
  92 + }
93 } 93 }
  94 + return 0;
94 } 95 }
95 - return 0;  
96 - }  
97 96
98 - //处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
99 - if (awbA!=null && awbA.length()>0){  
100 - //更新主单回执  
101 - int i = originmanifestmasterMapper.updateRECEIPTION(originmanifestmaster);  
102 - //获取分单autoid  
103 - List<ORIGINMANIFESTMASTER> originmanifestmasterList = originmanifestmasterMapper.selectAutoIdByAwb(originmanifestmaster);  
104 - if(!originmanifestmasterList.isEmpty()){  
105 - ORIGINMANIFESTMASTER originMaster = originmanifestmasterList.get(0);  
106 - String autoId = originMaster.getAutoid();  
107 -  
108 - //插入sendlog记录表  
109 - log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);  
110 - int ii =insertSendlog("MT1201",reception,autoId);  
111 -  
112 - int iii = shareServiceImp.updateMessages(customReception);  
113 - if (i>0 && ii>0 && iii > 0){  
114 - return 1; 97 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  98 + if (awbA!=null && awbA.length()>0){
  99 + //更新主单回执
  100 + int i = originmanifestmasterMapper.updateRECEIPTION(originmanifestmaster);
  101 + //获取分单autoid
  102 + List<ORIGINMANIFESTMASTER> originmanifestmasterList = originmanifestmasterMapper.selectAutoIdByAwb(originmanifestmaster);
  103 + if(!originmanifestmasterList.isEmpty()){
  104 + ORIGINMANIFESTMASTER originMaster = originmanifestmasterList.get(0);
  105 + String autoId = originMaster.getAutoid();
  106 +
  107 + //插入sendlog记录表
  108 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  109 + int ii =insertSendlog("MT1201",reception,autoId);
  110 +
  111 + int iii = shareServiceImp.updateMessages(customReception);
  112 + if (i>0 && ii>0 && iii > 0){
  113 + return 1;
  114 + }
115 } 115 }
  116 + return 0;
116 } 117 }
117 - return 0; 118 + }else {
  119 + return shareServiceImp.share("MT1201", customReception);
118 } 120 }
119 - }else {  
120 -  
121 -  
122 - return shareServiceImp.share("MT1201", customReception);  
123 } 121 }
124 122
125 //未进入主分单解析 返回0 失败 123 //未进入主分单解析 返回0 失败
@@ -6,6 +6,7 @@ import com.tianbo.analysis.model.DEPARTURESLOADING; @@ -6,6 +6,7 @@ import com.tianbo.analysis.model.DEPARTURESLOADING;
6 import com.tianbo.analysis.service.DEPARTURESLOADINGService; 6 import com.tianbo.analysis.service.DEPARTURESLOADINGService;
7 import com.tianbo.util.Date.DateUtil; 7 import com.tianbo.util.Date.DateUtil;
8 import lombok.extern.slf4j.Slf4j; 8 import lombok.extern.slf4j.Slf4j;
  9 +import org.apache.commons.lang.StringUtils;
9 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.stereotype.Service; 11 import org.springframework.stereotype.Service;
11 12
@@ -37,54 +38,54 @@ public class DEPARTURESLOADINGServiceImp implements DEPARTURESLOADINGService{ @@ -37,54 +38,54 @@ public class DEPARTURESLOADINGServiceImp implements DEPARTURESLOADINGService{
37 //回执内容 38 //回执内容
38 String reception = customReception.getResponseText(); 39 String reception = customReception.getResponseText();
39 String flightDateStr = customReception.getFlightDate(); 40 String flightDateStr = customReception.getFlightDate();
40 - Date flightDate = new Date();  
41 - if (flightDateStr != null){  
42 - flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
43 - }  
44 -  
45 - //设置主单回执、航班号、航班日期  
46 - DEPARTURESLOADING departuresloading = new DEPARTURESLOADING();  
47 - departuresloading.setReceiption(reception);  
48 - departuresloading.setFlightno(customReception.getFlightNo());  
49 - departuresloading.setFlightdate(flightDate); 41 + if (!StringUtils.isEmpty(flightDateStr)) {
  42 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  43 + //设置主单回执、航班号、航班日期
  44 + DEPARTURESLOADING departuresloading = new DEPARTURESLOADING();
  45 + departuresloading.setReceiption(reception);
  46 + departuresloading.setFlightno(customReception.getFlightNo());
  47 + departuresloading.setFlightdate(flightDate);
50 48
51 - if (awbA!=null && awbA.length()>0){  
52 - StringBuffer stringBuffer = new StringBuffer(awbA);  
53 - stringBuffer.insert(3,"-");  
54 - awbA = stringBuffer.toString(); 49 + if (awbA!=null && awbA.length()>0){
  50 + StringBuffer stringBuffer = new StringBuffer(awbA);
  51 + stringBuffer.insert(3,"-");
  52 + awbA = stringBuffer.toString();
55 53
56 - //设置主分单的 主单号  
57 - departuresloading.setWaybillno(awbA);  
58 - } 54 + //设置主分单的 主单号
  55 + departuresloading.setWaybillno(awbA);
  56 + }
59 57
60 58
61 - // 判断航班号 航班日期 是否为空  
62 - if (flightDate != null && customReception.getFlightNo() != null){  
63 - //处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
64 - if (awbA!=null && awbA.length()>0){  
65 - //更新主单回执  
66 - int i = departuresloadingMapper.updateRECEIPTION(departuresloading);  
67 - //获取分单autoid  
68 - List<DEPARTURESLOADING> arrivedmasterList = departuresloadingMapper.selectAutoIdByAwb(departuresloading);  
69 - if(!arrivedmasterList.isEmpty()){  
70 - DEPARTURESLOADING departuresloading1 = arrivedmasterList.get(0);  
71 - String autoId = departuresloading1.getId();  
72 -  
73 - //插入sendlog记录表  
74 - log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);  
75 - int ii =coustomAnalysisServiceImp.insertSendlog("MT4201",reception,autoId);  
76 -  
77 - int iii = shareServiceImp.updateMessages(customReception);  
78 - if (i>0 && ii>0 && iii > 0){  
79 - return 1; 59 + // 判断航班号 航班日期 是否为空
  60 + if (flightDate != null && customReception.getFlightNo() != null){
  61 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  62 + if (awbA!=null && awbA.length()>0){
  63 + //更新主单回执
  64 + int i = departuresloadingMapper.updateRECEIPTION(departuresloading);
  65 + //获取分单autoid
  66 + List<DEPARTURESLOADING> arrivedmasterList = departuresloadingMapper.selectAutoIdByAwb(departuresloading);
  67 + if(!arrivedmasterList.isEmpty()){
  68 + DEPARTURESLOADING departuresloading1 = arrivedmasterList.get(0);
  69 + String autoId = departuresloading1.getId();
  70 +
  71 + //插入sendlog记录表
  72 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  73 + int ii =coustomAnalysisServiceImp.insertSendlog("MT4201",reception,autoId);
  74 +
  75 + int iii = shareServiceImp.updateMessages(customReception);
  76 + if (i>0 && ii>0 && iii > 0){
  77 + return 1;
  78 + }
80 } 79 }
  80 + return 0;
81 } 81 }
82 - return 0; 82 + }else {
  83 +
  84 + return shareServiceImp.share("MT4201", customReception);
83 } 85 }
84 - }else {  
85 86
86 - return shareServiceImp.share("MT4201", customReception);  
87 } 87 }
  88 +
88 //未进入主分单解析 返回0 失败 89 //未进入主分单解析 返回0 失败
89 return 0; 90 return 0;
90 } 91 }
  1 +package com.tianbo.analysis.service.imp;
  2 +
  3 +import com.fasterxml.jackson.databind.annotation.JsonAppend;
  4 +import com.tianbo.analysis.dao.INPORTALLOCATEMapper;
  5 +import com.tianbo.analysis.model.CustomReception;
  6 +import com.tianbo.analysis.model.INPORTALLOCATE;
  7 +import com.tianbo.analysis.service.INPORTALLOCATEService;
  8 +import com.tianbo.util.Date.DateUtil;
  9 +import lombok.extern.slf4j.Slf4j;
  10 +import org.apache.commons.lang.StringUtils;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.stereotype.Service;
  13 +
  14 +import java.util.Date;
  15 +import java.util.List;
  16 +
  17 +/**
  18 + * @Auther: shenhl
  19 + * @Date: 2019/8/28 11:21
  20 + */
  21 +
  22 +@Service
  23 +@Slf4j
  24 +public class INPORTALLOCATEServiceImp implements INPORTALLOCATEService{
  25 +
  26 + @Autowired
  27 + INPORTALLOCATEMapper inportallocateMapper;
  28 +
  29 +
  30 + @Override
  31 + public int insertRecept(CustomReception customReception) {
  32 + ShareServiceImp shareServiceImp = new ShareServiceImp();
  33 +
  34 + // 发送日志 插入
  35 + CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
  36 +
  37 + // 主单号
  38 + String awbA = customReception.getWayBillMaster();
  39 + //回执内容
  40 + String reception = customReception.getResponseText();
  41 + String flightDateStr = customReception.getFlightDate();
  42 + if (!StringUtils.isEmpty(flightDateStr)) {
  43 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  44 + //设置主单回执、航班号、航班日期
  45 + INPORTALLOCATE inportallocate = new INPORTALLOCATE();
  46 + inportallocate.setReceiptinformation(reception);
  47 + inportallocate.setFlightno(customReception.getFlightNo().substring(2));
  48 + inportallocate.setFlightdate(flightDate);
  49 +
  50 + if (awbA!=null && awbA.length()>0){
  51 + StringBuffer stringBuffer = new StringBuffer(awbA);
  52 + stringBuffer.insert(3,"-");
  53 + awbA = stringBuffer.toString();
  54 +
  55 + //设置主分单的 主单号
  56 + inportallocate.setWaybillno(awbA);
  57 + }
  58 +
  59 +
  60 + // 判断航班号 航班日期 是否为空
  61 + if (flightDate != null && customReception.getFlightNo() != null){
  62 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  63 + if (awbA!=null && awbA.length()>0){
  64 + //更新主单回执
  65 + int i = inportallocateMapper.updateRECEIPTION(inportallocate);
  66 + //获取分单autoid
  67 + List<INPORTALLOCATE> arrivedmasterList = inportallocateMapper.selectAutoIdByAwb(inportallocate);
  68 + if(!arrivedmasterList.isEmpty()){
  69 + INPORTALLOCATE departuresloading1 = arrivedmasterList.get(0);
  70 + String autoId = departuresloading1.getId();
  71 +
  72 + //插入sendlog记录表
  73 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  74 + int ii =coustomAnalysisServiceImp.insertSendlog("MT6202",reception,autoId);
  75 +
  76 + int iii = shareServiceImp.updateMessages(customReception);
  77 + if (i>0 && ii>0 && iii > 0){
  78 + return 1;
  79 + }
  80 + }
  81 + return 0;
  82 + }
  83 + }else {
  84 +
  85 + return shareServiceImp.share("MT6202", customReception);
  86 + }
  87 +
  88 + }
  89 +
  90 + //未进入主分单解析 返回0 失败
  91 + return 0;
  92 + }
  93 +}
  1 +package com.tianbo.analysis.service.imp;
  2 +
  3 +import com.tianbo.analysis.dao.INTERNATIONALTRANSITMapper;
  4 +import com.tianbo.analysis.model.CustomReception;
  5 +import com.tianbo.analysis.model.INTERNATIONALTRANSIT;
  6 +import com.tianbo.analysis.service.INTERNATIONALTRANSITService;
  7 +import com.tianbo.util.Date.DateUtil;
  8 +import lombok.extern.slf4j.Slf4j;
  9 +import org.apache.commons.lang.StringUtils;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.stereotype.Service;
  12 +
  13 +import java.util.Date;
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * @Auther: shenhl
  18 + * @Date: 2019/8/28 11:53
  19 + */
  20 +@Service
  21 +@Slf4j
  22 +public class INTERNATIONALTRANSITServiceImp implements INTERNATIONALTRANSITService{
  23 +
  24 + @Autowired
  25 + INTERNATIONALTRANSITMapper internationaltransitMapper;
  26 +
  27 + @Override
  28 + public int insertRecept(CustomReception customReception) {
  29 + ShareServiceImp shareServiceImp = new ShareServiceImp();
  30 +
  31 + // 发送日志 插入
  32 + CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
  33 +
  34 + // 主单号
  35 + String awbA = customReception.getWayBillMaster();
  36 + //回执内容
  37 + String reception = customReception.getResponseText();
  38 + String flightDateStr = customReception.getFlightDate();
  39 + if (!StringUtils.isEmpty(flightDateStr)) {
  40 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  41 + //设置主单回执、航班号、航班日期
  42 + INTERNATIONALTRANSIT inportallocate = new INTERNATIONALTRANSIT();
  43 + inportallocate.setReceiption(reception);
  44 + inportallocate.setOriginalFlightno(customReception.getFlightNo().substring(2));
  45 + inportallocate.setOriginalFlightdate(flightDate);
  46 +
  47 + if (awbA!=null && awbA.length()>0){
  48 + StringBuffer stringBuffer = new StringBuffer(awbA);
  49 + stringBuffer.insert(3,"-");
  50 + awbA = stringBuffer.toString();
  51 +
  52 + //设置主分单的 主单号
  53 + inportallocate.setOriginalBillno(awbA);
  54 + }
  55 +
  56 +
  57 + // 判断航班号 航班日期 是否为空
  58 + if (flightDate != null && customReception.getFlightNo() != null){
  59 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  60 + if (awbA!=null && awbA.length()>0){
  61 + //更新主单回执
  62 + int i = internationaltransitMapper.updateRECEIPTION(inportallocate);
  63 + //获取分单autoid
  64 + List<INTERNATIONALTRANSIT> arrivedmasterList = internationaltransitMapper.selectAutoIdByAwb(inportallocate);
  65 + if(!arrivedmasterList.isEmpty()){
  66 + INTERNATIONALTRANSIT departuresloading1 = arrivedmasterList.get(0);
  67 + String autoId = departuresloading1.getAutoid();
  68 +
  69 + //插入sendlog记录表
  70 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  71 + int ii =coustomAnalysisServiceImp.insertSendlog("MT8205",reception,autoId);
  72 +
  73 + int iii = shareServiceImp.updateMessages(customReception);
  74 + if (i>0 && ii>0 && iii > 0){
  75 + return 1;
  76 + }
  77 + }
  78 + return 0;
  79 + }
  80 + }else {
  81 +
  82 + return shareServiceImp.share("MT8205", customReception);
  83 + }
  84 +
  85 + }
  86 +
  87 + //未进入主分单解析 返回0 失败
  88 + return 0;
  89 + }
  90 +}
@@ -8,6 +8,7 @@ import com.tianbo.analysis.model.PREPARESECONDARY; @@ -8,6 +8,7 @@ import com.tianbo.analysis.model.PREPARESECONDARY;
8 import com.tianbo.analysis.service.PREPAREMASTERService; 8 import com.tianbo.analysis.service.PREPAREMASTERService;
9 import com.tianbo.util.Date.DateUtil; 9 import com.tianbo.util.Date.DateUtil;
10 import lombok.extern.slf4j.Slf4j; 10 import lombok.extern.slf4j.Slf4j;
  11 +import org.apache.commons.lang.StringUtils;
11 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
13 14
@@ -43,84 +44,84 @@ public class PREPAREMASTERServiceImp implements PREPAREMASTERService { @@ -43,84 +44,84 @@ public class PREPAREMASTERServiceImp implements PREPAREMASTERService {
43 //回执内容 44 //回执内容
44 String reception = customReception.getResponseText(); 45 String reception = customReception.getResponseText();
45 String flightDateStr = customReception.getFlightDate(); 46 String flightDateStr = customReception.getFlightDate();
46 - Date flightDate = new Date();  
47 - if (flightDateStr != null){  
48 - flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
49 - } 47 + if (!StringUtils.isEmpty(flightDateStr)) {
  48 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
50 49
51 - // 设置 接收运抵分单 回执  
52 - PREPARESECONDARY preparesecondary = new PREPARESECONDARY();  
53 - preparesecondary.setReceiptinformation(reception); 50 + // 设置 接收运抵分单 回执
  51 + PREPARESECONDARY preparesecondary = new PREPARESECONDARY();
  52 + preparesecondary.setReceiptinformation(reception);
54 53
55 - //设置主单回执、航班号、航班日期  
56 - PREPAREMASTER preparemaster = new PREPAREMASTER();  
57 - preparemaster.setReceiptinformation(reception);  
58 - preparemaster.setFlightno(customReception.getFlightNo());  
59 - preparemaster.setFlightdate(flightDate); 54 + //设置主单回执、航班号、航班日期
  55 + PREPAREMASTER preparemaster = new PREPAREMASTER();
  56 + preparemaster.setReceiptinformation(reception);
  57 + preparemaster.setFlightno(customReception.getFlightNo());
  58 + preparemaster.setFlightdate(flightDate);
60 59
61 - if (awbA!=null && awbA.length()>0){  
62 - StringBuffer stringBuffer = new StringBuffer(awbA);  
63 - stringBuffer.insert(3,"-");  
64 - awbA = stringBuffer.toString(); 60 + if (awbA!=null && awbA.length()>0){
  61 + StringBuffer stringBuffer = new StringBuffer(awbA);
  62 + stringBuffer.insert(3,"-");
  63 + awbA = stringBuffer.toString();
65 64
66 - //设置主分单的 主单号  
67 - preparesecondary.setWaybillnomaster(awbA);  
68 - preparemaster.setWaybillnomaster(awbA);  
69 - } 65 + //设置主分单的 主单号
  66 + preparesecondary.setWaybillnomaster(awbA);
  67 + preparemaster.setWaybillnomaster(awbA);
  68 + }
70 69
71 70
72 - // 判断航班号 航班日期 是否为空  
73 - if (flightDate != null && customReception.getFlightNo() != null){  
74 - //有分单号 更新分单  
75 - if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){  
76 - //取分单号  
77 - String[] awbhArr = awbH.split("_");  
78 - String awbh = awbhArr[1];  
79 - preparesecondary.setWaybillnosecondary(awbh);  
80 - //更新分单回执  
81 - int i = preparesecondaryMapper.updateRECEIPTION(preparesecondary);  
82 - //获取分单autoid  
83 - List<PREPARESECONDARY> arrivedsecondaryList = preparesecondaryMapper.selectAutoIdByawbAawbH(preparesecondary);  
84 - if(!arrivedsecondaryList.isEmpty()){  
85 - PREPARESECONDARY preparesecondary1 = arrivedsecondaryList.get(0);  
86 - String autoId = preparesecondary1.getAutoid();  
87 - //插入sendlog记录表  
88 - log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);  
89 - int ii = coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);  
90 -  
91 - int iii = shareServiceImp.updateMessages(customReception);  
92 - if (i>0 && ii>0 && iii > 0){  
93 - return 1; 71 + // 判断航班号 航班日期 是否为空
  72 + if (flightDate != null && customReception.getFlightNo() != null){
  73 + //有分单号 更新分单
  74 + if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){
  75 + //取分单号
  76 + String[] awbhArr = awbH.split("_");
  77 + String awbh = awbhArr[1];
  78 + preparesecondary.setWaybillnosecondary(awbh);
  79 + //更新分单回执
  80 + int i = preparesecondaryMapper.updateRECEIPTION(preparesecondary);
  81 + //获取分单autoid
  82 + List<PREPARESECONDARY> arrivedsecondaryList = preparesecondaryMapper.selectAutoIdByawbAawbH(preparesecondary);
  83 + if(!arrivedsecondaryList.isEmpty()){
  84 + PREPARESECONDARY preparesecondary1 = arrivedsecondaryList.get(0);
  85 + String autoId = preparesecondary1.getAutoid();
  86 + //插入sendlog记录表
  87 + log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);
  88 + int ii = coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);
  89 +
  90 + int iii = shareServiceImp.updateMessages(customReception);
  91 + if (i>0 && ii>0 && iii > 0){
  92 + return 1;
  93 + }
94 } 94 }
  95 + return 0;
95 } 96 }
96 - return 0;  
97 - }  
98 97
99 - //处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
100 - if (awbA!=null && awbA.length()>0){  
101 - //更新主单回执  
102 - int i = preparemasterMapper.updateRECEIPTION(preparemaster);  
103 - //获取分单autoid  
104 - List<PREPAREMASTER> arrivedmasterList = preparemasterMapper.selectAutoIdByAwb(preparemaster);  
105 - if(!arrivedmasterList.isEmpty()){  
106 - PREPAREMASTER originMaster = arrivedmasterList.get(0);  
107 - String autoId = originMaster.getAutoid();  
108 -  
109 - //插入sendlog记录表  
110 - log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);  
111 - int ii =coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);  
112 -  
113 - int iii = shareServiceImp.updateMessages(customReception);  
114 - if (i>0 && ii>0 && iii > 0){  
115 - return 1; 98 + //处理主单格式,将海关回执的主单号58019316861,变为580-19316861
  99 + if (awbA!=null && awbA.length()>0){
  100 + //更新主单回执
  101 + int i = preparemasterMapper.updateRECEIPTION(preparemaster);
  102 + //获取分单autoid
  103 + List<PREPAREMASTER> arrivedmasterList = preparemasterMapper.selectAutoIdByAwb(preparemaster);
  104 + if(!arrivedmasterList.isEmpty()){
  105 + PREPAREMASTER originMaster = arrivedmasterList.get(0);
  106 + String autoId = originMaster.getAutoid();
  107 +
  108 + //插入sendlog记录表
  109 + log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
  110 + int ii =coustomAnalysisServiceImp.insertSendlog("MT3201",reception,autoId);
  111 +
  112 + int iii = shareServiceImp.updateMessages(customReception);
  113 + if (i>0 && ii>0 && iii > 0){
  114 + return 1;
  115 + }
116 } 116 }
  117 + return 0;
117 } 118 }
118 - return 0;  
119 - }  
120 - }else { 119 + }else {
121 120
122 121
123 - return shareServiceImp.share("MT2201", customReception); 122 + return shareServiceImp.share("MT2201", customReception);
  123 + }
  124 +
124 } 125 }
125 126
126 //未进入主分单解析 返回0 失败 127 //未进入主分单解析 返回0 失败
@@ -8,6 +8,7 @@ import com.tianbo.analysis.model.TALLYSECONDARY; @@ -8,6 +8,7 @@ import com.tianbo.analysis.model.TALLYSECONDARY;
8 import com.tianbo.analysis.service.TALLYMASTERService; 8 import com.tianbo.analysis.service.TALLYMASTERService;
9 import com.tianbo.util.Date.DateUtil; 9 import com.tianbo.util.Date.DateUtil;
10 import lombok.extern.slf4j.Slf4j; 10 import lombok.extern.slf4j.Slf4j;
  11 +import org.apache.commons.lang.StringUtils;
11 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
13 14
@@ -45,81 +46,80 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{ @@ -45,81 +46,80 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{
45 //回执内容 46 //回执内容
46 String reception = customReception.getResponseText(); 47 String reception = customReception.getResponseText();
47 String flightDateStr = customReception.getFlightDate(); 48 String flightDateStr = customReception.getFlightDate();
48 - Date flightDate = new Date();  
49 - if (flightDateStr != null){  
50 - flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
51 - }  
52 49
53 - // 设置 进出港理货 回执  
54 - TALLYSECONDARY tallysecondary = new TALLYSECONDARY();  
55 - tallysecondary.setReceiptinformation(reception);  
56 -  
57 - //设置进出港理货回执、航班号、航班日期  
58 - TALLYMASTER tallymaster = new TALLYMASTER();  
59 - tallymaster.setReceiptinformation(reception);  
60 - tallymaster.setFlightno(customReception.getFlightNo());  
61 - tallymaster.setFlightdate(flightDate);  
62 - // 判断航班号 航班日期 是否为空  
63 - if (flightDate != null && customReception.getFlightNo() != null){  
64 - if (awbA!=null && awbA.length()>0){  
65 - StringBuffer stringBuffer = new StringBuffer(awbA);  
66 - stringBuffer.insert(3,"-");  
67 - awbA = stringBuffer.toString();  
68 -  
69 - //设置主分单的 主单号  
70 - tallysecondary.setWaybillnomaster(awbA);  
71 - tallymaster.setWaybillnomaster(awbA);  
72 - } 50 + if (!StringUtils.isEmpty(flightDateStr)) {
  51 + Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
  52 + // 设置 进出港理货 回执
  53 + TALLYSECONDARY tallysecondary = new TALLYSECONDARY();
  54 + tallysecondary.setReceiptinformation(reception);
  55 +
  56 + //设置进出港理货回执、航班号、航班日期
  57 + TALLYMASTER tallymaster = new TALLYMASTER();
  58 + tallymaster.setReceiptinformation(reception);
  59 + tallymaster.setFlightno(customReception.getFlightNo());
  60 + 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();
  67 +
  68 + //设置主分单的 主单号
  69 + tallysecondary.setWaybillnomaster(awbA);
  70 + tallymaster.setWaybillnomaster(awbA);
  71 + }
73 72
74 - //有分单号 更新分单  
75 - if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){  
76 - //取分单号  
77 - String[] awbhArr = awbH.split("_");  
78 - String awbh = awbhArr[1];  
79 - tallysecondary.setWaybillnosecondary(awbh);  
80 - //更新分单回执  
81 - int i = tallysecondaryMapper.updateRECEIPTION(tallysecondary);  
82 - //获取分单autoid  
83 - List<TALLYSECONDARY> tallysecondaryList = tallysecondaryMapper.selectAutoIdByawbAawbH(tallysecondary);  
84 - if(!tallysecondaryList.isEmpty()){  
85 - TALLYSECONDARY arrivedSecond = tallysecondaryList.get(0);  
86 - String autoId = arrivedSecond.getAutoid();  
87 - //插入sendlog记录表  
88 - log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);  
89 - int ii = coustomAnalysisServiceImp.insertSendlog(mt,reception,autoId);  
90 -  
91 - int iii = shareServiceImp.updateMessages(customReception);  
92 - if (i>0 && ii>0 && iii > 0){  
93 - return 1; 73 + //有分单号 更新分单
  74 + if(awbA!=null && awbA.length()>0 && awbH!=null && awbH.length()> 0){
  75 + //取分单号
  76 + String[] awbhArr = awbH.split("_");
  77 + String awbh = awbhArr[1];
  78 + tallysecondary.setWaybillnosecondary(awbh);
  79 + //更新分单回执
  80 + int i = tallysecondaryMapper.updateRECEIPTION(tallysecondary);
  81 + //获取分单autoid
  82 + List<TALLYSECONDARY> tallysecondaryList = tallysecondaryMapper.selectAutoIdByawbAawbH(tallysecondary);
  83 + if(!tallysecondaryList.isEmpty()){
  84 + TALLYSECONDARY arrivedSecond = tallysecondaryList.get(0);
  85 + String autoId = arrivedSecond.getAutoid();
  86 + //插入sendlog记录表
  87 + log.info("即将插入日志运单号为:"+awbH+"->autoid="+autoId);
  88 + int ii = coustomAnalysisServiceImp.insertSendlog(mt,reception,autoId);
  89 +
  90 + int iii = shareServiceImp.updateMessages(customReception);
  91 + if (i>0 && ii>0 && iii > 0){
  92 + return 1;
  93 + }
94 } 94 }
  95 + return 0;
95 } 96 }
96 - return 0;  
97 - }  
98 97
99 - //处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
100 - if (awbA!=null && awbA.length()>0){  
101 - //更新主单回执  
102 - int i = tallymasterMapper.updateRECEIPTION(tallymaster);  
103 - //获取分单autoid  
104 - List<TALLYMASTER> arrivedmasterList = tallymasterMapper.selectAutoIdByAwb(tallymaster);  
105 - if(!arrivedmasterList.isEmpty()){  
106 - TALLYMASTER originMaster = arrivedmasterList.get(0);  
107 - String autoId = originMaster.getAutoid();  
108 -  
109 - //插入sendlog记录表  
110 - log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);  
111 - int ii =coustomAnalysisServiceImp.insertSendlog(mt,reception,autoId);  
112 -  
113 - int iii = shareServiceImp.updateMessages(customReception);  
114 - if (i>0 && ii>0 && iii > 0){  
115 - return 1; 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){
  114 + return 1;
  115 + }
116 } 116 }
  117 + return 0;
117 } 118 }
118 - return 0;  
119 - }  
120 - }else { 119 + }else {
121 120
122 - return shareServiceImp.share("MT5202", customReception); 121 + return shareServiceImp.share("MT5202", customReception);
  122 + }
123 } 123 }
124 124
125 //未进入主分单解析 返回0 失败 125 //未进入主分单解析 返回0 失败
  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.tianbo.analysis.dao.ALLOCATEARRIVALMapper" >
  4 + <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
  5 + <result column="ID" property="id" jdbcType="VARCHAR" />
  6 + <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
  7 + <result column="WAYBILLNO" property="waybillno" jdbcType="VARCHAR" />
  8 + <result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
  9 + <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
  10 + <result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
  11 + <result column="CUSTOMOS" property="customos" jdbcType="VARCHAR" />
  12 + <result column="ARRIVALPIECES" property="arrivalpieces" jdbcType="VARCHAR" />
  13 + <result column="ARRIVALWEIGHT" property="arrivalweight" jdbcType="VARCHAR" />
  14 + <result column="UNLOADINGLAND" property="unloadingland" jdbcType="VARCHAR" />
  15 + <result column="PRODUCTCODE" property="productcode" jdbcType="VARCHAR" />
  16 + <result column="STATUS" property="status" jdbcType="VARCHAR" />
  17 + <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
  18 + </resultMap>
  19 + <insert id="insert" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
  20 + insert into ALLOCATEARRIVAL (ID, CREATEDATE, WAYBILLNO,
  21 + CARRIER, FLIGHTNO, FLIGHTDATE,
  22 + CUSTOMOS, ARRIVALPIECES, ARRIVALWEIGHT,
  23 + UNLOADINGLAND, PRODUCTCODE, STATUS,
  24 + RECEIPTINFORMATION)
  25 + values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR},
  26 + #{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
  27 + #{customos,jdbcType=VARCHAR}, #{arrivalpieces,jdbcType=VARCHAR}, #{arrivalweight,jdbcType=VARCHAR},
  28 + #{unloadingland,jdbcType=VARCHAR}, #{productcode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
  29 + #{receiptinformation,jdbcType=VARCHAR})
  30 + </insert>
  31 + <insert id="insertSelective" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
  32 + insert into ALLOCATEARRIVAL
  33 + <trim prefix="(" suffix=")" suffixOverrides="," >
  34 + <if test="id != null" >
  35 + ID,
  36 + </if>
  37 + <if test="createdate != null" >
  38 + CREATEDATE,
  39 + </if>
  40 + <if test="waybillno != null" >
  41 + WAYBILLNO,
  42 + </if>
  43 + <if test="carrier != null" >
  44 + CARRIER,
  45 + </if>
  46 + <if test="flightno != null" >
  47 + FLIGHTNO,
  48 + </if>
  49 + <if test="flightdate != null" >
  50 + FLIGHTDATE,
  51 + </if>
  52 + <if test="customos != null" >
  53 + CUSTOMOS,
  54 + </if>
  55 + <if test="arrivalpieces != null" >
  56 + ARRIVALPIECES,
  57 + </if>
  58 + <if test="arrivalweight != null" >
  59 + ARRIVALWEIGHT,
  60 + </if>
  61 + <if test="unloadingland != null" >
  62 + UNLOADINGLAND,
  63 + </if>
  64 + <if test="productcode != null" >
  65 + PRODUCTCODE,
  66 + </if>
  67 + <if test="status != null" >
  68 + STATUS,
  69 + </if>
  70 + <if test="receiptinformation != null" >
  71 + RECEIPTINFORMATION,
  72 + </if>
  73 + </trim>
  74 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  75 + <if test="id != null" >
  76 + #{id,jdbcType=VARCHAR},
  77 + </if>
  78 + <if test="createdate != null" >
  79 + #{createdate,jdbcType=TIMESTAMP},
  80 + </if>
  81 + <if test="waybillno != null" >
  82 + #{waybillno,jdbcType=VARCHAR},
  83 + </if>
  84 + <if test="carrier != null" >
  85 + #{carrier,jdbcType=VARCHAR},
  86 + </if>
  87 + <if test="flightno != null" >
  88 + #{flightno,jdbcType=VARCHAR},
  89 + </if>
  90 + <if test="flightdate != null" >
  91 + #{flightdate,jdbcType=TIMESTAMP},
  92 + </if>
  93 + <if test="customos != null" >
  94 + #{customos,jdbcType=VARCHAR},
  95 + </if>
  96 + <if test="arrivalpieces != null" >
  97 + #{arrivalpieces,jdbcType=VARCHAR},
  98 + </if>
  99 + <if test="arrivalweight != null" >
  100 + #{arrivalweight,jdbcType=VARCHAR},
  101 + </if>
  102 + <if test="unloadingland != null" >
  103 + #{unloadingland,jdbcType=VARCHAR},
  104 + </if>
  105 + <if test="productcode != null" >
  106 + #{productcode,jdbcType=VARCHAR},
  107 + </if>
  108 + <if test="status != null" >
  109 + #{status,jdbcType=VARCHAR},
  110 + </if>
  111 + <if test="receiptinformation != null" >
  112 + #{receiptinformation,jdbcType=VARCHAR},
  113 + </if>
  114 + </trim>
  115 + </insert>
  116 +
  117 +
  118 + <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
  119 + UPDATE ALLOCATEARRIVAL
  120 + SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
  121 + WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
  122 + AND
  123 + FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
  124 + AND
  125 + WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  126 + </update>
  127 +
  128 + <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" resultType="com.tianbo.analysis.model.ALLOCATEARRIVAL">
  129 + SELECT ID
  130 + FROM ALLOCATEARRIVAL
  131 + WHERE
  132 + FLIGHTNO= #{flightno,jdbcType=VARCHAR}
  133 + AND
  134 + FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
  135 + AND
  136 + WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  137 + </select>
  138 +</mapper>
@@ -348,7 +348,7 @@ @@ -348,7 +348,7 @@
348 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ARRIVEDMASTER" > 348 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ARRIVEDMASTER" >
349 UPDATE ARRIVEDMASTER 349 UPDATE ARRIVEDMASTER
350 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 350 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
351 - WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 351 + WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
352 AND 352 AND
353 FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP} 353 FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
354 AND 354 AND
@@ -148,7 +148,7 @@ @@ -148,7 +148,7 @@
148 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" > 148 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" >
149 UPDATE DEPARTURESLOADING 149 UPDATE DEPARTURESLOADING
150 SET RECEIPTINO= #{receiptino,jdbcType=VARCHAR} 150 SET RECEIPTINO= #{receiptino,jdbcType=VARCHAR}
151 - WHERE WAYBILLNO = #{waybillno,jdbcType=VARCHAR} 151 + WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
152 AND 152 AND
153 FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP} 153 FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
154 AND 154 AND
  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.tianbo.analysis.dao.INPORTALLOCATEMapper" >
  4 + <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.INPORTALLOCATE" >
  5 + <result column="ID" property="id" jdbcType="VARCHAR" />
  6 + <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
  7 + <result column="WAYBILLNO" property="waybillno" jdbcType="VARCHAR" />
  8 + <result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
  9 + <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
  10 + <result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
  11 + <result column="CUSTOMOS" property="customos" jdbcType="VARCHAR" />
  12 + <result column="TALLYPIECES" property="tallypieces" jdbcType="VARCHAR" />
  13 + <result column="TALLYWEIGHT" property="tallyweight" jdbcType="VARCHAR" />
  14 + <result column="ALLOCATEPIECES" property="allocatepieces" jdbcType="VARCHAR" />
  15 + <result column="ALLOCATEWEIGHT" property="allocateweight" jdbcType="VARCHAR" />
  16 + <result column="ALLOCATEDESTINATION" property="allocatedestination" jdbcType="VARCHAR" />
  17 + <result column="TRAILERNUMBER" property="trailernumber" jdbcType="VARCHAR" />
  18 + <result column="STATUS" property="status" jdbcType="VARCHAR" />
  19 + <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
  20 + </resultMap>
  21 + <insert id="insert" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
  22 + insert into INPORTALLOCATE (ID, CREATEDATE, WAYBILLNO,
  23 + CARRIER, FLIGHTNO, FLIGHTDATE,
  24 + CUSTOMOS, TALLYPIECES, TALLYWEIGHT,
  25 + ALLOCATEPIECES, ALLOCATEWEIGHT, ALLOCATEDESTINATION,
  26 + TRAILERNUMBER, STATUS, RECEIPTINFORMATION
  27 + )
  28 + values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR},
  29 + #{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
  30 + #{customos,jdbcType=VARCHAR}, #{tallypieces,jdbcType=VARCHAR}, #{tallyweight,jdbcType=VARCHAR},
  31 + #{allocatepieces,jdbcType=VARCHAR}, #{allocateweight,jdbcType=VARCHAR}, #{allocatedestination,jdbcType=VARCHAR},
  32 + #{trailernumber,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{receiptinformation,jdbcType=VARCHAR}
  33 + )
  34 + </insert>
  35 + <insert id="insertSelective" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
  36 + insert into INPORTALLOCATE
  37 + <trim prefix="(" suffix=")" suffixOverrides="," >
  38 + <if test="id != null" >
  39 + ID,
  40 + </if>
  41 + <if test="createdate != null" >
  42 + CREATEDATE,
  43 + </if>
  44 + <if test="waybillno != null" >
  45 + WAYBILLNO,
  46 + </if>
  47 + <if test="carrier != null" >
  48 + CARRIER,
  49 + </if>
  50 + <if test="flightno != null" >
  51 + FLIGHTNO,
  52 + </if>
  53 + <if test="flightdate != null" >
  54 + FLIGHTDATE,
  55 + </if>
  56 + <if test="customos != null" >
  57 + CUSTOMOS,
  58 + </if>
  59 + <if test="tallypieces != null" >
  60 + TALLYPIECES,
  61 + </if>
  62 + <if test="tallyweight != null" >
  63 + TALLYWEIGHT,
  64 + </if>
  65 + <if test="allocatepieces != null" >
  66 + ALLOCATEPIECES,
  67 + </if>
  68 + <if test="allocateweight != null" >
  69 + ALLOCATEWEIGHT,
  70 + </if>
  71 + <if test="allocatedestination != null" >
  72 + ALLOCATEDESTINATION,
  73 + </if>
  74 + <if test="trailernumber != null" >
  75 + TRAILERNUMBER,
  76 + </if>
  77 + <if test="status != null" >
  78 + STATUS,
  79 + </if>
  80 + <if test="receiptinformation != null" >
  81 + RECEIPTINFORMATION,
  82 + </if>
  83 + </trim>
  84 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  85 + <if test="id != null" >
  86 + #{id,jdbcType=VARCHAR},
  87 + </if>
  88 + <if test="createdate != null" >
  89 + #{createdate,jdbcType=TIMESTAMP},
  90 + </if>
  91 + <if test="waybillno != null" >
  92 + #{waybillno,jdbcType=VARCHAR},
  93 + </if>
  94 + <if test="carrier != null" >
  95 + #{carrier,jdbcType=VARCHAR},
  96 + </if>
  97 + <if test="flightno != null" >
  98 + #{flightno,jdbcType=VARCHAR},
  99 + </if>
  100 + <if test="flightdate != null" >
  101 + #{flightdate,jdbcType=TIMESTAMP},
  102 + </if>
  103 + <if test="customos != null" >
  104 + #{customos,jdbcType=VARCHAR},
  105 + </if>
  106 + <if test="tallypieces != null" >
  107 + #{tallypieces,jdbcType=VARCHAR},
  108 + </if>
  109 + <if test="tallyweight != null" >
  110 + #{tallyweight,jdbcType=VARCHAR},
  111 + </if>
  112 + <if test="allocatepieces != null" >
  113 + #{allocatepieces,jdbcType=VARCHAR},
  114 + </if>
  115 + <if test="allocateweight != null" >
  116 + #{allocateweight,jdbcType=VARCHAR},
  117 + </if>
  118 + <if test="allocatedestination != null" >
  119 + #{allocatedestination,jdbcType=VARCHAR},
  120 + </if>
  121 + <if test="trailernumber != null" >
  122 + #{trailernumber,jdbcType=VARCHAR},
  123 + </if>
  124 + <if test="status != null" >
  125 + #{status,jdbcType=VARCHAR},
  126 + </if>
  127 + <if test="receiptinformation != null" >
  128 + #{receiptinformation,jdbcType=VARCHAR},
  129 + </if>
  130 + </trim>
  131 + </insert>
  132 +
  133 +
  134 + <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
  135 + UPDATE ALLOCATEARRIVAL
  136 + SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
  137 + WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
  138 + AND
  139 + FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
  140 + AND
  141 + WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  142 + </update>
  143 +
  144 + <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" resultType="com.tianbo.analysis.model.INPORTALLOCATE">
  145 + SELECT ID
  146 + FROM ALLOCATEARRIVAL
  147 + WHERE
  148 + FLIGHTNO= #{flightno,jdbcType=VARCHAR}
  149 + AND
  150 + FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
  151 + AND
  152 + WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  153 + </select>
  154 +</mapper>
  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.tianbo.analysis.dao.INTERNATIONALTRANSITMapper" >
  4 + <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
  5 + <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
  6 + <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
  7 + <result column="ORIGINAL_CARRIER" property="originalCarrier" jdbcType="VARCHAR" />
  8 + <result column="ORIGINAL_FLIGHTNO" property="originalFlightno" jdbcType="VARCHAR" />
  9 + <result column="ORIGINAL_FLIGHTDATE" property="originalFlightdate" jdbcType="TIMESTAMP" />
  10 + <result column="ORIGINAL_BILLNO" property="originalBillno" jdbcType="VARCHAR" />
  11 + <result column="ORIGINAL_SUB_NUMBER" property="originalSubNumber" jdbcType="VARCHAR" />
  12 + <result column="PRE_CARRIER" property="preCarrier" jdbcType="VARCHAR" />
  13 + <result column="PRE_FLIGHTNO" property="preFlightno" jdbcType="VARCHAR" />
  14 + <result column="PRE_FLIGHTDATE" property="preFlightdate" jdbcType="TIMESTAMP" />
  15 + <result column="PRE_BILLNO" property="preBillno" jdbcType="VARCHAR" />
  16 + <result column="PRE_SUB_NUMBER" property="preSubNumber" jdbcType="VARCHAR" />
  17 + <result column="BILLPIECE" property="billpiece" jdbcType="VARCHAR" />
  18 + <result column="BILLWEIGHT" property="billweight" jdbcType="VARCHAR" />
  19 + <result column="PRODUCT" property="product" jdbcType="VARCHAR" />
  20 + <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
  21 + <result column="PACKAGINGTYPE" property="packagingtype" jdbcType="VARCHAR" />
  22 + <result column="STATUS" property="status" jdbcType="VARCHAR" />
  23 + <result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
  24 + <result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR" />
  25 + </resultMap>
  26 + <insert id="insert" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
  27 + insert into INTERNATIONALTRANSIT (AUTOID, CREATEDATE, ORIGINAL_CARRIER,
  28 + ORIGINAL_FLIGHTNO, ORIGINAL_FLIGHTDATE,
  29 + ORIGINAL_BILLNO, ORIGINAL_SUB_NUMBER, PRE_CARRIER,
  30 + PRE_FLIGHTNO, PRE_FLIGHTDATE, PRE_BILLNO,
  31 + PRE_SUB_NUMBER, BILLPIECE, BILLWEIGHT,
  32 + PRODUCT, ORIGINATINGSTATION, PACKAGINGTYPE,
  33 + STATUS, RECEIPTION, DESTINATIONSTATION_BILL
  34 + )
  35 + values (#{autoid,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{originalCarrier,jdbcType=VARCHAR},
  36 + #{originalFlightno,jdbcType=VARCHAR}, #{originalFlightdate,jdbcType=TIMESTAMP},
  37 + #{originalBillno,jdbcType=VARCHAR}, #{originalSubNumber,jdbcType=VARCHAR}, #{preCarrier,jdbcType=VARCHAR},
  38 + #{preFlightno,jdbcType=VARCHAR}, #{preFlightdate,jdbcType=TIMESTAMP}, #{preBillno,jdbcType=VARCHAR},
  39 + #{preSubNumber,jdbcType=VARCHAR}, #{billpiece,jdbcType=VARCHAR}, #{billweight,jdbcType=VARCHAR},
  40 + #{product,jdbcType=VARCHAR}, #{originatingstation,jdbcType=VARCHAR}, #{packagingtype,jdbcType=VARCHAR},
  41 + #{status,jdbcType=VARCHAR}, #{receiption,jdbcType=VARCHAR}, #{destinationstationBill,jdbcType=VARCHAR}
  42 + )
  43 + </insert>
  44 + <insert id="insertSelective" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
  45 + insert into INTERNATIONALTRANSIT
  46 + <trim prefix="(" suffix=")" suffixOverrides="," >
  47 + <if test="autoid != null" >
  48 + AUTOID,
  49 + </if>
  50 + <if test="createdate != null" >
  51 + CREATEDATE,
  52 + </if>
  53 + <if test="originalCarrier != null" >
  54 + ORIGINAL_CARRIER,
  55 + </if>
  56 + <if test="originalFlightno != null" >
  57 + ORIGINAL_FLIGHTNO,
  58 + </if>
  59 + <if test="originalFlightdate != null" >
  60 + ORIGINAL_FLIGHTDATE,
  61 + </if>
  62 + <if test="originalBillno != null" >
  63 + ORIGINAL_BILLNO,
  64 + </if>
  65 + <if test="originalSubNumber != null" >
  66 + ORIGINAL_SUB_NUMBER,
  67 + </if>
  68 + <if test="preCarrier != null" >
  69 + PRE_CARRIER,
  70 + </if>
  71 + <if test="preFlightno != null" >
  72 + PRE_FLIGHTNO,
  73 + </if>
  74 + <if test="preFlightdate != null" >
  75 + PRE_FLIGHTDATE,
  76 + </if>
  77 + <if test="preBillno != null" >
  78 + PRE_BILLNO,
  79 + </if>
  80 + <if test="preSubNumber != null" >
  81 + PRE_SUB_NUMBER,
  82 + </if>
  83 + <if test="billpiece != null" >
  84 + BILLPIECE,
  85 + </if>
  86 + <if test="billweight != null" >
  87 + BILLWEIGHT,
  88 + </if>
  89 + <if test="product != null" >
  90 + PRODUCT,
  91 + </if>
  92 + <if test="originatingstation != null" >
  93 + ORIGINATINGSTATION,
  94 + </if>
  95 + <if test="packagingtype != null" >
  96 + PACKAGINGTYPE,
  97 + </if>
  98 + <if test="status != null" >
  99 + STATUS,
  100 + </if>
  101 + <if test="receiption != null" >
  102 + RECEIPTION,
  103 + </if>
  104 + <if test="destinationstationBill != null" >
  105 + DESTINATIONSTATION_BILL,
  106 + </if>
  107 + </trim>
  108 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  109 + <if test="autoid != null" >
  110 + #{autoid,jdbcType=VARCHAR},
  111 + </if>
  112 + <if test="createdate != null" >
  113 + #{createdate,jdbcType=TIMESTAMP},
  114 + </if>
  115 + <if test="originalCarrier != null" >
  116 + #{originalCarrier,jdbcType=VARCHAR},
  117 + </if>
  118 + <if test="originalFlightno != null" >
  119 + #{originalFlightno,jdbcType=VARCHAR},
  120 + </if>
  121 + <if test="originalFlightdate != null" >
  122 + #{originalFlightdate,jdbcType=TIMESTAMP},
  123 + </if>
  124 + <if test="originalBillno != null" >
  125 + #{originalBillno,jdbcType=VARCHAR},
  126 + </if>
  127 + <if test="originalSubNumber != null" >
  128 + #{originalSubNumber,jdbcType=VARCHAR},
  129 + </if>
  130 + <if test="preCarrier != null" >
  131 + #{preCarrier,jdbcType=VARCHAR},
  132 + </if>
  133 + <if test="preFlightno != null" >
  134 + #{preFlightno,jdbcType=VARCHAR},
  135 + </if>
  136 + <if test="preFlightdate != null" >
  137 + #{preFlightdate,jdbcType=TIMESTAMP},
  138 + </if>
  139 + <if test="preBillno != null" >
  140 + #{preBillno,jdbcType=VARCHAR},
  141 + </if>
  142 + <if test="preSubNumber != null" >
  143 + #{preSubNumber,jdbcType=VARCHAR},
  144 + </if>
  145 + <if test="billpiece != null" >
  146 + #{billpiece,jdbcType=VARCHAR},
  147 + </if>
  148 + <if test="billweight != null" >
  149 + #{billweight,jdbcType=VARCHAR},
  150 + </if>
  151 + <if test="product != null" >
  152 + #{product,jdbcType=VARCHAR},
  153 + </if>
  154 + <if test="originatingstation != null" >
  155 + #{originatingstation,jdbcType=VARCHAR},
  156 + </if>
  157 + <if test="packagingtype != null" >
  158 + #{packagingtype,jdbcType=VARCHAR},
  159 + </if>
  160 + <if test="status != null" >
  161 + #{status,jdbcType=VARCHAR},
  162 + </if>
  163 + <if test="receiption != null" >
  164 + #{receiption,jdbcType=VARCHAR},
  165 + </if>
  166 + <if test="destinationstationBill != null" >
  167 + #{destinationstationBill,jdbcType=VARCHAR},
  168 + </if>
  169 + </trim>
  170 + </insert>
  171 +
  172 +
  173 + <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
  174 + UPDATE INTERNATIONALTRANSIT
  175 + SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
  176 + WHERE ORIGINAL_FLIGHTNO = #{originalFlightno,jdbcType=VARCHAR}
  177 + AND
  178 + FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
  179 + AND
  180 + WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  181 + </update>
  182 +
  183 + <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" resultType="com.tianbo.analysis.model.INTERNATIONALTRANSIT">
  184 + SELECT ID
  185 + FROM INTERNATIONALTRANSIT
  186 + WHERE
  187 + ORIGINAL_FLIGHTNO= #{originalFlightno,jdbcType=VARCHAR}
  188 + AND
  189 + ORIGINAL_FLIGHTDATE= #{originalFlightdate,jdbcType=TIMESTAMP}
  190 + AND
  191 + ORIGINAL_BILLNO = #{originalBillno,jdbcType=VARCHAR}
  192 + </select>
  193 +
  194 +</mapper>
@@ -356,7 +356,7 @@ @@ -356,7 +356,7 @@
356 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" > 356 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
357 UPDATE ORIGINMANIFESTMASTER 357 UPDATE ORIGINMANIFESTMASTER
358 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 358 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
359 - WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 359 + WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
360 AND 360 AND
361 FLIGHT_DATE= #{flightDate,jdbcType=TIMESTAMP} 361 FLIGHT_DATE= #{flightDate,jdbcType=TIMESTAMP}
362 AND 362 AND
@@ -309,7 +309,7 @@ @@ -309,7 +309,7 @@
309 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.PREPAREMASTER" > 309 <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.PREPAREMASTER" >
310 UPDATE PREPAREMASTER 310 UPDATE PREPAREMASTER
311 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 311 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
312 - WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 312 + WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
313 AND 313 AND
314 FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP} 314 FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
315 AND 315 AND
@@ -251,14 +251,17 @@ @@ -251,14 +251,17 @@
251 UPDATE TALLYMASTER 251 UPDATE TALLYMASTER
252 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR} 252 SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
253 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 253 WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
254 - AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR} 254 + AND FLIGHTNO = #{flghtno, jdbcType=VARCHAR}
  255 + AND FLIGHTDATE = #{flightdate, jdbcType=TIMESTAMP}
255 </update> 256 </update>
256 257
257 - <select id="selectAutoIdByawbAawbH" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER"> 258 + <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER">
258 SELECT AUTOID 259 SELECT AUTOID
259 FROM TALLYMASTER 260 FROM TALLYMASTER
260 WHERE 261 WHERE
261 - WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR} 262 + WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
  263 + AND FLIGHTNO = #{flghtno, jdbcType=VARCHAR}
  264 + AND FLIGHTDATE = #{flightdate, jdbcType=TIMESTAMP}
262 </select> 265 </select>
263 266
264 </mapper> 267 </mapper>