From bd6d24362376534e83ea768c7c4f6b968cc3f7aa Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期五, 01 三月 2024 11:01:27 +0800 Subject: [PATCH] mdc超限报警管理 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java | 33 +++++++++++++++++++++++++++++++-- 1 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java index 5eb7085..9648ae1 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java @@ -87,6 +87,9 @@ @Resource private ISysBaseAPI sysBaseApi; + @Resource + private IMdcAlarmInfoService mdcAlarmInfoService; + @Override public Map<String, String> getDepNamesByEquipmentIds(List<String> equipmentIds) { @@ -369,7 +372,8 @@ 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) { //鑾峰彇宸ヤ綔鏁版嵁骞跺垵濮嬪寲 @@ -439,6 +443,21 @@ 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(); @@ -707,6 +726,11 @@ @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); } @@ -773,7 +797,12 @@ * @return */ @Override - public List<MdcEquipment> exportXlsList(MdcEquipment mdcEquipment) { + 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); } -- Gitblit v1.9.3