| | |
| | | // 持久数据 |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>().orderBy("dev_no")); |
| | | for (BasDevp devp : basDevps) { |
| | | if(devp.getDevNo() <5){ |
| | | continue; |
| | | } |
| | | SiteTableVo vo = new SiteTableVo(); |
| | | vo.setDevNo(devp.getDevNo()); // 站点编号 |
| | | |
| | | vo.setWorkNo(devp.getWrkNo()); |
| | | list.add(vo); |
| | | StaProtocol staProtocol = station.get(devp.getDevNo()); |
| | | if (null == staProtocol) { continue; } |
| | |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | vo.setFull(staProtocol.isFull()?"Y":"N"); // 满 |
| | | vo.setBarcode(staProtocol.getBarcode()); // 条码 |
| | | } |
| | | |
| | | return R.ok().add(list); |
| | |
| | | public List<PlcErrorTableVo> staPlcErr(Map.Entry<Integer, StaProtocol> entry){ |
| | | List<PlcErrorTableVo> list = new ArrayList<>(); |
| | | StaProtocol staProtocol = entry.getValue(); |
| | | if (staProtocol.getBreakerErr()){ |
| | | if (staProtocol.getPassTimeOut()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("断路器故障"); |
| | | vo.setError("断路器故障"); |
| | | vo.setPlcDesc("物体进出超时"); |
| | | vo.setError("物体进出超时"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getInfraredErr()){ |
| | | if (staProtocol.getObjectNoIdError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("光电异常"); |
| | | vo.setError("光电异常"); |
| | | vo.setPlcDesc("有物体无数据"); |
| | | vo.setError("有物体无数据"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getOutTimeErr()){ |
| | | if (staProtocol.getIdNoObjectError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("运行超时"); |
| | | vo.setError("运行超时"); |
| | | vo.setPlcDesc("有数据无物体"); |
| | | vo.setError("有数据无物体"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getSeizeSeatErr()){ |
| | | if (staProtocol.getLmfrError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("占位超时"); |
| | | vo.setError("占位超时"); |
| | | vo.setPlcDesc("线体电机热继报警"); |
| | | vo.setError("线体电机热继报警"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getWrkYgoodsN()){ |
| | | if (staProtocol.getLiftError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("有任务无货故障"); |
| | | vo.setError("有任务无货故障"); |
| | | vo.setPlcDesc("顶升报警"); |
| | | vo.setError("顶升报警"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getInverterErr()){ |
| | | if (staProtocol.getDlfrError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("变频器故障"); |
| | | vo.setError("变频器故障"); |
| | | vo.setPlcDesc("顶升电机热继报警"); |
| | | vo.setError("顶升电机热继报警"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getContactErr()){ |
| | | if (staProtocol.getDmfrError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("电机接触器故障"); |
| | | vo.setError("电机接触器故障"); |
| | | vo.setPlcDesc("顶升横移电机热继报警"); |
| | | vo.setError("顶升横移电机热继报警"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getUpcontactErr()){ |
| | | if (staProtocol.getVfdError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("顶升电机接触器故障"); |
| | | vo.setError("顶升电机接触器故障"); |
| | | /* |
| | | * 宜科定制 150站点异常信息:大托盘目的站错误 |
| | | * */ |
| | | if (entry.getKey()==150){ |
| | | vo.setPlcDesc("150站点大托盘目的站错误"); |
| | | vo.setError("150站点大托盘目的站错误"); |
| | | } |
| | | vo.setPlcDesc("变频故障"); |
| | | vo.setError("变频故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getSrvError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("伺服故障"); |
| | | vo.setError("伺服故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getCommunicationTimeOut()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("与上位机通讯超时"); |
| | | vo.setError("与上位机通讯超时"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getParameterIncompleteError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("信息参数不全"); |
| | | vo.setError("信息参数不全"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getDataNotClear()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("信息数据未清除"); |
| | | vo.setError("信息数据未清除"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getSetParameterError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("参数设置报警"); |
| | | vo.setError("参数设置报警"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getDataError()){ |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | | vo.setPlcDesc("数据错误"); |
| | | vo.setError("数据错误"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isFrontErr()){ |