| | |
| | | |
| | | import com.zy.asrs.entity.dto.TvDataDto; |
| | | import com.zy.asrs.entity.dto.TvLocDataDto; |
| | | import com.zy.asrs.entity.dto.WcsCrnDto; |
| | | import com.zy.asrs.entity.dto.WcsStationDto; |
| | | import com.zy.asrs.enums.RedisKeyType; |
| | | import com.zy.asrs.service.BasStationTvService; |
| | | import com.zy.asrs.service.TvDeviceService; |
| | | import com.zy.asrs.utils.CrnUtils; |
| | | import com.zy.asrs.utils.StationUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.utils.RedisUtil; |
| | |
| | | private BasStationTvService basStationTvService; |
| | | @Autowired |
| | | private StationUtils stationUtils; |
| | | @Autowired |
| | | private CrnUtils crnUtils; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | |
| | | } |
| | | } |
| | | |
| | | List<WcsCrnDto> crnList = new ArrayList<>(crnUtils.crnMap.values()); |
| | | crnList.sort(Comparator.comparing(WcsCrnDto::getCrnNo, Comparator.nullsLast(Integer::compareTo))); |
| | | for (WcsCrnDto wcsCrnDto : crnList) { |
| | | if (wcsCrnDto == null || wcsCrnDto.getCrnNo() == null) { |
| | | continue; |
| | | } |
| | | if (wcsCrnDto.getOnline() == null || wcsCrnDto.getOnline() != 1) { |
| | | errors.add("堆垛机#" + wcsCrnDto.getCrnNo() + "离线"); |
| | | continue; |
| | | } |
| | | if (wcsCrnDto.getAlarm() != null && wcsCrnDto.getAlarm() != 0) { |
| | | errors.add("堆垛机#" + wcsCrnDto.getCrnNo() + "报警,报警码:" + wcsCrnDto.getAlarm()); |
| | | } |
| | | if (wcsCrnDto.getMode() == null || wcsCrnDto.getMode() != 3) { |
| | | String modeDesc = Cools.isEmpty(wcsCrnDto.getModeDesc()) ? "未知" : wcsCrnDto.getModeDesc(); |
| | | errors.add("堆垛机#" + wcsCrnDto.getCrnNo() + "非自动模式,当前模式:" + modeDesc); |
| | | } |
| | | } |
| | | |
| | | String errorMsg = String.join(";", errors); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("errorMsg", errorMsg); |