diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java index 01f88b6e..cbf664c9 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java @@ -546,7 +546,7 @@ public class DcDeviceController extends BaseController { if (Objects.equals(device.getString("deviceType"), UniversalEnum.FIFTEEN.getValue())) { return AjaxResult.error(UniversalEnum.TWO_HUNDRED.getNumber(), UniversalEnum.FIVE_HUNDRED.getValue()); } else { - return AjaxResult.error(); + //return AjaxResult.success(resultArray); } } } @@ -559,6 +559,7 @@ public class DcDeviceController extends BaseController { }); JSONObject result = new JSONObject(); result.put("device", device.getString("id")); + result.put("deviceType", device.getInteger("deviceType")); result.put("functionId", functionId); if (device.getInteger("deviceType").equals(DeviceTypeConstants.ROAD_SECTION_VOICE_BROADCASTING)) { JSONObject value = broadcastController.nearCamListDistance(jsonObject); 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 2d97e9eb..ff8670b4 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 @@ -263,7 +263,7 @@ public class OperationLogAspect { // return; //} - saveOperLog(jsonResult, operLog, pointArgs, request, deviceIds, deviceNames, deviceType, remark); + saveOperLog(((JSONObject) JSON.toJSON(jsonResult)).getJSONArray("data"), operLog, pointArgs, request, deviceIds, deviceNames, deviceType, remark); if ((Objects.equals(deviceType, UniversalEnum.TWO.getValue()) || Objects.equals(deviceType, UniversalEnum.FIVE.getValue())) && Objects.nonNull(operLog.getId())) { @@ -346,7 +346,7 @@ public class OperationLogAspect { operLog.setOperType(UniversalEnum.ONE.getValue()); } - saveOperLog(jsonResult, operLog, pointArgs, request, deviceIds, deviceNames, deviceType, remark); + saveOperLog(((JSONObject) JSON.toJSON(jsonResult)).getJSONArray("data"), operLog, pointArgs, request, deviceIds, deviceNames, deviceType, remark); //if ((Objects.equals(deviceType, "2") || Objects.equals(deviceType, "5")) && Objects.nonNull(operLog.getId())) { @@ -385,7 +385,7 @@ public class OperationLogAspect { } } - private void saveOperLog(Object jsonResult, DcOperLog operLog, Object[] pointArgs, HttpServletRequest request, ArrayList deviceIds, ArrayList deviceNames, String deviceType, StringBuilder remark) { + private void saveOperLog(JSONArray jsonResult, DcOperLog operLog, Object[] pointArgs, HttpServletRequest request, ArrayList deviceIds, ArrayList deviceNames, String deviceType, StringBuilder remark) { IDcOperLogService dcOperLogService = SpringUtils.getBean(IDcOperLogService.class); JSONArray jsonArray = (JSONArray) JSON.toJSON(pointArgs); @@ -396,7 +396,7 @@ public class OperationLogAspect { operLog.setOperTime(new Date()); operLog.setDcDeviceType(deviceType); operLog.setRemark(remark.toString()); - operLog.setJsonResult(jsonResult.toString()); + operLog.setJsonResult(jsonResult.toJSONString()); dcOperLogService.save(operLog); } }