Browse Source

screen_pioneer_data党员参与议事提交 V0.2

master
yinzuomei 5 years ago
parent
commit
787af99630
  1. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  2. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java
  3. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPublicPartiTotalDataServiceImpl.java

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

@ -673,7 +673,8 @@ public class DemoController {
@Autowired
private PioneerDataExtractService pioneerDataExtractService;
@Autowired
private PublicPartiTotalDataExtractService publicPartiTotalDataExtractService;
@PostMapping("insertScreenPioneerData")
public Result insertScreenPioneerData(@RequestParam("customerId") String customerId, @RequestParam("dateId") String dateId) {
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) {
@ -692,6 +693,11 @@ public class DemoController {
return new Result();
}
@PostMapping("extractPublicPartiTotalData")
public Result extractPublicPartiTotalData(@RequestParam("customerId") String customerId, @RequestParam("dateId") String dateId){
publicPartiTotalDataExtractService.extractPublicPartiTotalData(customerId,dateId);
return new Result();
}
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java

@ -22,6 +22,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginIssueLogDailyDao;
import com.epmet.dto.extract.result.IssueVoteUserCountResultDTO;
import com.epmet.dto.stats.DimAgencyDTO;
@ -73,7 +74,7 @@ public class FactOriginIssueLogDailyServiceImpl extends BaseServiceImpl<FactOrig
**/
@Override
public int queryJoinUserTotal(String customerId, String orgType, String orgId) {
if ("grid".equals(orgType)) {
if (OrgTypeConstant.GRID.equals(orgType)) {
return baseDao.selectCountJoinUserTotal(customerId, orgId, null);
} else {
//拼接pids,
@ -81,7 +82,13 @@ public class FactOriginIssueLogDailyServiceImpl extends BaseServiceImpl<FactOrig
if (null == dimAgencyDTO) {
log.error(String.format("根据agencyId=%s,查询dim_agency 返回null", orgId));
} else {
String pids = dimAgencyDTO.getPids().concat(StrConstant.COLON).concat(dimAgencyDTO.getId());
String pids;
if(NumConstant.ZERO_STR.equals(dimAgencyDTO.getPid())){
//如果是根基组织,不需要拼接:
pids=dimAgencyDTO.getId();
}else{
pids = dimAgencyDTO.getPids().concat(StrConstant.COLON).concat(dimAgencyDTO.getId());
}
return baseDao.selectCountJoinUserTotal(customerId, null, pids);
}
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java

@ -3,6 +3,7 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService;
@ -53,7 +54,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
@Override
public void extractGridPioneerData(String customerId, String dateId) {
//查询客户下所有的网格,初始数据值为0
List<ScreenPioneerDataEntity> gridList = screenPioneerDataService.initPioneerDataList(customerId, "grid");
List<ScreenPioneerDataEntity> gridList = screenPioneerDataService.initPioneerDataList(customerId, OrgTypeConstant.GRID);
if (CollectionUtils.isEmpty(gridList)) {
return;
}
@ -140,7 +141,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
@Override
public void extractCommunityPioneerData(String customerId, String dateId) {
//查询客户下所有的社区,初始数据值为0
List<ScreenPioneerDataEntity> communityList = screenPioneerDataService.initPioneerDataList(customerId, "community");
List<ScreenPioneerDataEntity> communityList = screenPioneerDataService.initPioneerDataList(customerId, OrgTypeConstant.COMMUNITY);
if (CollectionUtils.isEmpty(communityList)) {
return;
}
@ -209,7 +210,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
@Override
public void extractExceptCommunityPioneerData(String customerId, String dateId) {
//查询客户下所有的组织(社区除外),初始数据值为0
List<ScreenPioneerDataEntity> agencyList = screenPioneerDataService.initPioneerDataList(customerId, "agency");
List<ScreenPioneerDataEntity> agencyList = screenPioneerDataService.initPioneerDataList(customerId, OrgTypeConstant.AGENCY);
if (CollectionUtils.isEmpty(agencyList)) {
return;
}

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

@ -18,8 +18,10 @@
package com.epmet.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.screen.ScreenPublicPartiTotalDataDao;
import com.epmet.entity.evaluationindex.screen.ScreenPublicPartiTotalDataEntity;
@ -49,6 +51,7 @@ public class ScreenPublicPartiTotalDataServiceImpl extends BaseServiceImpl<Scree
* @description 先删除后插入
* @Date 2020/9/27 13:51
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX)
@Transactional(rollbackFor = Exception.class)
@Override
public void delAndInsertBatch(String customerId, List<ScreenPublicPartiTotalDataEntity> entityList) {

Loading…
Cancel
Save