Browse Source

最大值最小值

master
yinzuomei 5 years ago
parent
commit
b5adf11f74
  1. 33
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java
  2. 142
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexGovrnAblityGridMonthlyDTO.java
  3. 167
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexPartyAblityGridMonthlyDTO.java
  4. 117
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexServiceAblityGridMonthlyDTO.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/pom.xml
  6. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  7. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java
  8. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java
  9. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java
  10. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java
  11. 210
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java
  12. 51
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml
  13. 68
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml
  14. 37
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml
  15. 15
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

33
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.indexcal;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* 分页查询网格列表
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/27 14:37
*/
@Data
public class PageQueryGridFormDTO implements Serializable {
/**
* 客户id
*/
private String customerId;
/**
* 页码
* */
@Min(1)
private Integer pageNo;
/**
* 每页多少条
* */
private Integer pageSize = 10;
private Integer pageIndex;
}

142
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexGovrnAblityGridMonthlyDTO.java

@ -0,0 +1,142 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.indexcollect;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 治理能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-26
*/
@Data
public class FactIndexGovrnAblityGridMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 网格所属机关Id
*/
private String agencyId;
/**
* 网格Id
*/
private String gridId;
/**
* 月维度IdyyyyMM
*/
private String monthId;
/**
* 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4
*/
private String quarterId;
/**
* 年Id:yyyy
*/
private String yearId;
/**
* 网格总议题数
*/
private Integer issueTotal;
/**
* 网格人均议题数目
*/
private Integer avgIssueCount;
/**
* 网格议题转项目率
*/
private BigDecimal avgShiftProjectRatio;
/**
* 网格总项目数
*/
private Integer projectTotal;
/**
* 网格自治项目数 统计期网格自身内办结的项目数目
*/
private Integer selfSolveProjectCount;
/**
* 网格办结项目数 统计期内办结的项目数目
*/
private Integer resolveProjectCount;
/**
* 网格吹哨部门准确率
*/
private BigDecimal transferRightRatio;
/**
* 网格内解决的项目的满意度
*/
private BigDecimal satisfactionRatio;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

167
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexPartyAblityGridMonthlyDTO.java

@ -0,0 +1,167 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.indexcollect;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 党建能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-26
*/
@Data
public class FactIndexPartyAblityGridMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 机关Id
*/
private String agencyId;
/**
* 网格Id
*/
private String gridId;
/**
* 月维度Id:yyyyMM
*/
private String monthId;
/**
* 季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4
*/
private String quarterId;
/**
* 年Idyyyy
*/
private String yearId;
/**
* 网格群众用户数
*/
private Integer userCount;
/**
* 网格党员用户数
*/
private Integer partyCount;
/**
* 网格活跃群众用户数
*/
private Integer activeUserCount;
/**
* 网格活跃党员用户数
*/
private Integer activePartyCount;
/**
* 网格党员人均提出话题数
*/
private Integer partyAvgTopicCount;
/**
* 网格群众人均提出话题数
*/
private Integer userAvgTopicCount;
/**
* 网格党员人均提出的议题转项目数
*/
private Integer partyAvgShiftProjectCount;
/**
* 网格群众人均提出的议题转项目数
*/
private Integer userAvgShiftProjectCount;
/**
* 建群党员数累计值 去重
*/
private Integer createGroupPartyCount;
/**
* 网格发文数
*/
private Integer publishArticleCount;
/**
* 网格议题转项目率
*/
private BigDecimal issueToProjectRatio;
/**
* 组织三会一课次数
*/
private Integer createThreeMeetsCount;
/**
* 党员参加三会一课人次
*/
private Integer joinThreeMeetsCount;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

117
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexServiceAblityGridMonthlyDTO.java

@ -0,0 +1,117 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.indexcollect;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 服务能力-网格相关事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-26
*/
@Data
public class FactIndexServiceAblityGridMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 网格所属组织Id
*/
private String agencyId;
/**
* 网格Id
*/
private String gridId;
/**
* 月维度Id:yyyyMM
*/
private String monthId;
/**
* 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4
*/
private String quarterId;
/**
* 年Id: yyyy
*/
private String yearId;
/**
* 网格活动组织次数 爱心活动
*/
private Integer activityCount;
/**
* 网格志愿者占比
*/
private BigDecimal volunteerRatio;
/**
* 网格党员志愿者率
*/
private BigDecimal partyVolunteerRatio;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

2
epmet-module/data-statistical/data-statistical-server/pom.xml

@ -195,7 +195,7 @@
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>

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

@ -24,6 +24,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 治理能力-网格相关事实表
@ -64,4 +65,24 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @Date 10:52 2020-08-20
**/
void batchInsertFactIndexGovrnAblityGridMonthly(@Param("list") List<GridGovrnAbilityFormDTO> list, @Param("customerId")String customerId);
/**
* @param customerId 客户id
* @param monthId yyyyMM
* @return java.util.List<com.epmet.dto.indexcollect.FactIndexGovrnAblityGridMonthlyDTO>
* @author yinzuomei
* @description 当前客户下所有网格的治理能力相关五级指标
* @Date 2020/8/26 15:58
**/
List<Map<String,Object>> selectListGovrnAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @return java.util.Map<java.lang.String,java.lang.Object>
* @param customerId
* @param monthId
* @author yinzuomei
* @description 查询治理能力网格相关各五级指标最大值最小值
* @Date 2020/8/27 13:10
**/
Map<String, Object> selectGovrnAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

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

@ -18,12 +18,14 @@
package com.epmet.dao.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO;
import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO;
import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 党建能力-网格相关事实表
@ -64,4 +66,24 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao<FactIndexPar
* @Date 10:52 2020-08-20
**/
void batchInsertFactIndexPartyAblityGridMonthly(@Param("list") List<GridPartyAbilityFormDTO> list, @Param("customerId")String customerId);
/**
* @param customerId 客户id
* @param monthId yyyyMM
* @return java.util.List<com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO>
* @author yinzuomei
* @description 当前客户下所有网格的党建能力相关五级指标
* @Date 2020/8/26 15:57
**/
List<Map<String,Object>> selectListPartyAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @return java.util.Map<java.lang.String,java.lang.Object>
* @param customerId
* @param monthId
* @author yinzuomei
* @description 查询党建能力网格相关各五级指标最大值最小值
* @Date 2020/8/27 12:51
**/
Map<String, Object> selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java

@ -18,12 +18,14 @@
package com.epmet.dao.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO;
import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO;
import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 服务能力-网格相关事实表
@ -63,4 +65,24 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao<FactIndexS
* @Date 10:52 2020-08-20
**/
void batchInsertFactIndexServiceAblityGridMonthly(@Param("list") List<GridServiceAbilityFormDTO> list, @Param("customerId")String customerId);
/**
* @return java.util.List<com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO>
* @param customerId
* @param monthId
* @author yinzuomei
* @description 当前客户下所有网格的治理能力相关五级指标
* @Date 2020/8/26 15:59
**/
List<Map<String,Object>> selectListServiceAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @return java.util.Map<java.lang.String,java.lang.Object>
* @param customerId
* @param monthId
* @author yinzuomei
* @description 查询 服务能力网格相关各五级指标最大值最小值
* @Date 2020/8/27 13:15
**/
Map<String, Object> selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java

@ -19,6 +19,7 @@ package com.epmet.dao.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.indexcal.PageQueryGridFormDTO;
import com.epmet.dto.screencoll.form.CustomerGridFormDTO;
import com.epmet.entity.screen.ScreenCustomerGridEntity;
import org.apache.ibatis.annotations.Mapper;
@ -74,4 +75,13 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* @Date 2020/8/26 15:33
**/
List<ScreenCustomerGridDTO> selectListByCustomerId(@Param("customerId")String customerId);
/**
* @return java.util.List<com.epmet.dto.ScreenCustomerGridDTO>
* @param formDTO
* @author yinzuomei
* @description 分页查询网格列表
* @Date 2020/8/27 14:42
**/
List<ScreenCustomerGridDTO> pageListByCustomerId(PageQueryGridFormDTO formDTO);
}

24
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java

@ -1,7 +1,12 @@
package com.epmet.service.indexcal;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.PageQueryGridFormDTO;
import java.util.List;
import java.util.Map;
/**
* 网格相关指标计算
@ -19,4 +24,23 @@ public interface GridCorreLationService {
* @Date 2020/8/26 10:51
**/
Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO);
/**
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
* @param customerId
* @param monthId
* @author yinzuomei
* @description 党建能力-网格相关事实表 当前客户下所有网格的党建能力相关五级指标
* @Date 2020/8/27 14:48
**/
List<Map<String,Object>> queryListPartyAblityGrid(String customerId, String monthId);
/**
* @return java.util.List<com.epmet.dto.ScreenCustomerGridDTO>
* @param formDTO
* @author yinzuomei
* @description 分页查询网格列表
* @Date 2020/8/27 14:48
**/
List<ScreenCustomerGridDTO> pageGridList(PageQueryGridFormDTO formDTO);
}

210
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java

@ -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);
}
}

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

@ -85,4 +85,55 @@
</foreach>
</insert>
<!-- 当前客户下,所有网格的治理能力相关五级指标 -->
<select id="selectListGovrnAblityGrid" parameterType="map" resultType="java.util.HashMap">
SELECT
m.CUSTOMER_ID,
m.GRID_ID,
m.MONTH_ID,
m.ISSUE_TOTAL,
m.AVG_ISSUE_COUNT,
m.AVG_SHIFT_PROJECT_RATIO,
m.PROJECT_TOTAL,
m.SELF_SOLVE_PROJECT_COUNT,
m.RESOLVE_PROJECT_COUNT,
m.TRANSFER_RIGHT_RATIO,
m.SATISFACTION_RATIO
FROM
fact_index_govrn_ablity_grid_monthly m
WHERE
m.DEL_FLAG = '0'
and m.CUSTOMER_ID=#{customerId}
and m.MONTH_ID=#{monthId}
</select>
<!-- 查询治理能力,网格相关,各五级指标最大值,最小值 -->
<select id="selectGovrnAblityGridMinAndMax" parameterType="map" resultType="java.util.Map">
SELECT
m.CUSTOMER_ID,
m.GRID_ID,
m.MONTH_ID,
MIN(m.ISSUE_TOTAL) AS ISSUE_TOTAL_MIN,
MAX(m.ISSUE_TOTAL) AS ISSUE_TOTAL_MAX,
MIN(m.AVG_ISSUE_COUNT) AS AVG_ISSUE_COUNT_MIN,
MAX(m.AVG_ISSUE_COUNT) AS AVG_ISSUE_COUNT_MAX,
MIN(m.AVG_SHIFT_PROJECT_RATIO) AS AVG_SHIFT_PROJECT_RATIO_MIN,
MAX(m.AVG_SHIFT_PROJECT_RATIO) AS AVG_SHIFT_PROJECT_RATIO_MAX,
MIN(m.PROJECT_TOTAL) AS PROJECT_TOTAL_MIN,
MAX(m.PROJECT_TOTAL) AS PROJECT_TOTAL_MAX,
MIN(m.SELF_SOLVE_PROJECT_COUNT) AS SELF_SOLVE_PROJECT_COUNT_MIN,
MAX(m.SELF_SOLVE_PROJECT_COUNT) AS SELF_SOLVE_PROJECT_COUNT_MAX,
MIN(m.RESOLVE_PROJECT_COUNT) AS RESOLVE_PROJECT_COUNT_MIN,
MAX(m.RESOLVE_PROJECT_COUNT) AS RESOLVE_PROJECT_COUNT_MAX,
MIN(m.TRANSFER_RIGHT_RATIO) AS TRANSFER_RIGHT_RATIO_MIN,
MAX(m.TRANSFER_RIGHT_RATIO) AS TRANSFER_RIGHT_RATIO_MAX,
MIN(m.SATISFACTION_RATIO) AS SATISFACTION_RATIO_MIN,
MAX(m.SATISFACTION_RATIO) AS SATISFACTION_RATIO_MAX
FROM
fact_index_govrn_ablity_grid_monthly m
WHERE
m.DEL_FLAG = '0'
and m.CUSTOMER_ID=#{customerId}
and m.MONTH_ID=#{monthId}
</select>
</mapper>

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

