This commit is contained in:
linfso 2024-08-01 20:16:00 +08:00
parent 1e62204251
commit d96445970e

View File

@ -622,7 +622,10 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
scanResultItem.getData().put("billWeight", emisWaybill.getBillWeight());
scanResultItem.getData().put("totalVolume", emisWaybill.getTotalVolume());
scanResultItem.getData().put("parcelQty", emisWaybill.getParcelQty());
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入扫描记录
addScanRecord(emisTmsScanRecord);
// 修改主运单状态
this.changeWaybillStatus(mainBillCode, scanType);
@ -1062,7 +1065,9 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 填充公共数据
this.fillBillBaseData(emisTmsScanRecord);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入扫描记录
addScanRecord(emisTmsScanRecord);
// 合包数据插入
EmisTmsPackDtl emisTmsPackDtl = new EmisTmsPackDtl();
@ -1147,6 +1152,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
List<EmisTmsPackDtl> listPackDtl=emisTmsPackDtlMapper.selectPackDtlListByPackNo(packNo);
// 内件处理
for (EmisTmsPackDtl emisTmsPackDtl : listPackDtl) {
String scanBillCode = emisTmsPackDtl.getBillCode();
// 返回原始数据返回
ScanResultItem scanResultItem = new ScanResultItem();
scanResultItem.setBillCode(emisTmsPackDtl.getBillCode());
@ -1197,7 +1204,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 填充公共数据
this.fillBillBaseData(emisTmsScanRecord);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入扫描记录
addScanRecord(emisTmsScanRecord);
// 下一站点
changeWaybillNextSite(emisTmsScanRecord.getMainBillCode(),preOrNextStationCode);
@ -1286,7 +1294,9 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 填充公共数据
this.fillBillBaseData(emisTmsScanRecord);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入扫描记录
addScanRecord(emisTmsScanRecord);
// 改变当前站点
changeWaybillCurrentSite(emisWaybill.getBillCode(),emisTmsScanRecord.getScanSiteCode());
@ -1373,6 +1383,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
if(!CollectionUtil.isEmpty(packDtlList)){
for (EmisTmsPackDtl emisTmsPackDtl:packDtlList) {
String mainBillCode = emisTmsPackDtl.getMainBillCode();
// 生成扫描记录
EmisTmsScanRecord emisTmsScanRecord = new EmisTmsScanRecord();
emisTmsScanRecord.setBillCode(emisTmsPackDtl.getBillCode());
@ -1384,7 +1396,9 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 填充公共数据
this.fillBillBaseData(emisTmsScanRecord);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入扫描记录
addScanRecord(emisTmsScanRecord);
// 更新合包运单扫描状态 ,拆包
emisTmsPackDtl.setBillCode(scanBillCode);
@ -1418,6 +1432,40 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
}
/**
* 增加扫描记录,并且判断是否要做主单扫描
* @param emisTmsScanRecord
*/
private void addScanRecord(EmisTmsScanRecord emisTmsScanRecord){
String scanBillCode=emisTmsScanRecord.getBillCode();
String mainBillCode=emisTmsScanRecord.getMainBillCode();
if(mainBillCode==null) {
// 主单扫描
emisTmsScanRecord.setMainBillCode(scanBillCode);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
}else{
if(scanBillCode.equals(mainBillCode+"0001")){
// 0001子单扫描需要同时增加主单扫描记录
// 插入子单扫描记录
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入主单扫描记录
emisTmsScanRecord.setBillCode(mainBillCode);
emisTmsScanRecord.setMainBillCode(mainBillCode);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
}else{
// 非0001的子单
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
}
}
}
/**
* 问题件扫描
* @param itemList
@ -1508,7 +1556,9 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 填充公共数据
this.fillBillBaseData(emisTmsScanRecord);
emisTmsScanRecordMapper.insertEmisTmsScanRecord(emisTmsScanRecord);
// 插入扫描记录
addScanRecord(emisTmsScanRecord);
// 登记问题件
EmisWaybillProblemInfo waybillProblemInfo = new EmisWaybillProblemInfo();