Browse Source

# 接站站点推送FDP接口调整修改

zhongwei
haungxing 1 year ago
parent
commit
e04a7bf955
  1. 3
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/request/StationInfoReq.java
  2. 12
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java

3
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;
}

12
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<StationEntity> 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();

Loading…
Cancel
Save