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
cbdb8c0675
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java
  3. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexGovernAbilityGridMonthlyService.java
  4. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexPartyAbilityGridMonthlyService.java
  5. 67
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
  6. 37
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexGovernAbilityGridMonthlyServiceImpl.java
  7. 37
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexPartyAbilityGridMonthlyServiceImpl.java
  8. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/GroupExtractServiceImpl.java
  9. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java
  10. 20
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java
  11. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java
  12. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java
  13. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java
  14. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
  15. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  16. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  17. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
  18. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml
  19. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java

@ -134,5 +134,5 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @author zxc * @author zxc
* @date 2020/9/19 4:31 下午 * @date 2020/9/19 4:31 下午
*/ */
void deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId); Integer deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java

@ -114,5 +114,5 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao<FactIndexPar
* @author zxc * @author zxc
* @date 2020/9/19 10:45 上午 * @date 2020/9/19 10:45 上午
*/ */
void deleteOldPartyAbility(@Param("customerId")String customerId,@Param("monthId")String monthId); Integer deleteOldPartyAbility(@Param("customerId")String customerId,@Param("monthId")String monthId);
} }

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexGovernAbilityGridMonthlyService.java

@ -1,33 +0,0 @@
package com.epmet.service.evaluationindex.extract;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 治理能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-19
*/
public interface FactIndexGovernAbilityGridMonthlyService{
/**
* @Description 批量插入治理能力
* @param lists
* @author zxc
* @date 2020/9/19 4:28 下午
*/
void insertGovernAbilityRecord(@Param("lists") List<GovernAbilityGridMonthlyFormDTO> lists);
/**
* @Description 删除治理能力旧纪录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 4:31 下午
*/
void deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactIndexPartyAbilityGridMonthlyService.java

@ -1,31 +0,0 @@
package com.epmet.service.evaluationindex.extract;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import java.util.List;
/**
* 党建能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-19
*/
public interface FactIndexPartyAbilityGridMonthlyService{
/**
* @Description 网格党建能力插入
* @param lists
* @author zxc
* @date 2020/9/19 10:32 上午
*/
void insertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> lists);
/**
* @Description 删除旧的党建能力记录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 10:45 上午
*/
void deleteOldPartyAbility(String customerId,String monthId);
}

67
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java

@ -19,6 +19,8 @@ import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.result.*; import com.epmet.dto.extract.result.*;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.extract.*; import com.epmet.service.evaluationindex.extract.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.stats.FactArticlePublishedGridDailyService; 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;
@ -48,10 +50,6 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
@Autowired @Autowired
private IssueExtractService issueExtractService; private IssueExtractService issueExtractService;
@Autowired @Autowired
private FactIndexGovernAbilityGridMonthlyService governAbilityGridMonthlyService;
@Autowired
private FactIndexPartyAbilityGridMonthlyService partyAbilityGridMonthlyService;
@Autowired
private FactIndexGovrnAblityGridMonthlyDao governAbilityDao; private FactIndexGovrnAblityGridMonthlyDao governAbilityDao;
@Autowired @Autowired
private FactOriginProjectMainDailyService projectMainService; private FactOriginProjectMainDailyService projectMainService;
@ -67,7 +65,10 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
private GroupExtractService groupExtractService; private GroupExtractService groupExtractService;
@Autowired @Autowired
private FactOriginTopicLogDailyService topicLogService; private FactOriginTopicLogDailyService topicLogService;
@Autowired
private FactIndexPartyAblityOrgMonthlyService partyAbilityOrgMonthlyService;
@Autowired
private FactIndexGovrnAblityOrgMonthlyService governAbilityOrgMonthlyService;
@Autowired @Autowired
private FactIndexServiceAbilityGridMonthlyService factIndexServiceAbilityGridMonthlyService; private FactIndexServiceAbilityGridMonthlyService factIndexServiceAbilityGridMonthlyService;
@Autowired @Autowired
@ -224,7 +225,11 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
}); });
} }
}); });
delAndInsertPartyAbility(result,customerId,monthId); delPartyAbility(customerId, monthId);
List<List<PartyAbilityGridMonthlyFormDTO>> partition = ListUtils.partition(result, NumConstant.ONE_HUNDRED);
partition.forEach(r -> {
insertPartyAbility(r);
});
return true; return true;
} }
@ -372,7 +377,11 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
} }
}); });
}); });
delAndInsertGovernAbility(result,customerId,monthId); delGovernAbility(customerId, monthId);
List<List<GovernAbilityGridMonthlyFormDTO>> resultList = ListUtils.partition(result, NumConstant.ONE_HUNDRED);
resultList.forEach(r -> {
insertGovernAbility(r);
});
return true; return true;
} }
@ -574,30 +583,58 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
} }
/** /**
* @Description 删除并插入党建能力的记录 * @Description 插入党建能力的记录
* @param result * @param result
* @author zxc * @author zxc
* @date 2020/9/19 4:06 下午 * @date 2020/9/19 4:06 下午
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void delAndInsertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> result,String customerId,String monthId){ public void insertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> result){
if (!CollectionUtils.isEmpty(result)){ if (!CollectionUtils.isEmpty(result)){
partyAbilityGridMonthlyService.deleteOldPartyAbility(customerId, monthId); partyAbilityOrgMonthlyService.insertPartyAbility(result);
partyAbilityGridMonthlyService.insertPartyAbility(result);
} }
} }
/** /**
* @Description 删除并插入治理能力的记录 * @Description 删除党建能力的记录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 4:06 下午
*/
@Transactional(rollbackFor = Exception.class)
public void delPartyAbility(String customerId,String monthId){
Integer delNum;
do {
delNum = partyAbilityOrgMonthlyService.deleteOldPartyAbility(customerId, monthId);
}while (delNum > NumConstant.ZERO);
}
/**
* @Description 插入治理能力的记录
* @param result * @param result
* @author zxc * @author zxc
* @date 2020/9/19 4:06 下午 * @date 2020/9/19 4:06 下午
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void delAndInsertGovernAbility(List<GovernAbilityGridMonthlyFormDTO> result,String customerId,String monthId){ public void insertGovernAbility(List<GovernAbilityGridMonthlyFormDTO> result){
if (!CollectionUtils.isEmpty(result)){ if (!CollectionUtils.isEmpty(result)){
governAbilityGridMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId); governAbilityOrgMonthlyService.insertGovernAbilityRecord(result);
governAbilityGridMonthlyService.insertGovernAbilityRecord(result);
} }
} }
/**
* @Description 删除治理能力的记录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 4:06 下午
*/
@Transactional(rollbackFor = Exception.class)
public void delGovernAbility(String customerId,String monthId){
Integer delNum;
do {
delNum = governAbilityOrgMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId);
}while (delNum > NumConstant.ZERO);
}
} }

37
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexGovernAbilityGridMonthlyServiceImpl.java

@ -1,37 +0,0 @@
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.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import com.epmet.service.evaluationindex.extract.FactIndexGovernAbilityGridMonthlyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 治理能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-19
*/
@Service
@Slf4j
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexGovernAbilityGridMonthlyServiceImpl implements FactIndexGovernAbilityGridMonthlyService {
@Autowired
private FactIndexGovrnAblityGridMonthlyDao governAbilityDao;
@Override
public void insertGovernAbilityRecord(List<GovernAbilityGridMonthlyFormDTO> lists) {
governAbilityDao.insertGovernAbilityRecord(lists);
}
@Override
public void deleteOldGovernAbilityRecord(String customerId, String monthId) {
governAbilityDao.deleteOldGovernAbilityRecord(customerId, monthId);
}
}

37
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexPartyAbilityGridMonthlyServiceImpl.java

@ -1,37 +0,0 @@
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.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.service.evaluationindex.extract.FactIndexPartyAbilityGridMonthlyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 党建能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-19
*/
@Service
@Slf4j
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexPartyAbilityGridMonthlyServiceImpl implements FactIndexPartyAbilityGridMonthlyService {
@Autowired
private FactIndexPartyAblityGridMonthlyDao partyAbilityGridDao;
@Override
public void insertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> lists) {
partyAbilityGridDao.insertPartyAbility(lists);
}
@Override
public void deleteOldPartyAbility(String customerId, String monthId) {
partyAbilityGridDao.deleteOldPartyAbility(customerId, monthId);
}
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/GroupExtractServiceImpl.java

@ -137,9 +137,12 @@ public class GroupExtractServiceImpl implements GroupExtractService {
List<String> partyIds = userService.getPartymembersByCustomerId(param.getCustomerId()); List<String> partyIds = userService.getPartymembersByCustomerId(param.getCustomerId());
List<GridHeartedFormDTO> heartedIds = userService.getWarmHeartedByCustomerId(param.getCustomerId()); List<GridHeartedFormDTO> heartedIds = userService.getWarmHeartedByCustomerId(param.getCustomerId());
if(!partyIds.isEmpty()) {
factOriginGroupMainDailyDao.updatePartyFlag(partyIds,param.getCustomerId()); factOriginGroupMainDailyDao.updatePartyFlag(partyIds, param.getCustomerId());
factOriginGroupMainDailyDao.updateHeartedFlag(heartedIds,param.getCustomerId()); }
if(!heartedIds.isEmpty()) {
factOriginGroupMainDailyDao.updateHeartedFlag(heartedIds, param.getCustomerId());
}
} }
} }
} }

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java

