From a1dd3b743c43b0d2ad5c638035244e268d683889 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Tue, 16 Apr 2024 10:36:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=BD=AE=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=B0=E5=BD=95--=E8=AE=BE=E5=A4=87=E7=AE=A1?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEmergencyPlansServiceImpl.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java index f38ee2c4..2fd3fb7a 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java +++ b/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; }