From bad1bb8c1eaa2738c1589b9d80def0e92a9145ad Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 3 Jul 2024 14:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=93=81=E7=BB=9F=E8=AE=A1BU?= =?UTF-8?q?G=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aftersales/feign/AftersalesAbnormalRecordClient.java | 3 +++ .../logpm/distribution/mapper/DistributionStockListMapper.xml | 4 ++-- .../service/impl/DistributionAsyncServiceImpl.java | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java index 3e5e07f78..8b87f828f 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java @@ -19,6 +19,9 @@ public class AftersalesAbnormalRecordClient implements IAftersalesAbnormalRecord @Override public void addAbnormalRecord(AftersalesAbnormalRecordEntity abnormalRecordEntity) { + //校验是否只有一条异常记录 + + //不存在则进行添加,否则进行异常状态的恢复 aftersalesAbnormalRecordService.save(abnormalRecordEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml index 2aa1ddd9e..02127e1f1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml @@ -39,10 +39,10 @@ CASE WHEN ldsi.pid is null THEN (select sum(l.quantity_stock) from logpm_distribution_stock_list l - where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null and ldsi.incoming_batch = l.incoming_batch ) + where l.is_deleted =0 AND l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null and ldsi.incoming_batch = l.incoming_batch ) ELSE (select sum(l.quantity_stock) from logpm_distribution_stock_list l - where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch ) + where l.is_deleted =0 AND l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch ) END 'quantityStock', CASE WHEN ldsi.pid is null THEN (select sum(l.outbound_quantity) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 10f6c71fd..b4b1f6ae7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -3044,7 +3044,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { .eq(DistributionLoadscanEntity::getReservationId, reservationEntity.getId()) .eq(DistributionLoadscanEntity::getOrderId, distributionStockArticleEntity.getId()) .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) - .ne(DistributionLoadscanEntity::getSignforState, 2) + .eq(DistributionLoadscanEntity::getSignforState, 2) ); if (!loadscanEntityList.isEmpty()) { order.setEnd_num(loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum() + "");