From 58dc9fa8de7b66ef375aa191da873813cbfae009 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期四, 18 四月 2024 14:27:24 +0800 Subject: [PATCH] 解决代码误删回退 --- 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