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 7737a2b30..0fceb00dc 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 @@ -16,11 +16,13 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.math.BigDecimal; +import java.math.RoundingMode; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.List; import java.util.Optional; + @Tag(name = "大屏服务 - 停车场接口") @RestController @RequestMapping("/datacenter/h5/vehicleAccess") @@ -45,7 +47,7 @@ public class VehicleAccessApi { RevenueRepository revenueRepository; @GetMapping("/list") - public ResponseVO list(){ + public ResponseVO list() { // 获取今天的日期 LocalDate today = LocalDate.now(); LocalDateTime startOfDay = LocalDateTime.of(today, LocalTime.MIN); @@ -61,13 +63,13 @@ public class VehicleAccessApi { revenue.setPlate("京A 88888"); revenueRepository.insert(revenue); - return ResponseVO.success(200,"添加成功",null,0); + return ResponseVO.success(200, "添加成功", null, 0); } //获取实时车辆进出数据和今日车位统计 @GetMapping("/parkingLotData") - public ResponseVO parkAndVacancy(){ + public ResponseVO parkAndVacancy() { //时间最新的一条数据 @@ -79,7 +81,7 @@ public class VehicleAccessApi { ParkingLotDataVO parkingLotDataVO = new ParkingLotDataVO(); int parkingNum = heartbeat.getSpaceCount() - heartbeat.getFreeSpaceCount(); - int residualStopNum = heartbeat.getSpaceCount() - parkingNum ; + int residualStopNum = heartbeat.getSpaceCount() - parkingNum; //车辆进出实时数据 parkingLotDataVO.setParkingNum(parkingNum);//实时停车数 @@ -99,28 +101,28 @@ public class VehicleAccessApi { parkingLotDataVO.setTotalParkingSpace(heartbeat.getSpaceCount());//车位总数 parkingLotDataVO.setResidualTotal(residualStopNum);//余位总数 // 计算利用率 - int useRatio = (parkingNum / residualStopNum) * 100; + Double useRatio = Math.round(((parkingNum * 1.0 / heartbeat.getSpaceCount()) * 10000)) / 100.0; parkingLotDataVO.setUseRatio(useRatio);//总利用率 - //设置区域停车场数据 for (int i = 0; i < heartbeat.getAreaList().size(); i++) { AreaDataVO areaDataVO = new AreaDataVO(); areaDataVO.setAreaName(heartbeat.getAreaList().get(i).getAreaName()); areaDataVO.setParkingCount(heartbeat.getAreaList().get(i).getSpaceCount()); areaDataVO.setLastSpaceCount(heartbeat.getAreaList().get(i).getLastSpaceCount()); - areaDataVO.setUseRatio((heartbeat.getAreaList().get(i).getLastSpaceCount() / heartbeat.getAreaList().get(i).getSpaceCount()) * 100); + // 计算利用率 + areaDataVO.setUseRatio(Math.round((heartbeat.getAreaList().get(i).getLastSpaceCount() * 1.0 / heartbeat.getAreaList().get(i).getSpaceCount()) * 10000) / 100.0); parkingLotDataVO.getAreaDataVOList().add(areaDataVO); } - return ResponseVO.success(200,"",parkingLotDataVO,0); + return ResponseVO.success(200, "", parkingLotDataVO, 0); } - return ResponseVO.error(500,""); + return ResponseVO.error(500, ""); } //车辆进出趋势数据 @GetMapping("/tendencyChart") - public ResponseVO tendencyChart(){ + public ResponseVO tendencyChart() { ParkingLotDataVO parkingLotDataVO = new ParkingLotDataVO(); @@ -156,27 +158,27 @@ public class VehicleAccessApi { for (int i = 0; i < entryRecordList.size(); i++) { EntryRecord entryRecord = entryRecordList.get(i); - if (entryRecord.getCreateTime().isAfter(startTime1) && entryRecord.getCreateTime().isBefore(endTime1)){ + if (entryRecord.getCreateTime().isAfter(startTime1) && entryRecord.getCreateTime().isBefore(endTime1)) { count1++; continue; } - if (entryRecord.getCreateTime().isAfter(startTime2) && entryRecord.getCreateTime().isBefore(endTime2)){ + if (entryRecord.getCreateTime().isAfter(startTime2) && entryRecord.getCreateTime().isBefore(endTime2)) { count2++; continue; } - if (entryRecord.getCreateTime().isAfter(startTime3) && entryRecord.getCreateTime().isBefore(endTime3)){ + if (entryRecord.getCreateTime().isAfter(startTime3) && entryRecord.getCreateTime().isBefore(endTime3)) { count3++; continue; } - if (entryRecord.getCreateTime().isAfter(startTime4) && entryRecord.getCreateTime().isBefore(endTime4)){ + if (entryRecord.getCreateTime().isAfter(startTime4) && entryRecord.getCreateTime().isBefore(endTime4)) { count4++; continue; } - if (entryRecord.getCreateTime().isAfter(startTime5) && entryRecord.getCreateTime().isBefore(endTime5)){ + if (entryRecord.getCreateTime().isAfter(startTime5) && entryRecord.getCreateTime().isBefore(endTime5)) { count5++; continue; } - if (entryRecord.getCreateTime().isAfter(startTime6) && entryRecord.getCreateTime().isBefore(endTime6)){ + if (entryRecord.getCreateTime().isAfter(startTime6) && entryRecord.getCreateTime().isBefore(endTime6)) { count6++; } } @@ -198,27 +200,27 @@ public class VehicleAccessApi { for (int i = 0; i < appearanceRecordList.size(); i++) { AppearanceRecord appearanceRecord = appearanceRecordList.get(i); - if (appearanceRecord.getCreateTime().isAfter(startTime1) && appearanceRecord.getCreateTime().isBefore(endTime1)){ + if (appearanceRecord.getCreateTime().isAfter(startTime1) && appearanceRecord.getCreateTime().isBefore(endTime1)) { count1++; continue; } - if (appearanceRecord.getCreateTime().isAfter(startTime2) && appearanceRecord.getCreateTime().isBefore(endTime2)){ + if (appearanceRecord.getCreateTime().isAfter(startTime2) && appearanceRecord.getCreateTime().isBefore(endTime2)) { count2++; continue; } - if (appearanceRecord.getCreateTime().isAfter(startTime3) && appearanceRecord.getCreateTime().isBefore(endTime3)){ + if (appearanceRecord.getCreateTime().isAfter(startTime3) && appearanceRecord.getCreateTime().isBefore(endTime3)) { count3++; continue; } - if (appearanceRecord.getCreateTime().isAfter(startTime4) && appearanceRecord.getCreateTime().isBefore(endTime4)){ + if (appearanceRecord.getCreateTime().isAfter(startTime4) && appearanceRecord.getCreateTime().isBefore(endTime4)) { count4++; continue; } - if (appearanceRecord.getCreateTime().isAfter(startTime5) && appearanceRecord.getCreateTime().isBefore(endTime5)){ + if (appearanceRecord.getCreateTime().isAfter(startTime5) && appearanceRecord.getCreateTime().isBefore(endTime5)) { count5++; continue; } - if (appearanceRecord.getCreateTime().isAfter(startTime6) && appearanceRecord.getCreateTime().isBefore(endTime6)){ + if (appearanceRecord.getCreateTime().isAfter(startTime6) && appearanceRecord.getCreateTime().isBefore(endTime6)) { count6++; } } @@ -230,13 +232,13 @@ public class VehicleAccessApi { parkingLotDataVO.getOutCount().add(count5); parkingLotDataVO.getOutCount().add(count6); - return ResponseVO.success(200,"",parkingLotDataVO,0); + return ResponseVO.success(200, "", parkingLotDataVO, 0); } //车辆出入实时记录图 @GetMapping("/recordOfAccess") - public ResponseVO recordOfAccess(int page){ + public ResponseVO recordOfAccess(int page) { // 获取今天的日期 LocalDate today = LocalDate.now(); @@ -249,13 +251,13 @@ public class VehicleAccessApi { Pageable pageable = PageRequest.of(page, 4); // Page recordOfAccessList = vehicleRecordRepository.findByCreateTimeBetweenOrderByCreateTimeAsc(startOfDay, endOfDay, pageable); Page recordOfAccessList = vehicleRecordRepository.findAll(pageable); // TODO 暂时获取全部数据分页 - return ResponseVO.success(200,"",recordOfAccessList,total); + return ResponseVO.success(200, "", recordOfAccessList, total); } //车辆营收统计 @GetMapping("/revenue") - public ResponseVO revenue(String date,String areaName){ + public ResponseVO revenue(String date, String areaName) { List revenueList; @@ -263,25 +265,25 @@ public class VehicleAccessApi { LocalDateTime endOfDay = null; - if (date.equals("今日")){ + if (date.equals("今日")) { // 获取今天的日期 LocalDate today = LocalDate.now(); startOfDay = LocalDateTime.of(today, LocalTime.MIN); endOfDay = LocalDateTime.of(today, LocalTime.MAX); } - if (date.equals("近一周")){ + if (date.equals("近一周")) { endOfDay = LocalDateTime.now(); // 结束时间为当前时间 startOfDay = endOfDay.minusDays(7); // 开始时间为当前时间的前7天 } - if (date.equals("近一月")){ + if (date.equals("近一月")) { endOfDay = LocalDateTime.now(); // 结束时间为当前时间 startOfDay = endOfDay.minusMonths(1); // 开始时间为当前时间的前一个月 } - if (areaName.equals("全部")){ + if (areaName.equals("全部")) { revenueList = revenueRepository.findByCreateTimeBetween(startOfDay, endOfDay); - }else { + } else { revenueList = revenueRepository.findByCreateTimeAndAreaName(startOfDay, endOfDay, areaName); } @@ -297,15 +299,15 @@ public class VehicleAccessApi { for (int i = 0; i < revenueList.size(); i++) { Revenue revenue = revenueList.get(i); BigDecimal charge = new BigDecimal(revenue.getPayCharge()); - if (revenue.getPayKind().equals("现金")){ + if (revenue.getPayKind().equals("现金")) { xj = xj.add(charge); - } else if (revenue.getPayKind().equals("微信")){ + } else if (revenue.getPayKind().equals("微信")) { wx = wx.add(charge); - } else if (revenue.getPayKind().equals("支付宝")){ + } else if (revenue.getPayKind().equals("支付宝")) { zfb = zfb.add(charge); - } else if (revenue.getPayKind().equals("银联")){ + } else if (revenue.getPayKind().equals("银联")) { yl = yl.add(charge); - } else if (revenue.getPayKind().equals("公交卡")){ + } else if (revenue.getPayKind().equals("公交卡")) { gjk = gjk.add(charge); } } @@ -322,18 +324,15 @@ public class VehicleAccessApi { revenueVO.setZfb(zfb); - - return ResponseVO.success(200,"",revenueVO ,0); + return ResponseVO.success(200, "", revenueVO, 0); } //预警信息栏 @GetMapping("/warning_information_bar") - public ResponseVO warningInformation(){ - return ResponseVO.success(200,"今日实时客流人数125,同比上月实时人数提升12%。今日车辆数量135,同比上月实时人数提升13%。今日沿海阵风3级.....",null ,0); + public ResponseVO warningInformation() { + return ResponseVO.success(200, "今日实时客流人数125,同比上月实时人数提升12%。今日车辆数量135,同比上月实时人数提升13%。今日沿海阵风3级.....", null, 0); } - - } diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/AreaDataVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/AreaDataVO.java index ccc93005a..6fd9ccc14 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/AreaDataVO.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/vehicleaccess/vo/AreaDataVO.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo; import lombok.Data; +import java.math.BigDecimal; + @Data public class AreaDataVO { @@ -15,5 +17,5 @@ public class AreaDataVO { private int lastSpaceCount; //区域利用率 - private int useRatio; + private Double useRatio; } 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 39765355a..a011bb715 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 @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.datacenter.controller.admin.vehicleaccess.vo; import lombok.Data; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -30,7 +31,7 @@ public class ParkingLotDataVO { private int residualTotal; //总利用率 - private int useRatio; + private Double useRatio; //区域停车场数据集合 private List areaDataVOList = new ArrayList<>(); diff --git a/ludu-module-parking/ludu-module-parking-api/src/main/java/cn/iocoder/yudao/module/parking/enums/ErrorCodeConstants.java b/ludu-module-parking/ludu-module-parking-api/src/main/java/cn/iocoder/yudao/module/parking/enums/ErrorCodeConstants.java index d89111bf5..3d6b18260 100644 --- a/ludu-module-parking/ludu-module-parking-api/src/main/java/cn/iocoder/yudao/module/parking/enums/ErrorCodeConstants.java +++ b/ludu-module-parking/ludu-module-parking-api/src/main/java/cn/iocoder/yudao/module/parking/enums/ErrorCodeConstants.java @@ -16,4 +16,7 @@ public interface ErrorCodeConstants { ErrorCode PARK_NOT_EXISTS = new ErrorCode(1_005_001_027, "场库列表不存在"); // ========== 区域列表 1_005_001_028 ========== ErrorCode AREA_NOT_EXISTS = new ErrorCode(1_005_001_028, "区域列表不存在"); + ErrorCode VEHICLE_RENEWAL_RECORD_NOT_EXISTS = new ErrorCode(22222, "固定车续费记录不存在"); + ErrorCode WARNING_NOT_EXISTS = new ErrorCode(33333, "告警记录不存在"); + ErrorCode WHITE_NOT_EXISTS = new ErrorCode(444444, "白名单管理不存在"); } diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/PassagewayController.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/PassagewayController.java index 919ba6a10..f76d23618 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/PassagewayController.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/PassagewayController.java @@ -38,16 +38,15 @@ public class PassagewayController { @Resource private PassagewayService passagewayService; - @PostMapping("/passagewayUpload") - public BlueCardResult passagewayUpload(@RequestBody PassagewayReqDataVO passagewayReqDataVO){ + + @PostMapping("/insertPassageway") + public BlueCardResult insertPassageway(@RequestBody PassagewayReqDataVO passagewayReqDataVO){ return passagewayService.passagewayUpload(passagewayReqDataVO); } - - @PostMapping("/create") @Operation(summary = "创建通道信息") @PreAuthorize("@ss.hasPermission('parking:passageway:create')") - public CommonResult createPassageway(@Valid @RequestBody PassagewaySaveReqVO createReqVO) { + public CommonResult createPassageway(@Valid @RequestBody PassagewaySaveReqVO createReqVO) { return success(passagewayService.createPassageway(createReqVO)); } @@ -63,7 +62,7 @@ public class PassagewayController { @Operation(summary = "删除通道信息") @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('parking:passageway:delete')") - public CommonResult deletePassageway(@RequestParam("id") String id) { + public CommonResult deletePassageway(@RequestParam("id") Long id) { passagewayService.deletePassageway(id); return success(true); } @@ -72,7 +71,7 @@ public class PassagewayController { @Operation(summary = "获得通道信息") @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('parking:passageway:query')") - public CommonResult getPassageway(@RequestParam("id") String id) { + public CommonResult getPassageway(@RequestParam("id") Long id) { PassagewayDO passageway = passagewayService.getPassageway(id); return success(BeanUtils.toBean(passageway, PassagewayRespVO.class)); } @@ -90,12 +89,12 @@ public class PassagewayController { @PreAuthorize("@ss.hasPermission('parking:passageway:export')") @ApiAccessLog(operateType = EXPORT) public void exportPassagewayExcel(@Valid PassagewayPageReqVO pageReqVO, - HttpServletResponse response) throws IOException { + HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = passagewayService.getPassagewayPage(pageReqVO).getList(); // 导出 Excel ExcelUtils.write(response, "通道信息.xls", "数据", PassagewayRespVO.class, - BeanUtils.toBean(list, PassagewayRespVO.class)); + BeanUtils.toBean(list, PassagewayRespVO.class)); } } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayPageReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayPageReqVO.java index b9c284ede..04aa086ef 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayPageReqVO.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayPageReqVO.java @@ -14,6 +14,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PassagewayPageReqVO extends PageParam { + @Schema(description = "通道 Id", example = "4961") + private String passagewayId; @Schema(description = "场库编号") private String parkNumber; diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayRespVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayRespVO.java index 6fc934cf8..2a0c39189 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayRespVO.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewayRespVO.java @@ -12,6 +12,9 @@ import com.alibaba.excel.annotation.*; @Data @ExcelIgnoreUnannotated public class PassagewayRespVO { + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9494") + @ExcelProperty("id") + private Long id; @Schema(description = "通道 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7099") @ExcelProperty("通道 Id") diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewaySaveReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewaySaveReqVO.java index 95988e110..d5d37ad70 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewaySaveReqVO.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/passageway/vo/PassagewaySaveReqVO.java @@ -8,7 +8,8 @@ import javax.validation.constraints.*; @Schema(description = "管理后台 - 通道信息新增/修改 Request VO") @Data public class PassagewaySaveReqVO { - + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9494") + private Long id; @Schema(description = "通道 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7099") private String passagewayId; diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/VehicleRenewalRecordController.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/VehicleRenewalRecordController.java new file mode 100644 index 000000000..4e3eebe2b --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/VehicleRenewalRecordController.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord; + +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord.VehicleRenewalRecordDO; +import cn.iocoder.yudao.module.parking.service.vehiclerenewalrecord.VehicleRenewalRecordService; + +@Tag(name = "管理后台 - 固定车续费记录") +@RestController +@RequestMapping("/parking/vehicle-renewal-record") +@Validated +public class VehicleRenewalRecordController { + + @Resource + private VehicleRenewalRecordService vehicleRenewalRecordService; + + /** + * 固定车续费记录上传 + * @param vehicleRenewalRecordDO + * @return + */ + @PostMapping("/UpRenewalRecord") + public BlueCardResult UpRenewalRecord(@RequestBody VehicleRenewalRecordDO vehicleRenewalRecordDO) { + VehicleRenewalRecordDO vehicleRenewalRecordDOs = new VehicleRenewalRecordDO(); + VehicleRenewalRecordDO datas = vehicleRenewalRecordDO.getDatas().get(0); + vehicleRenewalRecordDOs.setParkNumber(vehicleRenewalRecordDO.getParkNumber()); + vehicleRenewalRecordDOs.setMethod(vehicleRenewalRecordDO.getMethod()); + vehicleRenewalRecordDOs.setPlate(datas.getPlate()); + vehicleRenewalRecordDOs.setCarGroupName(datas.getCarGroupName()); + vehicleRenewalRecordDOs.setPayTime(datas.getPayTime()); + vehicleRenewalRecordDOs.setPayCharge(datas.getPayCharge()); + vehicleRenewalRecordDOs.setNumber(datas.getNumber()); + vehicleRenewalRecordDOs.setFeeMonth(datas.getFeeMonth()); + vehicleRenewalRecordDOs.setEnd(datas.getEnd()); +// vehicleRenewalRecordDOs.setPlaceFeeOrderRecId + vehicleRenewalRecordDO.setCarOwnerName(datas.getCarOwnerName()); + vehicleRenewalRecordDOs.setPayType(datas.getPayType()); + vehicleRenewalRecordDOs.setOrderNo(datas.getOrderNo()); + return vehicleRenewalRecordService.UpRenewalRecord(vehicleRenewalRecordDOs); + } + + @PostMapping("/create") + @Operation(summary = "创建固定车续费记录") + @PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:create')") + public CommonResult createVehicleRenewalRecord(@Valid @RequestBody VehicleRenewalRecordSaveReqVO createReqVO) { + return success(vehicleRenewalRecordService.createVehicleRenewalRecord(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新固定车续费记录") + @PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:update')") + public CommonResult updateVehicleRenewalRecord(@Valid @RequestBody VehicleRenewalRecordSaveReqVO updateReqVO) { + vehicleRenewalRecordService.updateVehicleRenewalRecord(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除固定车续费记录") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:delete')") + public CommonResult deleteVehicleRenewalRecord(@RequestParam("id") String id) { + vehicleRenewalRecordService.deleteVehicleRenewalRecord(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得固定车续费记录") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:query')") + public CommonResult getVehicleRenewalRecord(@RequestParam("id") String id) { + VehicleRenewalRecordDO vehicleRenewalRecord = vehicleRenewalRecordService.getVehicleRenewalRecord(id); + return success(BeanUtils.toBean(vehicleRenewalRecord, VehicleRenewalRecordRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得固定车续费记录分页") + @PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:query')") + public CommonResult> getVehicleRenewalRecordPage(@Valid VehicleRenewalRecordPageReqVO pageReqVO) { + PageResult pageResult = vehicleRenewalRecordService.getVehicleRenewalRecordPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, VehicleRenewalRecordRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出固定车续费记录 Excel") + @PreAuthorize("@ss.hasPermission('parking:vehicle-renewal-record:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportVehicleRenewalRecordExcel(@Valid VehicleRenewalRecordPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = vehicleRenewalRecordService.getVehicleRenewalRecordPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "固定车续费记录.xls", "数据", VehicleRenewalRecordRespVO.class, + BeanUtils.toBean(list, VehicleRenewalRecordRespVO.class)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordPageReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordPageReqVO.java new file mode 100644 index 000000000..b85b7dc7d --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordPageReqVO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 固定车续费记录分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class VehicleRenewalRecordPageReqVO extends PageParam { + + @Schema(description = "场库编号") + private String parkNumber; + + @Schema(description = "接口名称") + private String method; + + @Schema(description = "车牌") + private String plate; + + @Schema(description = "固定车组名称", example = "张三") + private String carGroupName; + + @Schema(description = "支付时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] payTime; + + @Schema(description = "续费金额") + private String payCharge; + + @Schema(description = "车位号") + private Integer number; + + @Schema(description = "续费时长") + private String feeMonth; + + @Schema(description = "过期日期") + private String end; + + @Schema(description = "车主名称", example = "李四") + private String carOwnerName; + + @Schema(description = "支付类型", example = "1") + private String payType; + + @Schema(description = "支付流水号") + private String orderNo; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordRespVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordRespVO.java new file mode 100644 index 000000000..43023dc5d --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordRespVO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; + +@Schema(description = "管理后台 - 固定车续费记录 Response VO") +@Data +@ExcelIgnoreUnannotated +public class VehicleRenewalRecordRespVO { + + @Schema(description = "续费订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24242") + @ExcelProperty("续费订单号") + private String id; + + @Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("场库编号") + private String parkNumber; + + @Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("接口名称") + private String method; + + @Schema(description = "车牌", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车牌") + private String plate; + + @Schema(description = "固定车组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("固定车组名称") + private String carGroupName; + + @Schema(description = "支付时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("支付时间") + private String payTime; + + @Schema(description = "续费金额", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("续费金额") + private String payCharge; + + @Schema(description = "车位号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车位号") + private Integer number; + + @Schema(description = "续费时长", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("续费时长") + private String feeMonth; + + @Schema(description = "过期日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("过期日期") + private String end; + + @Schema(description = "车主名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("车主名称") + private String carOwnerName; + + @Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty(value = "支付类型", converter = DictConvert.class) + @DictFormat("pay_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 + private String payType; + + @Schema(description = "支付流水号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("支付流水号") + private String orderNo; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordSaveReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordSaveReqVO.java new file mode 100644 index 000000000..0d6a3a413 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/vehiclerenewalrecord/vo/VehicleRenewalRecordSaveReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 固定车续费记录新增/修改 Request VO") +@Data +public class VehicleRenewalRecordSaveReqVO { + + @Schema(description = "续费订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24242") + private String id; + + @Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "场库编号不能为空") + private String parkNumber; + + @Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "接口名称不能为空") + private String method; + + @Schema(description = "车牌", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "车牌不能为空") + private String plate; + + @Schema(description = "固定车组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "固定车组名称不能为空") + private String carGroupName; + + @Schema(description = "支付时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "支付时间不能为空") + private String payTime; + + @Schema(description = "续费金额", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "续费金额不能为空") + private String payCharge; + + @Schema(description = "车位号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "车位号不能为空") + private Integer number; + + @Schema(description = "续费时长", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "续费时长不能为空") + private String feeMonth; + + @Schema(description = "过期日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "过期日期不能为空") + private String end; + + @Schema(description = "车主名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "车主名称不能为空") + private String carOwnerName; + + @Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "支付类型不能为空") + private String payType; + + @Schema(description = "支付流水号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "支付流水号不能为空") + private String orderNo; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/WarningController.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/WarningController.java new file mode 100644 index 000000000..024cba3f3 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/WarningController.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.parking.controller.admin.warning; + +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.parking.controller.admin.warning.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.warning.WarningDO; +import cn.iocoder.yudao.module.parking.service.warning.WarningService; + +@Tag(name = "管理后台 - 告警记录") +@RestController +@RequestMapping("/parking/warning") +@Validated +public class WarningController { + + @Resource + private WarningService warningService; + + /** + * 设备告警信息上传 + * @param + * @return + */ + @PostMapping("/upWarning") + public BlueCardResult upWarning(@RequestBody WarningDO warningDO) { + WarningDO warningDOs = new WarningDO(); + warningDOs.setParkNumber(warningDO.getParkNumber()); +// warningDOs.setmethod + WarningDO datas = warningDO.getDatas().get(0); + warningDOs.setAreaCode(datas.getAreaCode()); + warningDOs.setPortCode(datas.getPortCode()); + warningDOs.setObjectId(datas.getObjectId()); + warningDOs.setObjectName(datas.getObjectName()); + warningDOs.setObjectCode(datas.getObjectCode()); + warningDOs.setObjectType(datas.getObjectType()); + warningDOs.setWarningTime(datas.getWarningTime()); + warningDOs.setReportTime(datas.getReportTime()); + warningDOs.setWarningType(datas.getWarningType()); + warningDOs.setWarningDetail(datas.getWarningDetail()); + return warningService.upWarning(warningDOs); + } + + + @PostMapping("/create") + @Operation(summary = "创建告警记录") + @PreAuthorize("@ss.hasPermission('parking:warning:create')") + public CommonResult createWarning(@Valid @RequestBody WarningSaveReqVO createReqVO) { + return success(warningService.createWarning(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新告警记录") + @PreAuthorize("@ss.hasPermission('parking:warning:update')") + public CommonResult updateWarning(@Valid @RequestBody WarningSaveReqVO updateReqVO) { + warningService.updateWarning(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除告警记录") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('parking:warning:delete')") + public CommonResult deleteWarning(@RequestParam("id") String id) { + warningService.deleteWarning(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得告警记录") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('parking:warning:query')") + public CommonResult getWarning(@RequestParam("id") String id) { + WarningDO warning = warningService.getWarning(id); + return success(BeanUtils.toBean(warning, WarningRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得告警记录分页") + @PreAuthorize("@ss.hasPermission('parking:warning:query')") + public CommonResult> getWarningPage(@Valid WarningPageReqVO pageReqVO) { + PageResult pageResult = warningService.getWarningPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, WarningRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出告警记录 Excel") + @PreAuthorize("@ss.hasPermission('parking:warning:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportWarningExcel(@Valid WarningPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = warningService.getWarningPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "告警记录.xls", "数据", WarningRespVO.class, + BeanUtils.toBean(list, WarningRespVO.class)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningPageReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningPageReqVO.java new file mode 100644 index 000000000..ddd0e0fba --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningPageReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.parking.controller.admin.warning.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 告警记录分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WarningPageReqVO extends PageParam { + + @Schema(description = "场库编号") + private String parkNumber; + + @Schema(description = "停车区域 ") + private String areaCode; + + @Schema(description = "车位编码") + private String portCode; + + @Schema(description = "告警对象 Id", example = "31270") + private String objectId; + + @Schema(description = "告警对象编码") + private String objectCode; + + @Schema(description = "告警对象名称", example = "芋艿") + private String objectName; + + @Schema(description = "告警对象类型", example = "1") + private String objectType; + + @Schema(description = "告警时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] warningTime; + + @Schema(description = "上报时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] reportTime; + + @Schema(description = "告警类型", example = "1") + private String warningType; + + @Schema(description = "告警详情") + private String warningDetail; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningRespVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningRespVO.java new file mode 100644 index 000000000..1ce821096 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningRespVO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.parking.controller.admin.warning.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; + +@Schema(description = "管理后台 - 告警记录 Response VO") +@Data +@ExcelIgnoreUnannotated +public class WarningRespVO { + + @Schema(description = "表自增 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21274") + @ExcelProperty("表自增 id") + private String id; + + @Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("场库编号") + private String parkNumber; + + @Schema(description = "停车区域 ") + @ExcelProperty("停车区域 ") + private String areaCode; + + @Schema(description = "车位编码") + @ExcelProperty("车位编码") + private String portCode; + + @Schema(description = "告警对象 Id", example = "31270") + @ExcelProperty("告警对象 Id") + private String objectId; + + @Schema(description = "告警对象编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("告警对象编码") + private String objectCode; + + @Schema(description = "告警对象名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("告警对象名称") + private String objectName; + + @Schema(description = "告警对象类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty(value = "告警对象类型", converter = DictConvert.class) + @DictFormat("object_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 + private String objectType; + + @Schema(description = "告警时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("告警时间") + private String warningTime; + + @Schema(description = "上报时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("上报时间") + private String reportTime; + + @Schema(description = "告警类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty(value = "告警类型", converter = DictConvert.class) + @DictFormat("warning_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 + private String warningType; + + @Schema(description = "告警详情") + @ExcelProperty("告警详情") + private String warningDetail; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningSaveReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningSaveReqVO.java new file mode 100644 index 000000000..e2ce92b2b --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/warning/vo/WarningSaveReqVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.parking.controller.admin.warning.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 告警记录新增/修改 Request VO") +@Data +public class WarningSaveReqVO { + + @Schema(description = "表自增 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21274") + private String id; + + @Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "场库编号不能为空") + private String parkNumber; + + @Schema(description = "停车区域 ") + private String areaCode; + + @Schema(description = "车位编码") + private String portCode; + + @Schema(description = "告警对象 Id", example = "31270") + private String objectId; + + @Schema(description = "告警对象编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "告警对象编码不能为空") + private String objectCode; + + @Schema(description = "告警对象名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "告警对象名称不能为空") + private String objectName; + + @Schema(description = "告警对象类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "告警对象类型不能为空") + private String objectType; + + @Schema(description = "告警时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "告警时间不能为空") + private String warningTime; + + @Schema(description = "上报时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "上报时间不能为空") + private String reportTime; + + @Schema(description = "告警类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "告警类型不能为空") + private String warningType; + + @Schema(description = "告警详情") + private String warningDetail; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/WhiteController.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/WhiteController.java new file mode 100644 index 000000000..b180e3e5b --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/WhiteController.java @@ -0,0 +1,109 @@ +package cn.iocoder.yudao.module.parking.controller.admin.white; + +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO; +import cn.iocoder.yudao.module.parking.service.white.WhiteService; + +@Tag(name = "管理后台 - 白名单管理") +@RestController +@RequestMapping("/parking/white") +@Validated +public class WhiteController { + + @Resource + private WhiteService whiteService; + + + /** + * 同步白名单信息 + * @param + * @return + */ + @PostMapping("/upWhite") + public BlueCardResult upWhite(@RequestBody WhiteUtilDO whiteUtilDO) { + + return whiteService.upWhite(whiteUtilDO); + } + + + @PostMapping("/create") + @Operation(summary = "创建白名单管理") + @PreAuthorize("@ss.hasPermission('parking:white:create')") + public CommonResult createWhite(@Valid @RequestBody WhiteSaveReqVO createReqVO) { + return success(whiteService.createWhite(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新白名单管理") + @PreAuthorize("@ss.hasPermission('parking:white:update')") + public CommonResult updateWhite(@Valid @RequestBody WhiteSaveReqVO updateReqVO) { + whiteService.updateWhite(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除白名单管理") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('parking:white:delete')") + public CommonResult deleteWhite(@RequestParam("id") Integer id) { + whiteService.deleteWhite(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得白名单管理") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('parking:white:query')") + public CommonResult getWhite(@RequestParam("id") Integer id) { + WhiteDO white = whiteService.getWhite(id); + return success(BeanUtils.toBean(white, WhiteRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得白名单管理分页") + @PreAuthorize("@ss.hasPermission('parking:white:query')") + public CommonResult> getWhitePage(@Valid WhitePageReqVO pageReqVO) { + PageResult pageResult = whiteService.getWhitePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, WhiteRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出白名单管理 Excel") + @PreAuthorize("@ss.hasPermission('parking:white:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportWhiteExcel(@Valid WhitePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = whiteService.getWhitePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "白名单管理.xls", "数据", WhiteRespVO.class, + BeanUtils.toBean(list, WhiteRespVO.class)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteDatasDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteDatasDO.java new file mode 100644 index 000000000..b0927143f --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteDatasDO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.parking.controller.admin.white.vo; + +import cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity.AreasAndValidityDO; +import lombok.Data; + +import java.util.List; +@Data +public class WhiteDatasDO { + private String plate; + private Integer fixedId; + private String chargeType; + private String name; + private String certificate; + private String address; + private String phone; + private String plateColor; + private String start; + private String end; + private String dept; + private String carType; + private String memo; + private String timeStamp; + private String source; + private List areasAndValidity; +} diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhitePageReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhitePageReqVO.java new file mode 100644 index 000000000..5a6757a21 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhitePageReqVO.java @@ -0,0 +1,49 @@ +package cn.iocoder.yudao.module.parking.controller.admin.white.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 白名单管理分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WhitePageReqVO extends PageParam { + + @Schema(description = "场库编号") + private String parkNumber; + + @Schema(description = "车牌号") + private String plate; + + @Schema(description = "收费类型", example = "2") + private String chargeType; + + @Schema(description = "身份证信息") + private String certificate; + + @Schema(description = "生效日期") + private String start; + + @Schema(description = "失效日期") + private String end; + + @Schema(description = "部门") + private String dept; + + @Schema(description = "备注", example = "你说的对") + private String memo; + + @Schema(description = "来源") + private String source; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteRespVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteRespVO.java new file mode 100644 index 000000000..870b7a2bd --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.parking.controller.admin.white.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; + +@Schema(description = "管理后台 - 白名单管理 Response VO") +@Data +@ExcelIgnoreUnannotated +public class WhiteRespVO { + + @Schema(description = "白名单记录流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19660") + @ExcelProperty("白名单记录流水号") + private Integer fixedId; + + @Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("场库编号") + private String parkNumber; + + @Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("车牌号") + private String plate; + + @Schema(description = "收费类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty(value = "收费类型", converter = DictConvert.class) + @DictFormat("charge_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 + private String chargeType; + + @Schema(description = "身份证信息", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("身份证信息") + private String certificate; + + @Schema(description = "生效日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("生效日期") + private String start; + + @Schema(description = "失效日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("失效日期") + private String end; + + @Schema(description = "部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("部门") + private String dept; + + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") + @ExcelProperty("备注") + private String memo; + + @Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("来源") + private String source; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteSaveReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteSaveReqVO.java new file mode 100644 index 000000000..629f70cbc --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteSaveReqVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.parking.controller.admin.white.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 白名单管理新增/修改 Request VO") +@Data +public class WhiteSaveReqVO { + + @Schema(description = "白名单记录流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19660") + private Integer fixedId; + + @Schema(description = "场库编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "场库编号不能为空") + private String parkNumber; + + @Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "车牌号不能为空") + private String plate; + + @Schema(description = "收费类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "收费类型不能为空") + private String chargeType; + + @Schema(description = "身份证信息", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "身份证信息不能为空") + private String certificate; + + @Schema(description = "生效日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "生效日期不能为空") + private String start; + + @Schema(description = "失效日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "失效日期不能为空") + private String end; + + @Schema(description = "部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "部门不能为空") + private String dept; + + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") + @NotEmpty(message = "备注不能为空") + private String memo; + + @Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "来源不能为空") + private String source; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteUtilDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteUtilDO.java new file mode 100644 index 000000000..8744797bd --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/white/vo/WhiteUtilDO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.parking.controller.admin.white.vo; + +import lombok.Data; + +import java.util.List; +@Data +public class WhiteUtilDO { + private String parkNumber; + private String method; + private List datas; + private Integer size; +} diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/areasandvalidity/AreasAndValidityDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/areasandvalidity/AreasAndValidityDO.java new file mode 100644 index 000000000..f59594aaf --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/areasandvalidity/AreasAndValidityDO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 区域时间信息 DO + * + * @author 芋道源码 + */ +@TableName("areas_and_validity") +@KeySequence("areas_and_validity_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AreasAndValidityDO extends BaseDO { + + /** + * id + */ + @TableId + private Long id; + /** + * 区域Id + */ + private Integer areaId; + /** + * 生效日期 + */ + private String start; + /** + * 失效日期 + */ + private String end; + /** + * 白名单记录流水号 + */ + private Integer fixedId; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java new file mode 100644 index 000000000..79e1c2fee --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.parking.dal.dataobject.carinfo; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 车辆信息 DO + * + * @author 芋道源码 + */ +@TableName("car_info") +@KeySequence("car_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class CarInfoDO extends BaseDO { + + /** + * id + */ + @TableId + private Long id; + /** + * 车牌 + */ + private String plate; + /** + * 车辆颜色 + */ + private String plateColor; + /** + * 无牌车票号 + */ + private String ticketCode; + /** + * 车类型 + */ + private String carType; + /** + * 车牌识别可信度 + */ + private Integer confidence; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/passageway/PassagewayDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/passageway/PassagewayDO.java index 495b09cd5..5a7b3df14 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/passageway/PassagewayDO.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/passageway/PassagewayDO.java @@ -22,11 +22,6 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @AllArgsConstructor public class PassagewayDO extends BaseDO { - /** - * 通道 Id - */ - @TableId(type = IdType.INPUT) - private String passagewayId; /** * 场库编号 */ @@ -43,5 +38,14 @@ public class PassagewayDO extends BaseDO { * 目标区域 Id */ private String targetAreaId; + /** + * id + */ + @TableId + private Long id; + /** + * 通道 Id + */ + private String passagewayId; } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/userinfo/UserInfoDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/userinfo/UserInfoDO.java new file mode 100644 index 000000000..bb5c86459 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/userinfo/UserInfoDO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.parking.dal.dataobject.userinfo; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 车主信息 DO + * + * @author 芋道源码 + */ +@TableName("user_info") +@KeySequence("user_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class UserInfoDO extends BaseDO { + + /** + * 证件号码 + */ +// @TableId(type = IdType.INPUT) + private String idCard; + /** + * 车主姓名 + */ + private String userName; + /** + * 联系电话 + */ + private String phone; + /** + * 地址 + */ + private String address; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/vehiclerenewalrecord/VehicleRenewalRecordDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/vehiclerenewalrecord/VehicleRenewalRecordDO.java new file mode 100644 index 000000000..ba69a3d57 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/vehiclerenewalrecord/VehicleRenewalRecordDO.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +import java.util.List; + +/** + * 固定车续费记录 DO + * + * @author 芋道源码 + */ +@TableName("fixed_vehicle_renewal_record") +@KeySequence("fixed_vehicle_renewal_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class VehicleRenewalRecordDO extends BaseDO { + + /** + * 续费订单号 + */ + @TableId(type = IdType.INPUT) + private String id; + /** + * 场库编号 + */ + private String parkNumber; + /** + * 接口名称 + */ + private String method; + /** + * 车牌 + */ + private String plate; + /** + * 固定车组名称 + */ + private String carGroupName; + /** + * 支付时间 + */ + private String payTime; + /** + * 续费金额 + */ + private String payCharge; + /** + * 车位号 + */ + private Integer number; + /** + * 续费时长 + */ + private String feeMonth; + /** + * 过期日期 + */ + private String end; + /** + * 车主名称 + */ + private String carOwnerName; + /** + * 支付类型 + * + * 枚举 {@link TODO pay_type 对应的类} + */ + private String payType; + /** + * 支付流水号 + */ + private String orderNo; + + + private List datas; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/warning/WarningDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/warning/WarningDO.java new file mode 100644 index 000000000..95e5a5924 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/warning/WarningDO.java @@ -0,0 +1,81 @@ +package cn.iocoder.yudao.module.parking.dal.dataobject.warning; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 告警记录 DO + * + * @author 芋道源码 + */ +@TableName("device_warning") +@KeySequence("device_warning_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WarningDO extends BaseDO { + + /** + * 表自增 id + */ + @TableId(type = IdType.INPUT) + private String id; + /** + * 场库编号 + */ + private String parkNumber; + /** + * 停车区域 + */ + private String areaCode; + /** + * 车位编码 + */ + private String portCode; + /** + * 告警对象 Id + */ + private String objectId; + /** + * 告警对象编码 + */ + private String objectCode; + /** + * 告警对象名称 + */ + private String objectName; + /** + * 告警对象类型 + * + * 枚举 {@link TODO object_type 对应的类} + */ + private String objectType; + /** + * 告警时间 + */ + private String warningTime; + /** + * 上报时间 + */ + private String reportTime; + /** + * 告警类型 + * + * 枚举 {@link TODO warning_type 对应的类} + */ + private String warningType; + /** + * 告警详情 + */ + private String warningDetail; + + private List datas; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/white/WhiteDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/white/WhiteDO.java new file mode 100644 index 000000000..b44e062a3 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/white/WhiteDO.java @@ -0,0 +1,69 @@ +package cn.iocoder.yudao.module.parking.dal.dataobject.white; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 白名单管理 DO + * + * @author 芋道源码 + */ +@TableName("white") +@KeySequence("white_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WhiteDO extends BaseDO { + + /** + * 白名单记录流水号 + */ + @TableId + private Integer fixedId; + /** + * 场库编号 + */ + private String parkNumber; + /** + * 车牌号 + */ + private String plate; + /** + * 收费类型 + * + * 枚举 {@link TODO charge_type 对应的类} + */ + private String chargeType; + /** + * 身份证信息 + */ + private String certificate; + /** + * 生效日期 + */ + private String start; + /** + * 失效日期 + */ + private String end; + /** + * 部门 + */ + private String dept; + /** + * 备注 + */ + private String memo; + /** + * 来源 + */ + private String source; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/areasandvalidity/AreasAndValidityMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/areasandvalidity/AreasAndValidityMapper.java new file mode 100644 index 000000000..f958f6af1 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/areasandvalidity/AreasAndValidityMapper.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.parking.dal.mysql.areasandvalidity; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity.AreasAndValidityDO; +import org.apache.ibatis.annotations.Mapper; + + +/** + * 区域时间信息 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface AreasAndValidityMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/carinfo/CarInfoMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/carinfo/CarInfoMapper.java new file mode 100644 index 000000000..df5224aef --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/carinfo/CarInfoMapper.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.parking.dal.mysql.carinfo; + + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO; +import org.apache.ibatis.annotations.Mapper; + + +/** + * 车辆信息 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface CarInfoMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/passageway/PassagewayMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/passageway/PassagewayMapper.java index e58ac1ea3..ccf7caba3 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/passageway/PassagewayMapper.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/passageway/PassagewayMapper.java @@ -6,8 +6,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.parking.dal.dataobject.passageway.PassagewayDO; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; import cn.iocoder.yudao.module.parking.controller.admin.passageway.vo.*; +import org.apache.ibatis.annotations.Param; /** * 通道信息 Mapper @@ -24,7 +26,10 @@ public interface PassagewayMapper extends BaseMapperX { .eqIfPresent(PassagewayDO::getSourceAreaId, reqVO.getSourceAreaId()) .eqIfPresent(PassagewayDO::getTargetAreaId, reqVO.getTargetAreaId()) .betweenIfPresent(PassagewayDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(PassagewayDO::getPassagewayId)); + .eqIfPresent(PassagewayDO::getPassagewayId, reqVO.getPassagewayId()) + .orderByDesc(PassagewayDO::getId)); } + @Delete("DELETE FROM `passageway` WHERE `park_number` = #{parkNumber}") + int physicalDeleteByParkNumber(@Param("parkNumber") String parkNumber); } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/userinfo/UserInfoMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/userinfo/UserInfoMapper.java new file mode 100644 index 000000000..667eabcd6 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/userinfo/UserInfoMapper.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.parking.dal.mysql.userinfo; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.parking.dal.dataobject.userinfo.UserInfoDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 车主信息 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface UserInfoMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/vehiclerenewalrecord/VehicleRenewalRecordMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/vehiclerenewalrecord/VehicleRenewalRecordMapper.java new file mode 100644 index 000000000..8451742db --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/vehiclerenewalrecord/VehicleRenewalRecordMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.parking.dal.mysql.vehiclerenewalrecord; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord.VehicleRenewalRecordDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo.*; + +/** + * 固定车续费记录 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface VehicleRenewalRecordMapper extends BaseMapperX { + + default PageResult selectPage(VehicleRenewalRecordPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(VehicleRenewalRecordDO::getParkNumber, reqVO.getParkNumber()) + .eqIfPresent(VehicleRenewalRecordDO::getMethod, reqVO.getMethod()) + .eqIfPresent(VehicleRenewalRecordDO::getPlate, reqVO.getPlate()) + .likeIfPresent(VehicleRenewalRecordDO::getCarGroupName, reqVO.getCarGroupName()) + .betweenIfPresent(VehicleRenewalRecordDO::getPayTime, reqVO.getPayTime()) + .eqIfPresent(VehicleRenewalRecordDO::getPayCharge, reqVO.getPayCharge()) + .eqIfPresent(VehicleRenewalRecordDO::getNumber, reqVO.getNumber()) + .eqIfPresent(VehicleRenewalRecordDO::getFeeMonth, reqVO.getFeeMonth()) + .eqIfPresent(VehicleRenewalRecordDO::getEnd, reqVO.getEnd()) + .likeIfPresent(VehicleRenewalRecordDO::getCarOwnerName, reqVO.getCarOwnerName()) + .eqIfPresent(VehicleRenewalRecordDO::getPayType, reqVO.getPayType()) + .eqIfPresent(VehicleRenewalRecordDO::getOrderNo, reqVO.getOrderNo()) + .betweenIfPresent(VehicleRenewalRecordDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(VehicleRenewalRecordDO::getId)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/warning/WarningMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/warning/WarningMapper.java new file mode 100644 index 000000000..c6cf1f0b7 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/warning/WarningMapper.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.parking.dal.mysql.warning; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.parking.dal.dataobject.warning.WarningDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.parking.controller.admin.warning.vo.*; + +/** + * 告警记录 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WarningMapper extends BaseMapperX { + + default PageResult selectPage(WarningPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WarningDO::getParkNumber, reqVO.getParkNumber()) + .eqIfPresent(WarningDO::getAreaCode, reqVO.getAreaCode()) + .eqIfPresent(WarningDO::getPortCode, reqVO.getPortCode()) + .eqIfPresent(WarningDO::getObjectId, reqVO.getObjectId()) + .eqIfPresent(WarningDO::getObjectCode, reqVO.getObjectCode()) + .likeIfPresent(WarningDO::getObjectName, reqVO.getObjectName()) + .eqIfPresent(WarningDO::getObjectType, reqVO.getObjectType()) + .betweenIfPresent(WarningDO::getWarningTime, reqVO.getWarningTime()) + .betweenIfPresent(WarningDO::getReportTime, reqVO.getReportTime()) + .eqIfPresent(WarningDO::getWarningType, reqVO.getWarningType()) + .eqIfPresent(WarningDO::getWarningDetail, reqVO.getWarningDetail()) + .betweenIfPresent(WarningDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(WarningDO::getId)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/white/WhiteMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/white/WhiteMapper.java new file mode 100644 index 000000000..4633abbbe --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/white/WhiteMapper.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.parking.dal.mysql.white; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*; + +/** + * 白名单管理 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface WhiteMapper extends BaseMapperX { + + default PageResult selectPage(WhitePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(WhiteDO::getParkNumber, reqVO.getParkNumber()) + .eqIfPresent(WhiteDO::getPlate, reqVO.getPlate()) + .eqIfPresent(WhiteDO::getChargeType, reqVO.getChargeType()) + .eqIfPresent(WhiteDO::getCertificate, reqVO.getCertificate()) + .eqIfPresent(WhiteDO::getStart, reqVO.getStart()) + .eqIfPresent(WhiteDO::getEnd, reqVO.getEnd()) + .eqIfPresent(WhiteDO::getDept, reqVO.getDept()) + .eqIfPresent(WhiteDO::getMemo, reqVO.getMemo()) + .eqIfPresent(WhiteDO::getSource, reqVO.getSource()) + .betweenIfPresent(WhiteDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(WhiteDO::getFixedId)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/areasandvalidity/AreasAndValidityService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/areasandvalidity/AreasAndValidityService.java new file mode 100644 index 000000000..90586f8d2 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/areasandvalidity/AreasAndValidityService.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.parking.service.areasandvalidity; + + +/** + * 区域时间信息 Service 接口 + * + * @author 芋道源码 + */ +public interface AreasAndValidityService { + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/areasandvalidity/AreasAndValidityServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/areasandvalidity/AreasAndValidityServiceImpl.java new file mode 100644 index 000000000..09b732b23 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/areasandvalidity/AreasAndValidityServiceImpl.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.parking.service.areasandvalidity; + +import cn.iocoder.yudao.module.parking.dal.mysql.areasandvalidity.AreasAndValidityMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +/** + * 区域时间信息 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class AreasAndValidityServiceImpl implements AreasAndValidityService { + + @Resource + private AreasAndValidityMapper andValidityMapper; + + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java new file mode 100644 index 000000000..afea7cc3d --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.parking.service.carinfo; + + +/** + * 车辆信息 Service 接口 + * + * @author 芋道源码 + */ +public interface CarInfoService { + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java new file mode 100644 index 000000000..002586ab2 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.parking.service.carinfo; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper; + + +/** + * 车辆信息 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class CarInfoServiceImpl implements CarInfoService { + + @Resource + private CarInfoMapper carInfoMapper; + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayService.java index ea3bd10f4..d1f5fb212 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayService.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayService.java @@ -21,7 +21,7 @@ public interface PassagewayService { * @param createReqVO 创建信息 * @return 编号 */ - String createPassageway(@Valid PassagewaySaveReqVO createReqVO); + Long createPassageway(@Valid PassagewaySaveReqVO createReqVO); /** * 更新通道信息 @@ -35,7 +35,7 @@ public interface PassagewayService { * * @param id 编号 */ - void deletePassageway(String id); + void deletePassageway(Long id); /** * 获得通道信息 @@ -43,7 +43,7 @@ public interface PassagewayService { * @param id 编号 * @return 通道信息 */ - PassagewayDO getPassageway(String id); + PassagewayDO getPassageway(Long id); /** * 获得通道信息分页 diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayServiceImpl.java index 5da9e3eb9..a23a1154f 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayServiceImpl.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/passageway/PassagewayServiceImpl.java @@ -31,39 +31,39 @@ public class PassagewayServiceImpl implements PassagewayService { private PassagewayMapper passagewayMapper; @Override - public String createPassageway(PassagewaySaveReqVO createReqVO) { + public Long createPassageway(PassagewaySaveReqVO createReqVO) { // 插入 PassagewayDO passageway = BeanUtils.toBean(createReqVO, PassagewayDO.class); passagewayMapper.insert(passageway); // 返回 - return passageway.getPassagewayId(); + return passageway.getId(); } @Override public void updatePassageway(PassagewaySaveReqVO updateReqVO) { // 校验存在 - validatePassagewayExists(updateReqVO.getPassagewayId()); + validatePassagewayExists(updateReqVO.getId()); // 更新 PassagewayDO updateObj = BeanUtils.toBean(updateReqVO, PassagewayDO.class); passagewayMapper.updateById(updateObj); } @Override - public void deletePassageway(String id) { + public void deletePassageway(Long id) { // 校验存在 validatePassagewayExists(id); // 删除 passagewayMapper.deleteById(id); } - private void validatePassagewayExists(String id) { + private void validatePassagewayExists(Long id) { if (passagewayMapper.selectById(id) == null) { throw exception(PASSAGEWAY_NOT_EXISTS); } } @Override - public PassagewayDO getPassageway(String id) { + public PassagewayDO getPassageway(Long id) { return passagewayMapper.selectById(id); } @@ -75,7 +75,10 @@ public class PassagewayServiceImpl implements PassagewayService { @Override public BlueCardResult passagewayUpload(PassagewayReqDataVO passagewayReqDataVO) { List passagewaySaveReqVOList = passagewayReqDataVO.getDatas(); - // TODO 判断重复覆盖 + // 先物理删除对应场库编号的通道信息 + passagewayMapper.physicalDeleteByParkNumber(passagewayReqDataVO.getParkNumber()); + // 批量插入数据 + passagewayMapper.insertBatch(BeanUtils.toBean(passagewaySaveReqVOList, PassagewayDO.class)); return null; } diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/userinfo/UserInfoService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/userinfo/UserInfoService.java new file mode 100644 index 000000000..f091eea50 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/userinfo/UserInfoService.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.parking.service.userinfo; + + +/** + * 车主信息 Service 接口 + * + * @author 芋道源码 + */ +public interface UserInfoService { + + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/userinfo/UserInfoServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/userinfo/UserInfoServiceImpl.java new file mode 100644 index 000000000..3f1ea17da --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/userinfo/UserInfoServiceImpl.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.parking.service.userinfo; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import cn.iocoder.yudao.module.parking.dal.mysql.userinfo.UserInfoMapper; + + +/** + * 车主信息 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class UserInfoServiceImpl implements UserInfoService { + + @Resource + private UserInfoMapper userInfoMapper; + + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/vehiclerenewalrecord/VehicleRenewalRecordService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/vehiclerenewalrecord/VehicleRenewalRecordService.java new file mode 100644 index 000000000..22d14b721 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/vehiclerenewalrecord/VehicleRenewalRecordService.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.parking.service.vehiclerenewalrecord; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord.VehicleRenewalRecordDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.module.parking.util.BlueCardResult; + +/** + * 固定车续费记录 Service 接口 + * + * @author 芋道源码 + */ +public interface VehicleRenewalRecordService { + + /** + * 创建固定车续费记录 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createVehicleRenewalRecord(@Valid VehicleRenewalRecordSaveReqVO createReqVO); + + /** + * 更新固定车续费记录 + * + * @param updateReqVO 更新信息 + */ + void updateVehicleRenewalRecord(@Valid VehicleRenewalRecordSaveReqVO updateReqVO); + + /** + * 删除固定车续费记录 + * + * @param id 编号 + */ + void deleteVehicleRenewalRecord(String id); + + /** + * 获得固定车续费记录 + * + * @param id 编号 + * @return 固定车续费记录 + */ + VehicleRenewalRecordDO getVehicleRenewalRecord(String id); + + /** + * 获得固定车续费记录分页 + * + * @param pageReqVO 分页查询 + * @return 固定车续费记录分页 + */ + PageResult getVehicleRenewalRecordPage(VehicleRenewalRecordPageReqVO pageReqVO); + + /** + * 固定车续费记录上传 + */ + BlueCardResult UpRenewalRecord(VehicleRenewalRecordDO vehicleRenewalRecordDO); + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/vehiclerenewalrecord/VehicleRenewalRecordServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/vehiclerenewalrecord/VehicleRenewalRecordServiceImpl.java new file mode 100644 index 000000000..da9dc221a --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/vehiclerenewalrecord/VehicleRenewalRecordServiceImpl.java @@ -0,0 +1,84 @@ +package cn.iocoder.yudao.module.parking.service.vehiclerenewalrecord; + +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.parking.controller.admin.vehiclerenewalrecord.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.vehiclerenewalrecord.VehicleRenewalRecordDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.parking.dal.mysql.vehiclerenewalrecord.VehicleRenewalRecordMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.parking.enums.ErrorCodeConstants.*; + +/** + * 固定车续费记录 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class VehicleRenewalRecordServiceImpl implements VehicleRenewalRecordService { + + @Resource + private VehicleRenewalRecordMapper vehicleRenewalRecordMapper; + + @Override + public String createVehicleRenewalRecord(VehicleRenewalRecordSaveReqVO createReqVO) { + // 插入 + VehicleRenewalRecordDO vehicleRenewalRecord = BeanUtils.toBean(createReqVO, VehicleRenewalRecordDO.class); + vehicleRenewalRecordMapper.insert(vehicleRenewalRecord); + // 返回 + return vehicleRenewalRecord.getId(); + } + + @Override + public void updateVehicleRenewalRecord(VehicleRenewalRecordSaveReqVO updateReqVO) { + // 校验存在 + validateVehicleRenewalRecordExists(updateReqVO.getId()); + // 更新 + VehicleRenewalRecordDO updateObj = BeanUtils.toBean(updateReqVO, VehicleRenewalRecordDO.class); + vehicleRenewalRecordMapper.updateById(updateObj); + } + + @Override + public void deleteVehicleRenewalRecord(String id) { + // 校验存在 + validateVehicleRenewalRecordExists(id); + // 删除 + vehicleRenewalRecordMapper.deleteById(id); + } + + private void validateVehicleRenewalRecordExists(String id) { + if (vehicleRenewalRecordMapper.selectById(id) == null) { + throw exception(VEHICLE_RENEWAL_RECORD_NOT_EXISTS); + } + } + + @Override + public VehicleRenewalRecordDO getVehicleRenewalRecord(String id) { + return vehicleRenewalRecordMapper.selectById(id); + } + + @Override + public PageResult getVehicleRenewalRecordPage(VehicleRenewalRecordPageReqVO pageReqVO) { + return vehicleRenewalRecordMapper.selectPage(pageReqVO); + } + + @Override + public BlueCardResult UpRenewalRecord(VehicleRenewalRecordDO vehicleRenewalRecordDO) { + int insert = vehicleRenewalRecordMapper.insert(vehicleRenewalRecordDO); + if (insert > 0){ + return BlueCardResult.success(); + } + return BlueCardResult.error("记录上传错误"); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningService.java new file mode 100644 index 000000000..e792a0c24 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningService.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.parking.service.warning; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.parking.controller.admin.warning.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.warning.WarningDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.module.parking.util.BlueCardResult; + +/** + * 告警记录 Service 接口 + * + * @author 芋道源码 + */ +public interface WarningService { + + /** + * 创建告警记录 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createWarning(@Valid WarningSaveReqVO createReqVO); + + /** + * 更新告警记录 + * + * @param updateReqVO 更新信息 + */ + void updateWarning(@Valid WarningSaveReqVO updateReqVO); + + /** + * 删除告警记录 + * + * @param id 编号 + */ + void deleteWarning(String id); + + /** + * 获得告警记录 + * + * @param id 编号 + * @return 告警记录 + */ + WarningDO getWarning(String id); + + /** + * 获得告警记录分页 + * + * @param pageReqVO 分页查询 + * @return 告警记录分页 + */ + PageResult getWarningPage(WarningPageReqVO pageReqVO); + + /** + * 设备告警信息上报 + * @param warningDO + * @return + */ + BlueCardResult upWarning(WarningDO warningDO); + +} \ No newline at end of file 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 new file mode 100644 index 000000000..4e7c198ae --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java @@ -0,0 +1,84 @@ +package cn.iocoder.yudao.module.parking.service.warning; + +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.parking.controller.admin.warning.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.warning.WarningDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.parking.dal.mysql.warning.WarningMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.parking.enums.ErrorCodeConstants.*; + +/** + * 告警记录 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WarningServiceImpl implements WarningService { + + @Resource + private WarningMapper warningMapper; + + @Override + public String createWarning(WarningSaveReqVO createReqVO) { + // 插入 + WarningDO warning = BeanUtils.toBean(createReqVO, WarningDO.class); + warningMapper.insert(warning); + // 返回 + return warning.getId(); + } + + @Override + public void updateWarning(WarningSaveReqVO updateReqVO) { + // 校验存在 + validateWarningExists(updateReqVO.getId()); + // 更新 + WarningDO updateObj = BeanUtils.toBean(updateReqVO, WarningDO.class); + warningMapper.updateById(updateObj); + } + + @Override + public void deleteWarning(String id) { + // 校验存在 + validateWarningExists(id); + // 删除 + warningMapper.deleteById(id); + } + + private void validateWarningExists(String id) { + if (warningMapper.selectById(id) == null) { + throw exception(WARNING_NOT_EXISTS); + } + } + + @Override + public WarningDO getWarning(String id) { + return warningMapper.selectById(id); + } + + @Override + public PageResult getWarningPage(WarningPageReqVO pageReqVO) { + return warningMapper.selectPage(pageReqVO); + } + + @Override + public BlueCardResult upWarning(WarningDO warningDO) { + int insert = warningMapper.insert(warningDO); + if (insert > 0){ + return BlueCardResult.success(); + } + return BlueCardResult.error("上传错误"); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/white/WhiteService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/white/WhiteService.java new file mode 100644 index 000000000..d54dd5fde --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/white/WhiteService.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.parking.service.white; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * 白名单管理 Service 接口 + * + * @author 芋道源码 + */ +public interface WhiteService { + + /** + * 创建白名单管理 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createWhite(@Valid WhiteSaveReqVO createReqVO); + + /** + * 更新白名单管理 + * + * @param updateReqVO 更新信息 + */ + void updateWhite(@Valid WhiteSaveReqVO updateReqVO); + + /** + * 删除白名单管理 + * + * @param id 编号 + */ + void deleteWhite(Integer id); + + /** + * 获得白名单管理 + * + * @param id 编号 + * @return 白名单管理 + */ + WhiteDO getWhite(Integer id); + + /** + * 获得白名单管理分页 + * + * @param pageReqVO 分页查询 + * @return 白名单管理分页 + */ + PageResult getWhitePage(WhitePageReqVO pageReqVO); + + BlueCardResult upWhite(WhiteUtilDO whiteUtilDO); + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/white/WhiteServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/white/WhiteServiceImpl.java new file mode 100644 index 000000000..4e652bb60 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/white/WhiteServiceImpl.java @@ -0,0 +1,144 @@ +package cn.iocoder.yudao.module.parking.service.white; + +import cn.iocoder.yudao.module.parking.dal.dataobject.areasandvalidity.AreasAndValidityDO; +import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO; +import cn.iocoder.yudao.module.parking.dal.dataobject.userinfo.UserInfoDO; +import cn.iocoder.yudao.module.parking.dal.mysql.areasandvalidity.AreasAndValidityMapper; +import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper; +import cn.iocoder.yudao.module.parking.dal.mysql.userinfo.UserInfoMapper; +import cn.iocoder.yudao.module.parking.util.BlueCardResult; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*; +import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.parking.dal.mysql.white.WhiteMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.parking.enums.ErrorCodeConstants.*; + +/** + * 白名单管理 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class WhiteServiceImpl implements WhiteService { + + @Resource + private WhiteMapper whiteMapper; + + @Resource + private UserInfoMapper userInfoMapper; + + @Resource + private CarInfoMapper carInfoMapper; + + @Resource + private AreasAndValidityMapper areasAndValidityMapper; + + @Override + public Integer createWhite(WhiteSaveReqVO createReqVO) { + // 插入 + WhiteDO white = BeanUtils.toBean(createReqVO, WhiteDO.class); + whiteMapper.insert(white); + // 返回 + return white.getFixedId(); + } + + @Override + public void updateWhite(WhiteSaveReqVO updateReqVO) { + // 校验存在 + validateWhiteExists(updateReqVO.getFixedId()); + // 更新 + WhiteDO updateObj = BeanUtils.toBean(updateReqVO, WhiteDO.class); + whiteMapper.updateById(updateObj); + } + + @Override + public void deleteWhite(Integer id) { + // 校验存在 + validateWhiteExists(id); + // 删除 + whiteMapper.deleteById(id); + } + + private void validateWhiteExists(Integer id) { + if (whiteMapper.selectById(id) == null) { + throw exception(WHITE_NOT_EXISTS); + } + } + + @Override + public WhiteDO getWhite(Integer id) { + return whiteMapper.selectById(id); + } + + @Override + public PageResult getWhitePage(WhitePageReqVO pageReqVO) { + return whiteMapper.selectPage(pageReqVO); + } + + + + @Transactional + @Override + public BlueCardResult upWhite(WhiteUtilDO whiteUtilDO) { + for (int i = 0; i < whiteUtilDO.getDatas().size() ; i++) { + WhiteDatasDO whiteDatasDO = whiteUtilDO.getDatas().get(i); + + WhiteDO whiteDO = new WhiteDO(); + whiteDO.setFixedId(whiteDatasDO.getFixedId()); + whiteDO.setParkNumber(whiteUtilDO.getParkNumber()); + whiteDO.setPlate(whiteDatasDO.getPlate()); + whiteDO.setChargeType(whiteDatasDO.getChargeType()); + whiteDO.setCertificate(whiteDatasDO.getCertificate()); + whiteDO.setStart(whiteDatasDO.getStart()); + whiteDO.setEnd(whiteDatasDO.getEnd()); + whiteDO.setDept(whiteDatasDO.getDept()); + whiteDO.setMemo(whiteDatasDO.getMemo()); + whiteDO.setSource(whiteDatasDO.getSource()); + WhiteDO whiteDO1 = whiteMapper.selectOne("fixed_id", whiteDatasDO.getFixedId()); + if (whiteDO1 != null){ + whiteMapper.updateById(whiteDO); + }else { + whiteMapper.insert(whiteDO); + } + + + UserInfoDO userInfoDO = new UserInfoDO(); + userInfoDO.setIdCard(whiteDatasDO.getCertificate()); + userInfoDO.setUserName(whiteDatasDO.getName()); + userInfoDO.setPhone(whiteDatasDO.getPhone()); + userInfoDO.setAddress(whiteDatasDO.getAddress()); + userInfoMapper.insert(userInfoDO); + + CarInfoDO carInfoDO = new CarInfoDO(); + carInfoDO.setPlate(whiteDatasDO.getPlate()); + carInfoDO.setPlateColor(whiteDatasDO.getPlateColor()); +// carInfoDO.setTicketCode(whiteDatasDO.get) + carInfoDO.setCarType(whiteDatasDO.getCarType()); +// carInfoDO.setConfidence(whiteDatasDO.ge) + carInfoMapper.insert(carInfoDO); + + AreasAndValidityDO areasAndValidityDO = whiteDatasDO.getAreasAndValidity().get(0); + AreasAndValidityDO areasAndValidityDOs = new AreasAndValidityDO(); + areasAndValidityDOs.setAreaId(areasAndValidityDO.getAreaId()); + areasAndValidityDOs.setStart(areasAndValidityDO.getStart()); + areasAndValidityDOs.setEnd(areasAndValidityDO.getEnd()); + areasAndValidityDOs.setFixedId(whiteDatasDO.getFixedId()); + areasAndValidityMapper.insert(areasAndValidityDOs); + } + + return BlueCardResult.success(); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/pom.xml b/ludu-module-parking/pom.xml index aa9bbe5c2..5dfa395eb 100644 --- a/ludu-module-parking/pom.xml +++ b/ludu-module-parking/pom.xml @@ -8,7 +8,6 @@ ${revision} 4.0.0 - cn.iocoder.cloud ludu-module-parking pom diff --git a/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/java/cn/iocoder/yudao/module/ticket/service/saledata/SaleDataServiceImpl.java b/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/java/cn/iocoder/yudao/module/ticket/service/saledata/SaleDataServiceImpl.java index 1d4d94cc2..7a74ebf94 100644 --- a/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/java/cn/iocoder/yudao/module/ticket/service/saledata/SaleDataServiceImpl.java +++ b/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/java/cn/iocoder/yudao/module/ticket/service/saledata/SaleDataServiceImpl.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.ticket.dal.dataobject.saledata.SaleData; import cn.iocoder.yudao.module.ticket.dal.mongodb.saledata.SaleDataRepository; import com.baomidou.dynamic.datasource.annotation.Slave; import com.mongodb.MongoException; -import kotlin.jvm.internal.Lambda; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource;