From e48320455f1d8d01ec8efe3af3ee95490c7366d9 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, 24 May 2024 19:58:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=20=E4=BA=8B=E4=BB=B6=E7=8A=B6=E6=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/service/impl/DcEventServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index 7c66a582..9f2c9158 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 @@ -242,7 +242,7 @@ public class DcEventServiceImpl extends ServiceImpl impl } //事件处置页 if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站 - updateDcEventState(dcEvent.getId(), dcEvent.getEventState().intValue()); + updateDcEventState(dcEvent.getId(), 1); dcEvent.getDcEventTrafficControl().setId(uuid); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); DcEvent dcEvent1 = new DcEvent(); @@ -256,7 +256,6 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站 if (dcEventId != null && !dcEventId.equals("")) {//不等于空 事件处置页面 修改 - dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类 DcEvent dcEvent1 = new DcEvent(); dcEvent1.setId(dcEventId);//事件id dcEvent1.setEventNature(1l);//首发事件 @@ -265,6 +264,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());// + //首页事件 交通管制事件 添加 状态默认为 1 处置中 + updateDcEventState(dcEvent.getId(), 1); } else { extracted(dcEvent);//事件推送到 首页 @@ -330,6 +331,8 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setStakeMark(extracted(facilityId)); } dcEventMapper.insertDcEvent(dcEvent); + //首页事件 交通管制事件 添加 状态默认为 1 处置中 + updateDcEventState(map.get("facilityId" + i), 1); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); @@ -384,8 +387,6 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventMapper.insertDcEvent(dcEvent); extracted(dcEvent); - //首页事件 交通管制事件 添加 状态默认为 1 处置中 - updateDcEventState(dcEvent.getId(), dcEvent.getEventState().intValue()); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); } } @@ -435,8 +436,8 @@ public class DcEventServiceImpl extends ServiceImpl impl break; //其他事件 case 11: - if (dcEventId != null) {//首页进入 + if (dcEventId != null) {//首页进入 DcEvent dcEvent1 = new DcEvent(); dcEvent1.setId(dcEventId);//事件id dcEvent1.setEventNature(1l);//首发事件 From d870a24c5d0c84363cda4adddc9aec36fa58f393 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 24 May 2024 19:59:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=B6=E8=B4=B9?= =?UTF-8?q?=E7=AB=99=E5=85=A5=E5=8F=A3=E6=B5=81=E6=B0=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E5=A2=9E=E5=8A=A0=E9=97=A8=E6=9E=B6?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=B6=E8=B4=B9=E7=AB=99=E5=87=BA=E5=8F=A3?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OdsTollEnpassDataController.java | 38 +++++++++++++++++++ .../OdsTollEtctuDataController.java | 38 +++++++++++++++++++ .../OdsTollExpassDataController.java | 38 +++++++++++++++++++ .../service/IOdsTollEnpassDataService.java | 5 +++ .../service/IOdsTollEtctuDataService.java | 5 +++ .../service/IOdsTollExpassDataService.java | 5 +++ .../impl/OdsTollEnpassDataServiceImpl.java | 10 +++++ .../service/impl/OdsTollEtctuDataImpl.java | 10 +++++ .../impl/OdsTollExpassDataServiceImpl.java | 10 +++++ 9 files changed, 159 insertions(+) create mode 100644 zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java create mode 100644 zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java create mode 100644 zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java diff --git a/zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java b/zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java new file mode 100644 index 00000000..8a64bea1 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java @@ -0,0 +1,38 @@ +package com.zc.business.controller; + + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.zc.business.service.IOdsTollEnpassDataService; +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/odsTollEnpassData") +public class OdsTollEnpassDataController extends BaseController { + + @Resource + private IOdsTollEnpassDataService iOdsTollEnpassDataService; + + + /** + * 收费站入口流水数据统计 + * + * @return 查询结果 + */ + @ApiOperation("收费站入口流水数据统计") + @GetMapping("/countNumber") + public AjaxResult odsTollEnpassDataCountNumber() { + return AjaxResult.success(iOdsTollEnpassDataService.odsTollEnpassDataCountNumber()); + } + +} diff --git a/zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java b/zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java new file mode 100644 index 00000000..feb86d21 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java @@ -0,0 +1,38 @@ +package com.zc.business.controller; + + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.zc.business.service.IOdsTollEtctuDataService; +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/odsTollEtctuData") +public class OdsTollEtctuDataController extends BaseController { + + @Resource + private IOdsTollEtctuDataService iOdsTollEtctuDataService; + + + /** + * 门架流水数据接口统计 + * + * @return 查询结果 + */ + @ApiOperation("门架流水数据接口统计") + @GetMapping("/countNumber") + public AjaxResult odsTollEtctuDataCountNumber() { + return AjaxResult.success(iOdsTollEtctuDataService.odsTollEtctuDataCountNumber()); + } + +} diff --git a/zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java b/zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java new file mode 100644 index 00000000..4b3d11f4 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java @@ -0,0 +1,38 @@ +package com.zc.business.controller; + + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.zc.business.service.IOdsTollExpassDataService; +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/odsTollExpassData") +public class OdsTollExpassDataController extends BaseController { + + @Resource + private IOdsTollExpassDataService iOdsTollExpassDataService; + + + /** + * 收费站出口流水数据统计 + * + * @return 查询结果 + */ + @ApiOperation("收费站出口流水数据统计") + @GetMapping("/countNumber") + public AjaxResult odsTollExpassDataCountNumber() { + return AjaxResult.success(iOdsTollExpassDataService.odsTollExpassDataCountNumber()); + } + +} diff --git a/zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java b/zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java index f22ca002..0251afed 100644 --- a/zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java +++ b/zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java @@ -44,5 +44,10 @@ public interface IOdsTollEnpassDataService extends IService { */ List calculateTollStationStatistics(List list); + /** + * 收费站入口流水数据统计 + */ + int odsTollEnpassDataCountNumber(); + } diff --git a/zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java b/zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java index a324f5ff..4ad8117d 100644 --- a/zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java +++ b/zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java @@ -37,4 +37,9 @@ public interface IOdsTollEtctuDataService extends IService { * @return 返回一个包含各门架统计数据的列表。如果输入列表为空,则返回空列表。 */ List calculateGantryStatistics(List odsTollEtctuDataList); + + /** + * 门架流水数据接口统计 + */ + int odsTollEtctuDataCountNumber(); } diff --git a/zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java b/zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java index 64af9f19..fe766393 100644 --- a/zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java +++ b/zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java @@ -41,5 +41,10 @@ public interface IOdsTollExpassDataService extends IService { * @return 返回一个包含各收费站统计数据的列表。如果输入列表为空,则返回空列表。 */ List calculateTollStationStatistics(List list); + + /** + * 收费站出口流水数据统计 + */ + int odsTollExpassDataCountNumber(); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java index 75b51e6c..87407c4b 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java @@ -95,6 +95,16 @@ public class OdsTollEnpassDataServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + return count(queryWrapper); + } + /** * 计算交通统计数据 diff --git a/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java index a91c62c0..9b4bcea5 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java @@ -91,6 +91,16 @@ public class OdsTollEtctuDataImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + return count(queryWrapper); + } + /** * 计算交通统计数据 * diff --git a/zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java index 8e49bf15..31f7dfa2 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java @@ -93,6 +93,16 @@ public class OdsTollExpassDataServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + return count(queryWrapper); + } + /** * 计算交通统计数据 * From 4f8d43f5c8cfc6b2ae1ec53863818efc9481d38b Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 24 May 2024 20:10:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=84=9F=E7=9F=A5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/DcWarningController.java | 12 +++++++++++- .../java/com/zc/business/mapper/DcWarningMapper.java | 5 +++++ .../com/zc/business/service/IDcWarningService.java | 5 +++++ .../business/service/impl/DcWarningServiceImpl.java | 10 ++++++++++ .../resources/mapper/business/DcWarningMapper.xml | 4 ++++ 5 files changed, 35 insertions(+), 1 deletion(-) 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 74cc2479..453032b0 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 @@ -31,7 +31,7 @@ import java.util.List; /** * 预警信息Controller - * + * * @author ruoyi * @date 2024-01-26 */ @@ -49,6 +49,16 @@ public class DcWarningController extends BaseController IDcWarningService ben = SpringUtils.getBean(IDcWarningService.class); ben.updateEndSection(); } + + /** + * 感知事件数据统计 + */ + @ApiOperation("感知事件数据统计") + @GetMapping("/countNumber") + public AjaxResult dcWarningCountNumber() { + return AjaxResult.success(dcWarningService.dcWarningCountNumber()); + } + /** * 查询预警信息列表 */ 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 7f07269b..9b1dc3be 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 @@ -21,6 +21,11 @@ import org.springframework.security.core.parameters.P; */ public interface DcWarningMapper { + /** + * 感知事件统计 + */ + int dcWarningCountNumber(); + /** * 查询预警信息 * 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 2200db6f..8e5ea04f 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 @@ -19,6 +19,11 @@ import org.springframework.web.bind.annotation.RequestBody; */ public interface IDcWarningService { + /** + * 感知事件数据统计 + */ + int dcWarningCountNumber(); + /** * 查询预警信息 * 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 0aaeb2d9..070178f9 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 @@ -64,6 +64,16 @@ public class DcWarningServiceImpl implements IDcWarningService private static final String WARNINGSTRATEGY = "warningStrategy";//redis策略缓存的key private static final String WARNINGDATA = "warningData:";//redis事件缓存的key private static String JUDGE = "1"; //自定义判断参数,1为满足0为不满足 + + /** + * 感知事件数据统计 + * @return + */ + @Override + public int dcWarningCountNumber() { + return dcWarningMapper.dcWarningCountNumber(); + } + /** * 查询预警信息 * diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index bb0fa037..2eb3d51a 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -66,6 +66,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + +