Browse Source

网格相关-暂存V2

dev_shibei_match
yinzuomei 5 years ago
parent
commit
4d7a82b680
  1. 52
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDTO.java
  2. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDetailDTO.java
  3. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  4. 46
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java
  5. 36
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java
  6. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java
  7. 74
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java
  8. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java
  9. 292
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java
  10. 11
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml
  11. 61
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml
  12. 65
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml
  13. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

52
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDTO.java

@ -0,0 +1,52 @@
package com.epmet.dto.indexcal;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 网格相关分值
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/31 16:38
*/
@Data
public class GridScoreDTO implements Serializable {
/**
* 网格Id
*/
private String gridId;
/**
* 客户Id
*/
private String customerId;
/**
* 网格所属的机关Id
*/
private String agencyId;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
private List<GridScoreDetailDTO> detailList;
}

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDetailDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.indexcal;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 网格相关分值
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/31 16:39
*/
@Data
public class GridScoreDetailDTO implements Serializable {
/**
* 1总分0不是
*/
private String isTotal;
/**
* 分值
*/
private BigDecimal score;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli网格相关wanggexiangguan
*/
private String indexCode;
}

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

@ -18,6 +18,7 @@
package com.epmet.dao.indexcoll; package com.epmet.dao.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO;
import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO;
import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
@ -85,4 +86,13 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @Date 2020/8/27 13:10 * @Date 2020/8/27 13:10
**/ **/
Map<String, Object> selectGovrnAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); Map<String, Object> selectGovrnAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @return int
* @param formDTO
* @author yinzuomei
* @description 查询当前月共上传了多少条记录治理能力-网格相关事实表
* @Date 2020/8/31 14:31
**/
int selectCount(CalculateCommonFormDTO formDTO);
} }

46
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java

@ -18,8 +18,13 @@
package com.epmet.dao.indexscore; package com.epmet.dao.indexscore;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.entity.indexscore.CpcScoreEntity; import com.epmet.entity.indexscore.CpcScoreEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
/** /**
* 党员相关分值 * 党员相关分值
@ -30,4 +35,45 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface CpcScoreDao extends BaseDao<CpcScoreEntity> { public interface CpcScoreDao extends BaseDao<CpcScoreEntity> {
/**
* @return java.math.BigDecimal
* @param customerId
* @param monthId
* @param gridId
* @author yinzuomei
* @description 获取网格内党员的联系群众能力考评分平均值
* @Date 2020/8/31 10:56
**/
BigDecimal selectGridContactMassesAvgValue(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("gridId") String gridId);
/**
* @return java.util.List<java.math.BigDecimal>
* @param formDTO
* @author yinzuomei
* @description 获取网格内党员的联系群众能力考评分平均值的最大值最小值
* @Date 2020/8/31 12:10
**/
List<BigDecimal> selectListGridContactMassesAvgValue(CalculateCommonFormDTO formDTO);
/**
* @return java.util.List<java.math.BigDecimal>
* @param calculateCommonFormDTO
* @author yinzuomei
* @description 网格内党员的参与议事能力考评分平均值 最大值最小值
* @Date 2020/8/31 14:42
**/
List<BigDecimal> selectListJoinIssueAvgValue(CalculateCommonFormDTO calculateCommonFormDTO);
/**
* @param customerId
* @param monthId
* @param gridId
* @return java.math.BigDecimal
* @author yinzuomei
* @description 组织内党员的参与议事能力考评分平均值
* @Date 2020/8/31 15:51
**/
BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId);
} }

36
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java

@ -18,8 +18,13 @@
package com.epmet.dao.indexscore; package com.epmet.dao.indexscore;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.GridScoreDTO;
import com.epmet.entity.indexscore.GridScoreEntity; import com.epmet.entity.indexscore.GridScoreEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 网格相关分值 * 网格相关分值
@ -29,5 +34,36 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface GridScoreDao extends BaseDao<GridScoreEntity> { public interface GridScoreDao extends BaseDao<GridScoreEntity> {
/**
* @param customerId
* @param monthId
* @param indexCode
* @param isTotal
* @return int
* @author yinzuomei
* @description
* @Date 2020/8/31 14:00
**/
int deleteByCusAndMonthId(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("indexCode") String indexCode,
@Param("isTotal") String isTotal);
/**
* @return int
* @param gridScoreEntityList
* @author yinzuomei
* @description
* @Date 2020/8/31 14:01
**/
int insertBatches(List<GridScoreEntity> gridScoreEntityList);
/**
* @return java.util.List<com.epmet.dto.indexcal.GridScoreDTO>
* @param formDTO
* @author yinzuomei
* @description
* @Date 2020/8/31 16:42
**/
List<GridScoreDTO> selectList(CalculateCommonFormDTO formDTO);
} }

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

