From 504ee622ba68ca942d84de91c8094779617e981f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 01 十二月 2022 14:12:07 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index d485210..5eb3186 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1854,6 +1854,9 @@
                             Date now = new Date();
                             wrkMast.setCrnEndTime(now);
                             wrkMast.setModiTime(now);
+                            LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo());
+                            Integer outCrnNo = locMastService.getOutCrnNo(locMast);
+                            wrkMast.setCrnNo(outCrnNo);
                             // 淇敼鎴愬姛鍚庡浣嶅爢鍨涙満
                             if (wrkMastMapper.updateById(wrkMast) > 0) {
                                 // 鍫嗗灈鏈哄浣�
@@ -2535,7 +2538,7 @@
                             SteChargeType first = SteChargeType.FIRST;
                             locNo = first.locNo;
                             if (basSteService.hasCarOfLocNo(locNo) == null
-                                && wrkChargeService.selectWorkingOfCharge(first.ssbm) != null) {
+                                && wrkChargeService.selectWorkingOfCharge(first.ssbm) == null) {
                                 steCharge = first;
                                 break;
                             }
@@ -2544,7 +2547,7 @@
                             SteChargeType second = SteChargeType.SECOND;
                             locNo = second.locNo;
                             if (basSteService.hasCarOfLocNo(locNo) == null
-                                && wrkChargeService.selectWorkingOfCharge(second.ssbm) != null) {
+                                && wrkChargeService.selectWorkingOfCharge(second.ssbm) == null) {
                                 steCharge = second;
                                 break;
                             }
@@ -2553,7 +2556,7 @@
                             SteChargeType third = SteChargeType.THIRD;
                             locNo = third.locNo;
                             if (basSteService.hasCarOfLocNo(locNo) == null
-                                && wrkChargeService.selectWorkingOfCharge(third.ssbm) != null) {
+                                && wrkChargeService.selectWorkingOfCharge(third.ssbm) == null) {
                                 steCharge = third;
                                 break;
                             }
@@ -2792,6 +2795,12 @@
                 if (steProtocol.getCharge() < 99) {
                     continue;
                 }
+                if (steProtocol.getMode() == 0) {
+                    continue;
+                }
+                if (!steProtocol.getStatusType().equals(SteStatusType.IDLE)) {
+                    continue;
+                }
 //                // 1鍙峰厖鐢垫々
 //                if (value.equals(SteChargeType.FIRST) && devpThread.charge0) {
 //                    continue;

--
Gitblit v1.9.1