Browse Source

治理能力统计

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
99e9518cbb
  1. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgStatisticsResultDTO.java
  2. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java
  3. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java
  4. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedAgencyDailyDao.java
  5. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java
  6. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java
  7. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java
  8. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/IndexCollCommunityService.java
  9. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java
  10. 47
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java
  11. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java
  12. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedAgencyDailyService.java
  13. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java
  14. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  15. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml
  16. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgStatisticsResultDTO.java

@ -14,6 +14,7 @@ public class OrgStatisticsResultDTO implements Serializable {
private static final long serialVersionUID = 9221060553279124719L;
private String customerId;
private String agencyId;
private String orgId;
private Integer count;
private Integer sum;
private String ratio;

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java

@ -96,4 +96,16 @@ public interface FactOriginProjectLogDailyDao extends BaseDao<FactOriginProjectL
*/
List<OrgStatisticsResultDTO> selectSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level")String level);
/**
* 区直部门被吹哨次数
* @author zhaoqifeng
* @date 2020/9/18 14:46
* @param customerId
* @param monthId
* @param level
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> selectDepTransferCount(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level")String level);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java

@ -77,4 +77,15 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao<FactIndexPart
* @date 2020/8/26 10:49 上午
*/
List<Map<String,Object>> selectPublishArticleCountMap(@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);
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedAgencyDailyDao.java

@ -18,10 +18,13 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO;
import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文章发布数量机关日统计表
*
@ -38,4 +41,16 @@ public interface FactArticlePublishedAgencyDailyDao extends BaseDao<FactArticleP
* @return
*/
int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* 获取组织文章数量
* @author zhaoqifeng
* @date 2020/9/20 22:46
* @param customerId
* @param monthId
* @param level
* @return java.util.List<com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO>
*/
List<FactArticlePublishedAgencyDailyDTO> selectArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId,
@Param("level")String level);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java

