list);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java
new file mode 100644
index 0000000000..5c3dfddd3d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.heart;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 活动信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-19
+ */
+@Mapper
+public interface ActInfoDao{
+ /**
+ * @return java.util.List>
+ * @param customerId
+ * @param monthId
+ * @author yinzuomei
+ * @description 查询这个月,各个网格举办的活动次数 活动状态已结束并且实际结束时间在评价周期内的
+ * @Date 2020/9/21 10:41
+ **/
+ List> selectActGroupByGridId(@Param("customerId") String customerId, @Param("monthId") String monthId);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexServiceAbilityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexServiceAbilityGridMonthlyService.java
index 793af948e6..a17d702326 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexServiceAbilityGridMonthlyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexServiceAbilityGridMonthlyService.java
@@ -1,5 +1,9 @@
package com.epmet.service.evaluationindex.extract;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
+
+import java.util.List;
+
/**
* 服务能力-网格相关事实表
*
@@ -7,5 +11,21 @@ package com.epmet.service.evaluationindex.extract;
* @since v1.0.0 2020-09-19
*/
public interface FactIndexServiceAbilityGridMonthlyService{
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @author yinzuomei
+ * @description 查询出所有的网格,初始化好 服务能力-网格相关事实表 各个指标值赋值为0
+ * @Date 2020/9/21 9:38
+ **/
+ List initAllGridList(String customerId);
+ /**
+ * @return void
+ * @param list
+ * @author yinzuomei
+ * @description 批量插入网格相关-服务能力指标表
+ * @Date 2020/9/21 10:05
+ **/
+ void insertBatchEntity(List list);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java
index 4c930bec8a..0b64d285fa 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java
@@ -132,7 +132,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
//4、分批插入批量插入
List> partition = ListUtils.partition(indexPartyAblityCpcList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
- this.FactIndexPartyAblityCpcMonthlyEntity(list);
+ this.saveFactIndexPartyAblityCpcMonthlyEntity(list);
});
}
@@ -428,7 +428,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2020/9/18 10:27
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX)
- private void FactIndexPartyAblityCpcMonthlyEntity(List list) {
+ private void saveFactIndexPartyAblityCpcMonthlyEntity(List list) {
factIndexPartyAblityCpcMonthlyDao.insertBatchEntity(list);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
index 9fea4c2476..2124f6e6cc 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
@@ -1,19 +1,27 @@
package com.epmet.service.evaluationindex.extract.impl;
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.ExtractConstant;
+import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.ProjectEvaluateConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
+import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao;
+import com.epmet.dao.heart.ActInfoDao;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.GridIssueCountResultDTO;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.result.*;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.extract.*;
import com.epmet.service.stats.FactArticlePublishedGridDailyService;
import com.epmet.service.stats.user.FactRegUserGridMonthlyService;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -56,7 +64,12 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
private FactArticlePublishedGridDailyService articlePublishedGridDailyService;
@Autowired
private GroupExtractService groupExtractService;
-
+ @Autowired
+ private FactIndexServiceAbilityGridMonthlyService factIndexServiceAbilityGridMonthlyService;
+ @Autowired
+ private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao;
+ @Autowired
+ private ActInfoDao actInfoDao;
/**
* @Description 计算网格指标党建能力
* @param customerId
@@ -319,7 +332,86 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
*/
@Override
public Boolean calGridIndexServiceAbility(String customerId, String monthId) {
- return null;
+ //1、构造好初始数据,各指标赋值0
+ List entityList=factIndexServiceAbilityGridMonthlyService.initAllGridList(customerId);
+ if(CollectionUtils.isEmpty(entityList)){
+ log.info("screen_customer_grid do not any records");
+ return true;
+ }
+ String quarterId= DateUtils.getQuarterId(monthId);
+ String yearId=DateUtils.getYearId(monthId);
+ //各个网格这个月举办的活动
+ Map activityCountMap=calActivityCountMap(customerId,monthId);
+ //2、遍历网格,赋值每个网格指标
+ for(FactIndexServiceAblityGridMonthlyEntity entity:entityList){
+ entity.setMonthId(monthId);
+ entity.setQuarterId(quarterId);
+ entity.setYearId(yearId);
+ //网格活动组织次数 爱心活动
+ if(activityCountMap.containsKey(entity.getGridId())){
+ entity.setActivityCount(activityCountMap.get(entity.getGridId()));
+ }
+ //网格志愿者占比 todo
+// entity.setVolunteerRatio();
+ //网格党员志愿者率 todo
+// entity.setPartyVolunteerRatio();
+ }
+ //3、批量删
+ deleteBatchIndexServiceAblityGridMonthly(customerId,monthId);
+ //4、批量增
+ List> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
+ partition.forEach(list -> {
+ this.saveFactIndexServiceAblityGridMonthlyEntity(list);
+ });
+ return true;
+ }
+
+ /**
+ * @return java.util.Map
+ * @param customerId
+ * @param monthId
+ * @author yinzuomei
+ * @description 网格活动组织次数 爱心活动 值得是: 活动状态已结束并且实际结束时间在评价周期内的
+ * @Date 2020/9/21 10:23
+ **/
+ @DataSource(DataSourceConstant.EPMET_HEART)
+ private Map calActivityCountMap(String customerId, String monthId) {
+ List> mapList = actInfoDao.selectActGroupByGridId(customerId, monthId);
+ Map resultMap = new HashMap<>();
+ for (Map map : mapList) {
+ for (Map.Entry m : map.entrySet()) {
+ resultMap.put(m.getKey(), m.getValue());
+ }
+ }
+ return resultMap;
+ }
+
+ /**
+ * @return void
+ * @param customerId
+ * @param monthId
+ * @author yinzuomei
+ * @description 批量删除网格相关-服务能力指标表
+ * @Date 2020/9/21 10:16
+ **/
+ @DataSource(DataSourceConstant.EVALUATION_INDEX)
+ private void deleteBatchIndexServiceAblityGridMonthly(String customerId, String monthId) {
+ int deleteNum;
+ do {
+ deleteNum = factIndexServiceAblityGridMonthlyDao.deleteFactIndexServiceAblityGridMonthly(customerId, monthId);
+ } while (deleteNum > NumConstant.ZERO);
+ }
+
+ /**
+ * @param list
+ * @return void
+ * @author yinzuomei
+ * @description 批量插入网格相关-服务能力指标表
+ * @Date 2020/9/21 10:04
+ **/
+ @DataSource(DataSourceConstant.EVALUATION_INDEX)
+ private void saveFactIndexServiceAblityGridMonthlyEntity(List list) {
+ factIndexServiceAbilityGridMonthlyService.insertBatchEntity(list);
}
/**
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexServiceAbilityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexServiceAbilityGridMonthlyServiceImpl.java
index 3d5e2019e2..7bbf688492 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexServiceAbilityGridMonthlyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexServiceAbilityGridMonthlyServiceImpl.java
@@ -2,10 +2,15 @@ package com.epmet.service.evaluationindex.extract.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
+import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.extract.FactIndexServiceAbilityGridMonthlyService;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.List;
+
/**
* 服务能力-网格相关事实表
*
@@ -16,5 +21,30 @@ import org.springframework.stereotype.Service;
@Slf4j
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexServiceAbilityGridMonthlyServiceImpl implements FactIndexServiceAbilityGridMonthlyService {
+ @Autowired
+ private FactIndexServiceAblityGridMonthlyDao baseDao;
+
+ /**
+ * @param customerId
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 查询出所有的网格,初始化好 服务能力-网格相关事实表 各个指标值赋值为0
+ * @Date 2020/9/21 9:38
+ **/
+ @Override
+ public List initAllGridList(String customerId) {
+ return baseDao.initAllGridList(customerId);
+ }
+ /**
+ * @param list
+ * @return void
+ * @author yinzuomei
+ * @description 批量插入网格相关-服务能力指标表
+ * @Date 2020/9/21 10:05
+ **/
+ @Override
+ public void insertBatchEntity(List list) {
+ baseDao.insertBatchEntity(list);
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml
index f3ec6462f2..2a4d8a7039 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml
@@ -132,4 +132,66 @@
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID =#{monthId}
+
+
+
+ SELECT
+ scg.CUSTOMER_ID,
+ scg.PARENT_AGENCY_ID AS agencyId,
+ scg.GRID_ID,
+ null as MONTH_ID,
+ NULL AS QUARTER_ID,
+ null as YEAR_ID,
+ 0 AS ACTIVITY_COUNT,
+ 0 AS VOLUNTEER_RATIO,
+ 0 AS PARTY_VOLUNTEER_RATIO
+ FROM
+ screen_customer_grid scg
+ WHERE
+ DEL_FLAG = 0
+ AND CUSTOMER_ID = #{customerId}
+
+
+
+
+ insert into fact_index_service_ablity_grid_monthly
+ (
+ ID,
+ CUSTOMER_ID,
+ AGENCY_ID,
+ GRID_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ ACTIVITY_COUNT,
+ VOLUNTEER_RATIO,
+ PARTY_VOLUNTEER_RATIO,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.agencyId},
+ #{item.gridId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.activityCount},
+ #{item.volunteerRatio},
+ #{item.partyVolunteerRatio},
+ 0,
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml
new file mode 100644
index 0000000000..fafa780590
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ SELECT
+ ai.SPONSOR_ID,
+ count( 1 ) AS totalAct
+ FROM
+ act_info ai
+ WHERE
+ ai.DEL_FLAG = '0'
+ AND ai.ACT_STATUS = 'finished'
+ AND ai.SPONSOR_TYPE = 'grid'
+ and ai.CUSTOMER_ID=#{customerId}
+ AND DATE_FORMAT(ai.ACTUAL_END_TIME,'%Y%m') = #{monthId}
+ GROUP BY
+ ai.SPONSOR_ID
+
+
From e7875424350b5d7e2ef077514a3dd13af01dad3c Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Mon, 21 Sep 2020 10:51:34 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=83=BD=E5=8A=9BV0.1=E6=BC=8F=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../evaluationindex/extract/impl/CalGridIndexServiceImpl.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
index 2d42376b6d..cf2835eaa6 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
@@ -15,7 +15,6 @@ import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.GridIssueCountResultDTO;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.result.*;
-import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.extract.*;
import com.epmet.service.stats.FactArticlePublishedGridDailyService;
From ef94b33582e35f0586b27ff7e95ae4db12f51fe5 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Mon, 21 Sep 2020 10:54:57 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3=20?=
=?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epmet/dto/extract/result/GridUserCountResultDTO.java | 5 +++--
.../main/java/com/epmet/controller/DemoController.java | 8 ++++----
.../extract/impl/CalGridIndexServiceImpl.java | 6 ++++--
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java
index 8b97bdc505..0203708448 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java
@@ -1,5 +1,6 @@
package com.epmet.dto.extract.result;
+import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
@@ -16,12 +17,12 @@ public class GridUserCountResultDTO implements Serializable {
/**
* 注册居民本月增量
*/
- private Integer userCount;
+ private Integer userCount = NumConstant.ZERO;
/**
* 注册党员本月增量
*/
- private Integer partyCount;
+ private Integer partyCount = NumConstant.ZERO;
/**
* 网格ID
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 92611df2cf..c983812f2a 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
@@ -544,16 +544,16 @@ public class DemoController {
@PostMapping("gridparty")
public void gridParty(){
-// String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
- String customerId = "epmettest";
+ String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
+// String customerId = "epmettest";
String monthId = "202008";
calGridIndexService.calGridIndexPartyAbility(customerId,monthId);
}
@PostMapping("gridgovern")
public void gridGovern(){
-// String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
- String customerId = "epmettest";
+ String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
+// String customerId = "epmettest";
String monthId = "202008";
calGridIndexService.calGridIndexGovernAbility(customerId,monthId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
index cf2835eaa6..6b66d896f7 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
@@ -138,7 +138,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
if (!CollectionUtils.isEmpty(gridUserCountList)){
gridUserCountList.forEach(count -> {
if (r.getGridId().equals(count.getGridId())){
- BeanUtils.copyProperties(count,r);
+ r.setUserCount(count.getUserCount());
+ r.setPartyCount(count.getPartyCount());
}
});
}
@@ -320,7 +321,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
if (!CollectionUtils.isEmpty(gridIssueTotalList)) {
gridIssueTotalList.forEach(total -> {
if (r.getGridId().equals(total.getGridId())) {
- BeanUtils.copyProperties(total, r);
+ r.setIssueTotal(total.getIssueTotal());
+ r.setAvgIssueCount(total.getAvgIssueCount());
}
});
}
From 4a4a0ca66ed348b5de3fe4158b5f0e5d234a647f Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Mon, 21 Sep 2020 10:58:51 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3=20?=
=?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../evaluationindex/extract/impl/CalGridIndexServiceImpl.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
index 6b66d896f7..082fc28114 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
@@ -21,7 +21,6 @@ import com.epmet.service.stats.FactArticlePublishedGridDailyService;
import com.epmet.service.stats.user.FactRegUserGridMonthlyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
-import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
From ad69400a0a8a7c639295afa2f3e007b41c687e8f Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Mon, 21 Sep 2020 11:17:01 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=83=BD=E5=8A=9BV0.2epmetHeart?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../data-statistical-server/pom.xml | 32 +++++++++----------
.../src/main/resources/bootstrap.yml | 5 +++
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml
index 18ef4bc7f6..9c12e8d5e5 100644
--- a/epmet-module/data-statistical/data-statistical-server/pom.xml
+++ b/epmet-module/data-statistical/data-statistical-server/pom.xml
@@ -210,11 +210,11 @@
epmet_resi_partymember_user
EpmEt-db-UsEr
-
+
-
- epmet_heart_user
- EpmEt-db-UsEr
+
+ epmet_heart_user
+ EpmEt-db-UsEr
0
@@ -320,11 +320,11 @@
epmet_resi_partymember_user
EpmEt-db-UsEr
-
+
-
- epmet_heart_user
- EpmEt-db-UsEr
+
+ epmet_heart_user
+ EpmEt-db-UsEr
0
@@ -430,11 +430,11 @@
epmet
elink@833066
-
+
-
- epmet
- elink@833066
+
+ epmet
+ elink@833066
0
@@ -536,11 +536,11 @@
epmet_resi_partymember_user
EpmEt-db-UsEr
-
+
-
- epmet_heart_user
- EpmEt-db-UsEr
+
+ epmet_heart_user
+ EpmEt-db-UsEr
0
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
index 7e0ac4e99d..ccb02b714f 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
@@ -175,6 +175,11 @@ dynamic:
url: @datasource.druid.partyMember.url@
username: @datasource.druid.partyMember.username@
password: @datasource.druid.partyMember.password@
+ epmetHeart:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @datasource.druid.epmetHeart.url@
+ username: @datasource.druid.epmetHeart.username@
+ password: @datasource.druid.epmetHeart.password@
thread:
# 线程池配置
From 1d0bb827f55db5c8d999234e518dd5487870c103 Mon Sep 17 00:00:00 2001
From: jianjun
Date: Mon, 21 Sep 2020 12:24:37 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9path?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/epmet/feign/DataStatisticalOpenFeignClient.java | 7 ++++---
.../com/epmet/controller/IndexOriginExtractController.java | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
index ee35accdae..49ff5933fc 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* @author: jianjun liu
*/
//url="http://localhost:8108"
-@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallback = DataStatisticalOpenFeignClientFallBack.class)
+@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallback = DataStatisticalOpenFeignClientFallBack.class, configuration =)
public interface DataStatisticalOpenFeignClient {
/**
@@ -199,16 +199,17 @@ public interface DataStatisticalOpenFeignClient {
* @date: 2020/6/22 9:09
* @author: jianjun liu
*/
- @PostMapping(value = "data/stats/factorigin/extractall")
+ @PostMapping(value = "/data/stats/factorigin/extractall")
Result factOriginExtractAll(@RequestBody(required = false) ExtractFormDTO formDTO);
/**
+ * ˚
* desc: 【月】抽取统计数据到指标库
*
* @date: 2020/6/22 9:09
* @author: jianjun liu
*/
- @PostMapping(value = "data/stats/indexorigin/extractall")
+ @PostMapping(value = "/data/stats/indexorigin/extractall")
Result indexOriginExtractAll(@RequestBody(required = false) ExtractIndexFormDTO formDTO);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexOriginExtractController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexOriginExtractController.java
index 1f2b86020a..1c0128cddf 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexOriginExtractController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexOriginExtractController.java
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2020/9/15 11:06
*/
@RestController
-@RequestMapping("indexorigin")
+@RequestMapping("factorigin")
public class IndexOriginExtractController {
@Autowired
private IndexOriginExtractService indexOriginExtractService;