@ -84,4 +84,14 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* @Date 2020/8/27 14:42 * @Date 2020/8/27 14:42
**/ **/
List<ScreenCustomerGridDTO> pageListByCustomerId(PageQueryGridFormDTO formDTO); List<ScreenCustomerGridDTO> pageListByCustomerId(PageQueryGridFormDTO formDTO);
/**
* @param customerId 客户id
* @param gridId 网格id
* @return java.lang.String
* @author yinzuomei
* @description 查询网格所属的组织id
* @Date 2020/8/31 12:35
**/
ScreenCustomerGridDTO selectParentAgencyId(@Param("customerId") String customerId, @Param("gridId") String gridId);
} }

74
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java

@ -39,54 +39,54 @@ public class GridScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 客户Id * 客户Id
*/ */
private String customerId; private String customerId;
/** /**
* 网格Id * 网格Id
*/ */
private String gridId; private String gridId;
/** /**
* 网格所属的机关Id * 网格所属的机关Id
*/ */
private String agencyId; private String agencyId;
/** /**
* 季度ID * 所有上级ID用英文逗号分开
*/ */
private String allParentIds;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId; private String quarterId;
/** /**
* 年度ID * 年度ID: yyyy
*/ */
private String yearId; private String yearId;
/** /**
* 月维度Id: yyyyMM * 月维度Id: yyyyMM
*/ */
private String monthId; private String monthId;
/** /**
* 总指数分值 * 1总分0不是
*/ */
private BigDecimal totalScore; private String isTotal;
/** /**
* 党建能力分值 * 分值
*/ */
private BigDecimal partyAblityScore; private BigDecimal score;
/** /**
* 治理能力分值 * 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli网格相关wanggexiangguan
*/ */
private BigDecimal govrnAblityScore; private String indexCode;
/**
* 服务能力分值
*/
private BigDecimal serviceAblityScore;
} }

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java

@ -24,6 +24,7 @@ public enum IndexCodeEnum {
DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4),
LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4),
ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5),
ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5),
; ;
private String code; private String code;

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

