From 4e632eef221f01e7d27745cc20e4fb205dd34509 Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期五, 19 四月 2024 15:28:39 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java |   36 ++++++++++++++++++++----------------
 1 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java
index 7e891f6..9e67249 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java
@@ -2,11 +2,11 @@
 
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.mes.common.S7object;
 import com.mes.workstation.entity.UpWorkSequence;
 import com.mes.workstation.entity.UpWorkstation;
 import com.mes.workstation.mapper.UpWorkstationMapper;
 import com.mes.workstation.service.UpWorkstationService;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 /**
@@ -18,16 +18,20 @@
  * @since 2024-04-07
  */
 @Service
+@Slf4j
 public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService {
 
     public static final String DB_100_10 = "DB_100_10";
 
     //鍒ゆ柇鏄惁鍙互鍚哥墖杩涜浠诲姟
     public boolean isCanLoadGlass() {
-        String loadstart="鍚哥墖淇″彿";//plcmes.getPlcParameter("鍚哥墖淇″彿").getValue();
+        String loadstart = "鍚哥墖淇″彿";//plcmes.getPlcParameter("鍚哥墖淇″彿").getValue();
         return "1".equals(loadstart);
 
     }
+    //鏄剧ず姝e湪杩涜浠诲姟鐨勫伐绋嬩俊鎭�
+
+
     //鍒ゆ柇浼樺厛鍚哥墖浣嶇疆鍚庡彂閫佸嚭鐗囦换鍔�
     public void selectPriority() {
         //todo:鍒ゆ柇鏄惁鍙互鍚哥墖杩涜浠诲姟
@@ -38,20 +42,20 @@
         UpWorkSequence loadid1 = this.baseMapper.selectPriority(1).get(0);
         UpWorkSequence loadid2 = this.baseMapper.selectPriority(2).get(0);
         //鍒ゆ柇涓�浜屽彿宸ヤ綅鍝竟鐨勯『搴忔洿鍏�
-        if(loadid1.getSequence()>loadid2.getSequence()) {
-            S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2);
-        }else if(loadid1.getSequence()==loadid2.getSequence()){
-            //褰撲袱涓伐浣嶄笂鐨勭幓鐠冩暟鐩稿悓鏃讹紝鍒ゆ柇鍝釜宸ヤ綅涓婄殑鐜荤拑鏁版洿灏�,浼樺厛娓呯┖涓�涓灦瀛�
-            int glassnum1=loadid1.getNumber();//Integer.parseInt(plcmes.getPlcParameter("鐜荤拑鏁�").getValue());
-            int glassnum2=loadid2.getNumber();//Integer.parseInt(plcmes.getPlcParameter("鐜荤拑鏁�").getValue());
-            if(glassnum1>glassnum2){
-                S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2);
-            }else{
-                S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1);
-            }
-        }else{
-            S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1);
-        }
+//        if(loadid1.getSequence()>loadid2.getSequence()) {
+//            S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2);
+//        }else if(loadid1.getSequence()==loadid2.getSequence()){
+//            //褰撲袱涓伐浣嶄笂鐨勭幓鐠冩暟鐩稿悓鏃讹紝鍒ゆ柇鍝釜宸ヤ綅涓婄殑鐜荤拑鏁版洿灏�,浼樺厛娓呯┖涓�涓灦瀛�
+//            int glassnum1=loadid1.getNumber();//Integer.parseInt(plcmes.getPlcParameter("鐜荤拑鏁�").getValue());
+//            int glassnum2=loadid2.getNumber();//Integer.parseInt(plcmes.getPlcParameter("鐜荤拑鏁�").getValue());
+//            if(glassnum1>glassnum2){
+//                S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2);
+//            }else{
+//                S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1);
+//            }
+//        }else{
+//            S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1);
+//        }
     }
 
     /**

--
Gitblit v1.8.0