diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 803b93525e..f610fb6801 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -33,6 +33,8 @@ import com.epmet.service.evaluationindex.extract.CalGridIndexService; import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.indexcal.*; +import com.epmet.service.evaluationindex.indexcoll.IndexCollCommunityService; +import com.epmet.service.evaluationindex.indexcoll.IndexCollStreetService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; import lombok.extern.slf4j.Slf4j; @@ -92,6 +94,10 @@ public class DemoController { private FactOriginTopicMainDailyService factOriginTopicMainDailyService; @Autowired private FactOriginProjectLogDailyService factOriginProjectLogDailyService; + @Autowired + private IndexCollCommunityService indexCollCommunityService; + @Autowired + private IndexCollStreetService indexCollStreetService; @GetMapping("testAlarm") public void testAlarm() { @@ -614,5 +620,16 @@ public class DemoController { } return new Result(); } + @PostMapping("indexCollCommunity") + public Result indexCollCommunity(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ + indexCollCommunityService.saveCommunityAbility(formDTO.getCustomerId(), formDTO.getDateId()); + return new Result(); + } + + @PostMapping("indexCollStreet") + public Result indexCollStreet(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ + indexCollStreetService.saveStreetAbility(formDTO.getCustomerId(), formDTO.getDateId()); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java index 0b58bc2220..0c24c6d79b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.DimDepartmentDTO; import com.epmet.entity.stats.DimDepartmentEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -44,4 +45,13 @@ public interface DimDepartmentDao extends BaseDao { DimDepartmentEntity getLatestCreatedDimEntity(); DimDepartmentEntity getLatestUpdatedDimEntity(); + + /** + * 获取区直部门 + * @author zhaoqifeng + * @date 2020/9/21 14:51 + * @param customerId + * @return java.util.List + */ + List getDistrictDepByCustomer(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java index 1cff4fa1a8..dd48aa0afc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java @@ -18,10 +18,14 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO; +import com.epmet.dto.stats.FactArticlePublishedDepartmentDailyDTO; import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 文章发布数量【部门】日统计表 * @@ -38,4 +42,14 @@ public interface FactArticlePublishedDepartmentDailyDao extends BaseDao + */ + List selectDeptCount(@Param("customerId")String customerId, @Param("monthId")String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectOrgPeriodDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectOrgPeriodDailyService.java new file mode 100644 index 0000000000..e27adb5447 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectOrgPeriodDailyService.java @@ -0,0 +1,26 @@ +package com.epmet.service.evaluationindex.extract; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/21 16:46 + */ +public interface FactOriginProjectOrgPeriodDailyService extends BaseService { + /** + * 项目响应度 + * @author zhaoqifeng + * @date 2020/9/21 16:57 + * @param customerId + * @param monthId + * @param level + * @param orgType + * @return java.util.List + */ + List getResponsiveness(String customerId, String monthId, String level, String orgType); +} 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 040d81d6b5..426fc04193 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 @@ -7,6 +7,7 @@ import com.epmet.dto.extract.form.ExtractIndexFormDTO; import com.epmet.service.evaluationindex.extract.CalCpcIndexService; import com.epmet.service.evaluationindex.extract.CalGridIndexService; import com.epmet.service.evaluationindex.extract.dataToIndex.IndexOriginExtractService; +import com.epmet.service.evaluationindex.indexcoll.IndexCollCommunityService; import com.epmet.service.evaluationindex.indexcoll.IndexCollStreetService; import com.epmet.service.stats.DimCustomerService; import com.epmet.util.DimIdGenerator; @@ -42,6 +43,8 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService private DimCustomerService dimCustomerService; @Autowired private IndexCollStreetService indexCollStreetService; + @Autowired + private IndexCollCommunityService indexCollCommunityService; /** * desc:从统计库对象抽取指标数据 @@ -109,6 +112,11 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService }catch (Exception e){ log.error("抽取【街道治理能力-街道党建能力】发生异常,参数:" + JSON.toJSONString(param), e); } + try{ + indexCollCommunityService.saveCommunityAbility(customerId, monthId); + }catch (Exception 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/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java index 50781824a9..e324d93b58 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.evaluationindex.extract.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; @@ -48,6 +50,7 @@ import java.util.stream.Collectors; * @since v1.0.0 2020-09-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectLogDailyService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java index eef67a5b71..7ef8a7435d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.evaluationindex.extract.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectMainDailyDao; import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; @@ -47,6 +49,7 @@ import java.util.Map; * @since v1.0.0 2020-09-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectMainDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectOrgPeriodDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectOrgPeriodDailyServiceImpl.java new file mode 100644 index 0000000000..a8356acac7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectOrgPeriodDailyServiceImpl.java @@ -0,0 +1,26 @@ +package com.epmet.service.evaluationindex.extract.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.extract.FactOriginProjectOrgPeriodDailyDao; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; +import com.epmet.service.evaluationindex.extract.FactOriginProjectOrgPeriodDailyService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/21 16:48 + */ +@Service +@DataSource(DataSourceConstant.STATS) +public class FactOriginProjectOrgPeriodDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectOrgPeriodDailyService { + @Override + public List getResponsiveness(String customerId, String monthId, String level, String orgType) { + return baseDao.selectResponsiveness(customerId, monthId, level, orgType); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java new file mode 100644 index 0000000000..bf8254d738 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java @@ -0,0 +1,21 @@ +package com.epmet.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/21 15:24 + */ +public interface FactIndexGovrnAblityDeptMonthlyService extends BaseService { + /** + * 根据客户清空数据 + * @author zhaoqifeng + * @date 2020/9/20 20:33 + * @param customerId + * @param monthId + * @return void + */ + void deleteByCustomer(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java index 272da9faef..6e709fa4fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java @@ -40,4 +40,13 @@ public interface FactIndexGovrnAblityOrgMonthlyService extends BaseService list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java index cc541f597f..9abeed8617 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java @@ -39,4 +39,13 @@ public interface FactIndexPartyAblityOrgMonthlyService extends BaseService list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/IndexCollDistrictDepartmentService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/IndexCollDistrictDepartmentService.java index 8416ac208c..e022090391 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/IndexCollDistrictDepartmentService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/IndexCollDistrictDepartmentService.java @@ -7,4 +7,14 @@ package com.epmet.service.evaluationindex.indexcoll; * @date 2020/9/18 10:43 */ public interface IndexCollDistrictDepartmentService { + /** + * 区直部门能力统计 + * + * @param customerId + * @param dateId + * @return void + * @author zhaoqifeng + * @date 2020/9/21 14:42 + */ + void saveDepartmentAbility(String customerId, String dateId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java new file mode 100644 index 0000000000..a8df14af94 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java @@ -0,0 +1,24 @@ +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.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyService; +import org.springframework.stereotype.Service; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/21 15:25 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class FactIndexGovrnAblityDeptMonthlyServiceImpl extends BaseServiceImpl implements FactIndexGovrnAblityDeptMonthlyService { + + @Override + public void deleteByCustomer(String customerId, String monthId) { + baseDao.deleteFactIndexGovrnAblityDeptMonthly(customerId, monthId); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java index e2f2170f67..6f6d5f15a5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java @@ -10,6 +10,7 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthly import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -39,4 +40,10 @@ public class FactIndexGovrnAblityOrgMonthlyServiceImpl extends BaseServiceImpl list) { + insertBatch(list); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java index 5c66bd92f9..f49196555d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java @@ -39,4 +39,10 @@ public class FactIndexPartyAblityOrgMonthlyServiceImpl extends BaseServiceImpl list) { + insertBatch(list); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java index 71e16ac3a8..19a19e8639 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java @@ -1,11 +1,8 @@ package com.epmet.service.evaluationindex.indexcoll.impl; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgTypeConstant; -import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO; @@ -13,6 +10,7 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthly import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; +import com.epmet.service.evaluationindex.extract.FactOriginProjectOrgPeriodDailyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.IndexCollCommunityService; @@ -37,7 +35,6 @@ import java.util.stream.Collectors; */ @Service @Slf4j -@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexCollCommunityServiceImpl implements IndexCollCommunityService { @Autowired private DimAgencyService dimAgencyService; @@ -46,7 +43,7 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService @Autowired private FactOriginProjectLogDailyService factOriginProjectLogDailyService; @Autowired - private FactOriginProjectOrgPeriodDailyDao factOriginProjectOrgPeriodDailyDao; + private FactOriginProjectOrgPeriodDailyService factOriginProjectOrgPeriodDailyService; @Autowired private FactOriginProjectMainDailyService factOriginProjectMainDailyService; @Autowired @@ -57,7 +54,7 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService @Override public void saveCommunityAbility(String customerId, String dateId) { //当前日期前一天 - Date date = DateUtils.getBeforeDay(DateUtils.stringToDate(dateId, DateUtils.DATE_PATTERN_YYYYMMDD)); + Date date = DateUtils.stringToDate(dateId, DateUtils.DATE_PATTERN_YYYYMM); //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); //获取社区列表 @@ -92,7 +89,7 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService } //社区项目响应度 - List responsiveness = factOriginProjectOrgPeriodDailyDao.selectResponsiveness(customerId, dimId.getMonthId(), + List responsiveness = factOriginProjectOrgPeriodDailyService.getResponsiveness(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY, OrgTypeConstant.AGENCY); if (null != responsiveness && !responsiveness.isEmpty()) { list.forEach(entity -> responsiveness.stream().filter(dto -> dto.getAgencyId().equals(entity.getAgencyId())).forEach(response -> { @@ -123,7 +120,7 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService if (sa.getCount() != NumConstant.ZERO) { BigDecimal count = new BigDecimal(sa.getCount()); BigDecimal sum = new BigDecimal(sa.getSum()); - entity.setOverdueProjectRatio(sum.divide(count, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setSatisfactionRatio(sum.divide(count, NumConstant.SIX, RoundingMode.HALF_UP)); } })); } @@ -132,19 +129,20 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(customerId,dimId.getMonthId(),"month"); Map responseMap = factOriginProjectLogDailyService.getAgencyResponseRatio(customerId,dimId.getMonthId(),"month"); list.forEach(entity ->{ - entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId())); + entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); BigDecimal element = entity.getClosedProjectRatio(); - //办结率 - entity.setClosedProjectRatio( - element.divide(new BigDecimal(entity.getTransferedCount()), NumConstant.SIX, RoundingMode.HALF_UP) - ); + if (entity.getTransferedCount() != NumConstant.ZERO) { + //办结率 + entity.setClosedProjectRatio( + element.divide(new BigDecimal(entity.getTransferedCount()), NumConstant.SIX, RoundingMode.HALF_UP) + ); + } //响应度 - entity.setRespProjectRatio(responseMap.get(entity.getAgencyId())); }); factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY); - factIndexGovrnAblityOrgMonthlyService.insertBatch(list); + factIndexGovrnAblityOrgMonthlyService.saveList(list); //2.党建能力 //获取社区发文数量 @@ -169,7 +167,7 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService })); } factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY); - factIndexPartyAblityOrgMonthlyService.insertBatch(partyList); + factIndexPartyAblityOrgMonthlyService.saveList(partyList); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollDistrictDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollDistrictDepartmentServiceImpl.java index c5f62d4072..7777b6dfe7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollDistrictDepartmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollDistrictDepartmentServiceImpl.java @@ -1,11 +1,32 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.OrgTypeConstant; +import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.stats.DimDepartmentDTO; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; +import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.IndexCollDistrictDepartmentService; +import com.epmet.service.stats.DimDepartmentService; +import com.epmet.service.stats.FactArticlePublishedDepartmentDailyService; +import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + /** * @author zhaoqifeng * @dscription @@ -13,6 +34,75 @@ import org.springframework.stereotype.Service; */ @Service @Slf4j -@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexCollDistrictDepartmentServiceImpl implements IndexCollDistrictDepartmentService { + @Autowired + private DimDepartmentService dimDepartmentService; + @Autowired + private FactIndexGovrnAblityDeptMonthlyService factIndexGovrnAblityDeptMonthlyService; + @Autowired + private FactOriginProjectLogDailyService factOriginProjectLogDailyService; + @Autowired + private FactOriginProjectOrgPeriodDailyDao factOriginProjectOrgPeriodDailyDao; + @Autowired + private FactOriginProjectMainDailyService factOriginProjectMainDailyService; + @Autowired + private FactArticlePublishedDepartmentDailyService factArticlePublishedDepartmentDailyService; + @Autowired + private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService; + + @Override + public void saveDepartmentAbility(String customerId, String dateId) { + { + //当前日期前一天 + Date date = DateUtils.getBeforeDay(DateUtils.stringToDate(dateId, DateUtils.DATE_PATTERN_YYYYMM)); + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + //获取区直部门列表 + List departmentList = dimDepartmentService.getDistrictDepByCustomer(customerId); + //区直部门数据初始化 + List list = departmentList.stream().map(department ->{ + FactIndexGovrnAblityDeptMonthlyEntity entity = new FactIndexGovrnAblityDeptMonthlyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(department.getAgencyId()); + entity.setDeptId(department.getId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setTransferedCount(NumConstant.ZERO); + entity.setRespProjectRatio(new BigDecimal(NumConstant.ZERO)); + entity.setClosedProjectRatio(new BigDecimal(NumConstant.ZERO)); + entity.setSatisfactionRatio(new BigDecimal(NumConstant.ZERO)); + entity.setClosedProjectCount(NumConstant.ZERO); + entity.setHandleProjectRatio(new BigDecimal(NumConstant.ZERO)); + return entity; + }).collect(Collectors.toList()); + //1.治理能力 + //被吹哨次数统计 + List transferCount = factOriginProjectLogDailyService.getDepTransferCount(customerId, dimId.getMonthId(), + OrgTypeConstant.DISTRICT); + if (null != transferCount && !transferCount.isEmpty()) { + list.forEach(entity -> transferCount.stream().filter(dto -> dto.getOrgId().equals(entity.getDeptId())).forEach(count -> { + entity.setTransferedCount(count.getCount()); + })); + } + + //区直部门项目响应度 + List responsiveness = factOriginProjectOrgPeriodDailyDao.selectResponsiveness(customerId, dimId.getMonthId(), + OrgTypeConstant.DISTRICT, "dept"); + if (null != responsiveness && !responsiveness.isEmpty()) { + list.forEach(entity -> responsiveness.stream().filter(dto -> dto.getAgencyId().equals(entity.getDeptId())).forEach(response -> { + if (response.getCount() != NumConstant.ZERO) { + BigDecimal count = new BigDecimal(response.getCount()); + BigDecimal sum = new BigDecimal(response.getSum()); + entity.setRespProjectRatio(sum.divide(count, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } + + //TODO 区直部门办结项目满意度 暂时无法统计 + + factIndexGovrnAblityDeptMonthlyService.deleteByCustomer(customerId, dimId.getMonthId()); + factIndexGovrnAblityDeptMonthlyService.insertBatch(list); + } + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java index 00f4d71ce6..3931f8d344 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java @@ -1,11 +1,8 @@ package com.epmet.service.evaluationindex.indexcoll.impl; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgTypeConstant; -import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO; @@ -13,13 +10,13 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthly import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; +import com.epmet.service.evaluationindex.extract.FactOriginProjectOrgPeriodDailyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.IndexCollStreetService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; import com.epmet.util.DimIdGenerator; -import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -38,7 +35,6 @@ import java.util.stream.Collectors; */ @Service @Slf4j -@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexCollStreetServiceImpl implements IndexCollStreetService { @Autowired private DimAgencyService dimAgencyService; @@ -47,7 +43,7 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { @Autowired private FactOriginProjectLogDailyService factOriginProjectLogDailyService; @Autowired - private FactOriginProjectOrgPeriodDailyDao factOriginProjectOrgPeriodDailyDao; + private FactOriginProjectOrgPeriodDailyService factOriginProjectOrgPeriodDailyService; @Autowired private FactOriginProjectMainDailyService factOriginProjectMainDailyService; @Autowired @@ -58,7 +54,7 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { @Override public void saveStreetAbility(String customerId, String dateId) { //当前日期前一天 - Date date = DateUtils.getBeforeDay(DateUtils.stringToDate(dateId, DateUtils.DATE_PATTERN_YYYYMMDD)); + Date date = DateUtils.stringToDate(dateId, DateUtils.DATE_PATTERN_YYYYMM); //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); //获取社区列表 @@ -96,7 +92,7 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { } //社区项目响应度 - List responsiveness = factOriginProjectOrgPeriodDailyDao.selectResponsiveness(customerId, dimId.getMonthId(), + List responsiveness = factOriginProjectOrgPeriodDailyService.getResponsiveness(customerId, dimId.getMonthId(), OrgTypeConstant.STREET, OrgTypeConstant.AGENCY); if (null != responsiveness && !responsiveness.isEmpty()) { list.forEach(entity -> responsiveness.stream().filter(dto -> dto.getAgencyId().equals(entity.getAgencyId())).forEach(response -> { @@ -115,7 +111,7 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { if (sa.getCount() != NumConstant.ZERO) { BigDecimal count = new BigDecimal(sa.getCount()); BigDecimal sum = new BigDecimal(sa.getSum()); - entity.setOverdueProjectRatio(sum.divide(count, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setSatisfactionRatio(sum.divide(count, NumConstant.SIX, RoundingMode.HALF_UP)); } })); } @@ -123,18 +119,19 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(customerId,dimId.getMonthId(),"month"); Map responseMap = factOriginProjectLogDailyService.getAgencyResponseRatio(customerId,dimId.getMonthId(),"month"); list.forEach(entity ->{ - entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId())); + entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); BigDecimal element = entity.getClosedProjectRatio(); - //办结率 - entity.setClosedProjectRatio( - element.divide(new BigDecimal(entity.getTransferedCount()), NumConstant.SIX, RoundingMode.HALF_UP) - ); + if (entity.getTransferedCount() != NumConstant.ZERO) { + //办结率 + entity.setClosedProjectRatio( + element.divide(new BigDecimal(entity.getTransferedCount()), NumConstant.SIX, RoundingMode.HALF_UP) + ); + } //响应度 - entity.setRespProjectRatio(responseMap.get(entity.getAgencyId())); }); factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET); - factIndexGovrnAblityOrgMonthlyService.insertBatch(list); + factIndexGovrnAblityOrgMonthlyService.saveList(list); //2.党建能力 @@ -159,6 +156,6 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { })); } factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET); - factIndexPartyAblityOrgMonthlyService.insertBatch(partyList); + factIndexPartyAblityOrgMonthlyService.saveList(partyList); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java index 767d5b8ffe..c1d5478153 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java @@ -110,4 +110,14 @@ public interface DimDepartmentService extends BaseService { DimDepartmentEntity getLatestCreatedDimEntity(); DimDepartmentEntity getLatestUpdatedDimEntity(); + + /** + * 获取区直部门列表 + * @author zhaoqifeng + * @date 2020/9/21 14:50 + * @param customerId + * @return java.util.List + */ + List getDistrictDepByCustomer(String customerId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java index 40ae1d8002..28baf7be81 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java @@ -18,9 +18,11 @@ package com.epmet.service.stats; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.stats.FactArticlePublishedDepartmentDailyDTO; import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; import java.util.Collection; +import java.util.List; /** * 文章发布数量【部门】日统计表 @@ -41,4 +43,14 @@ public interface FactArticlePublishedDepartmentDailyService extends BaseService< */ boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + /** + * 获取区直部门文章数量 + * @author zhaoqifeng + * @date 2020/9/20 22:49 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getDeptCount(String customerId, String monthId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java index bbc261910c..5b05345a16 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java @@ -158,4 +158,9 @@ public class DimDepartmentServiceImpl extends BaseServiceImpl getDistrictDepByCustomer(String customerId) { + return baseDao.getDistrictDepByCustomer(customerId); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java index b21b0bb942..0630970f56 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java @@ -21,6 +21,7 @@ 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.stats.FactArticlePublishedDepartmentDailyDao; +import com.epmet.dto.stats.FactArticlePublishedDepartmentDailyDTO; import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; import com.epmet.service.stats.FactArticlePublishedDepartmentDailyService; import lombok.extern.slf4j.Slf4j; @@ -28,6 +29,7 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.util.Collection; +import java.util.List; /** * 文章发布数量【部门】日统计表 @@ -51,4 +53,9 @@ public class FactArticlePublishedDepartmentDailyServiceImpl extends BaseServiceI this.insertBatch(values, 100); return true; } + + @Override + public List getDeptCount(String customerId, String monthId) { + return baseDao.selectDeptCount(customerId, monthId); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml index bf502d1af2..c5b8f718fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml @@ -48,7 +48,7 @@ SELECT f.CUSTOMER_ID, f.ORG_ID AS "agencyId", - SUM( PERIOD_TILL_REPLY_FIRSTLY ) AS "sum", + SUM( TOTAL_PERIOD ) AS "sum", COUNT( f.ID ) AS "count" FROM fact_origin_project_org_period_daily f @@ -57,7 +57,7 @@ WHERE f.ORG_TYPE = #{orgType} AND DATE_FORMAT(INFORMED_DATE, '%Y%m') = #{monthId} - AND PERIOD_TILL_REPLY_FIRSTLY != 0 + AND TOTAL_PERIOD != 0 AND f.CUSTOMER_ID = #{customerId} GROUP BY f.CUSTOMER_ID, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml index 4f0a68ed28..fdfc9a5c31 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml @@ -52,4 +52,16 @@ order by UPDATED_TIME desc limit 1 + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml index 5050847753..aeef594371 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml @@ -31,7 +31,8 @@ MAX(f.ARTICLE_TOTAL_COUNT) AS "articleTotalCount" FROM fact_article_published_agency_daily f - INNER JOIN dim_agency da ON da.CUSTOMER_ID = #{customerId} + INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID + AND da.CUSTOMER_ID = #{customerId} AND da.`LEVEL` = #{level} WHERE f.MONTH_ID = #{monthId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml index abe5fafc0a..421a90c31b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml @@ -25,6 +25,19 @@ DELETE FROM fact_article_published_department_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + \ No newline at end of file