|
|
@@ -10,9 +10,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import java.math.BigDecimal;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -33,23 +30,8 @@ public class WeighbridgeController {
|
|
|
*/
|
|
|
@Operation(summary = "地磅过磅数据上报", description = "接收地磅设备上报的过磅数据和图片")
|
|
|
@PostMapping("/weighBridgePush")
|
|
|
- public LicensePlateValidateResponse weighBridgePush(
|
|
|
- @Parameter(description = "车牌号") @RequestParam("licensePlate") String licensePlate,
|
|
|
- @Parameter(description = "地磅编号") @RequestParam("weighbridgeCode") String weighbridgeCode,
|
|
|
- @Parameter(description = "称重重量(吨)") @RequestParam("grossWeight") BigDecimal grossWeight,
|
|
|
- @Parameter(description = "时间戳(秒或毫秒)") @RequestParam("timestamp") Long timestamp,
|
|
|
- @Parameter(description = "处理标签") @RequestParam(value = "tag", required = false) String tag,
|
|
|
- @Parameter(description = "车辆照片") @RequestParam(value = "images[]", required = false) MultipartFile[] images
|
|
|
- ) {
|
|
|
+ public LicensePlateValidateResponse weighBridgePush(WeighbridgePushRequest request) {
|
|
|
// 构建请求对象
|
|
|
- WeighbridgePushRequest request = new WeighbridgePushRequest();
|
|
|
- request.setLicensePlate(licensePlate);
|
|
|
- request.setWeighbridgeCode(weighbridgeCode);
|
|
|
- request.setGrossWeight(grossWeight);
|
|
|
- request.setTimestamp(timestamp);
|
|
|
- request.setTag(tag);
|
|
|
- request.setImages(images);
|
|
|
-
|
|
|
// 调用业务层处理
|
|
|
return weighbridgeRecordManage.handleWeighbridgePush(request);
|
|
|
}
|
|
|
@@ -59,13 +41,7 @@ public class WeighbridgeController {
|
|
|
*/
|
|
|
@Operation(summary = "车牌验证", description = "用于验证车牌是否合法,允许上磅")
|
|
|
@PostMapping("/validateLicensePlate")
|
|
|
- public LicensePlateValidateResponse validateLicensePlate(
|
|
|
- @Parameter(description = "车牌号") @RequestParam("licensePlate") String licensePlate,
|
|
|
- @Parameter(description = "厂商来源标识") @RequestHeader("uuid") String uuid
|
|
|
- ) {
|
|
|
- LicensePlateValidateRequest request = new LicensePlateValidateRequest();
|
|
|
- request.setLicensePlate(licensePlate);
|
|
|
- request.setUuid(uuid);
|
|
|
+ public LicensePlateValidateResponse validateLicensePlate(LicensePlateValidateRequest request) {
|
|
|
return weighbridgeRecordManage.handleValidateLicensePlate(request);
|
|
|
}
|
|
|
}
|