diff --git a/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java b/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java index d4071155..c43f1417 100644 --- a/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java +++ b/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java @@ -269,7 +269,7 @@ public class OperationLogAspect { dcPublishManage.setPublishChannels(7); } - dcPublishManage.setContentDetails(String.valueOf(pointArgs)); + dcPublishManage.setContentDetails(JSON.toJSONString(pointArgs)); dcPublishManageService.insertDcPublishManage(dcPublishManage); } } 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 dca0f978..d73d9177 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 @@ -767,6 +767,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { try { // 根据不通设备类型,执行不通的功能操作 invokedFunction( + dcExecuteAction.getDeviceType(), id, dcEventAnDcEmergencyPlans.getOperationType(), dcDevices, @@ -820,11 +821,29 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { /** * 根据不通设备类型,执行不通的功能操作 */ - public void invokedFunction(String eventId, + public void invokedFunction(int deviceType, + String eventId, Integer operationType, List dcDevices, JSONObject otherConfig, JSONArray resultArray) { + // 获取设备类型名称 + String deviceTypeName = Arrays.stream(DeviceTypeEnum.values()) + .filter(deviceTypeEnum -> deviceTypeEnum.getCode() == deviceType) + .findFirst() + .map(DeviceTypeEnum::getInfo) + .orElse("类型异常"); + + if (dcDevices.size() == 0) { + JSONObject result = new JSONObject(); + JSONObject errorResult = new JSONObject(); + errorResult.put("code",500); + errorResult.put("msg","操作失败"); + result.put("deviceName", deviceTypeName); + result.put("content", "未找到相关设备"); + result.put("result", errorResult); + resultArray.add(result); + } for (DcDevice device : dcDevices) {