Compare commits

...

2 Commits

Author SHA1 Message Date
c1d3eed342 Merge branch 'master' into zjw 2024-11-11 09:49:53 +08:00
daa01891f7 报警与点检工单状态处理 2024-11-08 17:47:44 +08:00
8 changed files with 70 additions and 8 deletions

View File

@ -40,4 +40,6 @@ public class InspectionInfoSaveReqVO {
@Schema(description = "定制化点检反馈")
private String exclusiveInspectionFeedback;
private Boolean closeAlarm;
}

View File

@ -55,7 +55,7 @@ public interface EquipAlarmDataMapper extends BaseMapperX<EquipAlarmDataDO> {
.leftJoin(ModelInfoDO.class, ModelInfoDO::getModelId, EquipInfoDO::getModelId)
.leftJoin(CustomerInfoDO.class, CustomerInfoDO::getCustomerId, EquipInfoDO::getCustomerId)
.leftJoin(ComponentInfoDO.class, ComponentInfoDO::getComponentId, EquipAlarmDataDO::getComponentId)
.eq(EquipAlarmDataDO::getStatus, 0)
.ne(EquipAlarmDataDO::getStatus, 1)
.eqIfExists(EquipAlarmDataDO::getEquipId, reqVO.getEquipId())
.eqIfExists(EquipAlarmDataDO::getComponentId, reqVO.getComponentId())
.eqIfExists(EquipAlarmDataDO::getAlarmLevel, reqVO.getAlarmLevel())

View File

@ -16,12 +16,14 @@ import com.inspur.module.system.controller.admin.inspection.vo.InspectionPlanLis
import com.inspur.module.system.controller.baseData.vo.CustomerInfoSelectionVO;
import com.inspur.module.system.controller.equip.vo.EquipSelectionVO;
import com.inspur.module.system.controller.inspection.vo.*;
import com.inspur.module.system.dal.dataobject.alarm.EquipAlarmDataDO;
import com.inspur.module.system.dal.dataobject.baseData.CustomerInfoDO;
import com.inspur.module.system.dal.dataobject.inspection.InspectionFeedbackDO;
import com.inspur.module.system.dal.dataobject.inspection.InspectionInfoDO;
import com.inspur.module.system.dal.dataobject.inspection.InspectionPlanDO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
import com.inspur.module.system.dal.dataobject.notify.NotifyMessageDO;
import com.inspur.module.system.dal.mysql.alarm.EquipAlarmDataMapper;
import com.inspur.module.system.dal.mysql.inspection.InspectionInfoMapper;
import com.inspur.module.system.service.alarm.AlarmDataService;
import com.inspur.module.system.service.baseData.CustomerInfoService;
@ -76,6 +78,9 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
@Resource
private InspectionPlanService inspectionPlanService;
@Resource
private EquipAlarmDataMapper equipAlarmDataMapper;
@Override
@TenantIgnore
@Transactional
@ -93,6 +98,11 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
inspectionInfo.setStatus(0);
inspectionInfoMapper.insert(inspectionInfo);
//修改报警状态
if (StrUtil.isNotBlank(createReqVO.getAlarmId())){
equipAlarmDataMapper.updateById(new EquipAlarmDataDO().setEquipAlarmId(createReqVO.getAlarmId()).setStatus(2));
}
//消息推送
NotifyMessageDO noticeMessageDO = new NotifyMessageDO()
.setOrderId(inspectionInfo.getInspectionId())
@ -104,7 +114,6 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
.setTemplateNickname(SecurityFrameworkUtils.getLoginUserNickname())
.setTenantId(inspectionInfo.getTenantId());
notifyMessageService.createNotifyMessage(noticeMessageDO);
// 返回
return inspectionInfo.getInspectionId();
}
@ -117,7 +126,15 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
InspectionInfoDO validateInfo = validateInspectionInfoExists(updateReqVO.getInspectionId());
// 更新
InspectionInfoDO updateObj = BeanUtils.toBean(updateReqVO, InspectionInfoDO.class);
if (updateReqVO.getCloseAlarm()) {
alarmDataService.closeAllAlarmDataByEquipAlarmId(updateReqVO.getAlarmId(),false);
}
inspectionInfoMapper.updateById(updateObj);
//修改报警状态
if (StrUtil.isNotBlank(updateReqVO.getExclusiveInspection())){
equipAlarmDataMapper.updateById(new EquipAlarmDataDO().setEquipAlarmId(updateReqVO.getAlarmId()).setStatus(4));
}
//消息推送
NotifyMessageDO noticeMessageDO = new NotifyMessageDO()
.setOrderId(updateObj.getInspectionId())
@ -206,6 +223,17 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
alarmDataService.closeAllAlarmDataByEquipAlarmId(vo.getAlarmId(),false);
}
int i = inspectionInfoMapper.updateById(inspectionInfoDO);
//修改报警状态
int alarmStatus;
//未解决
if(vo.getStatus().equals(1)){
alarmStatus = 3;
}else {
alarmStatus = 1;
}
equipAlarmDataMapper.updateById(new EquipAlarmDataDO().setEquipAlarmId(vo.getAlarmId()).setStatus(alarmStatus));
//点检树新增
if (CollUtil.isNotEmpty(vo.getFeedbackList())){
List<InspectionFeedbackDO> feedbackList = vo.getFeedbackList();
@ -221,6 +249,17 @@ public class InspectionInfoServiceImpl implements InspectionInfoService {
if (vo.getCloseAlarm()) {
alarmDataService.closeAllAlarmDataByEquipAlarmId(vo.getAlarmId(),false);
}
//修改报警状态
int alarmStatus;
//未解决
if(vo.getStatus().equals(4)){
alarmStatus = 5;
}else {
alarmStatus = 1;
}
equipAlarmDataMapper.updateById(new EquipAlarmDataDO().setEquipAlarmId(vo.getAlarmId()).setStatus(alarmStatus));
return inspectionInfoMapper.updateById(inspectionInfoDO) > 0;
}

View File

@ -20,6 +20,7 @@ import com.inspur.module.system.controller.equip.vo.ComponentSelectionVO;
import com.inspur.module.system.controller.equip.vo.EquipSelectionVO;
import com.inspur.module.system.controller.inspection.vo.InspectionInfoSaveReqVO;
import com.inspur.module.system.controller.maintenance.vo.*;
import com.inspur.module.system.dal.dataobject.alarm.EquipAlarmDataDO;
import com.inspur.module.system.dal.dataobject.baseData.CustomerInfoDO;
import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO;
import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO;
@ -28,6 +29,7 @@ import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO;
import com.inspur.module.system.dal.dataobject.notify.NotifyMessageDO;
import com.inspur.module.system.dal.dataobject.user.AdminUserDO;
import com.inspur.module.system.dal.mysql.alarm.EquipAlarmDataMapper;
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper;
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderRecordMapper;
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceReportMapper;
@ -94,10 +96,10 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
private TaskService taskService;
@Resource
private AlarmDataService alarmDataService;
private NotifyMessageService notifyMessageService;
@Resource
private NotifyMessageService notifyMessageService;
private EquipAlarmDataMapper equipAlarmDataMapper;
/**
* OA 请假对应的流程定义 KEY
@ -128,7 +130,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
}
maintenanceOrderMapper.insert(remoteMaintenanceOrder);
if ("0".equals(createReqVO.getSubmitFlag()) && StrUtil.isNotBlank(createReqVO.getAlarmId())) {
alarmDataService.closeAllAlarmDataByEquipAlarmId(createReqVO.getAlarmId(),false);
equipAlarmDataMapper.updateById(new EquipAlarmDataDO().setEquipAlarmId(createReqVO.getAlarmId()).setStatus(6));
}
//设置点检工单状态
if (StrUtil.isNotBlank(createReqVO.getInspectionId())){

View File

@ -5,6 +5,7 @@ import com.inspur.framework.security.core.util.SecurityFrameworkUtils;
import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO;
import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO;
import com.inspur.module.system.dal.mysql.equip.EquipInfoMapper;
import com.inspur.module.system.service.alarm.AlarmDataService;
import com.inspur.module.system.service.maintenance.MaintenanceOrderService;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
@ -29,6 +30,9 @@ public class MaintenanceSpringExpressionExecutionListener {
@Resource
private EquipInfoMapper equipInfoMapper;
@Resource
private AlarmDataService alarmDataService;
/**
* 派单
*/
@ -97,6 +101,7 @@ public class MaintenanceSpringExpressionExecutionListener {
equipInfoDO.setRunStatus(0);
equipInfoMapper.updateById(equipInfoDO);
}
alarmDataService.closeAllAlarmDataByEquipAlarmId(maintenanceOrder.getAlarmId(),false);
}
log.info("listenerEvaluate评价方法调用参数{}", execution);
}

