From e31609e48b08a286ada337b95bf9d15a7e35953f Mon Sep 17 00:00:00 2001 From: tyty Date: Mon, 10 Apr 2023 10:20:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=80=BC=E7=8F=AD=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=9A=84=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ImsAnalyseExampleServiceImpl.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java index 8b415b6..bd42885 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java @@ -6,6 +6,8 @@ import com.hnac.hzims.operational.duty.entity.AnalyseExample; import com.hnac.hzims.operational.duty.mapper.ImsAnalyseExampleMapper; import com.hnac.hzims.operational.duty.mapper.ImsDutyMainMapper; import com.hnac.hzims.operational.duty.service.IImsAnalyseExampleService; +import com.hnac.hzims.operational.station.entity.StationEntity; +import com.hnac.hzims.operational.station.feign.StationClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition; import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataList; @@ -15,6 +17,7 @@ import com.hnac.hzinfo.sdk.v5.analyse.AnalyseDataHandlerClient; import com.hnac.hzinfo.sdk.v5.analyse.vo.AnalseInstanceVO; import lombok.extern.slf4j.Slf4j; import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils; +import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; @@ -41,6 +44,8 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl clientOne = stationClient.getOne(stationEntity); + if (ObjectUtils.isEmpty(clientOne.getData())){ + return R.fail("无机构编码"); + } + StationEntity station = clientOne.getData(); + String code = station.getCode(); + Result result = handlerClient.analyseInstanceByProjectId(code); List data = new ArrayList<>(); if (ObjectUtils.isNotEmpty(result.getData())) { data = (List) result.getData();