| | |
| | | import com.zy.asrs.domain.vo.SteStateTableVo; |
| | | import com.zy.asrs.domain.vo.SteDataVo; |
| | | import com.zy.asrs.entity.BasSte; |
| | | import com.zy.asrs.entity.BasSteErr; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.BasSteErrMapper; |
| | | import com.zy.asrs.service.BasSteService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | private BasSteService basSteService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private BasSteErrMapper basSteErrMapper; |
| | | |
| | | @PostMapping("/table/ste/state") |
| | | @ManagerAuth(memo = "穿梭车信息表") |
| | |
| | | } |
| | | vo.setTaskNo(steProtocol.getTaskNo().intValue()); // 任务号 |
| | | vo.setStatusVal(steProtocol.getMode().intValue()); // 在线状态 |
| | | vo.setStatusType(steProtocol.mode == 0 ? "离线" : "在线"); // 模式状态 |
| | | String modeName = "离线"; |
| | | switch (steProtocol.mode){ |
| | | case -1: |
| | | modeName = "离线"; |
| | | break; |
| | | case 0: |
| | | modeName = "脱机"; |
| | | break; |
| | | case 1: |
| | | modeName = "联机"; |
| | | break; |
| | | } |
| | | vo.setStatusType(modeName); // 模式 |
| | | // vo.setStatusType(steProtocol.mode == 0 ? "离线" : "在线"); // 模式状态 |
| | | if (!Cools.isEmpty(steProtocol.getStatus())) { |
| | | vo.setStatus(steProtocol.getStatusType().desc); // 状态 |
| | | } |
| | |
| | | if (!Cools.isEmpty(steProtocol.getChargeStatus())) { |
| | | vo.setChargeStatus(steProtocol.getChargeStatus()==1?"✔":"×"); |
| | | } |
| | | if(Cools.isEmpty(steProtocol.getAlarm())){ |
| | | vo.setAlarm1("未知异常"); |
| | | } else if(!Cools.isEmpty(steProtocol.getAlarm()) && steProtocol.getAlarm() > 0){ |
| | | BasSteErr steErr = basSteErrMapper.selectById(steProtocol.getAlarm()); |
| | | vo.setAlarm1(steErr==null?"未知异常":steErr.getErrName()); |
| | | } |
| | | vo.setAlarm2(Cools.isEmpty(steProtocol.getAlarm0())? "未知":steProtocol.getAlarm0().toString()); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steSlave.getId()); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | SteCommand steCommand = new SteCommand(); |
| | | steCommand.setSteNo(param.getSteNo()); // 穿梭车编号 |
| | | if (steProtocol.getMode() == 0) { |