From 31151959ec4316883d1497fd5721e65e134fc9be Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 14 Jun 2024 16:31:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=AE=B1-=E8=AE=BE=E5=A4=87=E6=93=8D=E4=BD=9C=E5=8F=A3?= =?UTF-8?q?=E4=BB=A4=E6=A0=A1=E9=AA=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/DcDeviceController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java index 6dce4b16..2704a549 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java @@ -15,6 +15,7 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.ISysConfigService; import com.zc.business.constant.DeviceTypeConstants; import com.zc.business.domain.DcDevice; import com.zc.business.interfaces.OperationLog; @@ -62,6 +63,9 @@ public class DcDeviceController extends BaseController { @Resource private BroadcastController broadcastController; + @Resource + private ISysConfigService configService; + //*********************************设备增删改查****************************************** /** @@ -805,5 +809,13 @@ public class DcDeviceController extends BaseController { } return null; } + /** + * 设备箱-设备操作口令校验 + */ + @GetMapping("/kouling/{secretKey}") + public AjaxResult verifySecretKey(@PathVariable String secretKey) { + String key = configService.selectConfigByKey("sbx-fun-kl");//密钥 + return AjaxResult.success(key.equals(secretKey)); + } } From d55a44139209da9bb6851c4505d4c8d6c790f052 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Sat, 15 Jun 2024 10:58:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=AF=94=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/enums/ValueConverter.java | 12 ++--- .../service/impl/DcEventServiceImpl.java | 46 +++++++++++++++++++ 2 files changed, 52 insertions(+), 6 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 474863a0..1fa27b18 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 @@ -206,7 +206,7 @@ public class ValueConverter { eventLabel.put("dcEventAbnormalWeather.numericalValue","异常天气数值"); eventLabel.put("dcEventAccident.reporterName","报警人姓名"); eventLabel.put("dcEventAccident.reporterPhoneNumber","报警人电话"); - eventLabel.put("dcEventAccident.locationType","地点"); + eventLabel.put("dcEventAccident.locationType","地点类型"); eventLabel.put("dcEventAccident.trafficJam","压车(公里)"); eventLabel.put("dcEventAccident.weatherCondition","天气情况"); eventLabel.put("dcEventAccident.impactLevel","影响"); @@ -227,7 +227,7 @@ public class ValueConverter { eventLabel.put("dcEventAccident.seriousInjuries","重伤(人)"); eventLabel.put("dcEventAccident.fatalities","死亡(人)"); eventLabel.put("dcEventAccident.isPrivate","私密事件"); - eventLabel.put("dcEventAccident.facilityId","设施关联"); + eventLabel.put("dcEventAccident.facilityId","设施"); // eventLabel.put("dcEventAccident.rampId","匝道id"); eventLabel.put("dcEventAccident.location","地点"); eventLabel.put("dcEventConstruction.controlMode","管制方式"); @@ -236,7 +236,7 @@ public class ValueConverter { eventLabel.put("dcEventConstruction.specialConstruction","专项施工"); eventLabel.put("dcEventConstruction.otherConstructionName","其他施工名称"); eventLabel.put("dcEventConstruction.constructionMeasurement","施工措施"); -// eventLabel.put("dcEventConstruction.facilityId","设施id"); + eventLabel.put("dcEventConstruction.facilityId","设施"); eventLabel.put("dcEventConstruction.exitsInlets","出入口"); eventLabel.put("dcEventConstruction.laneOccupancy","占用车道"); eventLabel.put("dcEventConstruction.trafficCondition","通行情况"); @@ -250,7 +250,7 @@ public class ValueConverter { eventLabel.put("dcEventTrafficCongestion.congestionMileage","拥堵里程(公里)"); eventLabel.put("dcEventTrafficCongestion.maxCongestionMileage","最大拥堵里程(公里)"); eventLabel.put("dcEventTrafficCongestion.congestionCause","拥堵原因"); -// eventLabel.put("dcEventTrafficCongestion.facilityId","设施id"); + eventLabel.put("dcEventTrafficCongestion.facilityId","设施"); // eventLabel.put("dcEventTrafficCongestion.rampId","匝道"); eventLabel.put("dcEventTrafficCongestion.location","地点"); eventLabel.put("dcEventTrafficCongestion.detailedReasons","详细原因"); @@ -273,13 +273,13 @@ public class ValueConverter { eventLabel.put("dcEventVehicleAccident.seriousInjuries","重伤(人)"); eventLabel.put("dcEventVehicleAccident.fatalities","死亡(人)"); eventLabel.put("dcEventVehicleAccident.isPrivate","私密事件"); - eventLabel.put("dcEventVehicleAccident.facilityId","地点"); + eventLabel.put("dcEventVehicleAccident.facilityId","设施"); // eventLabel.put("dcEventVehicleAccident.rampId","匝道"); eventLabel.put("dcEventVehicleAccident.location","地点"); eventLabel.put("dcEventTrafficControl.controlType","管制分类"); eventLabel.put("dcEventTrafficControl.controlCause","管制原因"); eventLabel.put("dcEventTrafficControl.exitsInlets","出入口"); -// eventLabel.put("dcEventTrafficControl.facilityId","设施id"); + eventLabel.put("dcEventTrafficControl.facilityId","设施"); // eventLabel.put("dcEventTrafficControl.rampId","匝道"); eventLabel.put("dcEventTrafficControl.causeType","原因类型"); eventLabel.put("dcEventTrafficControl.measure","措施"); 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 ab5c4af3..cf330806 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 @@ -89,6 +89,9 @@ public class DcEventServiceImpl extends ServiceImpl impl @Autowired private DcStakeMarkMapper dcStakeMarkMapper; + @Autowired + private DcRampMapper dcRampMapper; + private final String HAPPEN = "发生"; private final String EVENT = "事件"; private final String SUBEVENT = "0"; @@ -1814,6 +1817,49 @@ public class DcEventServiceImpl extends ServiceImpl impl } else if ("2".equals(result.getRight())) { result.setRight("禁止"); } + } else if ("dcEventAccident.facilityId".equals(result.getRightPath()) + || "dcEventConstruction.facilityId".equals(result.getRightPath()) + || "dcEventServiceArea.facilityId".equals(result.getRightPath()) + || "dcEventTrafficCongestion.facilityId".equals(result.getRightPath()) + || "dcEventVehicleAccident.facilityId".equals(result.getRightPath()) + || "dcEventTrafficControl.facilityId".equals(result.getRightPath())){ + DcFacility dcFacility = dcFacilityService.getFacility(result.getRight().toString()); + if (dcFacility != null){ + result.setRight(dcFacility.getFacilityName()); + } + } else if ("dcEventAccident.location".equals(result.getRightPath())){ + DcEventAccident dcEventAccident = newEvent.getDcEventAccident(); + + if (dcEventAccident.getLocationType() == 3){ + DcRamp dcRamp = dcRampMapper.selectDcRampById((Long) result.getRight()); + if (dcRamp != null){ + result.setRight(dcRamp.getRampName()); + } + } else if (dcEventAccident.getLocationType() == 4){ + if ("1".equals(result.getRight())) { + result.setRight("入口车道"); + } else if ("2".equals(result.getRight())) { + result.setRight("入口匝道"); + } else if ("3".equals(result.getRight())) { + result.setRight("入口"); + } else if ("4".equals(result.getRight())) { + result.setRight("入口内广场"); + } else if ("5".equals(result.getRight())) { + result.setRight("出口车道"); + } else if ("6".equals(result.getRight())) { + result.setRight("出口匝道"); + } else if ("7".equals(result.getRight())) { + result.setRight("外广场"); + } else if ("8".equals(result.getRight())) { + result.setRight("出口"); + } else if ("9".equals(result.getRight())) { + result.setRight("(站外)入口匝道"); + } else if ("10".equals(result.getRight())) { + result.setRight("(站外)出口匝道"); + } else if ("11".equals(result.getRight())) { + result.setRight("出口内广场"); + } + } } String label = ValueConverter.eventLabel(result.getRightPath()); if (StringUtils.isNotEmpty(label)) {