diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 1e6e413e2..d8d39150e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -86,13 +86,13 @@ UPDATE logpm_distribution_reservation_package SET packet_bar_status = 2 ,cancel_remark = '异常审核取消原计划' WHERE parce_list_id = #{packageId} ; - UPDATE logpm_distribution_reservation_stockarticle SET reservation_num = (SELECT count(id) FROM logpm_distribution_reservation_package WHERE packet_bar_status != 2 AND reservation_id = #{reservaionId} AND stock_article_id = #{stockArticleId} AND is_deleted = 0) WHERE reservation_id = #{reservaionId} AND stock_article_id = #{stockArticleId}; + UPDATE logpm_distribution_reservation_stockarticle SET reservation_num = (SELECT count(id) FROM logpm_distribution_reservation_package WHERE packet_bar_status != 2 AND reservation_id = #{reservationId} AND stock_article_id = #{stockArticleId} AND is_deleted = 0) WHERE reservation_id = #{reservationId} AND stock_article_id = #{stockArticleId}; - UPDATE logpm_distribution_reservation_stockarticle SET stock_article_status = 2 WHERE reservation_num = 0 AND reservation_id = #{reservaionId} AND stock_article_id = #{stockArticleId}; + UPDATE logpm_distribution_reservation_stockarticle SET stock_article_status = 2 WHERE reservation_num = 0 AND reservation_id = #{reservationId} AND stock_article_id = #{stockArticleId}; - UPDATE logpm_distribution_reservation SET reservation_num = (SELECT count(id) FROM logpm_distribution_reservation_package WHERE packet_bar_status != 2 AND reservation_id = #{reservaionId} AND is_deleted =0 ) WHERE id = #{reservaionId}; + UPDATE logpm_distribution_reservation SET reservation_num = (SELECT count(id) FROM logpm_distribution_reservation_package WHERE packet_bar_status != 2 AND reservation_id = #{reservationId} AND is_deleted =0 ) WHERE id = #{reservationId}; - UPDATE logpm_distribution_reservation SET reservation_status = '40',cancel_reason = '异常审核判定判定取消预约计划' WHERE id = #{reservaionId} AND (reservation_num + reservation_stock_list_num) = 0; + UPDATE logpm_distribution_reservation SET reservation_status = '40',cancel_reason = '异常审核判定判定取消预约计划' WHERE id = #{reservationId} AND (reservation_num + reservation_stock_list_num) = 0; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 8acad053e..9f7bd538a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -5454,11 +5454,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl packageIds = distributionLoadscanAbnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getPackageId).distinct().collect(Collectors.toList()); + List packageIds = distributionLoadscanAbnormalEntities.stream().filter(f->LoadingAbnormalAuditingStatusConstant.daishenhe.getValue().equals(f.getAuditingStatus())).map(DistributionLoadscanAbnormalEntity::getPackageId).distinct().collect(Collectors.toList()); //查询审核的是否存在计划 List packageEntityList = distributionReservationPackageService.list(Wrappers.query().lambda() - .eq(DistributionReservationPackageEntity::getParceListId, packageIds) + .in(DistributionReservationPackageEntity::getParceListId, packageIds) .ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) ); if (!packageEntityList.isEmpty()) {