作者 申海龙

service 逻辑 改动 添加 if判断

... ... @@ -107,11 +107,14 @@ public class CustomXmlHandle{
if(journeyid != null){
String[] flightList = journeyid.split("/");
if(flightList.length > 0){
flightNo = flightList[0];
flightDate = flightList[1];
}
}
String awbA = XMLXPath.getSingleValueByPath(document,waybillMaster);
//全格式的分单 如 17212345678_ADBD
String awbH = XMLXPath.getSingleValueByPath(document,waybillSecond);
... ...
... ... @@ -8,6 +8,7 @@ import com.tianbo.analysis.model.CustomReception;
import com.tianbo.analysis.service.ARRIVEDMASTERService;
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;
... ... @@ -45,10 +46,9 @@ public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService {
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
Date flightDate = new Date();
if (flightDateStr != null){
flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
}
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
// 设置 接收运抵分单 回执
ARRIVEDSECONDARY arrivedsecondary = new ARRIVEDSECONDARY();
... ... @@ -122,7 +122,7 @@ public class ARRIVEDMASTERServiceImp implements ARRIVEDMASTERService {
return shareServiceImp.share("MT3201", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
... ...
... ... @@ -11,6 +11,7 @@ import com.tianbo.analysis.service.CoustomAnalysisService;
import com.tianbo.util.Date.DateUtil;
import com.tianbo.util.Helper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -42,11 +43,9 @@ public class CoustomAnalysisServiceImp implements CoustomAnalysisService {
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
Date flightDate = new Date();
if (flightDateStr != null){
flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
}
// Date flightDate = new Date();
if (!StringUtils.isEmpty(flightDateStr)){
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
// 设置分单回执
Originmanifestsecondary originmanifestsecondary = new Originmanifestsecondary();
... ... @@ -117,10 +116,9 @@ public class CoustomAnalysisServiceImp implements CoustomAnalysisService {
return 0;
}
}else {
return shareServiceImp.share("MT1201", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
... ...
... ... @@ -6,6 +6,7 @@ import com.tianbo.analysis.model.DEPARTURESLOADING;
import com.tianbo.analysis.service.DEPARTURESLOADINGService;
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;
... ... @@ -37,11 +38,8 @@ public class DEPARTURESLOADINGServiceImp implements DEPARTURESLOADINGService{
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
Date flightDate = new Date();
if (flightDateStr != null){
flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
}
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
//设置主单回执、航班号、航班日期
DEPARTURESLOADING departuresloading = new DEPARTURESLOADING();
departuresloading.setReceiption(reception);
... ... @@ -85,6 +83,9 @@ public class DEPARTURESLOADINGServiceImp implements DEPARTURESLOADINGService{
return shareServiceImp.share("MT4201", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
}
... ...
... ... @@ -8,6 +8,7 @@ import com.tianbo.analysis.model.PREPARESECONDARY;
import com.tianbo.analysis.service.PREPAREMASTERService;
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;
... ... @@ -43,10 +44,8 @@ public class PREPAREMASTERServiceImp implements PREPAREMASTERService {
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
Date flightDate = new Date();
if (flightDateStr != null){
flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
}
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
// 设置 接收运抵分单 回执
PREPARESECONDARY preparesecondary = new PREPARESECONDARY();
... ... @@ -123,6 +122,8 @@ public class PREPAREMASTERServiceImp implements PREPAREMASTERService {
return shareServiceImp.share("MT2201", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
}
... ...
... ... @@ -8,6 +8,7 @@ import com.tianbo.analysis.model.TALLYSECONDARY;
import com.tianbo.analysis.service.TALLYMASTERService;
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;
... ... @@ -45,11 +46,9 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{
//回执内容
String reception = customReception.getResponseText();
String flightDateStr = customReception.getFlightDate();
Date flightDate = new Date();
if (flightDateStr != null){
flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
}
if (!StringUtils.isEmpty(flightDateStr)) {
Date flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);
// 设置 进出港理货 回执
TALLYSECONDARY tallysecondary = new TALLYSECONDARY();
tallysecondary.setReceiptinformation(reception);
... ... @@ -121,6 +120,7 @@ public class TALLYMASTERServiceImp implements TALLYMASTERService{
return shareServiceImp.share("MT5202", customReception);
}
}
//未进入主分单解析 返回0 失败
return 0;
... ...
... ... @@ -251,14 +251,17 @@
UPDATE TALLYMASTER
SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
AND FLIGHTNO = #{flghtno, jdbcType=VARCHAR}
AND FLIGHTDATE = #{flightdate, jdbcType=TIMESTAMP}
</update>
<select id="selectAutoIdByawbAawbH" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER">
<select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER">
SELECT AUTOID
FROM TALLYMASTER
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
AND FLIGHTNO = #{flghtno, jdbcType=VARCHAR}
AND FLIGHTDATE = #{flightdate, jdbcType=TIMESTAMP}
</select>
</mapper>
\ No newline at end of file
... ...