@ -1,7 +1,11 @@
package com.epmet.service.evaluationindex.indexcoll; package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author zhaoqifeng * @author zhaoqifeng
@ -19,4 +23,21 @@ public interface FactIndexGovrnAblityOrgMonthlyService extends BaseService<FactI
* @return void * @return void
*/ */
void deleteByCustomer(String customerId, String monthId, String type); void deleteByCustomer(String customerId, String monthId, String type);
/**
* @Description 批量插入治理能力
* @param lists
* @author zxc
* @date 2020/9/19 4:28 下午
*/
void insertGovernAbilityRecord(@Param("lists") List<GovernAbilityGridMonthlyFormDTO> lists);
/**
* @Description 删除治理能力旧纪录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 4:31 下午
*/
Integer deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
} }

20
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java

@ -1,8 +1,11 @@
package com.epmet.service.evaluationindex.indexcoll; package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
import java.util.List;
/** /**
* @author zhaoqifeng * @author zhaoqifeng
* @dscription * @dscription
@ -19,4 +22,21 @@ public interface FactIndexPartyAblityOrgMonthlyService extends BaseService<FactI
* @return void * @return void
*/ */
void deleteByCustomer(String customerId, String monthId, String type); void deleteByCustomer(String customerId, String monthId, String type);
/**
* @Description 网格党建能力插入
* @param lists
* @author zxc
* @date 2020/9/19 10:32 上午
*/
void insertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> lists);
/**
* @Description 删除旧的党建能力记录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 10:45 上午
*/
Integer deleteOldPartyAbility(String customerId,String monthId);
} }

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java

@ -3,11 +3,16 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @author zhaoqifeng * @author zhaoqifeng
* @dscription * @dscription
@ -16,8 +21,22 @@ import org.springframework.stereotype.Service;
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX) @DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexGovrnAblityOrgMonthlyServiceImpl extends BaseServiceImpl<FactIndexGovrnAblityOrgMonthlyDao, FactIndexGovrnAblityOrgMonthlyEntity> implements FactIndexGovrnAblityOrgMonthlyService { public class FactIndexGovrnAblityOrgMonthlyServiceImpl extends BaseServiceImpl<FactIndexGovrnAblityOrgMonthlyDao, FactIndexGovrnAblityOrgMonthlyEntity> implements FactIndexGovrnAblityOrgMonthlyService {
@Autowired
private FactIndexGovrnAblityGridMonthlyDao governAbilityDao;
@Override @Override
public void deleteByCustomer(String customerId, String monthId, String type) { public void deleteByCustomer(String customerId, String monthId, String type) {
baseDao.deleteByCustomer(customerId, monthId, type); baseDao.deleteByCustomer(customerId, monthId, type);
} }
@Override
public void insertGovernAbilityRecord(List<GovernAbilityGridMonthlyFormDTO> lists) {
governAbilityDao.insertGovernAbilityRecord(lists);
}
@Override
public Integer deleteOldGovernAbilityRecord(String customerId, String monthId) {
return governAbilityDao.deleteOldGovernAbilityRecord(customerId, monthId);
}
} }

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java

@ -3,11 +3,16 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @author zhaoqifeng * @author zhaoqifeng
* @dscription * @dscription
@ -16,8 +21,22 @@ import org.springframework.stereotype.Service;
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX) @DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexPartyAblityOrgMonthlyServiceImpl extends BaseServiceImpl<FactIndexPartyAblityOrgMonthlyDao, FactIndexPartyAblityOrgMonthlyEntity> implements FactIndexPartyAblityOrgMonthlyService { public class FactIndexPartyAblityOrgMonthlyServiceImpl extends BaseServiceImpl<FactIndexPartyAblityOrgMonthlyDao, FactIndexPartyAblityOrgMonthlyEntity> implements FactIndexPartyAblityOrgMonthlyService {
@Autowired
private FactIndexPartyAblityGridMonthlyDao partyAbilityGridDao;
@Override @Override
public void deleteByCustomer(String customerId, String monthId, String type) { public void deleteByCustomer(String customerId, String monthId, String type) {
baseDao.deleteByCustomer(customerId, monthId, type); baseDao.deleteByCustomer(customerId, monthId, type);
} }
@Override
public void insertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> lists) {
partyAbilityGridDao.insertPartyAbility(lists);
}
@Override
public Integer deleteOldPartyAbility(String customerId, String monthId) {
return partyAbilityGridDao.deleteOldPartyAbility(customerId, monthId);
}
} }

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollCommunityServiceImpl.java

