|
@@ -83,6 +83,16 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
|
|
|
CustomerRec customerRec = new CustomerRec();
|
|
|
customerRec.setCustomerName(customerName);
|
|
|
customerRec.setCompanyReferencenum(noCarWayBill.getTaxplayerCode());
|
|
|
+ noCarWayBill.setBatchNum(batchNumber);
|
|
|
+ noCarWayBill.setCustomerName(customerName);
|
|
|
+ noCarWayBill.setBillwayStatus(-2);
|
|
|
+ noCarWayBill.setHisFlag(0);
|
|
|
+ noCarWayBill.setIntfaceStartTime(DateUtil.getCurrentDateStr());
|
|
|
+ noCarWaybillMapperImprt.insertImport(noCarWayBill);
|
|
|
+ NoCarWayBill noCarWayBillDb = noCarWaybillMapper.selectByBillNum(noCarWayBill.getBillNum());
|
|
|
+ if(noCarWayBillDb!=null && (noCarWayBillDb.getBillwayStatus() == 1||noCarWayBillDb.getBillwayStatus() == 2 || noCarWayBillDb.getBillwayStatus() == 3 || noCarWayBillDb.getBillwayStatus() == 4)){
|
|
|
+ noCarWaybillMapperImprt.updateBillway(-2,"失败,运单号重复",noCarWayBill);
|
|
|
+ }
|
|
|
customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
if(customerRec == null){
|
|
|
noCarWaybillMapperImprt.updateBillway(-2,"企业税号未备案",noCarWayBill);
|
|
@@ -93,13 +103,7 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
|
|
|
return;
|
|
|
}
|
|
|
noCarWayBill.setCompanyName(customerRec.getCompanyName());
|
|
|
- noCarWayBill.setCustomerName(customerName);
|
|
|
noCarWayBill.setCompanyNum(customerRec.getCompanyNum());
|
|
|
- noCarWayBill.setBatchNum(batchNumber);
|
|
|
- noCarWayBill.setBillwayStatus(-2);
|
|
|
- noCarWayBill.setHisFlag(0);
|
|
|
- noCarWayBill.setIntfaceStartTime(DateUtil.getCurrentDateStr());
|
|
|
- noCarWaybillMapperImprt.insertImport(noCarWayBill);
|
|
|
insertOrUpdateBill(noCarWayBill);
|
|
|
if(DateUtil.getDistanceHours(noCarWayBill.getStartTime(),new Date())<-72){
|
|
|
noCarWaybillMapperImprt.updateBillway(-2,"失败,运单开始时间超72小时#",noCarWayBill);
|
|
@@ -158,8 +162,11 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
|
|
|
noCarWayBill.setFailReason(respR.getMsg());
|
|
|
insertOrUpdateBill(noCarWayBill);
|
|
|
stringBuffer.append("#").append(noCarWayBill.getBillNum()).append(":").append(respR.getMsg()).append("#");
|
|
|
+ }else{
|
|
|
+ noCarWaybillMapperImprt.updateBillway(1,"",noCarWayBill);
|
|
|
+ return;
|
|
|
}
|
|
|
- noCarWaybillMapperImprt.updateBillway(1,"",noCarWayBill);
|
|
|
+
|
|
|
});
|
|
|
log.error("开始平台指令上传失败NoCarBillWayServiceImpl.batchBillWayStart:{}",stringBuffer.toString());
|
|
|
}
|
|
@@ -188,6 +195,17 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
|
|
|
customerRec.setCustomerName(customerName);
|
|
|
customerRec.setCompanyReferencenum(noCarWayBill.getTaxplayerCode());
|
|
|
customerRec = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
|
|
|
+ noCarWayBill.setIntfaceStartTime(DateUtil.getCurrentDateStr());
|
|
|
+ noCarWayBill.setBatchNum(batchNumber);
|
|
|
+ noCarWayBill.setTitleType(2);
|
|
|
+ noCarWayBill.setBillwayStatus(-2);
|
|
|
+ noCarWayBill.setHisFlag(1);
|
|
|
+ noCarWayBill.setCustomerName(customerName);
|
|
|
+ noCarWaybillMapperImprt.insertImport(noCarWayBill);
|
|
|
+ NoCarWayBill noCarWayBillDb = noCarWaybillMapper.selectByBillNum(noCarWayBill.getBillNum());
|
|
|
+ if(noCarWayBillDb!=null && (noCarWayBillDb.getBillwayStatus() == 2 || noCarWayBillDb.getBillwayStatus() == 3 || noCarWayBillDb.getBillwayStatus() == 4)){
|
|
|
+ noCarWaybillMapperImprt.updateBillway(-2,"失败,运单号重复",noCarWayBill);
|
|
|
+ }
|
|
|
if(customerRec == null || customerRec.getRecStatus()!=1){
|
|
|
stringBuffer.append("#").append(noCarWayBill.getBillNum()).append(":").append("企业税号未备案#");
|
|
|
noCarWaybillMapperImprt.updateBillway(-2,"企业税号未备案#",noCarWayBill);
|
|
@@ -197,14 +215,8 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
|
|
|
return;
|
|
|
}
|
|
|
noCarWayBill.setCompanyName(customerRec.getCompanyName());
|
|
|
- noCarWayBill.setCustomerName(customerName);
|
|
|
noCarWayBill.setCompanyNum(customerRec.getCompanyNum());
|
|
|
- noCarWayBill.setIntfaceStartTime(DateUtil.getCurrentDateStr());
|
|
|
- noCarWayBill.setBatchNum(batchNumber);
|
|
|
- noCarWayBill.setTitleType(2);
|
|
|
- noCarWayBill.setBillwayStatus(-2);
|
|
|
- noCarWayBill.setHisFlag(1);
|
|
|
- noCarWaybillMapperImprt.insertImport(noCarWayBill);
|
|
|
+
|
|
|
insertOrUpdateBill(noCarWayBill);
|
|
|
|
|
|
if(DateUtil.getDistanceDays(noCarWayBill.getStartTime(),new Date())>-20){
|