|
|
|
@ -1306,10 +1306,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
newStockArticleEntity.setOrderReceiveStatus("20"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(reservationStatus.equals("30")){ |
|
|
|
|
if("30".equals(reservationStatus)){ |
|
|
|
|
newStockArticleEntity.setReservationStatus("20"); |
|
|
|
|
} |
|
|
|
|
if(orderStatus.equals("80")){ |
|
|
|
|
if("80".equals(orderStatus)){ |
|
|
|
|
newStockArticleEntity.setOrderStatus("70"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1400,7 +1400,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("messageId", CommonUtil.getUUID()); |
|
|
|
|
map.put("messageData", jsonObject); |
|
|
|
|
map.put("createTime", new Date().getTime()); |
|
|
|
|
map.put("createTime", System.currentTimeMillis()); |
|
|
|
|
map.put("flagType", "TrunklineUnloadConfirm"); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING, map); |
|
|
|
|
|
|
|
|
@ -2397,12 +2397,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer unloadNum = trunklineCarsLoadScanEntity.getUnloadNum(); |
|
|
|
|
String scanStatus = trunklineCarsLoadScanEntity.getScanStatus(); |
|
|
|
|
Long carsLoadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
if(unloadNum == num){ |
|
|
|
|
if(Objects.equals(unloadNum, num)){ |
|
|
|
|
orderPackageCodes.add(scanCode); |
|
|
|
|
}else{ |
|
|
|
|
//未卸车包件
|
|
|
|
|
if(scanStatus.equals("1")){ |
|
|
|
|
if(deliveryType.equals("2")){ |
|
|
|
|
if("1".equals(scanStatus)){ |
|
|
|
|
if("2".equals(deliveryType)){ |
|
|
|
|
noUnloadOrderPackageCodes.add(scanCode); |
|
|
|
|
noUnloadOrderPackageScanIds.add(carsLoadScanId); |
|
|
|
|
} |
|
|
|
@ -2434,7 +2434,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<TrunklineScanZeroDetailVO> zeroDetailVOS = zeroDetailVOMap.get(packageId); |
|
|
|
|
Integer lNum = zeroDetailVOS.stream().mapToInt(t -> Objects.nonNull(t.getLoadingNum()) ? t.getLoadingNum() : 0).sum(); |
|
|
|
|
Integer uNum = zeroDetailVOS.stream().mapToInt(t -> Objects.nonNull(t.getUnloadNum()) ? t.getUnloadNum() : 0).sum(); |
|
|
|
|
if(uNum != lNum){ |
|
|
|
|
if(!uNum.equals(lNum)){ |
|
|
|
|
int diff = lNum - uNum; |
|
|
|
|
distributionParcelListClient.addZeroQuantity(packageId, diff); |
|
|
|
|
distributionParcelNumberClient.addHandleQuantity(packageId,diff); |
|
|
|
@ -6728,7 +6728,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405, "配载计划最终节点信息不存在"); |
|
|
|
|
} |
|
|
|
|
String unloadStatus = endLoadLineEntity.getUnloadStatus(); |
|
|
|
|
if (!unloadStatus.equals("2")) { |
|
|
|
|
if (!"2".equals(unloadStatus)) { |
|
|
|
|
log.warn("#################costShareByLoadId: 配载计划最终节点还未卸车确认 loadId={}", loadId); |
|
|
|
|
return R.fail(405, "配载计划最终节点还未卸车确认"); |
|
|
|
|
} |
|
|
|
@ -6892,7 +6892,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String orderCode = carsLoadScanEntity.getOrderCode(); |
|
|
|
|
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); |
|
|
|
|
DistributionStockArticleEntity stockArticle = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); |
|
|
|
|
if(unloadNum != num){ |
|
|
|
|
if(!Objects.equals(unloadNum, num)){ |
|
|
|
|
int diff = num - unloadNum; |
|
|
|
|
distributionStockArticleClient.addHandQuantity(stockArticle.getId(), diff); |
|
|
|
|
} |
|
|
|
@ -6995,7 +6995,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
map.put("messageId", CommonUtil.getUUID()); |
|
|
|
|
map.put("logId", msgId); |
|
|
|
|
map.put("messageData", jsonMsg); |
|
|
|
|
map.put("createTime", new Date().getTime()); |
|
|
|
|
map.put("createTime", System.currentTimeMillis()); |
|
|
|
|
map.put("flagType", "OrderStatusLog"); |
|
|
|
|
//将消息携带绑定键值
|
|
|
|
|
rabbitTemplate.convertAndSend(exchange, routing, map, new CorrelationData(msgId)); |
|
|
|
@ -7063,7 +7063,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
map.put("messageId", CommonUtil.getUUID()); |
|
|
|
|
map.put("logId", msgId); |
|
|
|
|
map.put("messageData", jsonMsg); |
|
|
|
|
map.put("createTime", new Date().getTime()); |
|
|
|
|
map.put("createTime", System.currentTimeMillis()); |
|
|
|
|
map.put("flagType", "OrderStatusLog"); |
|
|
|
|
//将消息携带绑定键值
|
|
|
|
|
rabbitTemplate.convertAndSend(exchange, routing, map, new CorrelationData(msgId)); |
|
|
|
@ -7090,7 +7090,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<LoadingDetailExportVO> loadingDetailExportVOS = trunklineCarsLoadScanService.loadingDetailExport(loadCarsDTO); |
|
|
|
|
|
|
|
|
|
//把records中type等于2的id放入一个集合
|
|
|
|
|
List<Long> scanLoadIds = loadingDetailExportVOS.stream().filter(item -> item.getType().equals("零担")).map(LoadingDetailExportVO::getId).collect(Collectors.toList()); |
|
|
|
|
List<Long> scanLoadIds = loadingDetailExportVOS.stream().filter(item -> "零担".equals(item.getType())).map(LoadingDetailExportVO::getId).collect(Collectors.toList()); |
|
|
|
|
if(CollUtil.isNotEmpty(scanLoadIds)){ |
|
|
|
|
List<TrunklineScanZeroDetailVO> scanZeroDetailVOS = scanZeroDetailService.findListByCarsLoadScanIds(scanLoadIds); |
|
|
|
|
//把scanZeroDetailVOS通过scanId进行分组
|
|
|
|
@ -7391,7 +7391,9 @@ 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; |
|
|
|
|
if(i < 0) { |
|
|
|
|
i = 0; |
|
|
|
|
} |
|
|
|
|
trunklineCarsLoadVO.setStockCarsNum(i); |
|
|
|
|
trunklineCarsLoadVO.setLoadScanOrderList(loadScanOrderList); |
|
|
|
|
trunklineCarsLoadVO.setZeroList(zeroList); |
|
|
|
|