|
|
@ -1,6 +1,6 @@ |
|
|
|
package com.epmet.service.indexcal.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; |
|
|
|
import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; |
|
|
|
import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; |
|
|
@ -8,12 +8,23 @@ import com.epmet.dao.screen.ScreenCustomerGridDao; |
|
|
|
import com.epmet.dto.ScreenCustomerGridDTO; |
|
|
|
import com.epmet.dto.indexcal.CalculateCommonFormDTO; |
|
|
|
import com.epmet.dto.indexcal.CustomerGridInfoDTO; |
|
|
|
import com.epmet.dto.indexcal.PageQueryGridFormDTO; |
|
|
|
import com.epmet.dto.indexcollect.FactIndexGovrnAblityGridMonthlyDTO; |
|
|
|
import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; |
|
|
|
import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; |
|
|
|
import com.epmet.entity.screen.IndexGroupDetailEntity; |
|
|
|
import com.epmet.eum.IndexCodeEnum; |
|
|
|
import com.epmet.service.indexcal.GridCorreLationService; |
|
|
|
import io.swagger.annotations.Authorization; |
|
|
|
import com.epmet.service.screen.IndexGroupDetailService; |
|
|
|
import org.apache.logging.log4j.LogManager; |
|
|
|
import org.apache.logging.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 网格相关service |
|
|
@ -32,7 +43,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { |
|
|
|
private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenCustomerGridDao screenCustomerGridDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private IndexGroupDetailService indexGroupDetailService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
@ -43,22 +55,206 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { |
|
|
|
return true; |
|
|
|
boolean resultFlag = false; |
|
|
|
List<IndexGroupDetailEntity> dangJianNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), |
|
|
|
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), |
|
|
|
IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); |
|
|
|
if(!CollectionUtils.isEmpty(dangJianNengLiList)){ |
|
|
|
//1、计算网格相关-党建能力
|
|
|
|
calculateGridCorreLationDangJian(formDTO,dangJianNengLiList); |
|
|
|
} |
|
|
|
List<IndexGroupDetailEntity> zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), |
|
|
|
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), |
|
|
|
IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
|
if(!CollectionUtils.isEmpty(zhiLiNengLiList)){ |
|
|
|
//2、计算网格相关-治理能力
|
|
|
|
calculateGridCorreLationZhiLi(formDTO,zhiLiNengLiList); |
|
|
|
} |
|
|
|
List<IndexGroupDetailEntity> fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), |
|
|
|
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), |
|
|
|
IndexCodeEnum.FU_WU_NENG_LI.getCode()); |
|
|
|
if(!CollectionUtils.isEmpty(fuWuNengLiList)){ |
|
|
|
//3、计算网格相关-服务能力
|
|
|
|
calculateGridCorreLationFuWu(formDTO,fuWuNengLiList); |
|
|
|
} |
|
|
|
//计算网格相关总分
|
|
|
|
List<IndexGroupDetailEntity> wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), |
|
|
|
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); |
|
|
|
if(!CollectionUtils.isEmpty(wgxgList)){ |
|
|
|
calculateGridCorreLationTotal(formDTO,wgxgList); |
|
|
|
} |
|
|
|
resultFlag = true; |
|
|
|
return resultFlag; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @param formDTO |
|
|
|
* @param indexList |
|
|
|
* @author yinzuomei |
|
|
|
* @description 计算网格相关-党建能力 |
|
|
|
* @Date 2020/8/26 16:47 |
|
|
|
**/ |
|
|
|
private void calculateGridCorreLationDangJian(CalculateCommonFormDTO formDTO,List<IndexGroupDetailEntity> indexList){ |
|
|
|
//分页查询网格列表
|
|
|
|
//查询五级指标
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @param formDTO |
|
|
|
* @param indexList |
|
|
|
* @author yinzuomei |
|
|
|
* @description 计算网格相关-治理能力 |
|
|
|
* @Date 2020/8/26 16:47 |
|
|
|
**/ |
|
|
|
private void calculateGridCorreLationZhiLi(CalculateCommonFormDTO formDTO,List<IndexGroupDetailEntity> indexList){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @param formDTO |
|
|
|
* @param indexList |
|
|
|
* @author yinzuomei |
|
|
|
* @description 计算网格相关-服务能力 |
|
|
|
* @Date 2020/8/26 16:48 |
|
|
|
**/ |
|
|
|
private void calculateGridCorreLationFuWu(CalculateCommonFormDTO formDTO,List<IndexGroupDetailEntity> indexList){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @param formDTO |
|
|
|
* @param indexList |
|
|
|
* @author yinzuomei |
|
|
|
* @description 计算网格相关总分 |
|
|
|
* @Date 2020/8/26 16:50 |
|
|
|
**/ |
|
|
|
private void calculateGridCorreLationTotal(CalculateCommonFormDTO formDTO,List<IndexGroupDetailEntity> indexList){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @return com.epmet.dto.indexcal.CustomerGridInfoDTO |
|
|
|
* @param customerId |
|
|
|
* @return com.epmet.dto.indexcal.CustomerGridInfoDTO |
|
|
|
* @author yinzuomei |
|
|
|
* @description 查询客户下网格信息 |
|
|
|
* @Date 2020/8/26 15:37 |
|
|
|
**/ |
|
|
|
public CustomerGridInfoDTO queryCustomerGridInfo(String customerId){ |
|
|
|
CustomerGridInfoDTO customerGridInfoDTO=new CustomerGridInfoDTO(); |
|
|
|
public CustomerGridInfoDTO queryCustomerGridInfo(String customerId) { |
|
|
|
CustomerGridInfoDTO customerGridInfoDTO = new CustomerGridInfoDTO(); |
|
|
|
customerGridInfoDTO.setTotal(screenCustomerGridDao.selectCountByCustomerId(customerId)); |
|
|
|
customerGridInfoDTO.setGridList(screenCustomerGridDao.selectListByCustomerId(customerId)); |
|
|
|
return customerGridInfoDTO; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return |
|
|
|
* @param formDTO |
|
|
|
* @author yinzuomei |
|
|
|
* @description 分页查询网格列表 |
|
|
|
* @Date 2020/8/27 14:42 |
|
|
|
**/ |
|
|
|
public List<ScreenCustomerGridDTO> pageGridList(PageQueryGridFormDTO formDTO){ |
|
|
|
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
formDTO.setPageIndex(pageIndex); |
|
|
|
return screenCustomerGridDao.pageListByCustomerId(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @return java.util.List<com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO> |
|
|
|
* @author yinzuomei |
|
|
|
* @description 党建能力-网格相关事实表 当前客户下,所有网格的党建能力相关五级指标 |
|
|
|
* @Date 2020/8/26 15:52 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public List<Map<String,Object>> queryListPartyAblityGrid(String customerId, String monthId) { |
|
|
|
return factIndexPartyAblityGridMonthlyDao.selectListPartyAblityGrid(customerId, monthId); |
|
|
|
} |
|
|
|
|
|
|
|
/*网格群众用户数 |
|
|
|
网格党员用户数 |
|
|
|
网格活跃群众用户数 |
|
|
|
网格活跃党员用户数 |
|
|
|
网格党员人均提出话题数 |
|
|
|
网格群众人均提出话题数 |
|
|
|
网格党员人均提出的议题转项目数 |
|
|
|
网格群众人均提出的议题转项目数 |
|
|
|
建群党员数 |
|
|
|
组织内党员的联系群众能力考评分(平均值) |
|
|
|
网格的发文数量 |
|
|
|
网格议题转项目率 |
|
|
|
组织“三会一课”次数 |
|
|
|
党员参加“三会一课”人次*/ |
|
|
|
/** |
|
|
|
* @return java.util.Map<java.lang.String,java.lang.Object> |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @author yinzuomei |
|
|
|
* @description 查询党建能力,网格相关,各五级指标最大值,最小值 |
|
|
|
* @Date 2020/8/27 12:47 |
|
|
|
**/ |
|
|
|
public Map<String, Object> queryPartyAblityGridMinAndMax(String customerId, String monthId){ |
|
|
|
return factIndexPartyAblityGridMonthlyDao.selectPartyAblityGridMinAndMax(customerId,monthId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @return java.util.List<com.epmet.dto.indexcollect.FactIndexGovrnAblityGridMonthlyDTO> |
|
|
|
* @author yinzuomei |
|
|
|
* @description 当前客户下,所有网格的治理能力相关五级指标 |
|
|
|
* @Date 2020/8/26 15:55 |
|
|
|
**/ |
|
|
|
public List<Map<String,Object>> queryListGovrnAblityGrid(String customerId, String monthId) { |
|
|
|
return factIndexGovrnAblityGridMonthlyDao.selectListGovrnAblityGrid(customerId, monthId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @return java.util.Map<java.lang.String, java.lang.Object> |
|
|
|
* @author yinzuomei |
|
|
|
* @description 查询治理能力,网格相关,各五级指标最大值,最小值 |
|
|
|
* @Date 2020/8/27 12:48 |
|
|
|
**/ |
|
|
|
public Map<String, Object> queryGovrnAblityGridMinAndMax(String customerId, String monthId) { |
|
|
|
return factIndexGovrnAblityGridMonthlyDao.selectGovrnAblityGridMinAndMax(customerId, monthId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @return java.util.List<com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO> |
|
|
|
* @author yinzuomei |
|
|
|
* @description 当前客户下,所有网格的服务能力相关五级指标 |
|
|
|
* @Date 2020/8/26 15:55 |
|
|
|
**/ |
|
|
|
public List<Map<String,Object>> queryListServiceAblityGrid(String customerId, String monthId) { |
|
|
|
return factIndexServiceAblityGridMonthlyDao.selectListServiceAblityGrid(customerId, monthId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return java.util.Map<java.lang.String,java.lang.Object> |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @author yinzuomei |
|
|
|
* @description 查询 服务能力,网格相关,各五级指标最大值,最小值 |
|
|
|
* @Date 2020/8/27 12:50 |
|
|
|
**/ |
|
|
|
public Map<String, Object> queryServiceAblityGridMinAndMax(String customerId, String monthId) { |
|
|
|
return factIndexServiceAblityGridMonthlyDao.selectServiceAblityGridMinAndMax(customerId, monthId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|