From 0d04e9440d19f30a8220f498ebdde5a8bfcc48a8 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 10 十月 2023 13:50:03 +0800
Subject: [PATCH] #机械臂任务下发
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 53 +++++++++++++++++++++++++++++++----------------------
1 files changed, 31 insertions(+), 22 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 f4704d2..e2ec5d0 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2021,30 +2021,39 @@
StaProtocol staProtocol317 = devpThread.getStation().get(317);
if (staProtocol303.isAutoing() && staProtocol303.isLoading() && staProtocol303.getWorkNo() != 0) {
//璋冨害鏈烘鑷�
-// //鏌ヨ鏄惁鏈夊伐浣滄。
-// WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol303.getWorkNo().intValue());
-// if (wrkMast == null) {
-// continue;
-// }
-// WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo());
-// if (wrkDetl == null) {
-// continue;
-// }
-// RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "303");
- RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), -1, "303");
+ //鏌ヨ鏄惁鏈夊伐浣滄。
+ WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol303.getWorkNo().intValue());
+ if (wrkMast == null) {
+ continue;
+ }
+ WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo());
+ if (wrkDetl == null) {
+ continue;
+ }
+
+ if (wrkMast.getInvWh() == null) {
+ wrkMast.setInvWh("Y");//鏍囪宸茬粡涓嬪彂鏈烘鑷備换鍔�
+ if (wrkMastMapper.updateById(wrkMast) > 0) {
+ RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "303");
+ }
+ }
}else if (staProtocol317.isAutoing() && staProtocol317.isLoading() && staProtocol317.getWorkNo() != 0) {
//璋冨害鏈烘鑷�
-// //鏌ヨ鏄惁鏈夊伐浣滄。
-// WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol317.getWorkNo().intValue());
-// if (wrkMast == null) {
-// continue;
-// }
-// WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo());
-// if (wrkDetl == null) {
-// continue;
-// }
-// RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "317");
- RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), -1, "317");
+ //鏌ヨ鏄惁鏈夊伐浣滄。
+ WrkMast wrkMast = wrkMastMapper.selectByWorkNo(staProtocol317.getWorkNo().intValue());
+ if (wrkMast == null) {
+ continue;
+ }
+ WrkDetl wrkDetl = wrkDetlService.selectById(wrkMast.getWrkNo());
+ if (wrkDetl == null) {
+ continue;
+ }
+ if (wrkMast.getInvWh() == null) {
+ wrkMast.setInvWh("Y");//鏍囪宸茬粡涓嬪彂鏈烘鑷備换鍔�
+ if (wrkMastMapper.updateById(wrkMast) > 0) {
+ RobotUtils.sendTask(staProtocol303.getWorkNo().toString(), wrkDetl.getAnfme().intValue(), "317");
+ }
+ }
}
}
}
--
Gitblit v1.9.1