diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenExtractFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenExtractFormDTO.java new file mode 100644 index 0000000000..9766aabc42 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenExtractFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.extract.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/9/25 4:17 下午 + */ +@Data +public class ScreenExtractFormDTO implements Serializable { + + private static final long serialVersionUID = -6092830982601961936L; + + private String customerId; + + private String monthId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/ActInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/ActInfoResultDTO.java new file mode 100644 index 0000000000..0fdff371a6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/ActInfoResultDTO.java @@ -0,0 +1,90 @@ +package com.epmet.dto.extract.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/9/25 3:38 下午 + */ +@Data +public class ActInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 2322961372193392320L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID【gridId或agencyId】 + */ + private String orgId; + + /** + * 组织类型【agency,grid】 + */ + private String orgType; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 年度ID + */ + private String yearId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 父级ID + */ + private String parentId; + + /** + * 组织次数 + */ + private Integer organizeCount; + + /** + * 会议分类Id + */ + private String meetCategoryId; + + /** + * 会议分类名称(三会党课、主题党日.....等等) + */ + private String meetCategoryName; + + /** + * 平均参加人数 + */ + private Integer averageJoinUserCount; + + /** + * 删除状态 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 更新人 + */ + private String updatedBy; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/JoinUserCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/JoinUserCountResultDTO.java new file mode 100644 index 0000000000..fcaa28d970 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/JoinUserCountResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.extract.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/9/25 5:14 下午 + */ +@Data +public class JoinUserCountResultDTO implements Serializable { + + private static final long serialVersionUID = 3961393565082322770L; + + private String orgId; + + /** + * 参与人数 + */ + private Integer joinUserCount; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 62ba836b5c..f7ea7ddb79 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; @@ -162,7 +163,9 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectAllAgencyIdToPartyLinkMessage(String customerId, String monthId); + List selectAllAgencyIdToPartyLinkMessage(@Param("customerId") String customerId,@Param("monthId") String monthId); + + List selectAllAgencyIdToOrganize(@Param("customerId") String customerId,@Param("monthId") String monthId); /** * @Description 查询org名称【机关】 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 d917f62ffb..b0e405eace 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 @@ -19,10 +19,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; -import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; -import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; +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; @@ -152,6 +149,7 @@ public interface ScreenCustomerGridDao extends BaseDao * @date 2020/9/25 10:43 上午 */ List selectAllGridIdToPartyLinkMessage(@Param("customerId") String customerId,@Param("monthId") String monthId); + List selectAllGridIdToOrganize(@Param("customerId") String customerId,@Param("monthId") String monthId); /** * @Description 查询org名称 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java index 1381898f01..b8276891d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java @@ -17,6 +17,7 @@ package com.epmet.dao.heart; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -50,4 +51,14 @@ public interface ActInfoDao{ * @Date 2020/9/21 13:55 **/ List selectGridRegUserVolunteer(@Param("list") List regUserIds); + + /** + * @Description 查询组织次数 + * @Param customerId + * @Param monthId + * @Param orgType + * @author zxc + * @date 2020/9/25 4:00 下午 + */ + List selectActInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("orgType") String orgType,@Param("orgIds") List orgIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActUserRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActUserRelationDao.java new file mode 100644 index 0000000000..4cda82f06a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActUserRelationDao.java @@ -0,0 +1,23 @@ +package com.epmet.dao.heart; + +import com.epmet.dto.extract.result.JoinUserCountResultDTO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/25 5:21 下午 + */ +public interface ActUserRelationDao { + + /** + * @Description 查询参与人数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2020/9/25 5:19 下午 + */ + List selectJoinUserCount(@Param("customerId") String customerId,@Param("monthId") String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java index 8700a2b7e2..2628a50ced 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java @@ -1,5 +1,7 @@ package com.epmet.service.evaluationindex.extract.toscreen; +import com.epmet.dto.extract.form.ScreenExtractFormDTO; + /** * @Author zxc * @DateTime 2020/9/24 5:05 下午 @@ -8,11 +10,10 @@ public interface PartyGuideService { /** * @Description 党建引领抽取 - * @param customerId - * @param monthId + * @param screenExtractFormDTO * @author zxc * @date 2020/9/24 5:10 下午 */ - Boolean partyGuideExtract(String customerId,String monthId); + Boolean partyGuideExtract(ScreenExtractFormDTO screenExtractFormDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java index 19b0eaa9d4..57d1556e55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java @@ -3,7 +3,8 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.ScreenConstant; -import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; +import com.epmet.dto.extract.form.ScreenExtractFormDTO; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.*; import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService; @@ -12,6 +13,9 @@ import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; import com.epmet.service.evaluationindex.screen.ScreenPartyBranchDataService; import com.epmet.service.evaluationindex.screen.ScreenPartyLinkMassesDataService; +import com.epmet.service.heart.ActInfoService; +import com.epmet.service.heart.ActUserRelationService; +import com.epmet.service.stats.DimCustomerService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; import org.springframework.beans.BeanUtils; @@ -19,7 +23,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; +import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -43,16 +49,52 @@ public class PartyGuideServiceImpl implements PartyGuideService { private ScreenCustomerAgencyService agencyService; @Autowired private ScreenCustomerGridService gridService; + @Autowired + private ActInfoService actInfoService; + @Autowired + private DimCustomerService dimCustomerService; + @Autowired + private ActUserRelationService actUserRelationService; /** * @Description 党建引领抽取 - * @param customerId - * @param monthId + * @param screenExtractFormDTO * @author zxc * @date 2020/9/24 5:10 下午 */ @Override - public Boolean partyGuideExtract(String customerId, String monthId) { + public Boolean partyGuideExtract(ScreenExtractFormDTO screenExtractFormDTO) { + int pageNo = NumConstant.ONE; + int pageSize = NumConstant.ONE_HUNDRED; + List customerIds = new ArrayList<>(); + String customerId = screenExtractFormDTO.getCustomerId(); + if (!StringUtils.isEmpty(customerId)){ + customerIds.add(customerId); + }else { + customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); + } + String monthId = screenExtractFormDTO.getMonthId(); + if (StringUtils.isEmpty(monthId)){ + monthId = LocalDate.now().toString().replace("-","").substring(NumConstant.ZERO,NumConstant.SIX); + } + if (!CollectionUtils.isEmpty(customerIds)){ + String finalMonthId = monthId; + customerIds.forEach(oneCustomerId -> { + partyGuideExtractParty(oneCustomerId, finalMonthId); + partyGuideExtractOrganize(oneCustomerId,finalMonthId); + }); + } + return true; + } + + /** + * @Description 【党员建群数,群成员数】 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2020/9/25 4:26 下午 + */ + public void partyGuideExtractParty(String customerId, String monthId){ //【党员建群数,群成员数】 List agencyIdList = agencyService.selectAllAgencyId(customerId); if (!CollectionUtils.isEmpty(agencyIdList)){ @@ -61,34 +103,74 @@ public class PartyGuideServiceImpl implements PartyGuideService { if (groupByLevel.containsKey(ScreenConstant.COMMUNITY)){ // 社区级别 List customerGridInfoList = groupByLevel.get(ScreenConstant.COMMUNITY); - disPose(customerGridInfoList,true,customerId,monthId); + disPoseParty(customerGridInfoList,true,customerId,monthId); } if (groupByLevel.containsKey(ScreenConstant.STREET)){ // 街道级别 List customerGridInfoList = groupByLevel.get(ScreenConstant.STREET); - disPose(customerGridInfoList,false,customerId,monthId); + disPoseParty(customerGridInfoList,false,customerId,monthId); } if (groupByLevel.containsKey(ScreenConstant.DISTRICT)){ // 区级 List customerGridInfoList = groupByLevel.get(ScreenConstant.DISTRICT); - disPose(customerGridInfoList,false,customerId,monthId); + disPoseParty(customerGridInfoList,false,customerId,monthId); } if (groupByLevel.containsKey(ScreenConstant.CITY)){ // 市级 List customerGridInfoList = groupByLevel.get(ScreenConstant.CITY); - disPose(customerGridInfoList,false,customerId,monthId); + disPoseParty(customerGridInfoList,false,customerId,monthId); } if (groupByLevel.containsKey(ScreenConstant.PROVINCE)){ // 省级 List customerGridInfoList = groupByLevel.get(ScreenConstant.PROVINCE); - disPose(customerGridInfoList,false,customerId,monthId); + disPoseParty(customerGridInfoList,false,customerId,monthId); } } - return true; } /** - * @Description 处理 + * @Description 【参与人数,组织次数】 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2020/9/25 4:26 下午 + */ + public void partyGuideExtractOrganize(String customerId, String monthId){ + //【参与人数,组织次数】 + List agencyIdList = agencyService.selectAllAgencyId(customerId); + if (!CollectionUtils.isEmpty(agencyIdList)){ + // 根据组织级别分组 + Map> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel)); + if (groupByLevel.containsKey(ScreenConstant.COMMUNITY)){ + // 社区级别 + List customerGridInfoList = groupByLevel.get(ScreenConstant.COMMUNITY); + disPoseOrganize(customerGridInfoList,true,customerId,monthId); + } + if (groupByLevel.containsKey(ScreenConstant.STREET)){ + // 街道级别 + List customerGridInfoList = groupByLevel.get(ScreenConstant.STREET); + disPoseOrganize(customerGridInfoList,false,customerId,monthId); + } + if (groupByLevel.containsKey(ScreenConstant.DISTRICT)){ + // 区级 + List customerGridInfoList = groupByLevel.get(ScreenConstant.DISTRICT); + disPoseOrganize(customerGridInfoList,false,customerId,monthId); + } + if (groupByLevel.containsKey(ScreenConstant.CITY)){ + // 市级 + List customerGridInfoList = groupByLevel.get(ScreenConstant.CITY); + disPoseOrganize(customerGridInfoList,false,customerId,monthId); + } + if (groupByLevel.containsKey(ScreenConstant.PROVINCE)){ + // 省级 + List customerGridInfoList = groupByLevel.get(ScreenConstant.PROVINCE); + disPoseOrganize(customerGridInfoList,false,customerId,monthId); + } + } + } + + /** + * @Description 处理【党员建群数,群成员数】 * @Param agencyIdList * @Param isGrid * @Param customerId @@ -96,7 +178,7 @@ public class PartyGuideServiceImpl implements PartyGuideService { * @author zxc * @date 2020/9/25 2:57 下午 */ - public void disPose(List agencyIdList, Boolean isGrid, String customerId, String monthId) { + public void disPoseParty(List agencyIdList, Boolean isGrid, String customerId, String monthId) { List result = new ArrayList<>(); if (!CollectionUtils.isEmpty(agencyIdList)){ List orgIds = agencyIdList.stream().map(m -> m.getAgencyId()).collect(Collectors.toList()); @@ -109,7 +191,7 @@ public class PartyGuideServiceImpl implements PartyGuideService { Map> groupByAgency = result.stream().collect(Collectors.groupingBy(ScreenPartyLinkMassesDataFormDTO::getParentId)); groupByAgency.forEach((agencyId,gridList) -> { ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO(); - List orgNameAgencyList = agencyService.selectOrgNameAgency(result.stream().map(m -> m.getParentId()).distinct().collect(Collectors.toList())); + List orgNameAgencyList = agencyService.selectOrgNameAgency(orgIds); if (!CollectionUtils.isEmpty(orgNameAgencyList)){ orgNameAgencyList.forEach(name -> { if (agencyId.equals(name.getAgencyId())){ @@ -177,6 +259,68 @@ public class PartyGuideServiceImpl implements PartyGuideService { } } + /** + * @Description 处理【参与人数,组织次数】 + * @Param agencyIdList + * @Param isGrid + * @Param customerId + * @Param monthId + * @author zxc + * @date 2020/9/25 4:28 下午 + */ + public void disPoseOrganize(List agencyIdList, Boolean isGrid, String customerId, String monthId){ + if (!CollectionUtils.isEmpty(agencyIdList)){ + List result = new ArrayList<>(); + List orgIds = agencyIdList.stream().map(m -> m.getAgencyId()).collect(Collectors.toList()); + if (isGrid == true){ + List joinUserCountList = actUserRelationService.selectJoinUserCount(customerId, monthId); + agencyIdList.forEach(agency -> { + String agencyId = agency.getAgencyId(); + Map agencyMap = agencyService.selectAllSubAgencyId(agencyId, customerId); + List gridIds = (List) agencyMap.get(agencyId); + orgIds.addAll(gridIds); + List screenPartyBranchDataList = actInfoService.selectActInfo(customerId, monthId, ScreenConstant.GRID, gridIds); + if (!CollectionUtils.isEmpty(screenPartyBranchDataList)){ + screenPartyBranchDataList.forEach(party -> { + joinUserCountList.forEach(join -> { + if (party.getOrgId().equals(join.getOrgId())){ + party.setAverageJoinUserCount(join.getJoinUserCount()); + party.setAverageJoinUserCount(party.getJoinUserCount() / party.getOrganizeCount()); + } + }); + }); + } + result.addAll(screenPartyBranchDataList); + }); + + // 社区级别的 + Map> groupByAgency = result.stream().collect(Collectors.groupingBy(ScreenPartyBranchDataFormDTO::getParentId)); + List orgNameAgencyList = agencyService.selectOrgNameAgency(orgIds); + groupByAgency.forEach((agencyId,actList) -> { + ScreenPartyBranchDataFormDTO form = new ScreenPartyBranchDataFormDTO(); + if (!CollectionUtils.isEmpty(orgNameAgencyList)){ + orgNameAgencyList.forEach(name -> { + if (agencyId.equals(name.getAgencyId())){ + form.setOrgName(name.getAgencyName()); + form.setParentId(name.getParentId()); + } + }); + } + form.setOrgId(agencyId); + form.setCustomerId(customerId); + form.setOrgType(ScreenConstant.AGENCY); + form.setOrganizeCount(actList.stream().collect(Collectors.summingInt(ScreenPartyBranchDataFormDTO::getOrganizeCount))); + form.setJoinUserCount(actList.stream().collect(Collectors.summingInt(ScreenPartyBranchDataFormDTO::getJoinUserCount))); + form.setAverageJoinUserCount(form.getJoinUserCount() / form.getOrganizeCount()); + result.add(form); + }); + + }else { + + } + } + } + /** * @Description 社区级别的处理 * @Param customerId @@ -245,9 +389,20 @@ public class PartyGuideServiceImpl implements PartyGuideService { }); } + /** + * @Description + * @Param result + * @Param customerId + * @Param monthId + * @Param orgIds + * @author zxc + * @date 2020/9/25 5:50 下午 + */ + @Transactional(rollbackFor = Exception.class) + public void delAndInsertOrganize(List result,String customerId, String monthId, List orgIds){ + List screenPartyBranchData = agencyService.selectAllAgencyIdToOrganize(customerId, monthId); + List screenPartyBranchDataList = gridService.selectAllGridIdToOrganize(customerId, monthId); + screenPartyBranchDataList.addAll(screenPartyBranchData); + } - - - - // TODO 党员志愿服务【参与人数,组织次数】 } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java index 0b2ee8e93e..5ff8fdf050 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java @@ -18,6 +18,7 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; @@ -86,7 +87,9 @@ public interface ScreenCustomerAgencyService{ * @author zxc * @date 2020/9/25 10:39 上午 */ - List selectAllAgencyIdToPartyLinkMessage(String customerId, String dateId); + List selectAllAgencyIdToPartyLinkMessage(String customerId, String monthId); + + List selectAllAgencyIdToOrganize(String customerId, String monthId); /** * @Description 查询org名称【网格】 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 02e3b21f67..82a00909a5 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,7 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; -import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; +import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity; @@ -59,6 +56,7 @@ public interface ScreenCustomerGridService extends BaseService selectAllGridIdToPartyLinkMessage(String customerId, String monthId); + List selectAllGridIdToOrganize(String customerId, String monthId); /** * @Description 查询机关的直属网格 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java index 9b7d925e05..0a79ebf476 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java @@ -26,6 +26,7 @@ import com.epmet.constant.ScreenConstant; import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; @@ -172,6 +173,11 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ return screenCustomerAgencyDao.selectAllAgencyIdToPartyLinkMessage(customerId, monthId); } + @Override + public List selectAllAgencyIdToOrganize(String customerId, String monthId) { + return null; + } + /** * @Description 查询org名称 * @param gridIds 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 f1ac5f0d71..f0a47885ea 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 @@ -24,10 +24,7 @@ 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.extract.form.GovernAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; -import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; +import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity; @@ -122,6 +119,11 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl selectAllGridIdToOrganize(String customerId, String monthId) { + return screenCustomerGridDao.selectAllGridIdToOrganize(customerId, monthId); + } + /** * @Description 查询机关的直属网格 * @param agencyIds diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActInfoService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActInfoService.java index 4caa64828f..959b237c75 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActInfoService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActInfoService.java @@ -1,5 +1,7 @@ package com.epmet.service.heart; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; + import java.util.List; import java.util.Map; @@ -28,4 +30,14 @@ public interface ActInfoService { * @Date 2020/9/21 16:43 **/ Map calActivityCountMap(String customerId, String monthId); + + /** + * @Description 查询组织次数 + * @Param customerId + * @Param monthId + * @Param orgType + * @author zxc + * @date 2020/9/25 4:00 下午 + */ + List selectActInfo(String customerId, String monthId, String orgType, List orgIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActUserRelationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActUserRelationService.java new file mode 100644 index 0000000000..7875323b3c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActUserRelationService.java @@ -0,0 +1,22 @@ +package com.epmet.service.heart; + +import com.epmet.dto.extract.result.JoinUserCountResultDTO; + +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/25 5:17 下午 + */ +public interface ActUserRelationService { + + /** + * @Description 查询参与人数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2020/9/25 5:19 下午 + */ + List selectJoinUserCount(String customerId,String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActInfoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActInfoServiceImpl.java index f56ecc918c..7e65f078e3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActInfoServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActInfoServiceImpl.java @@ -3,11 +3,14 @@ package com.epmet.service.heart.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.heart.ActInfoDao; +import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; import com.epmet.service.heart.ActInfoService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -58,4 +61,20 @@ public class ActInfoServiceImpl implements ActInfoService { } return resultMap; } + + /** + * @Description 查询组织次数 + * @Param customerId + * @Param monthId + * @Param orgType + * @author zxc + * @date 2020/9/25 4:00 下午 + */ + @Override + public List selectActInfo(String customerId, String monthId, String orgType, List orgIds) { + if (!CollectionUtils.isEmpty(orgIds)){ + return baseDao.selectActInfo(customerId, monthId, orgType, orgIds); + } + return new ArrayList<>(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActUserRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActUserRelationServiceImpl.java new file mode 100644 index 0000000000..570967a3c0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActUserRelationServiceImpl.java @@ -0,0 +1,35 @@ +package com.epmet.service.heart.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.heart.ActUserRelationDao; +import com.epmet.dto.extract.result.JoinUserCountResultDTO; +import com.epmet.service.heart.ActUserRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/25 5:17 下午 + */ +@Service +@DataSource(DataSourceConstant.EPMET_HEART) +public class ActUserRelationServiceImpl implements ActUserRelationService { + + @Autowired + private ActUserRelationDao actUserRelationDao; + + /** + * @Description 查询参与人数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2020/9/25 5:19 下午 + */ + @Override + public List selectJoinUserCount(String customerId, String monthId) { + return actUserRelationDao.selectJoinUserCount(customerId, monthId); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index df9a6fd514..594ded8702 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -320,4 +320,19 @@ del_flag = '0' AND CUSTOMER_ID = #{customerId} + + 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 459e873378..7f4df45113 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 @@ -312,4 +312,18 @@ del_flag = '0' AND CUSTOMER_ID = #{customerId} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml index ea26569ba8..3b5bc0edcf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml @@ -32,4 +32,32 @@ vi.USER_ID =#{userId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml new file mode 100644 index 0000000000..ae81f1cbe2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml @@ -0,0 +1,24 @@ + + + + + + + +