Commit 0673a17d by jsy672

修改公开招聘考场分配、成绩查询相关接口

parent 5c63916a
......@@ -239,15 +239,15 @@
<script>
import {
scoreManageList,
delRelation,
addRelation,
delRelation,
getAddressInfo,
handleEdit,
scoreEnd,
getAddressInfo
scoreManageList
} from "@/api/smartSchool/openRecruitment";
import {getToken} from "@/utils/auth";
import {Gender, Nations} from "@/enums/common";
import {Gender} from "@/enums/common";
export default {
name: "Relation",
......@@ -311,7 +311,7 @@ export default {
// 设置上传的请求头部
headers: {Authorization: "Bearer " + getToken()},
// 上传的地址
url: process.env.VUE_APP_BASE_API + `/artExam/importScoreData/${this.examId}`,
url: process.env.VUE_APP_BASE_API + `/recruitExam/importScoreData/${this.examId}`,
},
// 表单参数
form: {},
......@@ -493,7 +493,7 @@ export default {
// },
/** 导出按钮操作 */
handleExport() {
this.download(`/artExam/exportScore/${this.examId}`, {
this.download(`/recruitExam/exportScore/${this.examId}`, {
...this.queryParams
}, `成绩管理${Date.now()}.xlsx`)
},
......
package yangtz.cs.liu.campus.controller.examination;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation;
import yangtz.cs.liu.campus.service.recruit.ISchoolRecruitRelationService;
/**
* @author xuten
*/
@RestController
@RequestMapping("/recruit-relation")
public class SchoolRecruitRelationController extends BaseController {
@Autowired
private ISchoolRecruitRelationService recruitRelationService;
/**
* 考场分配/成绩管理-查看
*/
@GetMapping("/getAddressInfo/{id}")
public AjaxResult getAddressInfo(@PathVariable Long id) {
return AjaxResult.success(recruitRelationService.getAddressInfo(id));
}
/**
* 考场分配/成绩管理-修改
*/
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolRecruitRelation relation) {
if (StringUtils.isNull(relation.getId())) {
throw new ServiceException("id为空,请检查");
}
if (relation.getExamTime().contains(":")) {
String t = relation.getExamTime();
t = t.replace(":", ":");
relation.setExamTime(t);
}
relation.update();
return toAjax(recruitRelationService.updateById(relation));
}
}
......@@ -3,9 +3,8 @@ package yangtz.cs.liu.campus.vo.recruit;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
import lombok.Data;
@Data
public class RecruitExamAddressVo extends OurBaseEntity {
......@@ -24,12 +23,12 @@ public class RecruitExamAddressVo extends OurBaseEntity {
private String studentName;
/** 学籍号 */
@Excel(name = "学籍号", width = 25)
// @Excel(name = "学籍号", width = 25)
private String studentNumber;
/** 初中学校id */
private Long juniorId;
@Excel(name = "初中学校", width = 25)
// @Excel(name = "初中学校", width = 25)
private String schoolName;
/** 测试项目id */
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="yangtz.cs.liu.campus.mapper.recruit.SchoolRecruitRelationMapper">
<!--namespace根据自己需要创建的的mapper的路径和名称填写-->
<resultMap type="SchoolRecruitRelation" id="SchoolRecruitRelationResult">
<result property="id" column="id" />
<result property="examId" column="exam_id" />
<result property="studentId" column="student_id" />
<result property="juniorId" column="junior_id" />
<result property="testId" column="test_id" />
<result property="auditStatus" column="audit_status" />
<result property="matchStatus" column="match_status" />
<result property="infoIdCard" column="info_id_card" />
<result property="submit" column="submit" />
<result property="examNumber" column="exam_number" />
<result property="inGroup" column="in_group" />
<result property="examDate" column="exam_date" />
<result property="examTime" column="exam_time" />
<result property="examAddress" column="exam_address" />
<result property="score" column="score" />
<result property="result" column="result" />
<result property="passScore" column="pass_score" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
</resultMap>
<!--namespace根据自己需要创建的的mapper的路径和名称填写-->
<resultMap type="SchoolRecruitRelation" id="SchoolRecruitRelationResult">
<result property="id" column="id"/>
<result property="examId" column="exam_id"/>
<result property="studentId" column="student_id"/>
<result property="juniorId" column="junior_id"/>
<result property="testId" column="test_id"/>
<result property="auditStatus" column="audit_status"/>
<result property="matchStatus" column="match_status"/>
<result property="infoIdCard" column="info_id_card"/>
<result property="submit" column="submit"/>
<result property="examNumber" column="exam_number"/>
<result property="inGroup" column="in_group"/>
<result property="examDate" column="exam_date"/>
<result property="examTime" column="exam_time"/>
<result property="examAddress" column="exam_address"/>
<result property="score" column="score"/>
<result property="result" column="result"/>
<result property="passScore" column="pass_score"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<sql id="selectSchoolRecruitRelationVo">
select id, exam_id, student_id, audit_status, match_status , junior_id, test_id, info_id_card, submit, exam_number, in_group, exam_date, exam_time, exam_address, score, result, pass_score, create_time, create_by, update_time, update_by, del_flag from school_recruit_relation
</sql>
<sql id="selectSchoolRecruitRelationVo">
select id,
exam_id,
student_id,
audit_status,
match_status,
junior_id,
test_id,
info_id_card,
submit,
exam_number,
in_group,
exam_date,
exam_time,
exam_address,
score,
result,
pass_score,
create_time,
create_by,
update_time,
update_by,
del_flag
from school_recruit_relation
</sql>
<select id="getRelationByIds" resultType="yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation">
<include refid="selectSchoolRecruitRelationVo" />
where del_flag = '0' and exam_id = #{examId} and student_id = #{studentId}
</select>
<select id="getRelationByIds"
resultType="yangtz.cs.liu.campus.domain.recruit.SchoolRecruitRelation">
<include refid="selectSchoolRecruitRelationVo"/>
where del_flag = '0' and exam_id = #{examId} and student_id = #{studentId}
</select>
<select id="getInfoCheck" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitEduStudentVo">
select sar.id,
sar.exam_id,
sar.student_id,
sar.audit_status,
sar.info_id_card,
sas.student_name,
sas.id_card,
sas.student_number,
sar.junior_id,
jhs.school_name,
sar.test_id,
stp.project,
sas.sex,
sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0'
and sas.del_flag = '0'
and sar.exam_id = #{examId}
order by sar.create_time desc
</select>
<select id="getInfoCheck" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitEduStudentVo">
select sar.id,
sar.exam_id,
sar.student_id,
sar.audit_status,
sar.info_id_card,
sas.student_name,
sas.id_card,
sas.student_number,
sar.junior_id,
jhs.school_name,
sar.test_id,
stp.project,
sas.sex,
sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0'
and sas.del_flag = '0'
and sar.exam_id = #{examId}
order by sar.create_time desc
</select>
<select id="getAddressList" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo">
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date, sar.exam_time, sar.exam_address,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId} and sar.audit_status = #{auditStatus}
<if test="studentName != null and studentName != ''"> and sas.student_name like concat('%', #{studentName}, '%')</if>
<if test="idCard != null and idCard != ''"> and sas.id_card like concat('%', #{idCard}, '%')</if>
<if test="project != null and project != ''"> and stp.project like concat('%', #{project}, '%')</if>
order by sar.create_time desc
</select>
<select id="getAddressList" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitExamAddressVo">
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date,
sar.exam_time, sar.exam_address,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId} and sar.audit_status
= #{auditStatus}
<if test="studentName != null and studentName != ''">and sas.student_name like concat('%',
#{studentName}, '%')
</if>
<if test="idCard != null and idCard != ''">and sas.id_card like concat('%', #{idCard}, '%')
</if>
<if test="project != null and project != ''">and stp.project like concat('%', #{project},
'%')
</if>
order by sar.create_time desc
</select>
<select id="getAddressInfo" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo">
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date, sar.exam_time, sar.exam_address,
sar.score, sar.result, sar.pass_score,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo, sas.height, sas.weight, sas.telephone1, sas.telephone2
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.id = #{id}
</select>
<select id="getAddressInfo" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo">
select sar.id,
sar.exam_id,
sar.student_id,
sar.exam_number,
sar.in_group,
sar.exam_date,
sar.exam_time,
sar.exam_address,
sar.score,
sar.result,
sar.pass_score,
sas.student_name,
sas.id_card,
sas.student_number,
sar.junior_id,
jhs.school_name,
sar.test_id,
stp.project,
sas.sex,
sas.photo,
sas.height,
sas.weight,
sas.telephone1,
sas.telephone2
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0'
and sas.del_flag = '0'
and sar.id = #{id}
</select>
<select id="getScoreList" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo">
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date, sar.exam_time, sar.exam_address,
sar.score, sar.result, sar.pass_score,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId} and sar.audit_status = #{auditStatus}
<if test="studentName != null and studentName != ''"> and sas.student_name like concat('%', #{studentName}, '%')</if>
<if test="idCard != null and idCard != ''"> and sas.id_card like concat('%', #{idCard}, '%')</if>
<if test="project != null and project != ''"> and stp.project like concat('%', #{project}, '%')</if>
order by sar.create_time desc
</select>
<select id="getScoreList" resultType="yangtz.cs.liu.campus.vo.recruit.RecruitExamScoreVo">
select sar.id, sar.exam_id, sar.student_id, sar.exam_number, sar.in_group, sar.exam_date,
sar.exam_time, sar.exam_address,
sar.score, sar.result, sar.pass_score,
sas.student_name, sas.id_card, sas.student_number,sar.junior_id, jhs.school_name,
sar.test_id, stp.project,sas.sex, sas.photo
from school_recruit_relation sar
left join school_recruit_student sas on sas.id = sar.student_id
left join school_recruit_project stp on stp.id = sar.test_id
left join junior_high_school jhs on jhs.id = sar.junior_id
where sar.del_flag = '0' and sas.del_flag = '0' and sar.exam_id = #{examId} and sar.audit_status
= #{auditStatus}
<if test="studentName != null and studentName != ''">and sas.student_name like concat('%',
#{studentName}, '%')
</if>
<if test="idCard != null and idCard != ''">and sas.id_card like concat('%', #{idCard}, '%')
</if>
<if test="project != null and project != ''">and stp.project like concat('%', #{project},
'%')
</if>
order by sar.create_time desc
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment