Pārlūkot izejas kodu

报表-重考处理

xiatian 4 gadi atpakaļ
vecāks
revīzija
1f0ea0cf70

+ 14 - 0
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeReportController.java

@@ -91,4 +91,18 @@ public class TIeReportController {
     public Result examExceptionListDetail(@ApiParam(value = "考生id", required = true) @RequestParam Long examStudentId) {
         return ResultUtil.ok(reportService.examExceptionDetailList(examStudentId));
     }
+    
+    @ApiOperation(value = "重考处理")
+    @RequestMapping(value = "/exam_reexam_list", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "结果信息")})
+    public Result examReexamList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+                             @ApiParam(value = "考场场次id", required = false) @RequestParam Long examActivityId,
+                             @ApiParam(value = "虚拟考场代码", required = false) @RequestParam String roomCode,
+                             @ApiParam(value = "科目编码", required = false) @RequestParam String courseCode,
+                             @ApiParam(value = "姓名", required = false) @RequestParam String name,
+                             @ApiParam(value = "唯一码", required = false) @RequestParam String identity,
+                             @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
+                             @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
+        return ResultUtil.ok(reportService.examReexamList(examId, examActivityId, roomCode, courseCode, name, identity,pageNumber,pageSize));
+    }
 }

+ 121 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/ExamReexamListBean.java

