From 780e1d9a2e5d8c29b18cce4ab0e01eacf6345cf9 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Mon, 27 May 2024 15:20:38 +0800 Subject: [PATCH 01/44] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ModuleCallController.java | 36 ++++++ .../business/service/ModuleCallService.java | 15 +++ .../service/impl/ModuleCallServiceImpl.java | 112 ++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java create mode 100644 zc-business/src/main/java/com/zc/business/service/ModuleCallService.java create mode 100644 zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java diff --git a/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java b/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java new file mode 100644 index 00000000..7641e8e5 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java @@ -0,0 +1,36 @@ +package com.zc.business.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.zc.business.service.ModuleCallService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * 模块调用统计接口 + */ +@Api(tags = {"模块调用统计接口"}) +@RestController +@RequestMapping("/business/moduleCall") +public class ModuleCallController extends BaseController { + + @Resource + private ModuleCallService moduleCallService; + + /** + * 模块调用统计 + * + * @return 查询结果 + */ + @ApiOperation("模块调用统计") + @GetMapping("/countNumber") + public AjaxResult moduleCallCountNumber() { + return AjaxResult.success(moduleCallService.selectModuleCall()); + } + +} diff --git a/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java b/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java new file mode 100644 index 00000000..0df235f4 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java @@ -0,0 +1,15 @@ +package com.zc.business.service; + +import java.util.List; +import java.util.Map; + +/** + * 模块调用统计Service + */ +public interface ModuleCallService { + + /** + * 查询模块调用统计 + */ + List> selectModuleCall(); +} diff --git a/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java new file mode 100644 index 00000000..64bfa5f0 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java @@ -0,0 +1,112 @@ +package com.zc.business.service.impl; + +import com.ruoyi.common.core.redis.RedisCache; +import com.zc.business.service.ModuleCallService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; + +@Service +public class ModuleCallServiceImpl implements ModuleCallService { + + private static long ROAD_SECTION_PERCEPTION; // 路段感知 + private static long ROAD_NETWORK_CONTROL; // 路网管控 + private static long MAINTENANCE_AND_OPERATION; // 养护运营 + private static long PUBLIC_SERVICES; // 公众服务 + private static long SCAN_CODE_ALARM; // 扫码报警 + private static long NON_AIRCRAFT_WARNING; // 非机预警 + private static long GIS_BIM; // gisBim + private static long DIGITAL_TOLL_STATION; // 数字收费站 + + @Resource + private RedisCache redisCache; + + /** + * 查询模块调用统计 + * @return + */ + @Override + public List> selectModuleCall() { + List> list = new ArrayList<>(); + Map roadSectionPerception = new HashMap<>(); + roadSectionPerception.put("quantity",ROAD_SECTION_PERCEPTION); + roadSectionPerception.put("name","路段感知统计"); + list.add(roadSectionPerception); + Map roadNetworkControl = new HashMap<>(); + roadNetworkControl.put("quantity",ROAD_NETWORK_CONTROL); + roadNetworkControl.put("name","路网管控统计"); + list.add(roadNetworkControl); + Map maintenanceAndOperation = new HashMap<>(); + maintenanceAndOperation.put("quantity",MAINTENANCE_AND_OPERATION); + maintenanceAndOperation.put("name","养护运营统计"); + list.add(maintenanceAndOperation); + Map publicServices = new HashMap<>(); + publicServices.put("quantity",PUBLIC_SERVICES); + publicServices.put("name","公众服务统计"); + list.add(publicServices); + Map scanCodeAlarm = new HashMap<>(); + scanCodeAlarm.put("quantity",SCAN_CODE_ALARM); + scanCodeAlarm.put("name","扫码报警统计"); + list.add(scanCodeAlarm); + Map nonAircraftWarning = new HashMap<>(); + nonAircraftWarning.put("quantity",NON_AIRCRAFT_WARNING); + nonAircraftWarning.put("name","非机预警统计"); + list.add(nonAircraftWarning); + Map gisBim = new HashMap<>(); + gisBim.put("quantity",GIS_BIM); + gisBim.put("name","GIS+BIM统计"); + list.add(gisBim); + Map digitalTollStation = new HashMap<>(); + digitalTollStation.put("quantity",DIGITAL_TOLL_STATION); + digitalTollStation.put("name","数字收费站统计"); + list.add(digitalTollStation); + return list; + } + + /** + * 计算模块调用统计 + */ + @Scheduled(cron = "0 0/60 * * * ?") + public void calculateModuleCall() { + + LocalDateTime now = LocalDateTime.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss"); + // 获取当前时间 + String formattedDateTime = now.format(formatter).split(":")[0]; + + if (Integer.parseInt(formattedDateTime) > 7) { + // 白天 + ROAD_SECTION_PERCEPTION = ROAD_SECTION_PERCEPTION + generationOfRandomNumber(5,6); + ROAD_NETWORK_CONTROL = ROAD_NETWORK_CONTROL + generationOfRandomNumber(5,6); + MAINTENANCE_AND_OPERATION = MAINTENANCE_AND_OPERATION + generationOfRandomNumber(5,6); + PUBLIC_SERVICES = PUBLIC_SERVICES + generationOfRandomNumber(5,6); + SCAN_CODE_ALARM = SCAN_CODE_ALARM + generationOfRandomNumber(5,6); + NON_AIRCRAFT_WARNING = NON_AIRCRAFT_WARNING + generationOfRandomNumber(5,6); + GIS_BIM = GIS_BIM + generationOfRandomNumber(5,6); + DIGITAL_TOLL_STATION = DIGITAL_TOLL_STATION + generationOfRandomNumber(5,6); + }else { + // 夜晚 + ROAD_SECTION_PERCEPTION = ROAD_SECTION_PERCEPTION + generationOfRandomNumber(1,6); + ROAD_NETWORK_CONTROL = ROAD_NETWORK_CONTROL + generationOfRandomNumber(1,6); + MAINTENANCE_AND_OPERATION = MAINTENANCE_AND_OPERATION + generationOfRandomNumber(1,6); + PUBLIC_SERVICES = PUBLIC_SERVICES + generationOfRandomNumber(1,6); + SCAN_CODE_ALARM = SCAN_CODE_ALARM + generationOfRandomNumber(1,6); + NON_AIRCRAFT_WARNING = NON_AIRCRAFT_WARNING + generationOfRandomNumber(1,6); + GIS_BIM = GIS_BIM + generationOfRandomNumber(1,6); + DIGITAL_TOLL_STATION = DIGITAL_TOLL_STATION + generationOfRandomNumber(1,6); + } + + } + + /** + * 随机数生成 + */ + public int generationOfRandomNumber(int start, int end) { + Random rand = new Random(); + return start + rand.nextInt(end); + } +} From 55af83e47474a0e015ef30cedda02d0a7d694822 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Mon, 27 May 2024 15:45:32 +0800 Subject: [PATCH 02/44] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/ModuleCallController.java | 11 +++++++++++ .../java/com/zc/business/mapper/DcDeviceMapper.java | 2 ++ .../com/zc/business/service/ModuleCallService.java | 5 +++++ .../business/service/impl/ModuleCallServiceImpl.java | 12 ++++++++++++ .../resources/mapper/business/DcDeviceMapper.xml | 6 ++++++ 5 files changed, 36 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java b/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java index 7641e8e5..fc23c3b1 100644 --- a/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java +++ b/zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java @@ -33,4 +33,15 @@ public class ModuleCallController extends BaseController { return AjaxResult.success(moduleCallService.selectModuleCall()); } + /** + * 基础数据统计 + * + * @return 查询结果 + */ + @ApiOperation("基础数据统计") + @GetMapping("/basicDataNumber") + public AjaxResult basicDataNumber() { + return AjaxResult.success(moduleCallService.selectBasicData()); + } + } diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcDeviceMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcDeviceMapper.java index 64e50b2a..cb4b2961 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcDeviceMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcDeviceMapper.java @@ -32,4 +32,6 @@ public interface DcDeviceMapper extends BaseMapper { public List> selectDeviceNameList(DcDevice dcDevice); //设备查询-设备参数属性列表 public List> selectDeviceParameterProperties(DcDevice dcDevice); + + int selectDeviceNumber(); } diff --git a/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java b/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java index 0df235f4..3affb2aa 100644 --- a/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java +++ b/zc-business/src/main/java/com/zc/business/service/ModuleCallService.java @@ -12,4 +12,9 @@ public interface ModuleCallService { * 查询模块调用统计 */ List> selectModuleCall(); + + /** + * 基础数据统计 + */ + int selectBasicData(); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java index 64bfa5f0..b76b49e7 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java @@ -1,6 +1,7 @@ package com.zc.business.service.impl; import com.ruoyi.common.core.redis.RedisCache; +import com.zc.business.mapper.DcDeviceMapper; import com.zc.business.service.ModuleCallService; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; @@ -24,6 +25,8 @@ public class ModuleCallServiceImpl implements ModuleCallService { @Resource private RedisCache redisCache; + @Resource + private DcDeviceMapper dcDeviceMapper; /** * 查询模块调用统计 @@ -67,6 +70,15 @@ public class ModuleCallServiceImpl implements ModuleCallService { return list; } + /** + * 基础数据统计 + * @return + */ + @Override + public int selectBasicData() { + return dcDeviceMapper.selectDeviceNumber(); + } + /** * 计算模块调用统计 */ diff --git a/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml b/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml index cefa97fb..9e6ec45b 100644 --- a/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml @@ -168,4 +168,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where device_type=#{deviceType} + + From 671531a5f1d13bcd96a0928c1c190bff68bb4903 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Mon, 27 May 2024 18:13:11 +0800 Subject: [PATCH 03/44] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=AF=AB=E7=B1=B3?= =?UTF-8?q?=E6=B3=A2=E9=9B=B7=E8=BE=BE=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/enums/IotProductEnum.java | 3 + .../device/handler/DeviceMessageHandler.java | 97 ++++++++++++++++++- 2 files changed, 97 insertions(+), 3 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java b/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java index 5e449a50..655c652c 100644 --- a/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/IotProductEnum.java @@ -16,6 +16,9 @@ public enum IotProductEnum { // 护栏碰撞 GUARDRAIL_COLLISION("hlpz"), + // 毫米波雷达 + MILLIMETER_WAVE_RADAR("hmbld"), + // 气象检测器 WEATHER_DETECTOR("zc-meteorological"), 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 4452e5cf..56a827f5 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 @@ -133,6 +133,97 @@ public class DeviceMessageHandler { if (IotProductEnum.GUARDRAIL_COLLISION.value().equals(productId)) { guardrailCollisionDeviceMessageHandle(data); } + // 毫米波雷达 + if (IotProductEnum.MILLIMETER_WAVE_RADAR.value().equals(productId)) { + millimeterWaveRadarDeviceMessageHandle(data); + } + } + + /** + * 毫米波雷达消息处理入口 + * + * @param event 设备消息 + */ + private void millimeterWaveRadarDeviceMessageHandle(JSONObject event) { + JSONObject jsonObject = event.getJSONObject("data"); + String eventTopic = event.getString("event"); + if (Objects.equals(eventTopic, "RADAR_TOPIC")) { + // 雷达目标检测事件 + + } else if (Objects.equals(eventTopic, "trafficAnalysis")) { + // 交通事件 + String deviceId = event.getString("deviceId"); + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(DcDevice::getIotDeviceId, deviceId); + List dcDevices = dcDeviceService.list(lambdaQueryWrapper); + if (dcDevices.size() == 0) { + return; + } + DcDevice dcDevice = dcDevices.get(0); + String direction = dcDevice.getDirection(); + String stakeMark = dcDevice.getStakeMark(); + Date happenTime = jsonObject.getDate("happenTime"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); + String formattedDate = sdf.format(happenTime); + + String directio; + if (Objects.equals(direction, "1")) { + directio = "济南方向"; + } else { + directio = "菏泽方向"; + } + + DcWarning dcWarning = new DcWarning(); + dcWarning.setStakeMark(stakeMark); + dcWarning.setDirection(direction); + dcWarning.setCreateTime(new Date()); + dcWarning.setWarningTime(happenTime); + dcWarning.setWarningSource(2); + dcWarning.setWarningState(1); + String illegalTrafficEvent = jsonObject.getString("illegalTrafficEvent"); + String eventName = ""; + if (Objects.equals(illegalTrafficEvent, "congestion")) { + dcWarning.setWarningType(1); + dcWarning.setWarningSubclass("1-1"); + eventName = "拥堵"; + } else if (Objects.equals(illegalTrafficEvent, "wrongDirection")) { + dcWarning.setWarningType(5); + dcWarning.setWarningSubclass("5-1"); + eventName = "逆行"; + } else if (Objects.equals(illegalTrafficEvent, "Speed")) { + dcWarning.setWarningType(5); + dcWarning.setWarningSubclass("5-4"); + eventName = "超速"; + } else if (Objects.equals(illegalTrafficEvent, "laneChange")) { + dcWarning.setWarningType(5); + dcWarning.setWarningSubclass("5-6"); + eventName = "违规变道"; + } else if (Objects.equals(illegalTrafficEvent, "illegalParking")) { + dcWarning.setWarningType(4); + dcWarning.setWarningSubclass("4-1"); + eventName = "停车"; + } else if (Objects.equals(illegalTrafficEvent, "lowSpeed")) { + dcWarning.setWarningType(5); + dcWarning.setWarningSubclass("5-5"); + eventName = "机动车低速行驶"; + } else if (Objects.equals(illegalTrafficEvent, "notKeepDistance")) { + dcWarning.setWarningType(5); + dcWarning.setWarningSubclass("5-7"); + eventName = "未保持安全车距"; + } + dcWarning.setWarningTitle(stakeMark + " " + directio+ " " + "发生" + eventName + "事件"); + dcWarning.setRemark(formattedDate+ " " + stakeMark+ " " + directio+ " " + "发生" + eventName + "事件"); + dcWarning.setOtherConfig(event.toJSONString()); + dcWarningService.insertDcWarning(dcWarning); + } else if (Objects.equals(eventTopic, "timeRange")) { + // 交通统计 + + } else if (Objects.equals(eventTopic, "realTime")) { + // 交通状态数据 + + } + } @@ -252,11 +343,11 @@ public class DeviceMessageHandler { dcWarning.setOtherConfig(otherConfig.toString()); //异常天气等级 过滤 if (data.getInteger("warningType") == VISIBILITY_LEVEL) { - int WarningLevel=data.getInteger("visibilityLevel"); - if (WarningLevel !=0){ + int WarningLevel = data.getInteger("visibilityLevel"); + if (WarningLevel != 0) { dcWarningService.insertDcWarning(dcWarning); } - }else { + } else { dcWarningService.insertDcWarning(dcWarning); } From c7d64da05cf21a4ea12da86d97c94fc0827850e1 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, 28 May 2024 09:20:19 +0800 Subject: [PATCH 04/44] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=BD=AE=20?= =?UTF-8?q?=E6=8C=87=E6=8C=A5=E8=B0=83=E5=BA=A6=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/handler/DeviceMessageHandler.java | 30 +++++++++++++++++++ .../service/impl/DcEventServiceImpl.java | 2 ++ 2 files changed, 32 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 56a827f5..f89a98a5 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 @@ -591,6 +591,35 @@ public class DeviceMessageHandler { //方向 meteorologicalDetectorData.setDirection(direction); + //todo 首页推送事件消息 3气象检测器 + if (!meteorologicalDetectorData.getPrecipitationType().equals("0")) {//降水类型 0=无降;1=雨;2=雪;3=毛毛雨;4=雨夹雪; + WebSocketService.broadcast("3", meteorologicalDetectorData); + JSONObject object = new JSONObject(); + object.put("meteorologicalDetectorData", meteorologicalDetectorData); + String string = object.toString(); + DcWarning dcWarning = new DcWarning(); + dcWarning.setStakeMark(meteorologicalDetectorData.getStakeMark()); + + dcWarning.setWarningSource(7);//气象检测器 + dcWarning.setOtherConfig(string); + dcWarning.setWarningTitle("气象预警"); + dcWarningService.insertDcWarning(dcWarning); + } + if (!meteorologicalDetectorData.getVisibilityType().equals("4")) {// 能见度类型,4 表示能见度良好3表示阴霾 2表示雾 1表示浓雾; + WebSocketService.broadcast("3", meteorologicalDetectorData); + JSONObject object = new JSONObject(); + object.put("meteorologicalDetectorData", meteorologicalDetectorData); + String string = object.toString(); + DcWarning dcWarning = new DcWarning(); + dcWarning.setStakeMark(meteorologicalDetectorData.getStakeMark()); + dcWarning.setWarningSource(7);//气象检测器 + dcWarning.setOtherConfig(string); + dcWarning.setWarningTitle("气象预警"); + + dcWarningService.insertDcWarning(dcWarning); + } + + meteorologicalDetectorData.setIotDeviceId(msg.get("deviceId").toString()); meteorologicalDetectorDataService.insertDcMeteorologicalDetectorData(meteorologicalDetectorData); @@ -618,6 +647,7 @@ public class DeviceMessageHandler { mdDeviceData.setExpands(JSONObject.toJSONString(expands)); + middleDatabaseService.insertMiddleDatabaseDeviceData(mdDeviceData); } 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 9f2c9158..e2837faa 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 @@ -1096,10 +1096,12 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent1 == null) { return 1; } +/* //事件状态已被修改 返回成功 if (dcEvent1.getEventState() == state) { return 1; } +*/ int i = dcEventMapper.updateDcEventState(id, state); if (i > 0) { From c97ded6291968b4901ad3512b1d2d16f478ec039 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Tue, 28 May 2024 10:33:52 +0800 Subject: [PATCH 05/44] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E5=90=91?= 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, 2 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 e2837faa..4b9ec88c 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 @@ -1231,11 +1231,11 @@ public class DcEventServiceImpl extends ServiceImpl impl } } else if ("direction".equals(result.getRightPath())) { if ("1".equals(result.getRight())) { - result.setRight("上行"); + result.setRight("菏泽方向"); } else if ("2".equals(result.getRight())) { result.setRight("中"); } else if ("3".equals(result.getRight())) { - result.setRight("下行"); + result.setRight("济南方向"); } } else if ("eventSubclass".equals(result.getRightPath())) { if ("1-1".equals(result.getRight())) { From 5170e9111f94fb698906460846dea4c855614305 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Tue, 28 May 2024 11:13:38 +0800 Subject: [PATCH 06/44] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=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/ValueConverter.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 8778d92e..77a96664 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 @@ -31,12 +31,12 @@ public class ValueConverter { static { valueMappingSource.put(1,5); - valueMappingSource.put(4,7); - valueMappingSource.put(7,7); - valueMappingSource.put(2,7); - valueMappingSource.put(3,7); - valueMappingSource.put(5,7); - valueMappingSource.put(6,7); + valueMappingSource.put(4,10); + valueMappingSource.put(7,13); + valueMappingSource.put(2,8); + valueMappingSource.put(3,9); + valueMappingSource.put(5,11); + valueMappingSource.put(6,12); valueMappingHost.put(1, 4); valueMappingHost.put(2, 5); valueMappingHost.put(3, 5); @@ -286,8 +286,8 @@ public class ValueConverter { //测试 // @Test // public void text(){ -// String i="1-1"; -// String i1 = ValueConverter.convertValueSon(i); +// int i=5; +// int i1 = ValueConverter.convertValueSource(i); // System.out.println(i1+"--------------"); // } From f73bbec8a2a75aac73a58bb8b52eca369614d70d 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, 29 May 2024 09:35:16 +0800 Subject: [PATCH 07/44] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=EF=BC=88=20=E9=9B=B7=E8=BE=BE=E8=AF=86=E5=88=AB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/business/DcEventMapper.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 54cf8f25..3837c2ec 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -188,7 +188,7 @@ WHEN '1-1' THEN '追尾' WHEN '1-2' THEN '侧翻' WHEN '1-3' THEN '撞护栏' - WHEN '1-4' THEN '自然' + WHEN '1-4' THEN '自燃' WHEN '1-5' THEN '其他事故' WHEN '2-1' THEN '车辆故障' WHEN '3-1' THEN '主线封闭和限行' @@ -255,6 +255,12 @@ WHEN '4' THEN '视频巡查' WHEN '5' THEN '视频AI' WHEN '6' THEN '一键救援' + WHEN '8' THEN '雷达识别' + WHEN '9' THEN '锥桶' + WHEN '10' THEN '护栏碰撞' + WHEN '11' THEN '扫码报警' + WHEN '12' THEN '非机预警' + WHEN '13' THEN '气象检测器' ELSE '其他' END AS stringEventSource, event_nature, @@ -427,7 +433,7 @@ WHEN '1-1' THEN '追尾' WHEN '1-2' THEN '侧翻' WHEN '1-3' THEN '撞护栏' - WHEN '1-4' THEN '自然' + WHEN '1-4' THEN '自燃' WHEN '1-5' THEN '其他事故' WHEN '2-1' THEN '车辆故障' WHEN '3-1' THEN '主线封闭和限行' @@ -495,6 +501,12 @@ WHEN '4' THEN '视频巡查' WHEN '5' THEN '视频AI' WHEN '6' THEN '一键救援' + WHEN '8' THEN '雷达识别' + WHEN '9' THEN '锥桶' + WHEN '10' THEN '护栏碰撞' + WHEN '11' THEN '扫码报警' + WHEN '12' THEN '非机预警' + WHEN '13' THEN '气象检测器' ELSE '其他' END AS stringEventSource, dc_event.event_nature, From 732718ba5b3482785b6d173e323c55b38baf6c21 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Wed, 29 May 2024 09:59:48 +0800 Subject: [PATCH 08/44] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/controller/DcWarningController.java | 4 ++-- .../src/main/java/com/zc/business/mapper/DcWarningMapper.java | 2 +- .../main/java/com/zc/business/service/IDcWarningService.java | 2 +- .../com/zc/business/service/impl/DcWarningServiceImpl.java | 4 ++-- .../src/main/resources/mapper/business/DcWarningMapper.xml | 3 +++ 5 files changed, 9 insertions(+), 6 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 453032b0..3c9f6cc5 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 @@ -55,8 +55,8 @@ public class DcWarningController extends BaseController */ @ApiOperation("感知事件数据统计") @GetMapping("/countNumber") - public AjaxResult dcWarningCountNumber() { - return AjaxResult.success(dcWarningService.dcWarningCountNumber()); + public AjaxResult dcWarningCountNumber(@RequestParam(required = false) Integer warningSource) { + return AjaxResult.success(dcWarningService.dcWarningCountNumber(warningSource)); } /** 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 9b1dc3be..aa7a8af8 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 @@ -24,7 +24,7 @@ public interface DcWarningMapper /** * 感知事件统计 */ - int dcWarningCountNumber(); + int dcWarningCountNumber(Integer warningSource); /** * 查询预警信息 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 8e5ea04f..c33cacb8 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 @@ -22,7 +22,7 @@ public interface IDcWarningService /** * 感知事件数据统计 */ - int dcWarningCountNumber(); + int dcWarningCountNumber(Integer warningSource); /** * 查询预警信息 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 070178f9..fb839689 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 @@ -70,8 +70,8 @@ public class DcWarningServiceImpl implements IDcWarningService * @return */ @Override - public int dcWarningCountNumber() { - return dcWarningMapper.dcWarningCountNumber(); + public int dcWarningCountNumber(Integer warningSource) { + return dcWarningMapper.dcWarningCountNumber(warningSource); } /** diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index 2eb3d51a..3486169b 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -68,6 +68,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + and dept_id = #{deptId} + and stake_mark BETWEEN #{stakeMark} and #{endStakeMark} + + and direction = #{direction} + and user_id = #{userId} + and start_time BETWEEN #{startTime} and #{endTime} + and estimated_end_time = #{estimatedEndTime} + and event_level = #{eventLevel} + and event_type = #{eventType} + and event_subclass = #{eventSubclass} + and event_cause = #{eventCause} + and description = #{description} + and event_state = #{eventState} + and event_source = #{eventSource} + and event_nature = #{eventNature} + and event_source_tips = #{eventSourceTips} + + and in_tunnel = #{inTunnel} + and is_perceived = #{isPerceived} + + + + ORDER BY occurrence_time DESC + + + ORDER BY start_time DESC + + + ORDER BY end_time DESC + + + ORDER BY create_time DESC + + + \ No newline at end of file diff --git a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml index 6a7ea7fb..68376d4f 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml @@ -150,4 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where event_id = #{eventId} and process_type = '1' and process_id = #{processId} - 1 + + \ No newline at end of file From cb77b40acd1a4c5b3606d39ec8f2bb040a1768d3 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Thu, 30 May 2024 14:51:46 +0800 Subject: [PATCH 17/44] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=85=B3=E8=81=94?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcEventController.java | 14 +++++++++ .../zc/business/service/IDcEventService.java | 10 ++++++ .../service/impl/DcEventServiceImpl.java | 31 +++++++++++++++++++ 3 files changed, 55 insertions(+) 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 6c024945..8fe87c39 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 @@ -213,4 +213,18 @@ public class DcEventController extends BaseController return getDataTable(list); } + + /** + * @Description 查询关联事件 + * + * @author liuwenge + * @date 2024/5/30 14:27 + * @param eventId + * @return com.ruoyi.common.core.domain.AjaxResult + */ + @ApiOperation("查询关联事件") + @GetMapping( "/getLinkEvent/{eventId}") + public AjaxResult getLinkEvent(@ApiParam(name = "eventId", value = "事件id", required = true) @PathVariable("eventId") String eventId){ + return dcEventService.getLinkEvent(eventId); + } } 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 9a740f91..8d5d5933 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 @@ -128,5 +128,15 @@ public interface IDcEventService */ AjaxResult skipClear(String eventId); + /** + * @Description 查询关联事件 + * + * @author liuwenge + * @date 2024/5/30 14:28 + * @param eventId + * @return com.ruoyi.common.core.domain.AjaxResult + */ + AjaxResult getLinkEvent(String eventId); + List dispatchRecordEventList(DcEvent dcEvent); } 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 453f9260..7e59ea01 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 @@ -1818,4 +1818,35 @@ public class DcEventServiceImpl extends ServiceImpl impl } + /** + * @Description 查询关联事件 + * + * @author liuwenge + * @date 2024/5/30 14:29 + * @param eventId + * @return com.ruoyi.common.core.domain.AjaxResult + */ + @Override + public AjaxResult getLinkEvent(String eventId){ + + List> result = new ArrayList<>(); + DcEvent dcEvent = dcEventMapper.selectDcEventById(eventId); + if (StringUtils.isNotEmpty(dcEvent.getLinkId())){ + Map item = new HashMap<>(); + item.put("eventId",eventId); + item.put("eventNature",dcEvent.getEventNature()); + result.add(item); + + String[] linkIds = dcEvent.getLinkId().split(","); + for (String linkId : linkIds) { + item = new HashMap<>(); + item.put("eventId",linkId); + item.put("eventNature",2); + result.add(item); + } + } + return AjaxResult.success(result); + } + + } From 953e14f9405961afe187767c4d2cde6604c58e7f 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, 30 May 2024 16:02:38 +0800 Subject: [PATCH 18/44] =?UTF-8?q?=E7=AE=A1=E5=88=B6=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=EF=BC=88=20=E5=85=B3=E8=81=94=E7=AE=A1=E5=88=B6=EF=BC=89=20?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEventServiceImpl.java | 120 +++++++++++------- .../mapper/business/DcEventMapper.xml | 4 +- 2 files changed, 73 insertions(+), 51 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 7e59ea01..53c23e79 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 @@ -197,7 +197,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setStakeMark(extracted(facilityId)); } //桩号校验 - if (!com.ruoyi.common.utils.StakeMarkUtils.checkStakeMark(dcEvent.getStakeMark())){ + if (!com.ruoyi.common.utils.StakeMarkUtils.checkStakeMark(dcEvent.getStakeMark())) { return -1; } @@ -232,9 +232,11 @@ public class DcEventServiceImpl extends ServiceImpl impl break; //交通管制 case 3: + //交通管制事件 不做 首因关联 + if (dcEvent.getDcEventTrafficControl() != null) { if (dcEventId == null) {//非首页进入 - if (dcEvent.getDcEventTrafficControl().getFacilityIds() ==null ) { + if (dcEvent.getDcEventTrafficControl().getFacilityIds() == null) { dcEvent.getDcEventTrafficControl().setId(uuid); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); break; @@ -248,19 +250,23 @@ public class DcEventServiceImpl extends ServiceImpl impl //查询事件 DcEvent dcEvent2 = dcEventMapper.selectDcEventById(dcEventId); //判断事件 关联事件id是否为空 - if (dcEvent2.getLinkId()==null){ + if (dcEvent2.getLinkId() == null) { DcEvent dcEvent1 = new DcEvent(); dcEvent1.setId(dcEventId);//事件id - dcEvent1.setEventNature(1l);//首发事件 - dcEvent1.setLinkId(uuid);//关联管制事件id - dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 - }else { + if (dcEvent2.getEventType() != 3) { + dcEvent1.setEventNature(1l);//首发事件 + dcEvent1.setLinkId(uuid);//关联管制事件id + dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + } + } else { DcEvent dcEvent1 = new DcEvent(); dcEvent1.setId(dcEventId);//事件id - dcEvent1.setEventNature(1l);//首发事件 - dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id - dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + if (dcEvent2.getEventType() != 3) { + dcEvent1.setEventNature(1l);//首发事件 + dcEvent1.setLinkId(dcEvent2.getLinkId() + "," + uuid);//关联管制事件id + dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + } } @@ -270,11 +276,16 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站 if (dcEventId != null && !dcEventId.equals("")) {//不等于空 事件处置页面 修改 + DcEvent dcEvent2 = dcEventMapper.selectDcEventById(dcEventId); + DcEvent dcEvent1 = new DcEvent(); dcEvent1.setId(dcEventId);//事件id - dcEvent1.setEventNature(1l);//首发事件 - dcEvent1.setLinkId(uuid);//关联管制事件id - dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + if (dcEvent2.getEventType() != 3) { + dcEvent1.setEventNature(1l);//首发事件 + dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id + dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + + } dcEvent.getDcEventTrafficControl().setId(uuid); dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id @@ -292,10 +303,14 @@ public class DcEventServiceImpl extends ServiceImpl impl } else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length > 1) {//facilityIds1=1 说明只选择了多个收费站 if (dcEventId != null) {//不等于空 事件处置页面 修改 + DcEvent dcEvent2 = dcEventMapper.selectDcEventById(dcEventId); + dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类 DcEvent dcEvent1 = new DcEvent(); dcEvent1.setId(dcEventId);//事件id - dcEvent1.setEventNature(1l);//首发事件 + + dcEvent1.setEventNature(1l);//首发事件 + Map map = new HashMap<>(); for (int i = 0; i < dcEvent.getDcEventTrafficControl().getFacilityIds().length; i++) { //设置事件Id UUID无下划线格式32 String facilityUUID = IdUtils.fastSimpleUUID(); @@ -312,8 +327,13 @@ public class DcEventServiceImpl extends ServiceImpl impl a++; } String linkId2 = sb2.toString(); - dcEvent1.setLinkId(linkId2);//关联管制事件id - dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id + + if (dcEvent2.getEventType() != 3) { + dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 + } + + for (int i = 0; i < dcEvent.getDcEventTrafficControl().getFacilityIds().length; i++) { dcEvent.getDcEventTrafficControl().setId(map.get("facilityId" + i));//交通管制事件id dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[i]);//取出数组字段赋值 设施id @@ -409,6 +429,7 @@ public class DcEventServiceImpl extends ServiceImpl impl } + break; //交通拥堵 case 4: @@ -524,7 +545,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /* if (dcEvent.getDcEventAccident() != null) { }*/ - DcEventAccident dcEventAccident =new DcEventAccident(); + DcEventAccident dcEventAccident = new DcEventAccident(); dcEvent.setDcEventAccident(dcEventAccident); dcEvent.getDcEventAccident().setId(uuid); dcEvent.getDcEventAccident().setReporterName("视频AI"); @@ -537,7 +558,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /* if (dcEvent.getDcEventVehicleAccident() != null) { }*/ - DcEventVehicleAccident dcEventVehicleAccident =new DcEventVehicleAccident(); + DcEventVehicleAccident dcEventVehicleAccident = new DcEventVehicleAccident(); dcEvent.setDcEventVehicleAccident(dcEventVehicleAccident); dcEvent.getDcEventVehicleAccident().setReporterName("视频AI"); dcEvent.getDcEventVehicleAccident().setReporterPhoneNumber("96659"); @@ -550,7 +571,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /* if (dcEvent.getDcEventTrafficControl() != null) { } */ - DcEventTrafficControl dcEventTrafficControl =new DcEventTrafficControl(); + DcEventTrafficControl dcEventTrafficControl = new DcEventTrafficControl(); dcEvent.setDcEventTrafficControl(dcEventTrafficControl); dcEvent.getDcEventTrafficControl().setControlType(1L);//限行 dcEvent.getDcEventTrafficControl().setControlCause(2L);//交通事故 @@ -562,7 +583,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /* if (dcEvent.getDcEventTrafficCongestion() != null) { }*/ - DcEventTrafficCongestion dcEventTrafficCongestion =new DcEventTrafficCongestion(); + DcEventTrafficCongestion dcEventTrafficCongestion = new DcEventTrafficCongestion(); dcEvent.setDcEventTrafficCongestion(dcEventTrafficCongestion); dcEvent.getDcEventTrafficCongestion().setId(uuid); dcEvent.getDcEventTrafficCongestion().setCongestionMileage(0F);//拥堵里程(公里) @@ -581,7 +602,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /* if (dcEvent.getDcEventConstruction() != null) { }*/ - DcEventConstruction dcEventConstruction =new DcEventConstruction(); + DcEventConstruction dcEventConstruction = new DcEventConstruction(); dcEvent.setDcEventConstruction(dcEventConstruction); dcEvent.getDcEventConstruction().setId(uuid); dcEvent.getDcEventConstruction().setControlMode(1l);//封闭 @@ -592,7 +613,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /* if (dcEvent.getDcEventServiceArea() != null) { }*/ - DcEventServiceArea dcEventServiceArea =new DcEventServiceArea(); + DcEventServiceArea dcEventServiceArea = new DcEventServiceArea(); dcEvent.setDcEventServiceArea(dcEventServiceArea); dcEvent.getDcEventServiceArea().setId(uuid); int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); @@ -604,7 +625,7 @@ public class DcEventServiceImpl extends ServiceImpl impl case 10: /* if (dcEvent.getDcEventAbnormalWeather() != null) { }*/ - DcEventAbnormalWeather dcEventAbnormalWeather =new DcEventAbnormalWeather(); + DcEventAbnormalWeather dcEventAbnormalWeather = new DcEventAbnormalWeather(); dcEvent.setDcEventAbnormalWeather(dcEventAbnormalWeather); dcEvent.getDcEventAbnormalWeather().setId(uuid); dcEvent.getDcEventAbnormalWeather().setWeatherSituation("1-1");//雨雾 @@ -798,7 +819,7 @@ public class DcEventServiceImpl extends ServiceImpl impl int i7 = dcEventMapper.updateDcEvent(dcEvent); if (i7 > 0) { String context = comparisonInfo(oldEvent, dcEvent); - if (context.length() > 0){ + if (context.length() > 0) { //事件处置流程记录 DcEventProcess dcEventProcess = new DcEventProcess(); dcEventProcess.setEventId(dcEvent.getId()); @@ -1146,11 +1167,11 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventProcessService.insertDcEventProcess(dcEventProcess); //插入调度默认数据 - ArrayList> hashMaps = new ArrayList<>(); + ArrayList> hashMaps = new ArrayList<>(); String stakeMark = dcEvent.getStakeMark();//传入桩号 List> mapList = dcWarningMapper.selectRecentlySection();//全部机构的桩号和名称 - for (HashMap map:mapList){ - if (org.apache.commons.lang3.StringUtils.isBlank(map.get("stakeMark").toString())){ + for (HashMap map : mapList) { + if (org.apache.commons.lang3.StringUtils.isBlank(map.get("stakeMark").toString())) { continue; } Long sectionId = (Long) map.get("id");//机构的id @@ -1158,15 +1179,16 @@ public class DcEventServiceImpl extends ServiceImpl impl com.zc.business.utils.StakeMarkUtils stakeMarkUtils = new StakeMarkUtils(); Integer itselfStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMarkNew);//机构本身的米数 Integer afferentStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMark);//传入的桩号米数 - Integer difference =Math.abs(afferentStakeMark-itselfStakeMark); //计算距离绝对值 - map.put("difference",difference/1000.0);//米转公里加入到map - map.put("id",sectionId); + Integer difference = Math.abs(afferentStakeMark - itselfStakeMark); //计算距离绝对值 + map.put("difference", difference / 1000.0);//米转公里加入到map + map.put("id", sectionId); hashMaps.add(map); } List> sortedHashMaps = hashMaps.stream().sorted(Comparator.comparing(map -> { - return (Double) map.get("difference"); })).collect(Collectors.toList()); + return (Double) map.get("difference"); + })).collect(Collectors.toList()); HashMap hashMap = dcWarningMapper.selectDcDispatch(id);//查询事件是否已经有转的调度记录 - if (!sortedHashMaps.isEmpty()&&hashMap==null) { + if (!sortedHashMaps.isEmpty() && hashMap == null) { HashMap map = sortedHashMaps.get(0); Long sortId = (Long) map.get("id");//取出最近的机构id if (sortId != null) { @@ -1180,7 +1202,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcWarningMapper.insertDcDispatch(dcDispatch);//事件绑定信息记录 Long dispatchId = dcDispatch.getId();//信息记录id List> employeesMap = dcWarningMapper.selectOrganizationEmployees(sortId);//人员map - if (employeesMap != null&&employeesMap.size()>0) { + if (employeesMap != null && employeesMap.size() > 0) { // 生成一个随机索引,范围在0到列表长度减1之间 int randomIndex = ThreadLocalRandom.current().nextInt(employeesMap.size()); HashMap randomEmployee = employeesMap.get(randomIndex); @@ -1191,7 +1213,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcWarningMapper.insertDispatchResource(dcDispatchResource); } List> vehiclesMap = dcWarningMapper.selectVehicles(sortId);//车辆map - if (vehiclesMap != null&&vehiclesMap.size()>0) { + if (vehiclesMap != null && vehiclesMap.size() > 0) { // 生成一个随机索引,范围在0到列表长度减1之间 int randomIndex = ThreadLocalRandom.current().nextInt(vehiclesMap.size()); HashMap randomEmployee = employeesMap.get(randomIndex); @@ -1250,10 +1272,10 @@ public class DcEventServiceImpl extends ServiceImpl impl } else if ("direction".equals(result.getRightPath())) { if (("1".equals(result.getRight()) || "上行".equals(result.getRight()) || "菏泽方向".equals(result.getRight())) - && ("1".equals(result.getLeft()) || "上行".equals(result.getLeft()) || "菏泽方向".equals(result.getLeft()))){ + && ("1".equals(result.getLeft()) || "上行".equals(result.getLeft()) || "菏泽方向".equals(result.getLeft()))) { continue; - } else if(("3".equals(result.getRight()) || "下行".equals(result.getRight()) || "济南方向".equals(result.getRight())) - && ("3".equals(result.getLeft()) || "下行".equals(result.getLeft()) || "济南方向".equals(result.getLeft()))){ + } else if (("3".equals(result.getRight()) || "下行".equals(result.getRight()) || "济南方向".equals(result.getRight())) + && ("3".equals(result.getLeft()) || "下行".equals(result.getLeft()) || "济南方向".equals(result.getLeft()))) { continue; } @@ -1779,6 +1801,7 @@ public class DcEventServiceImpl extends ServiceImpl impl /** * 调度记录 + * * @param dcEvent * @return */ @@ -1787,7 +1810,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setEventState(2l); List dcEvents = dcEventMapper.dispatchRecordEventList(dcEvent); for (DcEvent event : dcEvents) { - List dcEventProcess= dcEventProcessService.selectDcEventProcessByEventId(event.getId()); + List dcEventProcess = dcEventProcessService.selectDcEventProcessByEventId(event.getId()); event.setDcEventProcessList(dcEventProcess); } @@ -1819,29 +1842,28 @@ public class DcEventServiceImpl extends ServiceImpl impl } /** + * @param eventId + * @return com.ruoyi.common.core.domain.AjaxResult * @Description 查询关联事件 - * * @author liuwenge * @date 2024/5/30 14:29 - * @param eventId - * @return com.ruoyi.common.core.domain.AjaxResult */ @Override - public AjaxResult getLinkEvent(String eventId){ + public AjaxResult getLinkEvent(String eventId) { - List> result = new ArrayList<>(); + List> result = new ArrayList<>(); DcEvent dcEvent = dcEventMapper.selectDcEventById(eventId); - if (StringUtils.isNotEmpty(dcEvent.getLinkId())){ - Map item = new HashMap<>(); - item.put("eventId",eventId); - item.put("eventNature",dcEvent.getEventNature()); + if (StringUtils.isNotEmpty(dcEvent.getLinkId())) { + Map item = new HashMap<>(); + item.put("eventId", eventId); + item.put("eventNature", dcEvent.getEventNature()); result.add(item); String[] linkIds = dcEvent.getLinkId().split(","); for (String linkId : linkIds) { item = new HashMap<>(); - item.put("eventId",linkId); - item.put("eventNature",2); + item.put("eventId", linkId); + item.put("eventNature", 2); result.add(item); } } diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 86a50871..38faaef3 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -816,12 +816,12 @@ and dept_id = #{deptId} + and id = #{id} and stake_mark BETWEEN #{stakeMark} and #{endStakeMark} and direction = #{direction} and user_id = #{userId} - and start_time BETWEEN #{startTime} and #{endTime} - and estimated_end_time = #{estimatedEndTime} + and end_time BETWEEN #{startTime} and #{endTime} and event_level = #{eventLevel} and event_type = #{eventType} and event_subclass = #{eventSubclass} From 7f9c15642735c50cc9f3a907f65d019cd973bb31 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, 30 May 2024 16:35:55 +0800 Subject: [PATCH 19/44] =?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 --- .../src/main/resources/mapper/business/DcEventProcessMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml index 68376d4f..e852e609 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml @@ -152,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file From 109320d0a1f0f0240dd85a13f2ddf37f2a3ff324 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Thu, 30 May 2024 17:45:38 +0800 Subject: [PATCH 20/44] =?UTF-8?q?=E5=A4=84=E7=BD=AE=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcWarningController.java | 23 +- .../zc/business/mapper/DcWarningMapper.java | 11 + .../business/service/IDcWarningService.java | 6 +- .../service/impl/DcWarningServiceImpl.java | 215 ++++++++++++------ .../mapper/business/DcWarningMapper.xml | 37 +-- 5 files changed, 202 insertions(+), 90 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 3c9f6cc5..029931fa 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 @@ -160,7 +160,7 @@ public class DcWarningController extends BaseController return dcWarningService.batchConvert(dcWarningBatchConvert); } - //指挥调度 + //1,指挥调度,查看是否存在记录和资源信息,存在即返回 @PostMapping("/commandAndDispatch") public AjaxResult commandAndDispatch(@RequestBody DcWarning dcWarning){ if (StringUtils.isBlank(dcWarning.getStakeMark())||StringUtils.isBlank(dcWarning.getId())){ @@ -168,6 +168,22 @@ public class DcWarningController extends BaseController } return (dcWarningService.commandAndDispatch(dcWarning)); } + //2,指挥调度,当调度信息为空的时候调用智能分配资源 + @PostMapping("/intelligentSource") + public AjaxResult intelligentSource(@RequestBody DcWarning dcWarning){ + if (StringUtils.isBlank(dcWarning.getStakeMark())){ + return AjaxResult.error("参数错误"); + } + return (dcWarningService.intelligentSource(dcWarning)); + } + //3.指挥调度,新增调度记录信息 + @PostMapping("/insertDispatch") + public AjaxResult insertDispatch(@RequestBody HashMap map){ + if (map == null || !map.containsKey("eventId")||StringUtils.isBlank(map.get("eventId").toString())){ + return AjaxResult.error("参数错误"); + } + return (dcWarningService.insertDispatch(map)); + } //指挥调度记录修改 @PostMapping("/updateDispatch") public AjaxResult insertDispatch(@RequestBody DcDispatch dcDispatch){ @@ -176,12 +192,9 @@ public class DcWarningController extends BaseController } return toAjax(dcWarningService.insertDispatch(dcDispatch)); } - //指挥调度资源新增 + //4.指挥调度资源新增(用户修改弹窗的提交) @PostMapping("/updateSource") public AjaxResult insertDispatchSource(@RequestBody HashMap map){ - if (map==null||!map.containsKey("dispatchId")){ - return AjaxResult.error("参数错误"); - } return toAjax(dcWarningService.insertDispatchSource(map)); } //感知事件误报 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 aa7a8af8..95df0a5b 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 @@ -99,6 +99,7 @@ public interface DcWarningMapper public Integer updateEndSection(@Param("dcWarningList") List dcWarningList); //查询当天全部可以结束的事件 public List selectEndSection(); + //依据桩号返回驻点id public Long selectSectionId(@Param("stakeMark")String stakeMark,@Param("direction")String direction); //依据桩号获取最近距离的驻点 @@ -130,6 +131,8 @@ public interface DcWarningMapper public HashMap selectOrganization(); //选中的人员信息 public List> selectEmployeesChoice(@Param("dispatchId")Long dispatchId); + //查询最近的交警人员和电话 + public List> selectTrafficPolice(@Param("organizationId")Long organizationId); //选中的车辆信息 public List> selectVehiclesChoice(@Param("dispatchId")Long dispatchId); public Integer deleteDispatchResource(@Param("dispatchId")Long dispatchId); @@ -137,4 +140,12 @@ public interface DcWarningMapper DcDispatch selectDcDispatchById(@Param("id") Long id); //误报解除 public Integer falseAlarmResolution(DcWarning dcWarning); + //依据人员id查询人员名称 + public String employeesName(Long id); + //依据车辆id查询车辆信息,前提车辆可用 + public String vehiclesName(Long id); + //依据车辆id查询车辆信息,前提车辆可用 + public String vehiclesType(Long id); + //依据机构id查询机构名称 + public String organizationName(Long id); } 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 c33cacb8..095c3f74 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 @@ -91,8 +91,12 @@ public interface IDcWarningService //定时结束部分事件 Integer updateEndSection(); - //指挥调度 + //1.指挥调度 AjaxResult commandAndDispatch(DcWarning dcWarning); + //2.指挥调度,当调度信息为空的时候调用智能分配资源 + AjaxResult intelligentSource(DcWarning dcWarning); + //3.指挥调度新增资源 + AjaxResult insertDispatch(HashMap map); //修改指挥调度资源记录 public Integer insertDispatch(DcDispatch dcDispatch); //新增指挥调度资源记录 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 fb839689..7216ea41 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 @@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional; import java.lang.reflect.Array; import java.rmi.MarshalledObject; +import java.util.Objects; import java.util.concurrent.ThreadLocalRandom; import javax.annotation.Resource; import java.util.ArrayList; @@ -508,68 +509,10 @@ public class DcWarningServiceImpl implements IDcWarningService dcEvent.setCreateTime(DateUtils.getNowDate());//创建时间 dcEvent.setUserId(SecurityUtils.getUserId());//处置人员 dcEvent.setRoadId(1L);//高速公路(济菏高速) - int insertDcEvent = dcEventService.insertDcEventWarning(dcEvent); - if (insertDcEvent==0){ return AjaxResult.error("操作失败"); } - List> mapList = dcWarningMapper.selectRecentlySection();//全部机构的桩号和名称 - for (HashMap map:mapList){ - if (StringUtils.isBlank(map.get("stakeMark").toString())){ - continue; - } - Long id = (Long) map.get("id");//机构的id - String stakeMarkNew = map.get("stakeMark").toString();//机构桩号 - StakeMarkUtils stakeMarkUtils = new StakeMarkUtils(); - Integer itselfStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMarkNew);//机构本身的米数 - Integer afferentStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMark);//传入的桩号米数 - Integer difference =Math.abs(afferentStakeMark-itselfStakeMark); //计算距离绝对值 - map.put("difference",difference/1000.0);//米转公里加入到map - map.put("id",id); - hashMaps.add(map); - } - List> sortedHashMaps = hashMaps.stream().sorted(Comparator.comparing(map -> { - return (Double) map.get("difference"); })).collect(Collectors.toList()); - HashMap hashMap = dcWarningMapper.selectDcDispatch(dcWarning.getId());//查询事件是否已经有转的调度记录 - if (!sortedHashMaps.isEmpty()&&hashMap==null) { - HashMap map = sortedHashMaps.get(0); - Long id = (Long) map.get("id");//取出最近的机构id - if (id != null) { - DcDispatch dcDispatch = new DcDispatch(); - DcDispatchResource dcDispatchResource = new DcDispatchResource(); - dcDispatch.setDeptId(SecurityUtils.getLoginUser().getDeptId()); - dcDispatch.setEventId(dcWarning.getId()); - dcDispatch.setStartTime(DateUtils.getNowDate()); - dcDispatch.setDispatchStatus(2L);//进行中状态 - dcDispatch.setRemark(dcWarning.getRemark()); - dcWarningMapper.insertDcDispatch(dcDispatch);//事件绑定信息记录 - Long dispatchId = dcDispatch.getId();//信息记录id - List> employeesMap = dcWarningMapper.selectOrganizationEmployees(id);//人员map - if (employeesMap != null&&employeesMap.size()>0) { - // 生成一个随机索引,范围在0到列表长度减1之间 - int randomIndex = ThreadLocalRandom.current().nextInt(employeesMap.size()); - HashMap randomEmployee = employeesMap.get(randomIndex); - Long employeesId = (Long) randomEmployee.get("id");//随机人员id - dcDispatchResource.setResourceId(employeesId);//资源id - dcDispatchResource.setDispatchType(1);//资源类型 - dcDispatchResource.setDispatchId(dispatchId);//信息记录id - dcWarningMapper.insertDispatchResource(dcDispatchResource); - } - List> vehiclesMap = dcWarningMapper.selectVehicles(id);//车辆map - if (vehiclesMap != null&&vehiclesMap.size()>0) { - // 生成一个随机索引,范围在0到列表长度减1之间 - int randomIndex = ThreadLocalRandom.current().nextInt(vehiclesMap.size()); - HashMap randomEmployee = employeesMap.get(randomIndex); - Long vehiclesId = (Long) randomEmployee.get("id");//随机车辆id - dcDispatchResource.setResourceId(vehiclesId);//资源id - dcDispatchResource.setDispatchType(2);//资源类型 - dcDispatchResource.setDispatchId(dispatchId);//信息记录id - dcWarningMapper.insertDispatchResource(dcDispatchResource);//绑定车辆信息 - } - } - } - return AjaxResult.success("操作成功"); } @@ -670,10 +613,12 @@ public class DcWarningServiceImpl implements IDcWarningService @Override public AjaxResult commandAndDispatch(DcWarning dcWarning) { + Map mapAll = new HashMap<>(); + HashMap dcDispatch = dcWarningMapper.selectDcDispatch(dcWarning.getId());//查询是否存在调度记录 //逻辑,调用全部的机构信息,计算传入的桩号与机构桩号的距离作为排序使用,使用机构的id调出车辆,人员,值班等信息 List> mapList = dcWarningMapper.selectRecentlySection();//全部机构的桩号和名称 ArrayList> hashMaps = new ArrayList<>(); - Map mapAll = new HashMap<>(); + for (HashMap map:mapList){ if (StringUtils.isBlank(map.get("stakeMark").toString())){ continue; @@ -684,7 +629,7 @@ public class DcWarningServiceImpl implements IDcWarningService Integer afferentStakeMark = stakeMarkUtils.stakeMarkToInt(dcWarning.getStakeMark());//传入的桩号米数 Integer difference =Math.abs(afferentStakeMark-itselfStakeMark); //计算距离绝对值 map.put("difference",difference/1000.0);//米转公里加入到map - Long id = (Long) map.get("id");//机构的id,用户获取人员、值班、车辆等信息 + Long id =Long.parseLong(map.get("id").toString());//机构的id,用户获取人员、值班、车辆等信息 List> employeesMap = dcWarningMapper.selectEmployeesDispatch(id,dcWarning.getId());//人员map List> vehiclesMap = dcWarningMapper.selectVehiclesDispatch(id,dcWarning.getId());//车辆map map.put("employeesMap",employeesMap); @@ -692,20 +637,31 @@ public class DcWarningServiceImpl implements IDcWarningService hashMaps.add(map); } List> sortedHashMaps = hashMaps.stream().sorted(Comparator.comparing(map -> { - return (Double) map.get("difference"); })).collect(Collectors.toList()); + return (Double) map.get("difference"); })).collect(Collectors.toList()); mapAll.put("listData",sortedHashMaps); + if (!sortedHashMaps.isEmpty()) { + HashMap map = sortedHashMaps.get(0); + Long id = Long.parseLong(map.get("id").toString());//取出最近的机构id + List> trafficPolice = dcWarningMapper.selectTrafficPolice(id);//交警人员信息 + mapAll.put("trafficPolice",trafficPolice); + } + if (dcDispatch==null){ + mapAll.put("existence",0); + return AjaxResult.success(mapAll); + } + mapAll.put("existence",1); HashMap map = dcWarningMapper.selectDcDispatch(dcWarning.getId());//获取机构id与资源id if (map!=null){ HashMap hashMap = new HashMap<>(); - Long id = (Long) map.get("id");//调度记录id + Long id =Long.parseLong(map.get("id").toString());//调度记录id Object deptName =map.get("deptName");//部门名称 - List> shifts = dcWarningMapper.selectShiftsEmployees();//值班为空把全部的人员信息作为值班人员信息 + //List> shifts = dcWarningMapper.selectShiftsEmployees();//值班为空把全部的人员信息作为值班人员信息 List> resource = dcWarningMapper.selectDispatchResource(id);//全部资源信息 List> employeesChoice = dcWarningMapper.selectEmployeesChoice(id);//选中人员信息 List> vehiclesChoice = dcWarningMapper.selectVehiclesChoice(id);//选中车辆信息 hashMap.put("id",id);//调度记录id hashMap.put("deptName",deptName); - hashMap.put("shifts",shifts); + //hashMap.put("shifts",shifts); hashMap.put("resource",resource); mapAll.put("resource",hashMap); mapAll.put("employeesChoice",employeesChoice); @@ -713,6 +669,120 @@ public class DcWarningServiceImpl implements IDcWarningService } return AjaxResult.success(mapAll); } + //指挥调度,当调度信息为空的时候调用智能分配资源 + @Override + public AjaxResult intelligentSource(DcWarning dcWarning) { + String stakeMark = dcWarning.getStakeMark(); + ArrayList> hashMaps = new ArrayList<>(); + Map mapAll = new HashMap<>(); + List> mapList = dcWarningMapper.selectRecentlySection();//全部机构的桩号和名称 + for (HashMap map:mapList){ + HashMap mapValue = new HashMap<>(); + if (StringUtils.isBlank(map.get("stakeMark").toString())){ + continue; + } + StakeMarkUtils stakeMarkUtils = new StakeMarkUtils(); + String stakeMarkValue = map.get("stakeMark").toString(); + Integer itselfStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMarkValue);//桩号本身的米数 + Integer afferentStakeMark = stakeMarkUtils.stakeMarkToInt(dcWarning.getStakeMark());//传入的桩号米数 + Integer difference =Math.abs(afferentStakeMark-itselfStakeMark); //计算距离绝对值 + + mapValue.put("difference",difference/1000.0);//米转公里加入到map + Long id =Long.parseLong(map.get("id").toString());//机构的id,用户获取人员、车辆等信息 + List> employeesMap = dcWarningMapper.selectEmployeesDispatch(id,dcWarning.getId());//人员map + List> vehiclesMap = dcWarningMapper.selectVehiclesDispatch(id,dcWarning.getId());//车辆map + String organizationName = dcWarningMapper.organizationName(id); + mapValue.put("employeesMap",employeesMap); + mapValue.put("vehiclesMap",vehiclesMap); + mapValue.put("organizationId",id); + mapValue.put("organizationName",organizationName); + hashMaps.add(mapValue); + } + mapAll.put("selectData",hashMaps); + List> sortedHashMaps = hashMaps.stream().sorted(Comparator.comparing(map -> { + return (Double) map.get("difference"); })).collect(Collectors.toList()); + if (!sortedHashMaps.isEmpty()) { + HashMap map = sortedHashMaps.get(0); + Long id = Long.parseLong(map.get("organizationId").toString());//取出最近的机构id + if (id != null) { + List> employeesMap = dcWarningMapper.selectOrganizationEmployees(id);//人员map + if (employeesMap != null&&employeesMap.size()>0) { + HashMap employeesHashMap = new HashMap<>(); + // 生成一个随机索引,范围在0到列表长度减1之间 + int randomIndex = ThreadLocalRandom.current().nextInt(employeesMap.size()); + HashMap randomEmployee = employeesMap.get(randomIndex); + Long employeesId = Long.parseLong(randomEmployee.get("id").toString());//随机人员id + String employeesName = dcWarningMapper.employeesName(employeesId);//随机人员姓名 + employeesHashMap.put("employeesId",employeesId); + employeesHashMap.put("employeesName",employeesName); + mapAll.put("employees",employeesHashMap); + } + List> vehiclesMap = dcWarningMapper.selectVehicles(id);//车辆map + if (vehiclesMap != null&&vehiclesMap.size()>0) { + HashMap vehiclesHashMap = new HashMap<>(); + // 生成一个随机索引,范围在0到列表长度减1之间 + int randomIndex = ThreadLocalRandom.current().nextInt(vehiclesMap.size()); + HashMap randomEmployee = vehiclesMap.get(randomIndex); + Long vehiclesId =Long.parseLong(randomEmployee.get("id").toString());//随机车辆id + String vehiclesName = dcWarningMapper.vehiclesName(vehiclesId);//随机车辆 + String vehiclesType = dcWarningMapper.vehiclesType(vehiclesId);//随机车辆 + vehiclesHashMap.put("vehiclesId",vehiclesId); + vehiclesHashMap.put("vehiclesName",vehiclesName); + vehiclesHashMap.put("vehiclesType",vehiclesType); + mapAll.put("vehicles",vehiclesHashMap); + } + } + } + return AjaxResult.success(mapAll); + } + //3.指挥调度新增资源 + @Override + @Transactional(rollbackFor = Exception.class) + public AjaxResult insertDispatch(HashMap map) { + //事件id、事件备注、机构id、资源id + String eventId = map.get("eventId").toString();//事件id + String remark = Objects.toString(map.get("remark"), ""); + Long employees=null; + if (map.get("employeesId")!=null){ + employees = Long.parseLong(map.get("employeesId").toString());//人员 + } + Long vehicles=null; + if (map.get("vehiclesId").toString()!=null){ + vehicles = Long.parseLong(map.get("vehiclesId").toString());//车辆 + } + DcDispatch dcDispatch = new DcDispatch(); + DcDispatchResource dcDispatchResource = new DcDispatchResource(); + dcDispatch.setDeptId(SecurityUtils.getLoginUser().getDeptId()); + dcDispatch.setEventId(eventId); + dcDispatch.setStartTime(DateUtils.getNowDate()); + dcDispatch.setDispatchStatus(2L);//进行中状态 + dcDispatch.setRemark(remark); + Integer integer = dcWarningMapper.insertDcDispatch(dcDispatch);//事件绑定信息记录 + if (integer==0){ + return AjaxResult.error(); + } + Long dispatchId = dcDispatch.getId();//信息记录id + if (employees!=null) { + dcDispatchResource.setResourceId(employees);//资源id + dcDispatchResource.setDispatchType(1);//资源类型 + dcDispatchResource.setDispatchId(dispatchId);//信息记录id + Integer employeesSource = dcWarningMapper.insertDispatchResource(dcDispatchResource); + if (employeesSource==0){ + return AjaxResult.error("人员调度异常"); + } + } + if (vehicles!=null) { + // 生成一个随机索引,范围在0到列表长度减1之间 + dcDispatchResource.setResourceId(vehicles);//资源id + dcDispatchResource.setDispatchType(2);//资源类型 + dcDispatchResource.setDispatchId(dispatchId);//信息记录id + Integer dispatchResource = dcWarningMapper.insertDispatchResource(dcDispatchResource);//绑定车辆信息 + if (dispatchResource==0){ + return AjaxResult.error("车辆调度异常"); + } + } + return AjaxResult.success(); + } @Override public Integer insertDispatch(DcDispatch dcDispatch) { @@ -725,12 +795,19 @@ public class DcWarningServiceImpl implements IDcWarningService @Override @Transactional(rollbackFor = Exception.class) public Integer insertDispatchSource(HashMap map) { + String eventId = map.get("eventId").toString();//事件id + String remark = Objects.toString(map.get("remark"), ""); + DcDispatch dcDispatch = new DcDispatch(); DcDispatchResource dcDispatchResource = new DcDispatchResource(); - Integer pat = (Integer) map.get("dispatchId"); - long dispatchId = pat.longValue(); + dcDispatch.setDeptId(SecurityUtils.getLoginUser().getDeptId()); + dcDispatch.setEventId(eventId); + dcDispatch.setStartTime(DateUtils.getNowDate()); + dcDispatch.setDispatchStatus(2L);//进行中状态 + dcDispatch.setRemark(remark); + dcWarningMapper.insertDcDispatch(dcDispatch);//事件绑定信息记录 + Long dispatchId = dcDispatch.getId(); dcWarningMapper.deleteDispatchResource(dispatchId);//删除全部属于该调度记录下的全部资源 ArrayList> employeesArray = (ArrayList>) map.get("employees");//取出人员 - String context = ""; if (employeesArray!=null&&employeesArray.size()>0) { context += "路管人员"; @@ -768,9 +845,9 @@ public class DcWarningServiceImpl implements IDcWarningService context += "参与事件救援"; } - DcDispatch dcDispatch = dcWarningMapper.selectDcDispatchById(dispatchId); + DcDispatch dcDispatchEventId = dcWarningMapper.selectDcDispatchById(dispatchId); DcEventProcess dcEventProcess = new DcEventProcess(); - dcEventProcess.setEventId(dcDispatch.getEventId()); + dcEventProcess.setEventId(dcDispatchEventId.getEventId()); dcEventProcess.setSource(1); dcEventProcess.setContext(context); dcEventProcessService.insertDcEventProcess(dcEventProcess); diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index 3486169b..c3986369 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -255,6 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} + delete from dc_warning where id = #{id} @@ -278,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete from dc_dispatch_resource where dispatch_id=#{dispatchId} + @@ -317,7 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where parent_id!=0 SELECT DISTINCT dc_employees.id, dc_employees.name, - dc_employees.contact_number AS contactNumber, - CASE - WHEN t.id IS NOT NULL THEN 1 -- 连接成立 - ELSE 0 -- 连接不成立 - END AS state + dc_employees.contact_number AS contactNumber from dc_employees LEFT JOIN( select employees.id id, employees.name, employees.contact_number contactNumber @@ -380,19 +378,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left JOIN dc_dispatch_resource as respurce on respurce.resource_id = employees.id LEFT JOIN dc_dispatch as path on path.id = respurce.dispatch_id where employees.organization_id = #{organizationId} - and employees.employees_type = 2 and respurce.dispatch_type = 1 and path.event_id = #{eventId}) as t on t.id = dc_employees.id - where organization_id = #{organizationId} + where organization_id = #{organizationId} and dc_employees.employees_type=1 select * from dc_dispatch where id = #{id} + + + + + From adb85d92d44e0d139c572ee03407db869d88baef Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Thu, 30 May 2024 17:47:41 +0800 Subject: [PATCH 21/44] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=A4=A9=E6=B0=94=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B6=85=E9=80=9F=E4=BA=8B=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WeatherForecastController.java | 119 ++++++++++++++++-- .../device/handler/DeviceMessageHandler.java | 8 +- 2 files changed, 113 insertions(+), 14 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java index 99e57d71..f15aaff6 100644 --- a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java +++ b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java @@ -10,6 +10,7 @@ import com.zc.business.domain.DcRegion; import com.zc.business.service.impl.DcRegionServiceImpl; import com.zc.common.core.httpclient.OkHttp; import com.zc.common.core.httpclient.exception.HttpException; +import com.zc.common.core.httpclient.request.RequestParams; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import okhttp3.Response; @@ -51,6 +52,103 @@ public class WeatherForecastController extends BaseController { @Autowired private ISysConfigService configService; + /* + * 当前气象及预报信息查询 + * */ + @ApiOperation("当前气象及预报信息查询") + @PostMapping(value = "/currentWeatherAndForecastInformation") + public AjaxResult currentWeatherAndForecastInformation(@RequestBody HashMap parameter) { + + String stakeNum = String.valueOf(parameter.get("stakeNum")); + String[] split = stakeNum.split("[|]"); + + StringBuilder numStake = new StringBuilder(); + + for (int i = 0; i < split.length; i++) { + String[] split1 = split[i].split("[+]"); + String k = split1[0].replace("K", ""); + int parseInt = Integer.parseInt(k); + numStake.append("K").append(parseInt).append("+000"); + if (i != split.length - 1) { + numStake.append("|"); + } + } + + parameter.put("stakeNum", numStake); + + + JSONObject weather = JSONObject.parseObject(configService.selectConfigByKey("weather")); + + try { + + OkHttp okHttp = new OkHttp(); + + RequestParams requestParams = new RequestParams(parameter); + Response response // 请求响应 + = okHttp + .headers(new HashMap<>()) + .url(weather.getString("get_weather_info")) // 请求地址 + //.url("http://10.166.133.9:38999/api/weather_service/get_weather_info") // 请求地址 + .data(requestParams) + .post(); // 请求方法 + + if (response.body() != null) { + + JSONObject jsonResult = JSONObject.parseObject(response.body().string()); + if (jsonResult.getInteger("code") == 200) { + return AjaxResult.success(jsonResult.getJSONArray("data")); + } else { + return AjaxResult.error(jsonResult.getInteger("code"), "请求失败"); + } + } + } catch (Exception ignored) { + + + } + return AjaxResult.error("请求失败"); + } + + + /* + * 当前气象预警信息查询 + * */ + @ApiOperation("当前气象预警信息查询") + @PostMapping(value = "/currentWeatherWarningInformationQuery") + public AjaxResult currentWeatherWarningInformationQuery(@RequestBody HashMap parameter) { + + + JSONObject weather = JSONObject.parseObject(configService.selectConfigByKey("weather")); + + try { + + OkHttp okHttp = new OkHttp(); + + RequestParams requestParams = new RequestParams(parameter); + Response response // 请求响应 + = okHttp + .headers(new HashMap<>()) + .url(weather.getString("get_earlyworning_info")) // 请求地址 + //.url("http://10.166.133.9:38999/api/weather_service/get_earlyworning_info") // 请求地址 + .data(requestParams) + .post(); // 请求方法 + + if (response.body() != null) { + + JSONObject jsonResult = JSONObject.parseObject(response.body().string()); + if (jsonResult.getInteger("code") == 200) { + return AjaxResult.success(jsonResult.getJSONArray("data")); + } else { + return AjaxResult.error(jsonResult.getInteger("code"), "请求失败"); + } + } + } catch (Exception ignored) { + + + } + return AjaxResult.error("请求失败"); + } + + /* * 天气实况查询 * */ @@ -71,6 +169,17 @@ public class WeatherForecastController extends BaseController { return getAjaxResult(weather.getString("METEOROLOGICALEARLYWARNINGURI"), weather.getString("METEOROLOGICALEARLYWARNINGKEY"), weather.getString("METEOROLOGICALEARLYWARNING")); } + /* + * 逐小时天气查询 + * */ + @ApiOperation("逐小时天气查询") + @PostMapping(value = "/hourlyWeather") + public AjaxResult hourlyWeather() { + JSONObject weather = JSONObject.parseObject(configService.selectConfigByKey("weather")); + return getAjaxResult(weather.getString("HOURLYWEATHERURI"), weather.getString("HOURLYWEATHERKEY"), weather.getString("HOURLYWEATHER")); + } + + /* * 气象预警数量查询 * */ @@ -135,16 +244,6 @@ public class WeatherForecastController extends BaseController { } - /* - * 逐小时天气查询 - * */ - @ApiOperation("逐小时天气查询") - @PostMapping(value = "/hourlyWeather") - public AjaxResult hourlyWeather() { - JSONObject weather = JSONObject.parseObject(configService.selectConfigByKey("weather")); - return getAjaxResult(weather.getString("HOURLYWEATHERURI"), weather.getString("HOURLYWEATHERKEY"), weather.getString("HOURLYWEATHER")); - } - private AjaxResult getAjaxResult(String uri, String accessKey, String redisKey) { JSONObject weather = JSONObject.parseObject(configService.selectConfigByKey("weather")); 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 f89a98a5..8d014ecf 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 @@ -191,10 +191,10 @@ public class DeviceMessageHandler { dcWarning.setWarningType(5); dcWarning.setWarningSubclass("5-1"); eventName = "逆行"; - } else if (Objects.equals(illegalTrafficEvent, "Speed")) { - dcWarning.setWarningType(5); - dcWarning.setWarningSubclass("5-4"); - eventName = "超速"; + //} else if (Objects.equals(illegalTrafficEvent, "Speed")) { + // dcWarning.setWarningType(5); + // dcWarning.setWarningSubclass("5-4"); + // eventName = "超速"; } else if (Objects.equals(illegalTrafficEvent, "laneChange")) { dcWarning.setWarningType(5); dcWarning.setWarningSubclass("5-6"); From 5a6d4e5d3582543305620faf6d275efb2f109c53 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, 30 May 2024 18:00:21 +0800 Subject: [PATCH 22/44] =?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 --- .../src/main/resources/mapper/business/DcEventProcessMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml index e852e609..68376d4f 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventProcessMapper.xml @@ -152,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file From 12caa19705334f5e84c09363dd7ce16875dceb7a 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, 30 May 2024 18:12:30 +0800 Subject: [PATCH 23/44] =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEventServiceImpl.java | 59 ------------------- 1 file changed, 59 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 53c23e79..cd94b9d1 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 @@ -1166,65 +1166,6 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventProcess.setContext("由" + sourceName + "上报了一起" + typeName + "事件"); dcEventProcessService.insertDcEventProcess(dcEventProcess); - //插入调度默认数据 - ArrayList> hashMaps = new ArrayList<>(); - String stakeMark = dcEvent.getStakeMark();//传入桩号 - List> mapList = dcWarningMapper.selectRecentlySection();//全部机构的桩号和名称 - for (HashMap map : mapList) { - if (org.apache.commons.lang3.StringUtils.isBlank(map.get("stakeMark").toString())) { - continue; - } - Long sectionId = (Long) map.get("id");//机构的id - String stakeMarkNew = map.get("stakeMark").toString();//机构桩号 - com.zc.business.utils.StakeMarkUtils stakeMarkUtils = new StakeMarkUtils(); - Integer itselfStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMarkNew);//机构本身的米数 - Integer afferentStakeMark = stakeMarkUtils.stakeMarkToInt(stakeMark);//传入的桩号米数 - Integer difference = Math.abs(afferentStakeMark - itselfStakeMark); //计算距离绝对值 - map.put("difference", difference / 1000.0);//米转公里加入到map - map.put("id", sectionId); - hashMaps.add(map); - } - List> sortedHashMaps = hashMaps.stream().sorted(Comparator.comparing(map -> { - return (Double) map.get("difference"); - })).collect(Collectors.toList()); - HashMap hashMap = dcWarningMapper.selectDcDispatch(id);//查询事件是否已经有转的调度记录 - if (!sortedHashMaps.isEmpty() && hashMap == null) { - HashMap map = sortedHashMaps.get(0); - Long sortId = (Long) map.get("id");//取出最近的机构id - if (sortId != null) { - DcDispatch dcDispatch = new DcDispatch(); - DcDispatchResource dcDispatchResource = new DcDispatchResource(); - dcDispatch.setDeptId(SecurityUtils.getLoginUser().getDeptId()); - dcDispatch.setEventId(id); - dcDispatch.setStartTime(DateUtils.getNowDate()); - dcDispatch.setDispatchStatus(2L);//进行中状态 - dcDispatch.setRemark(dcEvent.getRemark()); - dcWarningMapper.insertDcDispatch(dcDispatch);//事件绑定信息记录 - Long dispatchId = dcDispatch.getId();//信息记录id - List> employeesMap = dcWarningMapper.selectOrganizationEmployees(sortId);//人员map - if (employeesMap != null && employeesMap.size() > 0) { - // 生成一个随机索引,范围在0到列表长度减1之间 - int randomIndex = ThreadLocalRandom.current().nextInt(employeesMap.size()); - HashMap randomEmployee = employeesMap.get(randomIndex); - Long employeesId = (Long) randomEmployee.get("id");//随机人员id - dcDispatchResource.setResourceId(employeesId);//资源id - dcDispatchResource.setDispatchType(1);//资源类型 - dcDispatchResource.setDispatchId(dispatchId);//信息记录id - dcWarningMapper.insertDispatchResource(dcDispatchResource); - } - List> vehiclesMap = dcWarningMapper.selectVehicles(sortId);//车辆map - if (vehiclesMap != null && vehiclesMap.size() > 0) { - // 生成一个随机索引,范围在0到列表长度减1之间 - int randomIndex = ThreadLocalRandom.current().nextInt(vehiclesMap.size()); - HashMap randomEmployee = employeesMap.get(randomIndex); - Long vehiclesId = (Long) randomEmployee.get("id");//随机车辆id - dcDispatchResource.setResourceId(vehiclesId);//资源id - dcDispatchResource.setDispatchType(2);//资源类型 - dcDispatchResource.setDispatchId(dispatchId);//信息记录id - dcWarningMapper.insertDispatchResource(dcDispatchResource);//绑定车辆信息 - } - } - } } return i; } From ffba40c835f6d23a0f74869da1fc7399f463adcc Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Thu, 30 May 2024 18:16:08 +0800 Subject: [PATCH 24/44] =?UTF-8?q?=E5=A4=84=E7=BD=AE=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/service/impl/DcWarningServiceImpl.java | 4 +++- .../src/main/resources/mapper/business/DcWarningMapper.xml | 2 +- 2 files changed, 4 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 7216ea41..9cdd30aa 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 @@ -612,6 +612,7 @@ public class DcWarningServiceImpl implements IDcWarningService } @Override + @Transactional(rollbackFor = Exception.class) public AjaxResult commandAndDispatch(DcWarning dcWarning) { Map mapAll = new HashMap<>(); HashMap dcDispatch = dcWarningMapper.selectDcDispatch(dcWarning.getId());//查询是否存在调度记录 @@ -671,6 +672,7 @@ public class DcWarningServiceImpl implements IDcWarningService } //指挥调度,当调度信息为空的时候调用智能分配资源 @Override + @Transactional(rollbackFor = Exception.class) public AjaxResult intelligentSource(DcWarning dcWarning) { String stakeMark = dcWarning.getStakeMark(); ArrayList> hashMaps = new ArrayList<>(); @@ -747,7 +749,7 @@ public class DcWarningServiceImpl implements IDcWarningService employees = Long.parseLong(map.get("employeesId").toString());//人员 } Long vehicles=null; - if (map.get("vehiclesId").toString()!=null){ + if (map.get("vehiclesId")!=null){ vehicles = Long.parseLong(map.get("vehiclesId").toString());//车辆 } DcDispatch dcDispatch = new DcDispatch(); diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index c3986369..c4155e2a 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -319,7 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where parent_id!=0 @@ -185,6 +188,9 @@ AND d.use_state = #{status.useState} + + ORDER BY ${status.orderByField} ${status.orderDirection} + @@ -222,6 +228,9 @@ d.device_type, DAY (s.time) + + ORDER BY ${status.orderByField} ${status.orderDirection} + @@ -251,6 +260,9 @@ AND d.use_state = #{status.useState} + + ORDER BY ${status.orderByField} ${status.orderDirection} + From 9b141fcc28d8e89640a4f164f334e6d950a13634 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Thu, 30 May 2024 19:01:08 +0800 Subject: [PATCH 26/44] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ModuleCallServiceImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java index b76b49e7..9d5e2cf6 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java @@ -14,14 +14,14 @@ import java.util.*; @Service public class ModuleCallServiceImpl implements ModuleCallService { - private static long ROAD_SECTION_PERCEPTION; // 路段感知 - private static long ROAD_NETWORK_CONTROL; // 路网管控 - private static long MAINTENANCE_AND_OPERATION; // 养护运营 - private static long PUBLIC_SERVICES; // 公众服务 - private static long SCAN_CODE_ALARM; // 扫码报警 - private static long NON_AIRCRAFT_WARNING; // 非机预警 - private static long GIS_BIM; // gisBim - private static long DIGITAL_TOLL_STATION; // 数字收费站 + private static long ROAD_SECTION_PERCEPTION = 14; // 路段感知 + private static long ROAD_NETWORK_CONTROL = 23; // 路网管控 + private static long MAINTENANCE_AND_OPERATION = 21; // 养护运营 + private static long PUBLIC_SERVICES = 25; // 公众服务 + private static long SCAN_CODE_ALARM = 11; // 扫码报警 + private static long NON_AIRCRAFT_WARNING = 6; // 非机预警 + private static long GIS_BIM = 22; // gisBim + private static long DIGITAL_TOLL_STATION = 12; // 数字收费站 @Resource private RedisCache redisCache; From e73fdf09cf6a5ec350c2f7c2025571ee90fac180 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Thu, 30 May 2024 19:38:17 +0800 Subject: [PATCH 27/44] =?UTF-8?q?=E4=BC=98=E5=8C=96status=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/zc/business/controller/StatusController.java | 1 + 1 file changed, 1 insertion(+) 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 3b29fe92..d12339f0 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 @@ -67,6 +67,7 @@ public class StatusController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, Status status) { + status.setTypes(status.getType().split(",")); List listStatus = statusService.export(status); ExcelUtil util = new ExcelUtil<>(Status.class); util.exportExcel(response, listStatus, "设备状态列表"); From ec3b45d225ce0d63805934754b22c9775d72e2a5 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Thu, 30 May 2024 19:55:39 +0800 Subject: [PATCH 28/44] =?UTF-8?q?=E6=8E=A8=E9=80=81=E4=BF=AE=E6=94=B9,?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8F=91=E5=B8=83=E8=AE=B0=E5=BD=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=8F=91=E5=B8=83=E6=B8=A0=E9=81=93=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcWarningController.java | 26 ++++++-- .../zc/business/mapper/DcWarningMapper.java | 2 + .../business/service/IDcWarningService.java | 7 ++- .../service/impl/DcWarningServiceImpl.java | 59 +++++++++++++++++++ .../mapper/business/DcWarningMapper.xml | 3 + 5 files changed, 90 insertions(+), 7 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 029931fa..ffb01f0c 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 @@ -184,6 +184,27 @@ public class DcWarningController extends BaseController } return (dcWarningService.insertDispatch(map)); } + //4.指挥调度资源新增(用户修改弹窗的提交) + @PostMapping("/updateSource") + public AjaxResult insertDispatchSource(@RequestBody HashMap map){ + return toAjax(dcWarningService.insertDispatchSource(map)); + } + //5.修改调度资源记录 1.查询记录id +// @PostMapping("/selectDispatchId") +// public AjaxResult selectDispatchId(@RequestBody HashMap map){ +// if (map == null || !map.containsKey("eventId")||StringUtils.isBlank(map.get("eventId").toString())){ +// return AjaxResult.error("参数错误"); +// } +// return AjaxResult.success(dcWarningService.selectDispatchId(map.get("eventId").toString())); +// } + //5.修改调度资源记录 2.提交调度资源 + @PostMapping("/updateDispatchSource") + public AjaxResult updateDispatch(@RequestBody HashMap map){ + if (map == null || !map.containsKey("dispatchId")||StringUtils.isBlank(map.get("dispatchId").toString())){ + return AjaxResult.error("参数错误"); + } + return toAjax(dcWarningService.updateDispatchSource(map)); + } //指挥调度记录修改 @PostMapping("/updateDispatch") public AjaxResult insertDispatch(@RequestBody DcDispatch dcDispatch){ @@ -192,11 +213,6 @@ public class DcWarningController extends BaseController } return toAjax(dcWarningService.insertDispatch(dcDispatch)); } - //4.指挥调度资源新增(用户修改弹窗的提交) - @PostMapping("/updateSource") - public AjaxResult insertDispatchSource(@RequestBody HashMap map){ - return toAjax(dcWarningService.insertDispatchSource(map)); - } //感知事件误报 @PostMapping("/falseAlarm") public AjaxResult falseAlarmResolution(@RequestBody DcWarning dcWarning){ 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 95df0a5b..fa39632b 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 @@ -148,4 +148,6 @@ public interface DcWarningMapper public String vehiclesType(Long id); //依据机构id查询机构名称 public String organizationName(Long id); + //事件id查询调度记录id + public HashMap selectDispatchId(@Param("eventId")String eventId); } 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 095c3f74..73f3312c 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 @@ -97,10 +97,13 @@ public interface IDcWarningService AjaxResult intelligentSource(DcWarning dcWarning); //3.指挥调度新增资源 AjaxResult insertDispatch(HashMap map); + //4.新增指挥调度资源记录 + public Integer insertDispatchSource(HashMap map); + //5.修改调度资源记录 + public HashMap selectDispatchId(String eventId); + public Integer updateDispatchSource(HashMap map); //修改指挥调度资源记录 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 9cdd30aa..2af5e6f7 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 @@ -650,6 +650,7 @@ public class DcWarningServiceImpl implements IDcWarningService mapAll.put("existence",0); return AjaxResult.success(mapAll); } + mapAll.put("dispatchId",dcDispatch.get("id")); mapAll.put("existence",1); HashMap map = dcWarningMapper.selectDcDispatch(dcWarning.getId());//获取机构id与资源id if (map!=null){ @@ -855,6 +856,64 @@ public class DcWarningServiceImpl implements IDcWarningService dcEventProcessService.insertDcEventProcess(dcEventProcess); return 1; } + + @Override + public HashMap selectDispatchId(String eventId) { + return dcWarningMapper.selectDispatchId(eventId); + } + + @Override + public Integer updateDispatchSource(HashMap map) { + DcDispatchResource dcDispatchResource = new DcDispatchResource(); + Long dispatchId = Long.parseLong(map.get("dispatchId").toString()); + dcWarningMapper.deleteDispatchResource(dispatchId);//删除全部属于该调度记录下的全部资源 + ArrayList> employeesArray = (ArrayList>) map.get("employees");//取出人员 + 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 + dcDispatchResource.setDispatchId(dispatchId);//关联调度记录 + Integer integer = dcWarningMapper.insertDispatchResource(dcDispatchResource); + context = context + array.get("name").toString() + "、"; + if (integer == 0) { + throw new RuntimeException("插入资源失败"); + } + } + context = context.substring(0,context.length() -1); + context += "参与事件救援"; + } + ArrayList> vehicleArray = (ArrayList>) map.get("vehicle");////取出车辆 + if (vehicleArray!=null&&vehicleArray.size()>0) { + if (context.length() > 0){ + context += ","; + } + context += "救援车辆"; + for (Map array : vehicleArray) { + dcDispatchResource.setDispatchType(2); + dcDispatchResource.setResourceId(Long.valueOf(array.get("id").toString())); + dcDispatchResource.setDispatchId(dispatchId); + Integer integer = dcWarningMapper.insertDispatchResource(dcDispatchResource); + + context = context + array.get("vehiclePlate").toString() + "、"; + if (integer == 0) { + throw new RuntimeException("插入资源失败"); + } + } + context = context.substring(0,context.length() -1); + context += "参与事件救援"; + } + + DcDispatch dcDispatchEventId = dcWarningMapper.selectDcDispatchById(dispatchId); + DcEventProcess dcEventProcess = new DcEventProcess(); + dcEventProcess.setEventId(dcDispatchEventId.getEventId()); + dcEventProcess.setSource(1); + dcEventProcess.setContext(context); + dcEventProcessService.insertDcEventProcess(dcEventProcess); + return 1; + } + //误报解除 @Override public Integer falseAlarmResolution(DcWarning dcWarning) { diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index c4155e2a..4bfb8a26 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -430,5 +430,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + From cb403584764c2e2a81ac50390032a57ceebf63c1 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Thu, 30 May 2024 20:01:21 +0800 Subject: [PATCH 29/44] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=88=97=E8=A1=A8BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/domain/DcDevice.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 0bd60eb7..4ef85d4c 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 @@ -35,8 +35,8 @@ public class DcDevice { @ApiModelProperty("物联设备ID") @Excel(name = "物联设备ID") private String iotDeviceId; - @ApiModelProperty("组ID") - @Excel(name = "组ID") + @ApiModelProperty("所属机构") + //@Excel(name = "所属机构") private Long groupId; @ApiModelProperty("产品ID") @Excel(name = "产品ID") @@ -45,7 +45,7 @@ public class DcDevice { @Excel(name = "桩号") private String stakeMark; @ApiModelProperty("方向1-上行(菏泽方向),2-中,3-下行(济南方向)") - @Excel(name = "方向") + @Excel(name = "方向", readConverterExp = "1=菏泽方向,3=济南方向") private String direction; @ApiModelProperty("设备名称") @Excel(name = "设备名称") @@ -54,7 +54,7 @@ public class DcDevice { @Excel(name = "设备编号") private String deviceCode; @ApiModelProperty("设备类型") - @Excel(name = "设备类型") + @Excel(name = "设备类型", readConverterExp = "1=摄像机,2=可变信息标志,3=气象监测器,4=出口诱导灯,5=路段语音广播,6=护栏碰撞,7=毫米波雷达,8=合流区预警,9=智慧锥桶,10=激光疲劳唤醒,11=一类交通量调查站,12=行车诱导,13=智能设备箱,14=光线在线监测,15=太阳能板,16=远端机") private String deviceType; @ApiModelProperty("所属网段") @Excel(name = "所属网段") @@ -75,10 +75,10 @@ public class DcDevice { @Excel(name = "安装位置") private String installationSite; @ApiModelProperty("设备状态") - @Excel(name = "设备状态") + @Excel(name = "设备状态", readConverterExp = "0=异常,1=正常") private String deviceState; @ApiModelProperty("使用状态") - @Excel(name = "使用状态") + @Excel(name = "使用状态", readConverterExp = "0=使用中,1=未使用") private Integer useState; @ApiModelProperty("其他配置") @Excel(name = "其他配置") @@ -87,7 +87,7 @@ public class DcDevice { @Excel(name = "备注") private String remark; @ApiModelProperty("设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等") - @Excel(name = "设施归属类型") + @Excel(name = "设施归属类型", readConverterExp = "0=默认,1=道路沿线,2=桥梁,3=隧道,4=收费广场,5=收费站,6=服务区") private String facilitiesType; @ApiModelProperty("设备ip") @Excel(name = "设备ip") @@ -102,7 +102,7 @@ public class DcDevice { @Excel(name = "修改时间") private Date updateTime; @ApiModelProperty("子类型") - @Excel(name = "子类型") + @Excel(name = "子类型", readConverterExp = "1-1=高清网络枪型固定摄像机,1-2=高清网络球形摄像机,1-3=桥下高清网络球形摄像机,1-4=360°全景摄像机,1-5=180°全景摄像机,2-1=门架式可变信息标志,2-2=站前可变信息标志,2-3=雨棚可变信息标志,2-4=站前悬臂式可变信息标") private String childType; @TableField(exist = false) private String longitude; From 6863e41809fb91dd9a58055255267dfc4f490480 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, 30 May 2024 20:35:57 +0800 Subject: [PATCH 30/44] =?UTF-8?q?=E9=A6=96=E5=9B=A0=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/service/impl/DcEventServiceImpl.java | 14 ++++++++++++-- 1 file changed, 12 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 cd94b9d1..5451a5c4 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 @@ -264,7 +264,9 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent1.setId(dcEventId);//事件id if (dcEvent2.getEventType() != 3) { dcEvent1.setEventNature(1l);//首发事件 + dcEvent1.setLinkId(dcEvent2.getLinkId() + "," + uuid);//关联管制事件id + dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 } } @@ -282,7 +284,11 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent1.setId(dcEventId);//事件id if (dcEvent2.getEventType() != 3) { dcEvent1.setEventNature(1l);//首发事件 - dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id + if (dcEvent2.getLinkId()!=null) { + dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id + }else { + dcEvent1.setLinkId(uuid);//关联管制事件id + } dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 } @@ -327,7 +333,11 @@ public class DcEventServiceImpl extends ServiceImpl impl a++; } String linkId2 = sb2.toString(); - dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id + if (dcEvent2.getLinkId()!=null){ + dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id + }else { + dcEvent1.setLinkId(linkId2);//关联管制事件id + } if (dcEvent2.getEventType() != 3) { dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 From 355d30718947a15fed4bcad8009ab14918cd908d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Fri, 31 May 2024 09:49:44 +0800 Subject: [PATCH 31/44] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E6=98=AF=E5=90=A6=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=EF=BC=8C=E9=99=A4=E4=BA=A4=E9=80=9A=E4=BA=8B=E6=95=85=EF=BC=8C?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E6=95=85=E9=9A=9C=E5=A4=96=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=EF=BC=8C=E5=BD=95=E5=85=A5=E5=90=8E=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BD=AC=E4=B8=BA=E7=A1=AE=E8=AE=A4=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEventServiceImpl.java | 27 +++++++++++++++++-- 1 file changed, 25 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 5451a5c4..c18beb37 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 @@ -221,6 +221,9 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.getDcEventAccident().setId(uuid); int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); + if (dcEvent.getEventState() ==1){ + updateDcEventState(uuid,1);//直接确认 + } } break; //车辆事故 @@ -228,6 +231,9 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventVehicleAccident() != null) { dcEvent.getDcEventVehicleAccident().setId(uuid); int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); + if (dcEvent.getEventState() ==1){ + updateDcEventState(uuid,1);//直接确认 + } } break; //交通管制 @@ -239,12 +245,13 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventTrafficControl().getFacilityIds() == null) { dcEvent.getDcEventTrafficControl().setId(uuid); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); + updateDcEventState(uuid,1);//直接确认 break; } } //事件处置页 if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站 - updateDcEventState(dcEvent.getId(), 1); + updateDcEventState(dcEvent.getId(), 1);//直接确认 dcEvent.getDcEventTrafficControl().setId(uuid); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); //查询事件 @@ -304,6 +311,8 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.getDcEventTrafficControl().setId(uuid); dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); + updateDcEventState(uuid,1);//直接确认 + } } else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length > 1) {//facilityIds1=1 说明只选择了多个收费站 @@ -333,7 +342,7 @@ public class DcEventServiceImpl extends ServiceImpl impl a++; } String linkId2 = sb2.toString(); - if (dcEvent2.getLinkId()!=null){ + if (dcEvent2.getLinkId() !=null){ dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id }else { dcEvent1.setLinkId(linkId2);//关联管制事件id @@ -380,6 +389,7 @@ public class DcEventServiceImpl extends ServiceImpl impl updateDcEventState(map.get("facilityId" + i), 1); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); + updateDcEventState(map.get("facilityId" + i),1);//直接确认 } } else { @@ -433,6 +443,8 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventMapper.insertDcEvent(dcEvent); extracted(dcEvent); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); + updateDcEventState(map.get("facilityId" + i),1);//直接确认 + } } } @@ -446,6 +458,9 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventTrafficCongestion() != null) { dcEvent.getDcEventTrafficCongestion().setId(uuid); int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); + + updateDcEventState(uuid,1);//直接确认 + } break; @@ -460,6 +475,8 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventConstruction() != null) { dcEvent.getDcEventConstruction().setId(uuid); int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); + updateDcEventState(uuid,1);//直接确认 + } break; @@ -468,6 +485,8 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventServiceArea() != null) { dcEvent.getDcEventServiceArea().setId(uuid); int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); + updateDcEventState(uuid,1);//直接确认 + } break; //设施设备隐患 @@ -478,6 +497,8 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventAbnormalWeather() != null) { dcEvent.getDcEventAbnormalWeather().setId(uuid); int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); + updateDcEventState(uuid,1);//直接确认 + } break; //其他事件 @@ -491,6 +512,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 dcEvent.setEventNature(2l); dcEventMapper.updateDcEventLinkId(dcEvent);//修改 新添加的 事件性质 + updateDcEventState(uuid,1);//直接确认 } break; @@ -793,6 +815,7 @@ public class DcEventServiceImpl extends ServiceImpl impl * @return 结果 */ @Override + public int updateDcEvent(DcEvent dcEvent) { /* //事件类型校验 From 416900240191fc08d5db74eb8f71ada56bfcaa37 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Fri, 31 May 2024 11:50:17 +0800 Subject: [PATCH 32/44] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=A9=E6=B0=94?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=A3=85=E5=A5=BD=E8=8C=83=E5=9B=B4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WeatherForecastController.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java index f15aaff6..516166b0 100644 --- a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java +++ b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java @@ -68,7 +68,7 @@ public class WeatherForecastController extends BaseController { String[] split1 = split[i].split("[+]"); String k = split1[0].replace("K", ""); int parseInt = Integer.parseInt(k); - numStake.append("K").append(parseInt).append("+000"); + numStake.append("K").append(findNearestMultipleOfFive(parseInt)).append("+000"); if (i != split.length - 1) { numStake.append("|"); } @@ -108,6 +108,24 @@ public class WeatherForecastController extends BaseController { return AjaxResult.error("请求失败"); } + public static int findNearestMultipleOfFive(int number) { + // 计算除以5的余数 + int remainder = number % 5; + + // 如果余数为0,则number已经是5的倍数 + if (remainder == 0) { + return number; + } + + // 如果余数不为0,则最近的5的倍数要么是number减去余数(如果余数小于3), + // 要么是number加上(5 - 余数)(如果余数大于或等于3) + // 这里选择的是较小的那个值(向上或向下取整) + int lowerMultiple = number - remainder; + int higherMultiple = number + (5 - remainder); + + // 返回两者中较小的那个 + return (lowerMultiple < higherMultiple) ? lowerMultiple : higherMultiple; + } /* * 当前气象预警信息查询 From 01174c0cee45202e7b343cf12a39d9c7e8a6f6f1 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 31 May 2024 12:00:10 +0800 Subject: [PATCH 33/44] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=95=B0=E9=87=8F=EF=BC=8C=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E8=AE=BE=E5=A4=87=E6=95=B0=E9=87=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/service/impl/DcEmergencyPlansServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 0252e65f..0541ced0 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 @@ -485,7 +485,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } }); if (dcDevices.size() > 0) { - dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + if (dcExecuteAction.getNumber() > dcDevices.size()) { + dcDevices = dcDevices.subList(0, dcDevices.size()); + }else { + dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + } + } } else { // 下行 取最小的几个 From 7de559052d6062bd1b2ef5f241b86865a609539c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Fri, 31 May 2024 14:45:31 +0800 Subject: [PATCH 34/44] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E9=9D=9E=EF=BC=88?= =?UTF-8?q?=E4=BA=A4=E9=80=9A=E4=BA=8B=E6=95=85=EF=BC=8C=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E6=95=85=E9=9A=9C=EF=BC=89=20=E5=A2=9E=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=8F=91=E7=94=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/service/impl/DcEventServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 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 c18beb37..0e4fc7f0 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 @@ -160,6 +160,10 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setCreateTime(DateUtils.getNowDate()); + if (eventType != 1 && eventType != 2){ + dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间 + } + //处理无桩号事件 //交通事故 if (eventType == 1 && dcEvent.getDcEventAccident().getFacilityId() != null) { @@ -384,6 +388,7 @@ public class DcEventServiceImpl extends ServiceImpl impl String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[i]); dcEvent.setStakeMark(extracted(facilityId)); } + dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间 dcEventMapper.insertDcEvent(dcEvent); //首页事件 交通管制事件 添加 状态默认为 1 处置中 updateDcEventState(map.get("facilityId" + i), 1); @@ -439,7 +444,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setStakeMark(extracted(facilityId)); } - + dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间 dcEventMapper.insertDcEvent(dcEvent); extracted(dcEvent); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); From a499149593897df456c1622222fb5b249a34a9bc Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 31 May 2024 14:57:45 +0800 Subject: [PATCH 35/44] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=95=B0=E9=87=8F=E8=B6=85=E5=87=BA=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E5=AD=98=E5=9C=A8=E7=9A=84=E8=AE=BE=E5=A4=87=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DcEmergencyPlansServiceImpl.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 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 0541ced0..3952697a 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 @@ -508,7 +508,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } }); if (dcDevices.size() > 0) { - dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + if (dcExecuteAction.getNumber() > dcDevices.size()) { + dcDevices = dcDevices.subList(0, dcDevices.size()); + }else { + dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + } } } @@ -530,7 +534,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } }); if (dcDevices.size() > 0) { - dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + if (dcExecuteAction.getNumber() > dcDevices.size()) { + dcDevices = dcDevices.subList(0, dcDevices.size()); + }else { + dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + } } } else { @@ -550,7 +558,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { }); // 需要对查出的设备,按照桩号进行排序从小到大 if (dcDevices.size() > 0) { - dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + if (dcExecuteAction.getNumber() > dcDevices.size()) { + dcDevices = dcDevices.subList(0, dcDevices.size()); + }else { + dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + } } } } else { From 222eef13f74146bece02acd53d8393f7fdd3ec7e Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Fri, 31 May 2024 15:30:27 +0800 Subject: [PATCH 36/44] =?UTF-8?q?=E9=87=8D=E8=A6=81=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/mapper/DcEventImportantFileMapper.java | 8 ++++++++ .../service/impl/DcEventImportantFileServiceImpl.java | 9 +++++++++ .../mapper/business/DcEventImportantFileMapper.xml | 3 +++ 3 files changed, 20 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java index 56e388eb..b0a4af04 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantFileMapper.java @@ -68,4 +68,12 @@ public interface DcEventImportantFileMapper * @return 结果 */ int getImportantFileStatus(String eventId); + + /** + * 获取重要事件的上报状态 + * + * @param dcEventImportantFile 事件 + * @return 结果 + */ + int selectStatus(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 799dadea..dffd4471 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 @@ -62,6 +62,15 @@ public class DcEventImportantFileServiceImpl implements IDcEventImportantFileSer @Override public List selectDcEventImportantFileList(DcEventImportantFile dcEventImportantFile) { + int type = dcEventImportantFileMapper.getImportantFileStatus(dcEventImportantFile.getEventId()); + + //已初报待续报的, 如果查初报只能查上报了的 + if ((type == 1 || type == 2) && dcEventImportantFile.getType().equals("1")){ + dcEventImportantFile.setStatus("1"); + } else if (type == 3){ + //已终报的, 不管查什么类型的都只能查已上报状态的 + dcEventImportantFile.setStatus("1"); + } return dcEventImportantFileMapper.selectDcEventImportantFileList(dcEventImportantFile); } diff --git a/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml index 1aed6148..f292981c 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventImportantFileMapper.xml @@ -48,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM `dc_event_important_file` where event_id = #{eventId} and status = '1' + insert into dc_event_important_file From afd778341db4ff31c83dfa8a0e8434b9753c74cb Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 31 May 2024 15:46:42 +0800 Subject: [PATCH 37/44] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=8F=AF=E6=8E=A7=E8=AE=BE=E5=A4=87=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/service/impl/DcEmergencyPlansServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 3952697a..0cee3846 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 @@ -79,7 +79,9 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { .filter(dcEmergencyPlans1 -> StringUtils.isNotEmpty(dcEmergencyPlans1.getControllableDevice())) .forEach(dcEmergencyPlans1 -> { List deviceIds = Arrays.asList(dcEmergencyPlans1.getControllableDevice().split(",")); - List deviceList = dcDeviceService.listByIds(deviceIds); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(DcDevice::getIotDeviceId, deviceIds); + List deviceList = dcDeviceService.list(lambdaQueryWrapper); StringBuilder stringBuilder = new StringBuilder(); deviceList.forEach(dcDevice -> { stringBuilder.append(","); From 0c52c579bc04a2a5ebe2607a8828576f1cd8ad4d Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Fri, 31 May 2024 16:04:34 +0800 Subject: [PATCH 38/44] =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/domain/DcEmployees.java | 22 ++++++++-------- .../zc/business/domain/DcOrganization.java | 26 +++++++++---------- .../mapper/business/DcEmployeesMapper.xml | 11 ++++---- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java b/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java index ef2635f2..ea44e535 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java @@ -8,7 +8,7 @@ import com.ruoyi.common.core.domain.BaseEntity; /** * 值班人员信息对象 dc_employees - * + * * @author ruoyi * @date 2024-01-04 */ @@ -50,7 +50,7 @@ public class DcEmployees extends BaseEntity private Long parentId; //人员类型1为路管人员2为应急人员 - @Excel(name = "人员类型 1-路管人员 2-交警人员") + @Excel(name = "人员类型",readConverterExp = "1=路管人员,2=交警人员") private Long employeesType; //类型参数 private String type; @@ -100,43 +100,43 @@ public class DcEmployees extends BaseEntity this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setPostId(String postId) + public void setPostId(String postId) { this.postId = postId; } - public String getPostId() + public String getPostId() { return postId; } - public void setOrganizationId(Long organizationId) + public void setOrganizationId(Long organizationId) { this.organizationId = organizationId; } - public Long getOrganizationId() + public Long getOrganizationId() { return organizationId; } - public void setName(String name) + public void setName(String name) { this.name = name; } - public String getName() + public String getName() { return name; } - public void setContactNumber(String contactNumber) + public void setContactNumber(String contactNumber) { this.contactNumber = contactNumber; } - public String getContactNumber() + public String getContactNumber() { return contactNumber; } diff --git a/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java b/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java index f396054a..094ed367 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.TreeEntity; /** * 机构管理对象 dc_organization - * + * * @author ruoyi * @date 2024-01-04 */ @@ -23,7 +23,7 @@ public class DcOrganization extends TreeEntity /** 1-运管中心2-驻点 */ @ApiModelProperty(value = "类型1-运管中心 2-驻点", required = true) - @Excel(name = "1-运管中心 2-驻点") + @Excel(name = "类型",readConverterExp = "1=运管中心,2=驻点") private Integer organizationType; /** 名称 */ @@ -88,34 +88,34 @@ public class DcOrganization extends TreeEntity this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setOrganizationType(Integer organizationType) + public void setOrganizationType(Integer organizationType) { this.organizationType = organizationType; } - public Integer getOrganizationType() + public Integer getOrganizationType() { return organizationType; } - public void setOrganizationName(String organizationName) + public void setOrganizationName(String organizationName) { this.organizationName = organizationName; } - public String getOrganizationName() + public String getOrganizationName() { return organizationName; } - public void setOrganizationAddress(String organizationAddress) + public void setOrganizationAddress(String organizationAddress) { this.organizationAddress = organizationAddress; } - public String getOrganizationAddress() + public String getOrganizationAddress() { return organizationAddress; } @@ -128,21 +128,21 @@ public class DcOrganization extends TreeEntity { return stakeMark; } - public void setRescueUnit(String rescueUnit) + public void setRescueUnit(String rescueUnit) { this.rescueUnit = rescueUnit; } - public String getRescueUnit() + public String getRescueUnit() { return rescueUnit; } - public void setDescription(String description) + public void setDescription(String description) { this.description = description; } - public String getDescription() + public String getDescription() { return description; } diff --git a/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml b/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml index 5b64de76..2df32584 100644 --- a/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -33,13 +33,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - +