|
@@ -5,6 +5,7 @@ import com.miaxis.common.constant.Constants;
|
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
|
import com.miaxis.common.core.domain.Response;
|
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
+import com.miaxis.order.vo.QuerySchoolOrderListVo;
|
|
|
import com.miaxis.tms.dto.*;
|
|
|
import com.miaxis.tms.service.ITmsStudentInfoService;
|
|
|
import com.miaxis.tms.vo.*;
|
|
@@ -18,7 +19,9 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -119,34 +122,63 @@ public class TmsStudentInfoController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * 根据驾校ID查询当日报名情况
|
|
|
+ * 根据驾校ID 报名统计
|
|
|
*/
|
|
|
- @GetMapping("/getDayStuCountBySchoolId")
|
|
|
- @ApiOperation("根据ID获取学员员详细信息")
|
|
|
- public Response<TmsBmCountVo> getDayStuCountBySchoolId(TmsBmDayDTO bmDayDTO) {
|
|
|
- return Response.success(studentInfoService.getDayStuCountBySchoolId(bmDayDTO));
|
|
|
+ @GetMapping("/getStatisticsStuCountBySchoolId")
|
|
|
+ @ApiOperation("根据驾校ID 报名统计")
|
|
|
+ public Response<TmsBmVo> getStatisticsStuCountBySchoolId(TmsBmDTO bmDTO) {
|
|
|
+ return Response.success(studentInfoService.getStatisticsStuCountBySchoolId(bmDTO));
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 根据驾校ID查询当月报名情况
|
|
|
+ * 根据驾校ID查询学员每日报名数
|
|
|
*/
|
|
|
- @GetMapping("/getMonthStuCountBySchoolId")
|
|
|
- @ApiOperation("根据驾校ID查询当月报名情况")
|
|
|
- public Response<TmsBmCountVo> getMonthStuCountBySchoolId(TmsBmMonthDTO bmMonthDTO) {
|
|
|
- return Response.success(studentInfoService.getMonthStuCountBySchoolId(bmMonthDTO));
|
|
|
+ @GetMapping("/getEveryDayStuCountBySchoolId")
|
|
|
+ @ApiOperation("根据驾校ID查询学员每日报名数")
|
|
|
+ public ResponsePageInfo getEveryDayStuCountBySchoolId(@ModelAttribute TmsBmDayListDTO dayListDTO) {
|
|
|
+ List<TmsBmCountVo> list = studentInfoService.getEveryDayStuCountBySchoolId(dayListDTO);
|
|
|
+ ResponsePageInfo<TmsBmCountVo> reusltList = toResponsePageInfo(list);
|
|
|
+ Map<String,Integer> map = new HashMap<String,Integer>();
|
|
|
+ int total = list.stream().mapToInt(TmsBmCountVo::getStuCount).sum();
|
|
|
+ map.put("total",total);
|
|
|
+ reusltList.setData(map);
|
|
|
+ return reusltList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据驾校ID查询当年报名情况
|
|
|
+ * 根据驾校ID查询学员每月报名数
|
|
|
*/
|
|
|
- @GetMapping("/getYearStuCountBySchoolId")
|
|
|
- @ApiOperation("根据驾校ID查询当年报名情况")
|
|
|
- public Response<TmsBmCountVo> getYearStuCountBySchoolId(TmsBmMonthDTO bmMonthDTO) {
|
|
|
- return Response.success(studentInfoService.getYearStuCountBySchoolId(bmMonthDTO));
|
|
|
+ @GetMapping("/getEveryMonthStuCountBySchoolId")
|
|
|
+ @ApiOperation("根据驾校ID查询学员每月报名数")
|
|
|
+ public ResponsePageInfo getEveryMonthStuCountBySchoolId(@ModelAttribute TmsBmMonthListDTO monthListDTO) {
|
|
|
+ List<TmsBmCountVo> list = studentInfoService.getEveryMonthStuCountBySchoolId(monthListDTO);
|
|
|
+ ResponsePageInfo<TmsBmCountVo> reusltList = toResponsePageInfo(list);
|
|
|
+ Map<String,Integer> map = new HashMap<String,Integer>();
|
|
|
+ int total = list.stream().mapToInt(TmsBmCountVo::getStuCount).sum();
|
|
|
+ map.put("total",total);
|
|
|
+ reusltList.setData(map);
|
|
|
+ return reusltList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据驾校ID查询学员每年报名数
|
|
|
+ */
|
|
|
+ @GetMapping("/getEveryYearStuCountBySchoolId")
|
|
|
+ @ApiOperation("根据驾校ID查询学员每年报名数")
|
|
|
+ public ResponsePageInfo getEveryYearStuCountBySchoolId(@ModelAttribute TmsBmYearListDTO yearListDTO) {
|
|
|
+ List<TmsBmCountVo> list = studentInfoService.getEveryYearStuCountBySchoolId(yearListDTO);
|
|
|
+ ResponsePageInfo<TmsBmCountVo> reusltList = toResponsePageInfo(list);
|
|
|
+ Map<String,Integer> map = new HashMap<String,Integer>();
|
|
|
+ int total = list.stream().mapToInt(TmsBmCountVo::getStuCount).sum();
|
|
|
+ map.put("total",total);
|
|
|
+ reusltList.setData(map);
|
|
|
+ return reusltList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|