|
@@ -1,22 +1,33 @@
|
|
package com.qmth.distributed.print.api;
|
|
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.Aac;
|
|
import com.qmth.boot.api.annotation.BOOL;
|
|
import com.qmth.boot.api.annotation.BOOL;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
|
+import com.qmth.distributed.print.business.bean.ApiUser;
|
|
|
|
+import com.qmth.distributed.print.business.bean.dto.ExamTaskDetailDto;
|
|
|
|
+import com.qmth.distributed.print.business.bean.dto.RelatePaperDto;
|
|
import com.qmth.distributed.print.business.bean.params.DeleteParams;
|
|
import com.qmth.distributed.print.business.bean.params.DeleteParams;
|
|
import com.qmth.distributed.print.business.bean.params.PrintPlanParams;
|
|
import com.qmth.distributed.print.business.bean.params.PrintPlanParams;
|
|
import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
|
|
import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
|
|
import com.qmth.distributed.print.business.service.ExamPrintPlanService;
|
|
import com.qmth.distributed.print.business.service.ExamPrintPlanService;
|
|
|
|
+import com.qmth.distributed.print.business.service.ExamTaskDetailService;
|
|
|
|
+import com.qmth.distributed.print.business.service.ExamTaskService;
|
|
|
|
+import com.qmth.distributed.print.business.util.RequestUtils;
|
|
import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
import com.qmth.distributed.print.common.util.Result;
|
|
import com.qmth.distributed.print.common.util.Result;
|
|
import com.qmth.distributed.print.common.util.ResultUtil;
|
|
import com.qmth.distributed.print.common.util.ResultUtil;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.validation.BindingResult;
|
|
import org.springframework.validation.BindingResult;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -33,6 +44,11 @@ import javax.validation.Valid;
|
|
public class ExamPrintPlanController {
|
|
public class ExamPrintPlanController {
|
|
@Resource
|
|
@Resource
|
|
private ExamPrintPlanService examPrintPlanService;
|
|
private ExamPrintPlanService examPrintPlanService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamTaskService examTaskService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamTaskDetailService examTaskDetailService;
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "印刷计划查询")
|
|
@ApiOperation(value = "印刷计划查询")
|
|
@@ -84,5 +100,62 @@ public class ExamPrintPlanController {
|
|
}
|
|
}
|
|
return ResultUtil.ok(examPrintPlanService.removePrintPlan(deleteParams));
|
|
return ResultUtil.ok(examPrintPlanService.removePrintPlan(deleteParams));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 关联试卷管理-查询
|
|
|
|
+ * @param request
|
|
|
|
+ * @param relateType
|
|
|
|
+ * @param printPlanId
|
|
|
|
+ * @param courseCode
|
|
|
|
+ * @param paperNumber
|
|
|
|
+ * @param pageNumber
|
|
|
|
+ * @param pageSize
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "关联试卷管理-查询")
|
|
|
|
+ @RequestMapping(value = "/relate_list", method = RequestMethod.POST)
|
|
|
|
+ public Result relateList(HttpServletRequest request,
|
|
|
|
+ @RequestParam String relateType,
|
|
|
|
+ @RequestParam Long printPlanId,
|
|
|
|
+ @RequestParam String courseCode,
|
|
|
|
+ @RequestParam String paperNumber,
|
|
|
|
+ @RequestParam Integer pageNumber,
|
|
|
|
+ @RequestParam Integer pageSize) {
|
|
|
|
+ ApiUser apiUser = RequestUtils.getApiUser(request);
|
|
|
|
+ IPage<ExamTaskDetailDto> examTasks = examTaskDetailService.list(apiUser.getSchoolId(), relateType, printPlanId, courseCode, paperNumber, pageNumber, pageSize);
|
|
|
|
+ return ResultUtil.ok(examTasks);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 关联/更换试卷
|
|
|
|
+ * @param request
|
|
|
|
+ * @param map
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "/relate_update", method = RequestMethod.POST)
|
|
|
|
+ public Result relateUpdate(HttpServletRequest request, @RequestBody Map<String, String> map){
|
|
|
|
+ boolean isSuccess = examTaskDetailService.updatePaper(map);
|
|
|
|
+ return ResultUtil.ok(isSuccess);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询所有试卷编号/关联卷型
|
|
|
|
+ * @param request
|
|
|
|
+ * @param courseCode
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "/relate_get_paper_numbers", method = RequestMethod.POST)
|
|
|
|
+ public Result relateGetPaperNumbers(HttpServletRequest request, @RequestParam(value = "courseCode", required = true) String courseCode){
|
|
|
|
+ ApiUser apiUser = RequestUtils.getApiUser(request);
|
|
|
|
+ List<RelatePaperDto> list = examTaskService.listPaperTypes(apiUser.getSchoolId(), courseCode);
|
|
|
|
+ return ResultUtil.ok(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "/task_list", method = RequestMethod.POST)
|
|
|
|
+ public Result taskList(HttpServletRequest request, @RequestParam(value = "courseCode", required = true) String courseCode){
|
|
|
|
+ ApiUser apiUser = RequestUtils.getApiUser(request);
|
|
|
|
+ List<RelatePaperDto> list = examTaskService.listPaperTypes(apiUser.getSchoolId(), courseCode);
|
|
|
|
+ return ResultUtil.ok(list);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|