From ddb65a64a50e3304dc14ae4a19677e2924c808ed Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期五, 12 七月 2024 09:02:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
index bcb937b..abe3e3b 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -141,7 +141,7 @@
         if(code.equals("success")){
             logger.info("璇锋眰宸ュ巶MES宸ュ崟锛氬叆鍙俻ack{}鍑哄弬pack锛歿}",paramProductNum,dataObject.getStr("productNum"));
             List<OmProductionOrdeInfo> check = omProductionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum,dataObject.getStr("productNum")));
-            if(check.size() == 0){
+            if(check.isEmpty()){
                 try {
                     log.info("璇锋眰宸ュ巶MES宸ュ崟锛氬叆鍙俻ack{}鍑哄弬pack锛歿}", paramProductNum, dataObject.getStr("productNum"));
                     OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo();
@@ -156,12 +156,15 @@
                     omProductionOrdeInfo.setCreateTime(new Date());
                     omProductionOrdeInfo.setCreateUser("宸ュ巶MES");
                     omProductionOrdeInfoService.save(omProductionOrdeInfo);
+
                     //鍐橮LC
-                    miloService.writeToOpcUa(ReadWriteEntity.builder().identifier("MOZU1." + paramOrder.getLineCode() + ".MES_WorkOrderNumber").value(dataObject.getStr("productionOrderNum")).build());
-                    miloService.writeToOpcUa(ReadWriteEntity.builder().identifier("MOZU1." + paramOrder.getLineCode() + ".MES_ModuleCode").value(dataObject.getStr("productNum")).build());
+                    miloService.writeToOpcUa(ReadWriteEntity.builder().identifier("MOZU1." + paramOrder.getLineCode() + ".WorkOrderNumber").value(dataObject.getStr("productionOrderNum")).build());
+                    miloService.writeToOpcUa(ReadWriteEntity.builder().identifier("MOZU1." + paramOrder.getLineCode() + ".ModuleCode").value(dataObject.getStr("productNum")).build());
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                 }
+            }else{
+                return AjaxResult.error("宸ュ崟閲嶅,璇烽噸鏂版帴鏀�");
             }
         }else {
             return AjaxResult.error("鎺ュ崟澶辫触,璇疯仈绯荤鐞嗗憳");

--
Gitblit v1.9.3