Parcourir la source

抬杆查询接口新增地磅编号

donglang il y a 1 semaine
Parent
commit
7ea5037644

+ 1 - 1
iot-platform-manager/src/main/java/com/platform/api/request/CanLiftGateRequest.java

@@ -20,7 +20,7 @@ public class CanLiftGateRequest {
     /**
      * 地磅编号
      */
-    @Schema(description = "地磅编号", example = "川A1234")
+    @Schema(description = "地磅编号", example = "10100111")
     private String weighbridgeCode;
 
 

+ 2 - 4
iot-platform-manager/src/main/java/com/platform/external/client/CanLiftGateClient.java

@@ -1,8 +1,6 @@
 package com.platform.external.client;
 
-import com.platform.api.request.CanLiftGateRequest;
-import com.platform.external.request.CarInfoReq;
-import com.platform.external.request.WaybillOrderProcessParam;
+import com.platform.external.request.WaybillOrderIsPassParam;
 import com.platform.result.BaseResult;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -25,5 +23,5 @@ public interface CanLiftGateClient {
      * @return 外部系统抬杆校验结果
      */
     @PostMapping("${external-system.weighbridge.lift-gate-check-path:/isPass}")
-    BaseResult<Boolean> queryCanLiftGate(@RequestBody CanLiftGateRequest request);
+    BaseResult<Boolean> queryCanLiftGate(@RequestBody WaybillOrderIsPassParam request);
 }

+ 33 - 0
iot-platform-manager/src/main/java/com/platform/external/request/WaybillOrderIsPassParam.java

@@ -0,0 +1,33 @@
+package com.platform.external.request;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author :donglang
+ * @version :1.0
+ * @description 参数基类
+ * @create :2025-11-13 08:59:00
+ */
+@Data
+public class WaybillOrderIsPassParam implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -114986619800571178L;
+
+    /**
+     * 车牌号
+     */
+    @Schema(description = "车牌号")
+    private String truckNo;
+
+    /**
+     * 地磅编号
+     */
+    @Schema(description = "地磅编号")
+    private Long weighbridgeCode;
+
+}

+ 5 - 4
iot-platform-manager/src/main/java/com/platform/external/service/WeighbridgePushService.java

@@ -2,7 +2,6 @@ package com.platform.external.service;
 
 import com.alibaba.fastjson2.JSON;
 import com.platform.api.request.CanLiftGateRequest;
-import com.platform.api.request.LicensePlateValidateRequest;
 import com.platform.entity.WeighbridgeRecord;
 import com.platform.exception.IotException;
 import com.platform.external.client.CanLiftGateClient;
@@ -10,7 +9,7 @@ import com.platform.external.client.WeighbridgePushClient;
 import com.platform.external.config.CanLiftGateProperties;
 import com.platform.external.config.UnloadWeighbridgePushProperties;
 import com.platform.external.config.WeighbridgePushProperties;
-import com.platform.external.request.CarInfoReq;
+import com.platform.external.request.WaybillOrderIsPassParam;
 import com.platform.external.request.WaybillOrderProcessParam;
 import com.platform.external.request.WaybillOrderWeighImageParam;
 import com.platform.result.BaseResult;
@@ -21,7 +20,6 @@ import org.springframework.stereotype.Service;
 
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -149,7 +147,10 @@ public class WeighbridgePushService {
         }
         try {
             log.info("外部系统抬杆校验开始,入参: {}", JSON.toJSONString(request));
-            BaseResult<Boolean> response = canLiftGateClient.queryCanLiftGate(request);
+            WaybillOrderIsPassParam param = new WaybillOrderIsPassParam();
+            param.setTruckNo(request.getTruckNo());
+            param.setWeighbridgeCode(StringUtils.isNotBlank(request.getWeighbridgeCode()) ? Long.valueOf(request.getWeighbridgeCode()) : null);
+            BaseResult<Boolean> response = canLiftGateClient.queryCanLiftGate(param);
             log.info("外部系统抬杆校验完成,入参: {}, 响应: {}", JSON.toJSONString(request), JSON.toJSONString(response));
             if (Objects.isNull(response) || !response.isSuccess()) {
                 log.warn("外部系统抬杆校验失败,入参: {}, 响应: {}",  JSON.toJSONString(request), JSON.toJSONString(response));