From 5a3c04d294de7b469618ad7f2aa44a6d4d7bbb2d Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Mon, 5 Aug 2024 19:19:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E8=AF=8A=E6=96=AD=E9=A1=B5=E9=9D=A2=E6=9F=A5=E8=AF=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fdp/service/impl/FdpListTableDataServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 31765d8..79864ea 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 @@ -14,10 +14,14 @@ 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.secure.utils.AuthUtil; 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.springblade.system.entity.Dept; +import org.springblade.system.feign.ISysClient; +import org.springblade.system.user.feign.IUserClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -40,6 +44,8 @@ import java.util.Map; public class FdpListTableDataServiceImpl implements IFdpListTableDataService { @Resource private IStationClient stationClient; + @Resource + private ISysClient sysClient; @Value("${url.getNeoFaultPropertyList}") private String getNeoFaultPropertyList; @Value("${url.getNeoFaultTableData}") @@ -57,17 +63,19 @@ public class FdpListTableDataServiceImpl implements IFdpListTableDataService { List list = new ArrayList<>(); R> res = JSONObject.parseObject(result, new TypeReference>>() { }); + StationEntity condition = new StationEntity(); + R> stationR = stationClient.list(condition); + if (!stationR.isSuccess()||CollectionUtil.isEmpty(stationR.getData())){ + return R.data(list); + } if (res.isSuccess() && CollectionUtil.isNotEmpty(res.getData())) { - R> listAll = stationClient.getListAll(); - if (listAll.isSuccess() && ObjectUtil.isNotEmpty(listAll.getData())) { for (String s : res.getData()) { - for (StationEntity station : listAll.getData()) { + for (StationEntity station : stationR.getData()) { if (station.getCode().equals(s)) { list.add(station); } } } - } } log.info("fdp查询站点列表项:耗时:"+(System.currentTimeMillis()-endMillis)+"ms"); return R.data(list);