| | |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setCar(staProtocol.isCar() ? "有": "无"); |
| | | // vo.setCar(staProtocol.isCar() ? "有": "无"); |
| | | return R.ok().add(vo); |
| | | } |
| | | } |
| | |
| | | @PostMapping("/detl/update") |
| | | @ManagerAuth(memo = "修改站点数据") |
| | | public R siteDetlUpdate(@RequestParam Integer devNo, |
| | | @RequestParam Short workNo, |
| | | @RequestParam Short staNo, |
| | | @RequestParam Integer workNo, |
| | | @RequestParam Integer staNo, |
| | | @RequestParam(required = false) String pakMk, |
| | | @RequestParam(required = false) Boolean inEnable, |
| | | @RequestParam(required = false) Boolean outEnable |
| | |
| | | staProtocol.setOutEnable(outEnable); |
| | | basDevp.setOutEnable(outEnable ? "Y" : "N"); |
| | | } |
| | | staProtocol.setWorkNo((short) 0); |
| | | staProtocol.setStaNo((short) 0); |
| | | staProtocol.setWorkNo(0); |
| | | staProtocol.setStaNo(0); |
| | | basDevpService.updateById(basDevp); |
| | | boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol), false); |
| | | if (result) { |
| | |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | staProtocol.setWorkNo( 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo()); |
| | | boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol), false); |
| | | if (result) { |
| | | return R.ok(); |
| | |
| | | public List<PlcErrorTableVo> staPlcErr(Map.Entry<Integer, StaProtocol> entry){ |
| | | List<PlcErrorTableVo> list = new ArrayList<>(); |
| | | StaProtocol staProtocol = entry.getValue(); |
| | | if (staProtocol.getBreakerErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("断路器故障"); |
| | | vo.setError("断路器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getInfraredErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("光电异常"); |
| | | vo.setError("光电异常"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getOutTimeErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("运行超时"); |
| | | vo.setError("运行超时"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getSeizeSeatErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("占位超时"); |
| | | vo.setError("占位超时"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getWrkYgoodsN()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("有任务无货故障"); |
| | | vo.setError("有任务无货故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getInverterErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("变频器故障"); |
| | | vo.setError("变频器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getContactErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("电机接触器故障"); |
| | | vo.setError("电机接触器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getUpcontactErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("顶升电机接触器故障"); |
| | | vo.setError("顶升电机接触器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isFrontErr()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |