| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.S7object; |
| | | //import com.mes.common.S7object; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.mapper.UpWorkstationMapper; |
| | |
| | | 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); |
| | | // } |
| | | } |
| | | |
| | | /** |