作者 申海龙

8205 6202 3202 解析 部分Mapper update 修改条件 改为 航班号 部分sevice 获取航班号 进行 截取

package com.tianbo.analysis.dao;
import com.tianbo.analysis.model.ALLOCATEARRIVAL;
import java.util.List;
public interface ALLOCATEARRIVALMapper {
int insert(ALLOCATEARRIVAL record);
int insertSelective(ALLOCATEARRIVAL record);
int updateRECEIPTION(ALLOCATEARRIVAL record);
List<ALLOCATEARRIVAL> selectAutoIdByAwb(ALLOCATEARRIVAL record);
}
\ No newline at end of file
... ...
package com.tianbo.analysis.dao;
import com.tianbo.analysis.model.INPORTALLOCATE;
import java.util.List;
public interface INPORTALLOCATEMapper {
int insert(INPORTALLOCATE record);
int insertSelective(INPORTALLOCATE record);
int updateRECEIPTION(INPORTALLOCATE record);
List<INPORTALLOCATE> selectAutoIdByAwb(INPORTALLOCATE record);
}
\ No newline at end of file
... ...
package com.tianbo.analysis.dao;
import com.tianbo.analysis.model.INTERNATIONALTRANSIT;
import java.util.List;
public interface INTERNATIONALTRANSITMapper {
int insert(INTERNATIONALTRANSIT record);
int insertSelective(INTERNATIONALTRANSIT record);
int updateRECEIPTION(INTERNATIONALTRANSIT record);
List<INTERNATIONALTRANSIT> selectAutoIdByAwb(INTERNATIONALTRANSIT record);
}
\ No newline at end of file
... ...
... ... @@ -60,6 +60,12 @@ public class CustomXmlHandle{
@Autowired
private PREPAREMASTERService preparemasterService;
@Autowired
private ALLOCATEARRIVALService allocatearrivalService;
@Autowired
private INPORTALLOCATEService inportallocateService;
//通过@PostConstruct实现初始化bean之前进行的操作,解决service调用空指针问题
@PostConstruct
public void init() {
... ... @@ -73,6 +79,10 @@ public class CustomXmlHandle{
customXmlHandle.departuresloadingService = this.departuresloadingService;
customXmlHandle.preparemasterService = this.preparemasterService;
customXmlHandle.allocatearrivalService = this.allocatearrivalService;
customXmlHandle.inportallocateService = this.inportallocateService;
// 初使化时将已静态化的testService实例化
}
... ... @@ -144,6 +154,15 @@ public class CustomXmlHandle{
case "MT2201":
i = customXmlHandle.preparemasterService.insertRecept(customReception);
break;
case "MT6202":
i = customXmlHandle.inportallocateService.insertRecept(customReception);
break;
case "MT3202":
i = customXmlHandle.allocatearrivalService.insertRecept(customReception);
break;
case "MT8205":
break;
}
... ...
package com.tianbo.analysis.model;
import java.util.Date;
public class ALLOCATEARRIVAL {
private String id;
private Date createdate;
private String waybillno;
private String carrier;
private String flightno;
private Date flightdate;
private String customos;
private String arrivalpieces;
private String arrivalweight;
private String unloadingland;
private String productcode;
private String status;
private String receiptinformation;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getWaybillno() {
return waybillno;
}
public void setWaybillno(String waybillno) {
this.waybillno = waybillno == null ? null : waybillno.trim();
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier == null ? null : carrier.trim();
}
public String getFlightno() {
return flightno;
}
public void setFlightno(String flightno) {
this.flightno = flightno == null ? null : flightno.trim();
}
public Date getFlightdate() {
return flightdate;
}
public void setFlightdate(Date flightdate) {
this.flightdate = flightdate;
}
public String getCustomos() {
return customos;
}
public void setCustomos(String customos) {
this.customos = customos == null ? null : customos.trim();
}
public String getArrivalpieces() {
return arrivalpieces;
}
public void setArrivalpieces(String arrivalpieces) {
this.arrivalpieces = arrivalpieces == null ? null : arrivalpieces.trim();
}
public String getArrivalweight() {
return arrivalweight;
}
public void setArrivalweight(String arrivalweight) {
this.arrivalweight = arrivalweight == null ? null : arrivalweight.trim();
}
public String getUnloadingland() {
return unloadingland;
}
public void setUnloadingland(String unloadingland) {
this.unloadingland = unloadingland == null ? null : unloadingland.trim();
}
public String getProductcode() {
return productcode;
}
public void setProductcode(String productcode) {
this.productcode = productcode == null ? null : productcode.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
public String getReceiptinformation() {
return receiptinformation;
}
public void setReceiptinformation(String receiptinformation) {
this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();
}
}
\ No newline at end of file
... ...
package com.tianbo.analysis.model;
import java.util.Date;
public class INPORTALLOCATE {
private String id;
private Date createdate;
private String waybillno;
private String carrier;
private String flightno;
private Date flightdate;
private String customos;
private String tallypieces;
private String tallyweight;
private String allocatepieces;
private String allocateweight;
private String allocatedestination;
private String trailernumber;
private String status;
private String receiptinformation;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getWaybillno() {
return waybillno;
}
public void setWaybillno(String waybillno) {
this.waybillno = waybillno == null ? null : waybillno.trim();
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier == null ? null : carrier.trim();
}
public String getFlightno() {
return flightno;
}
public void setFlightno(String flightno) {
this.flightno = flightno == null ? null : flightno.trim();
}
public Date getFlightdate() {
return flightdate;
}
public void setFlightdate(Date flightdate) {
this.flightdate = flightdate;
}
public String getCustomos() {
return customos;
}
public void setCustomos(String customos) {
this.customos = customos == null ? null : customos.trim();
}
public String getTallypieces() {
return tallypieces;
}
public void setTallypieces(String tallypieces) {
this.tallypieces = tallypieces == null ? null : tallypieces.trim();
}
public String getTallyweight() {
return tallyweight;
}
public void setTallyweight(String tallyweight) {
this.tallyweight = tallyweight == null ? null : tallyweight.trim();
}
public String getAllocatepieces() {
return allocatepieces;
}
public void setAllocatepieces(String allocatepieces) {
this.allocatepieces = allocatepieces == null ? null : allocatepieces.trim();
}
public String getAllocateweight() {
return allocateweight;
}
public void setAllocateweight(String allocateweight) {
this.allocateweight = allocateweight == null ? null : allocateweight.trim();
}
public String getAllocatedestination() {
return allocatedestination;
}
public void setAllocatedestination(String allocatedestination) {
this.allocatedestination = allocatedestination == null ? null : allocatedestination.trim();
}
public String getTrailernumber() {
return trailernumber;
}
public void setTrailernumber(String trailernumber) {
this.trailernumber = trailernumber == null ? null : trailernumber.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
public String getReceiptinformation() {
return receiptinformation;
}
public void setReceiptinformation(String receiptinformation) {
this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();
}
}
\ No newline at end of file
... ...
package com.tianbo.analysis.model;
import java.util.Date;
public class INTERNATIONALTRANSIT {
private String autoid;
private Date createdate;
private String originalCarrier;
private String originalFlightno;
private Date originalFlightdate;
private String originalBillno;
private String originalSubNumber;
private String preCarrier;
private String preFlightno;
private Date preFlightdate;
private String preBillno;
private String preSubNumber;
private String billpiece;
private String billweight;
private String product;
private String originatingstation;
private String packagingtype;
private String status;
private String receiption;
private String destinationstationBill;
public String getAutoid() {
return autoid;
}
public void setAutoid(String autoid) {
this.autoid = autoid == null ? null : autoid.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getOriginalCarrier() {
return originalCarrier;
}
public void setOriginalCarrier(String originalCarrier) {
this.originalCarrier = originalCarrier == null ? null : originalCarrier.trim();
}
public String getOriginalFlightno() {
return originalFlightno;
}
public void setOriginalFlightno(String originalFlightno) {
this.originalFlightno = originalFlightno == null ? null : originalFlightno.trim();
}
public Date getOriginalFlightdate() {
return originalFlightdate;
}
public void setOriginalFlightdate(Date originalFlightdate) {
this.originalFlightdate = originalFlightdate;
}
public String getOriginalBillno() {
return originalBillno;
}
public void setOriginalBillno(String originalBillno) {
this.originalBillno = originalBillno == null ? null : originalBillno.trim();
}
public String getOriginalSubNumber() {
return originalSubNumber;
}
public void setOriginalSubNumber(String originalSubNumber) {
this.originalSubNumber = originalSubNumber == null ? null : originalSubNumber.trim();
}
public String getPreCarrier() {
return preCarrier;
}
public void setPreCarrier(String preCarrier) {
this.preCarrier = preCarrier == null ? null : preCarrier.trim();
}
public String getPreFlightno() {
return preFlightno;
}
public void setPreFlightno(String preFlightno) {
this.preFlightno = preFlightno == null ? null : preFlightno.trim();
}
public Date getPreFlightdate() {
return preFlightdate;
}
public void setPreFlightdate(Date preFlightdate) {
this.preFlightdate = preFlightdate;
}
public String getPreBillno() {
return preBillno;
}
public void setPreBillno(String preBillno) {
this.preBillno = preBillno == null ? null : preBillno.trim();
}
public String getPreSubNumber() {
return preSubNumber;
}
public void setPreSubNumber(String preSubNumber) {
this.preSubNumber = preSubNumber == null ? null : preSubNumber.trim();
}
public String getBillpiece() {
return billpiece;
}
public void setBillpiece(String billpiece) {
this.billpiece = billpiece == null ? null : billpiece.trim();
}
public String getBillweight() {
return billweight;
}
public void setBillweight(String billweight) {
this.billweight = billweight == null ? null : billweight.trim();
}
public String getProduct() {
return product;
}
public void setProduct(String product) {
this.product = product == null ? null : product.trim();
}
public String getOriginatingstation() {
return originatingstation;
}
public void setOriginatingstation(String originatingstation) {
this.originatingstation = originatingstation == null ? null : originatingstation.trim();
}
public String getPackagingtype() {
return packagingtype;
}
public void setPackagingtype(String packagingtype) {
this.packagingtype = packagingtype == null ? null : packagingtype.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
public String getReceiption() {
return receiption;
}
public void setReceiption(String receiption) {
this.receiption = receiption == null ? null : receiption.trim();
}
public String getDestinationstationBill() {
return destinationstationBill;
}
public void setDestinationstationBill(String destinationstationBill) {
this.destinationstationBill = destinationstationBill == null ? null : destinationstationBill.trim();
}
}
\ No newline at end of file
... ...
package com.tianbo.analysis.service;
import com.tianbo.analysis.model.CustomReception;
/**
* @Auther: shenhl
* @Date: 2019/8/28 11:07
*/
public interface ALLOCATEARRIVALService {
int insertRecept(CustomReception customReception);
}
... ...
package com.tianbo.analysis.service;
import com.tianbo.analysis.model.CustomReception;
/**
* @Auther: shenhl
* @Date: 2019/8/28 11:21
*/
public interface INPORTALLOCATEService {
int insertRecept(CustomReception customReception);
}
... ...
package com.tianbo.analysis.service;
import com.tianbo.analysis.model.CustomReception;
/**
* @Auther: shenhl
* @Date: 2019/8/28 11:52
*/
public interface INTERNATIONALTRANSITService {
int insertRecept(CustomReception customReception);
}
... ...
package com.tianbo.analysis.service.imp;
import com.tianbo.analysis.dao.ALLOCATEARRIVALMapper;
import com.tianbo.analysis.model.ALLOCATEARRIVAL;
import com.tianbo.analysis.model.CustomReception;
import com.tianbo.analysis.service.ALLOCATEARRIVALService;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @Auther: shenhl
* @Date: 2019/8/28 11:08
*/
@Service
@Slf4j
public class ALLOCATEARRIVALServiceImp implements ALLOCATEARRIVALService {
@Autowired
ALLOCATEARRIVALMapper allocatearrivalMapper;
@Override
public int insertRecept(CustomReception customReception) {
ShareServiceImp shareServiceImp = new ShareServiceImp();
// 发送日志 插入
CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
// 主单号
String awbA = customReception.getWayBillMaster();
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
//设置主单回执、航班号、航班日期
ALLOCATEARRIVAL allocatearrival = new ALLOCATEARRIVAL();
allocatearrival.setReceiptinformation(reception);
allocatearrival.setFlightno(customReception.getFlightNo().substring(2));
allocatearrival.setFlightdate(flightDate);
if (awbA!=null && awbA.length()>0){
StringBuffer stringBuffer = new StringBuffer(awbA);
stringBuffer.insert(3,"-");
awbA = stringBuffer.toString();
//设置主分单的 主单号
allocatearrival.setWaybillno(awbA);
}
// 判断航班号 航班日期 是否为空
if (flightDate != null && customReception.getFlightNo() != null){
//处理主单格式,将海关回执的主单号58019316861,变为580-19316861
if (awbA!=null && awbA.length()>0){
//更新主单回执
int i = allocatearrivalMapper.updateRECEIPTION(allocatearrival);
//获取分单autoid
List<ALLOCATEARRIVAL> arrivedmasterList = allocatearrivalMapper.selectAutoIdByAwb(allocatearrival);
if(!arrivedmasterList.isEmpty()){
ALLOCATEARRIVAL departuresloading1 = arrivedmasterList.get(0);
String autoId = departuresloading1.getId();
//插入sendlog记录表
log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
int ii =coustomAnalysisServiceImp.insertSendlog("MT3202",reception,autoId);
int iii = shareServiceImp.updateMessages(customReception);
if (i>0 && ii>0 && iii > 0){
return 1;
}
}
return 0;
}
}else {
return shareServiceImp.share("MT3202", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
}
}
... ...
package com.tianbo.analysis.service.imp;
import com.fasterxml.jackson.databind.annotation.JsonAppend;
import com.tianbo.analysis.dao.INPORTALLOCATEMapper;
import com.tianbo.analysis.model.CustomReception;
import com.tianbo.analysis.model.INPORTALLOCATE;
import com.tianbo.analysis.service.INPORTALLOCATEService;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @Auther: shenhl
* @Date: 2019/8/28 11:21
*/
@Service
@Slf4j
public class INPORTALLOCATEServiceImp implements INPORTALLOCATEService{
@Autowired
INPORTALLOCATEMapper inportallocateMapper;
@Override
public int insertRecept(CustomReception customReception) {
ShareServiceImp shareServiceImp = new ShareServiceImp();
// 发送日志 插入
CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
// 主单号
String awbA = customReception.getWayBillMaster();
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
//设置主单回执、航班号、航班日期
INPORTALLOCATE inportallocate = new INPORTALLOCATE();
inportallocate.setReceiptinformation(reception);
inportallocate.setFlightno(customReception.getFlightNo().substring(2));
inportallocate.setFlightdate(flightDate);
if (awbA!=null && awbA.length()>0){
StringBuffer stringBuffer = new StringBuffer(awbA);
stringBuffer.insert(3,"-");
awbA = stringBuffer.toString();
//设置主分单的 主单号
inportallocate.setWaybillno(awbA);
}
// 判断航班号 航班日期 是否为空
if (flightDate != null && customReception.getFlightNo() != null){
//处理主单格式,将海关回执的主单号58019316861,变为580-19316861
if (awbA!=null && awbA.length()>0){
//更新主单回执
int i = inportallocateMapper.updateRECEIPTION(inportallocate);
//获取分单autoid
List<INPORTALLOCATE> arrivedmasterList = inportallocateMapper.selectAutoIdByAwb(inportallocate);
if(!arrivedmasterList.isEmpty()){
INPORTALLOCATE departuresloading1 = arrivedmasterList.get(0);
String autoId = departuresloading1.getId();
//插入sendlog记录表
log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
int ii =coustomAnalysisServiceImp.insertSendlog("MT6202",reception,autoId);
int iii = shareServiceImp.updateMessages(customReception);
if (i>0 && ii>0 && iii > 0){
return 1;
}
}
return 0;
}
}else {
return shareServiceImp.share("MT6202", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
}
}
... ...
package com.tianbo.analysis.service.imp;
import com.tianbo.analysis.dao.INTERNATIONALTRANSITMapper;
import com.tianbo.analysis.model.CustomReception;
import com.tianbo.analysis.model.INTERNATIONALTRANSIT;
import com.tianbo.analysis.service.INTERNATIONALTRANSITService;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @Auther: shenhl
* @Date: 2019/8/28 11:53
*/
@Service
@Slf4j
public class INTERNATIONALTRANSITServiceImp implements INTERNATIONALTRANSITService{
@Autowired
INTERNATIONALTRANSITMapper internationaltransitMapper;
@Override
public int insertRecept(CustomReception customReception) {
ShareServiceImp shareServiceImp = new ShareServiceImp();
// 发送日志 插入
CoustomAnalysisServiceImp coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();
// 主单号
String awbA = customReception.getWayBillMaster();
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
//设置主单回执、航班号、航班日期
INTERNATIONALTRANSIT inportallocate = new INTERNATIONALTRANSIT();
inportallocate.setReceiption(reception);
inportallocate.setOriginalFlightno(customReception.getFlightNo().substring(2));
inportallocate.setOriginalFlightdate(flightDate);
if (awbA!=null && awbA.length()>0){
StringBuffer stringBuffer = new StringBuffer(awbA);
stringBuffer.insert(3,"-");
awbA = stringBuffer.toString();
//设置主分单的 主单号
inportallocate.setOriginalBillno(awbA);
}
// 判断航班号 航班日期 是否为空
if (flightDate != null && customReception.getFlightNo() != null){
//处理主单格式,将海关回执的主单号58019316861,变为580-19316861
if (awbA!=null && awbA.length()>0){
//更新主单回执
int i = internationaltransitMapper.updateRECEIPTION(inportallocate);
//获取分单autoid
List<INTERNATIONALTRANSIT> arrivedmasterList = internationaltransitMapper.selectAutoIdByAwb(inportallocate);
if(!arrivedmasterList.isEmpty()){
INTERNATIONALTRANSIT departuresloading1 = arrivedmasterList.get(0);
String autoId = departuresloading1.getAutoid();
//插入sendlog记录表
log.info("即将插入日志运单号为:"+awbA+"->autoid="+autoId);
int ii =coustomAnalysisServiceImp.insertSendlog("MT8205",reception,autoId);
int iii = shareServiceImp.updateMessages(customReception);
if (i>0 && ii>0 && iii > 0){
return 1;
}
}
return 0;
}
}else {
return shareServiceImp.share("MT8205", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
}
}
... ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.tianbo.analysis.dao.ALLOCATEARRIVALMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
<result column="ID" property="id" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="WAYBILLNO" property="waybillno" jdbcType="VARCHAR" />
<result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
<result column="CUSTOMOS" property="customos" jdbcType="VARCHAR" />
<result column="ARRIVALPIECES" property="arrivalpieces" jdbcType="VARCHAR" />
<result column="ARRIVALWEIGHT" property="arrivalweight" jdbcType="VARCHAR" />
<result column="UNLOADINGLAND" property="unloadingland" jdbcType="VARCHAR" />
<result column="PRODUCTCODE" property="productcode" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
<result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
insert into ALLOCATEARRIVAL (ID, CREATEDATE, WAYBILLNO,
CARRIER, FLIGHTNO, FLIGHTDATE,
CUSTOMOS, ARRIVALPIECES, ARRIVALWEIGHT,
UNLOADINGLAND, PRODUCTCODE, STATUS,
RECEIPTINFORMATION)
values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR},
#{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
#{customos,jdbcType=VARCHAR}, #{arrivalpieces,jdbcType=VARCHAR}, #{arrivalweight,jdbcType=VARCHAR},
#{unloadingland,jdbcType=VARCHAR}, #{productcode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{receiptinformation,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
insert into ALLOCATEARRIVAL
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="waybillno != null" >
WAYBILLNO,
</if>
<if test="carrier != null" >
CARRIER,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="flightdate != null" >
FLIGHTDATE,
</if>
<if test="customos != null" >
CUSTOMOS,
</if>
<if test="arrivalpieces != null" >
ARRIVALPIECES,
</if>
<if test="arrivalweight != null" >
ARRIVALWEIGHT,
</if>
<if test="unloadingland != null" >
UNLOADINGLAND,
</if>
<if test="productcode != null" >
PRODUCTCODE,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="receiptinformation != null" >
RECEIPTINFORMATION,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="waybillno != null" >
#{waybillno,jdbcType=VARCHAR},
</if>
<if test="carrier != null" >
#{carrier,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=TIMESTAMP},
</if>
<if test="customos != null" >
#{customos,jdbcType=VARCHAR},
</if>
<if test="arrivalpieces != null" >
#{arrivalpieces,jdbcType=VARCHAR},
</if>
<if test="arrivalweight != null" >
#{arrivalweight,jdbcType=VARCHAR},
</if>
<if test="unloadingland != null" >
#{unloadingland,jdbcType=VARCHAR},
</if>
<if test="productcode != null" >
#{productcode,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="receiptinformation != null" >
#{receiptinformation,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
UPDATE ALLOCATEARRIVAL
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</update>
<select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" resultType="com.tianbo.analysis.model.ALLOCATEARRIVAL">
SELECT ID
FROM ALLOCATEARRIVAL
WHERE
FLIGHTNO= #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -348,7 +348,7 @@
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ARRIVEDMASTER" >
UPDATE ARRIVEDMASTER
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
... ...
... ... @@ -148,7 +148,7 @@
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" >
UPDATE DEPARTURESLOADING
SET RECEIPTINO= #{receiptino,jdbcType=VARCHAR}
WHERE WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
... ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.tianbo.analysis.dao.INPORTALLOCATEMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.INPORTALLOCATE" >
<result column="ID" property="id" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="WAYBILLNO" property="waybillno" jdbcType="VARCHAR" />
<result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
<result column="CUSTOMOS" property="customos" jdbcType="VARCHAR" />
<result column="TALLYPIECES" property="tallypieces" jdbcType="VARCHAR" />
<result column="TALLYWEIGHT" property="tallyweight" jdbcType="VARCHAR" />
<result column="ALLOCATEPIECES" property="allocatepieces" jdbcType="VARCHAR" />
<result column="ALLOCATEWEIGHT" property="allocateweight" jdbcType="VARCHAR" />
<result column="ALLOCATEDESTINATION" property="allocatedestination" jdbcType="VARCHAR" />
<result column="TRAILERNUMBER" property="trailernumber" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
<result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
insert into INPORTALLOCATE (ID, CREATEDATE, WAYBILLNO,
CARRIER, FLIGHTNO, FLIGHTDATE,
CUSTOMOS, TALLYPIECES, TALLYWEIGHT,
ALLOCATEPIECES, ALLOCATEWEIGHT, ALLOCATEDESTINATION,
TRAILERNUMBER, STATUS, RECEIPTINFORMATION
)
values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR},
#{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
#{customos,jdbcType=VARCHAR}, #{tallypieces,jdbcType=VARCHAR}, #{tallyweight,jdbcType=VARCHAR},
#{allocatepieces,jdbcType=VARCHAR}, #{allocateweight,jdbcType=VARCHAR}, #{allocatedestination,jdbcType=VARCHAR},
#{trailernumber,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{receiptinformation,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
insert into INPORTALLOCATE
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="waybillno != null" >
WAYBILLNO,
</if>
<if test="carrier != null" >
CARRIER,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="flightdate != null" >
FLIGHTDATE,
</if>
<if test="customos != null" >
CUSTOMOS,
</if>
<if test="tallypieces != null" >
TALLYPIECES,
</if>
<if test="tallyweight != null" >
TALLYWEIGHT,
</if>
<if test="allocatepieces != null" >
ALLOCATEPIECES,
</if>
<if test="allocateweight != null" >
ALLOCATEWEIGHT,
</if>
<if test="allocatedestination != null" >
ALLOCATEDESTINATION,
</if>
<if test="trailernumber != null" >
TRAILERNUMBER,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="receiptinformation != null" >
RECEIPTINFORMATION,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="waybillno != null" >
#{waybillno,jdbcType=VARCHAR},
</if>
<if test="carrier != null" >
#{carrier,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=TIMESTAMP},
</if>
<if test="customos != null" >
#{customos,jdbcType=VARCHAR},
</if>
<if test="tallypieces != null" >
#{tallypieces,jdbcType=VARCHAR},
</if>
<if test="tallyweight != null" >
#{tallyweight,jdbcType=VARCHAR},
</if>
<if test="allocatepieces != null" >
#{allocatepieces,jdbcType=VARCHAR},
</if>
<if test="allocateweight != null" >
#{allocateweight,jdbcType=VARCHAR},
</if>
<if test="allocatedestination != null" >
#{allocatedestination,jdbcType=VARCHAR},
</if>
<if test="trailernumber != null" >
#{trailernumber,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="receiptinformation != null" >
#{receiptinformation,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
UPDATE ALLOCATEARRIVAL
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</update>
<select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" resultType="com.tianbo.analysis.model.INPORTALLOCATE">
SELECT ID
FROM ALLOCATEARRIVAL
WHERE
FLIGHTNO= #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.tianbo.analysis.dao.INTERNATIONALTRANSITMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
<result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="ORIGINAL_CARRIER" property="originalCarrier" jdbcType="VARCHAR" />
<result column="ORIGINAL_FLIGHTNO" property="originalFlightno" jdbcType="VARCHAR" />
<result column="ORIGINAL_FLIGHTDATE" property="originalFlightdate" jdbcType="TIMESTAMP" />
<result column="ORIGINAL_BILLNO" property="originalBillno" jdbcType="VARCHAR" />
<result column="ORIGINAL_SUB_NUMBER" property="originalSubNumber" jdbcType="VARCHAR" />
<result column="PRE_CARRIER" property="preCarrier" jdbcType="VARCHAR" />
<result column="PRE_FLIGHTNO" property="preFlightno" jdbcType="VARCHAR" />
<result column="PRE_FLIGHTDATE" property="preFlightdate" jdbcType="TIMESTAMP" />
<result column="PRE_BILLNO" property="preBillno" jdbcType="VARCHAR" />
<result column="PRE_SUB_NUMBER" property="preSubNumber" jdbcType="VARCHAR" />
<result column="BILLPIECE" property="billpiece" jdbcType="VARCHAR" />
<result column="BILLWEIGHT" property="billweight" jdbcType="VARCHAR" />
<result column="PRODUCT" property="product" jdbcType="VARCHAR" />
<result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
<result column="PACKAGINGTYPE" property="packagingtype" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
<result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
<result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
insert into INTERNATIONALTRANSIT (AUTOID, CREATEDATE, ORIGINAL_CARRIER,
ORIGINAL_FLIGHTNO, ORIGINAL_FLIGHTDATE,
ORIGINAL_BILLNO, ORIGINAL_SUB_NUMBER, PRE_CARRIER,
PRE_FLIGHTNO, PRE_FLIGHTDATE, PRE_BILLNO,
PRE_SUB_NUMBER, BILLPIECE, BILLWEIGHT,
PRODUCT, ORIGINATINGSTATION, PACKAGINGTYPE,
STATUS, RECEIPTION, DESTINATIONSTATION_BILL
)
values (#{autoid,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{originalCarrier,jdbcType=VARCHAR},
#{originalFlightno,jdbcType=VARCHAR}, #{originalFlightdate,jdbcType=TIMESTAMP},
#{originalBillno,jdbcType=VARCHAR}, #{originalSubNumber,jdbcType=VARCHAR}, #{preCarrier,jdbcType=VARCHAR},
#{preFlightno,jdbcType=VARCHAR}, #{preFlightdate,jdbcType=TIMESTAMP}, #{preBillno,jdbcType=VARCHAR},
#{preSubNumber,jdbcType=VARCHAR}, #{billpiece,jdbcType=VARCHAR}, #{billweight,jdbcType=VARCHAR},
#{product,jdbcType=VARCHAR}, #{originatingstation,jdbcType=VARCHAR}, #{packagingtype,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{receiption,jdbcType=VARCHAR}, #{destinationstationBill,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
insert into INTERNATIONALTRANSIT
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
AUTOID,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="originalCarrier != null" >
ORIGINAL_CARRIER,
</if>
<if test="originalFlightno != null" >
ORIGINAL_FLIGHTNO,
</if>
<if test="originalFlightdate != null" >
ORIGINAL_FLIGHTDATE,
</if>
<if test="originalBillno != null" >
ORIGINAL_BILLNO,
</if>
<if test="originalSubNumber != null" >
ORIGINAL_SUB_NUMBER,
</if>
<if test="preCarrier != null" >
PRE_CARRIER,
</if>
<if test="preFlightno != null" >
PRE_FLIGHTNO,
</if>
<if test="preFlightdate != null" >
PRE_FLIGHTDATE,
</if>
<if test="preBillno != null" >
PRE_BILLNO,
</if>
<if test="preSubNumber != null" >
PRE_SUB_NUMBER,
</if>
<if test="billpiece != null" >
BILLPIECE,
</if>
<if test="billweight != null" >
BILLWEIGHT,
</if>
<if test="product != null" >
PRODUCT,
</if>
<if test="originatingstation != null" >
ORIGINATINGSTATION,
</if>
<if test="packagingtype != null" >
PACKAGINGTYPE,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="receiption != null" >
RECEIPTION,
</if>
<if test="destinationstationBill != null" >
DESTINATIONSTATION_BILL,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
#{autoid,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="originalCarrier != null" >
#{originalCarrier,jdbcType=VARCHAR},
</if>
<if test="originalFlightno != null" >
#{originalFlightno,jdbcType=VARCHAR},
</if>
<if test="originalFlightdate != null" >
#{originalFlightdate,jdbcType=TIMESTAMP},
</if>
<if test="originalBillno != null" >
#{originalBillno,jdbcType=VARCHAR},
</if>
<if test="originalSubNumber != null" >
#{originalSubNumber,jdbcType=VARCHAR},
</if>
<if test="preCarrier != null" >
#{preCarrier,jdbcType=VARCHAR},
</if>
<if test="preFlightno != null" >
#{preFlightno,jdbcType=VARCHAR},
</if>
<if test="preFlightdate != null" >
#{preFlightdate,jdbcType=TIMESTAMP},
</if>
<if test="preBillno != null" >
#{preBillno,jdbcType=VARCHAR},
</if>
<if test="preSubNumber != null" >
#{preSubNumber,jdbcType=VARCHAR},
</if>
<if test="billpiece != null" >
#{billpiece,jdbcType=VARCHAR},
</if>
<if test="billweight != null" >
#{billweight,jdbcType=VARCHAR},
</if>
<if test="product != null" >
#{product,jdbcType=VARCHAR},
</if>
<if test="originatingstation != null" >
#{originatingstation,jdbcType=VARCHAR},
</if>
<if test="packagingtype != null" >
#{packagingtype,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="receiption != null" >
#{receiption,jdbcType=VARCHAR},
</if>
<if test="destinationstationBill != null" >
#{destinationstationBill,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
UPDATE INTERNATIONALTRANSIT
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE ORIGINAL_FLIGHTNO = #{originalFlightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</update>
<select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" resultType="com.tianbo.analysis.model.INTERNATIONALTRANSIT">
SELECT ID
FROM INTERNATIONALTRANSIT
WHERE
ORIGINAL_FLIGHTNO= #{originalFlightno,jdbcType=VARCHAR}
AND
ORIGINAL_FLIGHTDATE= #{originalFlightdate,jdbcType=TIMESTAMP}
AND
ORIGINAL_BILLNO = #{originalBillno,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -356,7 +356,7 @@
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
UPDATE ORIGINMANIFESTMASTER
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHT_DATE= #{flightDate,jdbcType=TIMESTAMP}
AND
... ...
... ... @@ -309,7 +309,7 @@
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.PREPAREMASTER" >
UPDATE PREPAREMASTER
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
AND
... ...