@ -155,4 +155,15 @@ public interface FactOriginProjectLogDailyService extends BaseService<FactOrigin
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> getSatisfaction(String customerId, String monthId, String level);
/**
* 机关被吹哨次数
* @author zhaoqifeng
* @date 2020/9/18 14:53
* @param customerId
* @param monthId
* @param level
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> getDepTransferCount(String customerId, String monthId, String level);
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java

@ -152,4 +152,9 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
return baseDao.selectSatisfaction(customerId, monthId, level);
}
@Override
public List<OrgStatisticsResultDTO> getDepTransferCount(String customerId, String monthId, String level) {
return baseDao.selectDepTransferCount(customerId, monthId, level);
}
}

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java

@ -0,0 +1,22 @@
package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/9/20 23:00
*/
public interface FactIndexPartyAblityOrgMonthlyService extends BaseService<FactIndexPartyAblityOrgMonthlyEntity> {
/**
* 根据客户清空数据
* @author zhaoqifeng
* @date 2020/9/20 20:33
* @param customerId
* @param monthId
* @param type
* @return void
*/
void deleteByCustomer(String customerId, String monthId, String type);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/IndexCollCommunityService.java

@ -8,7 +8,7 @@ package com.epmet.service.evaluationindex.indexcoll;
*/
public interface IndexCollCommunityService {
/**
* 社区治理能力统计
* 社区能力统计
*
* @author zhaoqifeng
* @date 2020/9/18 13:52
@ -18,14 +18,4 @@ public interface IndexCollCommunityService {
*/
void saveCommunityAbility(String customerId, String dateId);
/**
* 社区党建能力统计
*
* @author zhaoqifeng
* @date 2020/9/18 13:52
* @param customerId
* @param dateId
* @return void
*/
void saveCommunityPartyAbility(String customerId, String dateId);
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java

@ -0,0 +1,23 @@
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.FactIndexPartyAblityOrgMonthlyDao;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import org.springframework.stereotype.Service;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/9/20 23:01
*/
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexPartyAblityOrgMonthlyServiceImpl extends BaseServiceImpl<FactIndexPartyAblityOrgMonthlyDao, FactIndexPartyAblityOrgMonthlyEntity> implements FactIndexPartyAblityOrgMonthlyService {
@Override
public void deleteByCustomer(String customerId, String monthId, String type) {
baseDao.deleteByCustomer(customerId, monthId, type);
}
}

47
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java

@ -6,15 +6,18 @@ 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.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
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.service.evaluationindex.extract.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.IndexCollCommunityService;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.FactArticlePublishedAgencyDailyService;
import com.epmet.util.DimIdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -45,6 +48,10 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
private FactOriginProjectOrgPeriodDailyDao factOriginProjectOrgPeriodDailyDao;
@Autowired
private FactOriginProjectMainDailyService factOriginProjectMainDailyService;
@Autowired
private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService;
@Autowired
private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService;
@Override
public void saveCommunityAbility(String customerId, String dateId) {
@ -65,15 +72,15 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
entity.setMonthId(dimId.getMonthId());
entity.setDataType(OrgTypeConstant.COMMUNITY);
entity.setTransferedCount(NumConstant.ZERO);
entity.setClosedProjectCount(NumConstant.ZERO);
entity.setRespProjectRatio(new BigDecimal(NumConstant.ZERO));
entity.setOverdueProjectRatio(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<OrgStatisticsResultDTO> transferCount = factOriginProjectLogDailyService.getAgencyTransferCount(customerId, dimId.getMonthId(),
OrgTypeConstant.COMMUNITY);
@ -119,18 +126,34 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
}
}));
}
factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);
factIndexGovrnAblityOrgMonthlyService.insertBatch(list);
}
@Override
public void saveCommunityPartyAbility(String customerId, String dateId) {
//当前日期前一天
Date date = DateUtils.getBeforeDay(DateUtils.stringToDate(dateId, DateUtils.DATE_PATTERN_YYYYMMDD));
//获取日期相关维度
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
//获取社区列表
List<DimAgencyDTO>agencyList = dimAgencyService.getAgencyByLevel(customerId, OrgTypeConstant.COMMUNITY);
//2.党建能力
//获取社区发文数量
List<FactArticlePublishedAgencyDailyDTO> articles = factArticlePublishedAgencyDailyService.getArticleCount(customerId, dimId.getMonthId(),
OrgTypeConstant.COMMUNITY);
List<FactIndexPartyAblityOrgMonthlyEntity> partyList = agencyList.stream().map(agency ->{
FactIndexPartyAblityOrgMonthlyEntity entity = new FactIndexPartyAblityOrgMonthlyEntity();
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.setPublishArticleCount(NumConstant.ZERO);
return entity;
}).collect(Collectors.toList());
if (null != articles && !articles.isEmpty()) {
partyList.forEach(entity -> articles.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> {
entity.setPublishArticleCount(dto.getArticleTotalCount());
}));
}
factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);
factIndexPartyAblityOrgMonthlyService.insertBatch(partyList);
}
}

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java

@ -8,12 +8,16 @@ 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;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity;
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.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 lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -44,6 +48,11 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
private FactOriginProjectOrgPeriodDailyDao factOriginProjectOrgPeriodDailyDao;
@Autowired
private FactOriginProjectMainDailyService factOriginProjectMainDailyService;
@Autowired
private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService;
@Autowired
private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService;
@Override
public void saveStreetAbility(String customerId, String dateId) {
//当前日期前一天
@ -107,5 +116,30 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
}
factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET);
factIndexGovrnAblityOrgMonthlyService.insertBatch(list);
//2.党建能力
//获取社区发文数量
List<FactArticlePublishedAgencyDailyDTO> articles = factArticlePublishedAgencyDailyService.getArticleCount(customerId, dimId.getMonthId(),
OrgTypeConstant.STREET);
List<FactIndexPartyAblityOrgMonthlyEntity> partyList = agencyList.stream().map(agency ->{
FactIndexPartyAblityOrgMonthlyEntity entity = new FactIndexPartyAblityOrgMonthlyEntity();
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.setPublishArticleCount(NumConstant.ZERO);
return entity;
}).collect(Collectors.toList());
if (null != articles && !articles.isEmpty()) {
partyList.forEach(entity -> articles.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> {
entity.setPublishArticleCount(dto.getArticleTotalCount());
}));
}
factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET);
factIndexPartyAblityOrgMonthlyService.insertBatch(partyList);
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedAgencyDailyService.java

