From 99f220b7ee2b021418321071307c6b3d33ca59b8 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 24 五月 2023 13:44:08 +0800
Subject: [PATCH] wrkDetl
---
src/main/java/com/zy/core/thread/SiemensCrnThread.java | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
index ed02e09..70751fa 100644
--- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -363,15 +363,6 @@
command.setTaskNo((short) 9999);
}
- CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
- CommandInfo commandInfo = new CommandInfo();
- commandInfo.setWrkNo(command.getTaskNo().intValue());
- commandInfo.setCommandStatus(1);
- commandInfo.setStartTime(new Date());
- commandInfo.setDevice("crn");
- commandInfo.setCommand(JSON.toJSONString(command));
- commandInfoService.insert(commandInfo);
-
command.setCrnNo(slave.getId());
short[] array = new short[9];
if (command.getAckFinish() == 0) {
@@ -470,6 +461,12 @@
} catch (Exception ignore) {}
if (result.IsSuccess && result1.IsSuccess) {
+ //鏇存柊鎸囦护鐘舵��
+ CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
+ CommandInfo commandInfo = command.getCommandInfo();
+ commandInfo.setCommandStatus(2);
+ commandInfoService.updateById(commandInfo);
+
log.warn("鍫嗗灈鏈哄懡浠や笅鍙慬id:{},鏃堕棿锛歿}] >>>>> {}", slave.getId(), DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F), JSON.toJSON(command));
OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command)));
return true;
--
Gitblit v1.9.1