From 5b7ceebe5aec49d2abed54bbe8aaf747783abada Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 13 Dec 2021 17:45:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E5=85=9A=E5=BB=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPartyActivityServiceImpl.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index 819f7bb94f..9258767df3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -72,6 +72,10 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl search(PartyActivityFormDTO formDTO) { @@ -152,7 +156,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); @@ -213,7 +217,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue)); //获取联建单位 IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); @@ -338,6 +342,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.and(wp -> wp.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId()).or(). like(IcPartyActivityEntity::getPids, formDTO.getAgencyId())); @@ -351,11 +356,14 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //获取服务事项字典 SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); codeFormDTO.setCustomerId(tokenDto.getCustomerId()); - codeFormDTO.setParentCategoryCode("1010"); + codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //数据组装 dtoList.forEach(dto -> { dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); dto.setUnitName(option.get(dto.getUnitId())); @@ -365,9 +373,16 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl(dtoList, pageInfo.getTotal()); } + /** + * 近30天开始时间和结束时间 (精确到秒) + * @Param formDTO + * @Return + * @Author zhaoqifeng + * @Date 2021/12/13 17:40 + */ private void setDate(PartyActivityFormDTO formDTO) { String start = DateUtils.getBeforeNDay(30); - formDTO.setEndTime(DateUtils.parse(start.concat("000000"), DateUtils.DATE_TIME_NO_SPLIT)); + formDTO.setStartTime(DateUtils.parse(start.concat("000000"), DateUtils.DATE_TIME_NO_SPLIT)); String end = DateUtils.format(new Date(), DateUtils.DATE_PATTERN); formDTO.setEndTime(DateUtils.parse(end.concat(" 23:59:59"), DateUtils.DATE_TIME_PATTERN)); }