Compare commits
20 Commits
5285a00a9d
...
6db47c3cf1
Author | SHA1 | Date | |
---|---|---|---|
6db47c3cf1 | |||
63b0d1c807 | |||
547ebae6e9 | |||
2bd72f906f | |||
1769cb09d7 | |||
c3627245e8 | |||
98ce01b364 | |||
d3368e85d3 | |||
8f595ad135 | |||
0596884364 | |||
10604c90c0 | |||
e732a112f4 | |||
5a85f52f32 | |||
ab14de576c | |||
5c93333c4f | |||
5553e5f872 | |||
365d0a5c73 | |||
d965c4f351 | |||
17ec134c66 | |||
f571601424 |
10
.drone.yml
10
.drone.yml
@ -119,8 +119,8 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
# - echo "ticket done"
|
||||
# - scp -r /ludu/maven/build/ludu-module-parking root@120.46.37.243:/ludu/maven/build
|
||||
# - echo "park done"
|
||||
# - scp -r /ludu/maven/build/ludu-module-datacenter root@120.46.37.243:/ludu/maven/build
|
||||
# - echo "datecenter done"
|
||||
- scp -r /ludu/maven/build/ludu-module-datacenter root@120.46.37.243:/ludu/maven/build
|
||||
- echo "datecenter done"
|
||||
|
||||
- name: build-other-service
|
||||
|
||||
@ -153,9 +153,9 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "ludu-module-parking build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
# - cd /ludu/maven/build/ludu-module-datacenter/
|
||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||
# - ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
- cd /ludu/maven/build/ludu-module-datacenter/
|
||||
- chmod +x ./run.sh # 更改为可执行脚本
|
||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||
|
||||
volumes: # 定义流水线挂载目录,用于共享数据
|
||||
|
||||
|
@ -15,7 +15,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Tag(name = "大屏服务 - 检票")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/checkticket")
|
||||
@RequestMapping("/checkticket")
|
||||
@Validated
|
||||
public class CheckTicketApi {
|
||||
@Resource
|
||||
|
@ -10,6 +10,8 @@ import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @Description 售票
|
||||
@ -37,7 +39,14 @@ public class SaleDataApi {
|
||||
@GetMapping("/lastyear/{startTime}")
|
||||
@Operation(summary = "获得去年日期往前推十天的数据")
|
||||
public List<Map<String, String>> lastyearNum(@PathVariable("startTime") String startTime) {
|
||||
return saleDataService.findCheckticketcountBytime(startTime);
|
||||
String resultStr = startTime.replaceAll("-", "");
|
||||
// 正则表达式匹配 yyyyMMdd 格式
|
||||
Pattern pattern = Pattern.compile("^\\d{8}$");
|
||||
Matcher matcher = pattern.matcher(resultStr);
|
||||
if (matcher.matches()){
|
||||
return saleDataService.findCheckticketcountBytime(resultStr);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/gender")
|
||||
|
@ -21,7 +21,7 @@ import java.net.URL;
|
||||
*/
|
||||
@Tag(name = "大屏服务 - 车辆过渡情况")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/h5/transitionFlight")
|
||||
@RequestMapping("/h5/transitionFlight")
|
||||
@Validated
|
||||
public class TransitionFlightApi {
|
||||
//智慧票务,检票系统:车辆过渡情况(南日)
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.AreaDataVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.EntryRecordVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.ParkingLotDataVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.RevenueVO;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess.*;
|
||||
@ -24,7 +25,7 @@ import java.util.Optional;
|
||||
|
||||
@Tag(name = "大屏服务 - 停车场接口")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/h5/vehicleAccess")
|
||||
@RequestMapping("/h5/vehicleAccess")
|
||||
public class VehicleAccessApi {
|
||||
|
||||
@Autowired
|
||||
@ -93,6 +94,22 @@ public class VehicleAccessApi {
|
||||
LocalDateTime endOfDay = LocalDateTime.of(today, LocalTime.MAX);
|
||||
List<EntryRecord> entryRecords = entryRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
||||
parkingLotDataVO.setIntoNum(entryRecords.size());//车辆进入数
|
||||
//固定车临时车
|
||||
int temporaryCar = 0;
|
||||
int fixationCar = 0;
|
||||
for (int i = 0; i < entryRecords.size(); i++) {
|
||||
for (int j = 0; j < entryRecords.get(i).getDatas().size(); j++) {
|
||||
EntryRecordVo entryRecordVo = entryRecords.get(i).getDatas().get(j);
|
||||
if (entryRecordVo.getCarType().equals("临时车")){
|
||||
temporaryCar ++ ;
|
||||
}
|
||||
if (entryRecordVo.getCarType().equals("固定车")){
|
||||
fixationCar ++ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
parkingLotDataVO.setTemporaryCar(temporaryCar);
|
||||
parkingLotDataVO.setFixationCar(fixationCar);
|
||||
List<AppearanceRecord> appearanceRecords = appearanceRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
||||
parkingLotDataVO.setOutNum(appearanceRecords.size());//车辆出入数
|
||||
|
||||
|
@ -32,6 +32,12 @@ public class ParkingLotDataVO {
|
||||
//总利用率
|
||||
private Double useRatio;
|
||||
|
||||
//临时车数量
|
||||
private int temporaryCar;
|
||||
|
||||
//固定车数量
|
||||
private int fixationCar;
|
||||
|
||||
//区域停车场数据集合
|
||||
private List<AreaDataVO> areaDataVOList = new ArrayList<>();
|
||||
|
||||
|
@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Tag(name = "大屏服务 - 天气接口")
|
||||
@RestController
|
||||
@RequestMapping("/datacenter/h5/weather")
|
||||
@RequestMapping("/h5/weather")
|
||||
@Validated
|
||||
public class WeatherApi {
|
||||
@GetMapping(value = "/getWeather")
|
||||
|
@ -10,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@SpringBootApplication
|
||||
//@MapperScan("cn.iocoder.yudao.module.parking.dal.mysql.channelinformation.ChannelInformationMapper")
|
||||
public class ParkingServerApplication {
|
||||
//测试
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ParkingServerApplication.class, args);
|
||||
|
@ -0,0 +1,100 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo;
|
||||
|
||||
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.*;
|
||||
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.chargeinfo.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.service.chargeinfo.ChargeInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - 收费信息")
|
||||
@RestController
|
||||
@RequestMapping("/parking/charge-info")
|
||||
@Validated
|
||||
public class ChargeInfoController {
|
||||
|
||||
@Resource
|
||||
private ChargeInfoService chargeInfoService;
|
||||
|
||||
@PostMapping("/insertChargeInformation")
|
||||
public BlueCardResult insertChargeInformation(@RequestBody ChargeInfoReqDataVO chargeInformation){
|
||||
return chargeInfoService.uploadChargeInformation(chargeInformation);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建收费信息")
|
||||
@PreAuthorize("@ss.hasPermission('parking:charge-info:create')")
|
||||
public CommonResult<Long> createchargeInfo(@Valid @RequestBody ChargeInfoSaveReqVO createReqVO) {
|
||||
return success(chargeInfoService.createchargeInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新收费信息")
|
||||
@PreAuthorize("@ss.hasPermission('parking:charge-info:update')")
|
||||
public CommonResult<Boolean> updatechargeInfo(@Valid @RequestBody ChargeInfoSaveReqVO updateReqVO) {
|
||||
chargeInfoService.updatechargeInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除收费信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:charge-info:delete')")
|
||||
public CommonResult<Boolean> deletechargeInfo(@RequestParam("id") Long id) {
|
||||
chargeInfoService.deletechargeInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得收费信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:charge-info:query')")
|
||||
public CommonResult<ChargeInfoRespVO> getchargeInfo(@RequestParam("id") Long id) {
|
||||
ChargeInfoDO chargeInfo = chargeInfoService.getchargeInfo(id);
|
||||
return success(BeanUtils.toBean(chargeInfo, ChargeInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得收费信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:charge-info:query')")
|
||||
public CommonResult<PageResult<ChargeInfoRespVO>> getchargeInfoPage(@Valid ChargeInfoPageReqVO pageReqVO) {
|
||||
PageResult<ChargeInfoDO> pageResult = chargeInfoService.getchargeInfoPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ChargeInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出收费信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:charge-info:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportchargeInfoExcel(@Valid ChargeInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ChargeInfoDO> list = chargeInfoService.getchargeInfoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "收费信息.xls", "数据", ChargeInfoRespVO.class,
|
||||
BeanUtils.toBean(list, ChargeInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||
|
||||
import lombok.*;
|
||||
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 ChargeInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "入场时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] inTime;
|
||||
|
||||
@Schema(description = "结算时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] outTime;
|
||||
|
||||
@Schema(description = "入场通道")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "出场通道")
|
||||
private String outChannel;
|
||||
|
||||
@Schema(description = "支付类型")
|
||||
private String payKind;
|
||||
|
||||
@Schema(description = "支付渠道")
|
||||
private String payChannel;
|
||||
|
||||
@Schema(description = "入场订单号", example = "16414")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "车辆类型", example = "1")
|
||||
private String carType;
|
||||
|
||||
@Schema(description = "支付订单号")
|
||||
private String payNo;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "应缴金额")
|
||||
private String charge;
|
||||
|
||||
@Schema(description = "实收金额")
|
||||
private String realCharge;
|
||||
|
||||
@Schema(description = "优惠金额")
|
||||
private String couponCharge;
|
||||
|
||||
@Schema(description = "区域 ID", example = "19866")
|
||||
private String areaId;
|
||||
|
||||
@Schema(description = "操作员名称", example = "王五")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "操作员联系电话")
|
||||
private String operatorTelphone;
|
||||
|
||||
@Schema(description = "支付订单号")
|
||||
private String outTradeNo;
|
||||
|
||||
@Schema(description = "车牌颜色")
|
||||
private String plateColor;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 收费信息接口请求参数")
|
||||
@Data
|
||||
public class ChargeInfoReqDataVO {
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
@Schema(description = "收费信息数量")
|
||||
private String size;
|
||||
@Schema(description = "收费信息列表")
|
||||
private List<ChargeInfoSaveReqVO> datas;
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 收费信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ChargeInfoRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28728")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
@ExcelProperty("场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "入场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("入场时间")
|
||||
private String inTime;
|
||||
|
||||
@Schema(description = "结算时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("结算时间")
|
||||
private String outTime;
|
||||
|
||||
@Schema(description = "入场通道")
|
||||
@ExcelProperty("入场通道")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "出场通道")
|
||||
@ExcelProperty("出场通道")
|
||||
private String outChannel;
|
||||
|
||||
@Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("支付类型")
|
||||
private String payKind;
|
||||
|
||||
@Schema(description = "支付渠道", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("支付渠道")
|
||||
private String payChannel;
|
||||
|
||||
@Schema(description = "入场订单号", example = "16414")
|
||||
@ExcelProperty("入场订单号")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "车辆类型", example = "1")
|
||||
@ExcelProperty("车辆类型")
|
||||
private String carType;
|
||||
|
||||
@Schema(description = "支付订单号")
|
||||
@ExcelProperty("支付订单号")
|
||||
private String payNo;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "应缴金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("应缴金额")
|
||||
private String charge;
|
||||
|
||||
@Schema(description = "实收金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("实收金额")
|
||||
private String realCharge;
|
||||
|
||||
@Schema(description = "优惠金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("优惠金额")
|
||||
private String couponCharge;
|
||||
|
||||
@Schema(description = "区域 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19866")
|
||||
@ExcelProperty("区域 ID")
|
||||
private String areaId;
|
||||
|
||||
@Schema(description = "操作员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("操作员名称")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "操作员联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("操作员联系电话")
|
||||
private String operatorTelphone;
|
||||
|
||||
@Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("支付订单号")
|
||||
private String outTradeNo;
|
||||
|
||||
@Schema(description = "车牌颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("车牌颜色")
|
||||
private String plateColor;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 收费信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class ChargeInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28728")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "车牌号不能为空")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "入场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "入场时间不能为空")
|
||||
private String inTime;
|
||||
|
||||
@Schema(description = "结算时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "结算时间不能为空")
|
||||
private String outTime;
|
||||
|
||||
@Schema(description = "入场通道")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "出场通道")
|
||||
private String outChannel;
|
||||
|
||||
@Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "支付类型不能为空")
|
||||
private String payKind;
|
||||
|
||||
@Schema(description = "支付渠道", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "支付渠道不能为空")
|
||||
private String payChannel;
|
||||
|
||||
@Schema(description = "入场订单号", example = "16414")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "车辆类型", example = "1")
|
||||
private String carType;
|
||||
|
||||
@Schema(description = "支付订单号")
|
||||
private String payNo;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "应缴金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "应缴金额不能为空")
|
||||
private String charge;
|
||||
|
||||
@Schema(description = "实收金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "实收金额不能为空")
|
||||
private String realCharge;
|
||||
|
||||
@Schema(description = "优惠金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "优惠金额不能为空")
|
||||
private String couponCharge;
|
||||
|
||||
@Schema(description = "区域 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19866")
|
||||
@NotEmpty(message = "区域 ID不能为空")
|
||||
private String areaId;
|
||||
|
||||
@Schema(description = "操作员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "操作员名称不能为空")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "操作员联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "操作员联系电话不能为空")
|
||||
private String operatorTelphone;
|
||||
|
||||
@Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "支付订单号不能为空")
|
||||
private String outTradeNo;
|
||||
|
||||
@Schema(description = "车牌颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "车牌颜色不能为空")
|
||||
private String plateColor;
|
||||
|
||||
}
|
@ -48,4 +48,9 @@ public class CarInfoDO extends BaseDO {
|
||||
*/
|
||||
private Integer confidence;
|
||||
|
||||
public CarInfoDO(String plate, String plateColor, String carType) {
|
||||
this.plate = plate;
|
||||
this.plateColor = plateColor;
|
||||
this.carType = carType;
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 收费信息 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@TableName("charge_info")
|
||||
@KeySequence("charge_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ChargeInfoDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
private String inTime;
|
||||
/**
|
||||
* 结算时间
|
||||
*/
|
||||
private String outTime;
|
||||
/**
|
||||
* 入场通道
|
||||
*/
|
||||
private String inChannel;
|
||||
/**
|
||||
* 出场通道
|
||||
*/
|
||||
private String outChannel;
|
||||
/**
|
||||
* 支付类型
|
||||
*/
|
||||
private String payKind;
|
||||
/**
|
||||
* 支付渠道
|
||||
*/
|
||||
private String payChannel;
|
||||
/**
|
||||
* 入场订单号
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 车辆类型
|
||||
*/
|
||||
private String carType;
|
||||
/**
|
||||
* 支付订单号
|
||||
*/
|
||||
private String payNo;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 应缴金额
|
||||
*/
|
||||
private String charge;
|
||||
/**
|
||||
* 实收金额
|
||||
*/
|
||||
private String realCharge;
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private String couponCharge;
|
||||
/**
|
||||
* 区域 ID
|
||||
*/
|
||||
private String areaId;
|
||||
/**
|
||||
* 操作员名称
|
||||
*/
|
||||
private String operatorName;
|
||||
/**
|
||||
* 操作员联系电话
|
||||
*/
|
||||
private String operatorTelphone;
|
||||
/**
|
||||
* 支付订单号
|
||||
*/
|
||||
private String outTradeNo;
|
||||
/**
|
||||
* 车牌颜色
|
||||
*/
|
||||
private String plateColor;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.chargeinfo;
|
||||
|
||||
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.chargeinfo.ChargeInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||
|
||||
/**
|
||||
* 收费信息 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface ChargeInfoMapper extends BaseMapperX<ChargeInfoDO> {
|
||||
|
||||
default PageResult<ChargeInfoDO> selectPage(ChargeInfoPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ChargeInfoDO>()
|
||||
.eqIfPresent(ChargeInfoDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(ChargeInfoDO::getPlate, reqVO.getPlate())
|
||||
.betweenIfPresent(ChargeInfoDO::getInTime, reqVO.getInTime())
|
||||
.betweenIfPresent(ChargeInfoDO::getOutTime, reqVO.getOutTime())
|
||||
.eqIfPresent(ChargeInfoDO::getInChannel, reqVO.getInChannel())
|
||||
.eqIfPresent(ChargeInfoDO::getOutChannel, reqVO.getOutChannel())
|
||||
.eqIfPresent(ChargeInfoDO::getPayKind, reqVO.getPayKind())
|
||||
.eqIfPresent(ChargeInfoDO::getPayChannel, reqVO.getPayChannel())
|
||||
.eqIfPresent(ChargeInfoDO::getOrderId, reqVO.getOrderId())
|
||||
.eqIfPresent(ChargeInfoDO::getCarType, reqVO.getCarType())
|
||||
.eqIfPresent(ChargeInfoDO::getPayNo, reqVO.getPayNo())
|
||||
.eqIfPresent(ChargeInfoDO::getMemo, reqVO.getMemo())
|
||||
.eqIfPresent(ChargeInfoDO::getCharge, reqVO.getCharge())
|
||||
.eqIfPresent(ChargeInfoDO::getRealCharge, reqVO.getRealCharge())
|
||||
.eqIfPresent(ChargeInfoDO::getCouponCharge, reqVO.getCouponCharge())
|
||||
.eqIfPresent(ChargeInfoDO::getAreaId, reqVO.getAreaId())
|
||||
.likeIfPresent(ChargeInfoDO::getOperatorName, reqVO.getOperatorName())
|
||||
.eqIfPresent(ChargeInfoDO::getOperatorTelphone, reqVO.getOperatorTelphone())
|
||||
.eqIfPresent(ChargeInfoDO::getOutTradeNo, reqVO.getOutTradeNo())
|
||||
.eqIfPresent(ChargeInfoDO::getPlateColor, reqVO.getPlateColor())
|
||||
.betweenIfPresent(ChargeInfoDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ChargeInfoDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆信息 Service 接口
|
||||
*
|
||||
@ -8,5 +12,10 @@ package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||
*/
|
||||
public interface CarInfoService {
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入或更新车牌信息
|
||||
* @param carInfoDOList
|
||||
* @return java.lang.Boolean
|
||||
*/
|
||||
Boolean insertOrUpdateBatch(List<CarInfoDO> carInfoDOList);
|
||||
}
|
@ -1,10 +1,15 @@
|
||||
package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆信息 Service 实现类
|
||||
@ -19,4 +24,8 @@ public class CarInfoServiceImpl implements CarInfoService {
|
||||
private CarInfoMapper carInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean insertOrUpdateBatch(List<CarInfoDO> carInfoDOList) {
|
||||
return carInfoMapper.insertOrUpdateBatch(carInfoDOList);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package cn.iocoder.yudao.module.parking.service.chargeinfo;
|
||||
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
|
||||
/**
|
||||
* 收费信息 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface ChargeInfoService {
|
||||
|
||||
/**
|
||||
* 创建收费信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createchargeInfo(@Valid ChargeInfoSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新收费信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatechargeInfo(@Valid ChargeInfoSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除收费信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletechargeInfo(Long id);
|
||||
|
||||
/**
|
||||
* 获得收费信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 收费信息
|
||||
*/
|
||||
ChargeInfoDO getchargeInfo(Long id);
|
||||
|
||||
/**
|
||||
* 获得收费信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 收费信息分页
|
||||
*/
|
||||
PageResult<ChargeInfoDO> getchargeInfoPage(ChargeInfoPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 收费信息上传
|
||||
* @param chargeInformation
|
||||
* @return cn.iocoder.yudao.module.parking.util.BlueCardResult
|
||||
*/
|
||||
BlueCardResult uploadChargeInformation(ChargeInfoReqDataVO chargeInformation);
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.parking.service.chargeinfo;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.service.carinfo.CarInfoService;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.chargeinfo.ChargeInfoMapper;
|
||||
|
||||
import java.beans.Beans;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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 ChargeInfoServiceImpl implements ChargeInfoService {
|
||||
|
||||
@Resource
|
||||
private ChargeInfoMapper chargeInfoMapper;
|
||||
|
||||
@Resource
|
||||
private CarInfoService carInfoService;
|
||||
|
||||
@Override
|
||||
public Long createchargeInfo(ChargeInfoSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ChargeInfoDO chargeInfo = BeanUtils.toBean(createReqVO, ChargeInfoDO.class);
|
||||
chargeInfoMapper.insert(chargeInfo);
|
||||
// 返回
|
||||
return chargeInfo.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatechargeInfo(ChargeInfoSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatechargeInfoExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ChargeInfoDO updateObj = BeanUtils.toBean(updateReqVO, ChargeInfoDO.class);
|
||||
chargeInfoMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletechargeInfo(Long id) {
|
||||
// 校验存在
|
||||
validatechargeInfoExists(id);
|
||||
// 删除
|
||||
chargeInfoMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validatechargeInfoExists(Long id) {
|
||||
if (chargeInfoMapper.selectById(id) == null) {
|
||||
throw exception(CHARGE_INFO_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeInfoDO getchargeInfo(Long id) {
|
||||
return chargeInfoMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ChargeInfoDO> getchargeInfoPage(ChargeInfoPageReqVO pageReqVO) {
|
||||
return chargeInfoMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public BlueCardResult uploadChargeInformation(ChargeInfoReqDataVO chargeInformation) {
|
||||
List<ChargeInfoSaveReqVO> chargeInfoSaveReqVOList = chargeInformation.getDatas();
|
||||
List<CarInfoDO> carInfoDOList = new ArrayList<>();
|
||||
for (ChargeInfoSaveReqVO chargeInfoSaveReqVO : chargeInfoSaveReqVOList) {
|
||||
chargeInfoSaveReqVO.setParkNumber(chargeInformation.getParkNumber());
|
||||
// 存入车信息数组
|
||||
carInfoDOList.add(new CarInfoDO(chargeInfoSaveReqVO.getPlate(), chargeInfoSaveReqVO.getPlateColor(), chargeInfoSaveReqVO.getCarType()));
|
||||
}
|
||||
List<ChargeInfoDO> chargeInfoDOList = BeanUtils.toBean(chargeInfoSaveReqVOList, ChargeInfoDO.class);
|
||||
// 插入收费信息
|
||||
chargeInfoMapper.insertBatch(chargeInfoDOList);
|
||||
// 插入对应车牌信息
|
||||
carInfoService.insertOrUpdateBatch(carInfoDOList);
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -48,6 +48,14 @@ public class WarningServiceImpl implements WarningService {
|
||||
warningMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
//public void updateWarning(WarningSaveReqVO updateReqVO) {
|
||||
// // 校验存在
|
||||
// validateWarningExists(updateReqVO.getId());
|
||||
// // 更新
|
||||
// WarningDO updateObj = BeanUtils.toBean(updateReqVO, WarningDO.class);
|
||||
// warningMapper.updateById(updateObj);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void deleteWarning(String id) {
|
||||
// 校验存在
|
||||
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.parking.dal.mysql.chargeinfo.ChargeInfoMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user