修改对接接口
This commit is contained in:
+11
-5
@@ -338,13 +338,13 @@ public class SrmsApiServiceImpl implements SrmsApiService {
|
||||
List<StandardTree> listStandardTreeAll = new ArrayList<>();
|
||||
// 国内标准
|
||||
List<LawsTreeNodeModel> listDomestic = lawsTreeNodeService.queryTreeNodeList(TableNameEnum.DOMESTIC_REGULATIONS.getValue(), nodeName, "1");
|
||||
getStandardTree(listStandardTreeAll, listDomestic);
|
||||
getStandardTree(listStandardTreeAll, listDomestic,nodeName);
|
||||
// 海外标准
|
||||
List<LawsTreeNodeModel> listForeign = lawsTreeNodeService.queryTreeNodeList(TableNameEnum.FOREIGN_REGULATIONS.getValue(), nodeName, "1");
|
||||
getStandardTree(listStandardTreeAll, listForeign);
|
||||
getStandardTree(listStandardTreeAll, listForeign,nodeName);
|
||||
// 企业标准
|
||||
List<LawsTreeNodeModel> listEnterprise = lawsTreeNodeService.queryTreeNodeList(TableNameEnum.ENTERPRISE_STANDARDS.getValue(), nodeName, "1");
|
||||
getStandardTree(listStandardTreeAll, listEnterprise);
|
||||
getStandardTree(listStandardTreeAll, listEnterprise,nodeName);
|
||||
return Result.OK(listStandardTreeAll);
|
||||
}catch (Exception e){
|
||||
log.error("获取所有体系数据异常:",e);
|
||||
@@ -352,7 +352,7 @@ public class SrmsApiServiceImpl implements SrmsApiService {
|
||||
}
|
||||
}
|
||||
|
||||
private void getStandardTree(List<StandardTree> listStandardTreeAll, List<LawsTreeNodeModel> listEnterprise) {
|
||||
private void getStandardTree(List<StandardTree> listStandardTreeAll, List<LawsTreeNodeModel> listEnterprise,String nodeName) {
|
||||
if (!CollectionUtils.isEmpty(listEnterprise)) {
|
||||
Optional<LawsTreeNodeModel> op = listEnterprise.stream().filter(o -> StringUtils.isBlank(o.getParentId())).findFirst();
|
||||
if (op.isPresent()) {
|
||||
@@ -366,7 +366,13 @@ public class SrmsApiServiceImpl implements SrmsApiService {
|
||||
standardTree.setChildren(sub);
|
||||
}
|
||||
}
|
||||
listStandardTreeAll.add(standardTree);
|
||||
if(!StringUtils.isBlank(nodeName)){
|
||||
if(!CollectionUtils.isEmpty(lawsTreeNodeModel.getChildren()) || lawsTreeNodeModel.getNodeName().contains(nodeName)){
|
||||
listStandardTreeAll.add(standardTree);
|
||||
}
|
||||
}else{
|
||||
listStandardTreeAll.add(standardTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user