@ -27,6 +27,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -127,6 +128,21 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
})); }));
} }
//办结数
Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(customerId,dimId.getMonthId(),"month");
Map<String,BigDecimal> responseMap = factOriginProjectLogDailyService.getAgencyResponseRatio(customerId,dimId.getMonthId(),"month");
list.forEach(entity ->{
entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()));
BigDecimal element = entity.getClosedProjectRatio();
//办结率
entity.setClosedProjectRatio(
element.divide(new BigDecimal(entity.getTransferedCount()), NumConstant.SIX, RoundingMode.HALF_UP)
);
//响应度
entity.setRespProjectRatio(responseMap.get(entity.getAgencyId()));
});
factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY); factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);
factIndexGovrnAblityOrgMonthlyService.insertBatch(list); factIndexGovrnAblityOrgMonthlyService.insertBatch(list);

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

@ -71,8 +71,7 @@
<where> <where>
DEL_FLAG = '0' DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId} AND CUSTOMER_ID = #{customerId}
AND <foreach collection="list" item="ownerId" open="AND ( " separator=" OR " close=" ) ">
<foreach collection="list" item="ownerId" open="( " separator=" OR " close=" ) ">
GROUP_OWNER_ID = #{ownerId} GROUP_OWNER_ID = #{ownerId}
</foreach> </foreach>
</where> </where>
@ -84,8 +83,7 @@
<where> <where>
DEL_FLAG = '0' DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId} AND CUSTOMER_ID = #{customerId}
AND <foreach collection="list" item="item" open="AND ( " separator=" OR " close=" ) ">
<foreach collection="list" item="item" open="( " separator=" OR " close=" ) ">
(GROUP_OWNER_ID = #{item.userId} AND GRID_ID = #{item.gridId}) (GROUP_OWNER_ID = #{item.userId} AND GRID_ID = #{item.gridId})
</foreach> </foreach>
</where> </where>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -8,7 +8,7 @@
WHERE WHERE
CUSTOMER_ID = #{customerId} CUSTOMER_ID = #{customerId}
<if test='null != date and "" != date'> <if test='null != date and "" != date'>
DATE_ID = #{date} AND DATE_ID = #{date}
</if> </if>
</delete> </delete>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -108,7 +108,7 @@
WHERE WHERE
CUSTOMER_ID = #{customerId} CUSTOMER_ID = #{customerId}
<if test='null != date and "" != date'> <if test='null != date and "" != date'>
DATE_ID = #{date} AND DATE_ID = #{date}
</if> </if>
</delete> </delete>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml

@ -82,7 +82,7 @@
<!-- 查询网格 党员/群众 人均提出话题数 --> <!-- 查询网格 党员/群众 人均提出话题数 -->
<select id="selectCreateTopicCount" resultType="com.epmet.dto.extract.result.CreateTopicCountResultDTO"> <select id="selectCreateTopicCount" resultType="com.epmet.dto.extract.result.CreateTopicCountResultDTO">
SELECT SELECT
ROUND(( COUNT( ID ) / COUNT( DISTINCT ( CREATE_TOPIC_USER_ID ))), 0 ) AS createTopic, ROUND(( COUNT( ID ) / COUNT( DISTINCT ( CREATE_TOPIC_USER_ID ))), 0 ) AS createTopicCount,
GRID_ID GRID_ID
FROM FROM
fact_origin_topic_main_daily fact_origin_topic_main_daily

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml

@ -246,5 +246,6 @@
DELETE FROM fact_index_govrn_ablity_grid_monthly DELETE FROM fact_index_govrn_ablity_grid_monthly
WHERE CUSTOMER_ID = #{customerId} WHERE CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId} AND MONTH_ID = #{monthId}
LIMIT 1000
</delete> </delete>
</mapper> </mapper>

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml

@ -265,5 +265,6 @@
WHERE WHERE
CUSTOMER_ID = #{customerId} CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId} AND MONTH_ID = #{monthId}
LIMIT 1000
</delete> </delete>
</mapper> </mapper>

Loading…
Cancel
Save