|
@@ -5,29 +5,20 @@ 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.boot.core.enums.Platform;
|
|
|
-import com.qmth.boot.tools.signature.SignatureType;
|
|
|
import com.qmth.distributed.print.business.bean.auth.AuthBean;
|
|
|
-import com.qmth.distributed.print.business.bean.auth.ExpireTimeBean;
|
|
|
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.bean.params.ClientLoginParam;
|
|
|
import com.qmth.distributed.print.business.bean.result.LoginResult;
|
|
|
import com.qmth.distributed.print.business.entity.SysUser;
|
|
|
-import com.qmth.distributed.print.business.entity.TBSession;
|
|
|
import com.qmth.distributed.print.business.enums.RoleTypeEnum;
|
|
|
-import com.qmth.distributed.print.business.service.*;
|
|
|
-import com.qmth.distributed.print.business.util.AuthUtil;
|
|
|
-import com.qmth.distributed.print.business.util.ExcelUtil;
|
|
|
-import com.qmth.distributed.print.business.util.RedisUtil;
|
|
|
-import com.qmth.distributed.print.business.util.ServletUtil;
|
|
|
-import com.qmth.distributed.print.common.SignatureEntityTest;
|
|
|
-import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
|
+import com.qmth.distributed.print.business.service.ClientService;
|
|
|
+import com.qmth.distributed.print.business.service.CommonService;
|
|
|
+import com.qmth.distributed.print.business.service.SysUserService;
|
|
|
import com.qmth.distributed.print.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.distributed.print.common.util.Result;
|
|
|
import com.qmth.distributed.print.common.util.ResultUtil;
|
|
|
-import com.qmth.distributed.print.common.util.SessionUtil;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
@@ -95,7 +86,6 @@ public class ClientController {
|
|
|
/**
|
|
|
* 试卷打样-列表
|
|
|
*
|
|
|
- * @param schoolId 学校ID
|
|
|
* @param machineCode 机器唯一码
|
|
|
* @param orgId 机构ID
|
|
|
* @param printPlanId 印刷计划ID
|
|
@@ -109,8 +99,7 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "试卷打样-列表")
|
|
|
@RequestMapping(value = "/paper_try/list", method = RequestMethod.POST)
|
|
|
- public Result paperTryList(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("machineCode") String machineCode,
|
|
|
+ public Result paperTryList(@RequestParam("machineCode") String machineCode,
|
|
|
@RequestParam("orgId") Long orgId,
|
|
|
@RequestParam(value = "printPlanId", required = false) Long printPlanId,
|
|
|
@RequestParam(value = "courseCode", required = false) String courseCode,
|
|
@@ -119,29 +108,26 @@ public class ClientController {
|
|
|
@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);
|
|
|
+ IPage<ClientExamTaskDto> examTasks = clientService.listTryTask(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) {
|
|
|
- Map<String, String> map = clientService.getUrl(schoolId, examTaskId);
|
|
|
+ public Result paperTryPrint(@RequestParam("examTaskId") Long examTaskId) {
|
|
|
+ Map<String, String> map = clientService.getUrl(examTaskId);
|
|
|
return ResultUtil.ok(map);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 试卷打样-批量试印
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param machineCode
|
|
|
* @param orgId
|
|
|
* @param printPlanId
|
|
@@ -153,22 +139,20 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "试卷打样-批量试印")
|
|
|
@RequestMapping(value = "/paper_try/print_batch", method = RequestMethod.POST)
|
|
|
- public Result printBatch(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("machineCode") String machineCode,
|
|
|
+ public Result printBatch(@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) {
|
|
|
- List<Map<String, String>> urls = clientService.getBatchUrl(schoolId, machineCode, orgId, printPlanId, courseCode, paperNumber, isTry, isPass);
|
|
|
+ List<Map<String, String>> urls = clientService.getBatchUrl(machineCode, orgId, printPlanId, courseCode, paperNumber, isTry, isPass);
|
|
|
return ResultUtil.ok(urls);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 试卷打样-标记合格状态
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param machineCode
|
|
|
* @param isPass
|
|
|
* @param userId
|
|
@@ -176,21 +160,19 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "试卷打样-标记合格状态")
|
|
|
@RequestMapping(value = "/paper_try/tag_pass", method = RequestMethod.POST)
|
|
|
- public Result paperTryTagPass(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("courseCode") String courseCode,
|
|
|
+ public Result paperTryTagPass(@RequestParam("courseCode") String courseCode,
|
|
|
@RequestParam("courseName") String courseName,
|
|
|
@RequestParam("paperNumber") String paperNumber,
|
|
|
@RequestParam("machineCode") String machineCode,
|
|
|
@RequestParam("isPass") Boolean isPass,
|
|
|
@RequestParam("userId") Long userId) {
|
|
|
- Boolean isSuccess = clientService.tagPass(schoolId, courseCode, courseName, paperNumber, machineCode, isPass, userId);
|
|
|
+ Boolean isSuccess = clientService.tagPass(courseCode, courseName, paperNumber, machineCode, isPass, userId);
|
|
|
return ResultUtil.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-查询列表
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param machineCode
|
|
|
* @param orgId
|
|
|
* @param printPlanId
|
|
@@ -209,8 +191,7 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-查询列表")
|
|
|
@RequestMapping(value = "/print/task_list", method = RequestMethod.POST)
|
|
|
- public Result printTaskList(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("machineCode") Long machineCode,
|
|
|
+ public Result printTaskList(@RequestParam("machineCode") Long machineCode,
|
|
|
@RequestParam("orgId") String orgId,
|
|
|
@RequestParam(value = "printPlanId", required = false) String printPlanId,
|
|
|
@RequestParam(value = "status", required = false) String status,
|
|
@@ -224,15 +205,15 @@ public class ClientController {
|
|
|
@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);
|
|
|
+ IPage<ClientPrintTaskDto> printTaskDtoIPage = clientService.listClientPrintTask(machineCode, orgId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, isDownload, validate, pageNumber, pageSize);
|
|
|
return ResultUtil.ok(printTaskDtoIPage);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-导出
|
|
|
+ *
|
|
|
* @param response
|
|
|
- * @param schoolId
|
|
|
* @param machineCode
|
|
|
* @param orgId
|
|
|
* @param printPlanId
|
|
@@ -250,26 +231,24 @@ public class ClientController {
|
|
|
@ApiOperation(value = "印刷管理-导出")
|
|
|
@RequestMapping(value = "/print/task_list_export", method = RequestMethod.POST)
|
|
|
public void printTaskListExport(HttpServletResponse response,
|
|
|
- @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) throws Exception {
|
|
|
- clientService.exportClientPrintTask(response, schoolId, machineCode, orgId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, isDownload, validate);
|
|
|
+ @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) throws Exception {
|
|
|
+ clientService.exportClientPrintTask(response, machineCode, orgId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, isDownload, validate);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-汇总数据查询
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param machineCode
|
|
|
* @param orgId
|
|
|
* @param printPlanId
|
|
@@ -286,8 +265,7 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-汇总数据查询")
|
|
|
@RequestMapping(value = "/print/task_total_data", method = RequestMethod.POST)
|
|
|
- public Result printTaskTotalData(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("machineCode") Long machineCode,
|
|
|
+ public Result printTaskTotalData(@RequestParam("machineCode") Long machineCode,
|
|
|
@RequestParam("orgId") String orgId,
|
|
|
@RequestParam(value = "printPlanId", required = false) String printPlanId,
|
|
|
@RequestParam(value = "status", required = false) String status,
|
|
@@ -307,22 +285,19 @@ public class ClientController {
|
|
|
/**
|
|
|
* 印刷管理-查看
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param examDetailId
|
|
|
* @return
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-查看")
|
|
|
@RequestMapping(value = "/print/preview", method = RequestMethod.POST)
|
|
|
- public Result printPreview(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("examDetailId") Long examDetailId) {
|
|
|
- Map<String, String> map = clientService.getUrlByExamDetailId(schoolId, examDetailId);
|
|
|
+ public Result printPreview(@RequestParam("examDetailId") Long examDetailId) {
|
|
|
+ Map<String, String> map = clientService.getUrlByExamDetailId(examDetailId);
|
|
|
return ResultUtil.ok(map);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-印刷/缓存数据
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param examDetailId
|
|
|
* @param machineCode
|
|
|
* @param printUser
|
|
@@ -330,27 +305,24 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-印刷/缓存数据")
|
|
|
@RequestMapping(value = "/print/get_print_data", method = RequestMethod.POST)
|
|
|
- public Result printGetPrintData(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("examDetailId") Long examDetailId,
|
|
|
+ public Result printGetPrintData(@RequestParam("examDetailId") Long examDetailId,
|
|
|
@RequestParam("machineCode") String machineCode,
|
|
|
@RequestParam("isPrint") Boolean isPrint,
|
|
|
@RequestParam(value = "printUser", required = false) String printUser) {
|
|
|
- Map<String, Object> map = clientService.getPrintData(schoolId, examDetailId, machineCode, isPrint, printUser);
|
|
|
+ Map<String, Object> map = clientService.getPrintData(examDetailId, machineCode, isPrint, printUser);
|
|
|
return ResultUtil.ok(map);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-批量缓存数据
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param orgId
|
|
|
* @param machineCode
|
|
|
* @return
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-批量缓存数据")
|
|
|
@RequestMapping(value = "/print/get_print_data_batch", method = RequestMethod.POST)
|
|
|
- public Result printGetPrintDataBatch(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("machineCode") Long machineCode,
|
|
|
+ public Result printGetPrintDataBatch(@RequestParam("machineCode") Long machineCode,
|
|
|
@RequestParam("orgId") String orgId,
|
|
|
@RequestParam(value = "printPlanId", required = false) String printPlanId,
|
|
|
@RequestParam(value = "status", required = false) String status,
|
|
@@ -362,12 +334,11 @@ public class ClientController {
|
|
|
@RequestParam(value = "examEndTime", required = false) Long examEndTime,
|
|
|
@RequestParam(value = "isDownload", required = false) Boolean isDownload,
|
|
|
@RequestParam(value = "validate", required = false) Boolean validate) {
|
|
|
- List<Map<String, Object>> list = clientService.getPrintDataBatch(schoolId, machineCode, orgId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, isDownload, validate);
|
|
|
+ List<Map<String, Object>> list = clientService.getPrintDataBatch(machineCode, orgId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, isDownload, validate);
|
|
|
return ResultUtil.ok(list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param schoolId
|
|
|
* @param examDetailId
|
|
|
* @param machineCode
|
|
|
* @param isDownload
|
|
@@ -375,18 +346,16 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-缓存后更新状态")
|
|
|
@RequestMapping(value = "/print/update_download", method = RequestMethod.POST)
|
|
|
- public Result updateDownload(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("examDetailId") Long examDetailId,
|
|
|
+ public Result updateDownload(@RequestParam("examDetailId") Long examDetailId,
|
|
|
@RequestParam("machineCode") String machineCode,
|
|
|
@RequestParam("isDownload") Boolean isDownload) {
|
|
|
- Boolean isSuccess = clientService.updateDownload(schoolId, examDetailId, machineCode, isDownload);
|
|
|
+ Boolean isSuccess = clientService.updateDownload(examDetailId, machineCode, isDownload);
|
|
|
return ResultUtil.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-校验
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param examDetailId
|
|
|
* @param packageCode
|
|
|
* @param lastCode
|
|
@@ -394,35 +363,31 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "印刷管理-校验")
|
|
|
@RequestMapping(value = "/print/validate_data", method = RequestMethod.POST)
|
|
|
- public Result dataCheck(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("examDetailId") Long examDetailId,
|
|
|
+ public Result dataCheck(@RequestParam("examDetailId") Long examDetailId,
|
|
|
@RequestParam("packageCode") String packageCode,
|
|
|
@RequestParam("lastCode") String lastCode) {
|
|
|
- Boolean isSuccess = clientService.validateData(schoolId, examDetailId, packageCode, lastCode);
|
|
|
+ Boolean isSuccess = clientService.validateData(examDetailId, packageCode, lastCode);
|
|
|
return ResultUtil.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 印刷管理-更新打印进度
|
|
|
*
|
|
|
- * @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,
|
|
|
+ public Result updateProgress(@RequestParam("examDetailId") Long examDetailId,
|
|
|
@RequestParam("printProgress") Integer printProgress) {
|
|
|
- Boolean isSuccess = clientService.updatePrintProgress(schoolId, examDetailId, printProgress);
|
|
|
+ Boolean isSuccess = clientService.updatePrintProgress(examDetailId, printProgress);
|
|
|
return ResultUtil.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 重打-查询考生列表
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param examDetailId
|
|
|
* @param ticketNumber
|
|
|
* @param studentName
|
|
@@ -431,21 +396,19 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "重打-查询考生列表")
|
|
|
@RequestMapping(value = "/print/list_student", method = RequestMethod.POST)
|
|
|
- public Result listStudent(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("examDetailId") Long examDetailId,
|
|
|
+ public Result listStudent(@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);
|
|
|
+ IPage<ClientExamStudentDto> examStudentDtoIPage = clientService.listStudent(examDetailId, ticketNumber, studentName, courseCode, pageNumber, pageSize);
|
|
|
return ResultUtil.ok(examStudentDtoIPage);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 重打-内容查询
|
|
|
*
|
|
|
- * @param schoolId
|
|
|
* @param examDetailId
|
|
|
* @param ticketNumber
|
|
|
* @param type
|
|
@@ -453,11 +416,10 @@ public class ClientController {
|
|
|
*/
|
|
|
@ApiOperation(value = "重打-内容查询")
|
|
|
@RequestMapping(value = "/print/get_reprint_data", method = RequestMethod.POST)
|
|
|
- public Result getReprintData(@RequestParam("schoolId") Long schoolId,
|
|
|
- @RequestParam("examDetailId") Long examDetailId,
|
|
|
+ public Result getReprintData(@RequestParam("examDetailId") Long examDetailId,
|
|
|
@RequestParam("ticketNumber") String ticketNumber,
|
|
|
@RequestParam("type") String type) {
|
|
|
- Map<String, Object> map = clientService.getReprintData(schoolId, examDetailId, ticketNumber, type);
|
|
|
+ Map<String, Object> map = clientService.getReprintData(examDetailId, ticketNumber, type);
|
|
|
return ResultUtil.ok(map);
|
|
|
}
|
|
|
}
|