| | |
| | | return false; |
| | | } |
| | | |
| | | //检查是否为出库模式 |
| | | if(!checkOutTargetStationIoMode(wrkMast)) { |
| | | return false; |
| | | } |
| | | |
| | | for (StationObjModel stationObjModel : outStationList) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, stationObjModel.getDeviceNo()); |
| | | if (stationThread == null) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | //检查是否为出库模式 |
| | | private boolean checkOutTargetStationIoMode(WrkMast wrkMast) { |
| | | if (wrkMast == null || wrkMast.getStaNo() == null) { |
| | | return false; |
| | | } |
| | | BasStation basStation = basStationService.getById(wrkMast.getStaNo()); |
| | | if (basStation == null) { |
| | | return false; |
| | | } |
| | | |
| | | StationThread targetStationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basStation.getDeviceNo()); |
| | | if (targetStationThread == null) { |
| | | return false; |
| | | } |
| | | |
| | | StationProtocol targetStationProtocol = targetStationThread.getStatusMap().get(wrkMast.getStaNo()); |
| | | if (targetStationProtocol == null) { |
| | | return false; |
| | | } |
| | | |
| | | if (targetStationProtocol.getIoMode() == 2) { |
| | | return true;//出库模式 |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private int getSystemConfigInt(String code, int defaultValue) { |
| | | Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key); |
| | | if (systemConfigMapObj == null) { |