From 470718b6f7de2688807a59b4e32f437624c51499 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期四, 15 一月 2026 16:06:17 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/network/real/ZyCrnRealConnect.java | 38 ++++++++------------------------------
1 files changed, 8 insertions(+), 30 deletions(-)
diff --git a/src/main/java/com/zy/core/network/real/ZyCrnRealConnect.java b/src/main/java/com/zy/core/network/real/ZyCrnRealConnect.java
index cef6605..ba2a839 100644
--- a/src/main/java/com/zy/core/network/real/ZyCrnRealConnect.java
+++ b/src/main/java/com/zy/core/network/real/ZyCrnRealConnect.java
@@ -123,14 +123,14 @@
short[] array = new short[9];
array[0] = (short) 0;
- array[1] = command.getTaskNo();
- array[2] = command.getTaskMode();
- array[3] = command.getSourcePosX();
- array[4] = command.getSourcePosY();
- array[5] = command.getSourcePosZ();
- array[6] = command.getDestinationPosX();
- array[7] = command.getDestinationPosY();
- array[8] = command.getDestinationPosZ();
+ array[1] = command.getTaskNo().shortValue();
+ array[2] = command.getTaskMode().shortValue();
+ array[3] = command.getSourcePosX().shortValue();
+ array[4] = command.getSourcePosY().shortValue();
+ array[5] = command.getSourcePosZ().shortValue();
+ array[6] = command.getDestinationPosX().shortValue();
+ array[7] = command.getDestinationPosY().shortValue();
+ array[8] = command.getDestinationPosZ().shortValue();
OperateResult result = siemensNet.Write("DB100.0", array);
if (!result.IsSuccess) {
@@ -182,28 +182,6 @@
return response;
} catch (Exception e) {
e.printStackTrace();
- }finally {
- String sourceLocNo = Utils.getLocNo(command.getSourcePosX(), command.getSourcePosY(), command.getSourcePosZ());
- String targetLocNo = Utils.getLocNo(command.getDestinationPosX(), command.getDestinationPosY(), command.getDestinationPosZ());
-
- // 鏃ュ織璁板綍
- BasCrnpOptService bean = SpringUtils.getBean(BasCrnpOptService.class);
- BasCrnpOpt basCrnpOpt = new BasCrnpOpt(
- command.getTaskNo().intValue(), // 浠诲姟鍙�
- command.getCrnNo(), // 鍫嗗灈鏈篬闈炵┖]
- new Date(), // 涓嬪彂鏃堕棿
- String.valueOf(command.getTaskMode()), // 妯″紡
- sourceLocNo, //婧愬簱浣�
- targetLocNo, //鐩爣搴撲綅
- null, // 淇敼鏃堕棿
- null, // 淇敼浜哄憳
- null, // 澶囨敞
- JSON.toJSONString(command), // 鎸囦护
- JSON.toJSONString(getStatus()), // 绯荤粺鐘舵��
- 1, // 涓嬪彂鐘舵�亄0:鏈笅鍙�,1:宸蹭笅鍙憓
- JSON.toJSONString(response) // 鍝嶅簲
- );
- bean.insert(basCrnpOpt);
}
return response;
}
--
Gitblit v1.9.1