From adbaebc33c2208fd81a3426e245ec7642f4c28d8 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 8 Oct 2023 15:59:36 +0800 Subject: [PATCH] =?UTF-8?q?cms=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../course/controller/SeCourseController.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/controller/SeCourseController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/controller/SeCourseController.java index 7d83fb5..fc741bc 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/controller/SeCourseController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/controller/SeCourseController.java @@ -503,6 +503,81 @@ public class SeCourseController extends JeecgController queryByYear() { + List list = seCourseService.list(); + //int xhcs = list.size() / 8 + (list.size() % 8 == 0 ? 0 : 1); + List> listmap1 = new ArrayList<>(); + //for(int k = 0 ; k> listmap = new ArrayList<>(); + Map map = new HashMap(); + Map map2 = new HashMap(); + List delelist = new ArrayList<>(); + for(int i = 0 ; i < list.size() ; i++){ + Map map1 = new HashMap(); + if(list.get(i).getYear()==1&&!map.containsKey("one")){ + map.put("one",list.get(i).getName()); + map1.put("one",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==2&&!map.containsKey("two")){ + map.put("two",list.get(i).getName()); + map1.put("two",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==3&&!map.containsKey("three")){ + map.put("three",list.get(i).getName()); + map1.put("three",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==4&&!map.containsKey("four")){ + map.put("four",list.get(i).getName()); + map1.put("four",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==5&&!map.containsKey("five")){ + map.put("five",list.get(i).getName()); + map1.put("five",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==6&&!map.containsKey("six")){ + map.put("six",list.get(i).getName()); + map1.put("six",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==7&&!map.containsKey("seven")){ + map.put("seven",list.get(i).getName()); + map1.put("seven",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else if(list.get(i).getYear()==8&&!map.containsKey("eight")){ + map.put("eight",list.get(i).getName()); + map1.put("eight",list.get(i).getName()); + delelist.add(list.get(i)); + //list.remove(i); + }else{ + + } + if(map1.size()!=0){ + map2.putAll(map1); + } + } + list.removeAll(delelist); + listmap1.add(map2); + //} + } + + return Result.OK(listmap1); + } + @AutoLog(value = "当前登录用户信息") @ApiOperation(value = "当前登录用户信息", notes = "当前登录用户信息") @GetMapping(value = "/dqyh")