| | |
| | | /** |
| | | * 查找设备监控信息 |
| | | */ |
| | | List<MdcEquipmentMonitor> checkStatusFromEquipmentIds(@Param("equipmentIds") List<String> equipmentIds); |
| | | List<MdcEquipmentMonitor> checkStatusFromEquipmentIds(@Param("equipmentIds") List<String> equipmentIds, @Param("status") String status); |
| | | |
| | | /** |
| | | * 根据产线id查询设备id集合 |
| | |
| | | <foreach collection="equipmentIds" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | <if test="status !=null and status == 1"> |
| | | and t2.Oporation in ('1', '2') |
| | | </if> |
| | | <if test="status !=null and status == 2"> |
| | | and t2.Oporation = '3' |
| | | </if> |
| | | <if test="status !=null and status == 3"> |
| | | and t2.Oporation = '22' |
| | | </if> |
| | | <if test="status !=null and status == 4"> |
| | | and t2.Oporation not in ('1', '2', '3', '22') or t2.Oporation is null |
| | | </if> |
| | | </select> |
| | | |
| | | <!--根据部门id查询设备id集合--> |
| | |
| | | /** |
| | | * 设备监控列表 |
| | | */ |
| | | List<MdcEquipmentMonitor> queryEquipmentMonitorList(String userId, String key); |
| | | List<MdcEquipmentMonitor> queryEquipmentMonitorList(String userId, String key, String status); |
| | | |
| | | /** |
| | | * 设备监控 - 设备详细信息 |
| | |
| | | * 设备监控列表 |
| | | */ |
| | | @Override |
| | | public List<MdcEquipmentMonitor> queryEquipmentMonitorList(String userId, String key) { |
| | | public List<MdcEquipmentMonitor> queryEquipmentMonitorList(String userId, String key, String status) { |
| | | List<String> equipmentIds = this.getEquipmentIdsProduction(userId, key); |
| | | if (equipmentIds == null || equipmentIds.isEmpty()) { |
| | | return Collections.emptyList(); |
| | | } |
| | | List<MdcEquipmentMonitor> result = this.baseMapper.checkStatusFromEquipmentIds(equipmentIds); |
| | | List<MdcEquipmentMonitor> result = this.baseMapper.checkStatusFromEquipmentIds(equipmentIds, status); |
| | | if (result != null && !result.isEmpty()) { |
| | | for (MdcEquipmentMonitor mdcEquipmentMonitor : result) { |
| | | if (mdcEquipmentMonitor.getOporation() != null) { |
| | |
| | | @AutoLog(value = "设备表-设备监控列表") |
| | | @ApiOperation(value = "设备表-设备监控列表", notes = "设备表-设备监控列表") |
| | | @GetMapping(value = "/queryEquipmentMonitorList") |
| | | public Result<List<MdcEquipmentMonitor>> queryEquipmentMonitorList(@RequestParam(name = "key", required = false) String key) { |
| | | public Result<List<MdcEquipmentMonitor>> queryEquipmentMonitorList(@RequestParam(name = "key", required = false) String key, |
| | | @RequestParam(name = "status", required = false) String status) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | List<MdcEquipmentMonitor> list = mdcEquipmentService.queryEquipmentMonitorList(userId, key); |
| | | List<MdcEquipmentMonitor> list = mdcEquipmentService.queryEquipmentMonitorList(userId, key, status); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | |
| | | if (mapData != null) { |
| | | if (mapData.containsKey("Sequencenumber")) { |
| | | Object object = mapData.get("Sequencenumber"); |
| | | mdcBoardEquRealTImeVo.setSequenceNumber(object == null ? "" : object.toString()); |
| | | mdcBoardEquRealTImeVo.setSequenceNumber(object == null || "关机".equals(mdcBoardEquRealTImeVo.getOporationDict()) ? "" : object.toString()); |
| | | } |
| | | if (mapData.containsKey("spindlespeed")) { |
| | | Object object = mapData.get("spindlespeed"); |
| | | mdcBoardEquRealTImeVo.setSpindleSpeed(object == null ? "" : object.toString()); |
| | | mdcBoardEquRealTImeVo.setSpindleSpeed(object == null || "关机".equals(mdcBoardEquRealTImeVo.getOporationDict()) ? "" : object.toString()); |
| | | } |
| | | if (mapData.containsKey("spindleload")) { |
| | | Object object = mapData.get("spindleload"); |
| | | mdcBoardEquRealTImeVo.setSpindleLoad(object == null ? "" : object.toString()); |
| | | mdcBoardEquRealTImeVo.setSpindleLoad(object == null || "关机".equals(mdcBoardEquRealTImeVo.getOporationDict()) ? "" : object.toString()); |
| | | } |
| | | if (mapData.containsKey("spindlebeilv")) { |
| | | Object object = mapData.get("spindlebeilv"); |
| | | mdcBoardEquRealTImeVo.setSpindlebeilv(object == null ? "" : object.toString()); |
| | | mdcBoardEquRealTImeVo.setSpindlebeilv(object == null || "关机".equals(mdcBoardEquRealTImeVo.getOporationDict()) ? "" : object.toString()); |
| | | } |
| | | if (mapData.containsKey("feedbeilv")) { |
| | | Object object = mapData.get("feedbeilv"); |
| | | mdcBoardEquRealTImeVo.setFeedbeilv(object == null ? "" : object.toString()); |
| | | mdcBoardEquRealTImeVo.setFeedbeilv(object == null || "关机".equals(mdcBoardEquRealTImeVo.getOporationDict()) ? "" : object.toString()); |
| | | } |
| | | } |
| | | // 维保状态 |