Browse Source

库存品统计BUG修复

dist.1.3.0
汤建军 7 months ago
parent
commit
bad1bb8c1e
  1. 3
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

3
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);
}

4
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)

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

Loading…
Cancel
Save