Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_screen_data_2.0

master
yinzuomei 5 years ago
parent
commit
eff8dc6876
  1. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java
  2. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  3. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java

5
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; package com.epmet.dto.extract.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data; import lombok.Data;
import java.io.Serializable; 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 * 网格ID

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -544,16 +544,16 @@ public class DemoController {
@PostMapping("gridparty") @PostMapping("gridparty")
public void gridParty(){ public void gridParty(){
// String customerId = "3ef7e4bb195eb9e622d68b52509aa940"; String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
String customerId = "epmettest"; // String customerId = "epmettest";
String monthId = "202008"; String monthId = "202008";
calGridIndexService.calGridIndexPartyAbility(customerId,monthId); calGridIndexService.calGridIndexPartyAbility(customerId,monthId);
} }
@PostMapping("gridgovern") @PostMapping("gridgovern")
public void gridGovern(){ public void gridGovern(){
// String customerId = "3ef7e4bb195eb9e622d68b52509aa940"; String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
String customerId = "epmettest"; // String customerId = "epmettest";
String monthId = "202008"; String monthId = "202008";
calGridIndexService.calGridIndexGovernAbility(customerId,monthId); calGridIndexService.calGridIndexGovernAbility(customerId,monthId);
} }

7
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 com.epmet.service.stats.user.FactRegUserGridMonthlyService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils; import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -138,7 +137,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
if (!CollectionUtils.isEmpty(gridUserCountList)){ if (!CollectionUtils.isEmpty(gridUserCountList)){
gridUserCountList.forEach(count -> { gridUserCountList.forEach(count -> {
if (r.getGridId().equals(count.getGridId())){ if (r.getGridId().equals(count.getGridId())){
BeanUtils.copyProperties(count,r); r.setUserCount(count.getUserCount());
r.setPartyCount(count.getPartyCount());
} }
}); });
} }
@ -320,7 +320,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
if (!CollectionUtils.isEmpty(gridIssueTotalList)) { if (!CollectionUtils.isEmpty(gridIssueTotalList)) {
gridIssueTotalList.forEach(total -> { gridIssueTotalList.forEach(total -> {
if (r.getGridId().equals(total.getGridId())) { if (r.getGridId().equals(total.getGridId())) {
BeanUtils.copyProperties(total, r); r.setIssueTotal(total.getIssueTotal());
r.setAvgIssueCount(total.getAvgIssueCount());
} }
}); });
} }

Loading…
Cancel
Save