123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331 |
- package com.qmth.distributed.print.api;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import com.qmth.boot.api.annotation.Aac;
- import com.qmth.boot.api.annotation.BOOL;
- import com.qmth.boot.api.constant.ApiConstant;
- import com.qmth.distributed.print.business.bean.dto.ClientExamStudentDto;
- import com.qmth.distributed.print.business.bean.dto.ClientExamTaskDto;
- import com.qmth.distributed.print.business.bean.dto.ClientPrintTaskDto;
- import com.qmth.distributed.print.business.entity.SysUser;
- import com.qmth.distributed.print.business.service.*;
- import com.qmth.distributed.print.common.util.Result;
- import com.qmth.distributed.print.common.util.ResultUtil;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- import java.util.Map;
- /**
- * @Date: 2021/4/19.
- */
- @Api(tags = "客户端Controller")
- @RestController
- @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.client}")
- @Aac(auth = BOOL.FALSE)
- public class ClientController {
- @Autowired
- private ClientService clientService;
- /**
- * 登录
- *
- * @param sysUser
- * @return
- */
- @ApiOperation(value = "登录")
- @RequestMapping(value = "/user/login", method = RequestMethod.POST)
- public Result login(@RequestBody SysUser sysUser) {
- return null;
- }
- /**
- * 试卷打样-列表
- *
- * @param schoolId 学校ID
- * @param machineCode 机器唯一码
- * @param orgId 机构ID
- * @param printPlanId 印刷计划ID
- * @param courseCode 课程代码
- * @param paperNumber 试卷编号
- * @param isTry 是否打样
- * @param isPass 是否合格
- * @param pageNumber
- * @param pageSize
- * @return
- */
- @ApiOperation(value = "试卷打样-列表")
- @RequestMapping(value = "/paper_try/list", method = RequestMethod.POST)
- public Result paperTryList(@RequestParam("schoolId") Long schoolId,
- @RequestParam("machineCode") String machineCode,
- @RequestParam("orgId") Long orgId,
- @RequestParam(value = "printPlanId", required = false) Long printPlanId,
- @RequestParam(value = "courseCode", required = false) String courseCode,
- @RequestParam(value = "paperNumber", required = false) String paperNumber,
- @RequestParam(value = "isTry", required = false) Boolean isTry,
- @RequestParam(value = "isPass", required = false) Boolean isPass,
- @RequestParam("pageNumber") Integer pageNumber,
- @RequestParam("pageSize") Integer pageSize) {
- IPage<ClientExamTaskDto> examTasks = clientService.listTryTask(schoolId, machineCode, orgId, printPlanId, courseCode, paperNumber, isTry, isPass, pageNumber, pageSize);
- return ResultUtil.ok(examTasks);
- }
- /**
- * 试卷打样-查看/试印/重印
- *
- * @param schoolId
- * @param examTaskId
- * @return
- */
- @ApiOperation(value = "试卷打样-查看/试印/重印")
- @RequestMapping(value = "/paper_try/print", method = RequestMethod.POST)
- public Result paperTryPrint(@RequestParam("schoolId") Long schoolId,
- @RequestParam("examTaskId") Long examTaskId) {
- String url = clientService.getUrl(schoolId, examTaskId);
- return ResultUtil.ok(url);
- }
- /**
- * 试卷打样-标记合格状态
- *
- * @param schoolId
- * @param examTaskId
- * @param machineCode
- * @param isPass
- * @param userId
- * @return
- */
- @ApiOperation(value = "试卷打样-标记合格状态")
- @RequestMapping(value = "/paper_try/tag_pass", method = RequestMethod.POST)
- public Result paperTryTagPass(@RequestParam("schoolId") Long schoolId,
- @RequestParam("examTaskId") Long examTaskId,
- @RequestParam("machineCode") String machineCode,
- @RequestParam("isPass") Boolean isPass,
- @RequestParam("userId") Long userId) {
- Boolean isSuccess = clientService.tagPass(schoolId, examTaskId, machineCode, isPass, userId);
- return ResultUtil.ok(isSuccess);
- }
- /**
- * 印刷管理-查询列表
- *
- * @param schoolId
- * @param machineCode
- * @param orgId
- * @param printPlanId
- * @param status
- * @param courseCode
- * @param paperNumber
- * @param examPlace
- * @param examRoom
- * @param examStartTime
- * @param examEndTime
- * @param isDownload
- * @param validate
- * @param pageNumber
- * @param pageSize
- * @return
- */
- @ApiOperation(value = "印刷管理-查询列表")
- @RequestMapping(value = "/print/task_list", method = RequestMethod.POST)
- public Result printTaskList(@RequestParam("schoolId") Long schoolId,
- @RequestParam("machineCode") Long machineCode,
- @RequestParam("orgId") String orgId,
- @RequestParam(value = "printPlanId", required = false) String printPlanId,
- @RequestParam(value = "status", required = false) String status,
- @RequestParam(value = "courseCode", required = false) String courseCode,
- @RequestParam(value = "paperNumber", required = false) String paperNumber,
- @RequestParam(value = "examPlace", required = false) String examPlace,
- @RequestParam(value = "examRoom", required = false) String examRoom,
- @RequestParam(value = "examStartTime", required = false) Long examStartTime,
- @RequestParam(value = "examEndTime", required = false) Long examEndTime,
- @RequestParam(value = "isDownload", required = false) Boolean isDownload,
- @RequestParam(value = "validate", required = false) Boolean validate,
- @RequestParam("pageNumber") Integer pageNumber,
- @RequestParam("pageSize") Integer pageSize) {
- IPage<ClientPrintTaskDto> printTaskDtoIPage = clientService.listClientPrintTask(schoolId, machineCode, orgId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, isDownload, validate, pageNumber, pageSize);
- return ResultUtil.ok(printTaskDtoIPage);
- }
- /**
- * 印刷管理-汇总数据查询
- *
- * @param schoolId
- * @param machineCode
- * @param orgId
- * @param printPlanId
- * @param status
- * @param courseCode
- * @param paperNumber
- * @param examPlace
- * @param examRoom
- * @param examStartTime
- * @param examEndTime
- * @param isDownload
- * @param validate
- * @return
- */
- @ApiOperation(value = "印刷管理-汇总数据查询")
- @RequestMapping(value = "/print/task_total_data", method = RequestMethod.POST)
- public Result printTaskTotalData(@RequestParam("schoolId") Long schoolId,
- @RequestParam("machineCode") Long machineCode,
- @RequestParam("orgId") String orgId,
- @RequestParam(value = "printPlanId", required = false) String printPlanId,
- @RequestParam(value = "status", required = false) String status,
- @RequestParam(value = "courseCode", required = false) String courseCode,
- @RequestParam(value = "paperNumber", required = false) String paperNumber,
- @RequestParam(value = "examPlace", required = false) String examPlace,
- @RequestParam(value = "examRoom", required = false) String examRoom,
- @RequestParam(value = "examStartTime", required = false) Long examStartTime,
- @RequestParam(value = "examEndTime", required = false) Long examEndTime,
- @RequestParam(value = "isDownload", required = false) Boolean isDownload,
- @RequestParam(value = "validate", required = false) Boolean validate) {
- return null;
- }
- /**
- * 印刷管理-查看
- *
- * @param schoolId
- * @param orgId
- * @param examDetailId
- * @return
- */
- @ApiOperation(value = "印刷管理-查看")
- @RequestMapping(value = "/print/preview", method = RequestMethod.POST)
- public Result printPreview(@RequestParam("schoolId") Long schoolId,
- @RequestParam("orgId") Long orgId,
- @RequestParam("examDetailId") Long examDetailId) {
- return null;
- }
- /**
- * 印刷管理-印刷/缓存数据
- *
- * @param schoolId
- * @param examDetailId
- * @param machineCode
- * @param isForceTry
- * @param printUser
- * @return
- */
- @ApiOperation(value = "印刷管理-印刷/缓存数据")
- @RequestMapping(value = "/print/get_print_data", method = RequestMethod.POST)
- public Result printGetPrintData(@RequestParam("schoolId") Long schoolId,
- @RequestParam("examDetailId") Long examDetailId,
- @RequestParam("machineCode") String machineCode,
- @RequestParam("isForceTry") Boolean isForceTry,
- @RequestParam(value = "printUser", required = false) String printUser) {
- Map<String, Object> map = clientService.getPrintData(schoolId, examDetailId, machineCode, isForceTry, printUser);
- return ResultUtil.ok(map);
- }
- /**
- * 印刷管理-批量缓存数据
- *
- * @param schoolId
- * @param orgId
- * @param examDetailId
- * @param machineCode
- * @return
- */
- @ApiOperation(value = "印刷管理-批量缓存数据")
- @RequestMapping(value = "/print/get_print_data_batch", method = RequestMethod.POST)
- public Result printGetPrintDataBatch(@RequestParam("schoolId") Long schoolId,
- @RequestParam("orgId") Long orgId,
- @RequestParam("examDetailId") Long examDetailId,
- @RequestParam("machineCode") String machineCode) {
- return null;
- }
- /**
- * 印刷管理-校验
- *
- * @param schoolId
- * @param orgId
- * @param examDetailId
- * @param machineCode
- * @param packageCode
- * @param lastCode
- * @return
- */
- @ApiOperation(value = "印刷管理-校验")
- @RequestMapping(value = "/print/data_check", method = RequestMethod.POST)
- public Result dataCheck(@RequestParam("schoolId") Long schoolId,
- @RequestParam("orgId") Long orgId,
- @RequestParam("examDetailId") Long examDetailId,
- @RequestParam("machineCode") String machineCode,
- @RequestParam("packageCode") String packageCode,
- @RequestParam("lastCode") String lastCode) {
- return null;
- }
- /**
- * 印刷管理-更新打印进度
- *
- * @param schoolId
- * @param examDetailId
- * @param printProgress
- * @return
- */
- @ApiOperation(value = "印刷管理-更新打印进度")
- @RequestMapping(value = "/print/update_progress", method = RequestMethod.POST)
- public Result updateProgress(@RequestParam("schoolId") Long schoolId,
- @RequestParam("examDetailId") Long examDetailId,
- @RequestParam("printProgress") Integer printProgress) {
- Boolean isSuccess = clientService.updatePrintProgress(schoolId, examDetailId, printProgress);
- return ResultUtil.ok(isSuccess);
- }
- /**
- * 重打-查询考生列表
- *
- * @param schoolId
- * @param examDetailId
- * @param ticketNumber
- * @param studentName
- * @param courseCode
- * @return
- */
- @ApiOperation(value = "重打-查询考生列表")
- @RequestMapping(value = "/print/list_student", method = RequestMethod.POST)
- public Result listStudent(@RequestParam("schoolId") Long schoolId,
- @RequestParam("examDetailId") Long examDetailId,
- @RequestParam(value = "ticketNumber", required = false) String ticketNumber,
- @RequestParam(value = "studentName", required = false) String studentName,
- @RequestParam(value = "courseCode", required = false) String courseCode,
- @RequestParam("pageNumber") Integer pageNumber,
- @RequestParam("pageSize") Integer pageSize) {
- IPage<ClientExamStudentDto> examStudentDtoIPage = clientService.listStudent(schoolId, examDetailId, ticketNumber, studentName, courseCode, pageNumber, pageSize);
- return ResultUtil.ok(examStudentDtoIPage);
- }
- /**
- * 重打-内容查询
- *
- * @param schoolId
- * @param examDetailId
- * @param ticketNumber
- * @param type
- * @return
- */
- @ApiOperation(value = "重打-内容查询")
- @RequestMapping(value = "/print/get_reprint_data", method = RequestMethod.POST)
- public Result getReprintData(@RequestParam("schoolId") Long schoolId,
- @RequestParam("examDetailId") Long examDetailId,
- @RequestParam("ticketNumber") String ticketNumber,
- @RequestParam("type") String type) {
- Map<String, Object> map = clientService.getReprintData(schoolId, examDetailId, ticketNumber, type);
- return ResultUtil.ok(map);
- }
- }
|