|
|
@ -822,8 +822,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//TODO
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
// warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return R.status(true); |
|
|
|
return R.status(true); |
|
|
|
} |
|
|
|
} |
|
|
@ -1335,8 +1334,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
//维护客户状态
|
|
|
|
//维护客户状态
|
|
|
|
distributionReservationService.maintenanceReservationInfo(reservationId); |
|
|
|
distributionReservationService.maintenanceReservationInfo(reservationId); |
|
|
|
//备货库位下架
|
|
|
|
//备货库位下架
|
|
|
|
//TODO
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
// warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
|
|
|
|
|
|
|
|
return R.success("操作成功"); |
|
|
|
return R.success("操作成功"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -2581,8 +2579,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
//TODO
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
// warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (Func.isEmpty(collect)) { |
|
|
|
} else if (Func.isEmpty(collect)) { |
|
|
|
//这里就需要对该包件信息是否属于该配送计划进行判定。如果属于该配送计划则是串货。不是那么则需要提示是否异常签收或者返回的操作
|
|
|
|
//这里就需要对该包件信息是否属于该配送计划进行判定。如果属于该配送计划则是串货。不是那么则需要提示是否异常签收或者返回的操作
|
|
|
@ -3207,8 +3204,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("remark","异常签收下架"); |
|
|
|
jsonObject.put("remark","异常签收下架"); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
//TODO
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
// warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
|
|
|
|
|
|
|
|
// Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
|
|
|
|
// Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
|
|
|
|
if (Func.isEmpty(loadscanEntity)) { |
|
|
|
if (Func.isEmpty(loadscanEntity)) { |
|
|
|
//更新装车包件数和签收包件数
|
|
|
|
//更新装车包件数和签收包件数
|
|
|
@ -3669,8 +3665,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
//TODO
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
// warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//进行库存品包件状态维护
|
|
|
|
//进行库存品包件状态维护
|
|
|
|
DisStockListDetailEntity disStockListDetailEntity = new DisStockListDetailEntity(); |
|
|
|
DisStockListDetailEntity disStockListDetailEntity = new DisStockListDetailEntity(); |
|
|
@ -4855,12 +4850,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - newLoadscaninvnEntity.getPackageNub()); |
|
|
|
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - newLoadscaninvnEntity.getPackageNub()); |
|
|
|
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + newLoadscaninvnEntity.getPackageNub()); |
|
|
|
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + newLoadscaninvnEntity.getPackageNub()); |
|
|
|
distributionStockListService.updateById(stockListEntity); |
|
|
|
distributionStockListService.updateById(stockListEntity); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//不存在装车数据 这里需要进行装车数据的补录
|
|
|
|
|
|
|
|
detailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
|
|
|
detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
|
|
|
disStockListDetailService.updateById(detailEntity); |
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put("code",detailEntity.getStockPackageCode()); |
|
|
|
jsonObject.put("code",detailEntity.getStockPackageCode()); |
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
@ -4870,6 +4859,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
jsonObject.put("remark","批量签收下架"); |
|
|
|
jsonObject.put("remark","批量签收下架"); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//不存在装车数据 这里需要进行装车数据的补录
|
|
|
|
|
|
|
|
detailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
|
|
|
detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
|
|
|
disStockListDetailService.updateById(detailEntity); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.error("################库存品未进行备货操作+{}", detailEntities); |
|
|
|
log.error("################库存品未进行备货操作+{}", detailEntities); |
|
|
|
return R.fail("库存品未进行备货操作"); |
|
|
|
return R.fail("库存品未进行备货操作"); |
|
|
@ -4931,6 +4925,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); |
|
|
|
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); |
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
|
|
|
jsonObject.put("code",parcelListEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
jsonObject.put("taskId",distributionSignforEntity.getReservationId()); |
|
|
|
|
|
|
|
jsonObject.put("type",3); |
|
|
|
|
|
|
|
jsonObject.put("num",parcelNumberEntity.getReservationNum() - distributionLoadscanEntity.getLoadedNub()); |
|
|
|
|
|
|
|
jsonObject.put("remark","批量签收下架"); |
|
|
|
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//不存在装车数据
|
|
|
|
//不存在装车数据
|
|
|
|
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); |
|
|
@ -5069,7 +5071,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
} |
|
|
|
} |
|
|
|
distributionLoadscanService.save(loadscanEntity); |
|
|
|
distributionLoadscanService.save(loadscanEntity); |
|
|
|
packageLockIds.add(loadscanEntity.getPackageId()); |
|
|
|
packageLockIds.add(loadscanEntity.getPackageId()); |
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
|
|
|
jsonObject.put("code",parcelListEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
jsonObject.put("taskId",distributionSignforEntity.getReservationId()); |
|
|
|
|
|
|
|
jsonObject.put("type",3); |
|
|
|
|
|
|
|
jsonObject.put("num",1); |
|
|
|
|
|
|
|
jsonObject.put("remark","批量签收下架"); |
|
|
|
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//存在装车数据
|
|
|
|
//存在装车数据
|
|
|
@ -5090,21 +5099,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
loadscanEntities.setSigningTime(signingTime); |
|
|
|
loadscanEntities.setSigningTime(signingTime); |
|
|
|
distributionLoadscanService.updateById(loadscanEntities); |
|
|
|
distributionLoadscanService.updateById(loadscanEntities); |
|
|
|
packageLockIds.add(loadscanEntities.getPackageId()); |
|
|
|
packageLockIds.add(loadscanEntities.getPackageId()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// distributionAsyncService.sendFactory(parcelListEntity, simpleDateFormat.format(new Date()), reservationEntity.getId(), reservationEntity.getReservationCode(), myCurrentWarehouse.getName(), user.getNickName());
|
|
|
|
// distributionAsyncService.sendFactory(parcelListEntity, simpleDateFormat.format(new Date()), reservationEntity.getId(), reservationEntity.getReservationCode(), myCurrentWarehouse.getName(), user.getNickName());
|
|
|
|
packageIds.add(parcelListEntity.getId()); |
|
|
|
packageIds.add(parcelListEntity.getId()); |
|
|
|
orderCodes.add(parcelListEntity.getOrderCode()); |
|
|
|
orderCodes.add(parcelListEntity.getOrderCode()); |
|
|
|
packageCodes.add(parcelListEntity.getOrderPackageCode()); |
|
|
|
packageCodes.add(parcelListEntity.getOrderPackageCode()); |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
|
|
|
jsonObject.put("code",parcelListEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
jsonObject.put("taskId",distributionSignforEntity.getReservationId()); |
|
|
|
|
|
|
|
jsonObject.put("type",1); |
|
|
|
|
|
|
|
jsonObject.put("num",1); |
|
|
|
|
|
|
|
jsonObject.put("remark","批量签收下架"); |
|
|
|
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5787,7 +5787,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
reservationMap = reservationZeroPackageEntity.stream().collect(Collectors.groupingBy(DistributionReservationZeroPackageEntity::getParcelListId)); |
|
|
|
reservationMap = reservationZeroPackageEntity.stream().collect(Collectors.groupingBy(DistributionReservationZeroPackageEntity::getParcelListId)); |
|
|
|
} |
|
|
|
} |
|
|
|
int sum = parcelNumberDTOS.stream().mapToInt(DistributionParcelNumberDTO::getSigningNum).sum(); |
|
|
|
int sum = parcelNumberDTOS.stream().mapToInt(DistributionParcelNumberDTO::getSigningNum).sum(); |
|
|
|
|
|
|
|
List<JSONObject> jsonObjects = new ArrayList<>(); |
|
|
|
for (DistributionParcelNumberDTO parcelNumberDTO : parcelNumberDTOS) { |
|
|
|
for (DistributionParcelNumberDTO parcelNumberDTO : parcelNumberDTOS) { |
|
|
|
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = reservationMap.get(parcelNumberDTO.getParcelListId()); |
|
|
|
List<DistributionReservationZeroPackageEntity> zeroPackageEntities = reservationMap.get(parcelNumberDTO.getParcelListId()); |
|
|
|
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda() |
|
|
|
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda() |
|
|
@ -5812,10 +5812,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
if (parcelNumberDTO.getSigningNum() > distributionReservationZeroPackageEntity.getQuantity()) { |
|
|
|
if (parcelNumberDTO.getSigningNum() > distributionReservationZeroPackageEntity.getQuantity()) { |
|
|
|
log.info("#############零担签收超过计划数量ParcelListId:{},计划:{}录入,:{}", parcelNumberDTO.getParcelListId(), distributionReservationZeroPackageEntity.getQuantity(), parcelNumberDTO.getSigningNum()); |
|
|
|
log.info("#############零担签收超过计划数量ParcelListId:{},计划:{}录入,:{}", parcelNumberDTO.getParcelListId(), distributionReservationZeroPackageEntity.getQuantity(), parcelNumberDTO.getSigningNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int a = 0; |
|
|
|
if (distributionLoadscanEntity.getLoadedNub() < parcelNumberDTO.getSigningNum()) { |
|
|
|
if (distributionLoadscanEntity.getLoadedNub() < parcelNumberDTO.getSigningNum()) { |
|
|
|
//将装车和签收进行统一数量
|
|
|
|
//将装车和签收进行统一数量
|
|
|
|
distributionLoadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum()); |
|
|
|
distributionLoadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum()); |
|
|
|
distributionLoadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum()); |
|
|
|
distributionLoadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum()); |
|
|
|
|
|
|
|
a = parcelNumberDTO.getSigningNum() - distributionLoadscanEntity.getLoadedNub(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
@ -5835,6 +5837,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
signingNumber += distributionLoadscanEntity.getReceivedQuantity(); |
|
|
|
signingNumber += distributionLoadscanEntity.getReceivedQuantity(); |
|
|
|
//进行签收数量的统计
|
|
|
|
//进行签收数量的统计
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
|
|
|
jsonObject.put("code",parcelListEntity.getOrderCode()); |
|
|
|
|
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
jsonObject.put("taskId",distributionLoadscanEntity.getReservationId()); |
|
|
|
|
|
|
|
jsonObject.put("type",3); |
|
|
|
|
|
|
|
jsonObject.put("num",a); |
|
|
|
|
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
|
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.info("#############零担签收存在多个装车记录ParcelListId:{}", parcelNumberDTO.getParcelListId()); |
|
|
|
log.info("#############零担签收存在多个装车记录ParcelListId:{}", parcelNumberDTO.getParcelListId()); |
|
|
|
} |
|
|
|
} |
|
|
@ -5888,17 +5898,15 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
handQuantity = distributionParcelNumberEntity.getHandQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
handQuantity = distributionParcelNumberEntity.getHandQuantity() - parcelNumberDTO.getSigningNum(); |
|
|
|
outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
signinQuantity = distributionParcelNumberEntity.getSigninQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
signinQuantity = distributionParcelNumberEntity.getSigninQuantity() + parcelNumberDTO.getSigningNum(); |
|
|
|
List<JSONObject> jsonObjects = new ArrayList<>(); |
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put("code",parcelListEntity.getOrderCode()); |
|
|
|
jsonObject.put("code",parcelListEntity.getOrderCode()); |
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
jsonObject.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
jsonObject.put("taskId",loadscanEntity.getReservationId()); |
|
|
|
jsonObject.put("taskId",loadscanEntity.getReservationId()); |
|
|
|
jsonObject.put("type",3); |
|
|
|
jsonObject.put("type",3); |
|
|
|
jsonObject.put("num",1); |
|
|
|
jsonObject.put("num",loadscanEntity.getLoadedNub()); |
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
jsonObject.put("remark","签收下架"); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
jsonObjects.add(jsonObject); |
|
|
|
//TODO
|
|
|
|
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); |
|
|
|
// warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//维护订单
|
|
|
|
//维护订单
|
|
|
|
if (outboundQuantity.equals(distributionParcelNumberEntity.getQuantity())) { |
|
|
|
if (outboundQuantity.equals(distributionParcelNumberEntity.getQuantity())) { |
|
|
@ -5906,7 +5914,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
} |
|
|
|
} |
|
|
|
if (handQuantity == 0) { |
|
|
|
if (handQuantity == 0) { |
|
|
|
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (signingNumber.equals(distributionParcelNumberEntity.getQuantity())) { |
|
|
|
if (signingNumber.equals(distributionParcelNumberEntity.getQuantity())) { |
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|