| | |
| | | @Resource |
| | | private ISysBaseAPI sysBaseApi; |
| | | |
| | | @Resource |
| | | private IMdcAlarmInfoService mdcAlarmInfoService; |
| | | |
| | | |
| | | @Override |
| | | public Map<String, String> getDepNamesByEquipmentIds(List<String> equipmentIds) { |
| | |
| | | mdcEquipmentDto.setDataFlag(Integer.parseInt(CommonConstant.STATUS_1)); |
| | | ControlSystem controlSystem = controlSystemService.getByDriveType(mdcEquipmentDto.getDriveType()); |
| | | // 查询设备状态 |
| | | Integer oporation = equipmentLogService.selectEquipmentOporation(mdcEquipment.getEquipmentId()); |
| | | EquipmentLog equipmentLog = equipmentLogService.selectEquipmentOporation(mdcEquipment.getEquipmentId()); |
| | | Integer oporation = equipmentLog.getOporation(); |
| | | |
| | | if (controlSystem != null) { |
| | | //获取工作数据并初始化 |
| | |
| | | value = String.valueOf(mdcTorqueConfig.getTorqueValue()); |
| | | } else { |
| | | value = "0"; |
| | | } |
| | | } else if ("alarm".equals(englishName)) { |
| | | if (oporation == 22) { |
| | | value = equipmentLog.getAlarm(); |
| | | } else { |
| | | value = "无"; |
| | | } |
| | | } else if ("alarmContent".equals(englishName)) { |
| | | if (oporation == 22) { |
| | | List<MdcAlarmInfo> mdcAlarmInfo = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getDriveType, mdcEquipment.getDriveType()).eq(MdcAlarmInfo::getAlarmCode, equipmentLog.getAlarm()).eq(MdcAlarmInfo::getIsUse, 0)); |
| | | if (mdcAlarmInfo != null && !mdcAlarmInfo.isEmpty()) { |
| | | value = mdcAlarmInfo.get(0).getAlarmContent(); |
| | | } |
| | | } else { |
| | | value = "无"; |
| | | } |
| | | } else { |
| | | value = result == null ? null : result.toString(); |
| | |
| | | |
| | | @Override |
| | | public IPage<MdcEquipment> pageList(Page<MdcEquipment> page, MdcEquipmentVo mdcEquipment, HttpServletRequest req) { |
| | | if (StringUtils.isNotBlank(mdcEquipment.getProductionName())) { |
| | | // 递归查询所有子节点 |
| | | List<String> productionIds = mdcProductionService.recursionChildren(mdcEquipment.getProductionName()); |
| | | mdcEquipment.setProductionIds(productionIds); |
| | | } |
| | | return this.baseMapper.pageList(page, mdcEquipment); |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 导出list |
| | | * |
| | | * @param mdcEquipment |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MdcEquipment> exportXlsList(MdcEquipmentVo mdcEquipment) { |
| | | if (StringUtils.isNotBlank(mdcEquipment.getProductionName())) { |
| | | // 递归查询所有子节点 |
| | | List<String> productionIds = mdcProductionService.recursionChildren(mdcEquipment.getProductionName()); |
| | | mdcEquipment.setProductionIds(productionIds); |
| | | } |
| | | return this.baseMapper.exportXlsList(mdcEquipment); |
| | | } |
| | | |
| | | } |