|
|
@@ -3,8 +3,8 @@ package com.platform.external.service;
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.platform.entity.WeighbridgeRecord;
|
|
|
import com.platform.exception.IotException;
|
|
|
-import com.platform.external.client.ExternalWeighbridgeClient;
|
|
|
-import com.platform.external.config.ExternalWeighbridgeProperties;
|
|
|
+import com.platform.external.client.WeighbridgePushClient;
|
|
|
+import com.platform.external.config.WeighbridgePushProperties;
|
|
|
import com.platform.external.request.WaybillOrderProcessParam;
|
|
|
import com.platform.result.BaseResult;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -24,9 +24,9 @@ import java.util.Objects;
|
|
|
@RequiredArgsConstructor
|
|
|
public class WeighbridgePushService {
|
|
|
|
|
|
- private final ExternalWeighbridgeClient externalWeighbridgeClient;
|
|
|
+ private final WeighbridgePushClient weighbridgePushClient;
|
|
|
|
|
|
- private final ExternalWeighbridgeProperties externalWeighbridgeProperties;
|
|
|
+ private final WeighbridgePushProperties weighbridgePushProperties;
|
|
|
|
|
|
/**
|
|
|
* 推送地磅记录到外部系统。
|
|
|
@@ -37,7 +37,7 @@ public class WeighbridgePushService {
|
|
|
* @param record 已保存的地磅记录
|
|
|
*/
|
|
|
public void pushWeighbridgeRecord(WeighbridgeRecord record) {
|
|
|
- if (!Boolean.TRUE.equals(externalWeighbridgeProperties.getEnabled())) {
|
|
|
+ if (!Boolean.TRUE.equals(weighbridgePushProperties.getEnabled())) {
|
|
|
log.debug("外部系统地磅数据推送未启用,跳过推送");
|
|
|
return;
|
|
|
}
|
|
|
@@ -50,7 +50,7 @@ public class WeighbridgePushService {
|
|
|
WaybillOrderProcessParam request = buildPushRequest(record);
|
|
|
log.info("外部系统地磅数据推送开始,记录ID: {}, 请求参数: {}",
|
|
|
record.getId(), JSON.toJSONString( request));
|
|
|
- response = externalWeighbridgeClient.pushWeighbridgeRecord(request);
|
|
|
+ response = weighbridgePushClient.pushWeighbridgeRecord(request);
|
|
|
log.info("外部系统地磅数据推送完成,记录ID: {}, 响应码: {}, 响应消息: {}",
|
|
|
record.getId(),
|
|
|
Objects.nonNull(response) ? response.getCode() : null,
|