|
|
|
@ -503,6 +503,81 @@ public class SeCourseController extends JeecgController<SeCourse, ISeCourseServi |
|
|
|
|
return Result.OK(sc); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* CMS根据开课学期查询 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "CMS根据开课学期查询") |
|
|
|
|
@ApiOperation(value="CMS根据开课学期查询", notes="CMS根据开课学期查询") |
|
|
|
|
@GetMapping(value = "/queryByYear") |
|
|
|
|
public Result<?> queryByYear() { |
|
|
|
|
List<SeCourse> list = seCourseService.list(); |
|
|
|
|
//int xhcs = list.size() / 8 + (list.size() % 8 == 0 ? 0 : 1);
|
|
|
|
|
List<Map<String,String>> listmap1 = new ArrayList<>(); |
|
|
|
|
//for(int k = 0 ; k<xhcs;k++){
|
|
|
|
|
while (list.size()!=0){ |
|
|
|
|
//List<Map<String,String>> listmap = new ArrayList<>();
|
|
|
|
|
Map<String,String> map = new HashMap<String,String>(); |
|
|
|
|
Map<String,String> map2 = new HashMap<String,String>(); |
|
|
|
|
List<SeCourse> delelist = new ArrayList<>(); |
|
|
|
|
for(int i = 0 ; i < list.size() ; i++){ |
|
|
|
|
Map<String,String> map1 = new HashMap<String,String>(); |
|
|
|
|
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") |
|
|
|
|