| | |
| | | // 出入库模式 |
| | | OperateResultExOne<byte[]> result6 = siemensNet.Read("DB167.2", (short) (inStationOriginList.size() * 2)); |
| | | if (result6.IsSuccess) { |
| | | clearInStationIoModes(); |
| | | for (int i = 0; i < inStationOriginList.size(); i++) { |
| | | ZyStationStatusEntity inStationEntity = findStatusEntityByInStationIdx(i); |
| | | if (inStationEntity == null) { |
| | |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private void clearInStationIoModes() { |
| | | if (inStationOriginList == null || statusList == null) { |
| | | return; |
| | | } |
| | | for (StationObjModel stationObjModel : inStationOriginList) { |
| | | if (stationObjModel == null || stationObjModel.getStationId() == null) { |
| | | continue; |
| | | } |
| | | for (ZyStationStatusEntity statusEntity : statusList) { |
| | | if (stationObjModel.getStationId().equals(statusEntity.getStationId())) { |
| | | statusEntity.setIoMode(null); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private int getTaskWriteIdx(int stationIdx, Integer taskWriteIdx) { |