Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj' into dev_temp

dev_shibei_match
jianjun 4 years ago
parent
commit
7e6ed026f5
  1. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java
  2. 3
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/IndexScoreFormDTO.java
  3. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  4. 27
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java
  5. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  6. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  7. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  8. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql
  9. 19
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java

@ -82,5 +82,8 @@ public interface StrConstant {
String MAX="MAX";
//青岛体悟实训客户
String SPECIAL_CUSTOMER = "150282ed25c14ff0785e7e06283b6283";
//平音客户
String PY_CUSTOMER = "6f203e30de1a65aab7e69c058826cd80";
}

3
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/IndexScoreFormDTO.java

@ -3,7 +3,6 @@ package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@ -31,6 +30,8 @@ public class IndexScoreFormDTO implements Serializable {
*/
//@NotBlank(message = "月份Id不能为空",groups = {IndexScoreFormDTO.AddUserInternalGroup.class})
private String monthId;
private String customerId;
public interface AddUserInternalGroup {}
}

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java

@ -134,7 +134,8 @@ public class IndexController {
* @author sun
*/
@PostMapping("month/indexscore")
public Result<IndexScoreResultDTO> indexScore(@RequestBody IndexScoreFormDTO formDTO) {
public Result<IndexScoreResultDTO> indexScore(@RequestHeader("CustomerId") String customerId,@RequestBody IndexScoreFormDTO formDTO) {
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO, IndexScoreFormDTO.AddUserInternalGroup.class);
return new Result<IndexScoreResultDTO>().ok(indexService.indexScore(formDTO));
}

27
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java

@ -199,6 +199,15 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
for(UserSubAgencyResultDTO m:dimList){
logger.info("机关名:"+m.getName()+",总数="+m.getTotal());
}
//2021.5.25 平音客户热心居民改网格员 sun start
if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) {
dimList.forEach(d->{
if("热心居民".equals(d.getType())){
d.setType("网格员");
}
});
}
//2021.5.25 平音客户热心居民改网格员 sun end
return dimList;
}
@ -323,6 +332,15 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
for(UserSubGridResultDTO m:dimList){
logger.info("网格名:"+m.getName()+",总数="+m.getTotal());
}
//2021.5.25 平音客户热心居民改网格员 sun start
if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) {
dimList.forEach(d->{
if("热心居民".equals(d.getType())){
d.setType("网格员");
}
});
}
//2021.5.25 平音客户热心居民改网格员 sun end
return dimList;
}
@ -488,6 +506,15 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
party.setValue(userIncrTrendResDTO.getPartymemberIncr());
resultList.add(party);
}
//2021.5.25 平音客户热心居民改网格员 sun start
if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) {
resultList.forEach(d->{
if("热心居民".equals(d.getType())){
d.setType("网格员");
}
});
}
//2021.5.25 平音客户热心居民改网格员 sun end
return resultList;
}

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -87,6 +87,9 @@
del_flag = '0'
AND parent_id = #{agencyId}
AND month_id = #{monthId,jdbcType=VARCHAR}
<if test="customerId != null and customerId != ''">
AND CUSTOMER_ID = #{customerId}
</if>
<choose>
<when test="orgType != null and orgType != ''">
AND ORG_TYPE = #{orgType,jdbcType=VARCHAR}
@ -189,6 +192,9 @@
WHERE
del_flag = '0'
AND org_id = #{orgId}
<if test="customerId != null and customerId != ''">
AND customer_id = #{customerId}
</if>
<if test="orgType != null and orgType != '' ">
AND org_type = #{orgType}
</if>

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml

@ -35,6 +35,9 @@
del_flag = '0'
AND parent_id = #{agencyId}
AND year_id = YEAR(CURDATE())
<if test="customerId != null and customerId != ''">
AND CUSTOMER_ID = #{customerId}
</if>
<choose>
<when test="orgType != null and orgType != ''">
AND ORG_TYPE = #{orgType,jdbcType=VARCHAR}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java

@ -219,6 +219,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
List<Map<String, Object>> list = null;
groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode));
do {
//以党员userId为单位 获取数量
list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(),(pageNo - 1) * pageSize, pageSize,
formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds());
if (!CollectionUtils.isEmpty(list)) {
@ -304,7 +305,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
}
log.info("计算的参数:{}", JSON.toJSONString(indexMap));
HashMap<String, CalculateResult> result = calculateScore(indexMap);
log.info("计算的结果:{}", result);
log.info("计算的结果:{}", JSON.toJSONString(result));
//处理结果
if (CollectionUtils.isEmpty(result)) {

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql

@ -1 +1 @@
ALTER TABLE `fact_origin_topic_main_daily` ADD `SHIFT_ISSUE` tinyint(1) NOT NULL COMMENT '是否转为议题,0:false,1:true';
ALTER TABLE `fact_origin_topic_main_daily` ADD `SHIFT_ISSUE` tinyint(1) NOT NULL default '0' COMMENT '是否转为议题,0:false,1:true' AFTER `CREATE_TOPIC_USER_IS_PARTY`;

19
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

@ -120,15 +120,15 @@
cpc.QUARTER_ID,
cpc.YEAR_ID,
cpc.USER_ID,
cpc.CREATE_TOPIC_COUNT,
cpc.JOIN_TOPIC_COUNT,
cpc.SHIFT_ISSUE_COUNT,
cpc.SHIFT_PROJECT_COUNT,
cpc.JOIN_THREE_MEETS_COUNT,
cpc.GROUP_USER_COUNT,
cpc.GROUP_TOPIC_COUNT,
cpc.TOPIC_TO_ISSUE_RATIO,
cpc.GROUP_ACTIVE_USER_COUNT
SUM(cpc.CREATE_TOPIC_COUNT) CREATE_TOPIC_COUNT,
SUM(cpc.JOIN_TOPIC_COUNT) JOIN_TOPIC_COUNT,
SUM(cpc.SHIFT_ISSUE_COUNT) SHIFT_ISSUE_COUNT,
SUM(cpc.SHIFT_PROJECT_COUNT) SHIFT_PROJECT_COUNT,
SUM(cpc.JOIN_THREE_MEETS_COUNT) JOIN_THREE_MEETS_COUNT,
SUM(cpc.GROUP_USER_COUNT) GROUP_USER_COUNT,
SUM(cpc.GROUP_TOPIC_COUNT) GROUP_TOPIC_COUNT,
SUM(cpc.TOPIC_TO_ISSUE_RATIO) TOPIC_TO_ISSUE_RATIO,
SUM(cpc.GROUP_ACTIVE_USER_COUNT) GROUP_ACTIVE_USER_COUNT
FROM
fact_index_party_ablity_cpc_monthly cpc
inner join screen_customer_grid scg
@ -148,6 +148,7 @@
and scg.CUSTOMER_ID=#{customerId,jdbcType=VARCHAR}
</otherwise>
</choose>
GROUP BY cpc.USER_ID
LIMIT #{offset},#{pageSize}
</select>

Loading…
Cancel
Save