Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
+25
-36
@@ -17,10 +17,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -184,8 +182,15 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
tsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(tsResourceQueryWrapper);
|
||||
|
||||
for(TsResource TsResource:TsResources){
|
||||
TsResource.setChildren(recursionGetListChildren((tsResource.getSorDivide()),(TsResource),(getMenuIdList)));
|
||||
for(TsResource resource:TsResources){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
if(StringUtils.isNotBlank(tsResource.getSorDivide())){
|
||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||
}
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,8 +214,12 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
for(TsResource TsResource:TsResources){
|
||||
TsResource.setChildren(recursionGetListChildrenStand((tsResource.getSorDivide()),(TsResource)));
|
||||
for(TsResource resource:TsResources){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
|
||||
return TsResources;
|
||||
@@ -311,37 +320,17 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<TsResource> recursionGetListChildren(String sorDivide,TsResource parent,List<String> getMenuIdList){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
||||
if(StringUtils.isNotBlank(sorDivide)){
|
||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||
private List<TsResource> recursionGetListChildrenStand(TsResource resource,List<TsResource> children){
|
||||
List<TsResource> tsResources = children.stream().filter(resource1 -> resource1.getParentId().equals(resource.getId())).collect(Collectors.toList());
|
||||
if(!tsResources.isEmpty()){
|
||||
tsResources = tsResources.stream().sorted(Comparator.comparing(resource1 -> resource1.getDisplaySeq())).collect(Collectors.toList());
|
||||
tsResources.forEach(resource1 -> {
|
||||
resource1.setChildren(recursionGetListChildrenStand((resource1),(children)));
|
||||
});
|
||||
}
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
for(TsResource TsResource:children){
|
||||
TsResource.setChildren(recursionGetListChildren((sorDivide),(TsResource),(getMenuIdList)));
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<TsResource> recursionGetListChildrenStand(String sorDivide,TsResource parent){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
for(TsResource TsResource:children){
|
||||
TsResource.setChildren(recursionGetListChildrenStand((sorDivide),(TsResource)));
|
||||
}
|
||||
return children;
|
||||
return tsResources;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+49
-9
@@ -235,14 +235,34 @@
|
||||
<select id="getSarStandardsInfoPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage">
|
||||
select
|
||||
a.*,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_LAWS_ATTR_INFO.XCXSSRQLAWS ='' THEN '9999-01-01'
|
||||
ELSE SAR_LAWS_ATTR_INFO.XCXSSRQLAWS
|
||||
END
|
||||
) AS XCXSSRQLAWS
|
||||
DISTINCT a.ID,
|
||||
a.LAWS_TYPE,
|
||||
a.LAWS_NUMBER,
|
||||
a.LAWS_NAME,
|
||||
a.LAWS_EN_NAME,
|
||||
a.LAWS_NO,
|
||||
a.ISSUE_TIME,
|
||||
a.ISSUE_COMPANY,
|
||||
a.COMMENT_CYCLE_START,
|
||||
a.COMMENT_CYCLE_END,
|
||||
a.LAWS_TEXT_STATE,
|
||||
a.LAWS_SYQY,
|
||||
a.LAWS_SYCX,
|
||||
a.IS_RELATE_ACCESS,
|
||||
a.LAWS_YEAR,
|
||||
a.LAWS_NOTISYNC_NUM,
|
||||
a.LAWS_BULLETIN,
|
||||
a.LAWS_LABEL,
|
||||
a.LAWS_REMARK,
|
||||
a.COUNTRY,
|
||||
a.MODIFY_TIME,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_LAWS_ATTR_INFO.XCXSSRQLAWS ='' THEN '9999-01-01'
|
||||
ELSE SAR_LAWS_ATTR_INFO.XCXSSRQLAWS
|
||||
END
|
||||
) AS XCXSSRQLAWS
|
||||
from
|
||||
(select tmp_tb.* from
|
||||
(
|
||||
@@ -287,7 +307,27 @@
|
||||
<select id="getSarStandardsExportInfo" resultMap="BaseResultMapExcel"
|
||||
parameterType="com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage">
|
||||
select
|
||||
a.*,
|
||||
DISTINCT a.ID,
|
||||
a.LAWS_TYPE,
|
||||
a.LAWS_NUMBER,
|
||||
a.LAWS_NAME,
|
||||
a.LAWS_EN_NAME,
|
||||
a.LAWS_NO,
|
||||
a.ISSUE_TIME,
|
||||
a.ISSUE_COMPANY,
|
||||
a.COMMENT_CYCLE_START,
|
||||
a.COMMENT_CYCLE_END,
|
||||
a.LAWS_TEXT_STATE,
|
||||
a.LAWS_SYQY,
|
||||
a.LAWS_SYCX,
|
||||
a.IS_RELATE_ACCESS,
|
||||
a.LAWS_YEAR,
|
||||
a.LAWS_NOTISYNC_NUM,
|
||||
a.LAWS_BULLETIN,
|
||||
a.LAWS_LABEL,
|
||||
a.LAWS_REMARK,
|
||||
a.COUNTRY,
|
||||
a.MODIFY_TIME,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow
|
||||
from (select <include refid="Base_Column_List_Show"/>
|
||||
from SAR_LAWS_STAND_INFO
|
||||
|
||||
+19
-1
@@ -966,7 +966,25 @@
|
||||
<select id="getSarStandardsInfoPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select
|
||||
a.*,
|
||||
DISTINCT a.id,
|
||||
a.stand_type,
|
||||
a.country,
|
||||
a.stand_sort,
|
||||
a.stand_number,
|
||||
a.stand_year,
|
||||
a.stand_name,
|
||||
a.stand_en_name,
|
||||
a.stand_state,
|
||||
a.stand_nature,
|
||||
a.issue_time,
|
||||
a.put_time,
|
||||
a.text_status,
|
||||
a.creation_user,
|
||||
a.valid_flag,
|
||||
a.creation_time,
|
||||
a.modify_time,
|
||||
a.STAND_SYSTEM,
|
||||
a.IS_RELATE_ACCESS,
|
||||
SAR_STAND_ATTR_INFO.CHJL AS CHJL,
|
||||
dicstandSort.DIC_TYPE_NAME AS standSortShow,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standTextStatusShow,
|
||||
|
||||
Reference in New Issue
Block a user