From 5bb964b07028ec86505cab01e3d2dcb88589e8b6 Mon Sep 17 00:00:00 2001
From: caoyizhong <1270296080@qq.com>
Date: Wed, 20 Sep 2023 09:53:42 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=87=AA=E6=8F=90=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/DistributionParcelListMapper.xml | 9 +-
.../mapper/DistributionStockMapper.java | 1 +
.../mapper/DistributionStockMapper.xml | 10 +-
.../mapper/DistrilbutionBillStockMapper.java | 4 +-
.../mapper/DistrilbutionBillStockMapper.xml | 4 +-
.../service/IDistributionStockService.java | 8 +
.../IDistrilbutionBillStockService.java | 4 +-
.../impl/DistributionStockServiceImpl.java | 5 +
.../impl/DistributionStockupServiceImpl.java | 164 ++++++++++++++++--
.../DistrilbutionBillStockServiceImpl.java | 4 +-
10 files changed, 192 insertions(+), 21 deletions(-)
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
index c0fd555d5..e5c04c779 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
@@ -169,8 +169,15 @@
LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
- ldpl.stock_article_id = #{param.stockArticleId}
+
and lwug.allocation_id = #{param.allocationId}
+ and ldpl.stock_article_id = #{param.stockArticleId}
+
+ and ldpl.stock_article_id in
+
+ #{a}
+
+
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java
index 94c9e1f47..e3830dd8f 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java
@@ -79,4 +79,5 @@ public interface DistributionStockMapper extends BaseMapper
select lwugl.position_code,lwugl.allocation_id
from logpm_distribution_stock lds
- LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2
+ LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 1 HOUR)
where lds.reservation_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LIMIT 1
+
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java
index 556856e99..122875cf9 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java
@@ -59,9 +59,9 @@ public interface DistrilbutionBillStockMapper extends BaseMapper selectDistrilbutionBillSelf(@Param("reservationId")Long reservationId);
- DistributionStockupSelfVO selectDistrilbutionBillPackSelf(@Param("param") StockupDTO stockupDTO);
+ List selectDistrilbutionBillPackSelf(@Param("param") StockupDTO stockupDTO);
- DistributionStockupSelfVO selectDistrilbutionBillPackWuSelf(@Param("reservationId")Long reservationId,@Param("stockupId") Long stockupId);
+ List selectDistrilbutionBillPackWuSelf(@Param("reservationId")Long reservationId,@Param("stockupId") Long stockupId);
DistributionStockupSelfVO selectDistrilbutionBillOverPackWuSelf(@Param("param")StockupDTO stockupDTO);
}
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
index 713baf5e4..0bd7af6e3 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
@@ -11,13 +11,13 @@
select * from logpm_distrilbution_bill_stock where is_deleted = 0
+
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java
index a7ad7d6fd..d61d7f798 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java
@@ -119,4 +119,10 @@ public interface IBasicdataGoodsAreaService extends BaseService goodsAreaVOS = baseMapper.selectStockUpArea(myCurrentWarehouse.getId(),myCurrentWarehouse.getDepartment());
+ return R.data(goodsAreaVOS);
+ }
+
public String countUniqueProperties(String initial){
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
index 433d34837..ec154d596 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
@@ -651,8 +651,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl reservationIds = Func.toLongList(ids);
- for (Long reservationId : reservationIds) {
- DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(reservationId);
- if (Func.isEmpty(reservationEntity) || !reservationEntity.getReservationStatus().equals("20")) {
- log.error("reservationEntity参数异常:+{" + reservationEntity + "}");
- return R.fail("预约信息状态异常!!!");
- }
- //修改预约备货状态
- reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
- result = SqlHelper.retBool(distributionReservationMapper.updateById(reservationEntity));
- //构建中间表信息
- DistributionStockupInfoEntity reservationStockupEntity = new DistributionStockupInfoEntity();
- reservationStockupEntity.setStockupId(id);
- reservationStockupEntity.setStockUpType(StockupTypeConstant.shipei.getValue());
- reservationStockupEntity.setReservationId(reservationEntity.getId());
- result = distributionStockupInfoService.save(reservationStockupEntity);
- if (!result) {
- log.error("sql执行异常:+{" + result + "}");
- return R.fail("请稍后再试");
- }
+ List reservationEntityList = distributionReservationMapper.selectList(Wrappers.query().lambda().in(DistributionReservationEntity::getId, reservationIds));
+ if (Func.isNotEmpty(reservationEntityList)){
+ reservationEntityList.forEach(r->{
+ r.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
+ distributionReservationMapper.updateById(r);
+ DistributionStockupInfoEntity reservationStockupEntity = new DistributionStockupInfoEntity();
+ reservationStockupEntity.setStockupId(id);
+ reservationStockupEntity.setStockUpType(StockupTypeConstant.shipei.getValue());
+ reservationStockupEntity.setReservationId(r.getId());
+ distributionStockupInfoService.save(reservationStockupEntity);
+ });
}
+// for (Long reservationId : reservationIds) {
+// DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(reservationId);
+// if (Func.isEmpty(reservationEntity) || !reservationEntity.getReservationStatus().equals("20")) {
+// log.error("reservationEntity参数异常:+{" + reservationEntity + "}");
+// return R.fail("预约信息状态异常!!!");
+// }
+// //修改预约备货状态
+// reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
+// result = SqlHelper.retBool(distributionReservationMapper.updateById(reservationEntity));
+// //构建中间表信息
+// DistributionStockupInfoEntity reservationStockupEntity = new DistributionStockupInfoEntity();
+// reservationStockupEntity.setStockupId(id);
+// reservationStockupEntity.setStockUpType(StockupTypeConstant.shipei.getValue());
+// reservationStockupEntity.setReservationId(reservationEntity.getId());
+// result = distributionStockupInfoService.save(reservationStockupEntity);
+// if (!result) {
+// log.error("sql执行异常:+{" + result + "}");
+// return R.fail("请稍后再试");
+// }
+// }
} catch (ParseException e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
log.error("执行异常:+{" + e.getMessage() + "}");
From 3efe850b88b2e313ebd2a304fafd5e2dd8a3fe01 Mon Sep 17 00:00:00 2001
From: zhenghaoyu
Date: Wed, 20 Sep 2023 10:29:45 +0800
Subject: [PATCH 3/3] =?UTF-8?q?1.=E5=95=86=E9=85=8D=E6=89=93=E5=8D=B0?=
=?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/DistributionDeliveryListServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
index 4eb6c5ba2..bae315c59 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
@@ -3263,7 +3263,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl