From e04a7bf95543acf4bf7f5e59b04e21ce7a9d6b87 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 7 Jun 2023 08:57:13 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=8E=A5=E7=AB=99=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E6=8E=A8=E9=80=81FDP=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hnac/hzims/fdp/request/StationInfoReq.java | 3 +++ .../hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/request/StationInfoReq.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/request/StationInfoReq.java index c4e56ed..d77141c 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/request/StationInfoReq.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/request/StationInfoReq.java @@ -36,4 +36,7 @@ public class StationInfoReq implements Serializable { @ApiModelProperty("站点描述") private String stationDesc; + @ApiModelProperty("租户ID") + private String tenantId; + } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java index a70d510..44b498a 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java @@ -20,6 +20,7 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.logger.BladeLogger; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringUtil; @@ -51,13 +52,16 @@ public class FdpQuestionServiceImpl implements IFdpQuestionService { R stationResult = stationClient.getStationByCode(stationCode); if(stationResult.isSuccess()) { StationEntity stationEntity = stationResult.getData(); + log.info("请求体为:{}",AuthUtil.getTenantId()); StationInfoReq infoReq = StationInfoReq.builder() - .stationId(stationCode) - .stationName(stationEntity.getName()) - .type(this.getStationType(stationEntity.getType())) - .stationDesc(Optional.ofNullable(stationDesc).orElse("")) + .stationId(stationCode) + .stationName(stationEntity.getName()) + .type(this.getStationType(stationEntity.getType())) + .stationDesc(Optional.ofNullable(stationDesc).orElse("")) + .tenantId("200000") .build(); if(Func.isNotEmpty(infoReq.getType())) { + log.info("请求体为:{}",JSON.toJSONString(infoReq)); HttpResponse httpResponse = HttpRequest.post(fdpUrlConfiguration.getSubmitStationInfo()) .body(JSON.toJSONString(infoReq)) .execute();