|
|
|
@ -231,7 +231,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
log.warn("#############startCarByLoadId: 车辆已发车 nodeStatus={}",nodeStatus); |
|
|
|
|
throw new CustomerException(405,"车辆已发车"); |
|
|
|
|
} |
|
|
|
|
if(Objects.isNull(startDate)){ |
|
|
|
|
if(!Objects.isNull(startDate)){ |
|
|
|
|
log.warn("#############startCarByLoadId: 车辆已发车 nodeStatus={}",nodeStatus); |
|
|
|
|
throw new CustomerException(405,"车辆已发车"); |
|
|
|
|
} |
|
|
|
@ -2061,6 +2061,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
for (TrunklineCarsLoadVO trunklineCarsLoadVO:records){ |
|
|
|
|
String loadStatus = trunklineCarsLoadVO.getLoadStatus(); |
|
|
|
|
String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus); |
|
|
|
|
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber-unloadNumber); |
|
|
|
|
trunklineCarsLoadVO.setLoadStatus(value); |
|
|
|
|
} |
|
|
|
|
pageList.setRecords(records); |
|
|
|
@ -2449,7 +2452,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405,"打托失败"); |
|
|
|
|
} |
|
|
|
|
orders = orderCode; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
@ -3325,6 +3327,22 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.success("装车完成"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R findLoadZeroList(LoadCarsDTO loadCarsDTO) { |
|
|
|
|
Long loadId = loadCarsDTO.getLoadId(); |
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if(Objects.isNull(carsLoadEntity)){ |
|
|
|
|
log.warn("##########findLoadZeroList: 查询配载计划的零担卸车数据"); |
|
|
|
|
return R.fail(405,"查询配载计划的零担卸车数据"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> ls = trunklineCarsLoadScanService.findNotUnloadZeroList(loadId,warehouseId); |
|
|
|
|
|
|
|
|
|
return R.data(ls); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) { |
|
|
|
|
log.info("##############loadingTrayInfo: 查询托盘的货物信息"); |
|
|
|
@ -3429,6 +3447,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
log.warn("##################findCarsLoadingDetail: 配载or三方计划不存在 loadId={}",loadId); |
|
|
|
|
return R.fail(405,"计划不存在"); |
|
|
|
|
} |
|
|
|
|
Integer realLoadingNumber = carsLoadEntity.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = carsLoadEntity.getUnloadNumber(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
carsLoadEntity.setRealLoadingNumber(realLoadingNumber - unloadNumber); |
|
|
|
|
|
|
|
|
|
//计划订单包件数
|
|
|
|
|
List<LoadScanOrderVO> loadScanOrderList = trunklineCarsOrderService.findLoadScanPackageWithOrder(loadId,warehouseId); |
|
|
|
@ -3568,13 +3591,28 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long loadId = trunklineCarsLoadVO.getId(); |
|
|
|
|
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); |
|
|
|
|
Integer sort = carsLoadLineEntity.getSort(); |
|
|
|
|
String nodeStatus1 = carsLoadLineEntity.getNodeStatus(); |
|
|
|
|
TrunklineCarsLoadLineEntity upCarsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndSort(loadId, sort - 1); |
|
|
|
|
String nodeStatus = upCarsLoadLineEntity.getNodeStatus(); |
|
|
|
|
if("20".equals(nodeStatus)){ |
|
|
|
|
trunklineCarsLoadVO.setLastStartCarStatus(1); |
|
|
|
|
}else{ |
|
|
|
|
trunklineCarsLoadVO.setLastStartCarStatus(0); |
|
|
|
|
if(!"20".equals(nodeStatus)){ |
|
|
|
|
trunklineCarsLoadVO.setLastStartCarStatus(0); |
|
|
|
|
}else{ |
|
|
|
|
if(!"20".equals(nodeStatus1)){ |
|
|
|
|
trunklineCarsLoadVO.setLastStartCarStatus(1); |
|
|
|
|
}else{ |
|
|
|
|
trunklineCarsLoadVO.setLastStartCarStatus(0); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// if("20".equals(nodeStatus)){
|
|
|
|
|
// trunklineCarsLoadVO.setLastStartCarStatus(1);
|
|
|
|
|
// }else{
|
|
|
|
|
// trunklineCarsLoadVO.setLastStartCarStatus(0);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber-unloadNumber); |
|
|
|
|
} |
|
|
|
|
pageList.setRecords(records); |
|
|
|
|
return R.data(pageList); |
|
|
|
@ -3985,7 +4023,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
newStockArticleEntity.setOrderReceiveStatus("20"); |
|
|
|
|
newStockArticleEntity.setOrderStatus("10"); |
|
|
|
|
newStockArticleEntity.setHandQuantity(enterNun); |
|
|
|
|
newStockArticleEntity.setIncomingNum(enterNun); |
|
|
|
|
newStockArticleEntity.setIncomingNum(stockArticleEntity.getIncomingNum()); |
|
|
|
|
newStockArticleEntity.setWarehouse(basicdataWarehouseEntity.getName()); |
|
|
|
|
newStockArticleEntity.setWarehouseId(basicdataWarehouseEntity.getId()); |
|
|
|
|
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity); |
|
|
|
|
if(orderId != 0){ |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId); |
|
|
|
@ -4001,7 +4041,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
Integer handQuantity = newStockArticleEntity.getHandQuantity()+enterNun; |
|
|
|
|
Integer incomingNum = newStockArticleEntity.getIncomingNum()+enterNun; |
|
|
|
|
Integer incomingNum = newStockArticleEntity.getIncomingNum(); |
|
|
|
|
Integer totalNumber = newStockArticleEntity.getTotalNumber(); |
|
|
|
|
|
|
|
|
|
if(incomingNum == totalNumber){ |
|
|
|
@ -4081,15 +4121,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405,"配载计划信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer planUnloadNum = 0; |
|
|
|
|
|
|
|
|
|
//查询已扫描卸车的包件
|
|
|
|
|
List<UnloadScanOrderVO> unloadScanOrderList = trunklineCarsLoadScanService.findPackageWithOrderList(loadId,warehouseId); |
|
|
|
|
for (UnloadScanOrderVO unloadScanOrderVO : unloadScanOrderList) { |
|
|
|
|
Integer loadingNum = unloadScanOrderVO.getLoadingNum(); |
|
|
|
|
planUnloadNum = planUnloadNum +loadingNum; |
|
|
|
|
String waybillNo = unloadScanOrderVO.getWaybillNo(); |
|
|
|
|
String orderCode = unloadScanOrderVO.getOrderCode(); |
|
|
|
|
Integer totalNumber = trunklineAdvanceDetailService.findTotalNumByOrderCode(orderCode); |
|
|
|
|
unloadScanOrderVO.setTotalNumber(totalNumber); |
|
|
|
|
List<UnloadPackageVO> unloadPackageList = trunklineCarsLoadScanService.findUnloadPackageList(loadId,warehouseId,waybillNo,orderCode); |
|
|
|
|
unloadScanOrderVO.setUnloadPackageList(unloadPackageList); |
|
|
|
|
} |
|
|
|
@ -4098,7 +4137,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<UnloadZeroVO> zeroList = trunklineCarsOrderService.findUnloadZeroList(loadId,warehouseId); |
|
|
|
|
for (UnloadZeroVO unloadZeroVO : zeroList) { |
|
|
|
|
Integer loadingNum = unloadZeroVO.getLoadingNum(); |
|
|
|
|
planUnloadNum = planUnloadNum +loadingNum; |
|
|
|
|
String waybillNo = unloadZeroVO.getWaybillNo(); |
|
|
|
|
String orderCode = unloadZeroVO.getOrderCode(); |
|
|
|
|
List<UnloadPackageVO> unloadPackageList = trunklineCarsLoadScanService.findUnloadPackageList(loadId,warehouseId,waybillNo,orderCode); |
|
|
|
@ -4108,14 +4146,22 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//查询异常列表
|
|
|
|
|
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("load_id",loadId) |
|
|
|
|
.eq("warehouse_id",warehouseId) |
|
|
|
|
.eq("unload_node_id",warehouseId) |
|
|
|
|
.eq("unload_abnormal",1); |
|
|
|
|
List<TrunklineCarsLoadScanEntity> exceptionList = trunklineCarsLoadScanService.list(queryWrapper); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadVO trunklineCarsLoadVO = new TrunklineCarsLoadVO(); |
|
|
|
|
|
|
|
|
|
BeanUtil.copy(carsLoadEntity,trunklineCarsLoadVO); |
|
|
|
|
//查询计划卸车数量
|
|
|
|
|
Integer planUnloadNum = trunklineCarsLoadScanService.findPlanUnloadNumByLoadIdAndFinalNodeId(loadId,warehouseId); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadLineEntity loadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); |
|
|
|
|
|
|
|
|
|
BeanUtil.copy(carsLoadEntity,trunklineCarsLoadVO); |
|
|
|
|
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); |
|
|
|
|
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); |
|
|
|
|
trunklineCarsLoadVO.setUnloadNumber(loadLineEntity.getUnloadNumber()); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber-unloadNumber); |
|
|
|
|
trunklineCarsLoadVO.setUnloadScanOrderList(unloadScanOrderList); |
|
|
|
|
trunklineCarsLoadVO.setUnloadZeroList(zeroList); |
|
|
|
|
trunklineCarsLoadVO.setExceptionList(exceptionList); |
|
|
|
|