@ -2,15 +2,20 @@ package com.epmet.service.indexcal.impl;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.IndexCalConstant; import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao;
import com.epmet.dao.indexscore.CpcScoreDao;
import com.epmet.dao.indexscore.GridScoreDao;
import com.epmet.dao.screen.ScreenCustomerGridDao; import com.epmet.dao.screen.ScreenCustomerGridDao;
import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.CustomerGridInfoDTO; import com.epmet.dto.indexcal.CustomerGridInfoDTO;
import com.epmet.dto.indexcal.GridScoreDTO;
import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO;
import com.epmet.entity.indexscore.GridScoreEntity;
import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.entity.screen.IndexGroupDetailEntity;
import com.epmet.eum.IndexCodeEnum; import com.epmet.eum.IndexCodeEnum;
import com.epmet.service.indexcal.GridCorreLationService; import com.epmet.service.indexcal.GridCorreLationService;
@ -23,12 +28,11 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
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.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/** /**
* 网格相关service * 网格相关service
@ -51,6 +55,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
private IndexGroupDetailService indexGroupDetailService; private IndexGroupDetailService indexGroupDetailService;
@Autowired @Autowired
private IndexCodeFieldReService indexCodeFieldReService; private IndexCodeFieldReService indexCodeFieldReService;
@Autowired
private CpcScoreDao cpcScoreDao;
@Autowired
private GridScoreDao gridScoreDao;
/** /**
* @param formDTO * @param formDTO
@ -67,28 +76,28 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (!CollectionUtils.isEmpty(dangJianNengLiList)) { if (!CollectionUtils.isEmpty(dangJianNengLiList)) {
//1、计算网格相关-党建能力 //1、计算网格相关-党建能力
calculateGridCorreLationDangJian(formDTO, dangJianNengLiList); calculateGridDangJian(formDTO, dangJianNengLiList);
} }
/* List<IndexGroupDetailEntity> zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), List<IndexGroupDetailEntity> zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (!CollectionUtils.isEmpty(zhiLiNengLiList)) { if (!CollectionUtils.isEmpty(zhiLiNengLiList)) {
//2、计算网格相关-治理能力 //2、计算网格相关-治理能力
calculateGridCorreLationZhiLi(formDTO, zhiLiNengLiList); calculateGridZhiLi(formDTO, zhiLiNengLiList);
} }
List<IndexGroupDetailEntity> fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), List<IndexGroupDetailEntity> fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.FU_WU_NENG_LI.getCode()); IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (!CollectionUtils.isEmpty(fuWuNengLiList)) { if (!CollectionUtils.isEmpty(fuWuNengLiList)) {
//3、计算网格相关-服务能力 //3、计算网格相关-服务能力
calculateGridCorreLationFuWu(formDTO, fuWuNengLiList); calculateGridFuWu(formDTO, fuWuNengLiList);
} }
//计算网格相关总分 //计算网格相关总分
List<IndexGroupDetailEntity> wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), List<IndexGroupDetailEntity> wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
if (!CollectionUtils.isEmpty(wgxgList)) { if (!CollectionUtils.isEmpty(wgxgList)) {
calculateGridCorreLationTotal(formDTO, wgxgList); calculateGridTotal(formDTO, wgxgList);
}*/ }
resultFlag = true; resultFlag = true;
return resultFlag; return resultFlag;
} }
@ -101,7 +110,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
* @description 计算网格相关-党建能力 * @description 计算网格相关-党建能力
* @Date 2020/8/26 16:47 * @Date 2020/8/26 16:47
**/ **/
private void calculateGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) { @Transactional(rollbackFor = Exception.class)
public void calculateGridDangJian(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) {
//查询总记录数 //查询总记录数
int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO);
if (NumConstant.ZERO == total) { if (NumConstant.ZERO == total) {
@ -115,6 +125,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
Map<String, Object> minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); Map<String, Object> minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
//指标集合 //指标集合
Map<String, IndexInputVO<BigDecimal>> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); Map<String, IndexInputVO<BigDecimal>> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap);
List<HashMap<String, BigDecimal>> resultMapList=new ArrayList<>();
//分页查询采集记录 //分页查询采集记录
for (int pageNo = 1; pageNo <= totalPage; pageNo++) { for (int pageNo = 1; pageNo <= totalPage; pageNo++) {
int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE;
@ -140,67 +151,136 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理");
//网格内党员的联系群众能力考评分(平均值) //网格内党员的联系群众能力考评分(平均值)
String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID); String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID);
BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(gridId); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO,gridId);
SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue);
value.getIndexValueVOs().add(contactMassesAblityValue); value.getIndexValueVOs().add(contactMassesAblityValue);
} }
}); });
}); });
List<IndexOutputVO> result = calculate(indexMap); HashMap<String, BigDecimal> resultMap = calculate(indexMap);
// TODO 处理结果 resultMapList.add(resultMap);
saveGridCorreLationDangJian(formDTO, indexList, result);
try {
for (IndexOutputVO m : result) {
logger.info("indexId=" + m.getIndexId());
for (SampleScore sampleScore : m.getIndexScoreVOs()) {
logger.info(String.format("网格id:%s,得分:%s", sampleScore.getSampleId(), sampleScore.getSampleScore()));
}
}
} catch (Exception e) {
}
} }
// 保存中间表
saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),NumConstant.ZERO_STR);
} }
/** /**
* @return java.util.Map<java.lang.String,java.math.BigDecimal> * @return java.util.Map<java.lang.String,java.math.BigDecimal>
* @param formDTO * @param calculateCommonFormDTO
* @author yinzuomei * @author yinzuomei
* @description TODO * @description 获取网格内党员的联系群众能力考评分平均值的最大值最小值
* @Date 2020/8/31 9:51 * @Date 2020/8/31 9:51
**/ **/
private Map<String, BigDecimal> contactMassesAblityMap(CalculateCommonFormDTO formDTO) { private Map<String, BigDecimal> getContactMassesAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) {
Map<String, BigDecimal> map=new HashMap<>();
return null; List<BigDecimal> list=cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO);
if(!CollectionUtils.isEmpty(list)){
BigDecimal minValue=Collections.min(list);
BigDecimal maxValue=Collections.max(list);
map.put(StrConstant.MIN,minValue);
map.put(StrConstant.MAX,maxValue);
return map;
}
map.put(StrConstant.MIN,new BigDecimal(NumConstant.ZERO_STR));
map.put(StrConstant.MAX,new BigDecimal(NumConstant.ZERO_STR));
return map;
} }
/** /**
* @return java.math.BigDecimal * @return java.math.BigDecimal
* @param calculateCommonFormDTO
* @param gridId 网格id * @param gridId 网格id
* @author yinzuomei TODO * @author yinzuomei
* @description 获取网格组织内党员的联系群众能力考评分平均值 * @description 获取网格组织内党员的联系群众能力考评分平均值
* @Date 2020/8/31 9:50 * @Date 2020/8/31 9:50
**/ **/
private BigDecimal getGridContactMassesAvgValue(String gridId) { private BigDecimal getGridContactMassesAvgValue(CalculateCommonFormDTO calculateCommonFormDTO,String gridId) {
return null; BigDecimal result=cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(),calculateCommonFormDTO.getMonthId(),gridId);
if(null==result){
return new BigDecimal(NumConstant.ZERO_STR);
}
return result;
}
/**
* @return java.math.BigDecimal
* @param formDTO
* @param gridId
* @author yinzuomei
* @description 组织内党员的参与议事能力考评分平均值
* @Date 2020/8/31 15:51
**/
private BigDecimal getGridJoinIssueAvgValue(CalculateCommonFormDTO formDTO, String gridId) {
BigDecimal result=cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(),formDTO.getMonthId(),gridId);
if(null==result){
return new BigDecimal(NumConstant.ZERO_STR);
}
return result;
}
/**
* @return java.util.Map<java.lang.String,java.math.BigDecimal>
* @param calculateCommonFormDTO
* @author yinzuomei
* @description 网格内党员的参与议事能力考评分平均值 最大值最小值
* @Date 2020/8/31 14:41
**/
private Map<String, BigDecimal> getJoinIssueAblityMap(CalculateCommonFormDTO calculateCommonFormDTO){
Map<String, BigDecimal> map=new HashMap<>();
List<BigDecimal> list=cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO);
if(!CollectionUtils.isEmpty(list)){
BigDecimal minValue=Collections.min(list);
BigDecimal maxValue=Collections.max(list);
map.put(StrConstant.MIN,minValue);
map.put(StrConstant.MAX,maxValue);
return map;
}
map.put(StrConstant.MIN,new BigDecimal(NumConstant.ZERO_STR));
map.put(StrConstant.MAX,new BigDecimal(NumConstant.ZERO_STR));
return map;
} }
/** /**
* @param formDTO 客户id 月份id: yyyyMM * @param formDTO 客户id 月份id: yyyyMM
* @param indexList 指标集合 * @param resultMapList
* @param indexOutputVOList * @param indexCode 指标编码
* @param isTotal 1总分0不是
* @return void * @return void
* @author yinzuomei * @author yinzuomei
* @description 保存网格相关五级指标分值 * @description 保存网格相关三大能力
* @Date 2020/8/30 22:50 * @Date 2020/8/30 22:50
**/ **/
private void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, private void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO,
List<IndexGroupDetailEntity> indexList, List<HashMap<String, BigDecimal>> resultMapList,
List<IndexOutputVO> indexOutputVOList) { String indexCode,
Map<String, IndexGroupDetailEntity> indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); String isTotal) {
List<GridScoreEntity> gridScoreEntityList = new ArrayList<>();
String quarterId = DateUtils.getQuarterId(formDTO.getMonthId());
String yearId = DateUtils.getYearId(formDTO.getMonthId());
for (HashMap<String, BigDecimal> resultMap : resultMapList) {
resultMap.forEach((gridId, partyAblityScore) -> {
logger.info("网格id:" + gridId + ";分值:" + partyAblityScore);
GridScoreEntity gridScoreEntity = new GridScoreEntity();
gridScoreEntity.setCustomerId(formDTO.getCustomerId());
gridScoreEntity.setGridId(gridId);
gridScoreEntity.setIsTotal(isTotal);
gridScoreEntity.setIndexCode(indexCode);
ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId);
if (null != screenCustomerGridDTO) {
gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId());
gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds());
}
gridScoreEntity.setQuarterId(quarterId);
gridScoreEntity.setYearId(yearId);
gridScoreEntity.setMonthId(formDTO.getMonthId());
gridScoreEntity.setScore(partyAblityScore);
gridScoreEntityList.add(gridScoreEntity);
});
}
if (!CollectionUtils.isEmpty(gridScoreEntityList)) {
gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode,isTotal);
gridScoreDao.insertBatches(gridScoreEntityList);
}
} }
/** /**
@ -210,11 +290,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
* @description * @description
* @Date 2020/8/30 21:40 * @Date 2020/8/30 21:40
**/ **/
private List<IndexOutputVO> calculate(Map<String, IndexInputVO<BigDecimal>> indexMap) { private HashMap<String, BigDecimal> calculate(Map<String, IndexInputVO<BigDecimal>> indexMap) {
//构造入参 //构造入参
List<IndexInputVO> indexInputVOS = this.getIndexInputVOList(indexMap); List<IndexInputVO> indexInputVOS = this.getIndexInputVOList(indexMap);
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator();
return batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS);
} }
/** /**
@ -256,23 +336,29 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) {
//组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值
logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理");
Map<String,BigDecimal> contactMassesAblityMap= this.contactMassesAblityMap(formDTO); Map<String,BigDecimal> contactMassesAblityMap= this.getContactMassesAblityMap(formDTO);
minValue=contactMassesAblityMap.get(StrConstant.MIN); minValue=contactMassesAblityMap.get(StrConstant.MIN);
maxValue=contactMassesAblityMap.get(StrConstant.MAX); maxValue=contactMassesAblityMap.get(StrConstant.MAX);
}else if(IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())){
logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理");
Map<String,BigDecimal> joinIssueAblityMap= this.getJoinIssueAblityMap(formDTO);
minValue=joinIssueAblityMap.get(StrConstant.MIN);
maxValue=joinIssueAblityMap.get(StrConstant.MAX);
} else { } else {
//获取指标对应的列名 //获取指标对应的列名
String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode());
// logger.info("fieldName=" + fieldName + ";index.getIndexCode()=" + index.getIndexCode()); if(StringUtils.isBlank(fieldName)){
//最小值key logger.error("index_code:"+index.getIndexCode()+"not find field_name");
continue;
}
logger.info("INDEX_CODE=" + index.getIndexCode()+";FIELD_ID=" + fieldName );
String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN);
//最大值key
String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX);
minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey)));
maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey)));
} }
// logger.info("minValue="+minValue+";maxValue="+maxValue);
//分值计算器 //分值计算器
ScoreCalculator<Integer> scoreCalculator = new BigDecimalScoreCalculator(minValue, ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue,
maxValue, maxValue,
ScoreConstants.MIN_SCORE, ScoreConstants.MIN_SCORE,
ScoreConstants.MAX_SCORE, ScoreConstants.MAX_SCORE,
@ -290,15 +376,63 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
/** /**
* @param formDTO * @param formDTO
* @param indexList * @param indexList
* @return void TODO * @return void
* @author yinzuomei * @author yinzuomei
* @description 计算网格相关-治理能力 * @description 计算网格相关-治理能力
* @Date 2020/8/26 16:47 * @Date 2020/8/26 16:47
**/ **/
private void calculateGridCorreLationZhiLi(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) { private void calculateGridZhiLi(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) {
//查询总记录数
int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO);
if (NumConstant.ZERO == total) {
logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId());
return;
}
//总页数,进行批量查询,批量计算
int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE);
logger.info(String.format("共%s条数据,分%s次计算", total, totalPage));
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
//指标集合
Map<String, IndexInputVO<BigDecimal>> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap);
List<HashMap<String, BigDecimal>> resultMapList=new ArrayList<>();
//分页查询采集记录
for (int pageNo = 1; pageNo <= totalPage; pageNo++) {
int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE;
//前10条
List<Map<String, Object>> recordList = queryListGovrnAblityGrid(new PageQueryGridFormDTO(formDTO.getCustomerId(),
formDTO.getMonthId(),
pageIndex,
pageNo,
IndexCalConstant.PAGE_SIZE));
//遍历每一个网格的记录
recordList.forEach(recordMap -> {
//遍历所有的指标
indexMap.forEach((key, value) -> {
//列名不为空
if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) {
//对应的数值
String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)));
//构造样本值对象
SampleValue<BigDecimal> currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr));
value.getIndexValueVOs().add(currentGridIndexValue);
} else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) {
logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理");
String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID);
BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO,gridId);
SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue);
value.getIndexValueVOs().add(contactMassesAblityValue);
}
});
});
HashMap<String, BigDecimal> resultMap = calculate(indexMap);
resultMapList.add(resultMap);
}
// 保存中间表
saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),NumConstant.ZERO_STR);
} }
/** /**
* @param formDTO * @param formDTO
* @param indexList * @param indexList
@ -307,8 +441,51 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
* @description 计算网格相关-服务能力 * @description 计算网格相关-服务能力
* @Date 2020/8/26 16:48 * @Date 2020/8/26 16:48
**/ **/
private void calculateGridCorreLationFuWu(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) { private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) {
//查询总记录数
int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO);
if (NumConstant.ZERO == total) {
logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId());
return;
}
//总页数,进行批量查询,批量计算
int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE);
logger.info(String.format("共%s条数据,分%s次计算", total, totalPage));
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
//指标集合
Map<String, IndexInputVO<BigDecimal>> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap);
List<HashMap<String, BigDecimal>> resultMapList=new ArrayList<>();
//分页查询采集记录
for (int pageNo = 1; pageNo <= totalPage; pageNo++) {
int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE;
//前10条
List<Map<String, Object>> recordList = queryListServiceAblityGrid(new PageQueryGridFormDTO(formDTO.getCustomerId(),
formDTO.getMonthId(),
pageIndex,
pageNo,
IndexCalConstant.PAGE_SIZE));
//遍历每一个网格的记录
recordList.forEach(recordMap -> {
//遍历所有的指标
indexMap.forEach((key, value) -> {
//列名不为空
if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) {
//对应的数值
String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)));
//构造样本值对象
SampleValue<BigDecimal> currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr));
value.getIndexValueVOs().add(currentGridIndexValue);
}else{
logger.error("index_code:"+key+" not find field_name");
}
});
});
HashMap<String, BigDecimal> resultMap = calculate(indexMap);
resultMapList.add(resultMap);
}
// 保存中间表
saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.FU_WU_NENG_LI.getCode(),NumConstant.ZERO_STR);
} }
/** /**
@ -319,8 +496,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
* @description 计算网格相关总分 * @description 计算网格相关总分
* @Date 2020/8/26 16:50 * @Date 2020/8/26 16:50
**/ **/
private void calculateGridCorreLationTotal(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) { private void calculateGridTotal(CalculateCommonFormDTO formDTO, List<IndexGroupDetailEntity> indexList) {
//查询总记录数
List<GridScoreDTO> gridScoreDTOList=gridScoreDao.selectList(formDTO);
// 保存中间表 TODO
// saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),NumConstant.ONE_STR);
} }

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

