From ac909029d6df3cf499e9332b7dd1c735b3d25728 Mon Sep 17 00:00:00 2001 From: pjb <123456> Date: 星期一, 07 七月 2025 10:44:49 +0800 Subject: [PATCH] 平库组托失败 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java index 175251f..28aa38d 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java @@ -4,6 +4,7 @@ import com.zy.asrs.framework.exception.CoolException; import com.zy.asrs.wms.asrs.entity.*; import com.zy.asrs.wms.asrs.entity.enums.OrderSettleType; +import com.zy.asrs.wms.asrs.entity.enums.OrderType; import com.zy.asrs.wms.asrs.mapper.WaitPakinMapper; import com.zy.asrs.wms.asrs.service.*; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -34,7 +35,7 @@ } @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public boolean comb(WaitPakin waitPakin) { //缁勬墭瑙勫垯鏍¢獙 waitPakinRuleService.rule(waitPakin); @@ -59,7 +60,7 @@ } //鍙敤鏁伴噺 - Double count = orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty() - orderDetl.getWaitQty(); + Double count = orderDetl.getAnfme() - orderDetl.getWaitQty(); if (waitPakin.getAnfme() > count) { throw new CoolException("缁勬墭鏁伴噺瓒呰繃鍓╀綑鍙敤鏁伴噺"); } @@ -88,6 +89,12 @@ throw new CoolException("璁㈠崟涓嶅瓨鍦�"); } + //濡傛灉鏄钩搴撳叆搴撳崟锛屼慨鏀硅鍗曟槑缁嗘墽琛屾暟閲� + if (order.getOrderType() == OrderType.PK_IN_ORDER.id) { + orderDetl.setWorkQty(waitPakin.getAnfme()); + orderDetlService.updateById(orderDetl); + } + //鏇存柊璁㈠崟鐘舵�� if (order.getOrderSettle().equals(OrderSettleType.INIT.val())) { order.setOrderSettle(OrderSettleType.WAIT.val()); -- Gitblit v1.9.1