From 98ce01b3646fca4cf30bdaadb994bbbfa6c1e9c1 Mon Sep 17 00:00:00 2001 From: sonjinyon <2476687577@qq.com> Date: Tue, 20 Aug 2024 16:31:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E8=BD=A6=EF=BC=8C=E4=B8=B4=E6=97=B6=E8=BD=A6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/vehicleaccess/VehicleAccessApi.java | 18 ++++++++++++++++++ .../vehicleaccess/vo/ParkingLotDataVO.java | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/VehicleAccessApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/VehicleAccessApi.java index 0fceb00dc..eda80f381 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/VehicleAccessApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/VehicleAccessApi.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess; import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.AreaDataVO; +import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.EntryRecordVo; import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.ParkingLotDataVO; import cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo.RevenueVO; import cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess.*; @@ -20,6 +21,7 @@ import java.math.RoundingMode; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -94,6 +96,22 @@ public class VehicleAccessApi { LocalDateTime endOfDay = LocalDateTime.of(today, LocalTime.MAX); List entryRecords = entryRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay); parkingLotDataVO.setIntoNum(entryRecords.size());//车辆进入数 + //固定车临时车 + int temporaryCar = 0; + int fixationCar = 0; + for (int i = 0; i < entryRecords.size(); i++) { + for (int j = 0; j < entryRecords.get(i).getDatas().size(); j++) { + EntryRecordVo entryRecordVo = entryRecords.get(i).getDatas().get(j); + if (entryRecordVo.getCarType().equals("临时车")){ + temporaryCar ++ ; + } + if (entryRecordVo.getCarType().equals("固定车")){ + fixationCar ++ ; + } + } + } + parkingLotDataVO.setTemporaryCar(temporaryCar); + parkingLotDataVO.setFixationCar(fixationCar); List appearanceRecords = appearanceRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay); parkingLotDataVO.setOutNum(appearanceRecords.size());//车辆出入数 diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/ParkingLotDataVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/ParkingLotDataVO.java index a011bb715..3fc642de0 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/ParkingLotDataVO.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/ParkingLotDataVO.java @@ -33,6 +33,12 @@ public class ParkingLotDataVO { //总利用率 private Double useRatio; + //临时车数量 + private int temporaryCar; + + //固定车数量 + private int fixationCar; + //区域停车场数据集合 private List areaDataVOList = new ArrayList<>(); -- 2.45.2 From c3627245e83a3ebf0eea24ec5abc9af08635657d Mon Sep 17 00:00:00 2001 From: sonjinyon <2476687577@qq.com> Date: Tue, 20 Aug 2024 16:53:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E8=BD=A6=EF=BC=8C=E4=B8=B4=E6=97=B6=E8=BD=A6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/parking/ParkingServerApplication.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java index 080d346a7..09b0f5473 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java @@ -10,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication //@MapperScan("cn.iocoder.yudao.module.parking.dal.mysql.channelinformation.ChannelInformationMapper") public class ParkingServerApplication { + //测试 public static void main(String[] args) { SpringApplication.run(ParkingServerApplication.class, args); -- 2.45.2 From 1769cb09d777783c76d873ec724df82d100be1c3 Mon Sep 17 00:00:00 2001 From: sonjinyon <2476687577@qq.com> Date: Tue, 20 Aug 2024 16:59:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parking/service/warning/WarningServiceImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java index 4e7c198ae..4bb918917 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java @@ -48,6 +48,14 @@ public class WarningServiceImpl implements WarningService { warningMapper.updateById(updateObj); } + //public void updateWarning(WarningSaveReqVO updateReqVO) { + // // 校验存在 + // validateWarningExists(updateReqVO.getId()); + // // 更新 + // WarningDO updateObj = BeanUtils.toBean(updateReqVO, WarningDO.class); + // warningMapper.updateById(updateObj); + // } + @Override public void deleteWarning(String id) { // 校验存在 -- 2.45.2