Browse Source

异常审核取消原计划包件BUG修复

master
汤建军 8 months ago
parent
commit
6d51e2bf95
  1. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -86,13 +86,13 @@
<delete id="cancelOld"> <delete id="cancelOld">
UPDATE logpm_distribution_reservation_package SET packet_bar_status = 2 ,cancel_remark = '异常审核取消原计划' WHERE parce_list_id = #{packageId} ; 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;
</delete> </delete>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -5454,11 +5454,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("#############异常包件信息异常:{}", distributionLoadscanAbnormalEntities); log.error("#############异常包件信息异常:{}", distributionLoadscanAbnormalEntities);
return R.fail(3000, "审核失败"); return R.fail(3000, "审核失败");
} }
List<Long> packageIds = distributionLoadscanAbnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getPackageId).distinct().collect(Collectors.toList()); List<Long> packageIds = distributionLoadscanAbnormalEntities.stream().filter(f->LoadingAbnormalAuditingStatusConstant.daishenhe.getValue().equals(f.getAuditingStatus())).map(DistributionLoadscanAbnormalEntity::getPackageId).distinct().collect(Collectors.toList());
//查询审核的是否存在计划 //查询审核的是否存在计划
List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda() List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getParceListId, packageIds) .in(DistributionReservationPackageEntity::getParceListId, packageIds)
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) .ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())
); );
if (!packageEntityList.isEmpty()) { if (!packageEntityList.isEmpty()) {

Loading…
Cancel
Save