|
@@ -1,6 +1,8 @@
|
|
|
package com.ssj.api.controller;
|
|
package com.ssj.api.controller;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.ssj.api.domain.vo.statistics.HomeworkReq;
|
|
|
|
|
+import com.ssj.api.domain.vo.statistics.ListReq;
|
|
|
import com.ssj.api.domain.vo.teacher.TeacherAddReq;
|
|
import com.ssj.api.domain.vo.teacher.TeacherAddReq;
|
|
|
import com.ssj.api.domain.vo.teacher.TeacherChangeReq;
|
|
import com.ssj.api.domain.vo.teacher.TeacherChangeReq;
|
|
|
import com.ssj.api.domain.vo.teacher.TeacherDelReq;
|
|
import com.ssj.api.domain.vo.teacher.TeacherDelReq;
|
|
@@ -9,12 +11,14 @@ import com.ssj.bean.sys.imlibuser.TbClassTeacherTemp;
|
|
|
import com.ssj.bean.weixin.libmy.domain.TbLibManager;
|
|
import com.ssj.bean.weixin.libmy.domain.TbLibManager;
|
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
|
import com.ssj.framework.core.util.Constant;
|
|
import com.ssj.framework.core.util.Constant;
|
|
|
|
|
+import com.ssj.framework.core.util.PasswordUtil;
|
|
|
import com.ssj.framework.core.util.ResponseConstant;
|
|
import com.ssj.framework.core.util.ResponseConstant;
|
|
|
import com.ssj.framework.core.util.ResponseEntity;
|
|
import com.ssj.framework.core.util.ResponseEntity;
|
|
|
import com.ssj.service.sys.homework.service.HomeworkPictureService;
|
|
import com.ssj.service.sys.homework.service.HomeworkPictureService;
|
|
|
import com.ssj.service.sys.imlibuser.service.TbClassTeacherTempService;
|
|
import com.ssj.service.sys.imlibuser.service.TbClassTeacherTempService;
|
|
|
import com.ssj.service.weixin.library.service.IBookManagerService;
|
|
import com.ssj.service.weixin.library.service.IBookManagerService;
|
|
|
import com.ssj.service.weixin.user.service.UserService;
|
|
import com.ssj.service.weixin.user.service.UserService;
|
|
|
|
|
+import com.ssj.statistics.service.IStatisticsService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -38,7 +42,7 @@ public class ApiManagerTeacherController extends BaseController {
|
|
|
private TbClassTeacherTempService tbLibImTeacherTempService;
|
|
private TbClassTeacherTempService tbLibImTeacherTempService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private UserService userService;
|
|
|
|
|
|
|
+ private IStatisticsService statisticsService;
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
@@ -190,4 +194,71 @@ public class ApiManagerTeacherController extends BaseController {
|
|
|
return responseEntity;
|
|
return responseEntity;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @RequestMapping(value = "/statisticsList", method = RequestMethod.POST)
|
|
|
|
|
+ @ApiOperation(value = "数据统计列表", notes = "数据统计列表")
|
|
|
|
|
+ public ResponseEntity statisticsList(@RequestParam(name = "accessToken") String accessToken,@RequestBody ListReq req) {
|
|
|
|
|
+ ResponseEntity responseEntity = new ResponseEntity();
|
|
|
|
|
+ Map<String,Object> data=new HashMap<>(2);
|
|
|
|
|
+ Map<String,Object> params=new HashMap<>(2);
|
|
|
|
|
+ try {
|
|
|
|
|
+ params.put("beginDate",req.getBeginDate());
|
|
|
|
|
+ params.put("endDate",req.getEndDate());
|
|
|
|
|
+ params.put("teacherName",req.getTeacherName());
|
|
|
|
|
+ Map<String,Object> total = statisticsService.findTotalData(params);
|
|
|
|
|
+ Page<Map<String,Object>> page = statisticsService.statisticsList(params,initPage(req.getPageNo(),req.getPageSize()));
|
|
|
|
|
+ data.put("list",page.getContent());
|
|
|
|
|
+ data.put("pages",page.getTotalElements());
|
|
|
|
|
+ responseEntity.success(data,"获取数据统计列表成功");
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("数据统计列表异常", e);
|
|
|
|
|
+ responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
|
|
|
|
|
+ }
|
|
|
|
|
+ return responseEntity;
|
|
|
|
|
+ }
|
|
|
|
|
+ @RequestMapping(value = "/errorList", method = RequestMethod.POST)
|
|
|
|
|
+ @ApiOperation(value = "查看报错列表", notes = "数据统计列表")
|
|
|
|
|
+ public ResponseEntity errorList(@RequestParam(name = "accessToken") String accessToken,@RequestBody ListReq req) {
|
|
|
|
|
+ ResponseEntity responseEntity = new ResponseEntity();
|
|
|
|
|
+ Map<String,Object> params=new HashMap<>(4);
|
|
|
|
|
+ try {
|
|
|
|
|
+ params.put("beginDate",req.getBeginDate());
|
|
|
|
|
+ params.put("endDate",req.getEndDate());
|
|
|
|
|
+ params.put("teacherId",req.getTeacherId());
|
|
|
|
|
+ params.put("subject",req.getSubject());
|
|
|
|
|
+ Map<String,Object> data = statisticsService.errorList(params,initPage(req.getPageNo(),req.getPageSize()));
|
|
|
|
|
+ responseEntity.success(data,"获取数据统计列表成功");
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("数据统计列表异常", e);
|
|
|
|
|
+ responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
|
|
|
|
|
+ }
|
|
|
|
|
+ return responseEntity;
|
|
|
|
|
+ }
|
|
|
|
|
+ @RequestMapping(value = "/checkDetailList", method = RequestMethod.POST)
|
|
|
|
|
+ @ApiOperation(value = "获取作业列表", notes = "获取作业列表")
|
|
|
|
|
+ public ResponseEntity checkDetailList(@RequestParam(name = "accessToken") String accessToken,@RequestBody HomeworkReq req) {
|
|
|
|
|
+ ResponseEntity responseEntity = new ResponseEntity();
|
|
|
|
|
+ try {
|
|
|
|
|
+ Map<String,Object> data=new HashMap<>(2);
|
|
|
|
|
+ List<Map<String,Object>> list = statisticsService.checkDetailList(req.getHomeworkId());
|
|
|
|
|
+ data.put("list",list);
|
|
|
|
|
+ responseEntity.success(data,"获取数据统计列表成功");
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("数据统计列表异常", e);
|
|
|
|
|
+ responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
|
|
|
|
|
+ }
|
|
|
|
|
+ return responseEntity;
|
|
|
|
|
+ }
|
|
|
|
|
+ @RequestMapping(value = "/pictureDetail", method = RequestMethod.POST)
|
|
|
|
|
+ @ApiOperation(value = "作业批改痕迹", notes = "作业批改痕迹")
|
|
|
|
|
+ public ResponseEntity pictureDetail(@RequestParam(name = "accessToken") String accessToken,@RequestBody HomeworkReq req) {
|
|
|
|
|
+ ResponseEntity responseEntity = new ResponseEntity();
|
|
|
|
|
+ Map<String,Object> params=new HashMap<>(4);
|
|
|
|
|
+ try {
|
|
|
|
|
+
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("数据统计列表异常", e);
|
|
|
|
|
+ responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
|
|
|
|
|
+ }
|
|
|
|
|
+ return responseEntity;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|