Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 8 months ago
parent
commit
62b34fbd27
  1. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  2. 61
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java

29
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -616,28 +616,27 @@
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
LEFT JOIN <where>
(SELECT ldsaa.id,SUM(ldpll.quantity) AS num ldsa.order_status in ('10','20','30','70')
FROM logpm_distribution_stock_article ldsaa and ldsa.reservation_status in ('10','20')
LEFT JOIN logpm_distribution_parcel_list ldpll ON ldsaa.id = ldpll.stock_article_id AND EXISTS (
WHERE ldpll.order_package_loading_status != '20' SELECT 1
FROM logpm_distribution_parcel_list ldpll
WHERE
ldsa.id = ldpll.stock_article_id
AND ldpll.order_package_loading_status != '20'
AND ldpll.order_package_reservation_status != '20' AND ldpll.order_package_reservation_status != '20'
AND ldpll.order_package_status != '70' AND ldpll.order_package_status != '70'
AND ldpll.conditions != 2 AND ldpll.conditions != 2
AND ldsaa.warehouse_id = #{par.warehouseId}
AND ldpll.warehouse_id = #{par.warehouseId} AND ldpll.warehouse_id = #{par.warehouseId}
AND ldsaa.type_service = #{par.typeService} AND ldsa.type_service = #{par.typeService}
<if test="par.orderCode != null and par.orderCode != '' "> <if test="par.orderCode != null and par.orderCode != '' ">
and ldsaa.order_code like concat(#{par.orderCode},'%') and ldpll.order_code like concat(#{par.orderCode},'%')
</if> </if>
GROUP BY ldsaa.id GROUP BY ldpll.stock_article_id
HAVING SUM(ldpll.quantity) > 0
) )
AS t ON t.id = ldsa.id
<where>
ldsa.order_status in ('10','20','30','70')
and ldsa.reservation_status in ('10','20')
and t.num > 0
<!-- AND (ldsa.incoming_num - ldsa.delivery_quantity) > 0 -->
AND ldsa.hand_quantity > 0 AND ldsa.hand_quantity > 0
<if test="par.warehouseId != null and par.warehouseId != '' "> <if test="par.warehouseId != null and par.warehouseId != '' ">
and ldsa.warehouse_id = #{par.warehouseId} and ldsa.warehouse_id = #{par.warehouseId}

61
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -695,7 +695,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
//新增 //新增
// distrilbutionBillLading.setConditions("1"); // distrilbutionBillLading.setConditions("1");
distrilbutionBillLading.setStockupCode(distributionReservationService.bianMa()); distrilbutionBillLading.setStockupCode(distributionReservationService.bianMa());
@ -912,8 +911,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
//操作图片 //操作图片
if (!distrilbutionBillLading.getPrintList().isEmpty()) { if (!distrilbutionBillLading.getPrintList().isEmpty()) {
addPrint(distrilbutionBillLading); addPrint(distrilbutionBillLading);
@ -986,8 +983,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
@Override @Override
public boolean signImages(DistrilbutionBillLadingDTO distrilbutionBillLading) { public boolean signImages(DistrilbutionBillLadingDTO distrilbutionBillLading) {
//修改图片 //修改图片
@ -1343,6 +1338,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
/** /**
* 转换老系统的ID * 转换老系统的ID
*
* @param delivery * @param delivery
*/ */
private void modifyWarehouseId(SignPushDataDTO delivery) { private void modifyWarehouseId(SignPushDataDTO delivery) {
@ -2076,7 +2072,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
// if (!zeroPackageEntities.isEmpty()){ // if (!zeroPackageEntities.isEmpty()){
// distributionZeroPackageService.saveBatch(zeroPackageEntities); // distributionZeroPackageService.saveBatch(zeroPackageEntities);
// } // }
@ -2102,7 +2097,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// this.updateById(distrilbutionBillLadingEntity); // this.updateById(distrilbutionBillLadingEntity);
return true; return true;
} }
@ -2297,16 +2291,47 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO); IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO);
List<DistrilbutionBillLadingVO> records = distrilbutionBillLadingVOIPage.getRecords(); List<DistrilbutionBillLadingVO> records = distrilbutionBillLadingVOIPage.getRecords();
records.forEach(i -> {
List<DistributionDeliveryChargeEntity> list = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() // 获取所有的提货单ID
.eq(DistributionDeliveryChargeEntity::getBillLading, i.getId()) List<Long> billIds = records.stream()
.map(DistrilbutionBillLadingVO::getId) // 假设getId()方法返回提货单ID
.collect(Collectors.toList());
List<DistributionDeliveryChargeEntity> distributionDeliveryChargeEntityList = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda()
.in(DistributionDeliveryChargeEntity::getBillLading, billIds)
); );
Map<Long, List<DistributionDeliveryChargeEntity>> groupedEntities;
if (ObjectUtils.isNotNull(distributionDeliveryChargeEntityList)) {
groupedEntities =
distributionDeliveryChargeEntityList.stream()
.collect(Collectors.groupingBy(DistributionDeliveryChargeEntity::getBillLading));
} else {
groupedEntities = null;
}
List<DistributionPrintEntity> DistributionPrintEntitys = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda()
.in(DistributionPrintEntity::getBillLadingId, billIds)
);
Map<Long, List<DistributionPrintEntity>> groupDistributionPrintEntityEntities;
if (ObjectUtils.isNotNull(DistributionPrintEntitys)) {
groupDistributionPrintEntityEntities =
DistributionPrintEntitys.stream()
.collect(Collectors.groupingBy(DistributionPrintEntity::getBillLadingId));
} else {
groupDistributionPrintEntityEntities = null;
}
records.forEach(i -> {
if(groupedEntities!=null){
List<DistributionDeliveryChargeEntity> list =groupedEntities.get(i.getId());
list.forEach(ii -> ii.setCostName(DictBizCache.getValue(DictBizConstant.DELIVERY_COST, ii.getCost()))); list.forEach(ii -> ii.setCostName(DictBizCache.getValue(DictBizConstant.DELIVERY_COST, ii.getCost())));
i.setList(list); i.setList(list);
//查询是不是上传图片 }
List<DistributionPrintEntity> list1 = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda() if(groupDistributionPrintEntityEntities!=null){
.eq(DistributionPrintEntity::getBillLadingId, i.getId()) List<DistributionPrintEntity> list1 = groupDistributionPrintEntityEntities.get(i.getId());
); if(list1!=null){
int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count(); int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count();
int count1 = (int) list1.stream().filter(ii -> "2".equals(ii.getGenre().toString())).count(); int count1 = (int) list1.stream().filter(ii -> "2".equals(ii.getGenre().toString())).count();
int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count(); int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count();
@ -2315,6 +2340,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} else { } else {
i.setPrintState(false); i.setPrintState(false);
} }
}
}else{
i.setPrintState(false);
}
}); });
distrilbutionBillLadingVOIPage.setRecords(records); distrilbutionBillLadingVOIPage.setRecords(records);
return distrilbutionBillLadingVOIPage; return distrilbutionBillLadingVOIPage;
@ -2966,7 +2997,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// i.setEsauInventoryNum(list.size()); // i.setEsauInventoryNum(list.size());
// } else { // } else {
//没有备货完成 //没有备货完成
// i.setEsauInventoryNum(-1); // i.setEsauInventoryNum(-1);
@ -3360,6 +3390,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
/** /**
* 自提签收推淞老系统 * 自提签收推淞老系统
*
* @param id * @param id
*/ */
private void sendOldSystem(Long id) { private void sendOldSystem(Long id) {

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java

@ -38,8 +38,8 @@ public class DistributionStockArticleWrapper extends BaseEntityWrapper<Distribut
DistributionStockArticleVO distributionStockupVO = Objects.requireNonNull(BeanUtil.copy(entity, DistributionStockArticleVO.class)); DistributionStockArticleVO distributionStockupVO = Objects.requireNonNull(BeanUtil.copy(entity, DistributionStockArticleVO.class));
// 查询包条码 // 查询包条码
if (ObjectUtils.isNotNull(distributionStockupVO.getId())) { if (ObjectUtils.isNotNull(distributionStockupVO.getId())) {
String orderPackageCode = distributionParcelListService.getOrderPackageCode(distributionStockupVO.getId()); // String orderPackageCode = distributionParcelListService.getOrderPackageCode(distributionStockupVO.getId());
distributionStockupVO.setOrderPackageCode(orderPackageCode); // distributionStockupVO.setOrderPackageCode(orderPackageCode);
} }
if ("80".equals(entity.getOrderStatus())) { if ("80".equals(entity.getOrderStatus())) {

Loading…
Cancel
Save