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

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

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

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 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 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 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 isTotal;
/**
* 计算指标时的原始值 字符串类型
*/
private String originValue;
/** /**
* 分值 * 分值
*/ */

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

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

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

@ -5,7 +5,7 @@
<!-- 【街道】中间表插入 --> <!-- 【街道】中间表插入 -->
<insert id="insertStreetRecord"> <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 ) WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES VALUES
<foreach collection="lists" item="item" separator=","> <foreach collection="lists" item="item" separator=",">
@ -18,6 +18,7 @@
#{item.quarterId}, #{item.quarterId},
#{item.monthId}, #{item.monthId},
#{item.dataType}, #{item.dataType},
#{item.originValue},
#{item.score}, #{item.score},
#{item.indexCode}, #{item.indexCode},
#{item.allParentIndexCode}, #{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 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 ) WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES VALUES
<foreach collection="lists" item="item" separator=","> <foreach collection="lists" item="item" separator=",">
@ -17,6 +17,7 @@
#{item.yearId}, #{item.yearId},
#{item.quarterId}, #{item.quarterId},
#{item.monthId}, #{item.monthId},
#{item.originValue},
#{item.score}, #{item.score},
#{item.indexCode}, #{item.indexCode},
#{item.allParentIndexCode}, #{item.allParentIndexCode},

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

@ -14,24 +14,9 @@
</if> </if>
</delete> </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 id="getPartScore" resultType="com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity">
select 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 WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
and MONTH_ID = #{monthId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR}
@ -110,6 +95,7 @@
`YEAR_ID`, `YEAR_ID`,
`MONTH_ID`, `MONTH_ID`,
`USER_ID`, `USER_ID`,
`ORIGIN_VALUE`,
`SCORE`, `SCORE`,
`INDEX_CODE`, `INDEX_CODE`,
`ALL_PARENT_INDEX_CODE`, `ALL_PARENT_INDEX_CODE`,
@ -131,6 +117,7 @@
#{item.yearId}, #{item.yearId},
#{item.monthId}, #{item.monthId},
#{item.userId}, #{item.userId},
#{item.originValue},
#{item.score}, #{item.score},
#{item.indexCode}, #{item.indexCode},
#{item.allParentIndexCode}, #{item.allParentIndexCode},

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

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

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

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

Loading…
Cancel
Save