手动关闭报警后,关闭点检工单
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 cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
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.framework.tenant.core.aop.TenantIgnore;
|
||||||
import com.inspur.module.system.dal.dataobject.alarm.AlarmDataDTO;
|
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.alarm.EquipAlarmDataDO;
|
||||||
import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO;
|
import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO;
|
||||||
import com.inspur.module.system.service.equip.EquipInfoService;
|
import com.inspur.module.system.service.equip.EquipInfoService;
|
||||||
|
import com.inspur.module.system.service.inspection.InspectionInfoServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -118,6 +120,9 @@ public class AlarmDataServiceImpl implements AlarmDataService {
|
|||||||
equipAlarmDataSaveReqVO.setEquipAlarmId(equipAlarmId);
|
equipAlarmDataSaveReqVO.setEquipAlarmId(equipAlarmId);
|
||||||
equipAlarmDataSaveReqVO.setStatus(1);//关闭
|
equipAlarmDataSaveReqVO.setStatus(1);//关闭
|
||||||
equipAlarmDataService.updateEquipAlarmData(equipAlarmDataSaveReqVO);
|
equipAlarmDataService.updateEquipAlarmData(equipAlarmDataSaveReqVO);
|
||||||
|
//关闭点检工单
|
||||||
|
InspectionInfoServiceImpl inspectionInfoService = SpringUtils.getBean(InspectionInfoServiceImpl.class);
|
||||||
|
inspectionInfoService.closeInspectionInfoByAlarmId(equipAlarmId);
|
||||||
if (CollUtil.isEmpty(alarmDataList)){
|
if (CollUtil.isEmpty(alarmDataList)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -80,4 +80,13 @@ public interface InspectionInfoService {
|
|||||||
* @return com.inspur.module.system.controller.inspection.vo.IsSubmitInspectionVO
|
* @return com.inspur.module.system.controller.inspection.vo.IsSubmitInspectionVO
|
||||||
*/
|
*/
|
||||||
IsSubmitInspectionVO isSubmitInspection(String alarmId);
|
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.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.exception.ServiceException;
|
||||||
import com.inspur.framework.common.pojo.PageResult;
|
import com.inspur.framework.common.pojo.PageResult;
|
||||||
import com.inspur.framework.tenant.core.aop.TenantIgnore;
|
import com.inspur.framework.tenant.core.aop.TenantIgnore;
|
||||||
@ -166,4 +167,14 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
|
|||||||
return vo;
|
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"/>
|
<dict-tag :type="DICT_TYPE.INSPECTION_STATUS" :value="scope.row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
default-expand-all
|
default-expand-all
|
||||||
:current-lable-class-name="renderCurrentClass"
|
:current-lable-class-name="renderCurrentClass"
|
||||||
@node-click="nodeClick"
|
@node-click="nodeClick"
|
||||||
></vue-okr-tree>
|
>
|
||||||
|
</vue-okr-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
Loading…
Reference in New Issue
Block a user