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() + "");