|
@@ -1,9 +1,17 @@
|
|
package com.ims.eval.api;
|
|
package com.ims.eval.api;
|
|
|
|
|
|
|
|
+import com.ims.eval.entity.dto.result.R;
|
|
|
|
+import com.ims.eval.service.IEvaluationPortalService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.util.Calendar;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @author hlf
|
|
* @author hlf
|
|
* @date 2023/7/12 10:58
|
|
* @date 2023/7/12 10:58
|
|
@@ -11,22 +19,28 @@ import org.springframework.web.bind.annotation.RestController;
|
|
*/
|
|
*/
|
|
@Slf4j
|
|
@Slf4j
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping("//evaluation-api-home")
|
|
|
|
|
|
+@RequestMapping("//evaluation-app-home")
|
|
public class HomeController {
|
|
public class HomeController {
|
|
|
|
|
|
- /*@GetMapping(value = "list")
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IEvaluationPortalService portalService;
|
|
|
|
+
|
|
|
|
+ @GetMapping(value = "list")
|
|
public R listAll(String binSection, String year, String season) {
|
|
public R listAll(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);
|
|
|
|
+ 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>>> seasonMap = seasonList.stream().collect(Collectors.groupingBy(e -> e.get("bin_section"), Collectors.toList()));
|
|
|
|
+ map.put("year", yearMap);
|
|
|
|
+ map.put("season", seasonMap);*/
|
|
|
|
+ } catch (Exception e){
|
|
|
|
+ log.error(e.getMessage());
|
|
|
|
+ }
|
|
Map<String, Object> data = portalService.getPortalData(binSection, year, season);
|
|
Map<String, Object> data = portalService.getPortalData(binSection, year, season);
|
|
return R.ok().data(data);
|
|
return R.ok().data(data);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- @GetMapping(value = "listPage")
|
|
|
|
- public R listpage(String binSection, String year, String season) {
|
|
|
|
- Map<String, Object> data = portalService.getPortalData(binSection, year, season);
|
|
|
|
-
|
|
|
|
- IPage<EvaluationPortal> list = portalService.listPage(binSection, year, season);
|
|
|
|
- return R.ok().data(data);
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
}
|
|
}
|