|
|
@ -286,7 +286,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
las = true; |
|
|
|
las = true; |
|
|
|
//修改
|
|
|
|
//修改
|
|
|
|
this.updateById(distrilbutionBillLading); |
|
|
|
|
|
|
|
if (!distrilbutionBillLading.getBillPackageEntityList().isEmpty() || !distrilbutionBillLading.getUnBillPackageEntityList().isEmpty()) { |
|
|
|
if (!distrilbutionBillLading.getBillPackageEntityList().isEmpty() || !distrilbutionBillLading.getUnBillPackageEntityList().isEmpty()) { |
|
|
|
//修改新增包件
|
|
|
|
//修改新增包件
|
|
|
|
//todo
|
|
|
|
//todo
|
|
|
@ -316,26 +315,36 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
List<DistributionDeliveryChargeEntity> list = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() |
|
|
|
List<DistributionDeliveryChargeEntity> list = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() |
|
|
|
.eq(DistributionDeliveryChargeEntity::getBillLading, distrilbutionBillLading.getId()) |
|
|
|
.eq(DistributionDeliveryChargeEntity::getBillLading, distrilbutionBillLading.getId()) |
|
|
|
); |
|
|
|
); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
// List<DistributionDeliveryChargeEntity> deliveryChargeEntities = new ArrayList<>();
|
|
|
|
list.forEach(i -> { |
|
|
|
// if (!list.isEmpty()) {
|
|
|
|
String s = distrilbutionBillLading.getFei().get(i.getCost()); |
|
|
|
// list.forEach(i -> {
|
|
|
|
if (StringUtils.isNotBlank(s)) { |
|
|
|
// String s = distrilbutionBillLading.getFei().get(i.getCost());
|
|
|
|
//修改
|
|
|
|
// if (StringUtils.isNotBlank(s)) {
|
|
|
|
DistributionDeliveryChargeEntity distributionDeliveryCharge = new DistributionDeliveryChargeEntity(); |
|
|
|
// //修改
|
|
|
|
distributionDeliveryCharge.setId(i.getId()); |
|
|
|
// DistributionDeliveryChargeEntity distributionDeliveryCharge = new DistributionDeliveryChargeEntity();
|
|
|
|
distributionDeliveryCharge.setMoney(new BigDecimal(s)); |
|
|
|
// distributionDeliveryCharge.setId(i.getId());
|
|
|
|
distributionDeliveryChargeService.updateById(distributionDeliveryCharge); |
|
|
|
// distributionDeliveryCharge.setMoney(new BigDecimal(s));
|
|
|
|
distrilbutionBillLading.getFei().remove(i.getCost()); |
|
|
|
// distributionDeliveryCharge.setCost(i.getCost());
|
|
|
|
} else { |
|
|
|
// deliveryChargeEntities.add(distributionDeliveryCharge);
|
|
|
|
//删除
|
|
|
|
//// distributionDeliveryChargeService.updateById(distributionDeliveryCharge);
|
|
|
|
distributionDeliveryChargeService.removeById(i.getId()); |
|
|
|
// distrilbutionBillLading.getFei().remove(i.getCost());
|
|
|
|
} |
|
|
|
// } else {
|
|
|
|
}); |
|
|
|
// //删除
|
|
|
|
} |
|
|
|
// distributionDeliveryChargeService.removeById(i.getId());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (!deliveryChargeEntities.isEmpty()){
|
|
|
|
|
|
|
|
// distributionDeliveryChargeService.updateBatchById(deliveryChargeEntities);
|
|
|
|
|
|
|
|
// }
|
|
|
|
//修改订单数据
|
|
|
|
//修改订单数据
|
|
|
|
if (!distrilbutionBillLading.getStockArticleList().isEmpty()) { |
|
|
|
if (!distrilbutionBillLading.getStockArticleList().isEmpty()) { |
|
|
|
boolean flag = handleOrder(distrilbutionBillLading); |
|
|
|
boolean flag = handleOrder(distrilbutionBillLading); |
|
|
|
// boolean order = getOrder(distrilbutionBillLading.getStockArticleList(), distrilbutionBillLading.getId());
|
|
|
|
// boolean order = getOrder(distrilbutionBillLading.getStockArticleList(), distrilbutionBillLading.getId());
|
|
|
|
|
|
|
|
String orderIds = distrilbutionBillLading.getStockArticleList().stream().map(DistributionStockArticleEntity::getId).map(String::valueOf).collect(Collectors.joining(",")); |
|
|
|
|
|
|
|
distrilbutionBillLading.setStockArticleId(orderIds); |
|
|
|
|
|
|
|
this.updateById(distrilbutionBillLading); |
|
|
|
|
|
|
|
|
|
|
|
if (!flag) { |
|
|
|
if (!flag) { |
|
|
|
throw new ServiceException("修改失败!!"); |
|
|
|
throw new ServiceException("修改失败!!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -453,6 +462,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
updateStockBill(distrilbutionBillLading); |
|
|
|
updateStockBill(distrilbutionBillLading); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//修改自提单信息
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//设置lockey
|
|
|
|
//设置lockey
|
|
|
@ -841,6 +851,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
|
|
|
|
|
|
|
|
//添加费用
|
|
|
|
//添加费用
|
|
|
|
if (!distrilbutionBillLading.getFei().isEmpty()) { |
|
|
|
if (!distrilbutionBillLading.getFei().isEmpty()) { |
|
|
|
|
|
|
|
//删除和自提相关的所有费用
|
|
|
|
|
|
|
|
distributionDeliveryChargeService.update(Wrappers.<DistributionDeliveryChargeEntity>update().lambda() |
|
|
|
|
|
|
|
.eq(DistributionDeliveryChargeEntity::getBillLading,distrilbutionBillLading.getId()) |
|
|
|
|
|
|
|
.set(DistributionDeliveryChargeEntity::getIsDeleted,1) |
|
|
|
|
|
|
|
); |
|
|
|
List<DistributionDeliveryChargeEntity> listEntity = new ArrayList<>(); |
|
|
|
List<DistributionDeliveryChargeEntity> listEntity = new ArrayList<>(); |
|
|
|
distrilbutionBillLading.getFei().forEach((k, v) -> { |
|
|
|
distrilbutionBillLading.getFei().forEach((k, v) -> { |
|
|
|
DistributionDeliveryChargeEntity distributionDeliveryCharge = new DistributionDeliveryChargeEntity(); |
|
|
|
DistributionDeliveryChargeEntity distributionDeliveryCharge = new DistributionDeliveryChargeEntity(); |
|
|
@ -1557,9 +1572,13 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
if (!orderCodes.isEmpty()){ |
|
|
|
if (!orderCodes.isEmpty()){ |
|
|
|
String collect = orderCodes.stream().distinct().collect(Collectors.joining(",")); |
|
|
|
String collect = orderCodes.stream().distinct().collect(Collectors.joining(",")); |
|
|
|
distributionStockArticleService.maintenanceOrderInfo(collect,myCurrentWarehouse.getId()); |
|
|
|
distributionStockArticleService.maintenanceOrderInfo(collect,myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = new DistrilbutionBillLadingEntity();
|
|
|
|
|
|
|
|
// distrilbutionBillLadingEntity.setId(distrilbutionBillLading.getId());
|
|
|
|
|
|
|
|
// String stockArticleIds = stockArticleList.stream().map(DistributionStockArticleEntity::getId).map(String::valueOf).collect(Collectors.joining(","));
|
|
|
|
|
|
|
|
// log.error("##################自提单发生修改,stockArticleIds:{}",stockArticleIds);
|
|
|
|
|
|
|
|
// distrilbutionBillLadingEntity.setStockArticleId(stockArticleIds);
|
|
|
|
|
|
|
|
// this.updateById(distrilbutionBillLadingEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|