@ -138,4 +138,15 @@
and m.CUSTOMER_ID=#{customerId} and m.CUSTOMER_ID=#{customerId}
and m.MONTH_ID=#{monthId} and m.MONTH_ID=#{monthId}
</select> </select>
<select id="selectCount" resultType="java.lang.Integer" parameterType="com.epmet.dto.indexcal.CalculateCommonFormDTO">
SELECT
count( 1 ) AS total
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> </mapper>

61
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml

@ -23,4 +23,65 @@
</resultMap> </resultMap>
<!-- 获取网格内党员的联系群众能力考评分(平均值) -->
<select id="selectGridContactMassesAvgValue" parameterType="map" resultType="java.math.BigDecimal">
SELECT
AVG( SCORE ) AS AVG_CONTACT_MASSES_SCORE
FROM
fact_index_cpc_score m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID = #{monthId}
AND m.GRID_ID = #{gridId}
and m.INDEX_CODE='lianxiqunzhong'
GROUP BY
m.GRID_ID
</select>
<!-- 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值 -->
<select id="selectListGridContactMassesAvgValue" parameterType="com.epmet.dto.indexcal.CalculateCommonFormDTO" resultType="java.math.BigDecimal">
SELECT
AVG( SCORE ) AS AVG_CONTACT_MASSES_SCORE
FROM
fact_index_cpc_score m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID = #{monthId}
and m.INDEX_CODE='lianxiqunzhong'
GROUP BY
m.GRID_ID
</select>
<!-- 网格内党员的参与议事能力考评分(平均值) 最大值最小值 -->
<select id="selectListJoinIssueAvgValue" parameterType="com.epmet.dto.indexcal.CalculateCommonFormDTO" resultType="java.math.BigDecimal">
SELECT
AVG( SCORE ) AS AVG_JOIN_ISSUE_SCORE
FROM
fact_index_cpc_score m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID = #{monthId}
and m.INDEX_CODE='canyuyishi'
GROUP BY
m.GRID_ID
</select>
<!-- -->
<select id="selectGridJoinIssueAvgValue" parameterType="map" resultType="java.math.BigDecimal">
SELECT
AVG( SCORE ) AS AVG_CONTACT_MASSES_SCORE
FROM
fact_index_cpc_score m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID = #{monthId}
AND m.GRID_ID = #{gridId}
and m.INDEX_CODE='canyuyishi'
GROUP BY
m.GRID_ID
</select>
</mapper> </mapper>

