Commit 7789aafe by liuyang

2024-10-19 生产驾驶舱接口调整

parent faafef7e
...@@ -370,21 +370,21 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -370,21 +370,21 @@ public class ServiceHGSC007 extends ServiceEPBase {
Optional.ofNullable(roleCompanyCode).orElse(new ArrayList<>()).stream().forEach(code -> { Optional.ofNullable(roleCompanyCode).orElse(new ArrayList<>()).stream().forEach(code -> {
factoryCodes.addAll(HGXSTools.XsOrg.queryByParent(code, OrgTypeEnum.FACTORY.getCode())); factoryCodes.addAll(HGXSTools.XsOrg.queryByParent(code, OrgTypeEnum.FACTORY.getCode()));
}); });
//List<Map<String,Object>> mapList = getOrg(); List list = factoryCodes.stream()
//factoryCodes.addAll(mapList); .filter(o -> com.baosight.hggp.util.StringUtils.equals(o.getOrgType(), OrgTypeEnum.FACTORY.getCode()))
.map(item -> new Factory(item.getCompanyCode(), item.getCompanyName(), item.getFactoryCode(),
item.getFactoryName())).collect(Collectors.collectingAndThen(
Collectors.toMap(Factory::getFactoryCode, Function.identity(),
(oldValue, newValue) -> oldValue),
// 将Map转回List
m -> new ArrayList<>(m.values())
));
inInfo.set(EiConstant.resultBlock, list);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "APP查询工厂失败"); LogUtils.setDetailMsg(inInfo, e, "APP查询工厂失败");
} }
List list = factoryCodes.stream()
.filter(o -> com.baosight.hggp.util.StringUtils.equals(o.getOrgType(), OrgTypeEnum.FACTORY.getCode()))
.map(item -> new Factory(item.getCompanyCode(), item.getCompanyName(), item.getFactoryCode(),
item.getFactoryName())).collect(Collectors.collectingAndThen(
Collectors.toMap(Factory::getFactoryCode, Function.identity(),
(oldValue, newValue) -> oldValue),
// 将Map转回List
m -> new ArrayList<>(m.values())
));
inInfo.set(EiConstant.resultBlock, list);
return inInfo; return inInfo;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment