|
|
|
@ -480,7 +480,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// 发车
|
|
|
|
|
if (ObjectUtil.equal(type, 1)) { |
|
|
|
|
if (ObjectUtil.isEmpty(node)) { |
|
|
|
|
if (ObjectUtil.equal(warehouseId, brand.getStartWarehouseId())) { |
|
|
|
|
if (ObjectUtil.equal(warehouseId, Long.parseLong(brand.getStartWarehouseId()))) { |
|
|
|
|
node = WorkNodeEnums.INITIAL_WAREHOUSE_DEPART; |
|
|
|
|
} else { |
|
|
|
|
node = WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART; |
|
|
|
@ -1481,6 +1481,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadEntity.setPlanLoadingNumber(0); |
|
|
|
|
carsLoadEntity.setRealLoadingNumber(0); |
|
|
|
|
carsLoadEntity.setUnloadNumber(0); |
|
|
|
|
carsLoadEntity.setStockNumber(0); |
|
|
|
|
carsLoadEntity.setAbnormalNum(0); |
|
|
|
|
carsLoadEntity.setNowWarehouseId(warehouseId); |
|
|
|
|
carsLoadEntity.setIsSettlement("1"); |
|
|
|
@ -1579,15 +1580,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadLineService.updatePlanLoadingNumberByLoadLineId(planNum, loadLineId); |
|
|
|
|
} |
|
|
|
|
carsLoadEntity.setPlanLoadingNumber(loadPlanNum); |
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
// updateById(carsLoadEntity);
|
|
|
|
|
|
|
|
|
|
//装车 卸车数量
|
|
|
|
|
Integer realLoadingNum = trunklineCarsLoadScanService.findNumByLoadId(loadId);//配载计划实际装车数量
|
|
|
|
|
Integer realUnloadingNum = trunklineCarsLoadScanService.findUnloadNumByLoadId(loadId);//配载计划实际卸车数量
|
|
|
|
|
Integer stockCarNum = trunklineCarsLoadScanService.findStockNumByLoadId(loadId);//配载计划在车件数
|
|
|
|
|
Integer abnormalNum = trunklineCarsLoadScanService.findAbnormalNumByLoadId(loadId);//配载计划装车异常数量
|
|
|
|
|
// Integer unloadAbnormalNum = trunklineCarsUnloadLogService.findAbnormalNumByLoadId(loadId);//配载计划卸车异常数量
|
|
|
|
|
carsLoadEntity.setRealLoadingNumber(realLoadingNum); |
|
|
|
|
carsLoadEntity.setUnloadNumber(realUnloadingNum); |
|
|
|
|
carsLoadEntity.setStockNumber(stockCarNum); |
|
|
|
|
carsLoadEntity.setAbnormalNum(abnormalNum); |
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
|
|
|
|
@ -4154,7 +4157,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus); |
|
|
|
|
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber); |
|
|
|
|
Integer stockCarsNum = trunklineCarsLoadVO.getStockNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(stockCarsNum); |
|
|
|
|
trunklineCarsLoadVO.setLoadStatus(value); |
|
|
|
|
} |
|
|
|
|
pageList.setRecords(records); |
|
|
|
@ -7895,7 +7899,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
JSONObject abnormalRecord = abnormalRecordClient.findListByCarsNoAndUpWarehouseId(carsNo, warehouseId); |
|
|
|
|
|
|
|
|
|
map.put("three", "当前待处理异常 " + abnormalRecord.getInteger("dealwithNum") + " 条、已处理异常 " + abnormalRecord.getInteger("noDealwithNum") + " 条"); |
|
|
|
|
if(abnormalRecord != null){ |
|
|
|
|
map.put("three", "当前待处理异常 " + abnormalRecord.getInteger("dealwithNum") + " 条、已处理异常 " + abnormalRecord.getInteger("noDealwithNum") + " 条"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.data(map); |
|
|
|
|
} |
|
|
|
@ -8124,11 +8131,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
String loadStatus = trunklineCarsLoadVO.getLoadStatus(); |
|
|
|
|
trunklineCarsLoadVO.setLoadStatus(DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus)); |
|
|
|
|
int i = realLoadingNumber - unloadNumber; |
|
|
|
|
if(i < 0) { |
|
|
|
|
i = 0; |
|
|
|
|
} |
|
|
|
|
trunklineCarsLoadVO.setStockCarsNum(i); |
|
|
|
|
// int i = realLoadingNumber - unloadNumber;
|
|
|
|
|
// if(i < 0) {
|
|
|
|
|
// i = 0;
|
|
|
|
|
// }
|
|
|
|
|
trunklineCarsLoadVO.setStockCarsNum(carsLoadEntity.getStockNumber()); |
|
|
|
|
trunklineCarsLoadVO.setLoadScanOrderList(loadScanOrderList); |
|
|
|
|
trunklineCarsLoadVO.setZeroList(zeroList); |
|
|
|
|
trunklineCarsLoadVO.setExceptionList(exceptionList); |
|
|
|
@ -8486,7 +8493,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber); |
|
|
|
|
Integer stockCarNumber = trunklineCarsLoadVO.getStockNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber); |
|
|
|
|
trunklineCarsLoadVO.setTotalLoadingNum(realLoadingNumber); |
|
|
|
|
} |
|
|
|
|
pageList.setRecords(records); |
|
|
|
@ -8920,8 +8928,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
if(isData==1){ |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
} |
|
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
|
loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
@ -9085,6 +9095,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} else { |
|
|
|
|
String scanStatus = carsLoadScanEntity.getScanStatus(); |
|
|
|
|
if(!"1".equals(scanStatus)){ |
|
|
|
|
carsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
|
log.warn("##############unloadPackage: 包件已卸车 orderPackageCode={}", orderPackageCode); |
|
|
|
|
return R.fail(405, "包件已卸车"); |
|
|
|
|
} |
|
|
|
@ -10623,8 +10636,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
BeanUtil.copy(carsLoadEntity, trunklineCarsLoadVO); |
|
|
|
|
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); |
|
|
|
|
int stockCarNumber = realLoadingNumber - unloadNumber; |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadVO.setUnloadNumber(loadLineEntity.getUnloadNumber()); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber<0?0:stockCarNumber); |
|
|
|
|
trunklineCarsLoadVO.setUnloadScanOrderList(unloadScanOrderList); |
|
|
|
|
trunklineCarsLoadVO.setUnloadZeroList(zeroList); |
|
|
|
|
trunklineCarsLoadVO.setExceptionList(exceptionList); |
|
|
|
|