|
@@ -7,9 +7,14 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.core.print.controller;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
|
+import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
|
+import cn.com.qmth.examcloud.core.print.service.PrintingProjectStatisticService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
@@ -19,10 +24,24 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
*/
|
|
|
@Controller
|
|
|
public class IndexController {
|
|
|
+ @Autowired
|
|
|
+ private CourseStatisticService courseStatisticService;
|
|
|
+ @Autowired
|
|
|
+ private PrintingProjectService printingProjectService;
|
|
|
+ @Autowired
|
|
|
+ private PrintingProjectStatisticService printingProjectStatisticService;
|
|
|
|
|
|
@RequestMapping(value = "/", method = RequestMethod.GET)
|
|
|
public String index(HttpServletRequest request) throws Exception {
|
|
|
return "redirect:/doc.html";
|
|
|
}
|
|
|
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "/init", method = RequestMethod.GET)
|
|
|
+ public void init() {
|
|
|
+ printingProjectService.initAllPrintingProject();
|
|
|
+ courseStatisticService.initAllCourseStatistic();
|
|
|
+ printingProjectStatisticService.initAllPrintingProjectStatistic();
|
|
|
+ }
|
|
|
+
|
|
|
}
|