From 4583ef457409cc3d0ebab3f6b0ee9fbf88901c64 Mon Sep 17 00:00:00 2001 From: xusd Date: Mon, 28 Oct 2024 11:09:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=85=B3=E9=97=AD=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E5=90=8E=EF=BC=8C=E5=85=B3=E9=97=AD=E7=82=B9=E6=A3=80?= =?UTF-8?q?=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/alarm/AlarmDataServiceImpl.java | 5 +++++ .../service/inspection/InspectionInfoService.java | 9 +++++++++ .../service/inspection/InspectionInfoServiceImpl.java | 11 +++++++++++ .../views/system/inspection/inspectionInfo/index.vue | 2 +- .../system/inspectionPlan/inspectionPlanTree.vue | 5 +++-- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java index c855aae..e1587eb 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java @@ -3,11 +3,13 @@ package com.inspur.module.system.service.alarm; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.inspur.framework.common.util.spring.SpringUtils; import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.module.system.dal.dataobject.alarm.AlarmDataDTO; import com.inspur.module.system.dal.dataobject.alarm.EquipAlarmDataDO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; import com.inspur.module.system.service.equip.EquipInfoService; +import com.inspur.module.system.service.inspection.InspectionInfoServiceImpl; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -118,6 +120,9 @@ public class AlarmDataServiceImpl implements AlarmDataService { equipAlarmDataSaveReqVO.setEquipAlarmId(equipAlarmId); equipAlarmDataSaveReqVO.setStatus(1);//关闭 equipAlarmDataService.updateEquipAlarmData(equipAlarmDataSaveReqVO); + //关闭点检工单 + InspectionInfoServiceImpl inspectionInfoService = SpringUtils.getBean(InspectionInfoServiceImpl.class); + inspectionInfoService.closeInspectionInfoByAlarmId(equipAlarmId); if (CollUtil.isEmpty(alarmDataList)){ return 0; } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoService.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoService.java index e05d7a5..e5a309e 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoService.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoService.java @@ -80,4 +80,13 @@ public interface InspectionInfoService { * @return com.inspur.module.system.controller.inspection.vo.IsSubmitInspectionVO */ IsSubmitInspectionVO isSubmitInspection(String alarmId); + + /** + * 根据报警id关闭所有点检工单 + * + * @Author xusd + * @Date 10:37 2024/10/28 + * @param alarmId 报警id + */ + void closeInspectionInfoByAlarmId(String alarmId); } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoServiceImpl.java index ac2415a..1e6db16 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/inspection/InspectionInfoServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.inspur.framework.common.exception.ServiceException; import com.inspur.framework.common.pojo.PageResult; import com.inspur.framework.tenant.core.aop.TenantIgnore; @@ -166,4 +167,14 @@ public class InspectionInfoServiceImpl implements InspectionInfoService { return vo; } } + + @Override + @TenantIgnore + public void closeInspectionInfoByAlarmId(String alarmId) { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(InspectionInfoDO::getAlarmId, alarmId); + updateWrapper.set(InspectionInfoDO::getStatus, 3); + updateWrapper.set(InspectionInfoDO::getRemark, "手动关闭报警"); + inspectionInfoMapper.update(updateWrapper); + } } \ No newline at end of file diff --git a/imt-ui/src/views/system/inspection/inspectionInfo/index.vue b/imt-ui/src/views/system/inspection/inspectionInfo/index.vue index 26f88a4..d025653 100644 --- a/imt-ui/src/views/system/inspection/inspectionInfo/index.vue +++ b/imt-ui/src/views/system/inspection/inspectionInfo/index.vue @@ -72,7 +72,7 @@ - +