Browse Source

区县级别的三大能力代码微调

master
zxc 4 years ago
parent
commit
717d0b2f33
  1. 26
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyAndParentResultDTO.java
  2. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  3. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml

26
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyAndParentResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.indexcal;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/5/26 1:47 下午
* @DESC
*/
@Data
public class AgencyAndParentResultDTO implements Serializable {
private static final long serialVersionUID = -7300464262794241276L;
/**
* 组织ID
*/
private String agencyId;
/**
* parentId
*/
private String pid;
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -24,6 +24,7 @@ import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.AgencyMonthCountResultDTO;
import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO;
import com.epmet.dto.extract.result.OrgNameResultDTO;
import com.epmet.dto.indexcal.AgencyAndParentResultDTO;
import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO;
import com.epmet.dto.screen.ScreenProjectOrgDailyDTO;
import com.epmet.dto.screen.result.TreeResultDTO;
@ -106,7 +107,7 @@ public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEnt
* @author zxc
* @date 2021/5/26 10:38 上午
*/
Map<String,String> selectAgencyIdAndParentId(@Param("customerId") String customerId);
List<AgencyAndParentResultDTO> selectAgencyIdAndParentId(@Param("customerId") String customerId);
/**
* 返回当前客户下未匹配到的 街道区县级 组织信息

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

@ -19,10 +19,7 @@ import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao;
import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao;
import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
import com.epmet.dto.indexcal.AgencyCalResultDTO;
import com.epmet.dto.indexcal.AgencyScoreDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO;
import com.epmet.dto.indexcal.*;
import com.epmet.dto.screen.ScreenProjectOrgDailyDTO;
import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO;
import com.epmet.entity.evaluationindex.indexcal.AgencySelfSubScoreEntity;
@ -222,7 +219,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>();
Map<String, String> agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId);
Map<String, String> agencyMap = agencyMap(customerId);
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
//党建能力平均值
@ -315,7 +312,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
Map<String, String> agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId);
Map<String, String> agencyMap = agencyMap(customerId);
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) {
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL);
@ -408,7 +405,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
Map<String, String> agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId);
Map<String, String> agencyMap = agencyMap(customerId);
detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode();
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) {
@ -648,7 +645,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>();
Map<String, String> agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId);
Map<String, String> agencyMap = agencyMap(customerId);
//党建能力平均值
indexDetailList.forEach(detail -> {
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
@ -734,7 +731,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>();
Map<String, String> agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId);
Map<String, String> agencyMap = agencyMap(customerId);
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) {
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode());
@ -822,7 +819,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>();
Map<String, String> agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId);
Map<String, String> agencyMap = agencyMap(customerId);
detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode();
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) {
@ -918,5 +915,19 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
return true;
}
/**
* @Description 查询客户下的所有组织parentId
* @Param customerId
* @author zxc
* @date 2021/5/26 1:44 下午
*/
public Map<String,String> agencyMap(String customerId){
Map<String,String> result = new HashMap<>(16);
List<AgencyAndParentResultDTO> dtos = customerAgencyDao.selectAgencyIdAndParentId(customerId);
dtos.forEach(d -> {
result.put(d.getAgencyId(),d.getPid());
});
return result;
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml

@ -428,7 +428,7 @@
</select>
<!-- 查询客户下所有的组织的上级组织 -->
<select id="selectAgencyIdAndParentId" resultType="java.util.Map">
<select id="selectAgencyIdAndParentId" resultType="com.epmet.dto.indexcal.AgencyAndParentResultDTO">
SELECT
AGENCY_ID,
PID

Loading…
Cancel
Save