From 73c82111f89911e2588ea6202c39a67a0dc41c8e Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Mon, 29 Apr 2024 09:07:05 +0800
Subject: [PATCH 01/60] =?UTF-8?q?=E6=83=85=E6=8A=A5=E6=9D=BF=E5=8F=91?=
=?UTF-8?q?=E7=89=88=E8=AE=B0=E5=BD=95=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/business/DcBoardReleaseLogMapper.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml b/zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml
index 7be095d3..697be257 100644
--- a/zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml
@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and t1.device_id = #{deviceId}
+ and t2.direction = #{direction}
and t2.device_name like concat('%', #{deviceName}, '%')
and t1.release_content = #{releaseContent}
and t1.release_status = #{releaseStatus}
From b71d654e8761d510a8f2c8ee9d689e2596fab137 Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Mon, 29 Apr 2024 17:52:38 +0800
Subject: [PATCH 02/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AE=A1=E6=8E=A7?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcDeviceController.java | 1 -
.../controller/DcOperLogController.java | 4 +-
.../business/domain/DcBatchFunctionsJob.java | 5 +-
.../interfaces/OperationLogAspect.java | 118 ++++--------------
.../DcBatchFunctionsJobGroupServiceImpl.java | 1 +
.../impl/DcBatchFunctionsJobServiceImpl.java | 2 +-
6 files changed, 30 insertions(+), 101 deletions(-)
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 bb41e2b5..dd305ca3 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
@@ -501,7 +501,6 @@ public class DcDeviceController extends BaseController {
if (!Objects.equals(String.valueOf(ajaxResult.get("code")), "200")) {
return AjaxResult.error();
}
-
}
}
return AjaxResult.success(resultArray);
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcOperLogController.java b/zc-business/src/main/java/com/zc/business/controller/DcOperLogController.java
index 789580f5..451a612a 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcOperLogController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcOperLogController.java
@@ -40,7 +40,7 @@ public class DcOperLogController extends BaseController {
@ApiOperation("分页查询列表")
@PreAuthorize("@ss.hasPermi('iot:facility:list')")
@GetMapping("list")
- public TableDataInfo listFacility(DcOperLog dcOperLog,@RequestParam(value = "endTime", required = false)Date endTime,@RequestParam(value = "startTime", required = false)Date startTime) {
+ public TableDataInfo listFacility( DcOperLog dcOperLog,@RequestParam(value = "endTime", required = false)Date endTime,@RequestParam(value = "startTime", required = false)Date startTime) {
return getDataTable(dcOperLogService.pageDcOperLog(dcOperLog,endTime,startTime));
}
@@ -53,7 +53,7 @@ public class DcOperLogController extends BaseController {
@ApiOperation("无分页查询列表")
@PreAuthorize("@ss.hasPermi('iot:facility:query')")
@GetMapping("query")
- public AjaxResult queryFacility(DcOperLog dcOperLog, @RequestParam(value = "endTime", required = false) Date endTime, @RequestParam(value = "startTime", required = false)Date startTime) {
+ public AjaxResult queryFacility( DcOperLog dcOperLog, @RequestParam(value = "endTime", required = false) Date endTime, @RequestParam(value = "startTime", required = false)Date startTime) {
return AjaxResult.success(dcOperLogService.listDcOperLog(dcOperLog,endTime,startTime));
}
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcBatchFunctionsJob.java b/zc-business/src/main/java/com/zc/business/domain/DcBatchFunctionsJob.java
index ea43a28f..3b896fb1 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcBatchFunctionsJob.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcBatchFunctionsJob.java
@@ -1,6 +1,7 @@
package com.zc.business.domain;
import com.baomidou.mybatisplus.annotation.TableField;
+import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -15,8 +16,8 @@ public class DcBatchFunctionsJob {
private Long jobId;
@ApiModelProperty("任务组ID")
private String jobGroup;
- //@Excel(name = "任务名称")
- @TableField(exist = false)
+ @Excel(name = "任务名称")
+ //@TableField(exist = false)
private String jobName;
@ApiModelProperty("调用目标字符串")
private String invokeTarget;
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 d2b38529..72f02414 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
@@ -129,34 +129,13 @@ public class OperationLogAspect {
request = null;
}
- AjaxResult proceed = (AjaxResult) joinPoint.proceed(pointArgs);
- //String jsonResultString = "";
- //JSONArray jsonArray = (JSONArray) proceed;
- //for (Object o : jsonArray) {
- // JSONObject jsonObject = (JSONObject) o;
- // if (Objects.equals(jsonObject.getString("code"), "200")) {
- // JSONArray data = jsonObject.getJSONArray("data");
- // for (Object datum : data) {
- // JSONObject results = (JSONObject) datum;
- // JSONObject result = results.getJSONObject("result");
- // if (Objects.equals(result.getString("code"), "200")) {
- // jsonResultString = "设备"+d+"";
- // }
- // }
- // }
- //}
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String date = df.format(new Date());
String sta = "";
- if (Objects.equals(state, "0")&&Objects.equals(String.valueOf(proceed.get("code")), "200")) {
- //if (Objects.equals(String.valueOf(proceed.get("code")), "200")) {
- operLog.setStatus(0);
- sta = "成功";
- //} else {
- // operLog.setStatus(1);
- // sta = "失败";
- //}
+ if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult)jsonResult).get("code")), "200")) {
+ operLog.setStatus(0);
+ sta = "成功";
} else {
operLog.setStatus(1);
sta = "失败";
@@ -164,26 +143,18 @@ public class OperationLogAspect {
ArrayList deviceIds = new ArrayList<>();
ArrayList deviceNames = new ArrayList<>();
- //ArrayList functionIds = new ArrayList<>();
String deviceType = "";
StringBuilder remark = new StringBuilder("在" + date + "调用");
if (operUrl.contains("batchFunctions")) {
//批量调用
+ JSONObject pointArg = null;
+ if (pointArgs[0] instanceof JSONObject){
+ pointArg = (JSONObject) pointArgs[0];
+ }else {
+ pointArg = (JSONObject) JSON.toJSON(pointArgs[0]);
+ }
+
- //if (loginUser != null) {
- // SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
- //
- // dcOperLog.setOperName(loginUser.getUsername());
- // dcOperLog.setDeptName(sysDept.getDeptName());
- // dcOperLog.setOperLocation(loginUser.getLoginLocation());
- // dcOperLog.setOperType("2");
- //} else {
- // dcOperLog.setOperType("1");
- //}
- //dcOperLog.setOperIp(IpUtils.getIpAddr(request));
- //dcOperLog.setOperTime(new Date());
-
- JSONObject pointArg = (JSONObject) pointArgs[0];
JSONArray devices = pointArg.getJSONArray("devices");
JSONArray functions = pointArg.getJSONArray("functions");
@@ -230,7 +201,6 @@ public class OperationLogAspect {
}
}
-
if (loginUser != null) {
SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
@@ -241,21 +211,26 @@ public class OperationLogAspect {
} else {
operLog.setOperType("1");
}
- operLog.setOperParam((Arrays.toString(pointArgs)));
+
+ JSONArray jsonArray = (JSONArray) JSON.toJSON(pointArgs);
+
+ operLog.setOperParam(String.valueOf(jsonArray));
operLog.setDcDeviceId(deviceIds.toString());
operLog.setDcDeviceName(deviceNames.toString());
operLog.setOperIp(IpUtils.getIpAddr(request));
operLog.setOperTime(new Date());
operLog.setDcDeviceType(deviceType);
operLog.setRemark(remark.toString());
- operLog.setJsonResult(String.valueOf(proceed));
+ operLog.setJsonResult(jsonResult.toString());
dcOperLogService.addDcOperLog(operLog);
-
} else if (operUrl.contains("functions")) {
+
LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DcDevice::getIotDeviceId, pointArgs[0]);
- DcDevice dcDevice = dcDeviceService.getById(Long.valueOf(String.valueOf(pointArgs[0])));
+ List list = dcDeviceService.list(lambdaQueryWrapper);
+ DcDevice dcDevice = list.get(0);
+
if (!Objects.isNull(dcDevice)) {
Long deviceId = dcDevice.getId();
@@ -271,7 +246,6 @@ public class OperationLogAspect {
remark.append(deviceName).append("的").append(hashMap).append("功能并且调用").append(sta).append("了");
-
if (loginUser != null) {
SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
operLog.setOperName(loginUser.getUsername());
@@ -281,7 +255,10 @@ public class OperationLogAspect {
} else {
operLog.setOperType("1");
}
- operLog.setOperParam((Arrays.toString(pointArgs)));
+
+ JSONObject pointArg = (JSONObject) JSON.toJSON(pointArgs);
+
+ operLog.setOperParam(String.valueOf(pointArg));
operLog.setDcDeviceId(deviceIds.toString());
operLog.setDcDeviceName(deviceNames.toString());
operLog.setOperIp(IpUtils.getIpAddr(request));
@@ -290,55 +267,6 @@ public class OperationLogAspect {
operLog.setJsonResult(remark.toString());
dcOperLogService.addDcOperLog(operLog);
-
- //
- ////DcDevice dcDevice = list.get(0);
- //operLog.setDcDeviceId(String.valueOf(dcDevice.getId()));
- //operLog.setDcDeviceName(dcDevice.getDeviceName());
- //deviceType = dcDevice.getDeviceType();
- //operLog.setDcDeviceType(deviceType);
- //if (loginUser != null) {
- // SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
- //
- // dcOperLog.setOperName(loginUser.getUsername());
- // dcOperLog.setDeptName(sysDept.getDeptName());
- // dcOperLog.setOperLocation(loginUser.getLoginLocation());
- // dcOperLog.setOperType("0");
- //} else {
- // dcOperLog.setOperType("1");
- //}
- //dcOperLog.setOperIp(IpUtils.getIpAddr(request));
- //dcOperLog.setOperParam(Arrays.toString(pointArgs));
- //dcOperLog.setJsonResult("设备" + dcDevice.getDeviceName() + "在" + date + "调用了" + hashMap + "功能并且调用" + sta + "了");
- ////dcOperLog.setJsonResult(dcDevice.getDeviceName() + "设备在" + date + "调用" + sta + "ID为" + dcDevice.getId() + "的设备功能标识为" + pointArgs[1].toString() + "的方法");
- //dcOperLog.setOperTime(new Date());
- //dcOperLogService.addDcOperLog(dcOperLog);
- //
- //
- //String remark = "设备在" + date + "调用" + sta + "ID为" + deviceIds + "的设备功能标识为" + functionIds + "的方法";
- //System.out.println(remark);
- //System.out.println(deviceIds.toString());
- //System.out.println(functionIds.toString());
- //DcOperLog operLog = new DcOperLog();
- //SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
- //operLog.setOperParam((Arrays.toString(pointArgs)));
- //operLog.setOperLocation(loginUser.getLoginLocation());
- //operLog.setOperName(loginUser.getUsername());
- //operLog.setDeptName(sysDept.getDeptName());
- //operLog.setDcDeviceId(deviceIds.toString());
- //operLog.setOperType("2");
- //operLog.setOperIp(IpUtils.getIpAddr(request));
- //operLog.setOperTime(new Date());
- //operLog.setDcDeviceType(deviceType);
- //operLog.setJsonResult(remark);
- //if (Objects.equals(state, "0")) {
- // operLog.setStatus(0);
- //} else {
- // operLog.setStatus(1);
- //}
- //dcOperLogService.addDcOperLog(operLog);
-
-
}
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobGroupServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobGroupServiceImpl.java
index 46f8bc39..43642183 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobGroupServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobGroupServiceImpl.java
@@ -113,6 +113,7 @@ public class DcBatchFunctionsJobGroupServiceImpl extends ServiceImpl dcBatchFunctionsJobs = dcBatchFunctionsJobService.listDcBatchFunctionsJob(dcBatchFunctionsJob);
for (DcBatchFunctionsJob batchFunctionsJob : dcBatchFunctionsJobs) {
+ batchFunctionsJob.setJobName(dcBatchFunctionsJobGroup.getGroupName());
boolean changeStatus = dcBatchFunctionsJobService.changeStatus(batchFunctionsJob, dcBatchFunctionsJobGroup.getStatus());
if (!changeStatus) {
return false;
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobServiceImpl.java
index 02f366f3..1f001728 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcBatchFunctionsJobServiceImpl.java
@@ -62,6 +62,7 @@ public class DcBatchFunctionsJobServiceImpl extends ServiceImpl detaileds = detailedConfigurations.stream().filter(detailed ->
Objects.equals((String) ((JSONObject) detailed).get("time"), time)
From cc7315e09c27cf5ebd00e8b3d783d1c607a6dbbb Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Mon, 29 Apr 2024 17:59:34 +0800
Subject: [PATCH 03/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AE=A1=E6=8E=A7?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/interfaces/OperationLogAspect.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 72f02414..297dc489 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
@@ -251,14 +251,14 @@ public class OperationLogAspect {
operLog.setOperName(loginUser.getUsername());
operLog.setDeptName(sysDept.getDeptName());
operLog.setOperLocation(loginUser.getLoginLocation());
- operLog.setOperType("2");
+ operLog.setOperType("0");
} else {
operLog.setOperType("1");
}
- JSONObject pointArg = (JSONObject) JSON.toJSON(pointArgs);
+ JSONArray jsonArray = (JSONArray) JSON.toJSON(pointArgs);
- operLog.setOperParam(String.valueOf(pointArg));
+ operLog.setOperParam(String.valueOf(jsonArray));
operLog.setDcDeviceId(deviceIds.toString());
operLog.setDcDeviceName(deviceNames.toString());
operLog.setOperIp(IpUtils.getIpAddr(request));
From 3c14dc0fd3ed3a658f4ca2e2c1df82cfcc86e647 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Mon, 6 May 2024 10:39:19 +0800
Subject: [PATCH 04/60] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=9F=A5=E8=AF=A2=E6=B0=94=E8=B1=A1=E8=AF=A6?=
=?UTF-8?q?=E7=BB=86=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DcMeteorologicalDetectorController.java | 7 +++++
.../domain/DcMeteorologicalDetectorData.java | 10 +++++++
.../DcMeteorologicalDetectorDataMapper.java | 7 +++++
.../IDcMeteorologicalDetectorDataService.java | 7 +++++
...MeteorologicalDetectorDataServiceImpl.java | 10 +++++++
.../DcMeteorologicalDetectorDataMapper.xml | 29 +++++++++++++++++++
6 files changed, 70 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java b/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java
index 4eaaf8d2..cd526d05 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java
@@ -32,6 +32,13 @@ public class DcMeteorologicalDetectorController extends BaseController {
List
+
+
+
+
+
+
\ No newline at end of file
From 1d5958b4958a5de26cfdb0e54dc1b24b6912f0be Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Tue, 7 May 2024 08:28:46 +0800
Subject: [PATCH 06/60] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9C=B0=E5=8C=BA?=
=?UTF-8?q?=E4=BF=A1=E6=81=AFController=20=E4=BC=98=E5=8C=96=E7=AE=A1?=
=?UTF-8?q?=E6=8E=A7=E8=AE=B0=E5=BD=95=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcDeviceController.java | 3 +
.../controller/DcRegionController.java | 118 ++++++++++++++++++
.../interfaces/OperationLogAspect.java | 13 +-
.../task/ScheduledTaskSchedulingTask.java | 1 +
4 files changed, 131 insertions(+), 4 deletions(-)
create mode 100644 zc-business/src/main/java/com/zc/business/controller/DcRegionController.java
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 dd305ca3..8a746918 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
@@ -444,6 +444,7 @@ public class DcDeviceController extends BaseController {
@PathVariable String deviceId,
@PathVariable String functionId,
@RequestBody HashMap props) throws HttpException, IOException {
+ //public AjaxResult invokedFunction(@PathVariable String deviceId,@PathVariable String functionId,@RequestBody HashMap props,int operType) throws HttpException, IOException { todo
return getAjaxResult(deviceId, functionId, props);
@@ -481,6 +482,7 @@ public class DcDeviceController extends BaseController {
@ApiOperation("批量设备功能调用")
@PostMapping("/batchFunctions")
@OperationLog(operUrl = "/business/device/batchFunctions")
+ //public AjaxResult batchInvokedFunction(@RequestBody Map props,int operType) throws HttpException, IOException, InterruptedException { todo
public AjaxResult batchInvokedFunction(@RequestBody Map props) throws HttpException, IOException, InterruptedException {
ArrayList devices = (ArrayList) props.get("devices");
ArrayList functions = (ArrayList) props.get("functions");
@@ -613,6 +615,7 @@ public class DcDeviceController extends BaseController {
@OperationLog(operUrl = "/business/device/batchFunctions")
public AjaxResult batchInvokedFunction(Object object) throws HttpException, IOException, InterruptedException {
+ //public AjaxResult batchInvokedFunction(Object object,int operType) throws HttpException, IOException, InterruptedException { todo
Map map = new ObjectMapper().convertValue(object, Map.class);
return batchInvokedFunction(map);
}
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcRegionController.java b/zc-business/src/main/java/com/zc/business/controller/DcRegionController.java
new file mode 100644
index 00000000..4e9c1032
--- /dev/null
+++ b/zc-business/src/main/java/com/zc/business/controller/DcRegionController.java
@@ -0,0 +1,118 @@
+package com.zc.business.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.zc.business.domain.DcRegion;
+import com.zc.business.service.impl.DcRegionServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 地区信息Controller
+ *
+ * @author zhaoxianglong
+ */
+@Api(tags = {"地区信息"})
+@RestController
+@RequestMapping("/business/region")
+public class DcRegionController extends BaseController {
+ @Resource
+ private DcRegionServiceImpl dcRegionService;
+
+ //*********************************道路增删改查******************************************
+
+ /**
+ * 分页查询道路列表
+ *
+ * @param dcRegion 请求参数
+ * @return 分页查询结果
+ */
+ @ApiOperation("分页查询道路列表")
+ @PreAuthorize("@ss.hasPermi('iot:road:list')")
+ @GetMapping("list")
+ public TableDataInfo listRoad(DcRegion dcRegion) {
+ return getDataTable(dcRegionService.list());
+ }
+
+ /**
+ * 无分页查询道路列表
+ *
+ * @param dcRegion 请求参数
+ * @return 查询结果
+ */
+ @ApiOperation("无分页查询道路列表")
+ @PreAuthorize("@ss.hasPermi('iot:road:query')")
+ @GetMapping("query")
+ public AjaxResult queryRoad(DcRegion dcRegion) {
+ return AjaxResult.success(dcRegionService.list());
+ }
+
+ /**
+ * 根据id查询道路信息
+ *
+ * @param id id
+ * @return 查询结果
+ */
+ @ApiOperation("根据id查询道路信息")
+ @PreAuthorize("@ss.hasPermi('iot:road:query')")
+ @GetMapping("{id}")
+ public AjaxResult getRoad(@PathVariable String id) {
+ return AjaxResult.success(dcRegionService.getById(id));
+ }
+
+
+ /**
+ * 新增
+ *
+ * @param dcRegion 新增参数
+ * @return 新增操作结果
+ */
+ @ApiOperation("新增")
+ @PreAuthorize("@ss.hasPermi('iot:road:add')")
+ @Log(title = "新增道路", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult addRoad(@Valid @RequestBody DcRegion dcRegion) {
+ return toAjax(dcRegionService.save(dcRegion));
+ }
+
+ /**
+ * 修改
+ *
+ * @param dcRegion 修改参数
+ * @return 修改操作结果
+ */
+ @ApiOperation("修改")
+ @PreAuthorize("@ss.hasPermi('iot:road:edit')")
+ @Log(title = "修改道路", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult editRoad(@Valid @RequestBody DcRegion dcRegion) {
+ LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();
+ lambdaQueryWrapper.eq(DcRegion::getId,dcRegion.getId());
+ return toAjax(dcRegionService.update(dcRegion,lambdaQueryWrapper));
+ }
+
+ /**
+ * 删除
+ *
+ * @param ids id集
+ * @return 删除操作结果
+ */
+ @ApiOperation("删除")
+ @PreAuthorize("@ss.hasPermi('iot:road:remove')")
+ @Log(title = "删除", businessType = BusinessType.DELETE)
+ @DeleteMapping("{ids}")
+ public AjaxResult removeRoad(@PathVariable List ids) {
+ return toAjax(dcRegionService.removeByIds(ids));
+ }
+
+}
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 297dc489..1402a3b8 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
@@ -121,6 +121,11 @@ public class OperationLogAspect {
}
Object[] pointArgs = joinPoint.getArgs();
+
+ //String operType = String.valueOf(pointArgs[pointArgs.length - 1]);
+ //operLog.setOperType(operType);
+
+
HttpServletRequest request;
try {
@@ -133,7 +138,7 @@ public class OperationLogAspect {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String date = df.format(new Date());
String sta = "";
- if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult)jsonResult).get("code")), "200")) {
+ if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200")) {
operLog.setStatus(0);
sta = "成功";
} else {
@@ -148,9 +153,9 @@ public class OperationLogAspect {
if (operUrl.contains("batchFunctions")) {
//批量调用
JSONObject pointArg = null;
- if (pointArgs[0] instanceof JSONObject){
+ if (pointArgs[0] instanceof JSONObject) {
pointArg = (JSONObject) pointArgs[0];
- }else {
+ } else {
pointArg = (JSONObject) JSON.toJSON(pointArgs[0]);
}
@@ -229,7 +234,7 @@ public class OperationLogAspect {
LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DcDevice::getIotDeviceId, pointArgs[0]);
List list = dcDeviceService.list(lambdaQueryWrapper);
- DcDevice dcDevice = list.get(0);
+ DcDevice dcDevice = list.get(0);
if (!Objects.isNull(dcDevice)) {
diff --git a/zc-business/src/main/java/com/zc/business/task/ScheduledTaskSchedulingTask.java b/zc-business/src/main/java/com/zc/business/task/ScheduledTaskSchedulingTask.java
index 8c17d150..445df902 100644
--- a/zc-business/src/main/java/com/zc/business/task/ScheduledTaskSchedulingTask.java
+++ b/zc-business/src/main/java/com/zc/business/task/ScheduledTaskSchedulingTask.java
@@ -29,6 +29,7 @@ public class ScheduledTaskSchedulingTask {
JSONArray jsonArray = JSONArray.parseArray(job.getCallParameter());
for (Object o : jsonArray) {
deviceController.batchInvokedFunction(o);
+ //deviceController.batchInvokedFunction(o,1); todo
}
}
}
From 48be807c4ebb7b0a86bec80ef6886f1ecc64d914 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Tue, 7 May 2024 11:11:28 +0800
Subject: [PATCH 07/60] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=B8=A0=E9=81=93?=
=?UTF-8?q?=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DcPublishingChannelsController.java | 36 +++++++++++++++++--
.../business/domain/DcPublishingChannels.java | 25 +++++++++++--
.../mapper/DcPublishingChannelsMapper.java | 9 +++++
.../service/IDcPublishingChannelsService.java | 6 ++++
.../impl/DcPublishingChannelsServiceImpl.java | 17 +++++++++
.../mapper/business/DcPublishManageMapper.xml | 2 +-
.../business/DcPublishingChannelsMapper.xml | 16 +++++++++
7 files changed, 106 insertions(+), 5 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java
index c7ccae60..a6983e17 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java
@@ -1,7 +1,11 @@
package com.zc.business.controller;
+import java.util.HashMap;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.DateUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -38,8 +42,8 @@ public class DcPublishingChannelsController extends BaseController
* 查询发布渠道列表
*/
@PreAuthorize("@ss.hasPermi('business:channels:list')")
- @GetMapping("/list")
- public TableDataInfo list(DcPublishingChannels dcPublishingChannels)
+ @PostMapping("/list")
+ public TableDataInfo list(@RequestBody DcPublishingChannels dcPublishingChannels)
{
startPage();
List list = dcPublishingChannelsService.selectDcPublishingChannelsList(dcPublishingChannels);
@@ -114,4 +118,32 @@ public class DcPublishingChannelsController extends BaseController
{
return toAjax(dcPublishingChannelsService.deleteDcPublishingChannelsByIds(ids));
}
+ /**
+ * 修改启用停用
+ */
+ @PostMapping("/updateEnabled")
+ public AjaxResult updateEnabled(@RequestBody DcPublishingChannels dcPublishingChannels)
+ {
+ Integer enabled = dcPublishingChannels.getEnabled();//状态
+ if (enabled==null){
+ return AjaxResult.error("参数错误");
+ }
+ if (enabled==2){ //启用状态,修改启用时间
+ dcPublishingChannels.setEnableDate(DateUtils.getNowDate());
+ }
+ return toAjax(dcPublishingChannelsService.updateEnabled(dcPublishingChannels));
+ }
+ //事件调度处置事件推送发布渠道
+ @PostMapping("/eventPublishChannels")
+ public AjaxResult eventPublishChannels(@RequestBody HashMap map)
+ {
+ if (map==null||map.size()==0){
+ return AjaxResult.error("参数错误");
+ }
+ String eventId = map.get("eventId").toString();
+ if (StringUtils.isBlank(eventId)){
+ return AjaxResult.error("参数错误");
+ }
+ return AjaxResult.success(dcPublishingChannelsService.eventPublishChannels(eventId));
+ }
}
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcPublishingChannels.java b/zc-business/src/main/java/com/zc/business/domain/DcPublishingChannels.java
index adb0a72f..d3e8a928 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcPublishingChannels.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcPublishingChannels.java
@@ -43,13 +43,34 @@ public class DcPublishingChannels extends BaseEntity
@Excel(name = "启用日期", readConverterExp = "$column.readConverterExp()")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date enableDate;
-
+ //查询参数
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+ private Date startDate;
+ //查询参数
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+ private Date endDate;
public void setId(Long id)
{
this.id = id;
}
- public Long getId()
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public void setStartDate(Date startDate) {
+ this.startDate = startDate;
+ }
+
+ public Date getEndDate() {
+ return endDate;
+ }
+
+ public void setEndDate(Date endDate) {
+ this.endDate = endDate;
+ }
+
+ public Long getId()
{
return id;
}
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishingChannelsMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishingChannelsMapper.java
index d08e2fe4..96557b9c 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishingChannelsMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishingChannelsMapper.java
@@ -1,7 +1,9 @@
package com.zc.business.mapper;
+import java.util.HashMap;
import java.util.List;
import com.zc.business.domain.DcPublishingChannels;
+import org.apache.ibatis.annotations.Param;
/**
* 发布渠道Mapper接口
@@ -60,4 +62,11 @@ public interface DcPublishingChannelsMapper
int deleteDcPublishingChannelsByIds(Long[] ids);
//查询数据类型是否已经存在
public List selectChannelsDataCategory(Integer dataCategory);
+ //修改启用停用
+ int updateEnabled(DcPublishingChannels dcPublishingChannels);
+ //查询事件类型
+ public String eventType(@Param("id")String id);
+ //事件调度处置事件推送发布渠道
+ public DcPublishingChannels eventPublishChannels(@Param("dataCategory") String dataCategory);
+
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishingChannelsService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishingChannelsService.java
index 70d73cbd..8488a4a3 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcPublishingChannelsService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishingChannelsService.java
@@ -1,7 +1,9 @@
package com.zc.business.service;
+import java.util.HashMap;
import java.util.List;
import com.zc.business.domain.DcPublishingChannels;
+import org.apache.ibatis.annotations.Param;
/**
* 发布渠道Service接口
@@ -60,4 +62,8 @@ public interface IDcPublishingChannelsService
int deleteDcPublishingChannelsById(Long id);
//查询数据类型是否已经存在
public List selectChannelsDataCategory(Integer dataCategory);
+ //修改启用停用
+ int updateEnabled(DcPublishingChannels dcPublishingChannels);
+ //事件调度处置事件推送发布渠道
+ public DcPublishingChannels eventPublishChannels(String eventId);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishingChannelsServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishingChannelsServiceImpl.java
index f9e8f5ab..fa1461a0 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishingChannelsServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishingChannelsServiceImpl.java
@@ -1,7 +1,9 @@
package com.zc.business.service.impl;
+import java.util.HashMap;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zc.business.mapper.DcPublishingChannelsMapper;
@@ -54,6 +56,7 @@ public class DcPublishingChannelsServiceImpl implements IDcPublishingChannelsSer
public int insertDcPublishingChannels(DcPublishingChannels dcPublishingChannels)
{
dcPublishingChannels.setCreateTime(DateUtils.getNowDate());
+ dcPublishingChannels.setEnabled(0);//新增时默认状态为停用
return dcPublishingChannelsMapper.insertDcPublishingChannels(dcPublishingChannels);
}
@@ -98,4 +101,18 @@ public class DcPublishingChannelsServiceImpl implements IDcPublishingChannelsSer
public List selectChannelsDataCategory(Integer dataCategory) {
return dcPublishingChannelsMapper.selectChannelsDataCategory(dataCategory);
}
+ //修改启用停用
+ @Override
+ public int updateEnabled(DcPublishingChannels dcPublishingChannels) {
+ return dcPublishingChannelsMapper.updateEnabled(dcPublishingChannels);
+ }
+ //事件调度处置事件推送发布渠道
+ @Override
+ public DcPublishingChannels eventPublishChannels(String eventId) {
+ String type = dcPublishingChannelsMapper.eventType(eventId);//事件类型
+ if (StringUtils.isBlank(type)){
+ return null;
+ }
+ return dcPublishingChannelsMapper.eventPublishChannels(type);
+ }
}
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index e9341438..5cf86603 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY manage.event_id
- ORDER BY manage.create_time
+ ORDER BY event.create_time desc
From 932b79d7fee771cd3051170afee6691cd7fa6e43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Tue, 7 May 2024 16:09:01 +0800
Subject: [PATCH 10/60] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E8=83=BD=E8=A7=81?=
=?UTF-8?q?=E5=BA=A6=20=E7=AD=89=E7=BA=A70=20500m?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/message/device/handler/DeviceMessageHandler.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
index c1410b23..d8378b55 100644
--- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
+++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
@@ -238,8 +238,10 @@ public class DeviceMessageHandler {
/* JSONObject combinedData = new JSONObject();
combinedData.put("address", otherConfig);*/
dcWarning.setOtherConfig(otherConfig.toString());
+ if (dcWarning.getWarningLevel() !=0){
+ dcWarningService.insertDcWarning(dcWarning);
+ }
- dcWarningService.insertDcWarning(dcWarning);
}
//无法判定事件结束上报的类型有:占用应急车道,路障,逆行,机占非
From 8560d794b45833a3bf2f9a105566f8a7a3cb5d9a Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Wed, 8 May 2024 09:18:44 +0800
Subject: [PATCH 11/60] =?UTF-8?q?=E5=8F=91=E5=B8=83=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DcPublishingChannelsController.java | 6 +-----
.../zc/business/domain/DcPublishManage.java | 20 +++++++++++++++++++
.../service/impl/DcWarningServiceImpl.java | 3 +++
.../mapper/business/DcPublishManageMapper.xml | 8 ++++++++
4 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java
index a6983e17..afe6ae94 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishingChannelsController.java
@@ -100,11 +100,7 @@ public class DcPublishingChannelsController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody DcPublishingChannels dcPublishingChannels)
{
- List channelsList = dcPublishingChannelsService.
- selectChannelsDataCategory(dcPublishingChannels.getDataCategory());
- if (channelsList!=null&&channelsList.size()>0){
- return AjaxResult.error("事件类型已存在");
- }
+
return toAjax(dcPublishingChannelsService.updateDcPublishingChannels(dcPublishingChannels));
}
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java b/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
index 89524611..ad4fe4ef 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
@@ -118,6 +118,26 @@ public class DcPublishManage extends BaseEntity
private String facilityName;
//事件状态:0-待确认1-处理中2-已完成
private Integer eventState;
+ //关联情报板id
+ private Long logId;
+ //关联语音广告发布id
+ private Long voiceId;
+
+ public Long getLogId() {
+ return logId;
+ }
+
+ public void setLogId(Long logId) {
+ this.logId = logId;
+ }
+
+ public Long getVoiceId() {
+ return voiceId;
+ }
+
+ public void setVoiceId(Long voiceId) {
+ this.voiceId = voiceId;
+ }
public Integer getEventState() {
return eventState;
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
index 092a3abe..6f08a2bb 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
@@ -183,6 +183,9 @@ public class DcWarningServiceImpl implements IDcWarningService
redisCache.setCacheObject(WARNINGDATA+key,dataId,Integer.parseInt(strategyTime),TimeUnit.MINUTES);//重新设置延迟时间
return dcWarningMapper.updateOtherConfig(dataId, jsonObject.toString(),dcWarning.getEndTime());//修改数据库配置
}
+ if (redisValueTwo==null){ //如果传进来的事件未配置策略,在这里出入默认的过去时间值
+ dcWarning.setEndTime(DateUtils.getObtainDateAfter(60));//注入过期时间(默认值为60分钟)
+ }
//事件推送至 Websocket
extracted(dcWarning);
return dcWarningMapper.insertDcWarning(dcWarning);//如果没有配置策略直接加入数据库;
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index 5cf86603..65358545 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -32,6 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
@@ -123,6 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
remark,
update_time,
create_time,
+ log_id,
+ voice_id,
#{eventId},
@@ -144,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{remark},
#{updateTime},
#{createTime},
+ #{logId},
+ #{voiceId},
@@ -169,6 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
remark = #{remark},
update_time = #{updateTime},
create_time = #{createTime},
+ log_id = #{logId},
+ voice_id = #{voiceId},
where id = #{id}
From ce8c79dc003345469f092123e9679ec3e2a73992 Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Wed, 8 May 2024 09:56:36 +0800
Subject: [PATCH 12/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../interfaces/OperationLogAspect.java | 43 ++++++++++++++++++-
1 file changed, 41 insertions(+), 2 deletions(-)
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 1402a3b8..2e622d94 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
@@ -14,8 +14,11 @@ import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.service.ISysDeptService;
import com.zc.business.domain.DcDevice;
import com.zc.business.domain.DcOperLog;
+import com.zc.business.domain.DcPublishManage;
import com.zc.business.service.IDcDeviceService;
import com.zc.business.service.IDcOperLogService;
+import com.zc.business.service.IDcPublishInfoService;
+import com.zc.business.service.IDcPublishManageService;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
@@ -108,6 +111,7 @@ public class OperationLogAspect {
ISysDeptService deptService = SpringUtils.getBean(ISysDeptService.class);
IDcOperLogService dcOperLogService = SpringUtils.getBean(IDcOperLogService.class);
IDcDeviceService dcDeviceService = SpringUtils.getBean(IDcDeviceService.class);
+ IDcPublishManageService dcPublishManageService = SpringUtils.getBean(IDcPublishManageService.class);
try {
DcOperLog operLog = new DcOperLog();
@@ -177,6 +181,7 @@ public class OperationLogAspect {
deviceType = dcDevice.getDeviceType();
+
deviceIds.add(String.valueOf(deviceId));
deviceNames.add(deviceName);
@@ -190,7 +195,10 @@ public class OperationLogAspect {
"发布语音广播" :
String.valueOf(
((HashMap) (DEVICEFUNCTIONNAME.get(deviceType)))
- .get(function.getString("functionId")));
+ .get(function.getString("functionId")) == null ?
+ "未知方法" :
+ ((HashMap) (DEVICEFUNCTIONNAME.get(deviceType)))
+ .get(function.getString("functionId")));
remark.append("调用").append(hashMap).append("功能").append(sta);
@@ -227,7 +235,38 @@ public class OperationLogAspect {
operLog.setDcDeviceType(deviceType);
operLog.setRemark(remark.toString());
operLog.setJsonResult(jsonResult.toString());
- dcOperLogService.addDcOperLog(operLog);
+ dcOperLogService.save(operLog);
+
+
+ if ((Objects.equals(deviceType, "2") || Objects.equals(deviceType, "5")) && Objects.nonNull(operLog.getId())) {
+ DcPublishManage dcPublishManage = new DcPublishManage();
+
+ if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200")) {
+ dcPublishManage.setPublishStatus(1);//发布状态1-成功2-失败
+ } else {
+ dcPublishManage.setPublishStatus(2);//发布状态1-成功2-失败
+ }
+
+ if (loginUser != null) {
+ dcPublishManage.setPublisher(loginUser.getUsername());//发布人
+ } else {
+ dcPublishManage.setPublisher("系统定时调用");//发布人
+ }
+ dcPublishManage.setPublishTime(new Date());//发布时间
+ dcPublishManage.setCreateTime(new Date());//创建时间
+
+ if (Objects.equals(deviceType, "2")) {
+ dcPublishManage.setLogId(Long.valueOf(operLog.getId()));//发布的如果的情报板传对应id
+ dcPublishManage.setPublishChannels(4);
+ } else {
+ dcPublishManage.setVoiceId(Long.valueOf(operLog.getId()));//发布的如果是语音传对应id
+ dcPublishManage.setPublishChannels(7);
+ }
+
+ dcPublishManage.setContentDetails(remark.toString());
+ dcPublishManageService.insertDcPublishManage(dcPublishManage);
+ }
+
} else if (operUrl.contains("functions")) {
From 1a241d1da4c12b23cc5ef960abbb9d843a33b220 Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Wed, 8 May 2024 11:55:35 +0800
Subject: [PATCH 13/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/interfaces/OperationLogAspect.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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 2e622d94..f223851f 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
@@ -255,11 +255,10 @@ public class OperationLogAspect {
dcPublishManage.setPublishTime(new Date());//发布时间
dcPublishManage.setCreateTime(new Date());//创建时间
+ dcPublishManage.setLogId(Long.valueOf(operLog.getId()));//发布的如果的情报板传对应id
if (Objects.equals(deviceType, "2")) {
- dcPublishManage.setLogId(Long.valueOf(operLog.getId()));//发布的如果的情报板传对应id
dcPublishManage.setPublishChannels(4);
} else {
- dcPublishManage.setVoiceId(Long.valueOf(operLog.getId()));//发布的如果是语音传对应id
dcPublishManage.setPublishChannels(7);
}
From a0cb61db6c66a97d7358c13062a3da8db456412b Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Wed, 8 May 2024 14:27:47 +0800
Subject: [PATCH 14/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E8=AE=BE?=
=?UTF-8?q?=E5=A4=87=E5=9C=A8=E7=BA=BF=E8=B7=AF=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/controller/StatusController.java | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/StatusController.java b/zc-business/src/main/java/com/zc/business/controller/StatusController.java
index 957be29a..c86f20f8 100644
--- a/zc-business/src/main/java/com/zc/business/controller/StatusController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/StatusController.java
@@ -1,4 +1,5 @@
package com.zc.business.controller;
+
import com.github.pagehelper.util.StringUtil;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
@@ -21,7 +22,10 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
@@ -130,19 +134,27 @@ public class StatusController extends BaseController {
List listStatus = statusService.deviceStatusListById(status);
// Calculate average successRate by day
- Map averageSuccessRateByDay = listStatus.stream()
- .collect(Collectors.groupingBy(s -> s.getTime().getDayOfMonth(),
+ Map averageSuccessRateByDay = listStatus.stream()
+ .collect(Collectors.groupingBy(s -> {
+ // 使用 DateTimeFormatter 格式化日期
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ String formattedDate = s.getTime().format(formatter);
+ return formattedDate;
+ },
Collectors.averagingDouble(s -> Double.parseDouble(s.getSuccessRate().replace("%", "")))));
if (averageSuccessRateByDay.isEmpty()) {
return AjaxResult.success("暂无数据");
}
- // Round average successRate to two decimal places
- Map roundedAverageSuccessRateByDay = averageSuccessRateByDay.entrySet().stream()
- .collect(Collectors.toMap(Map.Entry::getKey, entry -> Math.round(entry.getValue() * 100.0) / 100.0));
+ averageSuccessRateByDay.keySet().forEach(item -> {
+
+ BigDecimal bigDecimal = new BigDecimal(averageSuccessRateByDay.get(item));
+ averageSuccessRateByDay.put(item, bigDecimal.setScale(2, RoundingMode.HALF_UP).doubleValue());
+
+ });
- return AjaxResult.success(roundedAverageSuccessRateByDay);
+ return AjaxResult.success(new TreeMap<>(averageSuccessRateByDay));
}
//按类型划分设备
From e14b28a563687670f7607f42992c6da3c8932dbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Wed, 8 May 2024 16:17:03 +0800
Subject: [PATCH 15/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E6=8E=A8=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/service/impl/DcEventServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 3feebbaf..9ed91296 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -219,7 +219,7 @@ public class DcEventServiceImpl extends ServiceImpl impl
//TODO 插入多个收费站
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
- if (dcEventId != null) {//不等于空 事件处置页面 修改
+ if (dcEventId != null && !dcEventId.equals("")) {//不等于空 事件处置页面 修改
dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类
DcEvent dcEvent1 = new DcEvent();
dcEvent1.setId(dcEventId);//事件id
From 749b84468654c3b5dc36d34174c89d1a4e6efdaa Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Wed, 8 May 2024 17:18:36 +0800
Subject: [PATCH 16/60] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcPublishManageController.java | 19 ++++++
.../zc/business/domain/DcPublishManage.java | 9 +--
.../mapper/DcPublishManageMapper.java | 6 ++
.../service/IDcPublishManageService.java | 7 ++
.../impl/DcPublishManageServiceImpl.java | 16 +++++
.../mapper/business/DcPublishManageMapper.xml | 65 +++++++++++++++++--
6 files changed, 110 insertions(+), 12 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
index 94908506..86b185ba 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
@@ -114,4 +114,23 @@ public class DcPublishManageController extends BaseController
{
return toAjax(dcPublishManageService.deleteDcPublishManageByIds(ids));
}
+ //统计服务,今日发布渠道分析
+ @PostMapping("/statisticsPublishManage")
+ public AjaxResult statisticsPublishManage()
+ {
+ return AjaxResult.success(dcPublishManageService.statisticsPublishManage());
+ }
+ //统计服务,今日发布事件类型分析
+ @PostMapping("/eventTypePublishManage")
+ public AjaxResult eventTypePublishManage()
+ {
+ return AjaxResult.success(dcPublishManageService.eventTypePublishManage());
+ }
+ //统计服务,今日发布趋势分析
+ @PostMapping("/trendsPublishManage")
+ public AjaxResult releaseTrendsPublishManage()
+ {
+ return AjaxResult.success(dcPublishManageService.releaseTrendsPublishManage());
+ }
+
}
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java b/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
index ad4fe4ef..abed367f 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
@@ -120,8 +120,7 @@ public class DcPublishManage extends BaseEntity
private Integer eventState;
//关联情报板id
private Long logId;
- //关联语音广告发布id
- private Long voiceId;
+
public Long getLogId() {
return logId;
@@ -131,13 +130,7 @@ public class DcPublishManage extends BaseEntity
this.logId = logId;
}
- public Long getVoiceId() {
- return voiceId;
- }
- public void setVoiceId(Long voiceId) {
- this.voiceId = voiceId;
- }
public Integer getEventState() {
return eventState;
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
index 07853632..7076aaf3 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
@@ -67,4 +67,10 @@ public interface DcPublishManageMapper
public DcPublishManage selectPublishManage(@Param("dataCategory")Integer dataCategory);
//查询信息发布列表
public List> selectDcPublishManageListMap(DcPublishManage dcPublishManage);
+ //统计今日发布渠道分析
+ public List> statisticsPublishManage();
+ //统计今日发布事件类型分析
+ public List> eventTypePublishManage();
+ //统计今日发布趋势分析
+ public List> releaseTrendsPublishManage();
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
index e2d48f76..a0333386 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
@@ -1,5 +1,6 @@
package com.zc.business.service;
+import java.util.HashMap;
import java.util.List;
import com.zc.business.domain.DcPublishManage;
@@ -59,4 +60,10 @@ public interface IDcPublishManageService
* @return 结果
*/
int deleteDcPublishManageById(Long id);
+ //统计今日发布渠道分析
+ public List> statisticsPublishManage();
+ //统计今日发布事件类型分析
+ public List> eventTypePublishManage();
+ //统计今日发布趋势分析
+ public List> releaseTrendsPublishManage();
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
index 9541ae3e..a6602b50 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
@@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.HashMap;
import java.util.List;
/**
@@ -109,4 +110,19 @@ public class DcPublishManageServiceImpl implements IDcPublishManageService
{
return dcPublishManageMapper.deleteDcPublishManageById(id);
}
+ //统计今日发布渠道分析
+ @Override
+ public List> statisticsPublishManage() {
+ return dcPublishManageMapper.statisticsPublishManage();
+ }
+ //统计今日发布事件类型分析
+ @Override
+ public List> eventTypePublishManage() {
+ return dcPublishManageMapper.eventTypePublishManage();
+ }
+ //统计今日发布趋势分析
+ @Override
+ public List> releaseTrendsPublishManage() {
+ return dcPublishManageMapper.releaseTrendsPublishManage();
+ }
}
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index 65358545..8db6431a 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ manage.event_id is not null
and event.event_state = #{eventState}
and event.event_type = #{eventType}
and manage.publish_status = #{publishStatus}
@@ -103,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
insert into dc_publish_manage
@@ -126,7 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time,
create_time,
log_id,
- voice_id,
+
#{eventId},
@@ -149,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{updateTime},
#{createTime},
#{logId},
- #{voiceId},
+
@@ -176,7 +178,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time = #{updateTime},
create_time = #{createTime},
log_id = #{logId},
- voice_id = #{voiceId},
where id = #{id}
@@ -191,4 +192,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
+
+ SELECT
+ p.publish_channels publishChannels,
+ COALESCE(SUM(CASE WHEN m.publish_channels = p.publish_channels THEN 1 ELSE 0 END), 0) AS number
+ FROM (
+ SELECT 1 AS publish_channels UNION ALL
+ SELECT 2 AS publish_channels UNION ALL
+ SELECT 3 AS publish_channels UNION ALL
+ SELECT 4 AS publish_channels UNION ALL
+ SELECT 5 AS publish_channels UNION ALL
+ SELECT 6 UNION ALL
+ SELECT 7
+ ) AS p
+ LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels
+ AND DATE(m.publish_time) = CURDATE()
+ GROUP BY p.publish_channels
+ ORDER BY p.publish_channels;
+
+
+ SELECT event.event_type AS eventType, COUNT(manage.event_id) AS number
+ FROM dc_event AS event
+ LEFT JOIN dc_publish_manage AS manage ON event.id = manage.event_id AND DATE(manage.publish_time) = CURDATE()
+ GROUP BY event.event_type
+ ORDER BY event.event_type;
+
+
+ SELECT h.hour,
+ pc.publish_channels publishChannels,
+ COALESCE(m.number, 0) AS number
+ FROM (
+ SELECT 0 AS hour
+ UNION ALL
+ SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL
+ SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL
+ SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL
+ SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL
+ SELECT 13 UNION ALL SELECT 14 UNION ALL SELECT 15 UNION ALL
+ SELECT 16 UNION ALL SELECT 17 UNION ALL SELECT 18 UNION ALL
+ SELECT 19 UNION ALL SELECT 20 UNION ALL SELECT 21 UNION ALL
+ SELECT 22 UNION ALL
+ SELECT 23
+ ) AS h
+ CROSS JOIN (
+ SELECT 1 AS publish_channels
+ UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+ SELECT 5 UNION ALL SELECT 6 UNION ALL
+ SELECT 7
+ ) AS pc
+ LEFT JOIN (
+ SELECT HOUR(publish_time) AS hour, publish_channels, COUNT(*)AS number
+ FROM dc_publish_manage
+ WHERE DATE(publish_time) = CURDATE()
+ GROUP BY HOUR(publish_time), publish_channels
+ ) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels
+ ORDER BY h.hour, pc.publish_channels;
+
\ No newline at end of file
From a0ae98869275eaf6d9796aaaf78c0031b926f91b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Thu, 9 May 2024 09:12:56 +0800
Subject: [PATCH 17/60] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=A9=E6=B0=94?=
=?UTF-8?q?=E7=AD=89=E7=BA=A7=20=E8=BF=87=E6=BB=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../message/device/handler/DeviceMessageHandler.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
index d8378b55..805ab2c3 100644
--- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
+++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
@@ -238,11 +238,16 @@ public class DeviceMessageHandler {
/* JSONObject combinedData = new JSONObject();
combinedData.put("address", otherConfig);*/
dcWarning.setOtherConfig(otherConfig.toString());
- if (dcWarning.getWarningLevel() !=0){
+ //异常天气等级 过滤
+ if (data.getInteger("warningType") == VISIBILITY_LEVEL) {
+ int WarningLevel=data.getInteger("visibilityLevel");
+ if (WarningLevel !=0){
+ dcWarningService.insertDcWarning(dcWarning);
+ }
+ }else {
dcWarningService.insertDcWarning(dcWarning);
}
-
}
//无法判定事件结束上报的类型有:占用应急车道,路障,逆行,机占非
//非持续性事件:拥堵、
From 6d89a90ee52b753455135ba9a838a0cc0214e840 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Thu, 9 May 2024 09:43:58 +0800
Subject: [PATCH 18/60] =?UTF-8?q?1.=E9=87=8D=E8=A6=81=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E5=86=85=E5=AE=B9=E7=94=9F=E6=88=90=202.word?=
=?UTF-8?q?=E7=94=9F=E6=88=90=E5=B7=A5=E5=85=B7=E7=B1=BB=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DcEventImportantFileController.java | 20 +-
.../service/IDcEventImportantFileService.java | 11 +
.../impl/DcEventImportantFileServiceImpl.java | 240 +++++++++++++++++-
.../java/com/zc/business/utils/PoiUtil.java | 12 +-
4 files changed, 270 insertions(+), 13 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java
index 2ea37c94..29d8cf4a 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java
@@ -9,16 +9,10 @@ import javax.servlet.http.HttpServletResponse;
import com.zc.business.utils.PoiUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -86,7 +80,7 @@ public class DcEventImportantFileController extends BaseController
{
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("wordTemplate/importantTemplate.docx");
- XWPFDocument document = null;
+ XWPFDocument document = null;
try {
@@ -171,4 +165,12 @@ public class DcEventImportantFileController extends BaseController
public AjaxResult getImportantFileStatus(@PathVariable("eventId") String eventId){
return dcEventImportantFileService.getImportantFileStatus(eventId);
}
+
+ @ApiOperation("生成重要事件文件内容")
+ @PostMapping("/generate")
+ public AjaxResult generate(@ApiParam(value="事件id", name="eventId", required=true) @RequestParam("eventId") String eventId,
+ @ApiParam(value="类型 1:初报,2续报,3终报", name="type", required=true) @RequestParam("type") String type){
+ return dcEventImportantFileService.generate(eventId,type);
+ }
+
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java b/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java
index 223b11de..bc862eb3 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java
@@ -68,4 +68,15 @@ public interface IDcEventImportantFileService
* @return 结果
*/
AjaxResult getImportantFileStatus(String eventId);
+
+ /**
+ * @Description 生成重要事件文件内容
+ *
+ * @author liuwenge
+ * @date 2024/5/8 15:50
+ * @param eventId 事件id
+ * @param type 类型 1:初报,2续报,3终报
+ * @return com.ruoyi.common.core.domain.AjaxResult
+ */
+ AjaxResult generate(String eventId,String type);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
index 12513d6c..a9e2ed1d 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
@@ -1,17 +1,20 @@
package com.zc.business.service.impl;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
import java.util.Date;
+import java.util.HashSet;
import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
-import com.zc.business.domain.DcEventProcess;
+import com.zc.business.domain.*;
+import com.zc.business.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import com.zc.business.mapper.DcEventImportantFileMapper;
-import com.zc.business.domain.DcEventImportantFile;
import com.zc.business.service.IDcEventImportantFileService;
/**
@@ -27,6 +30,16 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
private DcEventImportantFileMapper dcEventImportantFileMapper;
@Autowired
private DcEventProcessServiceImpl dcEventProcessService;
+ @Autowired
+ private DcEventServiceImpl dcEventService;
+ @Autowired
+ private DcEventMapper dcEventMapper;
+ @Autowired
+ private DcEventAccidentMapper dcEventAccidentMapper;
+ @Autowired
+ private DcEventTrafficCongestionMapper dcEventTrafficCongestionMapper;
+ @Autowired
+ private DcEventImportantMapper dcEventImportantMapper;
/**
* 查询重要事件文件内容
@@ -153,4 +166,225 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
return AjaxResult.success(num);
}
+ /**
+ * @Description 生成重要事件文件内容
+ *
+ * @author liuwenge
+ * @date 2024/5/8 15:51
+ * @param eventId 事件id
+ * @param type 类型 1:初报,2续报,3终报
+ * @return com.ruoyi.common.core.domain.AjaxResult
+ */
+ @Override
+ public AjaxResult generate(String eventId,String type){
+
+ if (StringUtils.isEmpty(eventId) || StringUtils.isEmpty(type)){
+ return AjaxResult.error("参数错误!");
+ }
+ DcEvent dcEvent = dcEventMapper.selectDcEventById(eventId);
+ if (dcEvent == null){
+ return AjaxResult.error("事件查询失败,请检查事件id是否正确!");
+ }
+ String eventType = dcEvent.getEventType().toString();
+ if ("1".equals(eventType) && "4".equals(eventType)){
+ return AjaxResult.error("事件类型错误!");
+ }
+
+ DcEventImportantFile dcEventImportantFile = new DcEventImportantFile();
+ dcEventImportantFile.setFromDept("齐鲁高速股份有限公司");
+ SimpleDateFormat df = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分");
+ String createTime = df.format(new Date());
+ dcEventImportantFile.setCreateTime(createTime);
+
+ String title = "关于G35济菏高速" + dcEvent.getStakeMark() + "交通事故";
+ if ("1".equals(type)){
+ title += "的初报";
+ } else if ("2".equals(type)){
+ title += "的续报";
+ } else if ("3".equals(type)){
+ title += "的终报";
+ }
+ dcEventImportantFile.setTitle(title);
+
+ dcEventImportantFile.setToDept("智慧管理中心:");
+
+ String content = "\t" + df.format(dcEvent.getOccurrenceTime()) + ",G35济菏高速" + dcEvent.getStakeMark();
+ if ("1".equals(dcEvent.getDirection()) || "菏泽方向".equals(dcEvent.getDirection())) {
+ content += "菏泽方向";
+ } else if ("3".equals(dcEvent.getDirection()) || "济南方向".equals(dcEvent.getDirection())) {
+ content += "济南方向";
+ }
+ content += "发生";
+ if ("1-1".equals(dcEvent.getEventSubclass()) || "追尾".equals(dcEvent.getEventSubclass())) {
+ content += "追尾";
+ } else if ("1-2".equals(dcEvent.getEventSubclass()) || "侧翻".equals(dcEvent.getEventSubclass())) {
+ content += "侧翻";
+ } else if ("1-3".equals(dcEvent.getEventSubclass()) || "撞护栏".equals(dcEvent.getEventSubclass())) {
+ content += "撞护栏";
+ } else if ("1-4".equals(dcEvent.getEventSubclass()) || "自燃".equals(dcEvent.getEventSubclass())) {
+ content += "自燃";
+ } else if ("1-5".equals(dcEvent.getEventSubclass()) || "其他".equals(dcEvent.getEventSubclass())){
+ content += "其他";
+ } else if ("4-1".equals(dcEvent.getEventSubclass()) || "道路拥堵".equals(dcEvent.getEventSubclass())){
+ content += "道路拥堵";
+ } else if ("4-2".equals(dcEvent.getEventSubclass()) || "立交拥堵".equals(dcEvent.getEventSubclass())){
+ content += "立交拥堵";
+ } else if ("4-3".equals(dcEvent.getEventSubclass()) || "收费站拥堵".equals(dcEvent.getEventSubclass())){
+ content += "收费站拥堵";
+ } else if ("4-4".equals(dcEvent.getEventSubclass()) || "服务区拥堵".equals(dcEvent.getEventSubclass())){
+ content += "服务区拥堵";
+ }
+ content += "事故。";
+
+ if ("1".equals(type) || "2".equals(type)) {
+
+ //占用车道
+ if (StringUtils.isNotEmpty(dcEvent.getLang())) {
+ String[] langArr = dcEvent.getLang().split(",");
+ content += "事故占用";
+ for (String lang : langArr) {
+ if ("0".equals(lang)) {
+ content += "应急车道、";
+ } else if ("1".equals(lang)) {
+ content += "行1车道、";
+ } else if ("2".equals(lang)) {
+ content += "行2车道、";
+ } else if ("3".equals(lang)) {
+ content += "行3车道、";
+ } else if ("4".equals(lang)) {
+ content += "行4车道、";
+ }
+ }
+ content = content.substring(0, content.length() - 1);
+ content += ",";
+
+ String[] langAll = {"1", "2", "3", "4", "0"};
+ HashSet diff = new HashSet<>(Arrays.asList(langAll));
+ diff.removeAll(Arrays.asList(langArr));
+ for (String s : diff) {
+ if ("0".equals(s)) {
+ content += "应急车道、";
+ } else if ("1".equals(s)) {
+ content += "行1车道、";
+ } else if ("2".equals(s)) {
+ content += "行2车道、";
+ } else if ("3".equals(s)) {
+ content += "行3车道、";
+ } else if ("4".equals(s)) {
+ content += "行4车道、";
+ }
+ }
+ content = content.substring(0, content.length() - 1);
+ content += "正常通行,";
+
+
+ } else {
+ content += "行1车道、行2车道、行3车道、行4车道、应急车道正常通行,";
+ }
+
+ //压车情况
+ if ("1".equals(eventType)) {
+ DcEventAccident dcEventAccident = dcEventAccidentMapper.selectDcEventAccidentById(eventId);
+ if (dcEventAccident != null && dcEventAccident.getTrafficJam() != null && dcEventAccident.getTrafficJam() > 0f) {
+ content += "压车" + dcEventAccident.getTrafficJam() + "公里。\n\t";
+ } else {
+ content += "无压车。\n\t";
+ }
+ } else if ("4".equals(eventType)){
+ DcEventTrafficCongestion dcEventTrafficCongestion = dcEventTrafficCongestionMapper.selectDcEventTrafficCongestionById(eventId);
+ if (dcEventTrafficCongestion != null && dcEventTrafficCongestion.getCongestionMileage() != null && dcEventTrafficCongestion.getCongestionMileage() > 0f) {
+ content += "压车" + dcEventTrafficCongestion.getCongestionMileage() + "公里。\n\t";
+ } else {
+ content += "无压车。\n\t";
+ }
+ }
+
+ //到达现场情况
+ DcEventImportant dcEventImportant = dcEventImportantMapper.selectDcEventImportantByEventId(eventId);
+ if (dcEventImportant == null){
+ dcEventImportant = new DcEventImportant();
+ dcEventImportant.setEventId(eventId);
+ dcEventImportant.setTrafficPoliceStatus(0);
+ dcEventImportant.setMedicalStatus(0);
+ dcEventImportant.setFireStatus(0);
+ dcEventImportant.setBoardStatus(0);
+ dcEventImportantMapper.insertDcEventImportant(dcEventImportant);
+ }
+ if (StringUtils.isNotEmpty(dcEventImportant.getPlateNumber())) {
+ content += "现场事故车辆及车牌号信息:" + dcEventImportant.getPlateNumber() + "。";
+ }
+
+ String arrived = "";
+ String notArrived = "路管、";
+ if (dcEventImportant.getTrafficPoliceStatus() == 1) {
+ arrived += "交警、";
+ } else {
+ notArrived += "交警、";
+ }
+ if (dcEventImportant.getMedicalStatus() == 1) {
+ arrived += "医疗、";
+ } else {
+ notArrived += "医疗、";
+ }
+ if (dcEventImportant.getFireStatus() == 1) {
+ arrived += "消防、";
+ } else {
+ notArrived += "消防、";
+ }
+ if (arrived.length() > 0) {
+ arrived = arrived.substring(0, arrived.length() - 1);
+ content += arrived + "等单位已到达现场。";
+ }
+
+
+ if (StringUtils.isNotEmpty(dcEventImportant.getCurrentProgress())) {
+ content += "事故目前处置进度为" + dcEventImportant.getCurrentProgress() + "。";
+ }
+ if (StringUtils.isNotEmpty(dcEventImportant.getTakeSteps())) {
+ content += "已采取的措施:" + dcEventImportant.getTakeSteps() + "。";
+ }
+ if (StringUtils.isNotEmpty(dcEventImportant.getTakeSteps())) {
+ content += "在" + dcEventImportant.getTakeSteps() + "进行分流。";
+ }
+
+ if (dcEventImportant.getBoardStatus() == 1) {
+ content += "事故点后方情报板已经做好信息提示。";
+ }
+ content += "\n";
+
+ notArrived = notArrived.substring(0, notArrived.length() - 1);
+ content += "\t" + notArrived + "等单位正在赶往现场。";
+
+ if ("1".equals(type)) {
+ content += "具体情况稍后报告。";
+ } else if ("2".equals(type)) {
+ if (dcEvent.getEstimatedEndTime() != null) {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("HH时mm分");
+ content += "预计结束时间为" + dateFormat.format(dcEvent.getEstimatedEndTime()) + "。";
+ }
+ }
+
+ dcEventImportantFile.setContent(content);
+
+
+ } else if ("3".equals(type)){
+ content += "\n\t";
+ SimpleDateFormat dateFormat = new SimpleDateFormat("HH时mm分");
+ content += dateFormat.format(new Date()) + ",事故处理完毕,道路恢复畅通。";
+ dcEventImportantFile.setContent(content);
+
+ } else {
+ return AjaxResult.error("文件类型错误!");
+ }
+
+
+ SysUser user = SecurityUtils.getLoginUser().getUser();
+ dcEventImportantFile.setCreateName(user.getNickName());
+ dcEventImportantFile.setPhoneNumber(user.getPhonenumber());
+ dcEventImportantFile.setType(type);
+ dcEventImportantFile.setStatus("0");
+
+ return AjaxResult.success(dcEventImportantFile);
+ }
+
}
diff --git a/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java b/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java
index 5727021c..768f44ae 100644
--- a/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java
+++ b/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java
@@ -516,7 +516,17 @@ public class PoiUtil {
//判断key在Map中是否存在
if (textMap.containsKey(runsText)) {
if (value != null) {
- run.setText(value.toString(), 0);
+ String valueStr = value.toString().replaceAll("\\\\t"," ");
+ String[] valueArr = valueStr.split("\\\\n");
+ if (valueArr.length > 1) {
+ for (int index = 0; index < valueArr.length; index++) {
+ run.setText(valueArr[index], index);
+ run.addBreak();
+ }
+ } else {
+ run.setText(valueStr,0);
+ }
+
} else {
run.setText("", 0);
}
From 42e8f015fbedb743c95b01b43b2c4bd706f63f1d Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Thu, 9 May 2024 10:32:25 +0800
Subject: [PATCH 19/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E8=A6=81?=
=?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=96=87=E4=BB=B6=E5=86=85=E5=AE=B9=E7=94=9F?=
=?UTF-8?q?=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/DcEventImportantFileServiceImpl.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
index a9e2ed1d..f6ee4e7b 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
@@ -196,7 +196,7 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
String createTime = df.format(new Date());
dcEventImportantFile.setCreateTime(createTime);
- String title = "关于G35济菏高速" + dcEvent.getStakeMark() + "交通事故";
+ String title = "关于G35济菏高速" + dcEvent.getStakeMark() + dcEvent.getStringEventType();
if ("1".equals(type)){
title += "的初报";
} else if ("2".equals(type)){
@@ -223,7 +223,7 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
content += "撞护栏";
} else if ("1-4".equals(dcEvent.getEventSubclass()) || "自燃".equals(dcEvent.getEventSubclass())) {
content += "自燃";
- } else if ("1-5".equals(dcEvent.getEventSubclass()) || "其他".equals(dcEvent.getEventSubclass())){
+ } else if ("1-5".equals(dcEvent.getEventSubclass()) || "其他事故".equals(dcEvent.getEventSubclass())){
content += "其他";
} else if ("4-1".equals(dcEvent.getEventSubclass()) || "道路拥堵".equals(dcEvent.getEventSubclass())){
content += "道路拥堵";
@@ -383,6 +383,7 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
dcEventImportantFile.setPhoneNumber(user.getPhonenumber());
dcEventImportantFile.setType(type);
dcEventImportantFile.setStatus("0");
+ dcEventImportantFile.setEventId(eventId);
return AjaxResult.success(dcEventImportantFile);
}
From 0a3336637acab203e9c3bc6e32fac122b08dba85 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Thu, 9 May 2024 10:42:06 +0800
Subject: [PATCH 20/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E8=A6=81?=
=?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=96=87=E4=BB=B6=E5=86=85=E5=AE=B9=E7=94=9F?=
=?UTF-8?q?=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/DcEventImportantFileServiceImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
index f6ee4e7b..251de5de 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
@@ -343,8 +343,8 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
if (StringUtils.isNotEmpty(dcEventImportant.getTakeSteps())) {
content += "已采取的措施:" + dcEventImportant.getTakeSteps() + "。";
}
- if (StringUtils.isNotEmpty(dcEventImportant.getTakeSteps())) {
- content += "在" + dcEventImportant.getTakeSteps() + "进行分流。";
+ if (StringUtils.isNotEmpty(dcEventImportant.getDiversionPoint())) {
+ content += "在" + dcEventImportant.getDiversionPoint() + "进行分流。";
}
if (dcEventImportant.getBoardStatus() == 1) {
From ff11c2ef668ba8cbc76c80fdee484737766e23e7 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Thu, 9 May 2024 11:09:38 +0800
Subject: [PATCH 21/60] =?UTF-8?q?word=E7=94=9F=E6=88=90=E5=B7=A5=E5=85=B7?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
zc-business/src/main/java/com/zc/business/utils/PoiUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java b/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java
index 768f44ae..a85915f2 100644
--- a/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java
+++ b/zc-business/src/main/java/com/zc/business/utils/PoiUtil.java
@@ -521,7 +521,7 @@ public class PoiUtil {
if (valueArr.length > 1) {
for (int index = 0; index < valueArr.length; index++) {
run.setText(valueArr[index], index);
- run.addBreak();
+ run.addCarriageReturn();
}
} else {
run.setText(valueStr,0);
From 55a4c53051868c0438268affda416114e71a6900 Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Thu, 9 May 2024 11:30:26 +0800
Subject: [PATCH 22/60] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcDeviceController.java | 16 ++++++++++++
.../java/com/zc/business/domain/DcDevice.java | 26 +++++++++++++++++++
2 files changed, 42 insertions(+)
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 8a746918..3ab0011e 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
@@ -11,6 +11,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
import com.zc.business.constant.DeviceTypeConstants;
import com.zc.business.domain.DcDevice;
import com.zc.business.interfaces.OperationLog;
@@ -30,6 +31,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.*;
@@ -182,6 +184,20 @@ public class DcDeviceController extends BaseController {
}
+ /**
+ * 导出
+ * @param response 响应
+ * @param iotDevice 导入数据结果
+ */
+ @PreAuthorize("@ss.hasPermi('iot:device:export')")
+ @Log(title = "导出设备", businessType = BusinessType.EXPORT)
+ @PostMapping("export")
+ public void exportDevice(HttpServletResponse response, DcDevice iotDevice) {
+ List list = dcDeviceService.listDevice(iotDevice);
+ ExcelUtil util = new ExcelUtil<>(DcDevice.class);
+ util.exportExcel(response, list, "设备数据");
+ }
+
//***********************************物联设备接口**************************************
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcDevice.java b/zc-business/src/main/java/com/zc/business/domain/DcDevice.java
index ed37f702..0bd60eb7 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcDevice.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcDevice.java
@@ -3,6 +3,7 @@ package com.zc.business.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
+import com.ruoyi.common.annotation.Excel;
import com.zc.business.utils.StakeMarkUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -28,55 +29,80 @@ public class DcDevice {
public static final String ONLINE = "1";
@ApiModelProperty("ID")
+ @Excel(name = "设备ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("物联设备ID")
+ @Excel(name = "物联设备ID")
private String iotDeviceId;
@ApiModelProperty("组ID")
+ @Excel(name = "组ID")
private Long groupId;
@ApiModelProperty("产品ID")
+ @Excel(name = "产品ID")
private Long productId;
@ApiModelProperty("桩号")
+ @Excel(name = "桩号")
private String stakeMark;
@ApiModelProperty("方向1-上行(菏泽方向),2-中,3-下行(济南方向)")
+ @Excel(name = "方向")
private String direction;
@ApiModelProperty("设备名称")
+ @Excel(name = "设备名称")
private String deviceName;
@ApiModelProperty("设备编号")
+ @Excel(name = "设备编号")
private String deviceCode;
@ApiModelProperty("设备类型")
+ @Excel(name = "设备类型")
private String deviceType;
@ApiModelProperty("所属网段")
+ @Excel(name = "所属网段")
private String networkSegment;
@ApiModelProperty("设备图片")
+ @Excel(name = "设备图片")
private String deviceImg;
@ApiModelProperty("安装日期")
+ @Excel(name = "安装日期")
private Date installationDate;
@ApiModelProperty("生产日期")
+ @Excel(name = "生产日期")
private Date productionDate;
@ApiModelProperty("使用年限")
+ @Excel(name = "使用年限")
private String durableYears;
@ApiModelProperty("安装位置")
+ @Excel(name = "安装位置")
private String installationSite;
@ApiModelProperty("设备状态")
+ @Excel(name = "设备状态")
private String deviceState;
@ApiModelProperty("使用状态")
+ @Excel(name = "使用状态")
private Integer useState;
@ApiModelProperty("其他配置")
+ @Excel(name = "其他配置")
private String otherConfig;
@ApiModelProperty("备注")
+ @Excel(name = "备注")
private String remark;
@ApiModelProperty("设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等")
+ @Excel(name = "设施归属类型")
private String facilitiesType;
@ApiModelProperty("设备ip")
+ @Excel(name = "设备ip")
private String deviceIp;
@ApiModelProperty("范围桩号")
+ @Excel(name = "范围桩号")
private String stakeMarkRange;
@ApiModelProperty("创建时间")
+ @Excel(name = "创建时间")
private Date createTime;
@ApiModelProperty("修改时间")
+ @Excel(name = "修改时间")
private Date updateTime;
@ApiModelProperty("子类型")
+ @Excel(name = "子类型")
private String childType;
@TableField(exist = false)
private String longitude;
From bf2a13f8587a759b691d402aa423bb0f73b21a4f Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Thu, 9 May 2024 16:03:00 +0800
Subject: [PATCH 23/60] =?UTF-8?q?=E6=8E=A8=E9=80=81=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/message/device/handler/DeviceMessageHandler.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
index 805ab2c3..77310221 100644
--- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
+++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
@@ -16,6 +16,7 @@ import com.zc.business.enums.WarningSourceEnum;
import com.zc.business.enums.WarningStateEnum;
import com.zc.business.enums.WarningSubclassEnum;
import com.zc.business.service.*;
+import com.zc.common.core.websocket.WebSocketService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -38,6 +39,8 @@ public class DeviceMessageHandler {
private final int EVENT_STATE = 1;
private final int EVENTEND_STATE = 4;
private final int VISIBILITY_LEVEL = 8;
+ private final String DEVICE_STATE = "deviceState";
+
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource
@@ -77,6 +80,7 @@ public class DeviceMessageHandler {
// 批量更新设备状态
dcDeviceService.batchUpdate(dcDevices);
+ WebSocketService.broadcast(DEVICE_STATE, dcDevices); //推送设备状态更新
// 批量更新中间库设备状态
middleDatabaseService.updateMiddleDatabaseDeviceByList(dcDevices);
}
From ab56f755de3376d632b6ec82d39da93f5bac4100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Thu, 9 May 2024 17:35:18 +0800
Subject: [PATCH 24/60] =?UTF-8?q?=E6=94=B6=E8=B4=B9=E8=BF=90=E8=90=A5=20?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/AESEncryptionController.java | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 zc-business/src/main/java/com/zc/business/controller/AESEncryptionController.java
diff --git a/zc-business/src/main/java/com/zc/business/controller/AESEncryptionController.java b/zc-business/src/main/java/com/zc/business/controller/AESEncryptionController.java
new file mode 100644
index 00000000..9d2cf0b0
--- /dev/null
+++ b/zc-business/src/main/java/com/zc/business/controller/AESEncryptionController.java
@@ -0,0 +1,53 @@
+package com.zc.business.controller;
+
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.service.ISysConfigService;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+/**
+ *
+ */
+@Api(tags = "收费运营接口")
+@RestController
+@RequestMapping("/AESEncryption")
+public class AESEncryptionController extends BaseController {
+ @Autowired
+ private ISysConfigService configService;
+
+ @GetMapping()
+ public AjaxResult AESEncryption() throws Exception{
+ String secretKey= configService.selectConfigByKey("AESKey");//密钥
+ String iv= configService.selectConfigByKey("AESIv");// 偏移量(初始化向量)
+ String plainText = SecurityUtils.getLoginUser().getUser().getRoles().get(0).getRoleKey(); // 要加密的文本
+ // 转换密钥和IV为字节数组
+ byte[] keyBytes = secretKey.getBytes(StandardCharsets.UTF_8);
+ byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+ // 创建密钥规格
+ SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
+ // 创建初始化向量规格
+ IvParameterSpec ivSpec = new IvParameterSpec(ivBytes);
+ // 创建并初始化Cipher对象,指定为AES/CBC/PKCS5Padding模式
+ Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+ cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);
+ // 将要加密的文本转换为字节数组
+ byte[] plainBytes = plainText.getBytes(StandardCharsets.UTF_8);
+ // 执行加密操作
+ byte[] encryptedBytes = cipher.doFinal(plainBytes);
+ // 将加密后的字节数组使用Base64编码,并输出为字符串
+ String encryptedBase64 = Base64.getEncoder().encodeToString(encryptedBytes);
+ String url=configService.selectConfigByKey("AESEncryption")+encryptedBase64;
+ return AjaxResult.success(url);
+ }
+}
From 14160b1cd34a3f959280e1e5428c86d891a36500 Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Thu, 9 May 2024 18:14:39 +0800
Subject: [PATCH 25/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/service/impl/DcOperLogServiceImpl.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcOperLogServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcOperLogServiceImpl.java
index 4972cf88..a7ca7493 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcOperLogServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcOperLogServiceImpl.java
@@ -69,6 +69,9 @@ public class DcOperLogServiceImpl extends ServiceImpl
Date: Thu, 9 May 2024 18:38:39 +0800
Subject: [PATCH 26/60] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=8B=E4=BB=B6=20?=
=?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=9F=A5=E8=AF=A2=E4=B8=BA=E7=A9=BA=E8=B7=B3?=
=?UTF-8?q?=E5=87=BA=E5=BE=AA=E7=8E=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/service/impl/DcEventServiceImpl.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 9ed91296..4f67491b 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -745,6 +745,9 @@ public class DcEventServiceImpl extends ServiceImpl impl
int i7 = -1;
for (String id : ids) {
DcEvent dcEvent = dcEventMapper.selectDcEventMainById(id);
+ if (dcEvent==null){
+ continue;
+ }
int eventType = Math.toIntExact(dcEvent.getEventType());
i7 = dcEventMapper.deleteDcEventById(id);
From f71b94889a0ccd3d9f46de48990e6af7f8ed76eb Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Thu, 9 May 2024 19:46:45 +0800
Subject: [PATCH 27/60] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcPublishManageController.java | 11 ++++++++++-
.../com/zc/business/mapper/DcPublishManageMapper.java | 5 ++++-
.../zc/business/service/IDcPublishManageService.java | 2 ++
.../service/impl/DcPublishManageServiceImpl.java | 5 +++++
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
index 86b185ba..33ac456d 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
@@ -1,5 +1,6 @@
package com.zc.business.controller;
+import java.util.HashMap;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@@ -132,5 +133,13 @@ public class DcPublishManageController extends BaseController
{
return AjaxResult.success(dcPublishManageService.releaseTrendsPublishManage());
}
-
+ //统计服务,月发布渠道趋势分析
+ @PostMapping("/monthTrendsPublishManage")
+ public AjaxResult monthTrendsPublishManage(@RequestBody DcPublishManage dcPublishManage)
+ {
+ if (dcPublishManage==null||dcPublishManage.getPublishTime()==null){
+ return AjaxResult.error("参数错误");
+ }
+ return AjaxResult.success(dcPublishManageService.monthTrendsPublishManage(dcPublishManage));
+ }
}
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
index 7076aaf3..28263919 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
@@ -53,7 +53,8 @@ public interface DcPublishManageMapper
* @return 结果
*/
int deleteDcPublishManageById(Long id);
-
+ //删除事件发布记录 params 事件id
+ int deleteDcPublishManageEventId(String eventId);
/**
* 批量删除信息发布管理记录
*
@@ -73,4 +74,6 @@ public interface DcPublishManageMapper
public List> eventTypePublishManage();
//统计今日发布趋势分析
public List> releaseTrendsPublishManage();
+ //统计月发布趋势分析
+ public List> monthTrendsPublishManage(DcPublishManage dcPublishManage);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
index a0333386..18c2165b 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
@@ -66,4 +66,6 @@ public interface IDcPublishManageService
public List> eventTypePublishManage();
//统计今日发布趋势分析
public List> releaseTrendsPublishManage();
+ //统计月发布趋势分析
+ public List> monthTrendsPublishManage(DcPublishManage dcPublishManage);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
index a6602b50..808c7e30 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
@@ -125,4 +125,9 @@ public class DcPublishManageServiceImpl implements IDcPublishManageService
public List> releaseTrendsPublishManage() {
return dcPublishManageMapper.releaseTrendsPublishManage();
}
+ //统计月发布趋势分析
+ @Override
+ public List> monthTrendsPublishManage(DcPublishManage dcPublishManage) {
+ return dcPublishManageMapper.monthTrendsPublishManage(dcPublishManage);
+ }
}
From 88bd49c1ff0a54d4a802c678de5648e65426d5fd Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Thu, 9 May 2024 19:47:05 +0800
Subject: [PATCH 28/60] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/business/DcPublishManageMapper.xml | 31 ++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index 8db6431a..d6df52a6 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -185,13 +185,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from dc_publish_manage where id = #{id}
-
+
+ delete from dc_publish_manage where event_id = #{eventId}
+
delete from dc_publish_manage where id in
#{id}
+
SELECT
p.publish_channels publishChannels,
@@ -248,4 +251,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels
ORDER BY h.hour, pc.publish_channels;
+
+ SELECT h.hour, pc.publish_channels, COALESCE(m.number, 0) AS number
+ FROM (
+ SELECT 0 AS hour UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL
+ SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL
+ SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL
+ SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL
+ SELECT 13 UNION ALL SELECT 14 UNION ALL SELECT 15 UNION ALL
+ SELECT 16 UNION ALL SELECT 17 UNION ALL SELECT 18 UNION ALL
+ SELECT 19 UNION ALL SELECT 20 UNION ALL SELECT 21 UNION ALL
+ SELECT 22 UNION ALL SELECT 23
+ ) AS h
+ CROSS JOIN (
+ SELECT 1 AS publish_channels UNION ALL
+ SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+ SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7
+ ) AS pc
+ LEFT JOIN (
+ SELECT HOUR(publish_time) AS hour, publish_channels, COUNT(*) AS number
+ FROM dc_publish_manage
+ WHERE YEAR(publish_time) = YEAR(CURDATE())
+ AND MONTH(publish_time) = MONTH(#{publishTime})
+ GROUP BY HOUR(publish_time), publish_channels
+ ) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels
+ ORDER BY h.hour, pc.publish_channels;
+
\ No newline at end of file
From 2c155937c76f67adc0ec0decd43352bcd0c85c6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Thu, 9 May 2024 19:48:51 +0800
Subject: [PATCH 29/60] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E5=85=B3=E8=81=94=E4=BF=A1=E6=81=AF=E5=8F=91=E5=B8=83=E5=88=A0?=
=?UTF-8?q?=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/service/impl/DcEventServiceImpl.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 4f67491b..6ef7a01f 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -77,6 +77,9 @@ public class DcEventServiceImpl extends ServiceImpl impl
@Autowired
private IDcEventProcessService dcEventProcessService;
+ @Autowired
+ private DcPublishManageMapper dcPublishManageMapper;
+
private final String HAPPEN = "发生";
private final String EVENT = "事件";
private final String SUBEVENT = "0";
@@ -216,7 +219,7 @@ public class DcEventServiceImpl extends ServiceImpl impl
//交通管制
case 3:
if (dcEvent.getDcEventTrafficControl() != null) {
- //TODO 插入多个收费站
+ // 插入多个收费站
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
if (dcEventId != null && !dcEventId.equals("")) {//不等于空 事件处置页面 修改
@@ -748,6 +751,8 @@ public class DcEventServiceImpl extends ServiceImpl impl
if (dcEvent==null){
continue;
}
+ // 删除信息发布记录
+ dcPublishManageMapper.deleteDcPublishManageEventId(id);
int eventType = Math.toIntExact(dcEvent.getEventType());
i7 = dcEventMapper.deleteDcEventById(id);
@@ -830,7 +835,7 @@ public class DcEventServiceImpl extends ServiceImpl impl
*/
@Override
public DcEvent selectEventSubclassById(int eventType, String id) {
- //todo
+ //
DcEvent dcEvent = dcEventMapper.selectDcEventById(id);
List processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(Math.toIntExact(dcEvent.getEventType()));
dcEvent.setProcessConfigList(processConfigList);
From 5d7543b2bbaeb1e9576bad894effa4ad5126893f Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Thu, 9 May 2024 21:01:06 +0800
Subject: [PATCH 30/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E7=94=A8?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/controller/DcDeviceController.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 3ab0011e..ab94bd0a 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
@@ -517,7 +517,7 @@ public class DcDeviceController extends BaseController {
resultArray.add(result);
AjaxResult ajaxResult = (AjaxResult) result.get("result");
if (!Objects.equals(String.valueOf(ajaxResult.get("code")), "200")) {
- return AjaxResult.error();
+ return AjaxResult.error(200,"500");
}
}
}
From 3ea7e9d0d88fe121ee34f04debcea71308210ef6 Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Fri, 10 May 2024 08:52:28 +0800
Subject: [PATCH 31/60] =?UTF-8?q?=E6=8E=A8=E9=80=81=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9B=B4=E6=96=B0=E6=B6=88=E6=81=AF=E4=B8=AD?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87=E7=BC=96=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../message/device/handler/DeviceMessageHandler.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
index 77310221..59ca08df 100644
--- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
+++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java
@@ -21,6 +21,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.text.ParseException;
@@ -79,6 +80,12 @@ public class DeviceMessageHandler {
// 批量更新设备状态
dcDeviceService.batchUpdate(dcDevices);
+ dcDevices.forEach(dcDevice -> {
+ DcDevice device = redisCache.getCacheMapValue(RedisKeyConstants.DC_DEVICES, dcDevice.getIotDeviceId());
+ if (!ObjectUtils.isEmpty(device)) {
+ dcDevice.setId(device.getId());
+ }
+ });
WebSocketService.broadcast(DEVICE_STATE, dcDevices); //推送设备状态更新
// 批量更新中间库设备状态
From adca995427cd0884c4e1380cc2f1767087d4064f Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Fri, 10 May 2024 15:17:01 +0800
Subject: [PATCH 32/60] =?UTF-8?q?=E9=87=8D=E8=A6=81=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E5=86=85=E5=AE=B9=E5=8F=82=E6=95=B0=E9=AA=8C?=
=?UTF-8?q?=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DcEventImportantFileController.java | 4 ++--
.../service/IDcEventImportantFileService.java | 4 ++--
.../impl/DcEventImportantFileServiceImpl.java | 17 +++++++++++++----
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java
index 29d8cf4a..e276c604 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcEventImportantFileController.java
@@ -132,7 +132,7 @@ public class DcEventImportantFileController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody DcEventImportantFile dcEventImportantFile)
{
- return toAjax(dcEventImportantFileService.insertDcEventImportantFile(dcEventImportantFile));
+ return dcEventImportantFileService.insertDcEventImportantFile(dcEventImportantFile);
}
/**
@@ -143,7 +143,7 @@ public class DcEventImportantFileController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody DcEventImportantFile dcEventImportantFile)
{
- return toAjax(dcEventImportantFileService.updateDcEventImportantFile(dcEventImportantFile));
+ return dcEventImportantFileService.updateDcEventImportantFile(dcEventImportantFile);
}
/**
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java b/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java
index bc862eb3..b1653132 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcEventImportantFileService.java
@@ -35,7 +35,7 @@ public interface IDcEventImportantFileService
* @param dcEventImportantFile 重要事件文件内容
* @return 结果
*/
- int insertDcEventImportantFile(DcEventImportantFile dcEventImportantFile);
+ AjaxResult insertDcEventImportantFile(DcEventImportantFile dcEventImportantFile);
/**
* 修改重要事件文件内容
@@ -43,7 +43,7 @@ public interface IDcEventImportantFileService
* @param dcEventImportantFile 重要事件文件内容
* @return 结果
*/
- int updateDcEventImportantFile(DcEventImportantFile dcEventImportantFile);
+ AjaxResult updateDcEventImportantFile(DcEventImportantFile dcEventImportantFile);
/**
* 批量删除重要事件文件内容
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
index 251de5de..799dadea 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantFileServiceImpl.java
@@ -72,8 +72,11 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
* @return 结果
*/
@Override
- public int insertDcEventImportantFile(DcEventImportantFile dcEventImportantFile)
+ public AjaxResult insertDcEventImportantFile(DcEventImportantFile dcEventImportantFile)
{
+ if (StringUtils.isEmpty(dcEventImportantFile.getEventId())){
+ return AjaxResult.error("事件id不能为空!");
+ }
int i = dcEventImportantFileMapper.insertDcEventImportantFile(dcEventImportantFile);
if (i > 0){
if (StringUtils.isNotEmpty(dcEventImportantFile.getStatus()) && "1".equals(dcEventImportantFile.getStatus())) {
@@ -94,8 +97,9 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
dcEventProcess.setContext(context);
dcEventProcessService.insertDcEventProcess(dcEventProcess);
}
+ return AjaxResult.success("新增成功!");
}
- return i;
+ return AjaxResult.error("新增失败!");
}
/**
@@ -105,8 +109,11 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
* @return 结果
*/
@Override
- public int updateDcEventImportantFile(DcEventImportantFile dcEventImportantFile)
+ public AjaxResult updateDcEventImportantFile(DcEventImportantFile dcEventImportantFile)
{
+ if (dcEventImportantFile.getId() == null || StringUtils.isEmpty(dcEventImportantFile.getEventId())){
+ return AjaxResult.error("参数错误!");
+ }
int i = dcEventImportantFileMapper.updateDcEventImportantFile(dcEventImportantFile);
if (i > 0){
if (StringUtils.isNotEmpty(dcEventImportantFile.getStatus()) && "1".equals(dcEventImportantFile.getStatus())){
@@ -126,8 +133,10 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer
dcEventProcess.setContext(context);
dcEventProcessService.insertDcEventProcess(dcEventProcess);
}
+ return AjaxResult.success("修改成功");
+
}
- return i;
+ return AjaxResult.error("修改失败");
}
/**
From cff0cc6378c571bc5fe1eacff24219d890f62106 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Fri, 10 May 2024 15:34:01 +0800
Subject: [PATCH 33/60] =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=B8=85=E9=9A=9C=20?=
=?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/service/impl/DcEventServiceImpl.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 6ef7a01f..1c6d7623 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -1426,6 +1426,10 @@ public class DcEventServiceImpl extends ServiceImpl impl
if (i > 0) {
return AjaxResult.error("已跳过清障,无法重复操作!");
}
+ DcEvent dcEvent = dcEventMapper.selectDcEventById(eventId);
+ if (dcEvent.getEventType() == null || (dcEvent.getEventType() != 1 && dcEvent.getEventType() != 2 && dcEvent.getEventType() != 6)){
+ return AjaxResult.error("该事件类型无需清障!");
+ }
//事件处置流程记录
DcEventProcess dcEventProcess = new DcEventProcess();
From 8257d5f87a9943aaaf5536ce707fc9891ce95bc3 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Fri, 10 May 2024 15:47:54 +0800
Subject: [PATCH 34/60] =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=B8=85=E9=9A=9C=20?=
=?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=8A=B6=E6=80=81=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/service/impl/DcEventServiceImpl.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 1c6d7623..be761f69 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.ruoyi.system.service.ISysDeptService;
import com.zc.business.domain.*;
@@ -1430,6 +1431,9 @@ public class DcEventServiceImpl extends ServiceImpl impl
if (dcEvent.getEventType() == null || (dcEvent.getEventType() != 1 && dcEvent.getEventType() != 2 && dcEvent.getEventType() != 6)){
return AjaxResult.error("该事件类型无需清障!");
}
+ if (dcEvent.getEventState() != null && dcEvent.getEventState() == 2){
+ return AjaxResult.error("该事件已结束,无法进行操作!");
+ }
//事件处置流程记录
DcEventProcess dcEventProcess = new DcEventProcess();
From ac54b69a08912e87a04b918996121eac5a2799b0 Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Fri, 10 May 2024 16:17:35 +0800
Subject: [PATCH 35/60] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E9=A2=84=E6=A1=88=E5=85=B3=E8=81=94=E8=A1=A8id=E7=B1=BB?=
=?UTF-8?q?=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/domain/EventPlanAssoc.java | 2 +-
.../impl/DcEmergencyPlansServiceImpl.java | 2 --
.../mapper/business/EventPlanAssocMapper.xml | 16 +++++++++++++---
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java b/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java
index d41b8c5d..98b5f157 100644
--- a/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java
+++ b/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java
@@ -22,7 +22,7 @@ import java.util.Date;
public class EventPlanAssoc {
@ApiModelProperty("预案事件关联id")
- private String id;
+ private Long id;
/**
* 所属事件编号
*/
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 6a61c259..c0dddd88 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
@@ -743,8 +743,6 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", ""));
eventPlanAssoc.setControlResult(resultArray.toJSONString());
eventPlanAssoc.setCreateTime(DateUtils.getNowDate());
- // IdUtils.fastSimpleUUID()
- eventPlanAssoc.setId(IdUtils.fastSimpleUUID());
eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc);
resultObject.put("eventPlanAssocId",eventPlanAssoc.getId());
}else {
diff --git a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
index 58efcd2c..abda69d3 100644
--- a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
@@ -4,10 +4,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
+
+
+
+
+
+
+
+
+
+
+
insert into event_plan_assoc
- id,
event_id,
emergency_plans_id,
control_device,
@@ -17,7 +28,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
control_result,
- #{id},
#{eventId},
#{emergencyPlansId},
#{controlDevice},
From 613a81a88dfcf9b4327b7c2a84c458a6ab49be77 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Sat, 11 May 2024 16:17:40 +0800
Subject: [PATCH 36/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=BD=AE?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zc/business/service/impl/DcEventServiceImpl.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index be761f69..970b0110 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -1423,10 +1423,7 @@ public class DcEventServiceImpl extends ServiceImpl impl
@Override
public AjaxResult skipClear(String eventId) {
- int i = dcEventMapper.selectClearInfo(eventId);
- if (i > 0) {
- return AjaxResult.error("已跳过清障,无法重复操作!");
- }
+
DcEvent dcEvent = dcEventMapper.selectDcEventById(eventId);
if (dcEvent.getEventType() == null || (dcEvent.getEventType() != 1 && dcEvent.getEventType() != 2 && dcEvent.getEventType() != 6)){
return AjaxResult.error("该事件类型无需清障!");
@@ -1434,6 +1431,10 @@ public class DcEventServiceImpl extends ServiceImpl impl
if (dcEvent.getEventState() != null && dcEvent.getEventState() == 2){
return AjaxResult.error("该事件已结束,无法进行操作!");
}
+ int i = dcEventMapper.selectClearInfo(eventId);
+ if (i > 0) {
+ return AjaxResult.error("该事件已清障结束,无法进行操作!");
+ }
//事件处置流程记录
DcEventProcess dcEventProcess = new DcEventProcess();
@@ -1443,7 +1444,7 @@ public class DcEventServiceImpl extends ServiceImpl impl
dcEventProcess.setProcessId(6L);
dcEventProcess.setProcessName("清障结束");
- dcEventProcess.setContext("选择不需要清障");
+ dcEventProcess.setContext("选择无需清障");
dcEventProcessService.insertDcEventProcess(dcEventProcess);
return AjaxResult.success("无需清障成功");
}
From 8ac3263680c44a56c82aed1d3522e07aec02092c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Sat, 11 May 2024 17:54:56 +0800
Subject: [PATCH 37/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/mapper/business/DcEventMapper.xml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
index 02766ac8..030387c9 100644
--- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
@@ -677,7 +677,7 @@
event_source_tips = #{eventSourceTips},
in_tunnel = #{inTunnel},
road_id = #{roadId},
- road_id = #{lang},
+ lang = #{lang},
event_title = #{eventTitle},
occurrence_time = #{occurrenceTime},
is_perceived = #{isPerceived},
@@ -711,12 +711,11 @@
event_source_tips = #{eventSourceTips},
in_tunnel = #{inTunnel},
road_id = #{roadId},
- road_id = #{lang},
+ lang = #{lang},
event_title = #{eventTitle},
occurrence_time = #{occurrenceTime},
is_perceived = #{isPerceived},
dimension = #{dimension},
-
event_nature = #{eventNature},
link_id = #{linkId},
From e220381919fbfa3fe8cf392b74a0fc475de5a36c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Sat, 11 May 2024 18:30:11 +0800
Subject: [PATCH 38/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6=20?=
=?UTF-8?q?=E5=90=8C=E4=B8=80=E4=BA=8B=E4=BB=B6=E7=8A=B6=E6=80=81=E5=B7=B2?=
=?UTF-8?q?=E8=A2=AB=E4=BF=AE=E6=94=B9=20=E8=BF=94=E5=9B=9E=E6=88=90?=
=?UTF-8?q?=E5=8A=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/zc/business/domain/DcEvent.java | 5 ++++-
.../zc/business/service/impl/DcEventServiceImpl.java | 12 +++++++++++-
.../main/resources/mapper/business/DcEventMapper.xml | 3 +++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEvent.java b/zc-business/src/main/java/com/zc/business/domain/DcEvent.java
index aa171517..cb481f77 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcEvent.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcEvent.java
@@ -69,6 +69,9 @@ public class DcEvent {
@ApiModelProperty("处理人员")
private Long userId;
+ @ApiModelProperty("事件子类")
+ private String eventSubclas;
+
/**
* 开始时间
*/
@@ -133,7 +136,7 @@ public class DcEvent {
* 3-3 立交封闭和限行
* 3-4 服务区封闭和限行
*/
- @Excel(name = "事件类型")
+ @Excel(name = "事件类型字符串")
@ApiModelProperty("事件子类 例:事件子类:* 1-1 追尾* 1-2 侧翻* 1-3 撞护栏* 1-4 自然* 1-5 其他事故* 2-1 车辆故障")
private String eventSubclass;
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 970b0110..b9dfae8e 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -960,8 +960,18 @@ public class DcEventServiceImpl extends ServiceImpl impl
@Override
public int updateDcEventState(String id, int state) {
+ //多次修改请求
+ DcEvent dcEvent1 = dcEventMapper.selectDcEventById(id);
+ //事件删除 后 返回成功
+ if (dcEvent1 ==null){
+ return 1;
+ }
+ //事件状态已被修改 返回成功
+ if (dcEvent1.getEventState()==state){
+ return 1;
+ }
- int i = dcEventMapper.updateDcEventState(id, state);
+ int i = dcEventMapper.updateDcEventState(id, state);
if (i > 0) {
DcEvent dcEvent = dcEventMapper.selectDcEventMainById(id);
diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
index 030387c9..fac9ab19 100644
--- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
@@ -36,6 +36,7 @@
+
@@ -166,6 +167,7 @@
longitude,
dimension,
event_title,
+ event_subclass as event_subclas,
link_id,
is_perceived,
CASE event_type
@@ -406,6 +408,7 @@
dc_event.event_title,
dc_event.occurrence_time,
dc_event.event_type AS event_type,
+ dc_event.event_subclass AS event_subclas,
CASE dc_event.event_type
WHEN '1' THEN '交通事故'
WHEN '2' THEN '车辆故障'
From 339e8fa789e6da402f02ab0cfa3587aaa5c0dc82 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Mon, 13 May 2024 09:12:49 +0800
Subject: [PATCH 39/60] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E4=B8=8E=E4=BA=8B=E4=BB=B6=E5=88=A0=E9=99=A4=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E8=B0=83=E5=BA=A6=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcPublishManageController.java | 15 +++++
.../mapper/DcPublishManageMapper.java | 6 ++
.../service/IDcPublishManageService.java | 4 ++
.../impl/DcPublishManageServiceImpl.java | 10 +++
.../mapper/business/DcPublishManageMapper.xml | 62 +++++++++++++++++++
5 files changed, 97 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
index 33ac456d..1f2199cb 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
@@ -142,4 +142,19 @@ public class DcPublishManageController extends BaseController
}
return AjaxResult.success(dcPublishManageService.monthTrendsPublishManage(dcPublishManage));
}
+ //统计服务,事件类型对应的发布渠道发布的数量
+ @PostMapping("/eventTypePublishManageSum")
+ public AjaxResult eventTypePublishManageSum()
+ {
+ return AjaxResult.success(dcPublishManageService.eventTypePublishManageSum());
+ }
+ //统计服务,事件类型对应的发布渠道发布的数量按月统计
+ @PostMapping("/eventTypePublishManageMonth")
+ public AjaxResult eventTypePublishManageMonth(@RequestBody DcPublishManage dcPublishManage)
+ {
+ if (dcPublishManage==null||dcPublishManage.getPublishTime()==null){
+ return AjaxResult.error("参数错误");
+ }
+ return AjaxResult.success(dcPublishManageService.eventTypePublishManageMonth(dcPublishManage));
+ }
}
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
index 28263919..dd74c983 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
@@ -55,6 +55,8 @@ public interface DcPublishManageMapper
int deleteDcPublishManageById(Long id);
//删除事件发布记录 params 事件id
int deleteDcPublishManageEventId(String eventId);
+ //删除调度记录
+ int deleteDisPath(String eventId);
/**
* 批量删除信息发布管理记录
*
@@ -76,4 +78,8 @@ public interface DcPublishManageMapper
public List> releaseTrendsPublishManage();
//统计月发布趋势分析
public List> monthTrendsPublishManage(DcPublishManage dcPublishManage);
+ //统计不同事件的发布渠道数量
+ public List> eventTypePublishManageSum();
+ //统计不同事件的发布渠道数量(月统计)
+ public List> eventTypePublishManageMonth(DcPublishManage dcPublishManage);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
index 18c2165b..107c4452 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
@@ -68,4 +68,8 @@ public interface IDcPublishManageService
public List> releaseTrendsPublishManage();
//统计月发布趋势分析
public List> monthTrendsPublishManage(DcPublishManage dcPublishManage);
+ //统计不同事件的发布渠道数量
+ public List> eventTypePublishManageSum();
+ //统计不同事件的发布渠道数量(月统计)
+ public List> eventTypePublishManageMonth(DcPublishManage dcPublishManage);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
index 808c7e30..3a8bc631 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
@@ -130,4 +130,14 @@ public class DcPublishManageServiceImpl implements IDcPublishManageService
public List> monthTrendsPublishManage(DcPublishManage dcPublishManage) {
return dcPublishManageMapper.monthTrendsPublishManage(dcPublishManage);
}
+ //统计不同事件的发布渠道数量
+ @Override
+ public List> eventTypePublishManageSum() {
+ return dcPublishManageMapper.eventTypePublishManageSum();
+ }
+ //统计不同事件的发布渠道数量(月统计)
+ @Override
+ public List> eventTypePublishManageMonth(DcPublishManage dcPublishManage) {
+ return dcPublishManageMapper.eventTypePublishManageMonth(dcPublishManage);
+ }
}
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index d6df52a6..11fd36f6 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -194,6 +194,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
+
+ delete dc_dispatch,dc_dispatch_resource
+ from dc_dispatch_resource
+ JOIN dc_dispatch on dc_dispatch_resource.dispatch_id=dc_dispatch.id
+ WHERE dc_dispatch.event_id=#{eventId}
+
+
SELECT
@@ -277,4 +284,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels
ORDER BY h.hour, pc.publish_channels;
+
+ SELECT h.eventType,
+ pc.publish_channels publishChannels,
+ COALESCE(m.number, 0) AS number
+ FROM (
+ SELECT 1 AS eventType
+ UNION ALL
+ SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+ SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL
+ SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL
+ SELECT 11
+ ) AS h
+ CROSS JOIN (
+ SELECT 1 AS publish_channels
+ UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+ SELECT 5 UNION ALL SELECT 6 UNION ALL
+ SELECT 7
+ ) AS pc
+ LEFT JOIN (
+ SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number
+ FROM dc_publish_manage
+ LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id
+ GROUP BY HOUR(publish_time), publish_channels
+ ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels
+ ORDER BY h.eventType, pc.publish_channels;
+
+
+ SELECT h.eventType,
+ pc.publish_channels publishChannels,
+ COALESCE(m.number, 0) AS number
+ FROM (
+ SELECT 1 AS eventType
+ UNION ALL
+ SELECT 2 UNION ALL SELECT 3 UNION ALL
+ SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL
+ SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL
+ SELECT 10 UNION ALL
+ SELECT 11
+ ) AS h
+ CROSS JOIN (
+ SELECT 1 AS publish_channels
+ UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+ SELECT 5 UNION ALL SELECT 6 UNION ALL
+ SELECT 7
+ ) AS pc
+ LEFT JOIN (
+ SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number
+ FROM dc_publish_manage
+ left join dc_event on dc_publish_manage.event_id=dc_event.id
+ WHERE YEAR(publish_time) = YEAR(CURDATE())
+ AND MONTH(publish_time) = MONTH(#{publishTime})
+ GROUP BY HOUR(publish_time), publish_channels
+ ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels
+ ORDER BY h.eventType, pc.publish_channels;
+
\ No newline at end of file
From fb0392aaa4e87d86ebe51502e1e8ce8d747c369e Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Mon, 13 May 2024 09:21:19 +0800
Subject: [PATCH 40/60] =?UTF-8?q?=E8=B0=83=E5=BA=A6=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mapper/business/DcPublishManageMapper.xml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index 11fd36f6..6d2adf52 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -195,11 +195,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete dc_dispatch,dc_dispatch_resource
- from dc_dispatch_resource
- JOIN dc_dispatch on dc_dispatch_resource.dispatch_id=dc_dispatch.id
- WHERE dc_dispatch.event_id=#{eventId}
-
+ DELETE FROM dc_dispatch_resource WHERE dispatch_id IN (
+ SELECT id FROM dc_dispatch WHERE event_id = #{eventId}
+ );
+ DELETE FROM dc_dispatch WHERE event_id = #{eventId};
From 543b0e834a1d49a1c89c1a5134fd35f216012e86 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Mon, 13 May 2024 09:38:33 +0800
Subject: [PATCH 41/60] =?UTF-8?q?=E8=B0=83=E5=BA=A6=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=E4=B8=8E=E8=B0=83=E5=BA=A6=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/mapper/DcPublishManageMapper.java | 2 ++
.../resources/mapper/business/DcPublishManageMapper.xml | 8 +++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
index dd74c983..a0f25737 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
@@ -55,6 +55,8 @@ public interface DcPublishManageMapper
int deleteDcPublishManageById(Long id);
//删除事件发布记录 params 事件id
int deleteDcPublishManageEventId(String eventId);
+ //删除调度记录资源记录
+ int deleteDisPathSource(String eventId);
//删除调度记录
int deleteDisPath(String eventId);
/**
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index 6d2adf52..025c8a24 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -194,11 +194,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
-
+
DELETE FROM dc_dispatch_resource WHERE dispatch_id IN (
SELECT id FROM dc_dispatch WHERE event_id = #{eventId}
- );
- DELETE FROM dc_dispatch WHERE event_id = #{eventId};
+ )
+
+
+ DELETE FROM dc_dispatch WHERE event_id = #{eventId}
From a449e77146bf889b5fdd4a5476b036764ec42375 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Mon, 13 May 2024 10:16:55 +0800
Subject: [PATCH 42/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=BD=AE?=
=?UTF-8?q?=E8=81=94=E7=BB=9C=E8=B0=83=E5=BA=A6=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zc/business/service/impl/DcWarningServiceImpl.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
index 6f08a2bb..2b9438b9 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
@@ -719,8 +719,9 @@ public class DcWarningServiceImpl implements IDcWarningService
dcWarningMapper.deleteDispatchResource(dispatchId);//删除全部属于该调度记录下的全部资源
ArrayList> employeesArray = (ArrayList>) map.get("employees");//取出人员
- String context = "路管人员";
+ String context = "";
if (employeesArray!=null&&employeesArray.size()>0) {
+ context += "路管人员";
for (Map array : employeesArray) {
dcDispatchResource.setDispatchType(1);//类型
dcDispatchResource.setResourceId(Long.valueOf(array.get("id").toString()));//资源id
@@ -736,7 +737,10 @@ public class DcWarningServiceImpl implements IDcWarningService
}
ArrayList> vehicleArray = (ArrayList>) map.get("vehicle");////取出车辆
if (vehicleArray!=null&&vehicleArray.size()>0) {
- context += ",救援车辆";
+ if (context.length() > 0){
+ context += ",";
+ }
+ context += "救援车辆";
for (Map array : vehicleArray) {
dcDispatchResource.setDispatchType(2);
dcDispatchResource.setResourceId(Long.valueOf(array.get("id").toString()));
From 89252dc95153aea3b2183080208f504e28354955 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Mon, 13 May 2024 11:08:44 +0800
Subject: [PATCH 43/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E5=85=B3=E8=81=94=20=20=20=E5=88=A0=E9=99=A4=E8=B0=83=E5=BA=A6?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=B5=84=E6=BA=90=20=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E8=B0=83=E5=BA=A6=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/enums/EventSource.java | 25 +++++++++++++++++++
.../service/impl/DcEventServiceImpl.java | 24 ++++++++++++++++--
.../mapper/business/DcEventMapper.xml | 1 +
3 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 zc-business/src/main/java/com/zc/business/enums/EventSource.java
diff --git a/zc-business/src/main/java/com/zc/business/enums/EventSource.java b/zc-business/src/main/java/com/zc/business/enums/EventSource.java
new file mode 100644
index 00000000..37547c10
--- /dev/null
+++ b/zc-business/src/main/java/com/zc/business/enums/EventSource.java
@@ -0,0 +1,25 @@
+package com.zc.business.enums;
+
+/**
+ *
+ */
+//事件来源枚举
+public enum EventSource {
+ VIDEO_AI(1, "视频AI");
+ private final Integer code;
+ private final String description;
+
+ EventSource(Integer code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public Integer getCode()
+ {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index b9dfae8e..ddb4d66e 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -6,11 +6,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StakeMarkUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.system.service.ISysDeptService;
import com.zc.business.domain.*;
import com.zc.business.enums.EventSubclassEnum;
+import com.zc.business.enums.EventTypeEnum;
import com.zc.business.enums.ValueConverter;
import com.zc.business.mapper.*;
import com.zc.business.service.IDcEventProcessService;
@@ -140,7 +142,6 @@ public class DcEventServiceImpl extends ServiceImpl impl
String dcEventId = dcEvent.getId();
-
//获取事件类型
int eventType = Math.toIntExact(dcEvent.getEventType());
@@ -666,6 +667,21 @@ public class DcEventServiceImpl extends ServiceImpl impl
*/
@Override
public int updateDcEvent(DcEvent dcEvent) {
+/* //事件类型校验
+ for (EventTypeEnum value : EventTypeEnum.values()) {
+ if (dcEvent.getEventType().toString()==value.getInfo()){
+ dcEvent.setEventType(Long.valueOf(value.getCode()));
+ }
+ }
+
+ // 事件子类校验
+ for (EventSubclassEnum value : EventSubclassEnum.values()) {
+ if (value.getInfo().equals(dcEvent.getEventSubclass())){
+ dcEvent.setEventSubclass(value.getCode());
+ }
+ }
+//事件来源校验*/
+
DcEvent oldEvent = selectEventSubclassById(dcEvent.getEventType().intValue(), dcEvent.getId());
dcEvent.setUpdateTime(DateUtils.getNowDate());
int i7 = dcEventMapper.updateDcEvent(dcEvent);
@@ -752,8 +768,12 @@ public class DcEventServiceImpl extends ServiceImpl impl
if (dcEvent==null){
continue;
}
- // 删除信息发布记录
+ // todo 删除信息发布记录
dcPublishManageMapper.deleteDcPublishManageEventId(id);
+ // 删除调度记录资源
+ dcPublishManageMapper.deleteDisPathSource(id);
+ //删除调度记录
+ dcPublishManageMapper.deleteDisPath(id);
int eventType = Math.toIntExact(dcEvent.getEventType());
i7 = dcEventMapper.deleteDcEventById(id);
diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
index fac9ab19..ea6f3cf6 100644
--- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml
@@ -487,6 +487,7 @@
WHEN '2' THEN '已完成'
WHEN '3' THEN '已撤销'
END AS stringEventState,
+ dc_event.event_source,
CASE dc_event.event_source
WHEN '1' THEN '96659'
WHEN '2' THEN '交警转接'
From be28bceea837e20072ba897f44bd93eccbbfde25 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Mon, 13 May 2024 13:51:40 +0800
Subject: [PATCH 44/60] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E8=AF=AF=E6=8A=A5?=
=?UTF-8?q?=EF=BC=8C=E4=BA=BA=E5=91=98=E5=85=A8=E9=83=A8=E8=B0=83=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcWarningController.java | 9 +++++++
.../com/zc/business/domain/DcWarning.java | 25 +++++++++++++++++++
.../zc/business/mapper/DcWarningMapper.java | 3 ++-
.../business/service/IDcWarningService.java | 2 ++
.../service/impl/DcWarningServiceImpl.java | 6 +++++
.../business/DcPublishingChannelsMapper.xml | 2 +-
.../mapper/business/DcWarningMapper.xml | 14 ++++++++++-
7 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java
index 1cb74c8c..74cc2479 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java
@@ -174,4 +174,13 @@ public class DcWarningController extends BaseController
}
return toAjax(dcWarningService.insertDispatchSource(map));
}
+ //感知事件误报
+ @PostMapping("/falseAlarm")
+ public AjaxResult falseAlarmResolution(@RequestBody DcWarning dcWarning){
+ if (dcWarning==null||dcWarning.getRelieveType()==null||StringUtils.isBlank(dcWarning.getId())){
+ return AjaxResult.error("参数错误");
+ }
+ return toAjax(dcWarningService.falseAlarmResolution(dcWarning));
+ }
+
}
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java
index 311ca679..ad73d6c4 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java
@@ -59,6 +59,14 @@ public class DcWarning extends BaseEntity
@Excel(name = "事件子类", readConverterExp ="1-1-拥堵,1-2=缓行,2-1=普通行人,2-2=工作人员,3-1=摩托车,3-2=自行车,3-3=三轮车,4-1=非工程车,4-2=工程车,4-3=主路有车,4-4=匝道有车,4-5=车辆故障(弃用),4-6=交通事故(弃用),4-7=应急车道被占用,4-8=车离开应急车道,4-9=其他,4-10=未知车辆,5-1=倒车/逆行,5-2=压线,5-3=掉头,5-4=超速,5-5=低速,5-6=违规变道,5-7=未保持安全距离,6-1=烟火,6-2=火灾,6-3=障碍物,6-4=抛洒物,7-1=道路施工,8-1=雨,8-2=冰雹,8-3=风,8-4=雾,8-5=高温,8-6=积水,8-7=路面湿滑,8-8=路面结冰,8-9=道路能见度低,8-10=道路团雾,9-1=只碰撞不倾斜,9-2=只倾斜无碰撞,9-3=碰撞后倾斜,10-1=未知,10-2单车事故,10-3=多车事故,11-1=车辆抛锚,11-2=车辆炸胎(有备胎),11-2=车辆炸胎(无备胎),99-1=其它")
private String warningSubclass;
+ /** 事件解除原因 */
+ @Excel(name = "事件解除原因")
+ private String relieveReason;
+ /** 事件解除类型: 1-误报解除2-事件已结束3-无需处理事件4-其它 */
+ @Excel(name = "信息来源", readConverterExp = "1=误报解除2,2=事件已结束3,3=无需处理事件,4=其它")
+ private Integer relieveType;
+
+
/** 事件标题 */
@Excel(name = "事件标题")
private String warningTitle;
@@ -113,6 +121,23 @@ public class DcWarning extends BaseEntity
private String endDate;
//收费站
private String facilityName;
+
+ public String getRelieveReason() {
+ return relieveReason;
+ }
+
+ public void setRelieveReason(String relieveReason) {
+ this.relieveReason = relieveReason;
+ }
+
+ public Integer getRelieveType() {
+ return relieveType;
+ }
+
+ public void setRelieveType(Integer relieveType) {
+ this.relieveType = relieveType;
+ }
+
public String getStartStakeMark() {
return startStakeMark;
}
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java
index 2e6e4af2..7f07269b 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java
@@ -130,5 +130,6 @@ public interface DcWarningMapper
public Integer deleteDispatchResource(@Param("dispatchId")Long dispatchId);
DcDispatch selectDcDispatchById(@Param("id") Long id);
-
+ //误报解除
+ public Integer falseAlarmResolution(DcWarning dcWarning);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java b/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java
index 93af5845..2200db6f 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java
@@ -92,4 +92,6 @@ public interface IDcWarningService
public Integer insertDispatch(DcDispatch dcDispatch);
//新增指挥调度资源记录
public Integer insertDispatchSource(HashMap map);
+ //误报解除
+ public Integer falseAlarmResolution(DcWarning dcWarning);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
index 6f08a2bb..186aa613 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
@@ -760,5 +760,11 @@ public class DcWarningServiceImpl implements IDcWarningService
dcEventProcessService.insertDcEventProcess(dcEventProcess);
return 1;
}
+ //误报解除
+ @Override
+ public Integer falseAlarmResolution(DcWarning dcWarning) {
+ dcWarning.setUpdateTime(DateUtils.getNowDate());
+ return dcWarningMapper.falseAlarmResolution(dcWarning);
+ }
}
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml
index bf18ac45..25b43302 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml
@@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id from dc_publishing_channels where data_category=#{dataCategory}
- select publish_channels publishChannels from dc_publishing_channels where data_category=#{dataCategory}
+ select publish_channels publishChannels from dc_publishing_channels where data_category=#{dataCategory} and enabled=2
select event_type from dc_event where id=#{id}
diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml
index ce22fa4c..bb0fa037 100644
--- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml
@@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
@@ -236,6 +238,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update dc_dispatch set organization_id=#{organization_id} where id=#{id}
+
+ update dc_warning
+
+ relieve_reason = #{relieveReason},
+ relieve_type = #{relieveType},
+ update_time = #{updateTime},
+ warning_state=3
+
+ where id = #{id}
+
delete from dc_warning where id = #{id}
@@ -295,6 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id,organization_name organizationName,stake_mark stakeMark from dc_organization
+ where parent_id!=0
select id, name,contact_number contactNumber from dc_employees where organization_id=#{organizationId} and employees_type=2
@@ -364,7 +377,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and respurce.dispatch_type = 1
and path.event_id = #{eventId}) as t on t.id = dc_employees.id
where organization_id = #{organizationId}
- and employees_type = 2
select DISTINCT dc_vehicles.id,
From e64d268cbd922418d78d6d3cc0f39c7e20f2f90a Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Mon, 13 May 2024 17:53:00 +0800
Subject: [PATCH 45/60] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AEid?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BA=8B=E4=BB=B6=E9=A2=84=E6=A1=88=E5=85=B3?=
=?UTF-8?q?=E8=81=94=E8=A1=A8=E6=95=B0=E6=8D=AE=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=A1=AE=E8=AE=A4=E5=AD=98=E5=82=A8=E4=BA=8B?=
=?UTF-8?q?=E4=BB=B6=E9=A2=84=E6=A1=88=E5=85=B3=E8=81=94=E8=A1=A8=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E5=BD=A2=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DcEmergencyPlansController.java | 9 ++++
.../business/mapper/EventPlanAssocMapper.java | 11 ++++-
.../service/DcEmergencyPlansService.java | 10 ++++-
.../impl/DcEmergencyPlansServiceImpl.java | 43 ++++++++++---------
.../mapper/business/EventPlanAssocMapper.xml | 9 +++-
5 files changed, 58 insertions(+), 24 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
index 9f5b213f..307f08f6 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
@@ -136,6 +136,15 @@ public class DcEmergencyPlansController extends BaseController {
return AjaxResult.success(dcEmergencyPlansService.selectEventPlanAssocByEventId(id));
}
+ /**
+ * 根据id-查询预案事件关联表
+ */
+ @ApiOperation("根据id-查询预案事件关联表")
+ @GetMapping("/event/assoc/{assocId}")
+ public AjaxResult eventConfirmById(@PathVariable("assocId") Long assocId) {
+ return AjaxResult.success(dcEmergencyPlansService.selectEventPlanAssocById(assocId));
+ }
+
/**
* 感知事件确定
*/
diff --git a/zc-business/src/main/java/com/zc/business/mapper/EventPlanAssocMapper.java b/zc-business/src/main/java/com/zc/business/mapper/EventPlanAssocMapper.java
index 15c13da3..411a1c9c 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/EventPlanAssocMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/EventPlanAssocMapper.java
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zc.business.domain.EventPlanAssoc;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
* 预案事件关联Mapper接口
*
@@ -19,12 +21,19 @@ public interface EventPlanAssocMapper extends BaseMapper {
*/
int insertEventPlanAssoc(EventPlanAssoc eventPlanAssoc);
+ /**
+ * 根据id查询事件预案关联
+ * @param eventPlanAssoc
+ * @return
+ */
+ EventPlanAssoc selectById(EventPlanAssoc eventPlanAssoc);
+
/**
* 根据事件id查询事件预案关联
* @param eventPlanAssoc
* @return
*/
- EventPlanAssoc selectByEventId(EventPlanAssoc eventPlanAssoc);
+ List selectByEvent(EventPlanAssoc eventPlanAssoc);
/**
* 修改事件预案关联
diff --git a/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java b/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java
index 02d4d32a..7a1687a8 100644
--- a/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java
+++ b/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java
@@ -76,7 +76,15 @@ public interface DcEmergencyPlansService {
* @param eventId 事件id
* @return 结果
*/
- EventPlanAssoc selectEventPlanAssocByEventId(String eventId);
+ List selectEventPlanAssocByEventId(String eventId);
+
+ /**
+ * 根据id-查询预案事件关联表
+ *
+ * @param id id
+ * @return 结果
+ */
+ EventPlanAssoc selectEventPlanAssocById(Long id);
/**
* 感知事件确定
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 c0dddd88..156e68a0 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
@@ -557,10 +557,22 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
* @return
*/
@Override
- public EventPlanAssoc selectEventPlanAssocByEventId(String eventId) {
+ public List selectEventPlanAssocByEventId(String eventId) {
EventPlanAssoc eventPlanAssoc = new EventPlanAssoc();
eventPlanAssoc.setEventId(eventId);
- return eventPlanAssocMapper.selectByEventId(eventPlanAssoc);
+ return eventPlanAssocMapper.selectByEvent(eventPlanAssoc);
+ }
+
+ /**
+ * 根据id-查询预案事件关联表
+ * @param id id
+ * @return
+ */
+ @Override
+ public EventPlanAssoc selectEventPlanAssocById(Long id) {
+ EventPlanAssoc eventPlanAssoc = new EventPlanAssoc();
+ eventPlanAssoc.setId(id);
+ return eventPlanAssocMapper.selectById(eventPlanAssoc);
}
/**
@@ -735,24 +747,15 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
// 事件编号
eventPlanAssoc.setEventId(id);
eventPlanAssoc.setOperationType(dcEventAnDcEmergencyPlans.getOperationType());
- EventPlanAssoc selectEventPlanAssoc = eventPlanAssocMapper.selectByEventId(eventPlanAssoc);
-
- if (selectEventPlanAssoc == null) {
- // 执行新增
- eventPlanAssoc.setEmergencyPlansId(dcEmergencyPlans.getId());
- eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", ""));
- eventPlanAssoc.setControlResult(resultArray.toJSONString());
- eventPlanAssoc.setCreateTime(DateUtils.getNowDate());
- eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc);
- resultObject.put("eventPlanAssocId",eventPlanAssoc.getId());
- }else {
- // 执行修改操作
- selectEventPlanAssoc.setUpdateTime(DateUtils.getNowDate());
- selectEventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", ""));
- selectEventPlanAssoc.setControlResult(resultArray.toJSONString());
- eventPlanAssocMapper.updateEventPlanAssoc(selectEventPlanAssoc);
- resultObject.put("eventPlanAssocId",selectEventPlanAssoc.getId());
- }
+
+ // 新增事件预案关联表数据
+ eventPlanAssoc.setEmergencyPlansId(dcEmergencyPlans.getId());
+ eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", ""));
+ eventPlanAssoc.setControlResult(resultArray.toJSONString());
+ eventPlanAssoc.setCreateTime(DateUtils.getNowDate());
+ eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc);
+ resultObject.put("eventPlanAssocId",eventPlanAssoc.getId());
+
DcEventProcess dcEventProcess = new DcEventProcess();
dcEventProcess.setEventId(id);
dcEventProcess.setSource(1);
diff --git a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
index abda69d3..c0c79aca 100644
--- a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
@@ -44,9 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from event_plan_assoc
-
+
- where event_id = #{eventId} and operation_type = #{operationType}
+ where id = #{id}
+
+
+
+
+ where event_id = #{eventId}
From 19a0369e6dfb0f332f461a4bfe2b021970fb2539 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Mon, 13 May 2024 17:54:30 +0800
Subject: [PATCH 46/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=BD=AE?=
=?UTF-8?q?=E5=89=8D=E7=BD=AE=E8=8A=82=E7=82=B9=E7=8A=B6=E6=80=81=E9=AA=8C?=
=?UTF-8?q?=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcEventProcessController.java | 7 +++++++
.../zc/business/mapper/DcEventProcessMapper.java | 12 ++++++++++++
.../business/service/IDcEventProcessService.java | 12 ++++++++++++
.../service/impl/DcEventProcessServiceImpl.java | 15 +++++++++++++++
.../mapper/business/DcEventProcessMapper.xml | 5 +++++
5 files changed, 51 insertions(+)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java
index 79e0fcf7..08f1bf54 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java
@@ -2,6 +2,7 @@ package com.zc.business.controller;
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.config.RuoYiConfig;
@@ -100,6 +101,12 @@ public class DcEventProcessController extends BaseController
@Log(title = "事件处理流程", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcEventProcess dcEventProcess){
+ if (dcEventProcess.getProcessType() != null && dcEventProcess.getProcessType() == 1){
+ int status = dcEventProcessService.selectPreviousNodeStatus(dcEventProcess.getEventId(),dcEventProcess.getProcessId());
+ if (status < 1){
+ return AjaxResult.error("前置节点未点亮!");
+ }
+ }
return toAjax(dcEventProcessService.insertDcEventProcess(dcEventProcess));
}
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcEventProcessMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcEventProcessMapper.java
index d512e150..4a00c447 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcEventProcessMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcEventProcessMapper.java
@@ -2,6 +2,7 @@ package com.zc.business.mapper;
import java.util.List;
import com.zc.business.domain.DcEventProcess;
+import org.apache.ibatis.annotations.Param;
/**
* 事件处理流程Mapper接口
@@ -75,4 +76,15 @@ public interface DcEventProcessMapper
List selectDcDispatchByEventId(String id);
int selectFinalNode(String eventId);
+
+ /**
+ * @Description 查询前置节点状态
+ *
+ * @author liuwenge
+ * @date 2024/5/13 16:08
+ * @param eventId 事件id
+ * @param processId 节点id
+ * @return 状态 0未完成 1已完成
+ */
+ int selectPreviousNodeStatus(@Param("eventId") String eventId, @Param("processId") Long processId);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcEventProcessService.java b/zc-business/src/main/java/com/zc/business/service/IDcEventProcessService.java
index f0023517..3d261edd 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcEventProcessService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcEventProcessService.java
@@ -2,6 +2,7 @@ package com.zc.business.service;
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import com.ruoyi.common.exception.file.InvalidExtensionException;
import com.zc.business.domain.DcEventProcess;
@@ -71,4 +72,15 @@ public interface IDcEventProcessService
int deleteDcEventProcessById(Long id);
List selectDcEventProcessListById(String id);
+
+ /**
+ * @Description 查询前置节点状态
+ *
+ * @author liuwenge
+ * @date 2024/5/13 15:57
+ * @param eventId 事件id
+ * @param processId 节点id
+ * @return status 0未完成 1已完成
+ */
+ int selectPreviousNodeStatus(String eventId, Long processId);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventProcessServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventProcessServiceImpl.java
index a097984a..6dd2a68c 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventProcessServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventProcessServiceImpl.java
@@ -148,4 +148,19 @@ public class DcEventProcessServiceImpl implements IDcEventProcessService
public List selectDcEventProcessListById(String id) {
return dcEventProcessMapper.selectDcDispatchByEventId(id);
}
+
+ /**
+ * @Description 查询前置节点状态
+ *
+ * @author liuwenge
+ * @date 2024/5/13 16:07
+ * @param eventId 事件id
+ * @param processId 节点id
+ * @return 状态 0未完成 1已完成
+ */
+ @Override
+ public int selectPreviousNodeStatus(String eventId, Long processId){
+ return dcEventProcessMapper.selectPreviousNodeStatus(eventId,processId);
+ }
+
}
diff --git a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml
index cab4e024..6a7ea7fb 100644
--- a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml
@@ -145,4 +145,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t1.id = #{eventId};
+
+ select count(*) from dc_event_process
+ where event_id = #{eventId} and process_type = '1' and process_id = #{processId} - 1
+
+
\ No newline at end of file
From 5528350e0a8aadde132e1abad6d40dfe11919839 Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Mon, 13 May 2024 18:04:06 +0800
Subject: [PATCH 47/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=90=8D=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zc/business/controller/DcEmergencyPlansController.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
index 307f08f6..e21493ce 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
@@ -132,7 +132,7 @@ public class DcEmergencyPlansController extends BaseController {
*/
@ApiOperation("根据事件id-查询预案事件关联表")
@GetMapping("/event/assoc/{id}")
- public AjaxResult eventConfirm(@PathVariable("id") String id) {
+ public AjaxResult eventConfirmByEventId(@PathVariable("id") String id) {
return AjaxResult.success(dcEmergencyPlansService.selectEventPlanAssocByEventId(id));
}
@@ -140,7 +140,7 @@ public class DcEmergencyPlansController extends BaseController {
* 根据id-查询预案事件关联表
*/
@ApiOperation("根据id-查询预案事件关联表")
- @GetMapping("/event/assoc/{assocId}")
+ @GetMapping("/event/assocId/{assocId}")
public AjaxResult eventConfirmById(@PathVariable("assocId") Long assocId) {
return AjaxResult.success(dcEmergencyPlansService.selectEventPlanAssocById(assocId));
}
From daa0f3ab2bac4e74a176d2c80e46acd4dddff58b Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Tue, 14 May 2024 11:03:54 +0800
Subject: [PATCH 48/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E8=B0=83=E7=94=A8=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../interfaces/OperationLogAspect.java | 36 +++++++++++++++++--
1 file changed, 33 insertions(+), 3 deletions(-)
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 f223851f..ec8e4fe8 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
@@ -142,7 +142,7 @@ public class OperationLogAspect {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String date = df.format(new Date());
String sta = "";
- if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200")) {
+ if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200") && !Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("msg")), "500") ) {
operLog.setStatus(0);
sta = "成功";
} else {
@@ -307,8 +307,38 @@ public class OperationLogAspect {
operLog.setOperIp(IpUtils.getIpAddr(request));
operLog.setOperTime(new Date());
operLog.setDcDeviceType(deviceType);
- operLog.setJsonResult(remark.toString());
- dcOperLogService.addDcOperLog(operLog);
+ operLog.setRemark(remark.toString());
+ operLog.setJsonResult(jsonResult.toString());
+ dcOperLogService.save(operLog);
+
+
+ if ((Objects.equals(deviceType, "2") || Objects.equals(deviceType, "5")) && Objects.nonNull(operLog.getId())) {
+ DcPublishManage dcPublishManage = new DcPublishManage();
+
+ if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200")) {
+ dcPublishManage.setPublishStatus(1);//发布状态1-成功2-失败
+ } else {
+ dcPublishManage.setPublishStatus(2);//发布状态1-成功2-失败
+ }
+
+ if (loginUser != null) {
+ dcPublishManage.setPublisher(loginUser.getUsername());//发布人
+ } else {
+ dcPublishManage.setPublisher("系统定时调用");//发布人
+ }
+ dcPublishManage.setPublishTime(new Date());//发布时间
+ dcPublishManage.setCreateTime(new Date());//创建时间
+
+ dcPublishManage.setLogId(Long.valueOf(operLog.getId()));//发布的如果的情报板传对应id
+ if (Objects.equals(deviceType, "2")) {
+ dcPublishManage.setPublishChannels(4);
+ } else {
+ dcPublishManage.setPublishChannels(7);
+ }
+
+ dcPublishManage.setContentDetails(remark.toString());
+ dcPublishManageService.insertDcPublishManage(dcPublishManage);
+ }
}
}
From 83c2e2522ac0b3d16e5a41194f52272ee77cf819 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Tue, 14 May 2024 11:06:30 +0800
Subject: [PATCH 49/60] =?UTF-8?q?=E6=B0=94=E8=B1=A1=20=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcEventController.java | 11 +++----
.../zc/business/service/IDcEventService.java | 2 +-
.../service/impl/DcEventServiceImpl.java | 7 +++--
.../DcMeteorologicalDetectorDataMapper.xml | 29 +++++--------------
4 files changed, 17 insertions(+), 32 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventController.java
index 0428137a..629bf40c 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcEventController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcEventController.java
@@ -98,15 +98,12 @@ public class DcEventController extends BaseController
@ApiOperation("获取事件以及子类详细信息")
//@PreAuthorize("@ss.hasPermi('system:event:query')")
- @GetMapping( "/eventSubclass/{eventType}/{id}")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "eventType", value = "事件类型", dataType = "int"),
- @ApiImplicitParam(name = "id", value = "事件id", dataType = "String"),
- })
+ @GetMapping( "/eventSubclass/{id}")
+ @ApiImplicitParams(@ApiImplicitParam(name = "id", value = "事件id", dataType = "String"))
- public AjaxResult getEventById(@PathVariable int eventType,@PathVariable("id") String id)
+ public AjaxResult getEventById(@PathVariable("id") String id)
{
- DcEvent dcEvent = dcEventService.selectEventSubclassById(eventType,id);
+ DcEvent dcEvent = dcEventService.selectEventSubclassById(id);
return AjaxResult.success(dcEvent);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcEventService.java b/zc-business/src/main/java/com/zc/business/service/IDcEventService.java
index 8bebab43..058a6469 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcEventService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcEventService.java
@@ -90,7 +90,7 @@ public interface IDcEventService
* @param id
* @return
*/
- DcEvent selectEventSubclassById(int eventType, String id);
+ DcEvent selectEventSubclassById(String id);
Map selectCount();
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index ddb4d66e..485979da 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -682,7 +682,7 @@ public class DcEventServiceImpl extends ServiceImpl impl
}
//事件来源校验*/
- DcEvent oldEvent = selectEventSubclassById(dcEvent.getEventType().intValue(), dcEvent.getId());
+ DcEvent oldEvent = selectEventSubclassById(dcEvent.getId());
dcEvent.setUpdateTime(DateUtils.getNowDate());
int i7 = dcEventMapper.updateDcEvent(dcEvent);
if (i7 > 0) {
@@ -850,14 +850,15 @@ public class DcEventServiceImpl extends ServiceImpl impl
/**
* 获取事件以及子类详细信息
*
- * @param eventType
+ * @param
* @param id
* @return
*/
@Override
- public DcEvent selectEventSubclassById(int eventType, String id) {
+ public DcEvent selectEventSubclassById(String id) {
//
DcEvent dcEvent = dcEventMapper.selectDcEventById(id);
+ int eventType = Math.toIntExact(dcEvent.getEventType());
List processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(Math.toIntExact(dcEvent.getEventType()));
dcEvent.setProcessConfigList(processConfigList);
switch (eventType) {
diff --git a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
index 6f4421ab..60e822da 100644
--- a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
@@ -175,34 +175,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
date;
- SELECT
- h.time_slot,
- DATE(dc.create_time) AS date,
- COALESCE(ROUND(AVG(dc.temperature), 2), 0) AS avg_temperature,
- COALESCE(ROUND(AVG(dc.visibility), 2), 0) AS avg_visibility
- FROM
- (
- SELECT 0 AS time_slot UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4
- UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9
- UNION ALL SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL SELECT 13
- UNION ALL SELECT 14 UNION ALL SELECT 15 UNION ALL SELECT 16 UNION ALL SELECT 17
- UNION ALL SELECT 18 UNION ALL SELECT 19 UNION ALL SELECT 20 UNION ALL SELECT 21
- UNION ALL SELECT 22 UNION ALL SELECT 23
- ) AS h
- LEFT JOIN
- dc_meteorological_detector_data dc
- ON
+ SELECT dc.visibility,dc.temperature,dc.create_time
+
+ FROM dc_meteorological_detector_data dc
+
DATE(dc.create_time) = #{specificDate}
DATE(dc.create_time) = CURDATE()
- AND HOUR(dc.create_time) = h.time_slot
+
AND dc.device_name = #{deviceName}
- GROUP BY
- h.time_slot,
- date;
+
+ ORDER BY
+ dc.create_time ASC
From 4d45884c041aa4963b1892399bd7ad8e56253b6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Tue, 14 May 2024 11:34:43 +0800
Subject: [PATCH 50/60] =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=20=E6=B0=94?=
=?UTF-8?q?=E8=B1=A1=20=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/business/DcMeteorologicalDetectorDataMapper.xml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
index 60e822da..b8eb4308 100644
--- a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
@@ -175,7 +175,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
date;
- SELECT dc.visibility,dc.temperature,dc.create_time
+ SELECT dc.visibility,dc.temperature,dc.create_time,
+ CONCAT(
+ LPAD(HOUR(dc.create_time), 2, '0'),
+ ':',
+ LPAD(MINUTE(dc.create_time), 2, '0')
+ ) AS date
FROM dc_meteorological_detector_data dc
From 77f4aadcdbbb3a2b56c68220a74dca5fb79cc394 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Tue, 14 May 2024 11:35:54 +0800
Subject: [PATCH 51/60] =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=20=E6=B0=94?=
=?UTF-8?q?=E8=B1=A1=20=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/business/DcMeteorologicalDetectorDataMapper.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
index b8eb4308..a68051b1 100644
--- a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
@@ -175,7 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
date;
- SELECT dc.visibility,dc.temperature,dc.create_time,
+ SELECT dc.visibility,dc.temperature,
CONCAT(
LPAD(HOUR(dc.create_time), 2, '0'),
':',
From 33e8a31f8dca65e83f2a23cb2447b5c715843da4 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Tue, 14 May 2024 11:51:12 +0800
Subject: [PATCH 52/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=AF=94=E5=AF=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/enums/ValueConverter.java | 5 +-
.../service/impl/DcEventServiceImpl.java | 128 ++++++++++++++++--
2 files changed, 117 insertions(+), 16 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/enums/ValueConverter.java b/zc-business/src/main/java/com/zc/business/enums/ValueConverter.java
index 5af2c2d5..8778d92e 100644
--- a/zc-business/src/main/java/com/zc/business/enums/ValueConverter.java
+++ b/zc-business/src/main/java/com/zc/business/enums/ValueConverter.java
@@ -125,6 +125,7 @@ public class ValueConverter {
eventLabel.put("estimatedEndTime","预计解除时间");
eventLabel.put("eventLevel","事件等级");
// eventLabel.put("eventType","事件类型");
+ eventLabel.put("eventSubclass","事件子类");
eventLabel.put("eventCause","事件原因");
eventLabel.put("description","描述");
eventLabel.put("eventState","状态");
@@ -210,7 +211,7 @@ public class ValueConverter {
eventLabel.put("dcEventVehicleAccident.seriousInjuries","重伤(人)");
eventLabel.put("dcEventVehicleAccident.fatalities","死亡(人)");
eventLabel.put("dcEventVehicleAccident.isPrivate","私密事件");
- eventLabel.put("dcEventVehicleAccident.facilityId","设施id");
+ eventLabel.put("dcEventVehicleAccident.facilityId","地点");
eventLabel.put("dcEventVehicleAccident.rampId","匝道");
eventLabel.put("dcEventVehicleAccident.location","地点");
eventLabel.put("dcEventTrafficControl.controlType","管制分类");
@@ -279,7 +280,7 @@ public class ValueConverter {
}
public static String eventLabel(String inputValue) {
Map mapping = getEventLabel();
- return mapping.getOrDefault(inputValue, inputValue);
+ return mapping.getOrDefault(inputValue, "");
}
//测试
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 485979da..1dc0d0cf 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -1067,6 +1067,112 @@ public class DcEventServiceImpl extends ServiceImpl impl
} else if ("3".equals(result.getRight())) {
result.setRight("下行");
}
+ } else if ("eventSubclass".equals(result.getRightPath())) {
+ if ("1-1".equals(result.getRight())) {
+ result.setRight("追尾");
+ } else if ("1-2".equals(result.getRight())) {
+ result.setRight("侧翻");
+ } else if ("1-3".equals(result.getRight())) {
+ result.setRight("撞护栏");
+ } else if ("1-4".equals(result.getRight())) {
+ result.setRight("自燃");
+ } else if ("1-5".equals(result.getRight())) {
+ result.setRight("其他事故");
+ } else if ("2-1".equals(result.getRight())) {
+ result.setRight("车辆故障");
+ } else if ("3-1".equals(result.getRight())) {
+ result.setRight("主线封闭和限行");
+ } else if ("3-2".equals(result.getRight())) {
+ result.setRight("收费站封闭和限行");
+ } else if ("3-3".equals(result.getRight())) {
+ result.setRight("立交封闭和限行");
+ } else if ("3-4".equals(result.getRight())) {
+ result.setRight("服务区封闭和限行");
+ } else if ("4-1".equals(result.getRight())) {
+ result.setRight("道路拥堵");
+ } else if ("4-2".equals(result.getRight())) {
+ result.setRight("立交拥堵");
+ } else if ("4-3".equals(result.getRight())) {
+ result.setRight("收费站拥堵");
+ } else if ("4-4".equals(result.getRight())) {
+ result.setRight("服务区拥堵");
+ } else if ("5-1".equals(result.getRight())) {
+ result.setRight("行人");
+ } else if ("5-2".equals(result.getRight())) {
+ result.setRight("非机动车");
+ } else if ("5-3".equals(result.getRight())) {
+ result.setRight("摩托车");
+ } else if ("5-4".equals(result.getRight())) {
+ result.setRight("其他");
+ } else if ("6-1".equals(result.getRight())) {
+ result.setRight("烟雾");
+ } else if ("6-2".equals(result.getRight())) {
+ result.setRight("倒伏树木");
+ } else if ("6-3".equals(result.getRight())) {
+ result.setRight("撒落物");
+ } else if ("6-4".equals(result.getRight())) {
+ result.setRight("动物");
+ } else if ("6-5".equals(result.getRight())) {
+ result.setRight("其他");
+ } else if ("7-1".equals(result.getRight())) {
+ result.setRight("道路养护施工");
+ } else if ("7-2".equals(result.getRight())) {
+ result.setRight("收费站养护施工");
+ } else if ("7-3".equals(result.getRight())) {
+ result.setRight("服务区养护施工");
+ } else if ("7-4".equals(result.getRight())) {
+ result.setRight("枢纽立交匝道养护施工");
+ } else if ("7-5".equals(result.getRight())) {
+ result.setRight("地方道路养护施工");
+ } else if ("7-6".equals(result.getRight())) {
+ result.setRight("道路工程建设施工");
+ } else if ("7-7".equals(result.getRight())) {
+ result.setRight("收费站工程建设施工");
+ } else if ("7-8".equals(result.getRight())) {
+ result.setRight("服务区工程建设施工");
+ } else if ("7-9".equals(result.getRight())) {
+ result.setRight("枢纽立交匝道工程建设施工");
+ } else if ("7-10".equals(result.getRight())) {
+ result.setRight("地方道路工程建设施工");
+ } else if ("8-1".equals(result.getRight())) {
+ result.setRight("封闭、暂停营业");
+ } else if ("8-2".equals(result.getRight())) {
+ result.setRight("重要设施停用");
+ } else if ("8-3".equals(result.getRight())) {
+ result.setRight("服务区其他异常");
+ } else if ("9-1".equals(result.getRight())) {
+ result.setRight("摄像机");
+ } else if ("9-2".equals(result.getRight())) {
+ result.setRight("护栏");
+ } else if ("9-3".equals(result.getRight())) {
+ result.setRight("隔离栅");
+ } else if ("9-4".equals(result.getRight())) {
+ result.setRight("情报板");
+ } else if ("9-5".equals(result.getRight())) {
+ result.setRight("防炫板");
+ } else if ("9-6".equals(result.getRight())) {
+ result.setRight("其他");
+ } else if ("10-1".equals(result.getRight())) {
+ result.setRight("雨");
+ } else if ("10-2".equals(result.getRight())) {
+ result.setRight("雪");
+ } else if ("10-3".equals(result.getRight())) {
+ result.setRight("雾");
+ } else if ("10-4".equals(result.getRight())) {
+ result.setRight("大风");
+ } else if ("10-5".equals(result.getRight())) {
+ result.setRight("低温寒潮");
+ } else if ("10-6".equals(result.getRight())) {
+ result.setRight("路面积雪");
+ } else if ("10-7".equals(result.getRight())) {
+ result.setRight("路面结冰");
+ } else if ("10-8".equals(result.getRight())) {
+ result.setRight("路面积水");
+ } else if ("10-9".equals(result.getRight())) {
+ result.setRight("其他");
+ } else if ("11-1".equals(result.getRight())) {
+ result.setRight("其他事件");
+ }
} else if ("eventState".equals(result.getRightPath())) {
if ("0".equals(result.getRight())) {
result.setRight("待确认");
@@ -1139,7 +1245,9 @@ public class DcEventServiceImpl extends ServiceImpl impl
} else if ("2".equals(result.getRight())) {
result.setRight("紧急");
}
- } else if ("dcEventAccident.locationType".equals(result.getRightPath())) {
+ } else if ("dcEventAccident.locationType".equals(result.getRightPath())
+ || "dcEventTrafficCongestion.locationType".equals(result.getRightPath())
+ || "dcEventVehicleAccident.locationType".equals(result.getRightPath())) {
if ("1".equals(result.getRight())) {
result.setRight("高速主线");
} else if ("2".equals(result.getRight())) {
@@ -1149,7 +1257,8 @@ public class DcEventServiceImpl extends ServiceImpl impl
} else if ("4".equals(result.getRight())) {
result.setRight("收费站");
}
- } else if ("dcEventAccident.weatherCondition".equals(result.getRightPath())) {
+ } else if ("dcEventAccident.weatherCondition".equals(result.getRightPath())
+ || "dcEventVehicleAccident.weatherCondition".equals(result.getRightPath())) {
if ("1".equals(result.getRight())) {
result.setRight("晴");
} else if ("2".equals(result.getRight())) {
@@ -1278,17 +1387,6 @@ public class DcEventServiceImpl extends ServiceImpl impl
} else if ("9".equals(result.getRight())) {
result.setRight("出口匝道");
}
- } else if ("dcEventTrafficCongestion.locationType".equals(result.getRightPath())
- || "dcEventVehicleAccident.locationType".equals(result.getRightPath())) {
- if ("1".equals(result.getRight())) {
- result.setRight("高速主线");
- } else if ("2".equals(result.getRight())) {
- result.setRight("服务区");
- } else if ("3".equals(result.getRight())) {
- result.setRight("立交桥");
- } else if ("4".equals(result.getRight())) {
- result.setRight("收费站");
- }
} else if ("dcEventTrafficCongestion.weatherCondition".equals(result.getRightPath())) {
if ("1".equals(result.getRight())) {
result.setRight("晴");
@@ -1379,7 +1477,9 @@ public class DcEventServiceImpl extends ServiceImpl impl
}
}
String label = ValueConverter.eventLabel(result.getRightPath());
- context = context + label + "修改为:" + result.getRight() + ",";
+ if (StringUtils.isNotEmpty(label)){
+ context = context + label + "修改为:" + result.getRight() + ",";
+ }
}
}
From c145fc5224e8ed6f59907003e83670e47a984d58 Mon Sep 17 00:00:00 2001
From: lau572 <1010031226@qq.com>
Date: Tue, 14 May 2024 14:48:09 +0800
Subject: [PATCH 53/60] =?UTF-8?q?=E7=AE=A1=E6=8E=A7=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E5=88=86=E6=9E=90=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/business/DcTrafficIncidentsMapper.xml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml
index 4bb2278e..f4695f04 100644
--- a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml
@@ -186,7 +186,7 @@
ifNull(t2.buses,0) buses,
ifNull(t2.tankers,0) tankers
from dc_event t1
- left join dc_event_vehicle_accident t2 on t1.id = t2.id
+ left join dc_event_accident t2 on t1.id = t2.id
where t1.event_type = '1' and t1.direction = #{direction}
and DATE_FORMAT(t1.start_time,'%Y%m%d') = DATE_FORMAT(#{startTime},'%Y%m%d')
@@ -326,13 +326,13 @@
where
t1.event_type = '1' and t1.direction = #{direction}
- and DATE_FORMAT(t1.start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 DAY),'%Y%m%d')
+ and DATE_FORMAT(t1.start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m%d')
- and DATE_FORMAT(t1.start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 MONTH),'%Y%m')
+ and DATE_FORMAT(t1.start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m')
- and YEAR(t1.start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 QUARTER)) and QUARTER(t1.start_time) = QUARTER(DATE_SUB(#{startTime},INTERVAL 1 QUARTER))
+ and YEAR(t1.start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR)) and QUARTER(t1.start_time) = QUARTER(#{startTime})
and YEAR(t1.start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR))
@@ -384,13 +384,13 @@
from dc_event
where event_type = '1' and direction = #{direction}
- and DATE_FORMAT(start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 DAY),'%Y%m%d')
+ and DATE_FORMAT(start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m%d')
- and DATE_FORMAT(start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 MONTH),'%Y%m')
+ and DATE_FORMAT(start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m')
- and YEAR(start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 QUARTER)) and QUARTER(start_time) = QUARTER(DATE_SUB(#{startTime},INTERVAL 1 QUARTER))
+ and YEAR(start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR)) and QUARTER(start_time) = QUARTER(#{startTime})
and YEAR(start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR))
From 93de06520eb97b2ae5d7611cd168485b8faea643 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Tue, 14 May 2024 16:07:42 +0800
Subject: [PATCH 54/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=AD=90=E7=B1=BB?=
=?UTF-8?q?=E6=A0=A1=E9=AA=8C=20=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/zc/business/enums/EventSource.java | 8 +-
.../com/zc/business/enums/EventSubclass.java | 75 +++++++++++++++++++
.../service/impl/DcEventServiceImpl.java | 28 +++++--
3 files changed, 102 insertions(+), 9 deletions(-)
create mode 100644 zc-business/src/main/java/com/zc/business/enums/EventSubclass.java
diff --git a/zc-business/src/main/java/com/zc/business/enums/EventSource.java b/zc-business/src/main/java/com/zc/business/enums/EventSource.java
index 37547c10..b03a4a02 100644
--- a/zc-business/src/main/java/com/zc/business/enums/EventSource.java
+++ b/zc-business/src/main/java/com/zc/business/enums/EventSource.java
@@ -5,7 +5,13 @@ package com.zc.business.enums;
*/
//事件来源枚举
public enum EventSource {
- VIDEO_AI(1, "视频AI");
+ VIDEO(1, "96656"),
+ TRAFFIC_POLICE(2,"交警转接"),
+ ROAD_PATROL(3,"道路巡查"),
+ VIDEO_INSPECTION(4,"视频巡查"),
+ VIDEO_AI(5,"视频AI"),
+ ONE_CLICK_RESCUE(6,"一键救援"),
+ REST(7,"其他");
private final Integer code;
private final String description;
diff --git a/zc-business/src/main/java/com/zc/business/enums/EventSubclass.java b/zc-business/src/main/java/com/zc/business/enums/EventSubclass.java
new file mode 100644
index 00000000..3c3721f5
--- /dev/null
+++ b/zc-business/src/main/java/com/zc/business/enums/EventSubclass.java
@@ -0,0 +1,75 @@
+package com.zc.business.enums;
+
+/**
+ *
+ */
+public enum EventSubclass {
+ REAR_END ("1-1","追尾"),
+ TURN_ON_ONE_S_SIDE ("1-2","侧翻"),
+ CRASH_INTO_THE_BARRIER ("1-3","撞护栏"),
+ NATURE ("1-4","自燃"),
+ OTHER_ACCIDENTS ("1-5","其他事故"),
+ VEHICLE_FAULT ("2-1","车辆故障"),
+ THE_MAIN_LINE_IS_CLOSED_AND_RESTRICTED ("3-1","主线封闭和限行"),
+ TOLL_BOOTHS_ARE_CLOSED_AND_RESTRICTED ("3-2","收费站封闭和限行"),
+ THE_INTERCHANGE_IS_CLOSED_AND_RESTRICTED ("3-3","立交封闭和限行"),
+ THE_SERVICE_AREA_IS_CLOSED_AND_RESTRICTED ("3-4","服务区封闭和限行"),
+ ROAD_CONGESTION ("4-1","道路拥堵"),
+ INTERCHANGE_CONGESTION ("4-2","立交拥堵"),
+ TOLL_BOOTHS_ARE_CONGESTED ("4-3","收费站拥堵"),
+ SERVICE_AREA_CONGESTION ("4-4","服务区拥堵"),
+ PEDESTRIAN ("5-1","行人"),
+ NON_MOTOR_VEHICLE ("5-2","非机动车"),
+ MOTORCYCLE("5-3","摩托车"),
+ ELSE ("5-4","其他"),
+ SMOKE ("6-1","烟雾"),
+ FALLEN_TREE ("6-2","倒伏树木"),
+ OUTFALL ("6-3","撒落物"),
+ ZOON ("6-4","动物"),
+ OTHER ("6-5","其他"),
+ ROAD_MAINTENANCE_CONSTRUCTION ("7-1","道路养护施工"),
+ TOLL_STATION_MAINTENANCE_AND_CONSTRUCTION ("7-2","收费站养护施工"),
+ MAINTENANCE_CONSTRUCTION_OF_SERVICE_AREA ("7-3","服务区养护施工"),
+ MAINTENANCE_AND_CONSTRUCTION_OF_INTERCHANGE_RAMP ("7-4","枢纽立交匝道养护施工"),
+ LOCAL_ROAD_MAINTENANCE_CONSTRUCTION ("7-5","地方道路养护施工"),
+ ROAD_ENGINEERING_CONSTRUCTION ("7-6","道路工程建设施工"),
+ TOLL_STATION_CONSTRUCTION ("7-7","收费站工程建设施工"),
+ SERVICE_AREA_PROJECT_CONSTRUCTION ("7-8","服务区工程建设施工"),
+ JUNCTION_INTERCHANGE_RAMP_PROJECT_CONSTRUCTION ("7-9","枢纽立交匝道工程建设施工"),
+ LOCAL_ROAD_ENGINEERING_CONSTRUCTION ("7-10", "地方道路工程建设施工"),
+ SUSPEND_BUSINESS ("8-1","封闭、暂停营业"),
+ SHUTDOWN_OF_CRITICAL_FACILITIES ("8-2","重要设施停用"),
+ OTHERS_IN_THE_SERVICE_AREA_ARE_ABNORMAL ("8-3","服务区其他异常"),
+ CAMERA ("9-1","摄像机"),
+ GUARDRAIL ("9-2","护栏"),
+ ISOLATING_GRID ("9-3","隔离栅"),
+ INTEL_BOARD ("9-4","情报板"),
+ ANTI_GLARE_PLATE ("9-5","防炫板"),
+ REST1 ("9-6","其他"),
+ THE_RAIN ("10-1", "雨"),
+ SNOW ("10-2", "雪"),
+ THE_FOG ("10-3", "雾"),
+ GALE ("10-4", "大风"),
+ LOW_TEMPERATURE_COLD_WAVE ("10-5", "低温寒潮"),
+ SNOW_ON_PAVEMENT ("10-6", "路面积雪"),
+ ICY_ROAD ("10-7", "路面结冰"),
+ ROAD_WATER ("10-8", "路面积水"),
+ RESTS ("10-9", "其他"),
+ OTHER_EVENTS ("11-1", "其他事件");
+ private final String code;
+ private final String description;
+
+ EventSubclass(String code, String description) {
+ this.code = code;
+ this.description = description;
+ }
+
+ public String getCode()
+ {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
index 485979da..a89181d6 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
@@ -11,9 +11,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.system.service.ISysDeptService;
import com.zc.business.domain.*;
-import com.zc.business.enums.EventSubclassEnum;
-import com.zc.business.enums.EventTypeEnum;
-import com.zc.business.enums.ValueConverter;
+import com.zc.business.enums.*;
import com.zc.business.mapper.*;
import com.zc.business.service.IDcEventProcessService;
import com.zc.business.service.IDcEventService;
@@ -667,20 +665,34 @@ public class DcEventServiceImpl extends ServiceImpl impl
*/
@Override
public int updateDcEvent(DcEvent dcEvent) {
-/* //事件类型校验
+/*
+ //事件类型校验
for (EventTypeEnum value : EventTypeEnum.values()) {
- if (dcEvent.getEventType().toString()==value.getInfo()){
+ if (dcEvent.getEventType().toString().equals(value.getInfo())){
dcEvent.setEventType(Long.valueOf(value.getCode()));
}
}
+*/
// 事件子类校验
- for (EventSubclassEnum value : EventSubclassEnum.values()) {
- if (value.getInfo().equals(dcEvent.getEventSubclass())){
+ for (EventSubclass value : EventSubclass.values()) {
+ if (value.getDescription().equals(dcEvent.getEventSubclass())){
dcEvent.setEventSubclass(value.getCode());
}
}
-//事件来源校验*/
+ /*//事件来源校验
+ for (EventSource value : EventSource.values()) {
+ if (value.getDescription().equals(dcEvent.getEventSource())){
+ dcEvent.setEventSource(Long.valueOf(value.getCode()));
+ }
+ }*/
+
+//事件方向
+ if (dcEvent.getDirection().equals("菏泽方向")){
+ dcEvent.setDirection("1");
+ } if (dcEvent.getDirection().equals("济南方向")){
+ dcEvent.setDirection("3");
+ }
DcEvent oldEvent = selectEventSubclassById(dcEvent.getId());
dcEvent.setUpdateTime(DateUtils.getNowDate());
From c297fa4bb3e06000ab02f72d9b113a61ba2577dd Mon Sep 17 00:00:00 2001
From: zhaoxianglong
Date: Tue, 14 May 2024 16:52:36 +0800
Subject: [PATCH 55/60] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E8=B0=83=E7=94=A8=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcDeviceController.java | 17 ++++-
.../interfaces/OperationLogAspect.java | 73 +++++++++++--------
2 files changed, 57 insertions(+), 33 deletions(-)
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 ab94bd0a..4feddd9e 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
@@ -517,7 +517,11 @@ public class DcDeviceController extends BaseController {
resultArray.add(result);
AjaxResult ajaxResult = (AjaxResult) result.get("result");
if (!Objects.equals(String.valueOf(ajaxResult.get("code")), "200")) {
- return AjaxResult.error(200,"500");
+ if (Objects.equals(device.getString("deviceType"), "15")) {
+ return AjaxResult.error(200, "500");
+ } else {
+ return AjaxResult.error();
+ }
}
}
}
@@ -529,9 +533,16 @@ public class DcDeviceController extends BaseController {
});
JSONObject result = new JSONObject();
result.put("device", device.getString("id"));
- result.put("functionId",functionId);
+ result.put("functionId", functionId);
if (device.getInteger("deviceType").equals(DeviceTypeConstants.ROAD_SECTION_VOICE_BROADCASTING)) {
- result.put("result", broadcastController.nearCamListDistance(jsonObject));
+ JSONObject value = broadcastController.nearCamListDistance(jsonObject);
+ AjaxResult ajaxResult = new AjaxResult();
+ value.keySet().forEach(item -> {
+ ajaxResult.put(item, value.getString(item));
+ });
+ ajaxResult.put("code", 200);
+
+ result.put("result", ajaxResult);
} else {
result.put("result", getAjaxResult(iotDeviceId, functionId, params));
}
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 ec8e4fe8..be5d0d17 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
@@ -17,7 +17,6 @@ import com.zc.business.domain.DcOperLog;
import com.zc.business.domain.DcPublishManage;
import com.zc.business.service.IDcDeviceService;
import com.zc.business.service.IDcOperLogService;
-import com.zc.business.service.IDcPublishInfoService;
import com.zc.business.service.IDcPublishManageService;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
@@ -27,6 +26,7 @@ import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.stream.Collectors;
@Aspect
@Component
@@ -162,7 +162,7 @@ public class OperationLogAspect {
} else {
pointArg = (JSONObject) JSON.toJSON(pointArgs[0]);
}
-
+ String contentDetails = "";
JSONArray devices = pointArg.getJSONArray("devices");
JSONArray functions = pointArg.getJSONArray("functions");
@@ -205,6 +205,19 @@ public class OperationLogAspect {
if (i1 < functions.size() - 1) {
remark.append("、");
}
+
+
+
+ if (Objects.equals(function.getString("functionId"), "13")&&Objects.equals(deviceType,"2")){
+ JSONArray parameters = function.getJSONObject("params").getJSONArray("parameters");
+ List content = parameters.stream().map(item->((JSONObject)item).getString("CONTENT")).collect(Collectors.toList());
+ contentDetails = content.toString().replace("[", "").replace("]", "");
+ }
+
+
+ if (Objects.equals(deviceType,"5")){
+ contentDetails = function.getJSONObject("params").getString("text");
+ }
}
if (i < (devices.size() - 1)) {
@@ -262,7 +275,7 @@ public class OperationLogAspect {
dcPublishManage.setPublishChannels(7);
}
- dcPublishManage.setContentDetails(remark.toString());
+ dcPublishManage.setContentDetails(contentDetails);
dcPublishManageService.insertDcPublishManage(dcPublishManage);
}
@@ -312,33 +325,33 @@ public class OperationLogAspect {
dcOperLogService.save(operLog);
- if ((Objects.equals(deviceType, "2") || Objects.equals(deviceType, "5")) && Objects.nonNull(operLog.getId())) {
- DcPublishManage dcPublishManage = new DcPublishManage();
-
- if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200")) {
- dcPublishManage.setPublishStatus(1);//发布状态1-成功2-失败
- } else {
- dcPublishManage.setPublishStatus(2);//发布状态1-成功2-失败
- }
-
- if (loginUser != null) {
- dcPublishManage.setPublisher(loginUser.getUsername());//发布人
- } else {
- dcPublishManage.setPublisher("系统定时调用");//发布人
- }
- dcPublishManage.setPublishTime(new Date());//发布时间
- dcPublishManage.setCreateTime(new Date());//创建时间
-
- dcPublishManage.setLogId(Long.valueOf(operLog.getId()));//发布的如果的情报板传对应id
- if (Objects.equals(deviceType, "2")) {
- dcPublishManage.setPublishChannels(4);
- } else {
- dcPublishManage.setPublishChannels(7);
- }
-
- dcPublishManage.setContentDetails(remark.toString());
- dcPublishManageService.insertDcPublishManage(dcPublishManage);
- }
+ //if ((Objects.equals(deviceType, "2") || Objects.equals(deviceType, "5")) && Objects.nonNull(operLog.getId())) {
+ // DcPublishManage dcPublishManage = new DcPublishManage();
+ //
+ // if (Objects.equals(state, "0") && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), "200")) {
+ // dcPublishManage.setPublishStatus(1);//发布状态1-成功2-失败
+ // } else {
+ // dcPublishManage.setPublishStatus(2);//发布状态1-成功2-失败
+ // }
+ //
+ // if (loginUser != null) {
+ // dcPublishManage.setPublisher(loginUser.getUsername());//发布人
+ // } else {
+ // dcPublishManage.setPublisher("系统定时调用");//发布人
+ // }
+ // dcPublishManage.setPublishTime(new Date());//发布时间
+ // dcPublishManage.setCreateTime(new Date());//创建时间
+ //
+ // dcPublishManage.setLogId(Long.valueOf(operLog.getId()));//发布的如果的情报板传对应id
+ // if (Objects.equals(deviceType, "2")) {
+ // dcPublishManage.setPublishChannels(4);
+ // } else {
+ // dcPublishManage.setPublishChannels(7);
+ // }
+ //
+ // dcPublishManage.setContentDetails(remark.toString());
+ // dcPublishManageService.insertDcPublishManage(dcPublishManage);
+ //}
}
}
From 537eb81aff5d331a3de5a71a655e4e8079436f86 Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Tue, 14 May 2024 17:40:46 +0800
Subject: [PATCH 56/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=84=E6=A1=88?=
=?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/DcEmergencyPlansServiceImpl.java | 23 ++++++++++---------
1 file changed, 12 insertions(+), 11 deletions(-)
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 156e68a0..4784ce2f 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
@@ -1051,23 +1051,17 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
public int updateDcEmergencyPlans(DcEmergencyPlans dcEmergencyPlans) {
dcEmergencyPlans.setUpdateTime(DateUtils.getNowDate());
List dcExecuteActionList = dataProcessing(dcEmergencyPlans);
- // 修改事件预案表数据
- dcEmergencyPlansMapper.updateDcEmergencyPlans(dcEmergencyPlans);
// 修改执行操作表数据
- dcExecuteActionList.forEach(dcExecuteAction -> dcExecuteAction.setUpdateTime(DateUtils.getNowDate()));
- // 过滤出删除掉的操作
- String dcExecuteActionId = dcExecuteActionList.stream()
+ dcExecuteActionList.stream()
.filter(dcExecuteAction -> dcExecuteAction.getId() != null)
- .map(DcExecuteAction::getEmergencyPlansId)
- .map(String::valueOf)
- .findFirst()
- .orElse(null);
+ .forEach(dcExecuteAction -> dcExecuteAction.setUpdateTime(DateUtils.getNowDate()));
+ // 过滤出删除掉的操作
List ids = dcExecuteActionList.stream()
.filter(dcExecuteAction -> dcExecuteAction.getId() != null)
.map(DcExecuteAction::getId)
.collect(Collectors.toList());
// 查询出事件预案关联的操作
- List dcExecuteActionIdList = dcExecuteActionService.selectDcExecuteActionByEmergencyPlansId(dcExecuteActionId);
+ List dcExecuteActionIdList = dcExecuteActionService.selectDcExecuteActionByEmergencyPlansId(dcEmergencyPlans.getId().toString());
List commonIds = new ArrayList<>(ids);
commonIds.retainAll(dcExecuteActionIdList);
@@ -1087,8 +1081,15 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
insertDcExecuteActionList.forEach(dcExecuteAction -> dcExecuteAction.setCreateTime(DateUtils.getNowDate()));
dcExecuteActionService.insertDcExecuteActionBatch(insertDcExecuteActionList);
}
+ List updateDcExecuteAction = dcExecuteActionList.stream()
+ .filter(dcExecuteAction -> dcExecuteAction.getId() != null)
+ .collect(Collectors.toList());
+ if (updateDcExecuteAction.size() > 0) {
+ dcExecuteActionService.updateDcExecuteActionBatch(updateDcExecuteAction);
+ }
- return dcExecuteActionService.updateDcExecuteActionBatch(dcExecuteActionList);
+ // 修改事件预案表数据
+ return dcEmergencyPlansMapper.updateDcEmergencyPlans(dcEmergencyPlans);
}
/**
From d2a345d029b26b378a18f1659d41d59e47e925f7 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Wed, 15 May 2024 09:30:25 +0800
Subject: [PATCH 57/60] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DcPublishManageController.java | 38 +++---
.../zc/business/domain/DcPublishManage.java | 110 +++++++++---------
.../mapper/DcPublishManageMapper.java | 2 +
.../service/IDcPublishManageService.java | 2 +
.../impl/DcPublishManageServiceImpl.java | 5 +
.../mapper/business/DcPublishManageMapper.xml | 51 ++++++--
6 files changed, 129 insertions(+), 79 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
index 1f2199cb..ad006952 100644
--- a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
+++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
@@ -26,7 +26,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* 信息发布管理记录Controller
- *
+ *
* @author ruoyi
* @date 2024-04-19
*/
@@ -60,18 +60,7 @@ public class DcPublishManageController extends BaseController
}
return AjaxResult.success(dcPublishManageService.selectEventDcPublishManageList(dcPublishManage));
}
- /**
- * 导出信息发布管理记录列表
- */
- @PreAuthorize("@ss.hasPermi('business:manage:export')")
- @Log(title = "信息发布管理记录", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, DcPublishManage dcPublishManage)
- {
- List list = dcPublishManageService.selectDcPublishManageList(dcPublishManage);
- ExcelUtil util = new ExcelUtil<>(DcPublishManage.class);
- util.exportExcel(response, list, "信息发布管理记录数据");
- }
+
/**
* 获取信息发布管理记录详细信息
@@ -157,4 +146,27 @@ public class DcPublishManageController extends BaseController
}
return AjaxResult.success(dcPublishManageService.eventTypePublishManageMonth(dcPublishManage));
}
+ /**
+ * 公众服务统计查询
+ */
+ @PostMapping("/statisticsList")
+ public TableDataInfo statisticsList(@RequestBody DcPublishManage dcPublishManage)
+ {
+ startPage();
+ List list = dcPublishManageService.selectDcPublishManageStatistics(dcPublishManage);
+ return getDataTable(list);
+ }
+ /**
+ * 公众服务统计导出
+ */
+ @PreAuthorize("@ss.hasPermi('business:manage:export')")
+ @Log(title = "信息发布管理记录", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DcPublishManage dcPublishManage)
+ {
+ List list = dcPublishManageService.selectDcPublishManageStatistics(dcPublishManage);
+ ExcelUtil util = new ExcelUtil<>(DcPublishManage.class);
+ util.exportExcel(response, list, "信息发布管理记录数据");
+ }
+
}
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java b/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
index abed367f..ea80eeac 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcPublishManage.java
@@ -10,7 +10,7 @@ import org.omg.CORBA.INTERNAL;
/**
* 信息发布管理记录对象 dc_publish_manage
- *
+ *
* @author ruoyi
* @date 2024-04-19
*/
@@ -22,27 +22,27 @@ public class DcPublishManage extends BaseEntity
private Long id;
/** 事件编号 */
- @Excel(name = "事件编号")
+ //@Excel(name = "事件编号")
private String eventId;
/** 所属机构 */
- @Excel(name = "所属机构")
+ //@Excel(name = "所属机构")
private Long deptId;
/** 发布渠道ID */
- @Excel(name = "发布渠道ID")
+ //@Excel(name = "发布渠道ID")
private Long publishChannelsId;
/** 标题 */
- @Excel(name = "标题")
+ //@Excel(name = "标题")
private String title;
/** 发布渠道:多选用逗号隔开1-手机短信2-微信公众号3-微博4-情报板5-服务网站6-微信小程序 */
- @Excel(name = "发布渠道",readConverterExp="1=手机短信,2=微信公众号,3=微博,4=情报板,5=服务网站,6=微信小程序")
+ @Excel(name = "发布渠道",readConverterExp="1=手机短信,2=微信公众号,3=微博,4=情报板,5=服务网站,6=微信小程序,7=语音广播")
private Integer publishChannels;
/** 审核状态:0-待审核1-已审核2-未通过 */
- @Excel(name = "审核状态: 0-待审核 1-已审核 2-未通过")
+ //@Excel(name = "审核状态: 0-待审核 1-已审核 2-未通过")
private Integer isverify;
/** 发布者 */
@@ -50,51 +50,51 @@ public class DcPublishManage extends BaseEntity
private String publisher;
/** 审核者1 */
- @Excel(name = "审核者1")
+ //@Excel(name = "审核者1")
private String auditor1;
/** 审核者1 */
- @Excel(name = "审核者1")
+ //@Excel(name = "审核者1")
private String auditor2;
/** 审核时间1 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
- @Excel(name = "审核时间1", width = 30, dateFormat = "yyyy-MM-dd")
+ //@Excel(name = "审核时间1", width = 30, dateFormat = "yyyy-MM-dd")
private Date auditTime1;
/** 审核时间1 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
- @Excel(name = "审核时间1", width = 30, dateFormat = "yyyy-MM-dd")
+ //@Excel(name = "审核时间1", width = 30, dateFormat = "yyyy-MM-dd")
private Date auditTime2;
/** 审核者1意见 */
- @Excel(name = "审核者1意见")
+ //@Excel(name = "审核者1意见")
private String auditComment1;
/** 审核者2意见 */
- @Excel(name = "审核者2意见")
+ //@Excel(name = "审核者2意见")
private String auditComment2;
/** 发布时间 */
- @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date publishTime;
/** 发布状态:1-成功2-失败3-草稿 */
- @Excel(name = "发布状态: 1-成功 2-失败 3-草稿")
+ @Excel(name = "发布状态",readConverterExp="1=成功,2=失败,3=草稿")
private Integer publishStatus;
/** 事件详情 */
- @Excel(name = "事件详情")
+ @Excel(name = "内容")
private String contentDetails;
- @Excel(name = "方向", readConverterExp = "1=菏泽方向,3=济南方向")
+ //@Excel(name = "方向", readConverterExp = "1=菏泽方向,3=济南方向")
private String direction;
- @Excel(name = "桩号")
+ //@Excel(name = "桩号")
private String stakeMark;
- @Excel(name = "事件主类",readConverterExp = "1=交通事故,2=车辆故障,3=交通管制,4=交通拥堵,5=非法上路,6=路障清除,7=施工建设,8=服务区异常,9=设施设备隐患,10=异常天气,11=其他事件")
+ //@Excel(name = "事件主类",readConverterExp = "1=交通事故,2=车辆故障,3=交通管制,4=交通拥堵,5=非法上路,6=路障清除,7=施工建设,8=服务区异常,9=设施设备隐患,10=异常天气,11=其他事件")
private String eventType;
- @Excel(name = "事件子类", readConverterExp = "1-1=追尾,1-2=侧翻,1-3=撞护栏,1-4=自然,1-5=其他事故,2-1=车辆故障,3-1=主线封闭和限行,3-2=收费站封闭和限行,3-3=立交封闭和限行,3-4=服务区封闭和限行,4-1=道路拥堵,4-2=立交拥堵,4-3=收费站拥堵,4-4=服务区拥堵,5-1=行人,5-2=非机动车,5-3=摩托车,5-4=其他,6-1=烟雾,6-2=倒伏树木,6-3=撒落物,6-4=动物,6-5=其他,7-1=道路养护施工,7-2=收费站养护施工,7-3=服务区养护施工,7-4=枢纽立交匝道养护施工,7-5=地方道路养护施工,7-6=道路工程建设施工,7-7=收费站工程建设施工,7-8=服务区工程建设施工,7-9=枢纽立交匝道工程建设施工,7-10=地方道路工程建设施工,8-1=封闭、暂停营业,8-2=重要设施停用,8-3=服务区其他异常,9-1=摄像机,9-2=护栏,9-3=隔离栅")
+ //@Excel(name = "事件子类", readConverterExp = "1-1=追尾,1-2=侧翻,1-3=撞护栏,1-4=自然,1-5=其他事故,2-1=车辆故障,3-1=主线封闭和限行,3-2=收费站封闭和限行,3-3=立交封闭和限行,3-4=服务区封闭和限行,4-1=道路拥堵,4-2=立交拥堵,4-3=收费站拥堵,4-4=服务区拥堵,5-1=行人,5-2=非机动车,5-3=摩托车,5-4=其他,6-1=烟雾,6-2=倒伏树木,6-3=撒落物,6-4=动物,6-5=其他,7-1=道路养护施工,7-2=收费站养护施工,7-3=服务区养护施工,7-4=枢纽立交匝道养护施工,7-5=地方道路养护施工,7-6=道路工程建设施工,7-7=收费站工程建设施工,7-8=服务区工程建设施工,7-9=枢纽立交匝道工程建设施工,7-10=地方道路工程建设施工,8-1=封闭、暂停营业,8-2=重要设施停用,8-3=服务区其他异常,9-1=摄像机,9-2=护栏,9-3=隔离栅")
private String eventSubclass;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@@ -120,7 +120,9 @@ public class DcPublishManage extends BaseEntity
private Integer eventState;
//关联情报板id
private Long logId;
-
+ //位置
+ @Excel(name = "位置/设备")
+ private String position;
public Long getLogId() {
return logId;
@@ -241,151 +243,151 @@ public class DcPublishManage extends BaseEntity
this.id = id;
}
- public Long getId()
+ public Long getId()
{
return id;
}
- public void setEventId(String eventId)
+ public void setEventId(String eventId)
{
this.eventId = eventId;
}
- public String getEventId()
+ public String getEventId()
{
return eventId;
}
- public void setDeptId(Long deptId)
+ public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
- public Long getDeptId()
+ public Long getDeptId()
{
return deptId;
}
- public void setPublishChannelsId(Long publishChannelsId)
+ public void setPublishChannelsId(Long publishChannelsId)
{
this.publishChannelsId = publishChannelsId;
}
- public Long getPublishChannelsId()
+ public Long getPublishChannelsId()
{
return publishChannelsId;
}
- public void setTitle(String title)
+ public void setTitle(String title)
{
this.title = title;
}
- public String getTitle()
+ public String getTitle()
{
return title;
}
- public void setPublishChannels(Integer publishChannels)
+ public void setPublishChannels(Integer publishChannels)
{
this.publishChannels = publishChannels;
}
- public Integer getPublishChannels()
+ public Integer getPublishChannels()
{
return publishChannels;
}
- public void setIsverify(Integer isverify)
+ public void setIsverify(Integer isverify)
{
this.isverify = isverify;
}
- public Integer getIsverify()
+ public Integer getIsverify()
{
return isverify;
}
- public void setPublisher(String publisher)
+ public void setPublisher(String publisher)
{
this.publisher = publisher;
}
- public String getPublisher()
+ public String getPublisher()
{
return publisher;
}
- public void setAuditor1(String auditor1)
+ public void setAuditor1(String auditor1)
{
this.auditor1 = auditor1;
}
- public String getAuditor1()
+ public String getAuditor1()
{
return auditor1;
}
- public void setAuditor2(String auditor2)
+ public void setAuditor2(String auditor2)
{
this.auditor2 = auditor2;
}
- public String getAuditor2()
+ public String getAuditor2()
{
return auditor2;
}
- public void setAuditTime1(Date auditTime1)
+ public void setAuditTime1(Date auditTime1)
{
this.auditTime1 = auditTime1;
}
- public Date getAuditTime1()
+ public Date getAuditTime1()
{
return auditTime1;
}
- public void setAuditTime2(Date auditTime2)
+ public void setAuditTime2(Date auditTime2)
{
this.auditTime2 = auditTime2;
}
- public Date getAuditTime2()
+ public Date getAuditTime2()
{
return auditTime2;
}
- public void setAuditComment1(String auditComment1)
+ public void setAuditComment1(String auditComment1)
{
this.auditComment1 = auditComment1;
}
- public String getAuditComment1()
+ public String getAuditComment1()
{
return auditComment1;
}
- public void setAuditComment2(String auditComment2)
+ public void setAuditComment2(String auditComment2)
{
this.auditComment2 = auditComment2;
}
- public String getAuditComment2()
+ public String getAuditComment2()
{
return auditComment2;
}
- public void setPublishTime(Date publishTime)
+ public void setPublishTime(Date publishTime)
{
this.publishTime = publishTime;
}
- public Date getPublishTime()
+ public Date getPublishTime()
{
return publishTime;
}
- public void setPublishStatus(Integer publishStatus)
+ public void setPublishStatus(Integer publishStatus)
{
this.publishStatus = publishStatus;
}
- public Integer getPublishStatus()
+ public Integer getPublishStatus()
{
return publishStatus;
}
- public void setContentDetails(String contentDetails)
+ public void setContentDetails(String contentDetails)
{
this.contentDetails = contentDetails;
}
- public String getContentDetails()
+ public String getContentDetails()
{
return contentDetails;
}
diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
index a0f25737..8a2f318f 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
@@ -84,4 +84,6 @@ public interface DcPublishManageMapper
public List> eventTypePublishManageSum();
//统计不同事件的发布渠道数量(月统计)
public List> eventTypePublishManageMonth(DcPublishManage dcPublishManage);
+ //公众服务统计查询
+ public List selectDcPublishManageStatistics(DcPublishManage dcPublishManage);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
index 107c4452..71f5f2eb 100644
--- a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
+++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
@@ -72,4 +72,6 @@ public interface IDcPublishManageService
public List> eventTypePublishManageSum();
//统计不同事件的发布渠道数量(月统计)
public List> eventTypePublishManageMonth(DcPublishManage dcPublishManage);
+ //公众服务统计查询
+ public List selectDcPublishManageStatistics(DcPublishManage dcPublishManage);
}
diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
index 3a8bc631..dd9e9c1c 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
@@ -140,4 +140,9 @@ public class DcPublishManageServiceImpl implements IDcPublishManageService
public List> eventTypePublishManageMonth(DcPublishManage dcPublishManage) {
return dcPublishManageMapper.eventTypePublishManageMonth(dcPublishManage);
}
+ //公众服务统计查询
+ @Override
+ public List selectDcPublishManageStatistics(DcPublishManage dcPublishManage) {
+ return dcPublishManageMapper.selectDcPublishManageStatistics(dcPublishManage);
+ }
}
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index 025c8a24..acc5ff98 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -45,7 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from dc_publish_manage as manage
LEFT JOIN dc_event as event on event.id=manage.event_id
LEFT JOIN dc_event_traffic_control as traffic on event.id=traffic.id
- LEFT JOIN dc_facility as facility ON traffic.facility_id=facility.id
select facility.facility_name,event.event_state,manage.publish_time, manage.create_time,
@@ -65,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
manage.event_id is not null
and event.event_state = #{eventState}
and event.event_type = #{eventType}
- and manage.publish_status = #{publishStatus}
+ and manage.publish_status = #{publishStatus}
and manage.create_time between #{startTime} and #{endTime}
@@ -81,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY manage.event_id
ORDER BY event.create_time desc
-
+
where id = #{id}
@@ -189,7 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from dc_publish_manage where event_id = #{eventId}
- delete from dc_publish_manage where id in
+ delete from dc_publish_manage where id in
#{id}
@@ -222,11 +221,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY p.publish_channels;
- SELECT event.event_type AS eventType, COUNT(manage.event_id) AS number
- FROM dc_event AS event
- LEFT JOIN dc_publish_manage AS manage ON event.id = manage.event_id AND DATE(manage.publish_time) = CURDATE()
- GROUP BY event.event_type
- ORDER BY event.event_type;
+ SELECT h.eventType,
+ COALESCE(m.number, 0) AS number
+ FROM (
+ SELECT 1 AS eventType
+ UNION ALL
+ SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+ SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL
+ SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL
+ SELECT 11
+ ) AS h
+ LEFT JOIN (
+ SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number
+ FROM dc_publish_manage
+ LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id
+ where event_id is not NULL
+ GROUP BY eventType
+ ) AS m ON h.eventType = m.eventType
+ ORDER BY h.eventType
SELECT h.hour,
@@ -260,7 +272,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY h.hour, pc.publish_channels;
- SELECT h.hour, pc.publish_channels, COALESCE(m.number, 0) AS number
+ SELECT h.hour, pc.publish_channels publishChannels, COALESCE(m.number, 0) AS number
FROM (
SELECT 0 AS hour UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL
SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL
@@ -340,4 +352,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels
ORDER BY h.eventType, pc.publish_channels;
-
\ No newline at end of file
+
+ select manage.id,IFNULL(event.stake_mark,log.dc_device_name)position,
+ manage.publisher,manage.publish_channels,manage.publish_status,manage.content_details,publish_time
+ from dc_publish_manage as manage
+ left join dc_event as event on event.id=manage.event_id
+ left join dc_oper_log as log on log.id=manage.log_id
+
+ and manage.publish_channels = #{publishChannels}
+ and manage.publish_status = #{publishStatus}
+
+ and manage.publish_time between #{startTime} and #{endTime}
+
+
+ ORDER BY publish_time desc
+
+
From 1cf1113efbfb14073d6ae72f94498a5be0398f95 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Wed, 15 May 2024 14:58:42 +0800
Subject: [PATCH 58/60] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=8F=91=E5=B8=83=E6=B8=A0=E9=81=93=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/business/DcPublishManageMapper.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
index acc5ff98..9ec470fe 100644
--- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
@@ -319,7 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number
FROM dc_publish_manage
LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id
- GROUP BY HOUR(publish_time), publish_channels
+ GROUP BY dc_event.event_type
) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels
ORDER BY h.eventType, pc.publish_channels;
From dfb244866147b75f7acf7a6e002beb24081ac6f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com>
Date: Wed, 15 May 2024 15:44:15 +0800
Subject: [PATCH 59/60] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E5=B9=BF=E6=92=AD=20?=
=?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zc/business/domain/DcVoiceBroadcast.java | 48 ++++---------------
.../business/DcVoiceBroadcastMapper.xml | 14 +++++-
2 files changed, 22 insertions(+), 40 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/domain/DcVoiceBroadcast.java b/zc-business/src/main/java/com/zc/business/domain/DcVoiceBroadcast.java
index 51cfc018..33e6ab75 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcVoiceBroadcast.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcVoiceBroadcast.java
@@ -2,6 +2,9 @@ package com.zc.business.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -13,7 +16,10 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2024-04-19
*/
+@Data
@ApiModel("语音广播预发布对象")
+@NoArgsConstructor
+@AllArgsConstructor
public class DcVoiceBroadcast extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -29,44 +35,8 @@ public class DcVoiceBroadcast extends BaseEntity
/** 内容 */
@Excel(name = "内容")
private String content;
+private String repeatTimes;
+private String priority;
+private String outVol;
- public void setId(Long id)
- {
- this.id = id;
- }
-
- public Long getId()
- {
- return id;
- }
- public void setCategory(String category)
- {
- this.category = category;
- }
-
- public String getCategory()
- {
- return category;
- }
- public void setContent(String content)
- {
- this.content = content;
- }
-
- public String getContent()
- {
- return content;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("category", getCategory())
- .append("content", getContent())
- .append("remark", getRemark())
- .append("createTime", getCreateTime())
- .append("updateTime", getUpdateTime())
- .toString();
- }
}
diff --git a/zc-business/src/main/resources/mapper/business/DcVoiceBroadcastMapper.xml b/zc-business/src/main/resources/mapper/business/DcVoiceBroadcastMapper.xml
index 45b14aa3..2551fa05 100644
--- a/zc-business/src/main/resources/mapper/business/DcVoiceBroadcastMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcVoiceBroadcastMapper.xml
@@ -11,10 +11,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
- select id, category, content, remark, create_time, update_time from dc_voice_broadcast
+ select id, category, content, remark, create_time, update_time,priority,outVol,repeat_times from dc_voice_broadcast
@@ -43,6 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
remark,
create_time,
update_time,
+ priority,
+ outVol,
+ repeat_times,
#{category},
@@ -50,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{remark},
#{createTime},
#{updateTime},
+ #{priority},
+ #{outVol},
+ #{repeatTimes},
@@ -61,6 +70,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
remark = #{remark},
create_time = #{createTime},
update_time = #{updateTime},
+ repeat_times = #{repeatTimes},
+ outVol = #{outVol},
+ priority = #{priority},
where id = #{id}
From 7928338686e53bf5ff06c7263dca0b70a5e6743e Mon Sep 17 00:00:00 2001
From: "Mr.Wang"
Date: Wed, 15 May 2024 17:23:32 +0800
Subject: [PATCH 60/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E7=A1=AE=E5=AE=9A=E4=B8=AD=E7=9A=84=E4=BA=8B=E4=BB=B6=E9=A2=84?=
=?UTF-8?q?=E6=A1=88=E5=85=B3=E8=81=94=E8=A1=A8=E5=AD=98=E5=82=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/zc/business/domain/EventPlanAssoc.java | 6 ++++++
.../service/impl/DcEmergencyPlansServiceImpl.java | 13 +++++++------
.../mapper/business/EventPlanAssocMapper.xml | 2 ++
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java b/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java
index 98b5f157..50a71e48 100644
--- a/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java
+++ b/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java
@@ -58,4 +58,10 @@ public class EventPlanAssoc {
*/
@ApiModelProperty("执行操作结果")
private String controlResult;
+
+ /**
+ * 执行操作
+ */
+ @ApiModelProperty("执行操作")
+ private String control;
}
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 4784ce2f..ee191c68 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
@@ -170,12 +170,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
dcExecuteActions.forEach(dcExecuteAction -> {
JSONObject executeConfig = JSON.parseObject(dcExecuteAction.getExecuteConfig());
if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.ROAD_SECTION_VOICE_BROADCASTING.getCode()
- && executeConfig.get("operationType").equals("2")) {
+ && executeConfig.getString("operationType").equals("2")) {
// 执行操作中智能发布语音广播
String content = intelligentPublishingOfInformation(dcEvent);
updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection());
} else if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.VARIABLE_INFORMATION_FLAG.getCode()
- && executeConfig.get("operationType").equals("2")) {
+ && executeConfig.getString("operationType").equals("2")) {
// 执行操作中智能发布情报板
String content = intelligentPublishingOfInformation(dcEvent);
updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection());
@@ -753,6 +753,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", ""));
eventPlanAssoc.setControlResult(resultArray.toJSONString());
eventPlanAssoc.setCreateTime(DateUtils.getNowDate());
+ eventPlanAssoc.setControl(JSON.toJSONString(dcEmergencyPlans.getDcExecuteAction()));
eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc);
resultObject.put("eventPlanAssocId",eventPlanAssoc.getId());
@@ -819,7 +820,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
else if (device.getDeviceType().equals(DeviceTypeConstants.VARIABLE_INFORMATION_FLAG.toString())) {
if (operationType == 1) {
// 情报板发布全流程
- if (otherConfig.get("operationType").equals("2")) {
+ if (otherConfig.getString("operationType").equals("2")) {
JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString());
JSONObject foundContent = contentList.stream()
.map(content -> JSON.parseObject(content.toString()))
@@ -843,7 +844,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
} else {
// 恢复操作
- if (otherConfig.get("operationType").equals("2")) {
+ if (otherConfig.getString("operationType").equals("2")) {
// 还原上次
props.put("fileId", "10");
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_1B;
@@ -869,7 +870,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
params.put("name", "task-event");
params.put("outVVol", "8");
params.put("priority", "1");
- if (otherConfig.get("operationType").equals("2")) {
+ if (otherConfig.getString("operationType").equals("2")) {
// 智能发布
JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString());
JSONObject foundContent = contentList.stream()
@@ -1169,7 +1170,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
}else if (dcExecuteAction.getDeviceType() == DeviceTypeConstants.VARIABLE_INFORMATION_FLAG ||
dcExecuteAction.getDeviceType() == DeviceTypeConstants.ROAD_SECTION_VOICE_BROADCASTING) {
// 情报板/语音广播
- if (jsonObject.get("operationType").equals("1")) {
+ if (jsonObject.getString("operationType").equals("1")) {
config.put("content",jsonObject.get("content"));
}else {
config.put("operationType","智能发布");
diff --git a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
index c0c79aca..c56e0a2c 100644
--- a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml
@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_time,
update_time,
control_result,
+ control,
#{eventId},
@@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{createTime},
#{updateTime},
#{controlResult},
+ #{control},