|
|
|
@ -13327,156 +13327,159 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i= 0; |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> carsLoadScanEntities = trunklineCarsLoadScanService.findUnloadNoDataList(loadId,warehouseId); |
|
|
|
|
//把carsLoadScanEntities中所有元素的scanCode放入一个Set集合
|
|
|
|
|
Set<String> scanCodeSet = carsLoadScanEntities.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toSet()); |
|
|
|
|
if(CollUtil.isNotEmpty(carsLoadScanEntities)){ |
|
|
|
|
//把carsLoadScanEntities中所有元素的scanCode放入一个Set集合
|
|
|
|
|
Set<String> scanCodeSet = carsLoadScanEntities.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toSet()); |
|
|
|
|
|
|
|
|
|
log.info("###############syncNoSystemData: 当前同步的数据 {}",scanCodeSet); |
|
|
|
|
log.info("###############syncNoSystemData: 当前同步的数据 {}",scanCodeSet); |
|
|
|
|
|
|
|
|
|
List<String> scanCodeList = new ArrayList<>(scanCodeSet); |
|
|
|
|
List<String> scanCodeList = new ArrayList<>(scanCodeSet); |
|
|
|
|
|
|
|
|
|
List<TrunklineAdvanceDetailEntity> allAdvanceDetailList = new ArrayList<>(); |
|
|
|
|
List<TrunklineAdvanceDetailEntity> allAdvanceDetailList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
int packageBatchSize = 500; |
|
|
|
|
List<List<String>> orderPackageCodeGroups = new ArrayList<>(); |
|
|
|
|
int packageBatchSize = 500; |
|
|
|
|
List<List<String>> orderPackageCodeGroups = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < scanCodeList.size(); i += packageBatchSize) { |
|
|
|
|
int endIndex = Math.min(i + packageBatchSize, scanCodeList.size()); |
|
|
|
|
orderPackageCodeGroups.add(scanCodeList.subList(i, endIndex)); |
|
|
|
|
} |
|
|
|
|
for (int m = 0; m < scanCodeList.size(); m += packageBatchSize) { |
|
|
|
|
int endIndex = Math.min(m + packageBatchSize, scanCodeList.size()); |
|
|
|
|
orderPackageCodeGroups.add(scanCodeList.subList(m, endIndex)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
orderPackageCodeGroups.forEach(orderPackageCodeGroup -> { |
|
|
|
|
List<TrunklineAdvanceDetailEntity> advanceDetailEntityList = trunklineAdvanceDetailService.findListByOrderPackageCodeList(orderPackageCodeGroup); |
|
|
|
|
allAdvanceDetailList.addAll(advanceDetailEntityList); |
|
|
|
|
}); |
|
|
|
|
orderPackageCodeGroups.forEach(orderPackageCodeGroup -> { |
|
|
|
|
List<TrunklineAdvanceDetailEntity> advanceDetailEntityList = trunklineAdvanceDetailService.findListByOrderPackageCodeList(orderPackageCodeGroup); |
|
|
|
|
allAdvanceDetailList.addAll(advanceDetailEntityList); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
//把allAdvanceDetailList中所有advanceId放入一个Set集合
|
|
|
|
|
Set<Long> advanceIdSet = allAdvanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getAdvanceId).collect(Collectors.toSet()); |
|
|
|
|
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet)); |
|
|
|
|
//把advanceEntities转化成id为key的Map
|
|
|
|
|
Map<Long, TrunklineAdvanceEntity> advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity())); |
|
|
|
|
//把allAdvanceDetailList中所有advanceId放入一个Set集合
|
|
|
|
|
Set<Long> advanceIdSet = allAdvanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getAdvanceId).collect(Collectors.toSet()); |
|
|
|
|
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet)); |
|
|
|
|
//把advanceEntities转化成id为key的Map
|
|
|
|
|
Map<Long, TrunklineAdvanceEntity> advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//把allAdvanceDetailList转化成orderPackageCode为key的Map
|
|
|
|
|
Map<String, TrunklineAdvanceDetailEntity> advanceDetailMap = allAdvanceDetailList.stream().collect(Collectors.toMap(TrunklineAdvanceDetailEntity::getOrderPackageCode, Function.identity())); |
|
|
|
|
//把allAdvanceDetailList转化成orderPackageCode为key的Map
|
|
|
|
|
Map<String, TrunklineAdvanceDetailEntity> advanceDetailMap = allAdvanceDetailList.stream().collect(Collectors.toMap(TrunklineAdvanceDetailEntity::getOrderPackageCode, Function.identity())); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> updateScanList = new ArrayList<>(); |
|
|
|
|
List<TrunklineAdvanceDetailEntity> incomingAdvanceDetailList = new ArrayList<>(); |
|
|
|
|
List<TrunklineAdvanceDetailEntity> udateAdvanceDetailList = new ArrayList<>(); |
|
|
|
|
List<String> orderPackageCodeList = new ArrayList<>(); |
|
|
|
|
Set<String> orderPackageCodeSet = new HashSet<>(); |
|
|
|
|
|
|
|
|
|
carsLoadScanEntities.forEach(carsLoadScanEntity -> { |
|
|
|
|
String orderPackageCode = carsLoadScanEntity.getScanCode(); |
|
|
|
|
Date unloadTime = carsLoadScanEntity.getUnloadTime(); |
|
|
|
|
TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity = advanceDetailMap.get(orderPackageCode); |
|
|
|
|
if(!Objects.isNull(trunklineAdvanceDetailEntity)){ |
|
|
|
|
Long advanceId = trunklineAdvanceDetailEntity.getAdvanceId(); |
|
|
|
|
|
|
|
|
|
orderPackageCodeSet.add(orderPackageCode); |
|
|
|
|
TrunklineCarsLoadScanEntity updateScanEntity = new TrunklineCarsLoadScanEntity(); |
|
|
|
|
updateScanEntity.setId(carsLoadScanEntity.getId()); |
|
|
|
|
|
|
|
|
|
String packageStatus = trunklineAdvanceDetailEntity.getPackageStatus(); |
|
|
|
|
if(packageStatus.equals("0")){ |
|
|
|
|
updateScanEntity.setFromWarehouseId(trunklineAdvanceDetailEntity.getWarehouseId()); |
|
|
|
|
incomingAdvanceDetailList.add(trunklineAdvanceDetailEntity); |
|
|
|
|
}else{ |
|
|
|
|
updateScanEntity.setFromWarehouseId(trunklineAdvanceDetailEntity.getNowWarehouseId()); |
|
|
|
|
trunklineAdvanceDetailEntity.setReserve5(CommonUtil.dateToStringGeneral(unloadTime)); |
|
|
|
|
udateAdvanceDetailList.add(trunklineAdvanceDetailEntity); |
|
|
|
|
List<TrunklineCarsLoadScanEntity> updateScanList = new ArrayList<>(); |
|
|
|
|
List<TrunklineAdvanceDetailEntity> incomingAdvanceDetailList = new ArrayList<>(); |
|
|
|
|
List<TrunklineAdvanceDetailEntity> udateAdvanceDetailList = new ArrayList<>(); |
|
|
|
|
List<String> orderPackageCodeList = new ArrayList<>(); |
|
|
|
|
Set<String> orderPackageCodeSet = new HashSet<>(); |
|
|
|
|
|
|
|
|
|
carsLoadScanEntities.forEach(carsLoadScanEntity -> { |
|
|
|
|
String orderPackageCode = carsLoadScanEntity.getScanCode(); |
|
|
|
|
Date unloadTime = carsLoadScanEntity.getUnloadTime(); |
|
|
|
|
TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity = advanceDetailMap.get(orderPackageCode); |
|
|
|
|
if(!Objects.isNull(trunklineAdvanceDetailEntity)){ |
|
|
|
|
Long advanceId = trunklineAdvanceDetailEntity.getAdvanceId(); |
|
|
|
|
|
|
|
|
|
orderPackageCodeSet.add(orderPackageCode); |
|
|
|
|
TrunklineCarsLoadScanEntity updateScanEntity = new TrunklineCarsLoadScanEntity(); |
|
|
|
|
updateScanEntity.setId(carsLoadScanEntity.getId()); |
|
|
|
|
|
|
|
|
|
String packageStatus = trunklineAdvanceDetailEntity.getPackageStatus(); |
|
|
|
|
if(packageStatus.equals("0")){ |
|
|
|
|
updateScanEntity.setFromWarehouseId(trunklineAdvanceDetailEntity.getWarehouseId()); |
|
|
|
|
incomingAdvanceDetailList.add(trunklineAdvanceDetailEntity); |
|
|
|
|
}else{ |
|
|
|
|
updateScanEntity.setFromWarehouseId(trunklineAdvanceDetailEntity.getNowWarehouseId()); |
|
|
|
|
trunklineAdvanceDetailEntity.setReserve5(CommonUtil.dateToStringGeneral(unloadTime)); |
|
|
|
|
udateAdvanceDetailList.add(trunklineAdvanceDetailEntity); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
updateScanEntity.setOrderCode(trunklineAdvanceDetailEntity.getOrderCode()); |
|
|
|
|
updateScanEntity.setWaybillId(trunklineAdvanceDetailEntity.getWaybillId()); |
|
|
|
|
updateScanEntity.setWaybillNo(trunklineAdvanceDetailEntity.getWaybillNo()); |
|
|
|
|
TrunklineAdvanceEntity advanceEntity = advanceMap.get(advanceId); |
|
|
|
|
if(!Objects.isNull(advanceEntity)){ |
|
|
|
|
updateScanEntity.setCustomerName(advanceEntity.getCustomerName()); |
|
|
|
|
updateScanEntity.setCustomerTelephone(advanceEntity.getCustomerPhone()); |
|
|
|
|
updateScanEntity.setCustomerAddress(advanceEntity.getCustomerAddress()); |
|
|
|
|
} |
|
|
|
|
updateScanEntity.setFirsts(trunklineAdvanceDetailEntity.getFirstPackName()); |
|
|
|
|
updateScanEntity.setSenconds(trunklineAdvanceDetailEntity.getSecondPackName()); |
|
|
|
|
updateScanEntity.setThirds(trunklineAdvanceDetailEntity.getThirdPackName()); |
|
|
|
|
updateScanEntity.setMaterialCode(trunklineAdvanceDetailEntity.getMaterialCode()); |
|
|
|
|
updateScanEntity.setMaterialName(trunklineAdvanceDetailEntity.getMaterialName()); |
|
|
|
|
updateScanEntity.setIsData(1); |
|
|
|
|
updateScanList.add(updateScanEntity); |
|
|
|
|
} |
|
|
|
|
updateScanEntity.setOrderCode(trunklineAdvanceDetailEntity.getOrderCode()); |
|
|
|
|
updateScanEntity.setWaybillId(trunklineAdvanceDetailEntity.getWaybillId()); |
|
|
|
|
updateScanEntity.setWaybillNo(trunklineAdvanceDetailEntity.getWaybillNo()); |
|
|
|
|
TrunklineAdvanceEntity advanceEntity = advanceMap.get(advanceId); |
|
|
|
|
if(!Objects.isNull(advanceEntity)){ |
|
|
|
|
updateScanEntity.setCustomerName(advanceEntity.getCustomerName()); |
|
|
|
|
updateScanEntity.setCustomerTelephone(advanceEntity.getCustomerPhone()); |
|
|
|
|
updateScanEntity.setCustomerAddress(advanceEntity.getCustomerAddress()); |
|
|
|
|
} |
|
|
|
|
updateScanEntity.setFirsts(trunklineAdvanceDetailEntity.getFirstPackName()); |
|
|
|
|
updateScanEntity.setSenconds(trunklineAdvanceDetailEntity.getSecondPackName()); |
|
|
|
|
updateScanEntity.setThirds(trunklineAdvanceDetailEntity.getThirdPackName()); |
|
|
|
|
updateScanEntity.setMaterialCode(trunklineAdvanceDetailEntity.getMaterialCode()); |
|
|
|
|
updateScanEntity.setMaterialName(trunklineAdvanceDetailEntity.getMaterialName()); |
|
|
|
|
updateScanEntity.setIsData(1); |
|
|
|
|
updateScanList.add(updateScanEntity); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(incomingAdvanceDetailList)){ |
|
|
|
|
if(CollUtil.isNotEmpty(incomingAdvanceDetailList)){ |
|
|
|
|
|
|
|
|
|
for (TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity : incomingAdvanceDetailList) { |
|
|
|
|
InComingDTO inComingDTO = new InComingDTO(); |
|
|
|
|
inComingDTO.setOrderPackageCode(trunklineAdvanceDetailEntity.getOrderPackageCode()); |
|
|
|
|
inComingDTO.setIncomingType(IncomingTypeEnum.SYNC_INCOMING.getCode()); |
|
|
|
|
inComingDTO.setWarehouseId(warehouseId); |
|
|
|
|
R r = inComingService.incomingPackage(inComingDTO); |
|
|
|
|
if(r.getCode() != 200){ |
|
|
|
|
throw new CustomerException(405,"入库失败"); |
|
|
|
|
for (TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity : incomingAdvanceDetailList) { |
|
|
|
|
InComingDTO inComingDTO = new InComingDTO(); |
|
|
|
|
inComingDTO.setOrderPackageCode(trunklineAdvanceDetailEntity.getOrderPackageCode()); |
|
|
|
|
inComingDTO.setIncomingType(IncomingTypeEnum.SYNC_INCOMING.getCode()); |
|
|
|
|
inComingDTO.setWarehouseId(warehouseId); |
|
|
|
|
R r = inComingService.incomingPackage(inComingDTO); |
|
|
|
|
if(r.getCode() != 200){ |
|
|
|
|
throw new CustomerException(405,"入库失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(udateAdvanceDetailList)){ |
|
|
|
|
if(CollUtil.isNotEmpty(udateAdvanceDetailList)){ |
|
|
|
|
|
|
|
|
|
advanceService.saveOrderAndPackages(udateAdvanceDetailList, warehouseId); |
|
|
|
|
advanceService.saveOrderAndPackages(udateAdvanceDetailList, warehouseId); |
|
|
|
|
|
|
|
|
|
List<TrunklineAdvanceDetailEntity> updateNowWarehouseList = new ArrayList<>(); |
|
|
|
|
List<DistributionParcelListEntity> updateParceList = new ArrayList<>(); |
|
|
|
|
udateAdvanceDetailList.forEach(trunklineAdvanceDetailEntity -> { |
|
|
|
|
List<TrunklineAdvanceDetailEntity> updateNowWarehouseList = new ArrayList<>(); |
|
|
|
|
List<DistributionParcelListEntity> updateParceList = new ArrayList<>(); |
|
|
|
|
udateAdvanceDetailList.forEach(trunklineAdvanceDetailEntity -> { |
|
|
|
|
|
|
|
|
|
String orderPackageCode = trunklineAdvanceDetailEntity.getOrderPackageCode(); |
|
|
|
|
String reserve5 = trunklineAdvanceDetailEntity.getReserve5(); |
|
|
|
|
Date unloadTime = CommonUtil.StringToDate(reserve5); |
|
|
|
|
String orderPackageCode = trunklineAdvanceDetailEntity.getOrderPackageCode(); |
|
|
|
|
String reserve5 = trunklineAdvanceDetailEntity.getReserve5(); |
|
|
|
|
Date unloadTime = CommonUtil.StringToDate(reserve5); |
|
|
|
|
|
|
|
|
|
orderPackageCodeList.add(orderPackageCode); |
|
|
|
|
orderPackageCodeList.add(orderPackageCode); |
|
|
|
|
|
|
|
|
|
//查询是否有在系统无编码后进行卸车的数据
|
|
|
|
|
int unloadNum = trunklineCarsLoadScanService.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime); |
|
|
|
|
if(unloadNum > 0){ |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); |
|
|
|
|
if(!Objects.isNull(parcelListEntity)){ |
|
|
|
|
DistributionParcelListEntity updateEntity = new DistributionParcelListEntity(); |
|
|
|
|
updateEntity.setId(parcelListEntity.getId()); |
|
|
|
|
updateEntity.setOrderPackageStatus("60"); |
|
|
|
|
updateEntity.setOrderCode(parcelListEntity.getOrderCode()); |
|
|
|
|
updateEntity.setWarehouseId(parcelListEntity.getWarehouseId()); |
|
|
|
|
updateParceList.add(updateEntity); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
List<DistributionParcelListEntity> list = distributionParcelListClient.findListByOrderPackageCodeAndStatusAndNoWarehouseId(orderPackageCode,"20",warehouseId); |
|
|
|
|
if(CollUtil.isNotEmpty(list)) { |
|
|
|
|
list.forEach(distributionParcelListEntity -> { |
|
|
|
|
//查询是否有在系统无编码后进行卸车的数据
|
|
|
|
|
int unloadNum = trunklineCarsLoadScanService.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime); |
|
|
|
|
if(unloadNum > 0){ |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); |
|
|
|
|
if(!Objects.isNull(parcelListEntity)){ |
|
|
|
|
DistributionParcelListEntity updateEntity = new DistributionParcelListEntity(); |
|
|
|
|
updateEntity.setId(distributionParcelListEntity.getId()); |
|
|
|
|
updateEntity.setId(parcelListEntity.getId()); |
|
|
|
|
updateEntity.setOrderPackageStatus("60"); |
|
|
|
|
updateEntity.setOrderCode(distributionParcelListEntity.getOrderCode()); |
|
|
|
|
updateEntity.setWarehouseId(distributionParcelListEntity.getWarehouseId()); |
|
|
|
|
updateEntity.setOrderCode(parcelListEntity.getOrderCode()); |
|
|
|
|
updateEntity.setWarehouseId(parcelListEntity.getWarehouseId()); |
|
|
|
|
updateParceList.add(updateEntity); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
List<DistributionParcelListEntity> list = distributionParcelListClient.findListByOrderPackageCodeAndStatusAndNoWarehouseId(orderPackageCode,"20",warehouseId); |
|
|
|
|
if(CollUtil.isNotEmpty(list)) { |
|
|
|
|
list.forEach(distributionParcelListEntity -> { |
|
|
|
|
DistributionParcelListEntity updateEntity = new DistributionParcelListEntity(); |
|
|
|
|
updateEntity.setId(distributionParcelListEntity.getId()); |
|
|
|
|
updateEntity.setOrderPackageStatus("60"); |
|
|
|
|
updateEntity.setOrderCode(distributionParcelListEntity.getOrderCode()); |
|
|
|
|
updateEntity.setWarehouseId(distributionParcelListEntity.getWarehouseId()); |
|
|
|
|
updateParceList.add(updateEntity); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
TrunklineAdvanceDetailEntity updateEntity = new TrunklineAdvanceDetailEntity(); |
|
|
|
|
updateEntity.setId(trunklineAdvanceDetailEntity.getId()); |
|
|
|
|
updateEntity.setNowWarehouseId(warehouseId); |
|
|
|
|
updateEntity.setNowWarehouseName(warehouseName); |
|
|
|
|
updateNowWarehouseList.add(updateEntity); |
|
|
|
|
} |
|
|
|
|
TrunklineAdvanceDetailEntity updateEntity = new TrunklineAdvanceDetailEntity(); |
|
|
|
|
updateEntity.setId(trunklineAdvanceDetailEntity.getId()); |
|
|
|
|
updateEntity.setNowWarehouseId(warehouseId); |
|
|
|
|
updateEntity.setNowWarehouseName(warehouseName); |
|
|
|
|
updateNowWarehouseList.add(updateEntity); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(updateParceList)){ |
|
|
|
|
distributionParcelListClient.updateList(updateParceList); |
|
|
|
|
} |
|
|
|
|
if(CollUtil.isNotEmpty(updateParceList)){ |
|
|
|
|
distributionParcelListClient.updateList(updateParceList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(updateNowWarehouseList)){ |
|
|
|
|
trunklineAdvanceDetailService.updateBatchById(updateNowWarehouseList); |
|
|
|
|
} |
|
|
|
|
if(CollUtil.isNotEmpty(updateNowWarehouseList)){ |
|
|
|
|
trunklineAdvanceDetailService.updateBatchById(updateNowWarehouseList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(updateScanList)){ |
|
|
|
|
trunklineCarsLoadScanService.updateBatchById(updateScanList); |
|
|
|
|
} |
|
|
|
|
if(CollUtil.isNotEmpty(updateScanList)){ |
|
|
|
|
trunklineCarsLoadScanService.updateBatchById(updateScanList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -13507,32 +13510,33 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanService.updateBatchById(updateScanList);
|
|
|
|
|
|
|
|
|
|
int i= 0; |
|
|
|
|
|
|
|
|
|
//完结所有包件异常列表
|
|
|
|
|
if(CollUtil.isNotEmpty(orderPackageCodeSet)){ |
|
|
|
|
i = orderPackageCodeSet.size(); |
|
|
|
|
DealWithAbnormalVO dealWithAbnormalVO = new DealWithAbnormalVO(); |
|
|
|
|
dealWithAbnormalVO.setOrderPackageCodes(new ArrayList<>(orderPackageCodeSet)); |
|
|
|
|
dealWithAbnormalVO.setCarsNo(carsLoadEntity.getCarsNo()); |
|
|
|
|
dealWithAbnormalVO.setWarehouseName(warehouseName); |
|
|
|
|
dealWithAbnormalVO.setNickName(AuthUtil.getNickName()); |
|
|
|
|
dealWithAbnormalVO.setRemark("数据同步系统自动处理("+warehouseName+" "+carsLoadEntity.getCarsNo()+" "+AuthUtil.getNickName()+")"); |
|
|
|
|
abnormalRecordClient.dealwithOrderPackageCodes(dealWithAbnormalVO); |
|
|
|
|
//完结所有包件异常列表
|
|
|
|
|
if(CollUtil.isNotEmpty(orderPackageCodeSet)){ |
|
|
|
|
i = orderPackageCodeSet.size(); |
|
|
|
|
DealWithAbnormalVO dealWithAbnormalVO = new DealWithAbnormalVO(); |
|
|
|
|
dealWithAbnormalVO.setOrderPackageCodes(new ArrayList<>(orderPackageCodeSet)); |
|
|
|
|
dealWithAbnormalVO.setCarsNo(carsLoadEntity.getCarsNo()); |
|
|
|
|
dealWithAbnormalVO.setWarehouseName(warehouseName); |
|
|
|
|
dealWithAbnormalVO.setNickName(AuthUtil.getNickName()); |
|
|
|
|
dealWithAbnormalVO.setRemark("数据同步系统自动处理("+warehouseName+" "+carsLoadEntity.getCarsNo()+" "+AuthUtil.getNickName()+")"); |
|
|
|
|
abnormalRecordClient.dealwithOrderPackageCodes(dealWithAbnormalVO); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(orderPackageCodeSet); |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(orderPackageCodeSet); |
|
|
|
|
|
|
|
|
|
orderPackageCodes.removeAll(orderPackageCodeList); |
|
|
|
|
orderPackageCodes.removeAll(orderPackageCodeList); |
|
|
|
|
|
|
|
|
|
String content = "包件在 " + warehouseName + "卸车,车次号:"+carsLoadEntity.getCarsNo()+" 卸车方式:" + IncomingTypeEnum.getValue(IncomingTypeEnum.SYNC_INCOMING.getCode()); |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content); |
|
|
|
|
String content = "包件在 " + warehouseName + "卸车,车次号:"+carsLoadEntity.getCarsNo()+" 卸车方式:" + IncomingTypeEnum.getValue(IncomingTypeEnum.SYNC_INCOMING.getCode()); |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bladeRedis.del(key); |
|
|
|
|
return R.success("同步成功"+i+"条"); |
|
|
|
|
} |
|
|
|
|