Commit bc2fff75 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.修改系统首页大屏总览接口,增加区分组织机构逻辑,完成接口冒烟测试;
2.修改系统首页获取井场列表接口,增加区分组织机构逻辑,完成接口冒烟测试;
3.修改系统首页井场功能下钻后提示报错问题,修改用电功率数据获取逻辑,修复报错问题;
4.修改输电线路分页列表查询接口,增加查询条件,在查询父线路列表时只查询10千伏线路,修改线上接口文档同时完成接口冒烟测试;
5.修改系统首页井场实时监控接口,增加区分组织机构逻辑,完成接口冒烟测试;
6.修改系统首页用能分析接口,增加区分组织机构逻辑,完成接口冒烟测试;
7.修改系统首页井场用能分析(双坐标轴)接口,增加区分组织机构逻辑,完成接口冒烟测试;
8.修改系统首页累积用电接口,增加区分组织机构逻辑,完成接口冒烟测试;
9.修改系统首页光伏实时监控接口,增加区分组织机构逻辑,完成接口冒烟测试;
10.修改系统首页井场效果评价接口,增加区分组织机构逻辑,完成接口冒烟测试;
11.修改系统首页先导实验井间开制度接口,增加区分组织机构逻辑,完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 3edaaeea
...@@ -331,17 +331,15 @@ public class SysDictionaryService { ...@@ -331,17 +331,15 @@ public class SysDictionaryService {
queryWrapper.lambda().orderByAsc(SysDictionaryEnt::getSort); queryWrapper.lambda().orderByAsc(SysDictionaryEnt::getSort);
XPageResult<QuerySysDictionaryOutput> query = XMapperHelper.query(mapper, input, queryWrapper, QuerySysDictionaryOutput.class); XPageResult<QuerySysDictionaryOutput> query = XMapperHelper.query(mapper, input, queryWrapper, QuerySysDictionaryOutput.class);
List<QuerySysDictionaryOutput> items = query.getResult().getItems(); List<QuerySysDictionaryOutput> items = query.getResult().getItems();
if (items != null && items.size() > 0) { if (items != null && !items.isEmpty()) {
List<String> ids = items.stream().map(p -> { List<String> ids = items.stream().map(p -> p.getId()).distinct().collect(Collectors.toList());
return p.getId();
}).distinct().collect(Collectors.toList());
SysDictionaryView sysDictionaryView = new SysDictionaryView(); SysDictionaryView sysDictionaryView = new SysDictionaryView();
StringBuffer idsStr = new StringBuffer(); StringBuilder idsStr = new StringBuilder();
for (int i = 0; i < ids.size(); i++) { for (int i = 0; i < ids.size(); i++) {
if (i == 0) { if (i == 0) {
idsStr.append("'" + ids.get(i) + "'"); idsStr.append("'").append(ids.get(i)).append("'");
} else { } else {
idsStr.append(",'" + ids.get(i) + "'"); idsStr.append(",'").append(ids.get(i)).append("'");
} }
} }
sysDictionaryView.setPid(idsStr.toString()); sysDictionaryView.setPid(idsStr.toString());
...@@ -349,7 +347,7 @@ public class SysDictionaryService { ...@@ -349,7 +347,7 @@ public class SysDictionaryService {
List<SysDictionaryView> sysDictionaryViews = viewMapper.selectListsByParentIds(sysDictionaryView); List<SysDictionaryView> sysDictionaryViews = viewMapper.selectListsByParentIds(sysDictionaryView);
int i = 0; int i = 0;
for (QuerySysDictionaryOutput out : items) { for (QuerySysDictionaryOutput out : items) {
if (sysDictionaryViews != null && sysDictionaryViews.size() > 0) { if (sysDictionaryViews != null && !sysDictionaryViews.isEmpty()) {
boolean flag = false; boolean flag = false;
for (SysDictionaryView view : sysDictionaryViews) { for (SysDictionaryView view : sysDictionaryViews) {
if (StringUtils.equals(out.getId(), view.getPid())) { if (StringUtils.equals(out.getId(), view.getPid())) {
...@@ -432,7 +430,7 @@ public class SysDictionaryService { ...@@ -432,7 +430,7 @@ public class SysDictionaryService {
if (StringUtils.isNotBlank(input.getParentId())) { if (StringUtils.isNotBlank(input.getParentId())) {
queryWrapper.lambda().eq(SysDictionaryEnt::getPid, input.getParentId()); queryWrapper.lambda().eq(SysDictionaryEnt::getPid, input.getParentId());
if (StringUtils.equals("1", input.getParentId())) { if (StringUtils.equals("1", input.getParentId())) {
QueryWrapper<SysDictionaryEnt> query = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> query = new QueryWrapper<>();
if (StringUtils.isNotBlank(input.getCode())) { if (StringUtils.isNotBlank(input.getCode())) {
query.lambda().like(SysDictionaryEnt::getDicKey, input.getCode()); query.lambda().like(SysDictionaryEnt::getDicKey, input.getCode());
} }
...@@ -468,17 +466,16 @@ public class SysDictionaryService { ...@@ -468,17 +466,16 @@ public class SysDictionaryService {
queryWrapper.lambda().orderByAsc(SysDictionaryEnt::getSort); queryWrapper.lambda().orderByAsc(SysDictionaryEnt::getSort);
XPageResult<QuerySysDictionaryOutput> query = XMapperHelper.query(mapper, input, queryWrapper, QuerySysDictionaryOutput.class); XPageResult<QuerySysDictionaryOutput> query = XMapperHelper.query(mapper, input, queryWrapper, QuerySysDictionaryOutput.class);
List<QuerySysDictionaryOutput> items = query.getResult().getItems(); List<QuerySysDictionaryOutput> items = query.getResult().getItems();
if (items != null && items.size() > 0) { if (items != null && !items.isEmpty()) {
List<String> ids = items.stream().map(p -> List<String> ids = items.stream().map(QuerySysDictionaryOutput::getId
p.getId()
).distinct().collect(Collectors.toList()); ).distinct().collect(Collectors.toList());
SysDictionaryView sysDictionaryView = new SysDictionaryView(); SysDictionaryView sysDictionaryView = new SysDictionaryView();
StringBuffer idsStr = new StringBuffer(); StringBuilder idsStr = new StringBuilder();
for (int i = 0; i < ids.size(); i++) { for (int i = 0; i < ids.size(); i++) {
if (i == 0) { if (i == 0) {
idsStr.append("'" + ids.get(i) + "'"); idsStr.append("'").append(ids.get(i)).append("'");
} else { } else {
idsStr.append(",'" + ids.get(i) + "'"); idsStr.append(",'").append(ids.get(i)).append("'");
} }
} }
sysDictionaryView.setPid(idsStr.toString()); sysDictionaryView.setPid(idsStr.toString());
...@@ -486,7 +483,7 @@ public class SysDictionaryService { ...@@ -486,7 +483,7 @@ public class SysDictionaryService {
List<SysDictionaryView> sysDictionaryViews = viewMapper.selectListsByParentIds(sysDictionaryView); List<SysDictionaryView> sysDictionaryViews = viewMapper.selectListsByParentIds(sysDictionaryView);
int i = 0; int i = 0;
for (QuerySysDictionaryOutput out : items) { for (QuerySysDictionaryOutput out : items) {
if (sysDictionaryViews != null && sysDictionaryViews.size() > 0) { if (sysDictionaryViews != null && !sysDictionaryViews.isEmpty()) {
boolean flag = false; boolean flag = false;
for (SysDictionaryView view : sysDictionaryViews) { for (SysDictionaryView view : sysDictionaryViews) {
if (StringUtils.equals(out.getId(), view.getPid())) { if (StringUtils.equals(out.getId(), view.getPid())) {
...@@ -608,7 +605,7 @@ public class SysDictionaryService { ...@@ -608,7 +605,7 @@ public class SysDictionaryService {
if (ObjectUtils.isEmpty(list)) { if (ObjectUtils.isEmpty(list)) {
list = SysDictionaryCache.list(context, input.getAlias()); list = SysDictionaryCache.list(context, input.getAlias());
//查询alias字典 //查询alias字典
QueryWrapper<SysDictionaryEnt> query = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> query = new QueryWrapper<>();
query.lambda().eq(SysDictionaryEnt::getAlias, input.getAlias()).gt(SysDictionaryEnt::getEndTime, new Date()); query.lambda().eq(SysDictionaryEnt::getAlias, input.getAlias()).gt(SysDictionaryEnt::getEndTime, new Date());
SysDictionaryEnt sysDictionary = mapper.selectOne(query); SysDictionaryEnt sysDictionary = mapper.selectOne(query);
if (ObjectUtils.isNotEmpty(sysDictionary)) { if (ObjectUtils.isNotEmpty(sysDictionary)) {
...@@ -618,7 +615,7 @@ public class SysDictionaryService { ...@@ -618,7 +615,7 @@ public class SysDictionaryService {
XCopyUtils.copyObject(sysDictionary, sysDictionaryCache); XCopyUtils.copyObject(sysDictionary, sysDictionaryCache);
list.add(sysDictionaryCache); list.add(sysDictionaryCache);
//查询alias字典下级字典项 //查询alias字典下级字典项
QueryWrapper<SysDictionaryEnt> queryItems = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> queryItems = new QueryWrapper<>();
//如果字典项在单位属性字典配置了,需要查询单位属性字典 //如果字典项在单位属性字典配置了,需要查询单位属性字典
if (ObjectUtils.isNotEmpty(sysDictionary.getIsOrg()) && sysDictionary.getIsOrg() == 1) { if (ObjectUtils.isNotEmpty(sysDictionary.getIsOrg()) && sysDictionary.getIsOrg() == 1) {
//查询当前登录人的组织机构层级路径 //查询当前登录人的组织机构层级路径
...@@ -627,7 +624,7 @@ public class SysDictionaryService { ...@@ -627,7 +624,7 @@ public class SysDictionaryService {
.gt(SysOrganizationRelEnt::getEndTime, new Date()); .gt(SysOrganizationRelEnt::getEndTime, new Date());
SysOrganizationRelEnt sysOrganizationRelEnt = orgRelMapper.selectOne(queryOrgRel); SysOrganizationRelEnt sysOrganizationRelEnt = orgRelMapper.selectOne(queryOrgRel);
//根据字典id查询 //根据字典id查询
QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper(); QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper<>();
queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionary.getId()) queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionary.getId())
.gt(SysOrganizationDictionaryEnt::getEndTime, new Date()); .gt(SysOrganizationDictionaryEnt::getEndTime, new Date());
List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic); List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic);
...@@ -635,9 +632,9 @@ public class SysDictionaryService { ...@@ -635,9 +632,9 @@ public class SysDictionaryService {
String ouId = sysOrganizationRelEnt.getOuId(); String ouId = sysOrganizationRelEnt.getOuId();
if (StringUtils.isNotBlank(ouIdPath)) { if (StringUtils.isNotBlank(ouIdPath)) {
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> { List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> {
if (ouIdPath.indexOf(p.getOuId()) != -1 && p.getUseLowerLevel() == 1) { if (ouIdPath.contains(p.getOuId()) && p.getUseLowerLevel() == 1) {
return p.getDicCode(); return p.getDicCode();
} else if (ouId.indexOf(p.getOuId()) != -1) { } else if (ouId.contains(p.getOuId())) {
return p.getDicCode(); return p.getDicCode();
} else { } else {
return "1"; return "1";
...@@ -656,7 +653,7 @@ public class SysDictionaryService { ...@@ -656,7 +653,7 @@ public class SysDictionaryService {
list.add(cache); list.add(cache);
} }
} }
Collections.sort(sysDictionaryList, (o1, o2) -> { sysDictionaryList.sort((o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) { if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort(); return o1.getSort() - o2.getSort();
} else { } else {
...@@ -675,7 +672,7 @@ public class SysDictionaryService { ...@@ -675,7 +672,7 @@ public class SysDictionaryService {
.gt(SysOrganizationRelEnt::getEndTime, new Date()); .gt(SysOrganizationRelEnt::getEndTime, new Date());
SysOrganizationRelEnt sysOrganizationRelEnt = orgRelMapper.selectOne(queryOrgRel); SysOrganizationRelEnt sysOrganizationRelEnt = orgRelMapper.selectOne(queryOrgRel);
//根据字典id查询 //根据字典id查询
QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper(); QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper<>();
queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionaryEnt.getId()) queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionaryEnt.getId())
.gt(SysOrganizationDictionaryEnt::getEndTime, new Date()); .gt(SysOrganizationDictionaryEnt::getEndTime, new Date());
List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic); List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic);
...@@ -683,9 +680,9 @@ public class SysDictionaryService { ...@@ -683,9 +680,9 @@ public class SysDictionaryService {
String ouId = sysOrganizationRelEnt.getOuId(); String ouId = sysOrganizationRelEnt.getOuId();
if (StringUtils.isNotBlank(ouIdPath)) { if (StringUtils.isNotBlank(ouIdPath)) {
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> { List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> {
if (ouIdPath.indexOf(p.getOuId()) != -1 && p.getUseLowerLevel() == 1) { if (ouIdPath.contains(p.getOuId()) && p.getUseLowerLevel() == 1) {
return p.getDicCode(); return p.getDicCode();
} else if (ouId.indexOf(p.getOuId()) != -1) { } else if (ouId.contains(p.getOuId())) {
return p.getDicCode(); return p.getDicCode();
} else { } else {
return "1"; return "1";
...@@ -694,7 +691,7 @@ public class SysDictionaryService { ...@@ -694,7 +691,7 @@ public class SysDictionaryService {
list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList()); list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList());
} }
} }
Collections.sort(list, (o1, o2) -> { list.sort((o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) { if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort(); return o1.getSort() - o2.getSort();
} else { } else {
...@@ -750,8 +747,7 @@ public class SysDictionaryService { ...@@ -750,8 +747,7 @@ public class SysDictionaryService {
public XServiceResult updateBasePipelineParentPath(XContext context, List<SysDictionaryEnt> dics) { public XServiceResult updateBasePipelineParentPath(XContext context, List<SysDictionaryEnt> dics) {
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class); SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
List<String> list = dics.stream().map(p -> List<String> list = dics.stream().map(SysDictionaryEnt::getId
p.getId()
).distinct().collect(Collectors.toList()); ).distinct().collect(Collectors.toList());
while (ObjectUtils.isNotEmpty(list)) { while (ObjectUtils.isNotEmpty(list)) {
//更新二级字典parentPath //更新二级字典parentPath
...@@ -768,8 +764,7 @@ public class SysDictionaryService { ...@@ -768,8 +764,7 @@ public class SysDictionaryService {
entity.setDicPath(parentPath); entity.setDicPath(parentPath);
mapper.updateById(entity); mapper.updateById(entity);
} }
list = sysDictionaryEnts.stream().map(p -> list = sysDictionaryEnts.stream().map(SysDictionaryEnt::getId
p.getId()
).distinct().collect(Collectors.toList()); ).distinct().collect(Collectors.toList());
} else { } else {
list = null; list = null;
...@@ -782,9 +777,9 @@ public class SysDictionaryService { ...@@ -782,9 +777,9 @@ public class SysDictionaryService {
@XApiPost @XApiPost
public XServiceResult updateDictionarySortById(XContext context, QuerySysDictionaryOutput input) { public XServiceResult updateDictionarySortById(XContext context, QuerySysDictionaryOutput input) {
SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class); SysDictionaryMapper mapper = context.getBean(SysDictionaryMapper.class);
QueryWrapper<SysDictionaryEnt> query = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> query = new QueryWrapper<>();
//查询当前字典项 //查询当前字典项
QueryWrapper<SysDictionaryEnt> queryWrapper = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysDictionaryEnt::getId, input.getId()); queryWrapper.lambda().eq(SysDictionaryEnt::getId, input.getId());
SysDictionaryEnt sysDictionaryEnt = mapper.selectOne(queryWrapper); SysDictionaryEnt sysDictionaryEnt = mapper.selectOne(queryWrapper);
//查询上一个或者下一个字典项 //查询上一个或者下一个字典项
...@@ -827,7 +822,7 @@ public class SysDictionaryService { ...@@ -827,7 +822,7 @@ public class SysDictionaryService {
if (ObjectUtils.isEmpty(list)) { if (ObjectUtils.isEmpty(list)) {
list = SysDictionaryCache.list(context, RULE_NUMBER_ALIAS); list = SysDictionaryCache.list(context, RULE_NUMBER_ALIAS);
//查询alias字典 //查询alias字典
QueryWrapper<SysDictionaryEnt> query = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> query = new QueryWrapper<>();
query.lambda().eq(SysDictionaryEnt::getAlias, RULE_NUMBER_ALIAS).gt(SysDictionaryEnt::getEndTime, new Date()); query.lambda().eq(SysDictionaryEnt::getAlias, RULE_NUMBER_ALIAS).gt(SysDictionaryEnt::getEndTime, new Date());
SysDictionaryEnt sysDictionary = mapper.selectOne(query); SysDictionaryEnt sysDictionary = mapper.selectOne(query);
if (ObjectUtils.isNotEmpty(sysDictionary)) { if (ObjectUtils.isNotEmpty(sysDictionary)) {
...@@ -837,14 +832,13 @@ public class SysDictionaryService { ...@@ -837,14 +832,13 @@ public class SysDictionaryService {
XCopyUtils.copyObject(sysDictionary, sysDictionaryCache); XCopyUtils.copyObject(sysDictionary, sysDictionaryCache);
list.add(sysDictionaryCache); list.add(sysDictionaryCache);
//查询alias字典下级字典项 //查询alias字典下级字典项
QueryWrapper<SysDictionaryEnt> queryItems = new QueryWrapper(); QueryWrapper<SysDictionaryEnt> queryItems = new QueryWrapper<>();
if (ObjectUtils.isNotEmpty(sysDictionary.getIsOrg()) && sysDictionary.getIsOrg() == 1) { if (ObjectUtils.isNotEmpty(sysDictionary.getIsOrg()) && sysDictionary.getIsOrg() == 1) {
QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper(); QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper<>();
queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getOuId, RULE_NUMBER_ALIAS) queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getOuId, RULE_NUMBER_ALIAS)
.eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionary.getId()).gt(SysOrganizationDictionaryEnt::getEndTime, new Date()); .eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionary.getId()).gt(SysOrganizationDictionaryEnt::getEndTime, new Date());
List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic); List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic);
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(SysOrganizationDictionaryEnt::getDicCode
p.getDicCode()
).collect(Collectors.toList()); ).collect(Collectors.toList());
queryItems.lambda().in(SysDictionaryEnt::getId, dicIds); queryItems.lambda().in(SysDictionaryEnt::getId, dicIds);
} }
...@@ -858,7 +852,7 @@ public class SysDictionaryService { ...@@ -858,7 +852,7 @@ public class SysDictionaryService {
list.add(cache); list.add(cache);
} }
} }
Collections.sort(list, (o1, o2) -> { list.sort((o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) { if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort(); return o1.getSort() - o2.getSort();
} else { } else {
...@@ -872,16 +866,15 @@ public class SysDictionaryService { ...@@ -872,16 +866,15 @@ public class SysDictionaryService {
} }
} }
if (ObjectUtils.isNotEmpty(sysDictionaryEnt.getIsOrg()) && sysDictionaryEnt.getIsOrg() == 1) { if (ObjectUtils.isNotEmpty(sysDictionaryEnt.getIsOrg()) && sysDictionaryEnt.getIsOrg() == 1) {
QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper(); QueryWrapper<SysOrganizationDictionaryEnt> queryOrgDic = new QueryWrapper<>();
queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getOuId, sysDictionaryEnt.getId()) queryOrgDic.lambda().eq(SysOrganizationDictionaryEnt::getOuId, sysDictionaryEnt.getId())
.eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionaryEnt.getId()).gt(SysOrganizationDictionaryEnt::getEndTime, new Date()); .eq(SysOrganizationDictionaryEnt::getParentDicCode, sysDictionaryEnt.getId()).gt(SysOrganizationDictionaryEnt::getEndTime, new Date());
List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic); List<SysOrganizationDictionaryEnt> sysOrganizationDictionaryEnts = orgDicmapper.selectList(queryOrgDic);
List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(p -> List<String> dicIds = sysOrganizationDictionaryEnts.stream().map(SysOrganizationDictionaryEnt::getDicCode
p.getDicCode()
).collect(Collectors.toList()); ).collect(Collectors.toList());
list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList()); list = list.stream().filter(i -> dicIds.contains(i.getId())).collect(Collectors.toList());
} }
Collections.sort(list, (o1, o2) -> { list.sort((o1, o2) -> {
if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) { if (ObjectUtils.isNotEmpty(o1.getSort()) && ObjectUtils.isNotEmpty(o2.getSort())) {
return o1.getSort() - o2.getSort(); return o1.getSort() - o2.getSort();
} else { } else {
...@@ -889,7 +882,6 @@ public class SysDictionaryService { ...@@ -889,7 +882,6 @@ public class SysDictionaryService {
} }
}); });
List<QueryRuleNumberOutput> outputs = new ArrayList<>(); List<QueryRuleNumberOutput> outputs = new ArrayList<>();
//XCopyUtils.copyNewList(list, QuerySysDictionaryViewOutput.class);
for (SysDictionaryCache sysDictionaryCache : list) { for (SysDictionaryCache sysDictionaryCache : list) {
QueryRuleNumberOutput querySysDictionaryViewOutput = XCopyUtils.copyNewObject(sysDictionaryCache, QueryRuleNumberOutput.class); QueryRuleNumberOutput querySysDictionaryViewOutput = XCopyUtils.copyNewObject(sysDictionaryCache, QueryRuleNumberOutput.class);
outputs.add(querySysDictionaryViewOutput); outputs.add(querySysDictionaryViewOutput);
......
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