|
@@ -1,18 +1,16 @@
|
|
package com.ims.eval.service.impl;
|
|
package com.ims.eval.service.impl;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.ims.common.utils.DateUtils;
|
|
import com.ims.common.utils.DateUtils;
|
|
import com.ims.common.utils.StringUtils;
|
|
import com.ims.common.utils.StringUtils;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.config.CustomException;
|
|
-import com.ims.eval.entity.EvaluationPortal;
|
|
|
|
import com.ims.eval.dao.EvaluationPortalMapper;
|
|
import com.ims.eval.dao.EvaluationPortalMapper;
|
|
|
|
+import com.ims.eval.entity.EvaluationPortal;
|
|
import com.ims.eval.entity.EvaluationPortalAttach;
|
|
import com.ims.eval.entity.EvaluationPortalAttach;
|
|
-import com.ims.eval.entity.EvaluationScoreCount;
|
|
|
|
import com.ims.eval.entity.OrganizationEvaluation;
|
|
import com.ims.eval.entity.OrganizationEvaluation;
|
|
import com.ims.eval.service.IEvaluationPortalAttachService;
|
|
import com.ims.eval.service.IEvaluationPortalAttachService;
|
|
import com.ims.eval.service.IEvaluationPortalService;
|
|
import com.ims.eval.service.IEvaluationPortalService;
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.ims.eval.service.IEvaluationScoreCountService;
|
|
import com.ims.eval.service.IEvaluationScoreCountService;
|
|
import com.ims.eval.service.IOrganizationEvaluationService;
|
|
import com.ims.eval.service.IOrganizationEvaluationService;
|
|
import groovy.util.logging.Slf4j;
|
|
import groovy.util.logging.Slf4j;
|
|
@@ -39,7 +37,7 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
private IEvaluationPortalAttachService evaluationPortalAttachService;
|
|
private IEvaluationPortalAttachService evaluationPortalAttachService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private IOrganizationEvaluationService organizationEvaluationService;
|
|
|
|
|
|
+ private IOrganizationEvaluationService organizationEvaluationService;
|
|
|
|
|
|
private IEvaluationScoreCountService evaluationScoreCountService;
|
|
private IEvaluationScoreCountService evaluationScoreCountService;
|
|
|
|
|
|
@@ -47,14 +45,14 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
public Map<String, Object> getPortalData(String binSection, String year, String season) {
|
|
public Map<String, Object> getPortalData(String binSection, String year, String season) {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
Calendar date = Calendar.getInstance();
|
|
Calendar date = Calendar.getInstance();
|
|
- try{
|
|
|
|
|
|
+ try {
|
|
List<Map<String, Object>> yearList = baseMapper.selectPortalList(binSection, date.get(Calendar.YEAR) == Integer.valueOf(year) ? String.valueOf(Integer.valueOf(year) - 1) : year, null);
|
|
List<Map<String, Object>> yearList = baseMapper.selectPortalList(binSection, date.get(Calendar.YEAR) == Integer.valueOf(year) ? String.valueOf(Integer.valueOf(year) - 1) : year, null);
|
|
List<Map<String, Object>> seasonList = baseMapper.selectPortalList(binSection, year, season);
|
|
List<Map<String, Object>> seasonList = baseMapper.selectPortalList(binSection, year, season);
|
|
Map<Object, List<Map<String, Object>>> yearMap = yearList.stream().collect(Collectors.groupingBy(e -> e.get("bin_section"), Collectors.toList()));
|
|
Map<Object, List<Map<String, Object>>> yearMap = yearList.stream().collect(Collectors.groupingBy(e -> e.get("bin_section"), Collectors.toList()));
|
|
Map<Object, List<Map<String, Object>>> seasonMap = seasonList.stream().collect(Collectors.groupingBy(e -> e.get("bin_section"), Collectors.toList()));
|
|
Map<Object, List<Map<String, Object>>> seasonMap = seasonList.stream().collect(Collectors.groupingBy(e -> e.get("bin_section"), Collectors.toList()));
|
|
map.put("year", yearMap);
|
|
map.put("year", yearMap);
|
|
map.put("season", seasonMap);
|
|
map.put("season", seasonMap);
|
|
- } catch (Exception e){
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
log.error(e.getMessage());
|
|
log.error(e.getMessage());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -64,7 +62,7 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
@Override
|
|
@Override
|
|
public List<EvaluationPortal> getEvaluationPortalList(String year, String season, String binSection, String memo1) {
|
|
public List<EvaluationPortal> getEvaluationPortalList(String year, String season, String binSection, String memo1) {
|
|
|
|
|
|
- List<EvaluationPortal> list = baseMapper.selectEvaluationPortalList(year,season,binSection,memo1);
|
|
|
|
|
|
+ List<EvaluationPortal> list = baseMapper.selectEvaluationPortalList(year, season, binSection, memo1);
|
|
|
|
|
|
|
|
|
|
return list;
|
|
return list;
|
|
@@ -96,24 +94,19 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
@Override
|
|
@Override
|
|
public void rating(String OrganizationEvaluation) {
|
|
public void rating(String OrganizationEvaluation) {
|
|
OrganizationEvaluation evaluation = null;
|
|
OrganizationEvaluation evaluation = null;
|
|
- if(StringUtils.isEmpty(OrganizationEvaluation)){
|
|
|
|
|
|
+ if (StringUtils.isEmpty(OrganizationEvaluation)) {
|
|
//获取当前日期
|
|
//获取当前日期
|
|
- String year = String.valueOf(DateUtils.getYear(new Date()));
|
|
|
|
|
|
+ String year = String.valueOf(DateUtils.getYear(new Date()));
|
|
String season = String.valueOf(DateUtils.getSeason(new Date()));
|
|
String season = String.valueOf(DateUtils.getSeason(new Date()));
|
|
- evaluation = organizationEvaluationService.list(OrganizationEvaluation,"JDKP",year,season).get(0);
|
|
|
|
- }else {
|
|
|
|
- evaluation = organizationEvaluationService.getById(OrganizationEvaluation);
|
|
|
|
|
|
+ evaluation = organizationEvaluationService.list(OrganizationEvaluation, "JDKP", year, season).get(0);
|
|
|
|
+ } else {
|
|
|
|
+ evaluation = organizationEvaluationService.getById(OrganizationEvaluation);
|
|
}
|
|
}
|
|
//按照板块获取分数
|
|
//按照板块获取分数
|
|
|
|
|
|
- evaluationScoreCountService.getListByEvaluationRuleId("","","");
|
|
|
|
|
|
+ evaluationScoreCountService.getListByEvaluationRuleId("", "", "");
|
|
evaluation.getId();
|
|
evaluation.getId();
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -121,5 +114,19 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public Map<String, Object> selectPortalList(String binSection, String year, String season) {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ Calendar date = Calendar.getInstance();
|
|
|
|
+ try {
|
|
|
|
+ List<Map<String, Object>> yearList = baseMapper.selectPortalList(binSection, date.get(Calendar.YEAR) == Integer.valueOf(year) ? String.valueOf(Integer.valueOf(year) - 1) : year, null);
|
|
|
|
+ Map<Object, List<Map<String, Object>>> yearMap = yearList.stream().collect(Collectors.groupingBy(e -> e.get("bin_section"), Collectors.toList()));
|
|
|
|
+ map.put("year", yearMap);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error(e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|