|
@@ -47,11 +47,11 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
private EvaluationPortalMapper evaluationPortalMapper;
|
|
private EvaluationPortalMapper evaluationPortalMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Map<String, Object> getPortalData(String binSection, String year, String season) {
|
|
|
|
|
|
+ public Map<String, Object> getPortalData(String binSection, String year, String season,String newyear) {
|
|
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) : newyear, 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()));
|
|
@@ -146,20 +146,27 @@ public class EvaluationPortalServiceImpl extends ServiceImpl<EvaluationPortalMap
|
|
@Override
|
|
@Override
|
|
public Map<String, String> getHomeSeason() {
|
|
public Map<String, String> getHomeSeason() {
|
|
Map<String, String> hs = new HashMap<>();
|
|
Map<String, String> hs = new HashMap<>();
|
|
- EvaluationPortal portal = null;
|
|
|
|
|
|
+ EvaluationPortal homeSeason = null;
|
|
|
|
+ EvaluationPortal homeYear = null;
|
|
try {
|
|
try {
|
|
- portal = evaluationPortalMapper.getHomeSeason();
|
|
|
|
|
|
+ homeSeason = evaluationPortalMapper.getHomeSeason();
|
|
|
|
+ homeYear = evaluationPortalMapper.getHomeYear();
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
|
|
- if(null != portal){
|
|
|
|
- hs.put("year",portal.getYear());
|
|
|
|
- hs.put("season",portal.getSeason());
|
|
|
|
|
|
+ if(null != homeYear){
|
|
|
|
+ hs.put("newyear",homeYear.getYear());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(null != homeSeason){
|
|
|
|
+ hs.put("year",homeSeason.getYear());
|
|
|
|
+ hs.put("season",homeSeason.getSeason());
|
|
}else {
|
|
}else {
|
|
hs.put("year",DateUtils.getYear(new Date())+"");
|
|
hs.put("year",DateUtils.getYear(new Date())+"");
|
|
hs.put("season",DateUtils.getSeason(new Date())+"");
|
|
hs.put("season",DateUtils.getSeason(new Date())+"");
|
|
}
|
|
}
|
|
|
|
+
|
|
return hs;
|
|
return hs;
|
|
}
|
|
}
|
|
}
|
|
}
|