Browse Source

增加查询配送装车存在装车件数无法取消限制

dist.1.3.0
汤建军 9 months ago
parent
commit
ec02cb14c2
  1. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -6652,6 +6652,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<Map<String, Object>> mapList = distributionReservationMapper.getCategoryByStockArticleIdAndReservationId(stockArticleId, reservationId);
Map<String, Object> numObj = new HashMap<>();
Integer tn = 0;
Integer sn = 0;
Set<String> set = totalDetail.keySet();
for (String key : set) {
if (!"合计数量".equals(key)) {
@ -6661,6 +6662,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Long num = (Long) m.get("num");
Long signNum = (Long) m.get("aaa");
if (thirdProduct.equals(key)) {
sn += num.intValue();
numObj.put(key, num);
tn = tn + num.intValue();
}
@ -6670,11 +6672,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
orderMap.put("合计数量", tn);
orderMap.put("小计", sn);
orderMap.put("产品明细", numObj);
orderMap.put("产品明细长度", numObj.size());
Map<String, Object> info = (Map<String, Object>) total.get("产品明细");
//通过订单id和预约id查询对应包件的物料信息
List<String> materialNameStrList = distributionReservationMapper.getMaterialNameByStockArticleIdAndReservationId(stockArticleId, reservationId);
String materialNameStr = StringUtils.join(materialNameStrList, ",");
@ -7213,6 +7214,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
log.info(method + "存在装车数据:{}", reservationCodes);
return R.fail(deliveryListEntity.getTrainNumber() + "存在装车包件!!!");
}
DistributionLoadingNumDTO deliveryLoadingNum = distributionDeliveryListMapper.selectDeliveryLoadingNum(deliveryId);
if (deliveryLoadingNum.getPackageLoadingQuantity()+deliveryLoadingNum.getInventoryLoadingQuantity() > 0){
log.info(method + "存在装车数据 装车件数>>>>>>>>>>:{}", (deliveryLoadingNum.getPackageLoadingQuantity()+deliveryLoadingNum.getInventoryLoadingQuantity()));
return R.fail(deliveryListEntity.getTrainNumber() + "存在装车包件!!!");
}
List<Long> ids = reservationEntities.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList());
List<DistributionLoadscanEntity> packageList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()

Loading…
Cancel
Save