diff --git a/adc-da-base/src/main/java/com/adc/da/util/WaterMarkUtil.java b/adc-da-base/src/main/java/com/adc/da/util/WaterMarkUtil.java index bbadfc57..5c5bd8cb 100644 --- a/adc-da-base/src/main/java/com/adc/da/util/WaterMarkUtil.java +++ b/adc-da-base/src/main/java/com/adc/da/util/WaterMarkUtil.java @@ -49,18 +49,19 @@ public class WaterMarkUtil { // set Transparency PdfGState gs = new PdfGState(); // 设置透明度为0.2 - gs.setFillOpacity(0.5f); + gs.setFillOpacity(0.4f); under.setGState(gs); under.restoreState(); under.beginText(); - under.setFontAndSize(base, 25); + under.setFontAndSize(base, 56); under.setTextMatrix(30, 30); under.setColorFill(BaseColor.LIGHT_GRAY); for (int y = 0; y < 10; y++) { for (int x = 0; x < 8; x++) { // 水印文字成45度角倾斜 under.showTextAligned(Element.ALIGN_LEFT - , waterMarkName, 100 + 300 * x, 300 * y, 45); } + , waterMarkName, 100 + 300 * x, 300 * y, 40); + } } // 添加水印文字 diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarResource/service/impl/TsResourceServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarResource/service/impl/TsResourceServiceImpl.java index ff7a3ace..b39f1f1f 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarResource/service/impl/TsResourceServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarResource/service/impl/TsResourceServiceImpl.java @@ -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; /** *

@@ -184,8 +182,15 @@ public class TsResourceServiceImpl extends ServiceImpl TsResourceQueryWrapper=new QueryWrapper<>(); + TsResourceQueryWrapper.like("PARENT_IDS",resource.getId()); + if(StringUtils.isNotBlank(tsResource.getSorDivide())){ + TsResourceQueryWrapper.in("ID",getMenuIdList); + } + TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ"); + List children=dao.selectList(TsResourceQueryWrapper); + resource.setChildren(recursionGetListChildrenStand((resource),(children))); } } } @@ -209,8 +214,12 @@ public class TsResourceServiceImpl extends ServiceImpl TsResourceQueryWrapper=new QueryWrapper<>(); + TsResourceQueryWrapper.like("PARENT_IDS",resource.getId()); + TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ"); + List children=dao.selectList(TsResourceQueryWrapper); + resource.setChildren(recursionGetListChildrenStand((resource),(children))); } return TsResources; @@ -311,37 +320,17 @@ public class TsResourceServiceImpl extends ServiceImpl */ - private List recursionGetListChildren(String sorDivide,TsResource parent,List getMenuIdList){ - QueryWrapper TsResourceQueryWrapper=new QueryWrapper<>(); - TsResourceQueryWrapper.eq("PARENT_ID",parent.getId()); - if(StringUtils.isNotBlank(sorDivide)){ - TsResourceQueryWrapper.in("ID",getMenuIdList); + private List recursionGetListChildrenStand(TsResource resource,List children){ + List 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 children=dao.selectList(TsResourceQueryWrapper); - for(TsResource TsResource:children){ - TsResource.setChildren(recursionGetListChildren((sorDivide),(TsResource),(getMenuIdList))); - } - return children; - } - - /** - * 递归调用获取子节点 - * @param parent:父节点 - * @return List - */ - private List recursionGetListChildrenStand(String sorDivide,TsResource parent){ - QueryWrapper TsResourceQueryWrapper=new QueryWrapper<>(); - TsResourceQueryWrapper.eq("PARENT_ID",parent.getId()); - TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ"); - List children=dao.selectList(TsResourceQueryWrapper); - for(TsResource TsResource:children){ - TsResource.setChildren(recursionGetListChildrenStand((sorDivide),(TsResource))); - } - return children; + return tsResources; } /** diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsStandInfo/SarLawsStandInfoMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsStandInfo/SarLawsStandInfoMapper.xml index 8c479711..c175e355 100644 --- a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsStandInfo/SarLawsStandInfoMapper.xml +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsStandInfo/SarLawsStandInfoMapper.xml @@ -235,14 +235,34 @@ 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 from SAR_LAWS_STAND_INFO diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml index 93427c3e..0c5ab7a2 100644 --- a/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml @@ -966,7 +966,25 @@