@@ -0,0 +1,121 @@
+package com.qmth.themis.business.bean.backend;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel("报表-重考处理返回对象")
+public class ExamReexamListBean{
+
+
+	@ApiModelProperty(name = "考生id")
+    private String examStudentId;
+	@ApiModelProperty(name = "考试名称")
+    private String examName;
+	
+	@ApiModelProperty(name = "考试id")
+    private Long examId;
+
+    @ApiModelProperty(name = "场次id")
+    private Long examActivityId;
+
+    @ApiModelProperty(name = "虚拟考场代码")
+    private String roomCode;
+
+    @ApiModelProperty(name = "虚拟考场名称")
+    private String roomName;
+
+    @ApiModelProperty(name = "唯一码")
+    private String identity;
+    
+    @ApiModelProperty(name = "姓名")
+    private String name;
+    
+    @ApiModelProperty(name = "科目名称")
+    private String courseCode;
+    
+    @ApiModelProperty(name = "科目编码")
+    private String courseName;
+    
+	public String getExamName() {
+		return examName;
+	}
+
+	public void setExamName(String examName) {
+		this.examName = examName;
+	}
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public Long getExamActivityId() {
+		return examActivityId;
+	}
+
+	public void setExamActivityId(Long examActivityId) {
+		this.examActivityId = examActivityId;
+	}
+
+	public String getRoomCode() {
+		return roomCode;
+	}
+
+	public void setRoomCode(String roomCode) {
+		this.roomCode = roomCode;
+	}
+
+	public String getRoomName() {
+		return roomName;
+	}
+
+	public void setRoomName(String roomName) {
+		this.roomName = roomName;
+	}
+
+	public String getIdentity() {
+		return identity;
+	}
+
+	public void setIdentity(String identity) {
+		this.identity = identity;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getCourseCode() {
+		return courseCode;
+	}
+
+	public void setCourseCode(String courseCode) {
+		this.courseCode = courseCode;
+	}
+
+	public String getCourseName() {
+		return courseName;
+	}
+
+	public void setCourseName(String courseName) {
+		this.courseName = courseName;
+	}
+
+
+	public String getExamStudentId() {
+		return examStudentId;
+	}
+
+	public void setExamStudentId(String examStudentId) {
+		this.examStudentId = examStudentId;
+	}
+    
+    
+}

+ 11 - 4
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamReexamMapper.java

@@ -1,15 +1,18 @@
 package com.qmth.themis.business.dao;
 
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.qmth.themis.business.bean.backend.ExamExceptionListBean;
+import com.qmth.themis.business.bean.backend.ExamReexamListBean;
 import com.qmth.themis.business.bean.backend.ReexamListDoneBean;
 import com.qmth.themis.business.bean.backend.ReexamListNotDoneBean;
 import com.qmth.themis.business.bean.backend.ReexamListRequestBean;
 import com.qmth.themis.business.entity.TEExamReexam;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.Map;
 
 /**
  * @Description: 考生重考处理 Mapper 接口
@@ -99,4 +102,8 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
                                                         @Param("reasonEndTime") String reasonEndTime,
                                                         @Param("applyName") String applyName,
                                                         @Param("userId") Long userId);
+
+	public IPage<ExamReexamListBean> getExamReexamPage(IPage<ExamReexamListBean> iPage, @Param("examId") Long examId,
+			@Param("activityId") Long activityId, @Param("roomCode") String roomCode,
+			@Param("courseCode") String courseCode, @Param("name") String name, @Param("identity") String identity);
 }

+ 3 - 0
themis-business/src/main/java/com/qmth/themis/business/service/TIeReportService.java

@@ -20,4 +20,7 @@ public interface TIeReportService {
 			String identity, int pageNumber, int pageSize);
 
 	public List<ExamExceptionDetailListBean> examExceptionDetailList(Long examStudentId);
+
+	public BasePage examReexamList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
+			String identity, int pageNumber, int pageSize);
 }

+ 24 - 0
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java

@@ -20,9 +20,11 @@ import com.qmth.themis.business.base.BasePage;
 import com.qmth.themis.business.bean.backend.ExamDeficiencyListBean;
 import com.qmth.themis.business.bean.backend.ExamExceptionDetailListBean;
 import com.qmth.themis.business.bean.backend.ExamExceptionListBean;
+import com.qmth.themis.business.bean.backend.ExamReexamListBean;
 import com.qmth.themis.business.bean.backend.ExamViewCountListBean;
 import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
 import com.qmth.themis.business.cache.bean.ExamCacheBean;
+import com.qmth.themis.business.dao.TEExamReexamMapper;
 import com.qmth.themis.business.dao.TEExamStudentMapper;
 import com.qmth.themis.business.dao.TIeInvigilateExceptionInfoMapper;
 import com.qmth.themis.business.dao.TOeExamRecordMapper;
@@ -49,6 +51,9 @@ public class TIeReportServiceImpl implements TIeReportService {
     
     @Resource
     TIeInvigilateExceptionInfoMapper invigilateExceptionInfoMapper;
+    
+    @Resource
+    TEExamReexamMapper examReexamMapper;
 
 	@Override
 	public Map<String, Object> examView(Long examId, Long examActivityId, String roomCode, String courseCode,
@@ -235,5 +240,24 @@ public class TIeReportServiceImpl implements TIeReportService {
 		return ret;
 	}
 
+	@Override
+	public BasePage examReexamList(Long examId, Long examActivityId, String roomCode, String courseCode, String name,
+			String identity, int pageNumber, int pageSize) {
+		Page<ExamReexamListBean> ipage=new Page<>(pageNumber, pageSize);
+		ipage.addOrder(OrderItem.asc("f.exam_student_id"));
+		IPage<ExamReexamListBean> total = examReexamMapper.getExamReexamPage(ipage,examId, examActivityId, roomCode, courseCode,name,identity);
+        List<ExamReexamListBean> data=total.getRecords();
+        if(data==null||data.size()==0) {
+        	BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
+        	return basePage;
+        }
+        ExamCacheBean exam=examService.getExamCacheBean(examId);
+		for(ExamReexamListBean b:data) {
+			b.setExamName(exam.getName());
+		}
+		BasePage basePage = new BasePage(total.getRecords(), total.getCurrent(), total.getSize(), total.getTotal());
+        return basePage;
+	}
+
 
 }

+ 34 - 0
themis-business/src/main/resources/mapper/TEExamReexamMapper.xml

@@ -190,4 +190,38 @@
         </where>
         order by tees.room_code
     </select>
+    
+    <select id="getExamReexamPage"
+		resultType="com.qmth.themis.business.bean.backend.ExamReexamListBean">
+		SELECT
+		f.exam_student_id examStudentId,
+		t.exam_id examId,
+		t.exam_activity_id examActivityId,
+		t.room_code roomCode,
+		t.course_code courseCode,
+		t.course_name courseName,
+		t.NAME,
+		t.identity,
+		t.room_name roomName
+		FROM
+		t_e_exam_reexam f
+		LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
+		where f.exam_id =#{examId}
+		<if test="activityId != null and activityId != ''">
+			and f.exam_activity_id = #{activityId}
+		</if>
+		<if test="roomCode != null and roomCode != ''">
+			and t.room_code =#{roomCode}
+		</if>
+		<if test="courseCode != null and courseCode != ''">
+			and t.course_code = #{courseCode}
+		</if>
+		<if test="identity != null and identity != ''">
+			and t.identity like concat(#{identity},'%')
+		</if>
+		<if test="name != null and name != ''">
+			and t.name like concat(#{name},'%')
+		</if>
+		GROUP BY f.exam_student_id
+	</select>
 </mapper>