diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpListTableDataController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpListTableDataController.java index 98a173b..a8b2bc1 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpListTableDataController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpListTableDataController.java @@ -14,6 +14,8 @@ import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; + /** * 故障诊断任务表 @@ -27,6 +29,7 @@ import org.springframework.web.bind.annotation.*; @Api(tags = "故障诊断任务表") public class FdpListTableDataController extends BladeController { + @Resource private final IFdpListTableDataService service; /** * 分页 diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpListTableDataServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpListTableDataServiceImpl.java index a4a03ad..03eb3c1 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpListTableDataServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpListTableDataServiceImpl.java @@ -10,15 +10,20 @@ import com.hnac.hzims.fdp.entity.FdpFaultTableListEntity; import com.hnac.hzims.fdp.service.IFdpListTableDataService; import com.hnac.hzims.fdp.util.HttpRequestUtil; import com.hnac.hzims.fdp.vo.FdpFaultTableDataVo; +import com.hnac.hzims.operational.station.entity.StationEntity; +import com.hnac.hzims.operational.station.feign.IStationClient; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.StringUtil; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import javax.xml.ws.WebServiceException; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,6 +38,8 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class FdpListTableDataServiceImpl implements IFdpListTableDataService { + @Resource + private IStationClient stationClient; @Value("${url.getNeoFaultPropertyList}") private String getNeoFaultPropertyList; @Value("${url.getNeoFaultTableData}") @@ -42,6 +49,21 @@ public class FdpListTableDataServiceImpl implements IFdpListTableDataService { Map params = new HashMap<>(); params.put("property",property); String result = HttpRequestUtil.postCall(params,getNeoFaultPropertyList,"POST"); + if ("STATION".equals(property)){ + List list=new ArrayList<>(); + R> res = JSONObject.parseObject(result, new TypeReference>>() { + }); + if (res.isSuccess()&& CollectionUtil.isNotEmpty(res.getData())){ + for (String s : res.getData()) { + R stationEntityR = stationClient.getStationByCode(s); + if (stationEntityR.isSuccess()&&ObjectUtil.isNotEmpty(stationEntityR.getData())){ + StationEntity station = stationEntityR.getData(); + list.add(station); + } + } + } + return R.data(list); + } R> res = JSONObject.parseObject(result, new TypeReference>>() { }); return res;