Browse Source

事件处置流程记录--设备管控

develop
lau572 7 months ago
parent
commit
a1dd3b743c
  1. 15
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

15
zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

@ -8,6 +8,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.zc.business.constant.DeviceFunctionIdConstants;
@ -24,6 +25,7 @@ import com.zc.business.service.IDcDeviceService;
import com.zc.business.service.IDcFacilityService;
import com.zc.common.core.httpclient.exception.HttpException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -58,6 +60,9 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
@Resource
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
@Autowired
private DcEventProcessServiceImpl dcEventProcessService;
/**
* 查询事件预案
@ -750,6 +755,16 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
eventPlanAssocMapper.updateEventPlanAssoc(selectEventPlanAssoc);
resultObject.put("eventPlanAssocId",selectEventPlanAssoc.getId());
}
DcEventProcess dcEventProcess = new DcEventProcess();
dcEventProcess.setEventId(id);
dcEventProcess.setOperationTime(new Date());
dcEventProcess.setOperator(SecurityUtils.getUserId().toString());
dcEventProcess.setSource(1);
dcEventProcess.setProcessType(3);
dcEventProcess.setProcessId(Long.valueOf(resultObject.get("eventPlanAssocId").toString()));
dcEventProcess.setContext("设备管控:");
dcEventProcessService.insertDcEventProcess(dcEventProcess);
resultObject.put("deviceOperationResult",resultArray);
return resultObject;
}

Loading…
Cancel
Save