@ -99,4 +99,72 @@
)
</foreach>
</insert>
<!-- 当前客户下,所有网格的党建能力相关五级指标 -->
<select id="selectListPartyAblityGrid" parameterType="map" resultType="java.util.HashMap">
SELECT
m.CUSTOMER_ID,
m.GRID_ID,
m.MONTH_ID,
m.USER_COUNT,
m.PARTY_COUNT,
m.ACTIVE_USER_COUNT,
m.ACTIVE_PARTY_COUNT,
m.PARTY_AVG_TOPIC_COUNT,
m.USER_AVG_TOPIC_COUNT,
m.PARTY_AVG_SHIFT_PROJECT_COUNT,
m.USER_AVG_SHIFT_PROJECT_COUNT,
m.CREATE_GROUP_PARTY_COUNT,
m.PUBLISH_ARTICLE_COUNT,
m.ISSUE_TO_PROJECT_RATIO,
m.CREATE_THREE_MEETS_COUNT,
m.JOIN_THREE_MEETS_COUNT
FROM
fact_index_party_ablity_grid_monthly m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID =#{monthId}
</select>
<!-- 查询党建能力,网格相关,各五级指标最大值,最小值 -->
<select id="selectPartyAblityGridMinAndMax" resultType="java.util.Map" parameterType="map">
SELECT
m.CUSTOMER_ID,
m.GRID_ID,
m.MONTH_ID,
MIN(m.USER_COUNT) AS USER_COUNT_MIN,
MAX(m.USER_COUNT) AS USER_COUNT_MAX,
MIN(m.PARTY_COUNT) AS PARTY_COUNT_MIN,
MAX(m.PARTY_COUNT) AS PARTY_COUNT_MAX,
MIN(m.ACTIVE_USER_COUNT) AS ACTIVE_USER_COUNT_MIN,
MAX(m.ACTIVE_USER_COUNT) AS ACTIVE_USER_COUNT_MAX,
MIN(m.ACTIVE_PARTY_COUNT) AS ACTIVE_PARTY_COUNT_MIN,
MAX(m.ACTIVE_PARTY_COUNT) AS ACTIVE_PARTY_COUNT_MAX,
MIN(m.PARTY_AVG_TOPIC_COUNT) AS PARTY_AVG_TOPIC_COUNT_MIN,
MAX(m.PARTY_AVG_TOPIC_COUNT) AS PARTY_AVG_TOPIC_COUNT_MAX,
MIN(m.USER_AVG_TOPIC_COUNT) AS USER_AVG_TOPIC_COUNT_MIN,
MAX(m.USER_AVG_TOPIC_COUNT) AS USER_AVG_TOPIC_COUNT_MAX,
MIN(m.PARTY_AVG_SHIFT_PROJECT_COUNT) AS PARTY_AVG_SHIFT_PROJECT_COUNT_MIN,
MAX(m.PARTY_AVG_SHIFT_PROJECT_COUNT) AS PARTY_AVG_SHIFT_PROJECT_COUNT_MAX,
MIN(m.USER_AVG_SHIFT_PROJECT_COUNT) AS USER_AVG_SHIFT_PROJECT_COUNT_MIN,
MAX(m.USER_AVG_SHIFT_PROJECT_COUNT) AS USER_AVG_SHIFT_PROJECT_COUNT_MAX,
MIN(m.CREATE_GROUP_PARTY_COUNT) AS CREATE_GROUP_PARTY_COUNT_MIN,
MAX(m.CREATE_GROUP_PARTY_COUNT) AS CREATE_GROUP_PARTY_COUNT_MAX,
MIN(m.PUBLISH_ARTICLE_COUNT) AS PUBLISH_ARTICLE_COUNT_MIN,
MAX(m.PUBLISH_ARTICLE_COUNT) AS PUBLISH_ARTICLE_COUNT_MAX,
MIN(m.ISSUE_TO_PROJECT_RATIO) AS ISSUE_TO_PROJECT_RATIO_MIN,
MAX(m.ISSUE_TO_PROJECT_RATIO) AS ISSUE_TO_PROJECT_RATIO_MAX,
MIN(m.CREATE_THREE_MEETS_COUNT) AS CREATE_THREE_MEETS_COUNT_MIN,
MAX(m.CREATE_THREE_MEETS_COUNT) AS CREATE_THREE_MEETS_COUNT_MAX,
MIN(m.JOIN_THREE_MEETS_COUNT) AS JOIN_THREE_MEETS_COUNT_MIN,
MAX(m.JOIN_THREE_MEETS_COUNT) AS JOIN_THREE_MEETS_COUNT_MAX
FROM
fact_index_party_ablity_grid_monthly m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID =#{monthId}
</select>
</mapper>

