|
|
|
@ -3440,6 +3440,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
if(!carsLoadScanIds.isEmpty()){ |
|
|
|
|
|
|
|
|
|
Date date = new Date(); |
|
|
|
|
List<TrunklineCarsLoadScanEntity> loadScanEntityList = trunklineCarsLoadScanService.findListByIdsNoPackage(carsLoadScanIds,warehouseId); |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = trunklineCarsLoadScanService.findParceListByCarsLoadScanIds(carsLoadScanIds); |
|
|
|
|
//把parcelListEntities转成orderPackageCode为键值的map
|
|
|
|
@ -3483,6 +3484,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//需要修改仓库信息的打托数据
|
|
|
|
|
List<String> trayCodes = new ArrayList<>(); |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
List<TrunklineCarsUnloadLogEntity> unloadLogList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3505,6 +3507,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
DistributionStockArticleEntity newStockArticleEntity = new DistributionStockArticleEntity(); |
|
|
|
|
BeanUtil.copy(stockArticleEntity,newStockArticleEntity); |
|
|
|
|
newStockArticleEntity.setId(null); |
|
|
|
|
newStockArticleEntity.setCreateUser(userId); |
|
|
|
|
newStockArticleEntity.setUpdateUser(userId); |
|
|
|
|
newStockArticleEntity.setWarehouseId(warehouseId); |
|
|
|
|
newStockArticleEntity.setWarehouse(warehouseName); |
|
|
|
|
newStockArticleEntity.setHandQuantity(0); |
|
|
|
@ -3530,6 +3534,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
DistributionParcelListEntity newNoOrderPackage = new DistributionParcelListEntity(); |
|
|
|
|
BeanUtil.copy(parcelListEntity,newNoOrderPackage); |
|
|
|
|
newNoOrderPackage.setId(null); |
|
|
|
|
newNoOrderPackage.setCreateUser(userId); |
|
|
|
|
newNoOrderPackage.setUpdateUser(userId); |
|
|
|
|
newNoOrderPackage.setWarehouseId(warehouseId); |
|
|
|
|
newNoOrderPackage.setWarehouse(warehouseName); |
|
|
|
|
newNoOrderPackage.setStockArticleId(finalOrderId); |
|
|
|
@ -3556,13 +3562,45 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
unbingTrayAndDelAllocationPackages.put(fromWarehouseId,list); |
|
|
|
|
|
|
|
|
|
Integer isAbnormal = 0; |
|
|
|
|
String remark = "正常卸车"; |
|
|
|
|
p.setScanStatus("2"); |
|
|
|
|
p.setUnloadNodeId(warehouseId); |
|
|
|
|
p.setUnloadNodeName(warehouseName); |
|
|
|
|
p.setUnloadAbnormal(0); |
|
|
|
|
Long finalNodeId = p.getFinalNodeId(); |
|
|
|
|
if(!finalNodeId.equals(warehouseId)){ |
|
|
|
|
isAbnormal = 1; |
|
|
|
|
remark = "卸车仓库与目的仓不一致,异常卸车"; |
|
|
|
|
} |
|
|
|
|
p.setUnloadAbnormal(isAbnormal); |
|
|
|
|
p.setUnloadNum(1); |
|
|
|
|
p.setUnloadUserName(nickName); |
|
|
|
|
updateScanEntityList.add(p); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TrunklineCarsUnloadLogEntity entity = new TrunklineCarsUnloadLogEntity(); |
|
|
|
|
entity.setTenantId(tenantId); |
|
|
|
|
entity.setCreateUser(userId); |
|
|
|
|
entity.setUpdateUser(userId); |
|
|
|
|
entity.setCreateDept(deptId); |
|
|
|
|
entity.setCreateTime(date); |
|
|
|
|
entity.setUpdateTime(date); |
|
|
|
|
entity.setWarehouseId(warehouseId); |
|
|
|
|
entity.setWarehouseName(warehouseName); |
|
|
|
|
entity.setLoadId(loadId); |
|
|
|
|
entity.setLoadCode(carsLoadEntity.getCarsNo()); |
|
|
|
|
entity.setWaybillId(p.getWaybillId()); |
|
|
|
|
entity.setWaybillNo(p.getWaybillNo()); |
|
|
|
|
entity.setOrderCode(p.getOrderCode()); |
|
|
|
|
entity.setScanCode(p.getScanCode()); |
|
|
|
|
entity.setNum(p.getUnloadNum()); |
|
|
|
|
entity.setType(p.getType()); |
|
|
|
|
entity.setIsData(p.getIsData()); |
|
|
|
|
entity.setIsAbnormal(isAbnormal); |
|
|
|
|
entity.setFromWarehouseId(fromWarehouseId); |
|
|
|
|
entity.setLoadScanId(p.getId()); |
|
|
|
|
entity.setRemark(remark); |
|
|
|
|
unloadLogList.add(entity); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
@ -3586,6 +3624,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
DistributionStockArticleEntity newStockArticleEntity = new DistributionStockArticleEntity(); |
|
|
|
|
BeanUtil.copy(stockArticleEntity,newStockArticleEntity); |
|
|
|
|
newStockArticleEntity.setId(null); |
|
|
|
|
newStockArticleEntity.setCreateUser(userId); |
|
|
|
|
newStockArticleEntity.setUpdateUser(userId); |
|
|
|
|
newStockArticleEntity.setWarehouseId(warehouseId); |
|
|
|
|
newStockArticleEntity.setWarehouse(warehouseName); |
|
|
|
|
newStockArticleEntity.setHandQuantity(0); |
|
|
|
@ -3609,6 +3649,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
DistributionParcelListEntity newNoOrderPackage = new DistributionParcelListEntity(); |
|
|
|
|
BeanUtil.copy(parcelListEntity,newNoOrderPackage); |
|
|
|
|
newNoOrderPackage.setId(null); |
|
|
|
|
newNoOrderPackage.setCreateUser(userId); |
|
|
|
|
newNoOrderPackage.setUpdateUser(userId); |
|
|
|
|
newNoOrderPackage.setWarehouseId(warehouseId); |
|
|
|
|
newNoOrderPackage.setWarehouse(warehouseName); |
|
|
|
|
newNoOrderPackage.setStockArticleId(finalOrderId); |
|
|
|
@ -3626,13 +3668,48 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
newParcelListEntities.add(newNoOrderPackage); |
|
|
|
|
orderPackageCodes.add(p.getScanCode()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer isAbnormal = 0; |
|
|
|
|
String remark = "正常卸车"; |
|
|
|
|
p.setScanStatus("2"); |
|
|
|
|
p.setUnloadNodeId(warehouseId); |
|
|
|
|
p.setUnloadNodeName(warehouseName); |
|
|
|
|
p.setUnloadAbnormal(0); |
|
|
|
|
Long finalNodeId = p.getFinalNodeId(); |
|
|
|
|
if(!finalNodeId.equals(warehouseId)){ |
|
|
|
|
isAbnormal = 1; |
|
|
|
|
remark = "卸车仓库与目的仓不一致,异常卸车"; |
|
|
|
|
} |
|
|
|
|
p.setUnloadAbnormal(isAbnormal); |
|
|
|
|
p.setUnloadNum(1); |
|
|
|
|
p.setUnloadUserName(nickName); |
|
|
|
|
p.setRemark(remark); |
|
|
|
|
updateScanEntityList.add(p); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TrunklineCarsUnloadLogEntity entity = new TrunklineCarsUnloadLogEntity(); |
|
|
|
|
entity.setTenantId(tenantId); |
|
|
|
|
entity.setCreateUser(userId); |
|
|
|
|
entity.setUpdateUser(userId); |
|
|
|
|
entity.setCreateDept(deptId); |
|
|
|
|
entity.setCreateTime(date); |
|
|
|
|
entity.setUpdateTime(date); |
|
|
|
|
entity.setWarehouseId(warehouseId); |
|
|
|
|
entity.setWarehouseName(warehouseName); |
|
|
|
|
entity.setLoadId(loadId); |
|
|
|
|
entity.setLoadCode(carsLoadEntity.getCarsNo()); |
|
|
|
|
entity.setWaybillId(p.getWaybillId()); |
|
|
|
|
entity.setWaybillNo(p.getWaybillNo()); |
|
|
|
|
entity.setOrderCode(p.getOrderCode()); |
|
|
|
|
entity.setScanCode(p.getScanCode()); |
|
|
|
|
entity.setNum(p.getUnloadNum()); |
|
|
|
|
entity.setType(p.getType()); |
|
|
|
|
entity.setIsData(p.getIsData()); |
|
|
|
|
entity.setIsAbnormal(isAbnormal); |
|
|
|
|
entity.setFromWarehouseId(p.getFromWarehouseId()); |
|
|
|
|
entity.setLoadScanId(p.getId()); |
|
|
|
|
entity.setRemark(remark); |
|
|
|
|
unloadLogList.add(entity); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -3642,6 +3719,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
trunklineCarsLoadScanService.updateBatchById(updateScanEntityList); |
|
|
|
|
|
|
|
|
|
carsLoadAsyncService.savaUnloadLogBatch(unloadLogList); |
|
|
|
|
// trunklineCarsUnloadLogService.savaUnloadLogBatch(unloadLogList);
|
|
|
|
|
|
|
|
|
|
//需要解托下架的包件嘛
|
|
|
|
|
unbingTrayAndDelAllocationPackages.keySet().forEach(w -> { |
|
|
|
|
List<String> list = unbingTrayAndDelAllocationPackages.get(w); |
|
|
|
|