xiatian il y a 1 an
Parent
commit
032b5262dc

+ 8 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/ScanStudentController.java

@@ -12,6 +12,7 @@ import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
+import com.qmth.teachcloud.mark.bean.UpdateTimeVo;
 import com.qmth.teachcloud.mark.bean.student.AbsentManualUpdateVo;
 import com.qmth.teachcloud.mark.bean.student.StudentQuery;
 import com.qmth.teachcloud.mark.service.MarkStudentService;
@@ -46,4 +47,11 @@ public class ScanStudentController {
 			@RequestParam String studentCode) {
 		return markStudentService.absentManualUpdate(examId, coursePaperId,studentCode);
 	}
+	
+	@ApiOperation(value = "任务确认")
+	@PostMapping("confirm")
+	public UpdateTimeVo confirm(@RequestParam Long examId, @RequestParam String coursePaperId,
+			@RequestParam String studentCode,@RequestParam(required = false) Boolean omrAbsent) {
+		return markStudentService.confirm(examId, coursePaperId,studentCode,omrAbsent);
+	}
 }

+ 2 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkStudentService.java

@@ -87,4 +87,6 @@ public interface MarkStudentService extends IService<MarkStudent> {
     long countStudentCountByExamIdAndPaperNumber(Long examId, String paperNumber, String paperType);
 
 	AbsentManualUpdateVo absentManualUpdate(Long examId, String coursePaperId, String studentCode);
+
+	UpdateTimeVo confirm(Long examId, String coursePaperId, String studentCode, Boolean omrAbsent);
 }

+ 17 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -657,4 +657,21 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         update(lw);
         return AbsentManualUpdateVo.create(ScanStatus.MANUAL_ABSENT);
 	}
+
+    @Transactional
+	@Override
+	public UpdateTimeVo confirm(Long examId, String coursePaperId, String studentCode, Boolean omrAbsent) {
+        LambdaUpdateWrapper<MarkStudent> lw = new LambdaUpdateWrapper<>();
+        lw.set(MarkStudent::getOmrAbsentChecked, true);
+        lw.eq(MarkStudent::getExamId, examId);
+        lw.eq(MarkStudent::getCoursePaperId, coursePaperId);
+        lw.eq(MarkStudent::getStudentCode, studentCode);
+        if (omrAbsent != null) {
+        	lw.eq(MarkStudent::getOmrAbsent, omrAbsent);
+        }
+        if (!update(lw)) {
+        	throw new ParameterException("考生未找到");
+        }
+		return UpdateTimeVo.create();
+	}
 }