37
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml

@ -69,4 +69,41 @@
)
</foreach>
</insert>
<!-- 当前客户下,所有网格的治理能力相关五级指标 -->
<select id="selectListServiceAblityGrid" parameterType="map" resultType="java.util.HashMap">
SELECT
m.CUSTOMER_ID,
m.GRID_ID,
m.MONTH_ID,
m.ACTIVITY_COUNT,
m.VOLUNTEER_RATIO,
m.PARTY_VOLUNTEER_RATIO
FROM
fact_index_service_ablity_grid_monthly m
WHERE
m.DEL_FLAG = '0'
and m.CUSTOMER_ID=#{customerId}
and m.MONTH_ID=#{monthId}
</select>
<!-- 查询 服务能力,网格相关,各五级指标最大值,最小值 -->
<select id="selectServiceAblityGridMinAndMax" parameterType="map" resultType="java.util.Map">
SELECT
m.CUSTOMER_ID,
m.GRID_ID,
m.MONTH_ID,
MIN(m.ACTIVITY_COUNT) AS ACTIVITY_COUNT_MIN,
MAX(m.ACTIVITY_COUNT) AS ACTIVITY_COUNT_MAX,
MIN(m.VOLUNTEER_RATIO) AS VOLUNTEER_RATIO_MIN,
MAX(m.VOLUNTEER_RATIO) AS VOLUNTEER_RATIO_MAX,
MIN(m.PARTY_VOLUNTEER_RATIO) AS PARTY_VOLUNTEER_RATIO_MIN,
MAX(m.PARTY_VOLUNTEER_RATIO) AS PARTY_VOLUNTEER_RATIO_MAX
FROM
fact_index_service_ablity_grid_monthly m
WHERE
m.DEL_FLAG = '0'
and m.CUSTOMER_ID=#{customerId}
and m.MONTH_ID=#{monthId}
</select>
</mapper>

15
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

@ -77,4 +77,19 @@
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
</select>
<!-- 分页查询网格列表 -->
<select id="pageListByCustomerId" resultType="com.epmet.dto.ScreenCustomerGridDTO" parameterType="com.epmet.dto.indexcal.PageQueryGridFormDTO">
SELECT
m.GRID_ID,
m.CUSTOMER_ID,
m.GRID_NAME
FROM
screen_customer_grid m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
order by m.GRID_ID asc
LIMIT #{pageIndex}, #{pageSize}
</select>
</mapper>

Loading…
Cancel
Save