65
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml

@ -8,13 +8,13 @@
<result property="customerId" column="CUSTOMER_ID"/> <result property="customerId" column="CUSTOMER_ID"/>
<result property="gridId" column="GRID_ID"/> <result property="gridId" column="GRID_ID"/>
<result property="agencyId" column="AGENCY_ID"/> <result property="agencyId" column="AGENCY_ID"/>
<result property="allParentIds" column="ALL_PARENT_IDS"/>
<result property="quarterId" column="QUARTER_ID"/> <result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/> <result property="yearId" column="YEAR_ID"/>
<result property="monthId" column="MONTH_ID"/> <result property="monthId" column="MONTH_ID"/>
<result property="totalScore" column="TOTAL_SCORE"/> <result property="isTotal" column="IS_TOTAL"/>
<result property="partyAblityScore" column="PARTY_ABLITY_SCORE"/> <result property="score" column="SCORE"/>
<result property="govrnAblityScore" column="GOVRN_ABLITY_SCORE"/> <result property="indexCode" column="INDEX_CODE"/>
<result property="serviceAblityScore" column="SERVICE_ABLITY_SCORE"/>
<result property="delFlag" column="DEL_FLAG"/> <result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/> <result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/> <result property="createdBy" column="CREATED_BY"/>
@ -23,5 +23,62 @@
<result property="updatedTime" column="UPDATED_TIME"/> <result property="updatedTime" column="UPDATED_TIME"/>
</resultMap> </resultMap>
<delete id="deleteByCusAndMonthId" parameterType="map">
DELETE
FROM
fact_index_grid_score
WHERE
CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
AND INDEX_CODE = #{indexCode}
and IS_TOTAL=#{isTotal}
</delete>
<insert id="insertBatches">
INSERT INTO `fact_index_grid_score` (
`ID`,
`CUSTOMER_ID`,
`GRID_ID`,
`AGENCY_ID`,
`ALL_PARENT_IDS`,
`QUARTER_ID`,
`YEAR_ID`,
`MONTH_ID`,
`IS_TOTAL`,
`SCORE`,
`INDEX_CODE`,
`DEL_FLAG`,
`REVISION`,
`CREATED_BY`,
`CREATED_TIME`,
`UPDATED_BY`,
`UPDATED_TIME`
)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{item.gridId},
#{item.agencyId},
#{item.allParentIds},
#{item.quarterId},
#{item.yearId},
#{item.monthId},
#{item.isTotal},
#{item.score},
#{item.indexCode},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
<select id="selectList" parameterType="com.epmet.dto.indexcal.CalculateCommonFormDTO" resultType="com.epmet.dto.indexcal.GridScoreDTO">
</select>
</mapper> </mapper>

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

@ -92,4 +92,17 @@
order by m.GRID_ID asc order by m.GRID_ID asc
LIMIT #{pageIndex}, #{pageSize} LIMIT #{pageIndex}, #{pageSize}
</select> </select>
<!-- -->
<select id="selectParentAgencyId" parameterType="map" resultType="com.epmet.dto.ScreenCustomerGridDTO">
SELECT
PARENT_AGENCY_ID,
ALL_PARENT_IDS
FROM
screen_customer_grid m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.GRID_ID = #{gridId}
</select>
</mapper> </mapper>

Loading…
Cancel
Save