From 5701eb6693c654d53f1bba460eb3a417d495b344 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 11 六月 2025 17:31:53 +0800
Subject: [PATCH] bug修复;下发任务给rcs携带货架码
---
src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java | 35 ++++++++++++++++++++++++++---------
1 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
index bf1f66c..9268c88 100644
--- a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
@@ -25,7 +25,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
@@ -109,6 +108,9 @@
@Override
public void checkComplete(String orderNo, Integer pltType) {
Order order = this.selectByNo(orderNo);
+ if (order.getDocType() == 38) {
+ return;
+ }
if (Cools.isEmpty(order)) {
return;
}
@@ -126,20 +128,26 @@
}
// 濡傛灉 浣滀笟鏁伴噺绛変簬鍗曟嵁鎬绘暟閲� && 宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹� && AGV宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹�
- int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
+ //int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
boolean wrkDeltExist = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().like("order_no", orderNo)) < 1;
boolean agvWrkDetlExist = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().like("order_no", orderNo)) < 1;
boolean waitPakinExist = agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().like("order_no", orderNo)) < 1;
+ boolean agvWrkDetlExist2 = true;
+ try {
+ agvWrkDetlExist2 = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().eq("model", orderNo)) < 1;
+ } catch (Exception e) {
+
+ }
ManPakOut manPakOut = manPakOutService.selectByOrderWithName(orderNo);
boolean manPakoutExist = Cools.isEmpty(manPakOut) || (manPakOut.getPayment() != null && manPakOut.getPayment() == 1);
- if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist) {
+ if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist && agvWrkDetlExist2) {
if (pltType == null) {
- if (!this.updateSettle(order.getId(), 4L, 9528L)) {
+ if (!this.updateSettle(order.getId(), 6L, 9528L)) {
throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
}
- } else if (!this.updateSettle2(order.getId(), 4L, pltType, DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F))) {
+ } else if (!this.updateSettle2(order.getId(), 6L, pltType, DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F))) {
throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
}
} else {
@@ -151,8 +159,10 @@
}
}
+
+
@Override
- @Transactional(isolation= Isolation.READ_COMMITTED)
+ @Transactional
public void checkComplete2(String orderNo) {
Order order = this.selectByNo(orderNo);
if (Cools.isEmpty(order)) {
@@ -164,6 +174,7 @@
List<OrderDetl> orderDetls = orderDetlMapper.selectList(new EntityWrapper<OrderDetl>().eq("order_id", order.getId()));
// 浣滀笟鏁伴噺鏄惁绛変簬鏁伴噺
boolean complete = true;
+
for (OrderDetl orderDetl : orderDetls) {
if (orderDetl.getAnfme() > orderDetl.getQty()) {
complete = false;
@@ -172,16 +183,22 @@
}
// 濡傛灉 浣滀笟鏁伴噺绛変簬鍗曟嵁鎬绘暟閲� && 宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹� && AGV宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹�
- int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
+ //int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
boolean wrkDeltExist = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().like("order_no", orderNo)) < 1;
boolean agvWrkDetlExist = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().like("order_no", orderNo)) < 1;
boolean waitPakinExist = agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().like("order_no", orderNo)) < 1;
+ boolean agvWrkDetlExist2 = true;
+ try {
+ agvWrkDetlExist2 = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().eq("model", orderNo)) < 1;
+ } catch (Exception e) {
+
+ }
ManPakOut manPakOut = manPakOutService.selectByOrderWithName(orderNo);
boolean manPakoutExist = Cools.isEmpty(manPakOut) || (manPakOut.getPayment() != null && manPakOut.getPayment() == 1);
- if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist) {
- if (!this.updateSettle(order.getId(), 4L, 9528L)) {
+ if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist && agvWrkDetlExist2) {
+ if (!this.updateSettle(order.getId(), 6L, 9528L)) {
throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
}
}
--
Gitblit v1.9.1