@ -18,9 +18,11 @@
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO;
import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity;
import java.util.Collection;
import java.util.List;
/**
* 文章发布数量机关日统计表
@ -42,4 +44,15 @@ public interface FactArticlePublishedAgencyDailyService extends BaseService<Fact
*/
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactArticlePublishedAgencyDailyEntity> values);
/**
* 获取组织文章数量
* @author zhaoqifeng
* @date 2020/9/20 22:49
* @param customerId
* @param monthId
* @param level
* @return java.util.List<com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO>
*/
List<FactArticlePublishedAgencyDailyDTO> getArticleCount(String customerId, String monthId, String level);
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java

@ -22,6 +22,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.FactArticlePublishedAgencyDailyDao;
import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO;
import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity;
import com.epmet.service.stats.FactArticlePublishedAgencyDailyService;
import lombok.extern.slf4j.Slf4j;
@ -30,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
/**
* 文章发布数量机关日统计表
@ -55,4 +57,11 @@ public class FactArticlePublishedAgencyDailyServiceImpl extends BaseServiceImpl<
this.insertBatch(values, 100);
return true;
}
@Override
public List<FactArticlePublishedAgencyDailyDTO> getArticleCount(String customerId, String monthId, String level) {
return baseDao.selectArticleCount(customerId, monthId, level);
}
}

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -115,5 +115,26 @@
) b ON a.ID = b.PROJECT_ID
GROUP BY AGENCY_ID
</select>
<select id="selectDepTransferCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT
fopld.CUSTOMER_ID,
fopld.AGENCY_ID,
fopld.ORG_ID,
COUNT( fopld.ID ) AS "count"
FROM
fact_origin_project_log_daily fopld
INNER JOIN dim_agency da ON fopld.AGENCY_ID = da.ID
AND da.`LEVEL` = #{level}
WHERE
fopld.IS_ACTIVE = 0
AND fopld.ACTION_CODE = 'transfer'
AND fopld.MONTH_ID = #{monthId}
AND fopld.CUSTOMER_ID = #{customerId}
AND fopld.ORG_TYPE = "department"
GROUP BY
fopld.CUSTOMER_ID,
fopld.AGENCY_ID,
fopld.ORG_ID
</select>
</mapper>

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml

@ -27,6 +27,12 @@
AND MONTH_ID = #{monthId}
limit 1000;
</delete>
<delete id="deleteByCustomer">
delete from fact_index_party_ablity_org_monthly
where CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
AND DATA_TYPE = #{type}
</delete>
<insert id="batchInsertFactIndexPartyAblityOrgMonthly" parameterType="map">
insert into fact_index_party_ablity_org_monthly

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml

@ -25,6 +25,18 @@
<delete id="deleteByDateId">
DELETE FROM fact_article_published_agency_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR}
</delete>
<select id="selectArticleCount" resultType="com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO">
SELECT
f.AGENCY_ID,
MAX(f.ARTICLE_TOTAL_COUNT) AS "articleTotalCount"
FROM
fact_article_published_agency_daily f
INNER JOIN dim_agency da ON da.CUSTOMER_ID = #{customerId}
AND da.`LEVEL` = #{level}
WHERE
f.MONTH_ID = #{monthId}
GROUP BY f.AGENCY_ID
</select>
</mapper>
Loading…
Cancel
Save