|
@@ -50,12 +50,16 @@ public class GradeBatchController {
|
|
@ApiOperation(value = "成绩分析批次-查询")
|
|
@ApiOperation(value = "成绩分析批次-查询")
|
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeBatchResult.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeBatchResult.class)})
|
|
- public Result findGradeBatchPage(@ApiParam(value = "分析批次名称") @RequestParam(required = false) String gradeBatchName,
|
|
|
|
|
|
+ public Result findGradeBatchPage(@ApiParam(value = "学期") @RequestParam(required = false) String semesterId,
|
|
|
|
+ @ApiParam(value = "考试") @RequestParam(required = false) String examId,
|
|
|
|
+ @ApiParam(value = "分析批次名称") @RequestParam(required = false) String gradeBatchName,
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
@ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
@ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
-
|
|
|
|
|
|
+ if (SystemConstant.isOneNull(semesterId)){
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("请选择学期");
|
|
|
|
+ }
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
- return ResultUtil.ok(gradeBatchService.gradeBatchPage(gradeBatchName, pageNumber, pageSize, requestUser));
|
|
|
|
|
|
+ return ResultUtil.ok(gradeBatchService.gradeBatchPage(SystemConstant.convertIdToLong(semesterId),SystemConstant.convertIdToLong(examId), gradeBatchName, pageNumber, pageSize, requestUser));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "成绩分析批次-新建")
|
|
@ApiOperation(value = "成绩分析批次-新建")
|
|
@@ -76,7 +80,7 @@ public class GradeBatchController {
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.DELETE)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.DELETE)
|
|
public Result deleteGradeBatch(@ApiParam(value = "选择的要删除的成绩分析批次id", required = true) @RequestParam String id) {
|
|
public Result deleteGradeBatch(@ApiParam(value = "选择的要删除的成绩分析批次id", required = true) @RequestParam String id) {
|
|
GradeBatch gradeBatch = gradeBatchService.getById(SystemConstant.convertIdToLong(id));
|
|
GradeBatch gradeBatch = gradeBatchService.getById(SystemConstant.convertIdToLong(id));
|
|
- if(gradeBatch == null){
|
|
|
|
|
|
+ if (gradeBatch == null) {
|
|
throw ExceptionResultEnum.ERROR.exception("没有批次信息");
|
|
throw ExceptionResultEnum.ERROR.exception("没有批次信息");
|
|
}
|
|
}
|
|
asyncTeachCloudReportService.deleteGradeBatch(gradeBatch);
|
|
asyncTeachCloudReportService.deleteGradeBatch(gradeBatch);
|
|
@@ -123,7 +127,7 @@ public class GradeBatchController {
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.IMPORT)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.IMPORT)
|
|
public Result batchSync(@RequestParam Long batchId) {
|
|
public Result batchSync(@RequestParam Long batchId) {
|
|
GradeBatch gradeBatch = gradeBatchService.getById(batchId);
|
|
GradeBatch gradeBatch = gradeBatchService.getById(batchId);
|
|
- if(gradeBatch == null){
|
|
|
|
|
|
+ if (gradeBatch == null) {
|
|
throw ExceptionResultEnum.ERROR.exception("没有批次信息");
|
|
throw ExceptionResultEnum.ERROR.exception("没有批次信息");
|
|
}
|
|
}
|
|
asyncTeachCloudReportService.syncGradeBatch(gradeBatch);
|
|
asyncTeachCloudReportService.syncGradeBatch(gradeBatch);
|
|
@@ -141,7 +145,7 @@ public class GradeBatchController {
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UN_KNOW)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UN_KNOW)
|
|
public Result startCalc(@RequestParam Long batchId) {
|
|
public Result startCalc(@RequestParam Long batchId) {
|
|
GradeBatch gradeBatch = gradeBatchService.getById(batchId);
|
|
GradeBatch gradeBatch = gradeBatchService.getById(batchId);
|
|
- if(gradeBatch == null){
|
|
|
|
|
|
+ if (gradeBatch == null) {
|
|
throw ExceptionResultEnum.ERROR.exception("没有批次信息");
|
|
throw ExceptionResultEnum.ERROR.exception("没有批次信息");
|
|
}
|
|
}
|
|
asyncTeachCloudReportService.startCalc(gradeBatch);
|
|
asyncTeachCloudReportService.startCalc(gradeBatch);
|