| | |
| | | S7DataWL s7DataWLOne = s7SerializerWLOne.read(S7DataWL.class); |
| | | S7DataWL s7DataWLTwo = s7SerializerWLTwo.read(S7DataWL.class); |
| | | S7DataWLExtra s7DataWLExtraTwo = s7SerializerWLTwo.read(S7DataWLExtra.class); |
| | | Integer oneOutStateEntity = s7DataWLOne.getSlotState(); |
| | | Integer twoOutStateEntity = s7DataWLTwo.getSlotState(); |
| | | Integer d06OutStateEntity = s7DataWLExtraTwo.getD06SlotState(); |
| | | Integer oneOutState = s7DataWLOne.getSlotState(); |
| | | Integer twoOutState = s7DataWLTwo.getSlotState(); |
| | | Integer d06OutState = s7DataWLExtraTwo.getD06SlotState(); |
| | | //状态有3中情况:0空闲 1忙碌 2禁用 |
| | | String oneOutState = Const.OUT_DISABLE; |
| | | String twoOutState = Const.OUT_DISABLE; |
| | | String d06OutState = Const.OUT_DISABLE; |
| | | // int oneOutState = Const.OUT_DISABLE; |
| | | // int twoOutState = Const.OUT_DISABLE; |
| | | // int d06OutState = Const.OUT_DISABLE; |
| | | // if (null != oneOutStateEntity && null != oneOutStateEntity.getValue()) { |
| | | // oneOutState = oneOutStateEntity.getValue().toString(); |
| | | // } |
| | | if (null != oneOutStateEntity) { |
| | | oneOutState = oneOutStateEntity.toString(); |
| | | } |
| | | // if (null != oneOutStateEntity) { |
| | | // oneOutState = oneOutStateEntity.toString(); |
| | | // } |
| | | // if (null != twoOutStateEntity && null != twoOutStateEntity.getValue()) { |
| | | // twoOutState = twoOutStateEntity.getValue().toString(); |
| | | // } |
| | | if (null != twoOutStateEntity) { |
| | | twoOutState = twoOutStateEntity.toString(); |
| | | } |
| | | // if (null != twoOutStateEntity) { |
| | | // twoOutState = twoOutStateEntity.toString(); |
| | | // } |
| | | //两条线都为禁用则不出玻璃 |
| | | if (Const.OUT_DISABLE.equals(oneOutState) && Const.OUT_DISABLE.equals(twoOutState)) { |
| | | log.info("A09、A10为{},{}非自动状态,无法出片", oneOutState, oneOutState); |
| | |
| | | // if (null != d06OutStateEntity && null != d06OutStateEntity.getValue()) { |
| | | // d06OutState = d06OutStateEntity.getValue().toString(); |
| | | // } |
| | | if (null != d06OutStateEntity) { |
| | | d06OutState = d06OutStateEntity.toString(); |
| | | } |
| | | // if (null != d06OutStateEntity) { |
| | | // d06OutState = d06OutStateEntity.toString(); |
| | | // } |
| | | //获取d06片台状态 |
| | | // 1:一对一的情况下不需要判断d06状态 |
| | | // 2:一号线一对多的情况下,获取二号线磨边前片台D07的状态,D07非禁用时,二号线将按照D06片台状态觉得出片 |
| | | // 3:二号线一对多的情况下,获取一号线磨边前片台C08的状态,C08非禁用时,一号线将按照D06片台状态觉得出片 |
| | | if (cellFlag == 2) { |
| | | if (deviceId == 1) { |
| | | twoOutState = Const.OUT_DISABLE.equals(twoOutState) ? Const.OUT_DISABLE : d06OutState; |
| | | |
| | | // twoOutState = Const.OUT_DISABLE.equals(twoOutState) ? Const.OUT_DISABLE : d06OutState; |
| | | twoOutState = twoOutState & d06OutState; |
| | | } else { |
| | | oneOutState = Const.OUT_DISABLE.equals(oneOutState) ? Const.OUT_DISABLE : d06OutState; |
| | | oneOutState = oneOutState & d06OutState; |
| | | // oneOutState = Const.OUT_DISABLE.equals(oneOutState) ? Const.OUT_DISABLE : d06OutState; |
| | | } |
| | | if (Const.OUT_BUSY.equals(oneOutState) && Const.OUT_BUSY.equals(twoOutState)) { |
| | | log.info("A09、A10为{},{}非自动状态,无法出片", oneOutState, oneOutState); |
| | | return Boolean.FALSE; |
| | | } |
| | | // if (Const.OUT_BUSY.equals(oneOutState) && Const.OUT_BUSY.equals(twoOutState)) { |
| | | // log.info("A09、A10为{},{}非自动状态,无法出片", oneOutState, oneOutState); |
| | | // return Boolean.FALSE; |
| | | // } |
| | | } |
| | | |
| | | log.info("开始执行出片/直通任务,任务信息为:{},表名为:{},设备id:{},开始时间:{},一号线状态:{},二号线状态:{}", |
| | |
| | | } else if (Const.OUT_FREE.equals(oneOutState)) { |
| | | cell = Const.ONE_OUT_TARGET_POSITION; |
| | | } else { |
| | | return Boolean.FALSE; |
| | | cell = Const.TWO_OUT_TARGET_POSITION; |
| | | } |
| | | } |
| | | if (Const.OUT_FREE.equals(oneOutState) && Const.OUT_FREE.equals(twoOutState)) { |