From 17ea9e5e6b53a27ded785abed6e9bd500d525108 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <xltys1995> Date: 星期四, 24 十二月 2020 08:03:54 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/thread/SiemensCrnThread.java | 43 +++++++++++++++++++++++-------------------- 1 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java index 221bf8c..7a2aa32 100644 --- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java +++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java @@ -199,26 +199,29 @@ array[8] = command.getDestinationPosZ(); OperateResult result = siemensNet.Write("DB8.0", array); if (result.IsSuccess) { - // 鏃ュ織璁板綍 - BasCrnOptService bean = SpringUtils.getBean(BasCrnOptService.class); - BasCrnOpt basCrnOpt = new BasCrnOpt( - command.getTaskNo().intValue(), // 浠诲姟鍙� - command.getCrnNo(), // 鍫嗗灈鏈篬闈炵┖] - new Date(), // 涓嬪彂鏃堕棿 - command.getTaskModeType().toString(), // 妯″紡 - command.getSourcePosX().intValue(), // 婧愭帓 - command.getSourcePosY().intValue(), // 婧愬垪 - command.getSourcePosZ().intValue(), // 婧愬眰 - null, // 婧愮珯 - command.getDestinationPosX().intValue(), // 鐩爣鎺� - command.getDestinationPosY().intValue(), // 鐩爣鍒� - command.getDestinationPosZ().intValue(), // 鐩爣灞� - null, // 鐩爣绔� - null, // 鍝嶅簲缁撴灉 - null, // 淇敼鏃堕棿 - null // 淇敼浜哄憳 - ); - bean.insert(basCrnOpt); + + try { + // 鏃ュ織璁板綍 + BasCrnOptService bean = SpringUtils.getBean(BasCrnOptService.class); + BasCrnOpt basCrnOpt = new BasCrnOpt( + command.getTaskNo().intValue(), // 浠诲姟鍙� + command.getCrnNo(), // 鍫嗗灈鏈篬闈炵┖] + new Date(), // 涓嬪彂鏃堕棿 + command.getTaskModeType().toString(), // 妯″紡 + command.getSourcePosX().intValue(), // 婧愭帓 + command.getSourcePosY().intValue(), // 婧愬垪 + command.getSourcePosZ().intValue(), // 婧愬眰 + null, // 婧愮珯 + command.getDestinationPosX().intValue(), // 鐩爣鎺� + command.getDestinationPosY().intValue(), // 鐩爣鍒� + command.getDestinationPosZ().intValue(), // 鐩爣灞� + null, // 鐩爣绔� + null, // 鍝嶅簲缁撴灉 + null, // 淇敼鏃堕棿 + null // 淇敼浜哄憳 + ); + bean.insert(basCrnOpt); + } catch (Exception ignore) {} log.info("鍫嗗灈鏈哄懡浠や笅鍙慬id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command)); OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command))); -- Gitblit v1.9.1