| | |
| | | import com.zy.asrs.domain.vo.SiteTableVo; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.impl.MainServiceImpl; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private MainServiceImpl mainService; |
| | | |
| | | @GetMapping("/io/mode/info/site") |
| | | @ManagerAuth(memo = "入出库模式") |
| | |
| | | List<SiteTableVo> list = new ArrayList<>(); |
| | | // 内存数据 |
| | | Map<Integer, StaProtocol> station = new HashMap<>(); |
| | | FyDevpThread xx = (FyDevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | FyDevpThread devpThread = (FyDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | station.putAll(devpThread.getStation()); |
| | |
| | | vo.setWorkNo(staProtocol.getWorkNo()); // 工作号 |
| | | vo.setAutoing(staProtocol.isAutoing() ? "Y" : "N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading() ? "Y" : "N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable() ? "Y" : "N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable() ? "Y" : "N"); // 可出 |
| | | vo.setInEnable(mainService.isInEnable(xx, devp.getDevNo()) ? "Y" : "N"); // 可入 |
| | | vo.setOutEnable(mainService.isOutEnable(xx, devp.getDevNo()) ? "Y" : "N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk() ? "Y" : "N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk() ? "Y" : "N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(staProtocol.getWeight() == 1 ? "重" : "轻"); |
| | | vo.setFinishWorkNo(staProtocol.getFinishWorkNo()); |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | //vo.setLocType1(staProtocol.getWeight() == 1 ? "重" : "轻"); |
| | | vo.setFinishWorkNo(staProtocol.getFinishWorkNo()); |
| | | // if (staProtocol.getSiteId() == 1031 || staProtocol.getSiteId() == 1032) { |
| | | // vo.setOutInModel((staProtocol.getOutInModel() != null && staProtocol.getOutInModel() == 1) ? "出" : "入"); |
| | | // |
| | | // } |
| | | } |
| | | return R.ok().add(list); |
| | | } |