donglang 7 hodín pred
rodič
commit
998603ea92

+ 57 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/ParkingPlateInfoController.java

@@ -0,0 +1,57 @@
+package com.sckw.transport.controller;
+
+import com.sckw.transport.model.param.ChargeInfoItemResp;
+import com.sckw.transport.model.param.ChargeInfoQueryParam;
+import com.sckw.transport.model.param.EntryNotificationParam;
+import com.sckw.transport.model.param.ExitNotificationParam;
+import com.sckw.transport.model.param.ExitNotificationResp;
+import com.sckw.transport.model.param.ParkingPlatformReportResult;
+import com.sckw.transport.model.param.ParkingPlatformResult;
+import com.sckw.transport.model.param.PlateInfoQueryParam;
+import com.sckw.transport.model.param.PlateInfoResp;
+import com.sckw.transport.service.ParkingPlateInfoService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 停车平台对接
+ */
+@RestController
+@RequestMapping("/parking/plateInfo")
+@Tag(name = "停车平台对接")
+@RequiredArgsConstructor
+public class ParkingPlateInfoController {
+
+    private final ParkingPlateInfoService parkingPlateInfoService;
+
+    @PostMapping(value = "/query", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @Operation(summary = "查询车辆信息", description = "调用停车平台 /list-plate-info 接口,返回通用类格式")
+    public ParkingPlatformResult<PlateInfoResp> queryPlateInfo(@Valid @RequestBody PlateInfoQueryParam param) {
+        return parkingPlateInfoService.queryPlateInfo(param);
+    }
+
+    @PostMapping(value = "/entryNotification", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @Operation(summary = "入场通知", description = "调用停车平台 /entry-notification 接口,返回通用类格式")
+    public ParkingPlatformResult<Object> entryNotification(@Valid @RequestBody EntryNotificationParam param) {
+        return parkingPlateInfoService.entryNotification(param);
+    }
+
+    @PostMapping(value = "/exitNotification", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @Operation(summary = "出场扣费通知", description = "调用停车平台 /exit-notification 接口,返回通用类格式")
+    public ParkingPlatformResult<ExitNotificationResp> exitNotification(@Valid @RequestBody ExitNotificationParam param) {
+        return parkingPlateInfoService.exitNotification(param);
+    }
+
+    @PostMapping(value = "/listChargeInfo", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @Operation(summary = "充值扣费明细查询", description = "调用停车平台 /list-charge-info 接口,返回查询报表类格式")
+    public ParkingPlatformReportResult<ChargeInfoItemResp> listChargeInfo(@Valid @RequestBody ChargeInfoQueryParam param) {
+        return parkingPlateInfoService.listChargeInfo(param);
+    }
+}