Browse Source

指标原始数据统计

master
jianjun 5 years ago
parent
commit
be738a8303
  1. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexOriginExtractController.java
  2. 43
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java
  4. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java
  5. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java
  6. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java
  7. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  8. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml
  9. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml
  10. 19
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml
  11. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml
  12. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexOriginExtractController.java

@ -1,8 +1,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.extract.form.ExtractFormDTO;
import com.epmet.service.evaluationindex.extract.FactOriginExtractService;
import com.epmet.dto.extract.form.ExtractIndexFormDTO;
import com.epmet.service.evaluationindex.extract.dataToIndex.IndexOriginExtractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("indexorigin")
public class IndexOriginExtractController {
@Autowired
private FactOriginExtractService factOriginExtractService;
private IndexOriginExtractService indexOriginExtractService;
/**
@ -30,8 +30,8 @@ public class IndexOriginExtractController {
* @return
*/
@PostMapping("extractall")
public Result extractAll(@RequestBody ExtractFormDTO extractFormDTO) {
factOriginExtractService.extractAll(extractFormDTO);
public Result extractAll(@RequestBody ExtractIndexFormDTO extractFormDTO) {
indexOriginExtractService.indexOriginExtractAll(extractFormDTO);
return new Result();
}
}

43
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java

@ -62,25 +62,30 @@ public class AgencySubScoreEntity extends BaseEpmetEntity {
*/
private String quarterId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 1总分0不是默认0
*/
private String isTotal;
/**
* 分值
*/
private BigDecimal score;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan
*/
private String indexCode;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 1总分0不是默认0
*/
private String isTotal;
/**
* 计算指标时的原始值 字符串类型
*/
private String originValue;
/**
* 分值
*/
private BigDecimal score;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan
*/
private String indexCode;
/**
* 数据类型 district 全区street街道

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java

@ -68,6 +68,11 @@ public class CpcSubScoreEntity extends BaseEpmetEntity {
*/
private String userId;
/**
* 计算指标时的原始值 字符串类型
*/
private String originValue;
/**
* 分值
*/

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java

@ -67,6 +67,11 @@ public class DeptSubScoreEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 计算指标时的原始值 字符串类型
*/
private String originValue;
/**
* 分值
*/

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java

@ -48,6 +48,11 @@ public class FactIndexCommunitySubScoreEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 计算指标时的原始值 字符串类型
*/
private String originValue;
/**
* 分值
*/

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java

@ -77,6 +77,11 @@ public class GridSubScoreEntity extends BaseEpmetEntity {
*/
private String isTotal;
/**
* 计算指标时的原始值 字符串类型
*/
private String originValue;
/**
* 分值
*/

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -58,13 +58,14 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
List<String> customerIds = new ArrayList<>();
if (StringUtils.isNotBlank(customerId)) {
customerIds.add(customerId);
}
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize);
if (CollectionUtils.isEmpty(customerIds)) {
log.error("indexOriginExtractAll 获取客户Id为空");
return;
} else {
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize);
if (CollectionUtils.isEmpty(customerIds)) {
log.error("indexOriginExtractAll 获取客户Id为空");
return;
}
}
String finalMonthId = monthId;

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml

@ -5,7 +5,7 @@
<!-- 【街道】中间表插入 -->
<insert id="insertStreetRecord">
INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, ORIGIN_VALUE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="lists" item="item" separator=",">
@ -18,6 +18,7 @@
#{item.quarterId},
#{item.monthId},
#{item.dataType},
#{item.originValue},
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml

@ -5,7 +5,7 @@
<!-- 党建能力【社区】中间表插入 -->
<insert id="insertCommunityPartyRecord">
INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, ORIGIN_VALUE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="lists" item="item" separator=",">
@ -17,6 +17,7 @@
#{item.yearId},
#{item.quarterId},
#{item.monthId},
#{item.originValue},
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},

19
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml

@ -14,24 +14,9 @@
</if>
</delete>
<resultMap type="com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity" id="cpcScoreMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="userId" column="USER_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getPartScore" resultType="com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity">
select
CUSTOMER_ID,AGENCY_ID,GRID_ID,YEAR_ID,MONTH_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_sub_score
CUSTOMER_ID,AGENCY_ID,GRID_ID,YEAR_ID,MONTH_ID,USER_ID,ORIGIN_VALUE,SCORE,INDEX_CODE FROM fact_index_cpc_sub_score
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
and MONTH_ID = #{monthId,jdbcType=VARCHAR}
@ -110,6 +95,7 @@
`YEAR_ID`,
`MONTH_ID`,
`USER_ID`,
`ORIGIN_VALUE`,
`SCORE`,
`INDEX_CODE`,
`ALL_PARENT_INDEX_CODE`,
@ -131,6 +117,7 @@
#{item.yearId},
#{item.monthId},
#{item.userId},
#{item.originValue},
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml

@ -13,6 +13,7 @@
QUARTER_ID,
YEAR_ID,
MONTH_ID,
ORIGIN_VALUE,
SCORE,
INDEX_CODE,
ALL_PARENT_INDEX_CODE,
@ -33,6 +34,7 @@
#{item.quarterId},
#{item.yearId},
#{item.monthId},
#{item.originValue},
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml

@ -14,6 +14,7 @@
`QUARTER_ID`,
`YEAR_ID`,
`MONTH_ID`,
`ORIGIN_VALUE`,
`SCORE`,
`INDEX_CODE`,
ALL_PARENT_INDEX_CODE,
@ -36,6 +37,7 @@
#{item.quarterId},
#{item.yearId},
#{item.monthId},
#{item.originValue},
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},

Loading…
Cancel
Save