Compare commits
11 Commits
b0b1980cad
...
4aaef038ff
Author | SHA1 | Date | |
---|---|---|---|
4aaef038ff | |||
8bee19b948 | |||
15c853832a | |||
ef9e00e2d9 | |||
1f8a1de1f5 | |||
c0d0640e7d | |||
91efcd403a | |||
4713212bec | |||
66c7346bd8 | |||
5fb3fcccbc | |||
b9e06e15ba |
@ -79,6 +79,12 @@ public class SaleDataApi {
|
||||
return saleDataService.findBySaleMethod();
|
||||
}
|
||||
|
||||
@GetMapping("/itemType")
|
||||
@Operation(summary = "查询各个产品类型的购票人数")
|
||||
public List<Map<String, String>> findByItemType() {
|
||||
return saleDataService.findByDoItemType();
|
||||
}
|
||||
|
||||
@GetMapping("/wuyi/{x}")
|
||||
@Operation(summary = "查询最近前几年当年的五一期间的数据")
|
||||
public List<Map<String, String>> findByWuyi(@PathVariable("x") int x) {
|
||||
|
@ -0,0 +1,9 @@
|
||||
package cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SaleDataItemTypeVo {
|
||||
// private String itemtype;
|
||||
private String itemtypename;
|
||||
}
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.datacenter.dal.mongodb.saledata;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AgeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AggregationVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.SaleDataItemTypeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.saledata.SaleData;
|
||||
import org.springframework.data.mongodb.repository.Aggregation;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
@ -41,4 +42,7 @@ public interface SaleDataRepository extends MongoRepository<SaleData,String> {
|
||||
})
|
||||
AgeVo findByAge();
|
||||
|
||||
@Query(value = "{}", fields = "{ 'itemtypename': 1 }")
|
||||
List<SaleDataItemTypeVo> findAllByItemtypename();
|
||||
|
||||
}
|
||||
|
@ -65,6 +65,12 @@ public interface SaleDataService {
|
||||
*/
|
||||
public List<Map<String, String>> findBySaleMethod();
|
||||
|
||||
/**
|
||||
* 查询各个产品类型的购票人数
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, String>> findByDoItemType();
|
||||
|
||||
/**
|
||||
* 查询最近前x年五一期间的数据
|
||||
* @param x 前几年
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.util.ticket.IdCardUtil;
|
||||
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AgeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AggregationVO;
|
||||
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.SaleDataItemTypeVo;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.saledata.SaleData;
|
||||
import cn.iocoder.yudao.module.datacenter.dal.mongodb.saledata.SaleDataRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -17,6 +18,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -210,6 +212,23 @@ public class SaleDataServiceImpl implements SaleDataService {
|
||||
return mapList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> findByDoItemType() {
|
||||
List<SaleDataItemTypeVo> list = saleDataRepository.findAllByItemtypename();
|
||||
Map<String, Long> countMap = list.stream()
|
||||
.collect(Collectors.groupingBy(SaleDataItemTypeVo::getItemtypename, Collectors.counting()));
|
||||
List<Map<String, String>> mapArrayList = new ArrayList<>();
|
||||
for (String s : countMap.keySet()) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("TypeName",s);
|
||||
map.put("count",countMap.get(s).toString());
|
||||
mapArrayList.add(map);
|
||||
// map.clear();
|
||||
}
|
||||
|
||||
return mapArrayList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> findWuyi(int x) {
|
||||
DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
|
@ -19,10 +19,13 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode VEHICLE_RENEWAL_RECORD_NOT_EXISTS = new ErrorCode(22222, "固定车续费记录不存在");
|
||||
ErrorCode WARNING_NOT_EXISTS = new ErrorCode(33333, "告警记录不存在");
|
||||
ErrorCode WHITE_NOT_EXISTS = new ErrorCode(444444, "白名单管理不存在");
|
||||
ErrorCode BLACK_NOT_EXISTS = new ErrorCode(55555, "黑名单管理不存在");
|
||||
// ========== 收费信息 1_005_001_029 ==========
|
||||
ErrorCode CHARGE_INFO_NOT_EXISTS = new ErrorCode(1_005_001_029, "收费信息不存在");
|
||||
// ========== 远程抬杠日志 1_005_001_030 ==========
|
||||
ErrorCode LIFTING_ROD_NOT_EXISTS = new ErrorCode(1_005_001_030, "远程抬杠日志不存在");
|
||||
// ========== 预约车 1_005_001_031 ==========
|
||||
ErrorCode BOOK_CAR_NOT_EXISTS = new ErrorCode(1_005_001_031, "预约车不存在");
|
||||
ErrorCode ENTRY_RECORD_NOT_EXISTS = new ErrorCode(666666, "入场记录不存在");
|
||||
ErrorCode APPEARANCE_RECORD_NOT_EXISTS = new ErrorCode(77777, "出场记录不存在");
|
||||
}
|
||||
|
@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.appearancerecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.AppearanceRecordVO;
|
||||
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.appearancerecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.AppearanceRecordDO;
|
||||
import cn.iocoder.yudao.module.parking.service.appearancerecord.AppearanceRecordService;
|
||||
|
||||
@Tag(name = "管理后台 - 出场记录")
|
||||
@RestController
|
||||
@RequestMapping("/parking/appearance-record")
|
||||
@Validated
|
||||
public class AppearanceRecordController {
|
||||
|
||||
@Resource
|
||||
private AppearanceRecordService appearanceRecordService;
|
||||
|
||||
|
||||
@PostMapping("/upAppearanceRecord")
|
||||
@Operation(summary = "实时发送出场记录")
|
||||
public BlueCardResult upAppearanceRecord(@RequestBody AppearanceRecordVO appearanceRecordVO) {
|
||||
return appearanceRecordService.upAppearanceRecord(appearanceRecordVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建出场记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:appearance-record:create')")
|
||||
public CommonResult<Long> createAppearanceRecord(@Valid @RequestBody AppearanceRecordSaveReqVO createReqVO) {
|
||||
return success(appearanceRecordService.createAppearanceRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新出场记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:appearance-record:update')")
|
||||
public CommonResult<Boolean> updateAppearanceRecord(@Valid @RequestBody AppearanceRecordSaveReqVO updateReqVO) {
|
||||
appearanceRecordService.updateAppearanceRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除出场记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:appearance-record:delete')")
|
||||
public CommonResult<Boolean> deleteAppearanceRecord(@RequestParam("id") Long id) {
|
||||
appearanceRecordService.deleteAppearanceRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得出场记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:appearance-record:query')")
|
||||
public CommonResult<AppearanceRecordRespVO> getAppearanceRecord(@RequestParam("id") Long id) {
|
||||
AppearanceRecordDO appearanceRecord = appearanceRecordService.getAppearanceRecord(id);
|
||||
return success(BeanUtils.toBean(appearanceRecord, AppearanceRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得出场记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:appearance-record:query')")
|
||||
public CommonResult<PageResult<AppearanceRecordRespVO>> getAppearanceRecordPage(@Valid AppearanceRecordPageReqVO pageReqVO) {
|
||||
PageResult<AppearanceRecordDO> pageResult = appearanceRecordService.getAppearanceRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AppearanceRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出出场记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:appearance-record:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAppearanceRecordExcel(@Valid AppearanceRecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AppearanceRecordDO> list = appearanceRecordService.getAppearanceRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "出场记录.xls", "数据", AppearanceRecordRespVO.class,
|
||||
BeanUtils.toBean(list, AppearanceRecordRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.appearancerecord.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 AppearanceRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "入场记录编号", example = "20322")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "停车场编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "操作员 Id", example = "1640")
|
||||
private String operatorId;
|
||||
|
||||
@Schema(description = "操作员姓名", example = "张三")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "发票号码")
|
||||
private String invoiceNo;
|
||||
|
||||
@Schema(description = "车牌")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "证件号码")
|
||||
private String idCard;
|
||||
|
||||
@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 inImage;
|
||||
|
||||
@Schema(description = "出场图片名")
|
||||
private String outImage;
|
||||
|
||||
@Schema(description = "入口通道名称")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "出口通道名称")
|
||||
private String outChannel;
|
||||
|
||||
@Schema(description = "抬杆模式")
|
||||
private String openGateMode;
|
||||
|
||||
@Schema(description = "匹配模式")
|
||||
private String matchMode;
|
||||
|
||||
@Schema(description = "总停车费")
|
||||
private String charge;
|
||||
|
||||
@Schema(description = "线上总收费")
|
||||
private String onLineCharge;
|
||||
|
||||
@Schema(description = "线下总收费")
|
||||
private String offLineCharge;
|
||||
|
||||
@Schema(description = "线上线下金额和时间优惠累计抵扣值")
|
||||
private String profitChargeTotal;
|
||||
|
||||
@Schema(description = "线上累计优惠金额总面值")
|
||||
private String onLineProfitChargeNum;
|
||||
|
||||
@Schema(description = "线上累计优惠金额总抵扣值")
|
||||
private String onLineProfitChargeValue;
|
||||
|
||||
@Schema(description = "线下累计优惠金额总面值")
|
||||
private String offLineProfitChargeNum;
|
||||
|
||||
@Schema(description = "线下累计优惠金额总抵扣值")
|
||||
private String offLineProfitChargeValue;
|
||||
|
||||
@Schema(description = "线上累计优惠时间")
|
||||
private String onLineProfitTimeNum;
|
||||
|
||||
@Schema(description = "线上累计优惠时间总抵扣值")
|
||||
private String onLineProfitTimeValue;
|
||||
|
||||
@Schema(description = "线下累计优惠时间")
|
||||
private String offLineProfitTimeNum;
|
||||
|
||||
@Schema(description = "线下累计优惠时间总抵扣值")
|
||||
private String offLineProfitTimeValue;
|
||||
|
||||
@Schema(description = "时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] costTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.appearancerecord.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.*;
|
||||
|
||||
@Schema(description = "管理后台 - 出场记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AppearanceRecordRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20113")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入场记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20322")
|
||||
@ExcelProperty("入场记录编号")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "停车场编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("停车场编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "操作员 Id", example = "1640")
|
||||
@ExcelProperty("操作员 Id")
|
||||
private String operatorId;
|
||||
|
||||
@Schema(description = "操作员姓名", example = "张三")
|
||||
@ExcelProperty("操作员姓名")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "发票号码")
|
||||
@ExcelProperty("发票号码")
|
||||
private String invoiceNo;
|
||||
|
||||
@Schema(description = "车牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("车牌")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "证件号码")
|
||||
@ExcelProperty("证件号码")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "入场时间")
|
||||
@ExcelProperty("入场时间")
|
||||
private String inTime;
|
||||
|
||||
@Schema(description = "出场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("出场时间")
|
||||
private String outTime;
|
||||
|
||||
@Schema(description = "入场图片名")
|
||||
@ExcelProperty("入场图片名")
|
||||
private String inImage;
|
||||
|
||||
@Schema(description = "出场图片名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("出场图片名")
|
||||
private String outImage;
|
||||
|
||||
@Schema(description = "入口通道名称")
|
||||
@ExcelProperty("入口通道名称")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "出口通道名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("出口通道名称")
|
||||
private String outChannel;
|
||||
|
||||
@Schema(description = "抬杆模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("抬杆模式")
|
||||
private String openGateMode;
|
||||
|
||||
@Schema(description = "匹配模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("匹配模式")
|
||||
private String matchMode;
|
||||
|
||||
@Schema(description = "总停车费", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("总停车费")
|
||||
private String charge;
|
||||
|
||||
@Schema(description = "线上总收费", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线上总收费")
|
||||
private String onLineCharge;
|
||||
|
||||
@Schema(description = "线下总收费", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线下总收费")
|
||||
private String offLineCharge;
|
||||
|
||||
@Schema(description = "线上线下金额和时间优惠累计抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线上线下金额和时间优惠累计抵扣值")
|
||||
private String profitChargeTotal;
|
||||
|
||||
@Schema(description = "线上累计优惠金额总面值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线上累计优惠金额总面值")
|
||||
private String onLineProfitChargeNum;
|
||||
|
||||
@Schema(description = "线上累计优惠金额总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线上累计优惠金额总抵扣值")
|
||||
private String onLineProfitChargeValue;
|
||||
|
||||
@Schema(description = "线下累计优惠金额总面值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线下累计优惠金额总面值")
|
||||
private String offLineProfitChargeNum;
|
||||
|
||||
@Schema(description = "线下累计优惠金额总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线下累计优惠金额总抵扣值")
|
||||
private String offLineProfitChargeValue;
|
||||
|
||||
@Schema(description = "线上累计优惠时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线上累计优惠时间")
|
||||
private String onLineProfitTimeNum;
|
||||
|
||||
@Schema(description = "线上累计优惠时间总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线上累计优惠时间总抵扣值")
|
||||
private String onLineProfitTimeValue;
|
||||
|
||||
@Schema(description = "线下累计优惠时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线下累计优惠时间")
|
||||
private String offLineProfitTimeNum;
|
||||
|
||||
@Schema(description = "线下累计优惠时间总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("线下累计优惠时间总抵扣值")
|
||||
private String offLineProfitTimeValue;
|
||||
|
||||
@Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("时间")
|
||||
private String costTime;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.appearancerecord.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 AppearanceRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20113")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入场记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20322")
|
||||
@NotEmpty(message = "入场记录编号不能为空")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "停车场编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "停车场编号不能为空")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "操作员 Id", example = "1640")
|
||||
private String operatorId;
|
||||
|
||||
@Schema(description = "操作员姓名", example = "张三")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "发票号码")
|
||||
private String invoiceNo;
|
||||
|
||||
@Schema(description = "车牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "车牌不能为空")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "证件号码")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "入场时间")
|
||||
private String inTime;
|
||||
|
||||
@Schema(description = "出场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "出场时间不能为空")
|
||||
private String outTime;
|
||||
|
||||
@Schema(description = "入场图片名")
|
||||
private String inImage;
|
||||
|
||||
@Schema(description = "出场图片名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "出场图片名不能为空")
|
||||
private String outImage;
|
||||
|
||||
@Schema(description = "入口通道名称")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "出口通道名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "出口通道名称不能为空")
|
||||
private String outChannel;
|
||||
|
||||
@Schema(description = "抬杆模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "抬杆模式不能为空")
|
||||
private String openGateMode;
|
||||
|
||||
@Schema(description = "匹配模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "匹配模式不能为空")
|
||||
private String matchMode;
|
||||
|
||||
@Schema(description = "总停车费", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "总停车费不能为空")
|
||||
private String charge;
|
||||
|
||||
@Schema(description = "线上总收费", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线上总收费不能为空")
|
||||
private String onLineCharge;
|
||||
|
||||
@Schema(description = "线下总收费", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线下总收费不能为空")
|
||||
private String offLineCharge;
|
||||
|
||||
@Schema(description = "线上线下金额和时间优惠累计抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线上线下金额和时间优惠累计抵扣值不能为空")
|
||||
private String profitChargeTotal;
|
||||
|
||||
@Schema(description = "线上累计优惠金额总面值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线上累计优惠金额总面值不能为空")
|
||||
private String onLineProfitChargeNum;
|
||||
|
||||
@Schema(description = "线上累计优惠金额总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线上累计优惠金额总抵扣值不能为空")
|
||||
private String onLineProfitChargeValue;
|
||||
|
||||
@Schema(description = "线下累计优惠金额总面值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线下累计优惠金额总面值不能为空")
|
||||
private String offLineProfitChargeNum;
|
||||
|
||||
@Schema(description = "线下累计优惠金额总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线下累计优惠金额总抵扣值不能为空")
|
||||
private String offLineProfitChargeValue;
|
||||
|
||||
@Schema(description = "线上累计优惠时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线上累计优惠时间不能为空")
|
||||
private String onLineProfitTimeNum;
|
||||
|
||||
@Schema(description = "线上累计优惠时间总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线上累计优惠时间总抵扣值不能为空")
|
||||
private String onLineProfitTimeValue;
|
||||
|
||||
@Schema(description = "线下累计优惠时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线下累计优惠时间不能为空")
|
||||
private String offLineProfitTimeNum;
|
||||
|
||||
@Schema(description = "线下累计优惠时间总抵扣值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "线下累计优惠时间总抵扣值不能为空")
|
||||
private String offLineProfitTimeValue;
|
||||
|
||||
@Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "时间不能为空")
|
||||
private String costTime;
|
||||
|
||||
}
|
@ -0,0 +1,225 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.black;
|
||||
|
||||
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.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
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.black.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.black.BlackDO;
|
||||
import cn.iocoder.yudao.module.parking.service.black.BlackService;
|
||||
|
||||
@Tag(name = "管理后台 - 黑名单")
|
||||
@RestController
|
||||
@RequestMapping("/parking/black")
|
||||
@Validated
|
||||
public class BlackController {
|
||||
|
||||
@Resource
|
||||
private BlackService blackService;
|
||||
|
||||
|
||||
/**
|
||||
* 删除黑名单
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/delBlack")
|
||||
public CommonResult<Boolean> deleteBlack(BlackDO blackDO) {
|
||||
//设置请求参数
|
||||
BlackVO blackVO = new BlackVO();
|
||||
blackVO.setParkNumber(blackDO.getParkNumber());
|
||||
blackVO.setSource(blackDO.getSource());
|
||||
List<Datas> datasList = new ArrayList<>();
|
||||
Datas datas = new Datas();
|
||||
datas.setPlate(blackDO.getPlate());
|
||||
datas.setMemo(blackDO.getMemo());
|
||||
datasList.add(datas);
|
||||
blackVO.setDatas(datasList);
|
||||
//调用蓝卡接口
|
||||
try {
|
||||
String url = "http://蓝卡云 ip:端口/bcopenapi/out/delBlack";
|
||||
URL obj = new URL(url);
|
||||
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
||||
// 请求方式
|
||||
con.setRequestMethod("GET");
|
||||
// 获取响应
|
||||
int responseCode = con.getResponseCode();
|
||||
System.out.println("Response Code : " + responseCode);
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
|
||||
String inputLine;
|
||||
StringBuilder response = new StringBuilder();
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
response.append(inputLine);
|
||||
}
|
||||
in.close();
|
||||
System.out.println(response.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 黑名单查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/queryBlack")
|
||||
public CommonResult<Boolean> queryBlack(BlackDO blackDO) {
|
||||
//设置请求参数
|
||||
BlackVO blackVO = new BlackVO();
|
||||
blackVO.setParkNumber(blackDO.getParkNumber());
|
||||
List<Datas> datasList = new ArrayList<>();
|
||||
Datas datas = new Datas();
|
||||
datas.setPlate(blackDO.getPlate());
|
||||
datasList.add(datas);
|
||||
blackVO.setDatas(datasList);
|
||||
//调用蓝卡接口
|
||||
try {
|
||||
String url = " http://蓝卡云 ip:端口/bcopenapi/out/queryBlack";
|
||||
URL obj = new URL(url);
|
||||
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
||||
// 请求方式
|
||||
con.setRequestMethod("GET");
|
||||
// 获取响应
|
||||
int responseCode = con.getResponseCode();
|
||||
System.out.println("Response Code : " + responseCode);
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
|
||||
String inputLine;
|
||||
StringBuilder response = new StringBuilder();
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
response.append(inputLine);
|
||||
}
|
||||
in.close();
|
||||
System.out.println(response.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/synBlack")
|
||||
public CommonResult<Boolean> synBlack(BlackDO blackDO) {
|
||||
//设置请求参数
|
||||
BlackVO blackVO = new BlackVO();
|
||||
blackVO.setParkNumber(blackDO.getParkNumber());
|
||||
blackVO.setSource(blackDO.getSource());
|
||||
List<Datas> datasList = new ArrayList<>();
|
||||
Datas datas = new Datas();
|
||||
datas.setPlate(blackDO.getPlate());
|
||||
datas.setMemo(blackDO.getMemo());
|
||||
datasList.add(datas);
|
||||
blackVO.setDatas(datasList);
|
||||
//调用蓝卡接口
|
||||
try {
|
||||
String url = "http://蓝卡云 ip:端口/bcopenapi/out/synBlack";
|
||||
URL obj = new URL(url);
|
||||
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
||||
// 请求方式
|
||||
con.setRequestMethod("GET");
|
||||
// 获取响应
|
||||
int responseCode = con.getResponseCode();
|
||||
System.out.println("Response Code : " + responseCode);
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
|
||||
String inputLine;
|
||||
StringBuilder response = new StringBuilder();
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
response.append(inputLine);
|
||||
}
|
||||
in.close();
|
||||
System.out.println(response.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建黑名单")
|
||||
@PreAuthorize("@ss.hasPermission('parking:black:create')")
|
||||
public CommonResult<Long> createBlack(@Valid @RequestBody BlackSaveReqVO createReqVO) {
|
||||
return success(blackService.createBlack(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新黑名单")
|
||||
@PreAuthorize("@ss.hasPermission('parking:black:update')")
|
||||
public CommonResult<Boolean> updateBlack(@Valid @RequestBody BlackSaveReqVO updateReqVO) {
|
||||
blackService.updateBlack(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除黑名单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:black:delete')")
|
||||
public CommonResult<Boolean> deleteBlack(@RequestParam("id") Long id) {
|
||||
blackService.deleteBlack(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得黑名单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:black:query')")
|
||||
public CommonResult<BlackRespVO> getBlack(@RequestParam("id") Long id) {
|
||||
BlackDO black = blackService.getBlack(id);
|
||||
return success(BeanUtils.toBean(black, BlackRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得黑名单分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:black:query')")
|
||||
public CommonResult<PageResult<BlackRespVO>> getBlackPage(@Valid BlackPageReqVO pageReqVO) {
|
||||
PageResult<BlackDO> pageResult = blackService.getBlackPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BlackRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出黑名单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:black:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBlackExcel(@Valid BlackPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BlackDO> list = blackService.getBlackPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "黑名单.xls", "数据", BlackRespVO.class,
|
||||
BeanUtils.toBean(list, BlackRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.black.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 BlackPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.black.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 BlackRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23847")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
@ExcelProperty("场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "来源")
|
||||
@ExcelProperty(value = "来源", converter = DictConvert.class)
|
||||
@DictFormat("black_source") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String source;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
@ExcelProperty("车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.black.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 BlackSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23847")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String memo;
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.black.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BlackVO {
|
||||
private String parkNumber;
|
||||
private String source;
|
||||
private List<Datas> datas;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.black.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Datas {
|
||||
private String plate;
|
||||
private String memo;
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.entryrecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.EntryRecordVO;
|
||||
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.entryrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.EntryRecordDO;
|
||||
import cn.iocoder.yudao.module.parking.service.entryrecord.EntryRecordService;
|
||||
|
||||
@Tag(name = "管理后台 - 入场记录")
|
||||
@RestController
|
||||
@RequestMapping("/parking/entry-record")
|
||||
@Validated
|
||||
public class EntryRecordController {
|
||||
|
||||
@Resource
|
||||
private EntryRecordService entryRecordService;
|
||||
|
||||
|
||||
@PostMapping("/upEntryRecord")
|
||||
@Operation(summary = "实时发送入场记录")
|
||||
public BlueCardResult upEntryRecord(@RequestBody EntryRecordVO entryRecordVO) {
|
||||
return entryRecordService.upEntryRecord(entryRecordVO);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建入场记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:create')")
|
||||
public CommonResult<Long> createEntryRecord(@Valid @RequestBody EntryRecordSaveReqVO createReqVO) {
|
||||
return success(entryRecordService.createEntryRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新入场记录")
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:update')")
|
||||
public CommonResult<Boolean> updateEntryRecord(@Valid @RequestBody EntryRecordSaveReqVO updateReqVO) {
|
||||
entryRecordService.updateEntryRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除入场记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:delete')")
|
||||
public CommonResult<Boolean> deleteEntryRecord(@RequestParam("id") Long id) {
|
||||
entryRecordService.deleteEntryRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得入场记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:query')")
|
||||
public CommonResult<EntryRecordRespVO> getEntryRecord(@RequestParam("id") Long id) {
|
||||
EntryRecordDO entryRecord = entryRecordService.getEntryRecord(id);
|
||||
return success(BeanUtils.toBean(entryRecord, EntryRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得入场记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:query')")
|
||||
public CommonResult<PageResult<EntryRecordRespVO>> getEntryRecordPage(@Valid EntryRecordPageReqVO pageReqVO) {
|
||||
PageResult<EntryRecordDO> pageResult = entryRecordService.getEntryRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EntryRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出入场记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('parking:entry-record:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportEntryRecordExcel(@Valid EntryRecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<EntryRecordDO> list = entryRecordService.getEntryRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "入场记录.xls", "数据", EntryRecordRespVO.class,
|
||||
BeanUtils.toBean(list, EntryRecordRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.entryrecord.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 EntryRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "入场记录编号", example = "4622")
|
||||
private String orderId;
|
||||
|
||||
@Schema(description = "场库编号")
|
||||
private String parkNumber;
|
||||
|
||||
@Schema(description = "车牌")
|
||||
private String plate;
|
||||
|
||||
@Schema(description = "证件号码")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "入场时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] inTime;
|
||||
|
||||
@Schema(description = "入场通道名称")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "入场图片名")
|
||||
private String inImage;
|
||||
|
||||
@Schema(description = "访问事由", example = "不对")
|
||||
private String visitReason;
|
||||
|
||||
@Schema(description = "放行类型")
|
||||
private String openGateMode;
|
||||
|
||||
@Schema(description = "匹配模式")
|
||||
private String matchMode;
|
||||
|
||||
@Schema(description = "是否开闸")
|
||||
private String barriorOpen;
|
||||
|
||||
@Schema(description = "开闸耗时")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] costTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.entryrecord.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.*;
|
||||
|
||||
@Schema(description = "管理后台 - 入场记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EntryRecordRespVO {
|
||||
|
||||
@Schema(description = "入场id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31287")
|
||||
@ExcelProperty("入场id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入场记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4622")
|
||||
@ExcelProperty("入场记录编号")
|
||||
private String orderId;
|
||||
|
||||
@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)
|
||||
@ExcelProperty("证件号码")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "入场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("入场时间")
|
||||
private String inTime;
|
||||
|
||||
@Schema(description = "入场通道名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("入场通道名称")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "入场图片名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("入场图片名")
|
||||
private String inImage;
|
||||
|
||||
@Schema(description = "访问事由", requiredMode = Schema.RequiredMode.REQUIRED, example = "不对")
|
||||
@ExcelProperty("访问事由")
|
||||
private String visitReason;
|
||||
|
||||
@Schema(description = "放行类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("放行类型")
|
||||
private String openGateMode;
|
||||
|
||||
@Schema(description = "匹配模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("匹配模式")
|
||||
private String matchMode;
|
||||
|
||||
@Schema(description = "是否开闸", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否开闸")
|
||||
private String barriorOpen;
|
||||
|
||||
@Schema(description = "开闸耗时", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("开闸耗时")
|
||||
private String costTime;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.parking.controller.admin.entryrecord.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 EntryRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "入场id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31287")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入场记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4622")
|
||||
@NotEmpty(message = "入场记录编号不能为空")
|
||||
private String orderId;
|
||||
|
||||
@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)
|
||||
@NotEmpty(message = "证件号码不能为空")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "入场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "入场时间不能为空")
|
||||
private String inTime;
|
||||
|
||||
@Schema(description = "入场通道名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "入场通道名称不能为空")
|
||||
private String inChannel;
|
||||
|
||||
@Schema(description = "入场图片名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "入场图片名不能为空")
|
||||
private String inImage;
|
||||
|
||||
@Schema(description = "访问事由", requiredMode = Schema.RequiredMode.REQUIRED, example = "不对")
|
||||
@NotEmpty(message = "访问事由不能为空")
|
||||
private String visitReason;
|
||||
|
||||
@Schema(description = "放行类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "放行类型不能为空")
|
||||
private String openGateMode;
|
||||
|
||||
@Schema(description = "匹配模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "匹配模式不能为空")
|
||||
private String matchMode;
|
||||
|
||||
@Schema(description = "是否开闸", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否开闸不能为空")
|
||||
private String barriorOpen;
|
||||
|
||||
@Schema(description = "开闸耗时", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "开闸耗时不能为空")
|
||||
private String costTime;
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
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 WhiteDeleteDO {
|
||||
private String parkNumber;
|
||||
private String plate;
|
||||
private List<AreasAndValidityDO> areasAndValidity;
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord;
|
||||
|
||||
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("appearance_record")
|
||||
@KeySequence("appearance_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AppearanceRecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 入场记录编号
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 停车场编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 操作员 Id
|
||||
*/
|
||||
private String operatorId;
|
||||
/**
|
||||
* 操作员姓名
|
||||
*/
|
||||
private String operatorName;
|
||||
/**
|
||||
* 发票号码
|
||||
*/
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
private String inTime;
|
||||
/**
|
||||
* 出场时间
|
||||
*/
|
||||
private String outTime;
|
||||
/**
|
||||
* 入场图片名
|
||||
*/
|
||||
private String inImage;
|
||||
/**
|
||||
* 出场图片名
|
||||
*/
|
||||
private String outImage;
|
||||
/**
|
||||
* 入口通道名称
|
||||
*/
|
||||
private String inChannel;
|
||||
/**
|
||||
* 出口通道名称
|
||||
*/
|
||||
private String outChannel;
|
||||
/**
|
||||
* 抬杆模式
|
||||
*/
|
||||
private String openGateMode;
|
||||
/**
|
||||
* 匹配模式
|
||||
*/
|
||||
private String matchMode;
|
||||
/**
|
||||
* 总停车费
|
||||
*/
|
||||
private String charge;
|
||||
/**
|
||||
* 线上总收费
|
||||
*/
|
||||
private String onLineCharge;
|
||||
/**
|
||||
* 线下总收费
|
||||
*/
|
||||
private String offLineCharge;
|
||||
/**
|
||||
* 线上线下金额和时间优惠累计抵扣值
|
||||
*/
|
||||
private String profitChargeTotal;
|
||||
/**
|
||||
* 线上累计优惠金额总面值
|
||||
*/
|
||||
private String onLineProfitChargeNum;
|
||||
/**
|
||||
* 线上累计优惠金额总抵扣值
|
||||
*/
|
||||
private String onLineProfitChargeValue;
|
||||
/**
|
||||
* 线下累计优惠金额总面值
|
||||
*/
|
||||
private String offLineProfitChargeNum;
|
||||
/**
|
||||
* 线下累计优惠金额总抵扣值
|
||||
*/
|
||||
private String offLineProfitChargeValue;
|
||||
/**
|
||||
* 线上累计优惠时间
|
||||
*/
|
||||
private String onLineProfitTimeNum;
|
||||
/**
|
||||
* 线上累计优惠时间总抵扣值
|
||||
*/
|
||||
private String onLineProfitTimeValue;
|
||||
/**
|
||||
* 线下累计优惠时间
|
||||
*/
|
||||
private String offLineProfitTimeNum;
|
||||
/**
|
||||
* 线下累计优惠时间总抵扣值
|
||||
*/
|
||||
private String offLineProfitTimeValue;
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
private String costTime;
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AppearanceRecordVO {
|
||||
private String parkNumber;
|
||||
private Integer size;
|
||||
private List<DataList> datas = new ArrayList<>();
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChargeStatistics {
|
||||
private String charge;
|
||||
private String onLineCharge;
|
||||
private String offLineCharge;
|
||||
private String profitChargeTotal;
|
||||
private String onLineProfitChargeNum;
|
||||
private String onLineProfitChargeValue;
|
||||
private String offLineProfitChargeNum;
|
||||
private String offLineProfitChargeValue;
|
||||
private String onLineProfitTimeNum;
|
||||
private String onLineProfitTimeValue;
|
||||
private String offLineProfitTimeNum;
|
||||
private String offLineProfitTimeValue;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.charge.ChargeDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.placeinfo.PlaceInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.profit.ProfitDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.userinfo.UserInfoDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DataList {
|
||||
private String orderId;
|
||||
private String operatorId;
|
||||
private String operatorName;
|
||||
private String invoiceNo;
|
||||
private CarInfoDO carInfo;
|
||||
private UserInfoDO userInfo;
|
||||
private PassInfo passInfo;
|
||||
private ChargeStatistics chargeStatistics;
|
||||
private List<ChargeDO> chargeList = new ArrayList<>();
|
||||
private List<ProfitDO> profitList = new ArrayList<>();
|
||||
private List<PlaceInfoDO> placeInfo = new ArrayList<>();
|
||||
private String costTime;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PassInfo {
|
||||
private String inTime;
|
||||
private String outTime;
|
||||
private String inImage;
|
||||
private String outImage;
|
||||
private String inChannel;
|
||||
private String outChannel;
|
||||
private String openCateMode;
|
||||
private String matchMode;
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.black;
|
||||
|
||||
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("black")
|
||||
@KeySequence("black_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BlackDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 来源
|
||||
*
|
||||
* 枚举 {@link TODO black_source 对应的类}
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.charge;
|
||||
|
||||
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("charge")
|
||||
@KeySequence("charge_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ChargeDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 出场id
|
||||
*/
|
||||
private Long appearanceId;
|
||||
/**
|
||||
* 支付订单号
|
||||
*/
|
||||
private String payNo;
|
||||
/**
|
||||
* 结算时间
|
||||
*/
|
||||
private String getTime;
|
||||
/**
|
||||
* 支付金额
|
||||
*/
|
||||
private String payCharge;
|
||||
/**
|
||||
* 支付类型
|
||||
*/
|
||||
private String payKind;
|
||||
/**
|
||||
* 支付渠道
|
||||
*/
|
||||
private String payChannel;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.placeinfo.PlaceInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.userinfo.UserInfoDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Datas {
|
||||
private String plate;
|
||||
private String ticketCode;
|
||||
private String plateColor;
|
||||
private String inTime;
|
||||
private String inChannel;
|
||||
private String inImage;
|
||||
private String orderId;
|
||||
private String visitReason;
|
||||
private String openGateMode;
|
||||
private String matchMode;
|
||||
private String idCard;
|
||||
private Integer confidence;
|
||||
private String carType;
|
||||
private UserInfoDO userInfoDO;
|
||||
private List<PlaceInfoDO> placeInfo = new ArrayList<>();
|
||||
private String barriorOpen;
|
||||
private String costTime;
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord;
|
||||
|
||||
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("entry_record")
|
||||
@KeySequence("entry_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EntryRecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 入场id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 入场记录编号
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 场库编号
|
||||
*/
|
||||
private String parkNumber;
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String plate;
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 入场时间
|
||||
*/
|
||||
private String inTime;
|
||||
/**
|
||||
* 入场通道名称
|
||||
*/
|
||||
private String inChannel;
|
||||
/**
|
||||
* 入场图片名
|
||||
*/
|
||||
private String inImage;
|
||||
/**
|
||||
* 访问事由
|
||||
*/
|
||||
private String visitReason;
|
||||
/**
|
||||
* 放行类型
|
||||
*/
|
||||
private String openGateMode;
|
||||
/**
|
||||
* 匹配模式
|
||||
*/
|
||||
private String matchMode;
|
||||
/**
|
||||
* 是否开闸
|
||||
*/
|
||||
private String barriorOpen;
|
||||
/**
|
||||
* 开闸耗时
|
||||
*/
|
||||
private String costTime;
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord;
|
||||
|
||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class EntryRecordVO {
|
||||
private String parkNumber;
|
||||
private Integer size;
|
||||
private List<Datas> datas = new ArrayList<>();
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.placeinfo;
|
||||
|
||||
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("place_info")
|
||||
@KeySequence("place_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlaceInfoDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 入场id
|
||||
*/
|
||||
private Long entryId;
|
||||
/**
|
||||
* 车位编号
|
||||
*/
|
||||
private String placeNumber;
|
||||
/**
|
||||
* 区域id
|
||||
*/
|
||||
private String areaId;
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.dataobject.profit;
|
||||
|
||||
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("profit")
|
||||
@KeySequence("profit_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProfitDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 出场id
|
||||
*/
|
||||
private Long appearanceId;
|
||||
/**
|
||||
* 优惠码
|
||||
*/
|
||||
private String profitCode;
|
||||
/**
|
||||
* 入场记录编号
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 优惠下发时间
|
||||
*/
|
||||
private String getTime;
|
||||
/**
|
||||
* 优惠时间
|
||||
*/
|
||||
private String profitTime;
|
||||
/**
|
||||
* 优惠金额面值
|
||||
*/
|
||||
private String profitCharge;
|
||||
/**
|
||||
* 生效金额
|
||||
*/
|
||||
private String profitChargeValue;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
}
|
@ -25,7 +25,7 @@ public class UserInfoDO extends BaseDO {
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
// @TableId(type = IdType.INPUT)
|
||||
@TableId
|
||||
private String idCard;
|
||||
/**
|
||||
* 车主姓名
|
||||
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.appearancerecord;
|
||||
|
||||
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.appearancerecord.AppearanceRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.appearancerecord.vo.*;
|
||||
|
||||
/**
|
||||
* 出场记录 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppearanceRecordMapper extends BaseMapperX<AppearanceRecordDO> {
|
||||
|
||||
default PageResult<AppearanceRecordDO> selectPage(AppearanceRecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AppearanceRecordDO>()
|
||||
.eqIfPresent(AppearanceRecordDO::getOrderId, reqVO.getOrderId())
|
||||
.eqIfPresent(AppearanceRecordDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(AppearanceRecordDO::getOperatorId, reqVO.getOperatorId())
|
||||
.likeIfPresent(AppearanceRecordDO::getOperatorName, reqVO.getOperatorName())
|
||||
.eqIfPresent(AppearanceRecordDO::getInvoiceNo, reqVO.getInvoiceNo())
|
||||
.eqIfPresent(AppearanceRecordDO::getPlate, reqVO.getPlate())
|
||||
.eqIfPresent(AppearanceRecordDO::getIdCard, reqVO.getIdCard())
|
||||
.betweenIfPresent(AppearanceRecordDO::getInTime, reqVO.getInTime())
|
||||
.betweenIfPresent(AppearanceRecordDO::getOutTime, reqVO.getOutTime())
|
||||
.eqIfPresent(AppearanceRecordDO::getInImage, reqVO.getInImage())
|
||||
.eqIfPresent(AppearanceRecordDO::getOutImage, reqVO.getOutImage())
|
||||
.eqIfPresent(AppearanceRecordDO::getInChannel, reqVO.getInChannel())
|
||||
.eqIfPresent(AppearanceRecordDO::getOutChannel, reqVO.getOutChannel())
|
||||
.eqIfPresent(AppearanceRecordDO::getOpenGateMode, reqVO.getOpenGateMode())
|
||||
.eqIfPresent(AppearanceRecordDO::getMatchMode, reqVO.getMatchMode())
|
||||
.eqIfPresent(AppearanceRecordDO::getCharge, reqVO.getCharge())
|
||||
.eqIfPresent(AppearanceRecordDO::getOnLineCharge, reqVO.getOnLineCharge())
|
||||
.eqIfPresent(AppearanceRecordDO::getOffLineCharge, reqVO.getOffLineCharge())
|
||||
.eqIfPresent(AppearanceRecordDO::getProfitChargeTotal, reqVO.getProfitChargeTotal())
|
||||
.eqIfPresent(AppearanceRecordDO::getOnLineProfitChargeNum, reqVO.getOnLineProfitChargeNum())
|
||||
.eqIfPresent(AppearanceRecordDO::getOnLineProfitChargeValue, reqVO.getOnLineProfitChargeValue())
|
||||
.eqIfPresent(AppearanceRecordDO::getOffLineProfitChargeNum, reqVO.getOffLineProfitChargeNum())
|
||||
.eqIfPresent(AppearanceRecordDO::getOffLineProfitChargeValue, reqVO.getOffLineProfitChargeValue())
|
||||
.eqIfPresent(AppearanceRecordDO::getOnLineProfitTimeNum, reqVO.getOnLineProfitTimeNum())
|
||||
.eqIfPresent(AppearanceRecordDO::getOnLineProfitTimeValue, reqVO.getOnLineProfitTimeValue())
|
||||
.eqIfPresent(AppearanceRecordDO::getOffLineProfitTimeNum, reqVO.getOffLineProfitTimeNum())
|
||||
.eqIfPresent(AppearanceRecordDO::getOffLineProfitTimeValue, reqVO.getOffLineProfitTimeValue())
|
||||
.betweenIfPresent(AppearanceRecordDO::getCostTime, reqVO.getCostTime())
|
||||
.betweenIfPresent(AppearanceRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AppearanceRecordDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.black;
|
||||
|
||||
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.black.BlackDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.black.vo.*;
|
||||
|
||||
/**
|
||||
* 黑名单 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface BlackMapper extends BaseMapperX<BlackDO> {
|
||||
|
||||
default PageResult<BlackDO> selectPage(BlackPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BlackDO>()
|
||||
.eqIfPresent(BlackDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(BlackDO::getSource, reqVO.getSource())
|
||||
.eqIfPresent(BlackDO::getPlate, reqVO.getPlate())
|
||||
.eqIfPresent(BlackDO::getMemo, reqVO.getMemo())
|
||||
.betweenIfPresent(BlackDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(BlackDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.charge;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.charge.ChargeDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 收费明细 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ChargeMapper extends BaseMapperX<ChargeDO> {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.entryrecord;
|
||||
|
||||
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.entryrecord.EntryRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.entryrecord.vo.*;
|
||||
|
||||
/**
|
||||
* 入场记录 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface EntryRecordMapper extends BaseMapperX<EntryRecordDO> {
|
||||
|
||||
default PageResult<EntryRecordDO> selectPage(EntryRecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<EntryRecordDO>()
|
||||
.eqIfPresent(EntryRecordDO::getOrderId, reqVO.getOrderId())
|
||||
.eqIfPresent(EntryRecordDO::getParkNumber, reqVO.getParkNumber())
|
||||
.eqIfPresent(EntryRecordDO::getPlate, reqVO.getPlate())
|
||||
.eqIfPresent(EntryRecordDO::getIdCard, reqVO.getIdCard())
|
||||
.betweenIfPresent(EntryRecordDO::getInTime, reqVO.getInTime())
|
||||
.eqIfPresent(EntryRecordDO::getInChannel, reqVO.getInChannel())
|
||||
.eqIfPresent(EntryRecordDO::getInImage, reqVO.getInImage())
|
||||
.eqIfPresent(EntryRecordDO::getVisitReason, reqVO.getVisitReason())
|
||||
.eqIfPresent(EntryRecordDO::getOpenGateMode, reqVO.getOpenGateMode())
|
||||
.eqIfPresent(EntryRecordDO::getMatchMode, reqVO.getMatchMode())
|
||||
.eqIfPresent(EntryRecordDO::getBarriorOpen, reqVO.getBarriorOpen())
|
||||
.betweenIfPresent(EntryRecordDO::getCostTime, reqVO.getCostTime())
|
||||
.betweenIfPresent(EntryRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(EntryRecordDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.placeinfo;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.placeinfo.PlaceInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 车位信息 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlaceInfoMapper extends BaseMapperX<PlaceInfoDO> {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.parking.dal.mysql.profit;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.profit.ProfitDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠明细 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProfitMapper extends BaseMapperX<ProfitDO> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.parking.service.appearancerecord;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.appearancerecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.AppearanceRecordDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.AppearanceRecordVO;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
|
||||
/**
|
||||
* 出场记录 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface AppearanceRecordService {
|
||||
|
||||
/**
|
||||
* 创建出场记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createAppearanceRecord(@Valid AppearanceRecordSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新出场记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAppearanceRecord(@Valid AppearanceRecordSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除出场记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAppearanceRecord(Long id);
|
||||
|
||||
/**
|
||||
* 获得出场记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 出场记录
|
||||
*/
|
||||
AppearanceRecordDO getAppearanceRecord(Long id);
|
||||
|
||||
/**
|
||||
* 获得出场记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 出场记录分页
|
||||
*/
|
||||
PageResult<AppearanceRecordDO> getAppearanceRecordPage(AppearanceRecordPageReqVO pageReqVO);
|
||||
|
||||
BlueCardResult upAppearanceRecord(AppearanceRecordVO appearanceRecordVO);
|
||||
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
package cn.iocoder.yudao.module.parking.service.appearancerecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.AppearanceRecordVO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.DataList;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.charge.ChargeDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.placeinfo.PlaceInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.profit.ProfitDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.charge.ChargeMapper;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.placeinfo.PlaceInfoMapper;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.profit.ProfitMapper;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.userinfo.UserInfoMapper;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.appearancerecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.appearancerecord.AppearanceRecordDO;
|
||||
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.appearancerecord.AppearanceRecordMapper;
|
||||
|
||||
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 AppearanceRecordServiceImpl extends ServiceImpl<AppearanceRecordMapper,AppearanceRecordDO> implements AppearanceRecordService {
|
||||
|
||||
@Resource
|
||||
private AppearanceRecordMapper appearanceRecordMapper;
|
||||
|
||||
@Resource
|
||||
private UserInfoMapper userInfoMapper;
|
||||
|
||||
@Resource
|
||||
private PlaceInfoMapper placeInfoMapper;
|
||||
|
||||
@Resource
|
||||
private CarInfoMapper carInfoMapper;
|
||||
|
||||
@Resource
|
||||
private ChargeMapper chargeMapper;
|
||||
|
||||
@Resource
|
||||
private ProfitMapper profitMapper;
|
||||
|
||||
@Override
|
||||
public Long createAppearanceRecord(AppearanceRecordSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AppearanceRecordDO appearanceRecord = BeanUtils.toBean(createReqVO, AppearanceRecordDO.class);
|
||||
appearanceRecordMapper.insert(appearanceRecord);
|
||||
// 返回
|
||||
return appearanceRecord.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAppearanceRecord(AppearanceRecordSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAppearanceRecordExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AppearanceRecordDO updateObj = BeanUtils.toBean(updateReqVO, AppearanceRecordDO.class);
|
||||
appearanceRecordMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAppearanceRecord(Long id) {
|
||||
// 校验存在
|
||||
validateAppearanceRecordExists(id);
|
||||
// 删除
|
||||
appearanceRecordMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateAppearanceRecordExists(Long id) {
|
||||
if (appearanceRecordMapper.selectById(id) == null) {
|
||||
throw exception(APPEARANCE_RECORD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppearanceRecordDO getAppearanceRecord(Long id) {
|
||||
return appearanceRecordMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AppearanceRecordDO> getAppearanceRecordPage(AppearanceRecordPageReqVO pageReqVO) {
|
||||
return appearanceRecordMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlueCardResult upAppearanceRecord(AppearanceRecordVO appearanceRecordVO) {
|
||||
|
||||
for (int i = 0; i < appearanceRecordVO.getDatas().size(); i++) {
|
||||
DataList datas = appearanceRecordVO.getDatas().get(i);
|
||||
|
||||
AppearanceRecordDO appearanceRecordDO = new AppearanceRecordDO();
|
||||
appearanceRecordDO.setOrderId(datas.getOrderId());
|
||||
appearanceRecordDO.setParkNumber(appearanceRecordVO.getParkNumber());
|
||||
appearanceRecordDO.setOperatorId(datas.getOperatorId());
|
||||
appearanceRecordDO.setOperatorName(datas.getOperatorName());
|
||||
appearanceRecordDO.setInvoiceNo(datas.getInvoiceNo());
|
||||
appearanceRecordDO.setPlate(datas.getCarInfo().getPlate());
|
||||
appearanceRecordDO.setIdCard(datas.getUserInfo().getIdCard());
|
||||
appearanceRecordDO.setInTime(datas.getPassInfo().getInTime());
|
||||
appearanceRecordDO.setOutTime(datas.getPassInfo().getOutTime());
|
||||
appearanceRecordDO.setInImage(datas.getPassInfo().getInImage());
|
||||
appearanceRecordDO.setOutImage(datas.getPassInfo().getOutImage());
|
||||
appearanceRecordDO.setInChannel(datas.getPassInfo().getInChannel());
|
||||
appearanceRecordDO.setOutChannel(datas.getPassInfo().getOutChannel());
|
||||
appearanceRecordDO.setOpenGateMode(datas.getPassInfo().getOpenCateMode());
|
||||
appearanceRecordDO.setMatchMode(datas.getPassInfo().getMatchMode());
|
||||
appearanceRecordDO.setCharge(datas.getChargeStatistics().getCharge());
|
||||
appearanceRecordDO.setOnLineCharge(datas.getChargeStatistics().getOnLineCharge());
|
||||
appearanceRecordDO.setOffLineCharge(datas.getChargeStatistics().getOffLineCharge());
|
||||
appearanceRecordDO.setProfitChargeTotal(datas.getChargeStatistics().getProfitChargeTotal());
|
||||
appearanceRecordDO.setOnLineProfitChargeNum(datas.getChargeStatistics().getOnLineProfitChargeNum());
|
||||
appearanceRecordDO.setOnLineProfitChargeValue(datas.getChargeStatistics().getOnLineProfitChargeValue());
|
||||
appearanceRecordDO.setOffLineProfitChargeNum(datas.getChargeStatistics().getOffLineProfitChargeNum());
|
||||
appearanceRecordDO.setOffLineProfitChargeValue(datas.getChargeStatistics().getOffLineProfitChargeValue());
|
||||
appearanceRecordDO.setOnLineProfitTimeNum(datas.getChargeStatistics().getOnLineProfitTimeNum());
|
||||
appearanceRecordDO.setOnLineProfitTimeValue(datas.getChargeStatistics().getOnLineProfitTimeValue());
|
||||
appearanceRecordDO.setOffLineProfitTimeNum(datas.getChargeStatistics().getOffLineProfitTimeNum());
|
||||
appearanceRecordDO.setOffLineProfitTimeValue(datas.getChargeStatistics().getOffLineProfitTimeValue());
|
||||
appearanceRecordDO.setCostTime(datas.getCostTime());
|
||||
AppearanceRecordDO appearanceRecordDO1 = addAppearanceRecord(appearanceRecordDO);
|
||||
|
||||
//添加车位信息
|
||||
PlaceInfoDO placeInfoDO = new PlaceInfoDO();
|
||||
placeInfoDO.setEntryId(appearanceRecordDO1.getId());
|
||||
placeInfoDO.setPlaceNumber(datas.getPlaceInfo().get(0).getPlaceNumber());
|
||||
placeInfoDO.setAreaId(datas.getPlaceInfo().get(0).getAreaId());
|
||||
placeInfoDO.setAreaName(datas.getPlaceInfo().get(0).getAreaName());
|
||||
placeInfoDO.setMemo(datas.getPlaceInfo().get(0).getMemo());
|
||||
placeInfoMapper.insert(placeInfoDO);
|
||||
|
||||
//添加车辆信息
|
||||
CarInfoDO carInfoDO = new CarInfoDO();
|
||||
carInfoDO.setPlate(datas.getCarInfo().getPlate());
|
||||
carInfoDO.setPlateColor(datas.getCarInfo().getPlateColor());
|
||||
carInfoDO.setTicketCode(datas.getCarInfo().getTicketCode());
|
||||
carInfoDO.setCarType(datas.getCarInfo().getCarType());
|
||||
carInfoDO.setConfidence(datas.getCarInfo().getConfidence());
|
||||
CarInfoDO carInfoDO1 = carInfoMapper.selectOne("plate", datas.getCarInfo().getPlate());
|
||||
if (carInfoDO1 == null){
|
||||
carInfoMapper.insert(carInfoDO);
|
||||
}else {
|
||||
carInfoDO.setId(carInfoDO1.getId());
|
||||
carInfoMapper.updateById(carInfoDO);
|
||||
}
|
||||
|
||||
//添加收费明细
|
||||
ChargeDO chargeDO = new ChargeDO();
|
||||
chargeDO.setAppearanceId(appearanceRecordDO1.getId());
|
||||
chargeDO.setPayNo(datas.getChargeList().get(0).getPayNo());
|
||||
chargeDO.setGetTime(datas.getChargeList().get(0).getGetTime());
|
||||
chargeDO.setPayCharge(datas.getChargeList().get(0).getPayCharge());
|
||||
chargeDO.setPayKind(datas.getChargeList().get(0).getPayKind());
|
||||
chargeDO.setPayChannel(datas.getChargeList().get(0).getPayChannel());
|
||||
chargeDO.setMemo(datas.getChargeList().get(0).getMemo());
|
||||
chargeMapper.insert(chargeDO);
|
||||
|
||||
//添加优惠明细
|
||||
ProfitDO profitDO = new ProfitDO();
|
||||
profitDO.setAppearanceId(appearanceRecordDO1.getId());
|
||||
profitDO.setProfitCode(datas.getProfitList().get(0).getProfitCode());
|
||||
profitDO.setOrderId(datas.getProfitList().get(0).getOrderId());
|
||||
profitDO.setGetTime(datas.getProfitList().get(0).getGetTime());
|
||||
profitDO.setProfitTime(datas.getProfitList().get(0).getProfitTime());
|
||||
profitDO.setProfitCharge(datas.getProfitList().get(0).getProfitCharge());
|
||||
profitDO.setProfitChargeValue(datas.getProfitList().get(0).getProfitChargeValue());
|
||||
profitDO.setMemo(datas.getProfitList().get(0).getMemo());
|
||||
profitMapper.insert(profitDO);
|
||||
|
||||
|
||||
}
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
|
||||
public AppearanceRecordDO addAppearanceRecord(AppearanceRecordDO appearanceRecordDO) {
|
||||
boolean saved = this.save(appearanceRecordDO);
|
||||
if (saved) {
|
||||
return appearanceRecordDO; // 返回包含 ID 的对象
|
||||
}
|
||||
return null; // 或抛出异常
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.parking.service.black;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.black.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.black.BlackDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 黑名单 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface BlackService {
|
||||
|
||||
/**
|
||||
* 创建黑名单
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createBlack(@Valid BlackSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新黑名单
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBlack(@Valid BlackSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除黑名单
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBlack(Long id);
|
||||
|
||||
/**
|
||||
* 获得黑名单
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 黑名单
|
||||
*/
|
||||
BlackDO getBlack(Long id);
|
||||
|
||||
/**
|
||||
* 获得黑名单分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 黑名单分页
|
||||
*/
|
||||
PageResult<BlackDO> getBlackPage(BlackPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.parking.service.black;
|
||||
|
||||
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.black.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.black.BlackDO;
|
||||
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.black.BlackMapper;
|
||||
|
||||
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 BlackServiceImpl implements BlackService {
|
||||
|
||||
@Resource
|
||||
private BlackMapper blackMapper;
|
||||
|
||||
@Override
|
||||
public Long createBlack(BlackSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BlackDO black = BeanUtils.toBean(createReqVO, BlackDO.class);
|
||||
blackMapper.insert(black);
|
||||
// 返回
|
||||
return black.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBlack(BlackSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBlackExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BlackDO updateObj = BeanUtils.toBean(updateReqVO, BlackDO.class);
|
||||
blackMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBlack(Long id) {
|
||||
// 校验存在
|
||||
validateBlackExists(id);
|
||||
// 删除
|
||||
blackMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateBlackExists(Long id) {
|
||||
if (blackMapper.selectById(id) == null) {
|
||||
throw exception(BLACK_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlackDO getBlack(Long id) {
|
||||
return blackMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BlackDO> getBlackPage(BlackPageReqVO pageReqVO) {
|
||||
return blackMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.parking.service.charge;
|
||||
|
||||
/**
|
||||
* 收费明细 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ChargeService {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.parking.service.charge;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.charge.ChargeMapper;
|
||||
|
||||
/**
|
||||
* 收费明细 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ChargeServiceImpl implements ChargeService {
|
||||
|
||||
@Resource
|
||||
private ChargeMapper chargeMapper;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.parking.service.entryrecord;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.entryrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.EntryRecordDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.EntryRecordVO;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
|
||||
/**
|
||||
* 入场记录 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface EntryRecordService {
|
||||
|
||||
/**
|
||||
* 创建入场记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createEntryRecord(@Valid EntryRecordSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新入场记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateEntryRecord(@Valid EntryRecordSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除入场记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteEntryRecord(Long id);
|
||||
|
||||
/**
|
||||
* 获得入场记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 入场记录
|
||||
*/
|
||||
EntryRecordDO getEntryRecord(Long id);
|
||||
|
||||
/**
|
||||
* 获得入场记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 入场记录分页
|
||||
*/
|
||||
PageResult<EntryRecordDO> getEntryRecordPage(EntryRecordPageReqVO pageReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 上传入场记录
|
||||
*/
|
||||
BlueCardResult upEntryRecord(EntryRecordVO entryRecordVO);
|
||||
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
package cn.iocoder.yudao.module.parking.service.entryrecord;
|
||||
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.Datas;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.EntryRecordVO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.placeinfo.PlaceInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.userinfo.UserInfoDO;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.placeinfo.PlaceInfoMapper;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.userinfo.UserInfoMapper;
|
||||
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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.entryrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.entryrecord.EntryRecordDO;
|
||||
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.entryrecord.EntryRecordMapper;
|
||||
|
||||
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 EntryRecordServiceImpl extends ServiceImpl<EntryRecordMapper,EntryRecordDO> implements EntryRecordService {
|
||||
|
||||
@Resource
|
||||
private EntryRecordMapper entryRecordMapper;
|
||||
|
||||
@Resource
|
||||
private UserInfoMapper userInfoMapper;
|
||||
|
||||
@Resource
|
||||
private PlaceInfoMapper placeInfoMapper;
|
||||
|
||||
@Resource
|
||||
private CarInfoMapper carInfoMapper;
|
||||
|
||||
@Override
|
||||
public Long createEntryRecord(EntryRecordSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
EntryRecordDO entryRecord = BeanUtils.toBean(createReqVO, EntryRecordDO.class);
|
||||
entryRecordMapper.insert(entryRecord);
|
||||
// 返回
|
||||
return entryRecord.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntryRecord(EntryRecordSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateEntryRecordExists(updateReqVO.getId());
|
||||
// 更新
|
||||
EntryRecordDO updateObj = BeanUtils.toBean(updateReqVO, EntryRecordDO.class);
|
||||
entryRecordMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEntryRecord(Long id) {
|
||||
// 校验存在
|
||||
validateEntryRecordExists(id);
|
||||
// 删除
|
||||
entryRecordMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateEntryRecordExists(Long id) {
|
||||
if (entryRecordMapper.selectById(id) == null) {
|
||||
throw exception(ENTRY_RECORD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntryRecordDO getEntryRecord(Long id) {
|
||||
return entryRecordMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<EntryRecordDO> getEntryRecordPage(EntryRecordPageReqVO pageReqVO) {
|
||||
return entryRecordMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlueCardResult upEntryRecord(EntryRecordVO entryRecordVO) {
|
||||
|
||||
for (int i = 0; i < entryRecordVO.getDatas().size(); i++) {
|
||||
EntryRecordDO entryRecordDO = new EntryRecordDO();
|
||||
entryRecordDO.setParkNumber(entryRecordVO.getParkNumber());
|
||||
Datas datas = entryRecordVO.getDatas().get(i);
|
||||
entryRecordDO.setOrderId(datas.getOrderId());
|
||||
entryRecordDO.setPlate(datas.getPlate());
|
||||
entryRecordDO.setIdCard(datas.getIdCard());
|
||||
entryRecordDO.setInTime(datas.getInTime());
|
||||
entryRecordDO.setInChannel(datas.getInChannel());
|
||||
entryRecordDO.setInImage(datas.getInImage());
|
||||
entryRecordDO.setVisitReason(datas.getVisitReason());
|
||||
entryRecordDO.setOpenGateMode(datas.getOpenGateMode());
|
||||
entryRecordDO.setMatchMode(datas.getMatchMode());
|
||||
entryRecordDO.setBarriorOpen(datas.getBarriorOpen());
|
||||
entryRecordDO.setCostTime(datas.getCostTime());
|
||||
EntryRecordDO entryRecordDO1 = addEntryRecord(entryRecordDO);
|
||||
|
||||
//添加用户
|
||||
UserInfoDO userInfoDOOne = userInfoMapper.selectOne("id_card", datas.getUserInfoDO().getIdCard());
|
||||
UserInfoDO userInfoDO = new UserInfoDO();
|
||||
userInfoDO.setIdCard(datas.getUserInfoDO().getIdCard());
|
||||
userInfoDO.setUserName(datas.getUserInfoDO().getUserName());
|
||||
userInfoDO.setPhone(datas.getUserInfoDO().getPhone());
|
||||
userInfoDO.setAddress(datas.getUserInfoDO().getAddress());
|
||||
if (userInfoDOOne == null){
|
||||
userInfoMapper.insert(userInfoDO);
|
||||
}else {
|
||||
userInfoMapper.updateById(userInfoDO);
|
||||
}
|
||||
|
||||
//添加车位信息
|
||||
PlaceInfoDO placeInfoDO = new PlaceInfoDO();
|
||||
placeInfoDO.setEntryId(entryRecordDO1.getId());
|
||||
placeInfoDO.setPlaceNumber(datas.getPlaceInfo().get(0).getPlaceNumber());
|
||||
placeInfoDO.setAreaId(datas.getPlaceInfo().get(0).getAreaId());
|
||||
placeInfoDO.setAreaName(datas.getPlaceInfo().get(0).getAreaName());
|
||||
placeInfoDO.setMemo(datas.getPlaceInfo().get(0).getMemo());
|
||||
placeInfoMapper.insert(placeInfoDO);
|
||||
|
||||
//添加车辆信息
|
||||
CarInfoDO carInfoDO = new CarInfoDO();
|
||||
carInfoDO.setPlate(datas.getPlate());
|
||||
carInfoDO.setPlateColor(datas.getPlateColor());
|
||||
carInfoDO.setTicketCode(datas.getTicketCode());
|
||||
carInfoDO.setCarType(datas.getCarType());
|
||||
carInfoDO.setConfidence(datas.getConfidence());
|
||||
CarInfoDO carInfoDO1 = carInfoMapper.selectOne("plate", datas.getPlate());
|
||||
if (carInfoDO1 == null){
|
||||
carInfoMapper.insert(carInfoDO);
|
||||
}else {
|
||||
carInfoDO.setId(carInfoDO1.getId());
|
||||
carInfoMapper.updateById(carInfoDO);
|
||||
}
|
||||
}
|
||||
|
||||
return BlueCardResult.success();
|
||||
}
|
||||
|
||||
|
||||
public EntryRecordDO addEntryRecord(EntryRecordDO entryRecordDO) {
|
||||
boolean saved = this.save(entryRecordDO);
|
||||
if (saved) {
|
||||
return entryRecordDO; // 返回包含 ID 的对象
|
||||
}
|
||||
return null; // 或抛出异常
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.parking.service.placeinfo;
|
||||
|
||||
|
||||
/**
|
||||
* 车位信息 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface PlaceInfoService {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.parking.service.placeinfo;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 车位信息 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PlaceInfoServiceImpl implements PlaceInfoService {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package cn.iocoder.yudao.module.parking.service.profit;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠明细 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ProfitService {
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.parking.service.profit;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.module.parking.dal.mysql.profit.ProfitMapper;
|
||||
|
||||
/**
|
||||
* 优惠明细 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ProfitServiceImpl implements ProfitService {
|
||||
|
||||
@Resource
|
||||
private ProfitMapper profitMapper;
|
||||
|
||||
}
|
@ -12,6 +12,10 @@ import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.parking.controller.admin.white.vo.*;
|
||||
import cn.iocoder.yudao.module.parking.dal.dataobject.white.WhiteDO;
|
||||
@ -69,6 +73,40 @@ public class WhiteServiceImpl implements WhiteService {
|
||||
validateWhiteExists(id);
|
||||
// 删除
|
||||
whiteMapper.deleteById(id);
|
||||
WhiteDO whiteDO = whiteMapper.selectOne("fixed_id", id);
|
||||
userInfoMapper.deleteById(whiteDO.getCertificate());//删除用户信息
|
||||
carInfoMapper.deleteById(whiteDO.getPlate());//删除车量信息
|
||||
AreasAndValidityDO areasAndValidityDO = areasAndValidityMapper.selectOne("fixed_id", id);
|
||||
|
||||
//设置删除请求参数
|
||||
WhiteDeleteDO whiteDeleteDO = new WhiteDeleteDO();
|
||||
whiteDeleteDO.setParkNumber(whiteDO.getParkNumber());
|
||||
whiteDeleteDO.setPlate(whiteDO.getPlate());
|
||||
List<AreasAndValidityDO> areasAndValidityDOS = new ArrayList<>();
|
||||
areasAndValidityDOS.add(areasAndValidityDO);
|
||||
whiteDeleteDO.setAreasAndValidity(areasAndValidityDOS);
|
||||
//调用蓝卡接口白名单删除
|
||||
try {
|
||||
String url = "http://蓝卡云 ip:端口/bcopenapi/out/delWhite";
|
||||
URL obj = new URL(url);
|
||||
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
||||
// 请求方式
|
||||
con.setRequestMethod("GET");
|
||||
// 获取响应
|
||||
int responseCode = con.getResponseCode();
|
||||
System.out.println("Response Code : " + responseCode);
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
|
||||
String inputLine;
|
||||
StringBuilder response = new StringBuilder();
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
response.append(inputLine);
|
||||
}
|
||||
in.close();
|
||||
System.out.println(response.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void validateWhiteExists(Integer id) {
|
||||
@ -119,7 +157,12 @@ public class WhiteServiceImpl implements WhiteService {
|
||||
userInfoDO.setUserName(whiteDatasDO.getName());
|
||||
userInfoDO.setPhone(whiteDatasDO.getPhone());
|
||||
userInfoDO.setAddress(whiteDatasDO.getAddress());
|
||||
userInfoMapper.insert(userInfoDO);
|
||||
UserInfoDO userInfoDOOne = userInfoMapper.selectOne("id_card", whiteDatasDO.getCertificate());
|
||||
if (userInfoDOOne == null){
|
||||
userInfoMapper.insert(userInfoDO);
|
||||
}else {
|
||||
userInfoMapper.updateById(userInfoDO);
|
||||
}
|
||||
|
||||
CarInfoDO carInfoDO = new CarInfoDO();
|
||||
carInfoDO.setPlate(whiteDatasDO.getPlate());
|
||||
@ -127,7 +170,13 @@ public class WhiteServiceImpl implements WhiteService {
|
||||
// carInfoDO.setTicketCode(whiteDatasDO.get)
|
||||
carInfoDO.setCarType(whiteDatasDO.getCarType());
|
||||
// carInfoDO.setConfidence(whiteDatasDO.ge)
|
||||
carInfoMapper.insert(carInfoDO);
|
||||
CarInfoDO carInfoDO1 = carInfoMapper.selectOne("plate", whiteDatasDO.getPlate());
|
||||
if (carInfoDO1 == null){
|
||||
carInfoMapper.insert(carInfoDO);
|
||||
}else {
|
||||
carInfoDO.setId(carInfoDO1.getId());
|
||||
carInfoMapper.updateById(carInfoDO);
|
||||
}
|
||||
|
||||
AreasAndValidityDO areasAndValidityDO = whiteDatasDO.getAreasAndValidity().get(0);
|
||||
AreasAndValidityDO areasAndValidityDOs = new AreasAndValidityDO();
|
||||
|
@ -9,5 +9,8 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode ASSET_NOT_EXISTS = new ErrorCode(1_005_001_000, "设备不存在");
|
||||
ErrorCode CHECK_TICKET_NOT_EXISTS = new ErrorCode(1_005_001_001, "检票不存在");
|
||||
ErrorCode SALE_DATA_NOT_EXISTS = new ErrorCode(1_005_001_002, "售票不存在");
|
||||
ErrorCode INFORMATION_NOT_EXISTS = new ErrorCode(1_005_002_001, "旅客信息不存在");
|
||||
ErrorCode ALL_NOT_EXISTS = new ErrorCode(1_005_003_001, "设备登录日志不存在");
|
||||
ErrorCode UM_NOT_EXISTS = new ErrorCode(1_005_004_001, "上行报文不存在");
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog;
|
||||
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogRespVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.assetLoginLog.AssetLoginLogDO;
|
||||
import cn.iocoder.yudao.module.ticket.service.assetLoginLog.AssetLoginLogService;
|
||||
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.*;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 设备登录日志")
|
||||
@RestController
|
||||
@RequestMapping("/ticket/assetLoginLog")
|
||||
@Validated
|
||||
public class AssetLoginLogController {
|
||||
|
||||
@Resource
|
||||
private AssetLoginLogService Service;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备登录日志")
|
||||
@PreAuthorize("@ss.hasPermission('assetLoginLog::create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody AssetLoginLogSaveReqVO createReqVO) {
|
||||
return success(Service.create(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新设备登录日志")
|
||||
@PreAuthorize("@ss.hasPermission('assetLoginLog::update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody AssetLoginLogSaveReqVO updateReqVO) {
|
||||
Service.update(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除设备登录日志")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('assetLoginLog::delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
Service.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得设备登录日志")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('assetLoginLog::query')")
|
||||
public CommonResult<AssetLoginLogRespVO> get(@RequestParam("id") Long id) {
|
||||
AssetLoginLogDO loginLogDO = Service.get(id);
|
||||
return success(BeanUtils.toBean(loginLogDO, AssetLoginLogRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得设备登录日志分页")
|
||||
@PreAuthorize("@ss.hasPermission('assetLoginLog::query')")
|
||||
public CommonResult<PageResult<AssetLoginLogRespVO>> getPage(@Valid AssetLoginLogPageReqVO pageReqVO) {
|
||||
PageResult<AssetLoginLogDO> pageResult = Service.getPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AssetLoginLogRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出设备登录日志 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('assetLoginLog::export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportExcel(@Valid AssetLoginLogPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AssetLoginLogDO> list = Service.getPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "设备登录日志.xls", "数据", AssetLoginLogRespVO.class,
|
||||
BeanUtils.toBean(list, AssetLoginLogRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.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 AssetLoginLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "登录时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] loginTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "13173")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备类型", example = "1")
|
||||
private String assetType;
|
||||
|
||||
@Schema(description = "设备名称", example = "王五")
|
||||
private String assetName;
|
||||
|
||||
@Schema(description = "识别码")
|
||||
private String identificationCode;
|
||||
|
||||
@Schema(description = "登录结果", example = "1")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "登录备注", example = "你猜")
|
||||
private String loginRemark;
|
||||
|
||||
@Schema(description = "登录参数")
|
||||
private String loginParameter;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.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.*;
|
||||
|
||||
@Schema(description = "管理后台 - 设备登录日志 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AssetLoginLogRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30783")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "登录时间")
|
||||
@ExcelProperty("登录时间")
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "13173")
|
||||
@ExcelProperty("设备编号")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备类型", example = "1")
|
||||
@ExcelProperty("设备类型")
|
||||
private String assetType;
|
||||
|
||||
@Schema(description = "设备名称", example = "王五")
|
||||
@ExcelProperty("设备名称")
|
||||
private String assetName;
|
||||
|
||||
@Schema(description = "识别码")
|
||||
@ExcelProperty("识别码")
|
||||
private String identificationCode;
|
||||
|
||||
@Schema(description = "登录结果", example = "1")
|
||||
@ExcelProperty("登录结果")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "登录备注", example = "你猜")
|
||||
@ExcelProperty("登录备注")
|
||||
private String loginRemark;
|
||||
|
||||
@Schema(description = "登录参数")
|
||||
@ExcelProperty("登录参数")
|
||||
private String loginParameter;
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 设备登录日志新增/修改 Request VO")
|
||||
@Data
|
||||
public class AssetLoginLogSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30783")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "登录时间")
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "13173")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备类型", example = "1")
|
||||
private String assetType;
|
||||
|
||||
@Schema(description = "设备名称", example = "王五")
|
||||
private String assetName;
|
||||
|
||||
@Schema(description = "识别码")
|
||||
private String identificationCode;
|
||||
|
||||
@Schema(description = "登录结果", example = "1")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "登录备注", example = "你猜")
|
||||
private String loginRemark;
|
||||
|
||||
@Schema(description = "登录参数")
|
||||
private String loginParameter;
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.information;
|
||||
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationRespVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.information.InformationDO;
|
||||
import cn.iocoder.yudao.module.ticket.service.information.InformationService;
|
||||
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.*;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 旅客信息")
|
||||
@RestController
|
||||
@RequestMapping("/ticket/information")
|
||||
@Validated
|
||||
public class InformationController {
|
||||
|
||||
@Resource
|
||||
private InformationService informationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建旅客信息")
|
||||
@PreAuthorize("@ss.hasPermission('passenger:information:create')")
|
||||
public CommonResult<Long> createInformation(@Valid @RequestBody InformationSaveReqVO createReqVO) {
|
||||
return success(informationService.createInformation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新旅客信息")
|
||||
@PreAuthorize("@ss.hasPermission('passenger:information:update')")
|
||||
public CommonResult<Boolean> updateInformation(@Valid @RequestBody InformationSaveReqVO updateReqVO) {
|
||||
informationService.updateInformation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除旅客信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('passenger:information:delete')")
|
||||
public CommonResult<Boolean> deleteInformation(@RequestParam("id") Long id) {
|
||||
informationService.deleteInformation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得旅客信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('passenger:information:query')")
|
||||
public CommonResult<InformationRespVO> getInformation(@RequestParam("id") Long id) {
|
||||
InformationDO information = informationService.getInformation(id);
|
||||
return success(BeanUtils.toBean(information, InformationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得旅客信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('passenger:information:query')")
|
||||
public CommonResult<PageResult<InformationRespVO>> getInformationPage(@Valid InformationPageReqVO pageReqVO) {
|
||||
PageResult<InformationDO> pageResult = informationService.getInformationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, InformationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出旅客信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('passenger:information:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportInformationExcel(@Valid InformationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<InformationDO> list = informationService.getInformationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "旅客信息.xls", "数据", InformationRespVO.class,
|
||||
BeanUtils.toBean(list, InformationRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.information.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 InformationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "19443")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "姓名", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "身份证")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "上传时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] commitTime;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.information.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.*;
|
||||
|
||||
@Schema(description = "管理后台 - 旅客信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class InformationRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30182")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "19443")
|
||||
@ExcelProperty("设备编号")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "姓名", example = "李四")
|
||||
@ExcelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "身份证")
|
||||
@ExcelProperty("身份证")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "上传时间")
|
||||
@ExcelProperty("上传时间")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.information.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 旅客信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class InformationSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30182")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", example = "19443")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "姓名", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "身份证")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "上传时间")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage;
|
||||
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessagePageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessageRespVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessageSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.uplinkMessage.UplinkMessageDO;
|
||||
import cn.iocoder.yudao.module.ticket.service.uplinkMessage.UplinkMessageService;
|
||||
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.*;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 上行报文")
|
||||
@RestController
|
||||
@RequestMapping("/ticket/uplinkMessage")
|
||||
@Validated
|
||||
public class UplinkMessageController {
|
||||
|
||||
@Resource
|
||||
private UplinkMessageService Service;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建上行报文")
|
||||
@PreAuthorize("@ss.hasPermission('uplinkMessage::create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody UplinkMessageSaveReqVO createReqVO) {
|
||||
return success(Service.create(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新上行报文")
|
||||
@PreAuthorize("@ss.hasPermission('uplinkMessage::update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody UplinkMessageSaveReqVO updateReqVO) {
|
||||
Service.update(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除上行报文")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('uplinkMessage::delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
Service.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得上行报文")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('uplinkMessage::query')")
|
||||
public CommonResult<UplinkMessageRespVO> get(@RequestParam("id") Long id) {
|
||||
UplinkMessageDO uplinkMessageDO = Service.get(id);
|
||||
return success(BeanUtils.toBean(uplinkMessageDO, UplinkMessageRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得上行报文分页")
|
||||
@PreAuthorize("@ss.hasPermission('uplinkMessage::query')")
|
||||
public CommonResult<PageResult<UplinkMessageRespVO>> getPage(@Valid UplinkMessagePageReqVO pageReqVO) {
|
||||
PageResult<UplinkMessageDO> pageResult = Service.getPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, UplinkMessageRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出上行报文 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('uplinkMessage::export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportExcel(@Valid UplinkMessagePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<UplinkMessageDO> list = Service.getPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "上行报文.xls", "数据", UplinkMessageRespVO.class,
|
||||
BeanUtils.toBean(list, UplinkMessageRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.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 UplinkMessagePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] commitTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "650")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备名称", example = "芋艿")
|
||||
private String deviceName;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "上行报文")
|
||||
private String resBody;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.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 UplinkMessageRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4333")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "650")
|
||||
@ExcelProperty("设备编号")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备名称", example = "芋艿")
|
||||
@ExcelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat("uplink_message_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "上行报文", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("上行报文")
|
||||
private String resBody;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 上行报文新增/修改 Request VO")
|
||||
@Data
|
||||
public class UplinkMessageSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4333")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
@Schema(description = "设备编号", example = "650")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备名称", example = "芋艿")
|
||||
private String deviceName;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "上行报文", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "上行报文不能为空")
|
||||
private String resBody;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.ticket.dal.dataobject.assetLoginLog;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
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("login_log")
|
||||
@KeySequence("login_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AssetLoginLogDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
private LocalDateTime loginTime;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String assetType;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String assetName;
|
||||
/**
|
||||
* 识别码
|
||||
*/
|
||||
private String identificationCode;
|
||||
/**
|
||||
* 登录结果
|
||||
*/
|
||||
private Boolean status;
|
||||
/**
|
||||
* 登录备注
|
||||
*/
|
||||
private String loginRemark;
|
||||
/**
|
||||
* 登录参数
|
||||
*/
|
||||
private String loginParameter;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package cn.iocoder.yudao.module.ticket.dal.dataobject.information;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
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("passenger_information")
|
||||
@KeySequence("passenger_information_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InformationDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package cn.iocoder.yudao.module.ticket.dal.dataobject.uplinkMessage;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
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("uplink_message")
|
||||
@KeySequence("uplink_message_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UplinkMessageDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
private LocalDateTime commitTime;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 枚举 {@link TODO uplink_message_status 对应的类}
|
||||
*/
|
||||
private Boolean status;
|
||||
/**
|
||||
* 上行报文
|
||||
*/
|
||||
private String resBody;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.ticket.dal.mysql.assetLoginLog;
|
||||
|
||||
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.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.assetLoginLog.AssetLoginLogDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 设备登录日志 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AssetLoginLogMapper extends BaseMapperX<AssetLoginLogDO> {
|
||||
|
||||
default PageResult<AssetLoginLogDO> selectPage(AssetLoginLogPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AssetLoginLogDO>()
|
||||
.betweenIfPresent(AssetLoginLogDO::getCreateTime, reqVO.getCreateTime())
|
||||
.betweenIfPresent(AssetLoginLogDO::getLoginTime, reqVO.getLoginTime())
|
||||
.likeIfPresent(AssetLoginLogDO::getDeviceId, reqVO.getDeviceId())
|
||||
.eqIfPresent(AssetLoginLogDO::getAssetType, reqVO.getAssetType())
|
||||
.likeIfPresent(AssetLoginLogDO::getAssetName, reqVO.getAssetName())
|
||||
.eqIfPresent(AssetLoginLogDO::getIdentificationCode, reqVO.getIdentificationCode())
|
||||
.eqIfPresent(AssetLoginLogDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(AssetLoginLogDO::getLoginRemark, reqVO.getLoginRemark())
|
||||
.eqIfPresent(AssetLoginLogDO::getLoginParameter, reqVO.getLoginParameter())
|
||||
.orderByDesc(AssetLoginLogDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.ticket.dal.mysql.information;
|
||||
|
||||
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.ticket.controller.admin.information.vo.InformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.information.InformationDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 旅客信息 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface InformationMapper extends BaseMapperX<InformationDO> {
|
||||
|
||||
default PageResult<InformationDO> selectPage(InformationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<InformationDO>()
|
||||
.betweenIfPresent(InformationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.likeIfPresent(InformationDO::getDeviceId, reqVO.getDeviceId())
|
||||
.likeIfPresent(InformationDO::getName, reqVO.getName())
|
||||
.likeIfPresent(InformationDO::getIdCard, reqVO.getIdCard())
|
||||
.betweenIfPresent(InformationDO::getCommitTime, reqVO.getCommitTime())
|
||||
.orderByDesc(InformationDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.ticket.dal.mysql.uplinkMessage;
|
||||
|
||||
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.ticket.controller.admin.uplinkMessage.vo.UplinkMessagePageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.uplinkMessage.UplinkMessageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 上行报文 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface UplinkMessageMapper extends BaseMapperX<UplinkMessageDO> {
|
||||
|
||||
default PageResult<UplinkMessageDO> selectPage(UplinkMessagePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<UplinkMessageDO>()
|
||||
.betweenIfPresent(UplinkMessageDO::getCreateTime, reqVO.getCreateTime())
|
||||
.betweenIfPresent(UplinkMessageDO::getCommitTime, reqVO.getCommitTime())
|
||||
.likeIfPresent(UplinkMessageDO::getDeviceId, reqVO.getDeviceId())
|
||||
.likeIfPresent(UplinkMessageDO::getDeviceName, reqVO.getDeviceName())
|
||||
.eqIfPresent(UplinkMessageDO::getStatus, reqVO.getStatus())
|
||||
.likeIfPresent(UplinkMessageDO::getResBody, reqVO.getResBody())
|
||||
.likeIfPresent(UplinkMessageDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(UplinkMessageDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.ticket.service.assetLoginLog;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.assetLoginLog.AssetLoginLogDO;
|
||||
|
||||
/**
|
||||
* 设备登录日志 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface AssetLoginLogService {
|
||||
|
||||
/**
|
||||
* 创建设备登录日志
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long create(@Valid AssetLoginLogSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新设备登录日志
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void update(@Valid AssetLoginLogSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除设备登录日志
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void delete(Long id);
|
||||
|
||||
/**
|
||||
* 获得设备登录日志
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 设备登录日志
|
||||
*/
|
||||
AssetLoginLogDO get(Long id);
|
||||
|
||||
/**
|
||||
* 获得设备登录日志分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 设备登录日志分页
|
||||
*/
|
||||
PageResult<AssetLoginLogDO> getPage(AssetLoginLogPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.ticket.service.assetLoginLog;
|
||||
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.assetLoginLog.vo.AssetLoginLogSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.assetLoginLog.AssetLoginLogDO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.mysql.assetLoginLog.AssetLoginLogMapper;
|
||||
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.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.ticket.enums.ErrorCodeConstants.ALL_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 设备登录日志 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AssetLoginLogServiceImpl implements AssetLoginLogService {
|
||||
|
||||
@Resource
|
||||
private AssetLoginLogMapper Mapper;
|
||||
|
||||
@Override
|
||||
public Long create(AssetLoginLogSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AssetLoginLogDO assetLoginLogDO = BeanUtils.toBean(createReqVO, AssetLoginLogDO.class);
|
||||
Mapper.insert(assetLoginLogDO);
|
||||
// 返回
|
||||
return assetLoginLogDO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(AssetLoginLogSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AssetLoginLogDO updateObj = BeanUtils.toBean(updateReqVO, AssetLoginLogDO.class);
|
||||
Mapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
// 校验存在
|
||||
validateExists(id);
|
||||
// 删除
|
||||
Mapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateExists(Long id) {
|
||||
if (Mapper.selectById(id) == null) {
|
||||
throw exception(ALL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssetLoginLogDO get(Long id) {
|
||||
return Mapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AssetLoginLogDO> getPage(AssetLoginLogPageReqVO pageReqVO) {
|
||||
return Mapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.ticket.service.information;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.information.InformationDO;
|
||||
|
||||
/**
|
||||
* 旅客信息 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface InformationService {
|
||||
|
||||
/**
|
||||
* 创建旅客信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createInformation(@Valid InformationSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新旅客信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateInformation(@Valid InformationSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除旅客信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteInformation(Long id);
|
||||
|
||||
/**
|
||||
* 获得旅客信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 旅客信息
|
||||
*/
|
||||
InformationDO getInformation(Long id);
|
||||
|
||||
/**
|
||||
* 获得旅客信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 旅客信息分页
|
||||
*/
|
||||
PageResult<InformationDO> getInformationPage(InformationPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.ticket.service.information;
|
||||
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.information.vo.InformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.information.InformationDO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.mysql.information.InformationMapper;
|
||||
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.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.ticket.enums.ErrorCodeConstants.INFORMATION_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 旅客信息 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class InformationServiceImpl implements InformationService {
|
||||
|
||||
@Resource
|
||||
private InformationMapper informationMapper;
|
||||
|
||||
@Override
|
||||
public Long createInformation(InformationSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
InformationDO information = BeanUtils.toBean(createReqVO, InformationDO.class);
|
||||
informationMapper.insert(information);
|
||||
// 返回
|
||||
return information.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInformation(InformationSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateInformationExists(updateReqVO.getId());
|
||||
// 更新
|
||||
InformationDO updateObj = BeanUtils.toBean(updateReqVO, InformationDO.class);
|
||||
informationMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInformation(Long id) {
|
||||
// 校验存在
|
||||
validateInformationExists(id);
|
||||
// 删除
|
||||
informationMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateInformationExists(Long id) {
|
||||
if (informationMapper.selectById(id) == null) {
|
||||
throw exception(INFORMATION_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InformationDO getInformation(Long id) {
|
||||
return informationMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InformationDO> getInformationPage(InformationPageReqVO pageReqVO) {
|
||||
return informationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.ticket.service.uplinkMessage;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessagePageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessageSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.uplinkMessage.UplinkMessageDO;
|
||||
|
||||
/**
|
||||
* 上行报文 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface UplinkMessageService {
|
||||
|
||||
/**
|
||||
* 创建上行报文
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long create(@Valid UplinkMessageSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新上行报文
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void update(@Valid UplinkMessageSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除上行报文
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void delete(Long id);
|
||||
|
||||
/**
|
||||
* 获得上行报文
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 上行报文
|
||||
*/
|
||||
UplinkMessageDO get(Long id);
|
||||
|
||||
/**
|
||||
* 获得上行报文分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 上行报文分页
|
||||
*/
|
||||
PageResult<UplinkMessageDO> getPage(UplinkMessagePageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.ticket.service.uplinkMessage;
|
||||
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessagePageReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.controller.admin.uplinkMessage.vo.UplinkMessageSaveReqVO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.dataobject.uplinkMessage.UplinkMessageDO;
|
||||
import cn.iocoder.yudao.module.ticket.dal.mysql.uplinkMessage.UplinkMessageMapper;
|
||||
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.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.ticket.enums.ErrorCodeConstants.UM_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 上行报文 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class UplinkMessageServiceImpl implements UplinkMessageService {
|
||||
|
||||
@Resource
|
||||
private UplinkMessageMapper Mapper;
|
||||
|
||||
@Override
|
||||
public Long create(UplinkMessageSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
UplinkMessageDO uplinkMessageDO = BeanUtils.toBean(createReqVO, UplinkMessageDO.class);
|
||||
Mapper.insert(uplinkMessageDO);
|
||||
// 返回
|
||||
return uplinkMessageDO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(UplinkMessageSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateExists(updateReqVO.getId());
|
||||
// 更新
|
||||
UplinkMessageDO updateObj = BeanUtils.toBean(updateReqVO, UplinkMessageDO.class);
|
||||
Mapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
// 校验存在
|
||||
validateExists(id);
|
||||
// 删除
|
||||
Mapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateExists(Long id) {
|
||||
if (Mapper.selectById(id) == null) {
|
||||
throw exception(UM_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UplinkMessageDO get(Long id) {
|
||||
return Mapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<UplinkMessageDO> getPage(UplinkMessagePageReqVO pageReqVO) {
|
||||
return Mapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user