diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index e4f1f12898..c7ea1d7795 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -78,4 +78,15 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); + + /** + * 根据组织类型删除数据 + * @author zhaoqifeng + * @date 2020/9/20 20:52 + * @param customerId + * @param monthId + * @param type + * @return java.lang.Integer + */ + Integer deleteByCustomer(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("type") String type); } 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 d0e69169d2..d878fb84a3 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 @@ -18,6 +18,7 @@ package com.epmet.dao.heart; import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -61,4 +62,14 @@ public interface ActInfoDao{ * @date 2020/9/25 4:00 下午 */ List selectActInfo(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * 获取机关活动次数 + * @author zhaoqifeng + * @date 2020/9/30 16:53 + * @param customerId + * @param monthId + * @return java.util.List + */ + List selectAgencyActCount(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java index f3ac4c2e19..5242a1e4a8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java @@ -56,6 +56,16 @@ public interface ProjectProcessDao extends BaseDao { */ List selectProcessListByCustomer(@Param("customerId") String customerId, @Param("date") String date); + /** + * 根据客户查询响应节点 + * @author zhaoqifeng + * @date 2020/9/16 15:18 + * @param customerId + * @param date + * @return java.util.List + */ + List selectResponseProcessList(@Param("customerId") String customerId, @Param("date") String date); + /** * 查询各个节点的受理人 * @author zhaoqifeng diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java index 2ed9e35483..031f32801c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java @@ -8,16 +8,20 @@ import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectOrgPeriodDailyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService; +import com.epmet.service.heart.ActInfoService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -51,6 +55,10 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService; @Autowired private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService; + @Autowired + private FactIndexServiceAblityOrgMonthlyService factIndexServiceAblityOrgMonthlyService; + @Autowired + private ActInfoService actInfoService; @Override public void saveCommunityAbility(String customerId, String dateId) { @@ -175,6 +183,31 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService } factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY); factIndexPartyAblityOrgMonthlyService.saveList(partyList); + + + //3. 服务能力 + List serviceList = agencyList.stream().map(agency ->{ + FactIndexServiceAblityOrgMonthlyEntity entity = new FactIndexServiceAblityOrgMonthlyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(agency.getId()); + entity.setParentId(agency.getPid()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDataType(OrgTypeConstant.COMMUNITY); + entity.setActivityCount(NumConstant.ZERO); + return entity; + }).collect(Collectors.toList()); + + //获取活动组织次数 + List actList = actInfoService.getAgencyActCount(customerId, dimId.getMonthId()); + if (CollectionUtils.isNotEmpty(actList)) { + serviceList.forEach(entity -> actList.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> { + entity.setActivityCount(dto.getCount()); + })); + } + factIndexServiceAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY); + factIndexServiceAblityOrgMonthlyService.saveList(serviceList); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java index c548270b9b..b1fce5c32d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java @@ -10,11 +10,14 @@ import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollDistrictService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectOrgPeriodDailyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService; +import com.epmet.service.heart.ActInfoService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; import com.epmet.util.DimIdGenerator; @@ -53,6 +56,10 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService { private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService; @Autowired private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService; + @Autowired + private FactIndexServiceAblityOrgMonthlyService factIndexServiceAblityOrgMonthlyService; + @Autowired + private ActInfoService actInfoService; @Override public void saveDistrictAbility(String customerId, String dateId) { @@ -168,5 +175,29 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService { } factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.DISTRICT); factIndexPartyAblityOrgMonthlyService.saveList(partyList); + + //3. 服务能力 + List serviceList = agencyList.stream().map(agency ->{ + FactIndexServiceAblityOrgMonthlyEntity entity = new FactIndexServiceAblityOrgMonthlyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(agency.getId()); + entity.setParentId(agency.getPid()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDataType(OrgTypeConstant.DISTRICT); + entity.setActivityCount(NumConstant.ZERO); + return entity; + }).collect(Collectors.toList()); + + //获取活动组织次数 + List actList = actInfoService.getAgencyActCount(customerId, dimId.getMonthId()); + if (CollectionUtils.isNotEmpty(actList)) { + serviceList.forEach(entity -> actList.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> { + entity.setActivityCount(dto.getCount()); + })); + } + factIndexServiceAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.DISTRICT); + factIndexServiceAblityOrgMonthlyService.saveList(serviceList); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java index 27275d1e12..ef6e67cfc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java @@ -8,16 +8,20 @@ import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectOrgPeriodDailyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService; +import com.epmet.service.heart.ActInfoService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -51,6 +55,10 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService; @Autowired private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService; + @Autowired + private FactIndexServiceAblityOrgMonthlyService factIndexServiceAblityOrgMonthlyService; + @Autowired + private ActInfoService actInfoService; @Override public void saveStreetAbility(String customerId, String dateId) { @@ -165,5 +173,29 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { } factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET); factIndexPartyAblityOrgMonthlyService.saveList(partyList); + + //3. 服务能力 + List serviceList = agencyList.stream().map(agency ->{ + FactIndexServiceAblityOrgMonthlyEntity entity = new FactIndexServiceAblityOrgMonthlyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(agency.getId()); + entity.setParentId(agency.getPid()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDataType(OrgTypeConstant.STREET); + entity.setActivityCount(NumConstant.ZERO); + return entity; + }).collect(Collectors.toList()); + + //获取活动组织次数 + List actList = actInfoService.getAgencyActCount(customerId, dimId.getMonthId()); + if (CollectionUtils.isNotEmpty(actList)) { + serviceList.forEach(entity -> actList.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> { + entity.setActivityCount(dto.getCount()); + })); + } + factIndexServiceAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET); + factIndexServiceAblityOrgMonthlyService.saveList(serviceList); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java index 9c0f977223..77ac5f2fc7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java @@ -109,17 +109,17 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService try{ indexCollStreetService.saveStreetAbility(customerId, monthId); }catch (Exception e){ - log.error("抽取【街道治理能力-街道党建能力】发生异常,参数:" + JSON.toJSONString(param), e); + log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); } try{ indexCollCommunityService.saveCommunityAbility(customerId, monthId); }catch (Exception e){ - log.error("抽取【社区治理能力-社区党建能力】发生异常,参数:" + JSON.toJSONString(param), e); + log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); } try{ indexCollDistrictService.saveDistrictAbility(customerId, monthId); }catch (Exception e){ - log.error("抽取【全区治理能力-全区党建能力】发生异常,参数:" + JSON.toJSONString(param), e); + log.error("抽取【全区治理能力-全区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); } }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 263ab1b8b6..e22c8e8b75 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -232,6 +232,56 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; }).collect(Collectors.toList()); + List responseList = projectProcessService.getResponseProcessList(customerId, dateString); + if (!CollectionUtils.isEmpty(responseList)) { + logList.addAll(responseList.stream().map(process -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); + FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(process.getAgencyId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDateId(dimId.getDateId()); + entity.setProjectId(process.getProjectId()); + entity.setOperationUserId(process.getStaffId()); + entity.setActionCode(process.getOperation()); + entity.setIsActive(NumConstant.ONE); + entity.setPids(process.getPids()); + if (StringUtils.isNotBlank(process.getDepartmentId())) { + entity.setOrgType("department"); + entity.setOrgId(process.getDepartmentId()); + entity.setPid(process.getAgencyId()); + } else if (StringUtils.isNotBlank(process.getGridId())) { + entity.setOrgType("grid"); + entity.setOrgId(process.getGridId()); + entity.setPid(process.getAgencyId()); + } else { + if (!process.getPids().contains(StrConstant.COLON)) { + entity.setPids(""); + entity.setPid(NumConstant.ZERO_STR); + } else { + String[] orgArray = process.getPids().split(StrConstant.COLON); + if (orgArray.length > NumConstant.ONE) { + entity.setPid(orgArray[orgArray.length - NumConstant.TWO]); + String path = process.getPids().replaceAll(process.getAgencyId(), ""); + if (path.endsWith(StrConstant.COLON)) { + path = path.substring(NumConstant.ZERO, path.length() - NumConstant.ONE); + } + entity.setPids(path); + } else { + log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}", process.getAgencyId(), process.getPids()); + entity.setPid(NumConstant.ZERO_STR); + entity.setPids(""); + } + } + } + + return entity; + }).collect(Collectors.toList())); + } + //项目评论人 List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyService.java new file mode 100644 index 0000000000..77c375fd83 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyService.java @@ -0,0 +1,33 @@ +package com.epmet.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/30 16:39 + */ +public interface FactIndexServiceAblityOrgMonthlyService extends BaseService { + /** + * 根据客户清空数据 + * @author zhaoqifeng + * @date 2020/9/20 20:33 + * @param customerId + * @param monthId + * @param type + * @return void + */ + void deleteByCustomer(String customerId, String monthId, String type); + + /** + * 批量插入 + * @author zhaoqifeng + * @date 2020/9/21 17:08 + * @param list + * @return void + */ + void saveList(List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityOrgMonthlyServiceImpl.java new file mode 100644 index 0000000000..ec11ae6d2e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityOrgMonthlyServiceImpl.java @@ -0,0 +1,30 @@ +package com.epmet.service.evaluationindex.indexcoll.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/30 16:39 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class FactIndexServiceAblityOrgMonthlyServiceImpl extends BaseServiceImpl implements FactIndexServiceAblityOrgMonthlyService { + @Override + public void deleteByCustomer(String customerId, String monthId, String type) { + baseDao.deleteByCustomer(customerId, monthId, type); + } + + @Override + public void saveList(List list) { + insertBatch(list); + } +} 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 c2817f6321..769372ad25 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,6 +1,7 @@ package com.epmet.service.heart; import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import java.util.List; import java.util.Map; @@ -40,4 +41,14 @@ public interface ActInfoService { * @date 2020/9/25 4:00 下午 */ List selectActInfo(String customerId, String monthId); + + /** + * 获取机关活动次数 + * @author zhaoqifeng + * @date 2020/9/30 17:02 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getAgencyActCount(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 038341d76c..dfe7a5f263 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 @@ -4,6 +4,7 @@ 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.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.service.heart.ActInfoService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -74,4 +75,9 @@ public class ActInfoServiceImpl implements ActInfoService { public List selectActInfo(String customerId, String monthId) { return baseDao.selectActInfo(customerId, monthId); } + + @Override + public List getAgencyActCount(String customerId, String monthId) { + return baseDao.selectAgencyActCount(customerId, monthId); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java index 0a4926e22e..66dc3dfe10 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java @@ -53,6 +53,16 @@ public interface ProjectProcessService extends BaseService */ List getProcessListByCustomer(String customerId, String date); + /** + * 根据客户查询响应节点 + * @author zhaoqifeng + * @date 2020/9/30 16:27 + * @param customerId + * @param date + * @return java.util.List + */ + List getResponseProcessList(String customerId, String date); + /** * 查询各个节点的受理人 * @author zhaoqifeng diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index 8cdf2698e7..074bff1979 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -66,6 +66,11 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl getResponseProcessList(String customerId, String date) { + return baseDao.selectResponseProcessList(customerId, date); + } + @Override public List getProcessStaffByCustomer(String customerId, String date) { return baseDao.selectProcessStaffByCustomer(customerId, date); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index e87e17874f..a72642ef9a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -27,6 +27,12 @@ AND MONTH_ID = #{monthId} limit 1000; + + delete from fact_index_service_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + AND DATA_TYPE = #{type} + insert into fact_index_service_ablity_org_monthly 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 c75ccf54d8..8f04291c27 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 @@ -53,4 +53,18 @@ AND DATE_FORMAT( ACTUAL_END_TIME, '%Y%m' ) = #{monthId} GROUP BY SPONSOR_ID + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index 07f1efef94..a1e7942543 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -206,4 +206,28 @@ GROUP BY process.PROJECT_ID ORDER BY process.CREATED_TIME DESC + \ No newline at end of file