View File

@ -53,6 +53,16 @@
:value="alarmLevel"
/></span>
</div>
<div
class="info"
style="margin-right:2px"
>
<span class="title">状态</span>
<span class="content"><dict-tag
:type="DICT_TYPE.EQU_ALARM_STATUS"
:value="status"
/></span>
</div>
</div>
<!-- <div class="content-info">
<div
@ -382,6 +392,7 @@
>
维修工单提交</el-button>
<el-button
v-if="status === '0' || status === '6'"
type="primary"
@click="handelClose"
>
@ -619,6 +630,7 @@ export default {
modelName: null,
equipNo: null,
alarmLevel: null,
status:null,
//
dataQueryParams: {
equipId: null,
@ -653,6 +665,7 @@ export default {
this.modelName = this.$route.query.modelName;
this.equipNo = this.$route.query.equipNo;
this.alarmLevel = this.$route.query.alarmLevel;
this.status = this.$route.query.status;
},
methods: {
//
@ -674,7 +687,7 @@ export default {
} else if (res.data.status === 1 && !res.data.isExclusive) {
this.inspectionId = res.data.inspectionId;
this.showExclusivePatrolPlanSubmit = true;
} else if (res.data.status === 1 && res.data.isExclusive) {
} else if (res.data.status === 4) {
this.inspectionId = res.data.inspectionId;
this.showMaintanenceSubmit = true;
}

View File

@ -257,7 +257,8 @@
modelName: scope.row.modelName,
equipNo: scope.row.equipNo,
alarmLevel: scope.row.alarmLevel,
equipAlarmId: scope.row.equipAlarmId
equipAlarmId: scope.row.equipAlarmId,
status: scope.row.status
},
}">
<el-button

View File

@ -329,7 +329,7 @@
>
<el-radio-group v-model="exclusiveInspectionFeedbackData.inspectionFeedbackStatus">
<el-radio :label="3"></el-radio>
<el-radio :label="1"></el-radio>
<el-radio :label="4"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item