| | |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | |
| | | @GetMapping("/io/mode/info/site") |
| | | @ManagerAuth(memo = "入出库模式") |
| | | public R ioMode(){ |
| | | List<Map<String, Object>> res = new ArrayList<>(); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("floor", 2); |
| | | map2.put("modeVal", devpThread.ioModeOf2F.id); |
| | | map2.put("modeDesc", devpThread.ioModeOf2F.desc); |
| | | res.add(map2); |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | |
| | | @PostMapping("/table/site") |
| | | @ManagerAuth(memo = "站点信息表") |
| | |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | if (staProtocol.isLow()) { |
| | | vo.setLocType1("低"); // 低库位 |
| | | } else if (staProtocol.isHigh()){ |
| | | vo.setLocType1("高"); // 高库位 |
| | | } else if (staProtocol.isMedium()) { |
| | | vo.setLocType1("中"); //中库位 |
| | | } else if (staProtocol.isMedium_high()) { |
| | | vo.setLocType1("中高"); //中高库位 |
| | | } |
| | | |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 需求1 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | if (staProtocol.isLow()) { |
| | | vo.setLocType1("低"); // 低库位 |
| | | } else if (staProtocol.isHigh()){ |
| | | vo.setLocType1("高"); // 高库位 |
| | | } else if (staProtocol.isMedium()) { |
| | | vo.setLocType1("中"); //中库位 |
| | | } else if (staProtocol.isMedium_high()) { |
| | | vo.setLocType1("中高"); //中高库位 |
| | | } |
| | | return R.ok().add(vo); |
| | | } |
| | | } |