Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 2 years ago
parent
commit
f5e5b97562
  1. 18
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java

18
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.ImsAnalyseExampleMapper;
import com.hnac.hzims.operational.duty.mapper.ImsDutyMainMapper; import com.hnac.hzims.operational.duty.mapper.ImsDutyMainMapper;
import com.hnac.hzims.operational.duty.service.IImsAnalyseExampleService; 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.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition; import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition;
import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataList; 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 com.hnac.hzinfo.sdk.v5.analyse.vo.AnalseInstanceVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils; 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.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -41,6 +44,8 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl<ImsAnalyseExam
private IAnalyseDataSearchClient searchClient; private IAnalyseDataSearchClient searchClient;
@Autowired @Autowired
private AnalyseDataHandlerClient handlerClient; private AnalyseDataHandlerClient handlerClient;
@Autowired
private StationClient stationClient;
/** /**
* 根据时间段+分析实例ID查询值班日志 * 根据时间段+分析实例ID查询值班日志
@ -70,7 +75,18 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl<ImsAnalyseExam
@Override @Override
public R getAnalyseId(String projectId) { public R getAnalyseId(String projectId) {
Result result = handlerClient.analyseInstanceByProjectId(projectId); if (StringUtils.isEmpty(projectId)){
return R.fail("无站点编码");
}
StationEntity stationEntity = new StationEntity();
stationEntity.setRefDept(Long.valueOf(projectId));
R<StationEntity> 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<AnalseInstanceVO> data = new ArrayList<>(); List<AnalseInstanceVO> data = new ArrayList<>();
if (ObjectUtils.isNotEmpty(result.getData())) { if (ObjectUtils.isNotEmpty(result.getData())) {
data = (List<AnalseInstanceVO>) result.getData(); data = (List<AnalseInstanceVO>) result.getData();

Loading…
Cancel
Save