|
|
@ -35,6 +35,7 @@ import com.epmet.evaluationindex.index.result.IndexGroupDetailResult; |
|
|
|
import com.epmet.evaluationindex.index.result.IndexScoreDetailResult; |
|
|
|
import com.epmet.evaluationindex.index.result.IndexScoreResult; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -79,8 +80,8 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
if (CollectionUtils.isEmpty(groupDetailEntities)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
Map<String, List<IndexGroupDetailResult>> detailEntityMap = groupDetailEntities.stream().collect(Collectors.groupingBy(IndexGroupDetailResult::getAllParentIndexCode)); |
|
|
|
|
|
|
|
Map<String, List<IndexGroupDetailResult>> detailEntityMap = groupDetailEntities.stream().collect(Collectors.groupingBy(IndexGroupDetailResult::getAllParentIndexCode)); |
|
|
|
|
|
|
|
for (IndexExplainTreeDTO explainDTO : explainDTOList) { |
|
|
|
//根节点
|
|
|
@ -103,35 +104,26 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
|
|
|
|
String type = explainDTO.getType(); |
|
|
|
String orgLevel = formDTO.getOrgLevel(); |
|
|
|
|
|
|
|
IndexScoreFormDTO ablityListFormDTO = new IndexScoreFormDTO(); |
|
|
|
ablityListFormDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
|
ablityListFormDTO.setOrgId(formDTO.getOrgId()); |
|
|
|
ablityListFormDTO.setMonthId(StringUtils.isBlank(formDTO.getMonthId()) ? DateUtils.getCurrentTimeBeforeMonthId() : formDTO.getMonthId()); |
|
|
|
switch (orgLevel) { |
|
|
|
case "grid": |
|
|
|
String allIndexCodePath = null; |
|
|
|
|
|
|
|
//set Target value
|
|
|
|
IndexScoreFormDTO ablityListFormDTO = new IndexScoreFormDTO(); |
|
|
|
ablityListFormDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
|
ablityListFormDTO.setOrgId(formDTO.getOrgId()); |
|
|
|
ablityListFormDTO.setMonthId(DateUtils.getCurrentTimeBeforeMonthId()); |
|
|
|
|
|
|
|
|
|
|
|
if (IndexConstant.ZI_SHEN.equals(type)) { |
|
|
|
allIndexCodePath = "wanggexiangguan:dangjiannengli"; |
|
|
|
|
|
|
|
List<String> tableHeaders = getTableHeaders(type, allIndexCodePath, orgLevel); |
|
|
|
result.setTableTileList(tableHeaders); |
|
|
|
allIndexCodePath = explainDTO.getIndexCode(); |
|
|
|
|
|
|
|
setDefaultTableData(orgLevel, type, detailEntityMap, result, allIndexCodePath); |
|
|
|
|
|
|
|
//不下钻
|
|
|
|
ablityListFormDTO.setAllParentIndexCode(allIndexCodePath); |
|
|
|
realScoreList = gridSubScoreDao.selectGridSubScore(ablityListFormDTO); |
|
|
|
} else if (IndexConstant.XIA_JI.equals(type)) { |
|
|
|
allIndexCodePath = "dangyuanxiangguan:lianxiqunzhong"; |
|
|
|
|
|
|
|
|
|
|
|
List<String> tableHeaders = getTableHeaders(type, allIndexCodePath, orgLevel); |
|
|
|
tableHeaders.add(0, "组织内党员的联系群众指数考评分(平均值)"); |
|
|
|
result.setTableTileList(tableHeaders); |
|
|
|
} else if (IndexConstant.XIA_JI.equals(type)) { |
|
|
|
allIndexCodePath = explainDTO.getIndexCode(); |
|
|
|
|
|
|
|
setDefaultTableData(orgLevel, type, detailEntityMap, result, allIndexCodePath); |
|
|
|
|
|
|
@ -139,6 +131,11 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
ablityListFormDTO.setAllParentIndexCode(allIndexCodePath); |
|
|
|
realScoreList = factIndexCpcSubScoreDao.selecCpcAvgScore(ablityListFormDTO); |
|
|
|
} |
|
|
|
List<String> tableHeaders = getTableHeaders(type, allIndexCodePath, orgLevel); |
|
|
|
result.setTableTileList(tableHeaders); |
|
|
|
|
|
|
|
break; |
|
|
|
case "community": |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
@ -224,6 +221,18 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
switch (orgLevel) { |
|
|
|
case "grid": |
|
|
|
//还没确定怎么搞
|
|
|
|
if ("zishen".equals(type)) { |
|
|
|
headers = IndexConstant.getStandardSelfHeaders(allIndexCode); |
|
|
|
|
|
|
|
} else if ("xiaji".equals(type)) { |
|
|
|
headers = IndexConstant.getStandardSubHeaders(allIndexCode); |
|
|
|
if (allIndexCode.contains("canyuyishi")) { |
|
|
|
headers.add(0, "组织内党员的参与议事指数考评分(平均值)"); |
|
|
|
} else if (allIndexCode.contains("lianxiqunzhong")) { |
|
|
|
headers.add(0, "组织内党员的联系群众指数考评分(平均值)"); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
default: |
|
|
|
if ("zishen".equals(type)) { |
|
|
|
headers = IndexConstant.getStandardSelfHeaders(allIndexCode); |
|
|
|