From ad774fea01ea67bcde09161bbf62d32ba1d4ac00 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Thu, 16 May 2024 17:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=A4=E9=80=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6-=E6=A0=B9=E6=8D=AE=E4=BA=8B=E4=BB=B6=E3=80=81?= =?UTF-8?q?=E5=8D=95=E4=B8=AA=E6=89=A7=E8=A1=8C=E6=93=8D=E4=BD=9C=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcEmergencyPlansController.java | 9 +++++++++ .../domain/DcEventAnDcEmergencyPlans.java | 6 ++++++ .../service/DcEmergencyPlansService.java | 5 +++++ .../impl/DcEmergencyPlansServiceImpl.java | 18 ++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java index 3cfdf97f..96015b8e 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java @@ -82,6 +82,15 @@ public class DcEmergencyPlansController extends BaseController { return AjaxResult.success(dcEmergencyPlansList.get(0)); } + /** + * 交通事件-根据事件、单个执行操作筛选设备 + */ + @ApiOperation("交通事件-根据事件、单个执行操作筛选设备") + @PostMapping("/list/event/deviceList") + public AjaxResult selectDeviceListByEventDcExecuteAction(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { + return AjaxResult.success(dcEmergencyPlansService.selectDeviceListByEventDcExecuteAction(dcEventAnDcEmergencyPlans)); + } + /** * 交通事件-情报板确认回显原始模板 */ diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEventAnDcEmergencyPlans.java b/zc-business/src/main/java/com/zc/business/domain/DcEventAnDcEmergencyPlans.java index 24d8ffb0..dd96dacd 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEventAnDcEmergencyPlans.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEventAnDcEmergencyPlans.java @@ -37,6 +37,12 @@ public class DcEventAnDcEmergencyPlans { @ApiModelProperty("事件预案数据") private DcEmergencyPlans dcEmergencyPlans; + /** + * 单个执行操作数据 + */ + @ApiModelProperty("单个执行操作数据") + private DcExecuteAction dcExecuteAction; + /** * 情报板模板数据 */ diff --git a/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java b/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java index 3e3e8c92..59fb69c8 100644 --- a/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java +++ b/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java @@ -44,6 +44,11 @@ public interface DcEmergencyPlansService { */ void dispositionDeviceContent(List list, DcEvent dcEvent); + /** + * 交通事件-根据事件、单个执行操作筛选设备 + */ + List selectDeviceListByEventDcExecuteAction(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); + /** * 交通事件-情报板确认回显原始模板 */ 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 2b45a585..772160e4 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 @@ -185,6 +185,24 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { }); } + /** + * 交通事件-根据事件、单个执行操作筛选设备 + * @param dcEventAnDcEmergencyPlans + * @return + */ + @Override + public List selectDeviceListByEventDcExecuteAction(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { + // 事件桩号 + DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent(); + dcEvent.setStakeMark(dcEvent.getStakeMark().replace("K", "")); + String[] markArray = dcEvent.getStakeMark().split("\\+"); + if (markArray[1].length() < 3) { + // 不足三位 补零 + markArray[1] = String.format("%0" + 3 + "d", markArray[1]); + } + return ruleFiltering(dcEventAnDcEmergencyPlans.getDcExecuteAction(), markArray, dcEvent.getDirection()); + } + /** * 更改智能发布中的发布内容-计算公里数 */