Browse Source

修复:智能诊断页面查询增加用户权限

zhongwei
ty 4 months ago
parent
commit
5a3c04d294
  1. 16
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpListTableDataServiceImpl.java

16
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,18 +63,20 @@ public class FdpListTableDataServiceImpl implements IFdpListTableDataService {
List<StationEntity> list = new ArrayList<>();
R<List<String>> res = JSONObject.parseObject(result, new TypeReference<R<List<String>>>() {
});
StationEntity condition = new StationEntity();
R<List<StationEntity>> stationR = stationClient.list(condition);
if (!stationR.isSuccess()||CollectionUtil.isEmpty(stationR.getData())){
return R.data(list);
}
if (res.isSuccess() && CollectionUtil.isNotEmpty(res.getData())) {
R<List<StationEntity>> 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);
}

Loading…
Cancel
Save