From 3ac1a523b5cb0e7cbc5c947d6442a4d8d88e8521 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 13 Jul 2021 11:11:49 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0pid,pids=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java | 8 ++++++++ .../mapper/plugins/ScreenWorkRecordOrgDailyDao.xml | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java index f72d2f3667..ef83c2160b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java @@ -18,6 +18,14 @@ public class ScreenWorkRecordCommonFormDTO implements Serializable { * 组织Id或者网格id */ private String orgId; + /** + * org_id的上级 + */ + private String pid; + /** + * org_id的所有上级英文冒号或者顿号隔开都可 + */ + private String pids; /** * 组织名称或者网格名 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml index 9bf253e4a5..3be24445bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -17,6 +17,8 @@ customer_id, DATE_ID, org_id, + pid, + pids, org_name, meeting_code, type_code, @@ -36,6 +38,8 @@ #{customerId}, #{dateId}, #{item.orgId}, + #{item.pid}, + #{item.pids}, #{item.orgName}, #{item.meetingCode}, #{item.typeCode}, From ad84f3d618d9346cc57580342bbada0226a32713 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 13 Jul 2021 15:18:28 +0800 Subject: [PATCH 2/5] zancun --- .../plugins/ScreenWorkRecordOrgDailyDao.java | 12 ++- .../ScreenWorkRecordOrgDailyService.java | 41 -------- .../ScreenWorkRecordOrgDailyServiceImpl.java | 96 ++++++------------- .../plugins/ScreenWorkRecordOrgDailyDao.xml | 91 +++++++++++++----- 4 files changed, 106 insertions(+), 134 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java index d27a4eee75..1a9f962f37 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -64,7 +64,13 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao customerIds); List selectCurrentAgency(@Param("agencyId") String agencyId, - @Param("dataType")String dataType, - @Param("customerId")String customerId, - @Param("dateId")String dateId); + @Param("dateId")String dateId, + @Param("typeCodeList")List typeCodeList); + + List selectCustomerTypeCode(@Param("dataType")String dataType, @Param("customerId")String customerId); + + + WorkRecordSubRank selectUpToCalAgency(@Param("agencyId")String agencyId, @Param("dateId")String dateId,@Param("typeCodeList") List typeCodeList); + + WorkRecordSubRank selectUpToCalGrid(@Param("gridId")String gridId, @Param("dateId")String dateId, @Param("typeCodeList")List typeCodeList); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java index 0991305f4f..3c3cc0419b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java @@ -18,7 +18,6 @@ package com.epmet.datareport.service.plugins; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO; import com.epmet.plugins.form.VoluntaryServiceTrendFormDTO; @@ -39,16 +38,6 @@ import java.util.Map; */ public interface ScreenWorkRecordOrgDailyService extends BaseService { - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-02-23 - */ - PageData page(Map params); - /** * 默认查询 * @@ -69,36 +58,6 @@ public interface ScreenWorkRecordOrgDailyService extends BaseService page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ScreenWorkRecordOrgDailyDTO.class); - } @Override public List list(Map params) { @@ -108,65 +93,44 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl customerIds=new ArrayList<>(); - Result> result=operCrmOpenFeignClient.getAllSubCustomerIds(formDTO.getCustomerId()); - // log.info("根据customerId查询其所有下级子客户id result: "+JSON.toJSONString(result)); - if (result.success() && CollectionUtils.isNotEmpty(result.getData())) { - customerIds.addAll(result.getData()); - } - customerIds.add(formDTO.getCustomerId()); - String dateId= baseDao.selectLatestDateId(customerIds); - if(StringUtils.isBlank(dateId)){ - dateId= com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(NumConstant.ONE); - log.warn("dateId 赋值为"+dateId+" ; selectLatestDateId dateId is null customerIds" + JSON.toJSONString(customerIds)); - } + //默认截止到前一天 + String dateId= com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(NumConstant.ONE); WorkRecordRankResultDTO returnDto = new WorkRecordRankResultDTO(); AgencyInfoDTO agencyInfoDTO = agencyService.getAgencyInfoDTO(formDTO.getAreaCode(), formDTO.getAgencyId()); // log.info("agencyInfoDTO: "+JSON.toJSONString(agencyInfoDTO)); - //当前组织的自身的数据 - List currentAgency = baseDao.selectCurrentAgency(formDTO.getAgencyId(), - formDTO.getDataType(), - formDTO.getCustomerId(), - dateId); - //下级所有组织 - List subAgencyRankList = CollectionUtils.isNotEmpty(agencyInfoDTO.getSubAgencyIds()) ? baseDao.selectSubList( - agencyInfoDTO.getSubAgencyIds(), - formDTO.getDataType(), - formDTO.getCustomerId(), - dateId) : new ArrayList<>(); - //直属网格 - List subGridList = CollectionUtils.isNotEmpty(agencyInfoDTO.getSubGridIds()) ? baseDao.selectSubGridList( - agencyInfoDTO.getSubGridIds(), - formDTO.getDataType(), - formDTO.getCustomerId(), - dateId) : new ArrayList<>(); - returnDto.getSubRankList().addAll(subAgencyRankList); - returnDto.getSubRankList().addAll(subGridList); + //随手记类型编码;对应screen_customer_work_record_dict的资源编码 + List typeCodeList=baseDao.selectCustomerTypeCode(formDTO.getDataType(),formDTO.getCustomerId()); + if(CollectionUtils.isEmpty(typeCodeList)){ + log.warn(String.format("当前customerId=%s,screen_customer_work_record_dict 为空")); + return returnDto; + } + //1)、当前组织的自身的数据 + List currentAgency = baseDao.selectCurrentAgency(formDTO.getAgencyId(),dateId,typeCodeList); + //2)、下级所有组织 + List subAgencyRankList = new ArrayList<>(); + for(String agencyId:agencyInfoDTO.getSubAgencyIds()){ + WorkRecordSubRank agencyRes= baseDao.selectUpToCalAgency(agencyId,dateId,typeCodeList); + subAgencyRankList.add(agencyRes); + } + //3)、直属网格 + List subGridList=new ArrayList<>(); + for(String gridId:agencyInfoDTO.getSubGridIds()){ + WorkRecordSubRank gridRes=baseDao.selectUpToCalGrid(gridId,dateId,typeCodeList); + subGridList.add(gridRes); + } + + if(CollectionUtils.isNotEmpty(subAgencyRankList)){ + returnDto.getSubRankList().addAll(subAgencyRankList); + } + if(CollectionUtils.isNotEmpty(subGridList)){ + returnDto.getSubRankList().addAll(subGridList); + } + // log.info("returnDto.getSubRankList()="+returnDto.getSubRankList()); int participateUserTotal = 0; int participateTotal = 0; diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml index 3f43d05337..526d3e985a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -91,33 +91,76 @@ + + + + + + \ No newline at end of file From 10aeedb0378d1ed281723abdafbe0fd1bdc9bc33 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 13 Jul 2021 17:01:18 +0800 Subject: [PATCH 3/5] zancun --- .../java/com/epmet/dto/AgencyInfoDTO.java | 9 ++-- .../dto/ScreenCustomerAgencyCommonDTO.java | 18 +++++++ .../dto/ScreenCustomerGridCommonDTO.java | 18 +++++++ .../screen/ScreenCustomerAgencyDao.java | 3 +- .../screen/ScreenCustomerGridDao.java | 3 +- .../plugins/ScreenWorkRecordOrgDailyDao.java | 10 +--- .../screen/impl/AgencyServiceImpl.java | 8 +-- .../ScreenWorkRecordOrgDailyServiceImpl.java | 51 +++++++++++++------ .../plugins/ScreenWorkRecordOrgDailyDao.xml | 13 ----- .../mapper/screen/ScreenCustomerAgencyDao.xml | 5 +- .../mapper/screen/ScreenCustomerGridDao.xml | 5 +- .../dto/screen/ScreenCustomerGridDTO.java | 5 +- 12 files changed, 94 insertions(+), 54 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java index 04d4896995..e2d3f77953 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java @@ -13,8 +13,9 @@ import java.util.List; */ @Data public class AgencyInfoDTO implements Serializable { - private String agencyId; - private String areaCode; - private List subAgencyIds; - private List subGridIds; + private String currentAgencyId; + private String currentAgencyName; + private String currentAreaCode; + private List subAgencies; + private List subGrids; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java new file mode 100644 index 0000000000..3a1078fd69 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * screen_customer_agency + * + * @author yinzuomei@elink-cn.com + * @date 2021/7/13 15:31 + */ +@Data +public class ScreenCustomerAgencyCommonDTO implements Serializable { + private static final long serialVersionUID = -6222325433226628163L; + private String agencyId; + private String agencyName; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java new file mode 100644 index 0000000000..2578a6c482 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * screen_customer_grid + * + * @author yinzuomei@elink-cn.com + * @date 2021/7/13 15:32 + */ +@Data +public class ScreenCustomerGridCommonDTO implements Serializable { + private static final long serialVersionUID = -4405092094598416917L; + private String gridId; + private String gridName; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 986a880aac..5d3a9be67e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.ScreenCustomerAgencyCommonDTO; import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.dto.result.plugins.DeptNodeDTO; @@ -161,7 +162,7 @@ public interface ScreenCustomerAgencyDao { **/ List getNextAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId); - List selectSubAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId); + List selectSubAgencyIds(@Param("areaCode")String areaCode, @Param("agencyId")String agencyId); /** * @Description 根据agencyId查询网格 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java index e0484794e6..abf21dd119 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.ScreenCustomerGridCommonDTO; import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -81,5 +82,5 @@ public interface ScreenCustomerGridDao { */ List selectGridInfo(@Param("agencyId")String agencyId); - List selectSubGridIds(@Param("areaCode")String areaCode, @Param("agencyId")String agencyId); + List selectSubGridIds(@Param("areaCode")String areaCode, @Param("agencyId")String agencyId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java index 1a9f962f37..734d8d938b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -55,15 +55,7 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao customerIds); - - List selectCurrentAgency(@Param("agencyId") String agencyId, + WorkRecordSubRank selectCurrentAgency(@Param("agencyId") String agencyId, @Param("dateId")String dateId, @Param("typeCodeList")List typeCodeList); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 535362f3ea..4dcd1e0991 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -316,10 +316,10 @@ public class AgencyServiceImpl implements AgencyService { @Override public AgencyInfoDTO getAgencyInfoDTO(String areaCode, String agencyId) { AgencyInfoDTO agencyInfoDTO=new AgencyInfoDTO(); - agencyInfoDTO.setAgencyId(agencyId); - agencyInfoDTO.setAreaCode(areaCode); - agencyInfoDTO.setSubAgencyIds(screenCustomerAgencyDao.selectSubAgencyIds(areaCode,agencyId)); - agencyInfoDTO.setSubGridIds(screenCustomerGridDao.selectSubGridIds(areaCode,agencyId)); + agencyInfoDTO.setCurrentAgencyId(agencyId); + agencyInfoDTO.setCurrentAreaCode(areaCode); + agencyInfoDTO.setSubAgencies(screenCustomerAgencyDao.selectSubAgencyIds(areaCode,agencyId)); + agencyInfoDTO.setSubGrids(screenCustomerGridDao.selectSubGridIds(areaCode,agencyId)); return agencyInfoDTO; } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index e35aee53c1..e1670ecc40 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -33,6 +33,8 @@ import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService; import com.epmet.datareport.utils.DateUtils; import com.epmet.dto.AgencyInfoDTO; +import com.epmet.dto.ScreenCustomerAgencyCommonDTO; +import com.epmet.dto.ScreenCustomerGridCommonDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO; import com.epmet.plugins.form.VoluntaryServiceTrendFormDTO; @@ -107,21 +109,40 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl typeCodeList=baseDao.selectCustomerTypeCode(formDTO.getDataType(),formDTO.getCustomerId()); if(CollectionUtils.isEmpty(typeCodeList)){ log.warn(String.format("当前customerId=%s,screen_customer_work_record_dict 为空")); - return returnDto; } + //1)、当前组织的自身的数据 - List currentAgency = baseDao.selectCurrentAgency(formDTO.getAgencyId(),dateId,typeCodeList); + WorkRecordSubRank currentAgency = baseDao.selectCurrentAgency(formDTO.getAgencyId(),dateId,typeCodeList); //2)、下级所有组织 List subAgencyRankList = new ArrayList<>(); - for(String agencyId:agencyInfoDTO.getSubAgencyIds()){ - WorkRecordSubRank agencyRes= baseDao.selectUpToCalAgency(agencyId,dateId,typeCodeList); - subAgencyRankList.add(agencyRes); + for(ScreenCustomerAgencyCommonDTO agencyCommonDTO:agencyInfoDTO.getSubAgencies()){ + WorkRecordSubRank agencyRes= baseDao.selectUpToCalAgency(agencyCommonDTO.getAgencyId(),dateId,typeCodeList); + if(null !=agencyRes){ + subAgencyRankList.add(agencyRes); + }else{ + WorkRecordSubRank agencyDefault=new WorkRecordSubRank(); + agencyDefault.setOrgId(agencyCommonDTO.getAgencyId()); + agencyDefault.setName(agencyCommonDTO.getAgencyName()); + agencyDefault.setParticipateTotal(0); + agencyDefault.setParticipateUserTotal(0); + subAgencyRankList.add(agencyDefault); + } + } //3)、直属网格 List subGridList=new ArrayList<>(); - for(String gridId:agencyInfoDTO.getSubGridIds()){ - WorkRecordSubRank gridRes=baseDao.selectUpToCalGrid(gridId,dateId,typeCodeList); - subGridList.add(gridRes); + for(ScreenCustomerGridCommonDTO gridCommonDTO:agencyInfoDTO.getSubGrids()){ + WorkRecordSubRank gridRes=baseDao.selectUpToCalGrid(gridCommonDTO.getGridId(),dateId,typeCodeList); + if (null != gridRes) { + subGridList.add(gridRes); + } else { + WorkRecordSubRank gridResDefault = new WorkRecordSubRank(); + gridResDefault.setOrgId(gridCommonDTO.getGridId()); + gridResDefault.setName(gridCommonDTO.getGridName()); + gridResDefault.setParticipateTotal(0); + gridResDefault.setParticipateUserTotal(0); + subAgencyRankList.add(gridResDefault); + } } if(CollectionUtils.isNotEmpty(subAgencyRankList)){ @@ -138,11 +159,9 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl orgIds = new ArrayList<>(); - orgIds.addAll(agencyInfoDTO.getSubAgencyIds()); - orgIds.add(agencyInfoDTO.getAgencyId()); - orgIds.addAll(agencyInfoDTO.getSubGridIds()); + orgIds.addAll(agencyInfoDTO.getSubAgencies().stream().map(agency->agency.getAgencyId()).collect(Collectors.toSet())); + orgIds.add(agencyInfoDTO.getCurrentAgencyId()); + orgIds.addAll(agencyInfoDTO.getSubGrids().stream().map(grid->grid.getGridId()).collect(Collectors.toSet())); List list = screenWorkRecordOrgMonthlyDao.selectVoluntaryServiceTrendDTO(formDTO.getCustomerId(), orgIds, monthIdList.get(NumConstant.ZERO), diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml index 526d3e985a..7d6a14c085 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -3,19 +3,6 @@ - - - SELECT - sca.AGENCY_ID as orgId + sca.AGENCY_ID as agencyId, + sca.AGENCY_NAME as agencyName FROM screen_customer_agency sca WHERE diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 2d9f8e5deb..a700e40792 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -122,9 +122,10 @@ GROUP BY scg.PARENT_AGENCY_ID - SELECT - m.GRID_ID as orgId + m.GRID_ID as gridId, + m.grid_name as gridName FROM screen_customer_grid m where m.DEL_FLAG = '0' diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java index 65e98b940b..2a707f9540 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dto; +package com.epmet.dto.screen; + +import lombok.Data; import java.io.Serializable; import java.util.Date; -import lombok.Data; /** From 63ca74ab2c31e21129b1f65de53c32c44271d320 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 13 Jul 2021 17:12:27 +0800 Subject: [PATCH 4/5] zancun --- .../main/java/com/epmet/plugins/result/WorkRecordSubRank.java | 2 ++ .../plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java index 91f3d027e9..84776cf8b1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java @@ -31,4 +31,6 @@ public class WorkRecordSubRank implements Serializable { * 组织次数 */ private Integer participateTotal; + + private String isDefault; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index e1670ecc40..52de467168 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -103,7 +103,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl typeCodeList=baseDao.selectCustomerTypeCode(formDTO.getDataType(),formDTO.getCustomerId()); @@ -125,6 +125,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl Date: Tue, 13 Jul 2021 17:51:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=8C=85=E8=B7=AF=E5=BE=84=E5=BC=95=E5=8F=91=E7=9A=84xa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/indexcal/CustomerGridInfoDTO.java | 2 +- .../screen/ScreenCustomerGridDao.java | 2 +- .../indexcal/GridCorreLationService.java | 2 +- .../indexcal/impl/GridCorreLationServiceImpl.java | 2 +- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 2 +- .../screen/ScreenCustomerGridService.java | 4 ++-- .../screen/impl/ScreenCustomerGridServiceImpl.java | 2 +- .../ScreenProjectCategoryOrgDailyServiceImpl.java | 2 +- .../evaluationindex/screen/ScreenCustomerGridDao.xml | 12 ++++++------ 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java index 16ede875bb..88968cf57e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java @@ -1,6 +1,6 @@ package com.epmet.dto.indexcal; -import com.epmet.dto.ScreenCustomerGridDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import lombok.Data; import java.io.Serializable; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index 6aa2aacc1c..b700ecf81a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -18,11 +18,11 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 994f8818fb..2f3edf7951 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,8 +1,8 @@ package com.epmet.service.evaluationindex.indexcal; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index bd9a5c8b5a..0b29ad3c72 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -19,8 +19,8 @@ import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDa import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridSelfSubScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 127479f37e..57c4a8370f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -16,7 +16,6 @@ import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; import com.epmet.dao.evaluationindex.indexcoll.*; import com.epmet.dao.evaluationindex.screen.*; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.result.AgencyMonthCountResultDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; @@ -24,6 +23,7 @@ import com.epmet.dto.indexcal.DeptScoreDTO; import com.epmet.dto.indexcollect.form.*; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.FactIndexGridScoreDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java index f2a40b11c0..d5c08a8730 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java @@ -19,10 +19,10 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity; @@ -102,7 +102,7 @@ public interface ScreenCustomerGridService extends BaseService selectBelongGridInfo(String customerId,String level); + List selectBelongGridInfo(String customerId, String level); Integer updateCenterPointByName(String customerId, String title, List center); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java index b012accfe0..a2c016a553 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java @@ -26,10 +26,10 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgSourceTypeConstant; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 7430c1abe7..14402b1f86 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -30,8 +30,8 @@ import com.epmet.constant.PingYinConstant; import com.epmet.constant.ScreenConstant; import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; -import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; +import com.epmet.dto.screen.ScreenCustomerGridDTO; import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; import com.epmet.dto.screen.result.CategoryProjectResultDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index 0fca6febf5..281326f309 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -65,7 +65,7 @@ - SELECT m.GRID_ID, m.CUSTOMER_ID, @@ -78,7 +78,7 @@ - SELECT m.GRID_ID, m.CUSTOMER_ID, @@ -93,7 +93,7 @@ - SELECT PARENT_AGENCY_ID, ALL_PARENT_IDS @@ -104,7 +104,7 @@ AND m.GRID_ID = #{gridId} - SELECT GRID_ID gridId, GRID_NAME gridName, @@ -130,7 +130,7 @@ - SELECT GRID_ID gridId, GRID_NAME gridName, @@ -361,7 +361,7 @@ - SELECT sca.AGENCY_ID AS PID, sca.PIDS,