| | |
| | | ArrayList<Integer> list = new ArrayList<Integer>(){{add(2003);add(2002);}}; |
| | | for (Integer staNo : list) { |
| | | Integer devpId = null; |
| | | Integer rgvStaNoDevpId = null; |
| | | Integer rgvStaNo = null; |
| | | if (staNo == 2003) { |
| | | devpId = 1; |
| | | rgvStaNo = 2002; |
| | | rgvStaNoDevpId = 2; |
| | | }else { |
| | | devpId = 2; |
| | | rgvStaNo = 2003; |
| | | rgvStaNoDevpId = 1; |
| | | } |
| | | |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devpId); |
| | |
| | | |
| | | if (staProtocol.isAutoing() |
| | | && staProtocol.isLoading() |
| | | // && staProtocol.isInEnable() |
| | | && staProtocol.isInEnable() |
| | | && staProtocol.getWorkNo() > 0 |
| | | ) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>() |
| | | .eq("wrk_no", staProtocol.getWorkNo())); |
| | | |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getWrkSts() == 201) { |
| | | continue; |
| | | } |
| | | |
| | | SiemensDevpThread devpThread2 = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, rgvStaNoDevpId); |
| | | if (devpThread2 == null) { |
| | | continue; |
| | | } |
| | | StaProtocol staProtocolRgvStaNo = devpThread2.getStation().get(rgvStaNo); |
| | | if (staProtocolRgvStaNo == null) { |
| | | continue; |
| | | } |
| | | |
| | | if (!staProtocolRgvStaNo.isAutoing()) { |
| | | continue; |
| | | } |
| | | |
| | | if (staProtocolRgvStaNo.isLoading()) { |
| | | continue; |
| | | } |
| | | |
| | | Object object = redisUtil.get(RedisConstantType.RGV_MOVE_LOCK + wrkMast.getWrkNo()); |
| | | if (object != null) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | wrkMast.setWrkSts(201L);//201.RGV搬运中 |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | | redisUtil.set(RedisConstantType.RGV_MOVE_LOCK + wrkMast.getWrkNo(), "lock", 60 * 60); |
| | | } |
| | | } |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getWrkSts() != 201) { |
| | | continue; |
| | | } |
| | | |
| | | Integer devpId = null; |
| | | Integer devpStaNo = null; |
| | | String locNo = null; |