手动关闭报警后,关闭点检工单
This commit is contained in:
parent
cab6f4e839
commit
4583ef4574
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
@ -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<InspectionInfoDO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(InspectionInfoDO::getAlarmId, alarmId);
|
||||
updateWrapper.set(InspectionInfoDO::getStatus, 3);
|
||||
updateWrapper.set(InspectionInfoDO::getRemark, "手动关闭报警");
|
||||
inspectionInfoMapper.update(updateWrapper);
|
||||
}
|
||||
}
|
@ -72,7 +72,7 @@
|
||||
<dict-tag :type="DICT_TYPE.INSPECTION_STATUS" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="点检备注" align="center" prop="remark"/>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
|
@ -24,7 +24,8 @@
|
||||
default-expand-all
|
||||
:current-lable-class-name="renderCurrentClass"
|
||||
@node-click="nodeClick"
|
||||
></vue-okr-tree>
|
||||
>
|
||||
</vue-okr-tree>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
@ -211,4 +212,4 @@ export default {
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user