|
|
|
|
@@ -3,11 +3,12 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.srs.routine.mapper.RtEnlistmentReserveMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="RtEnlistmentReserve" id="RtEnlistmentReserveResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="applyNo" column="apply_no" />
|
|
|
|
|
<result property="studentId" column="student_id" />
|
|
|
|
|
<result property="teacherName" column="teacher_name" />
|
|
|
|
|
<result property="studentName" column="student_name" />
|
|
|
|
|
<result property="gender" column="gender" />
|
|
|
|
|
<result property="nation" column="nation" />
|
|
|
|
|
@@ -29,14 +30,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectRtEnlistmentReserveVo">
|
|
|
|
|
select id, apply_no, student_id, student_name, gender, nation, grade, student_no, class_name, major, family_address, parent_phone, apply_reason, apply_status, process_instance_id, reserve_no, reserve_start_date, reserve_end_date, approval_no, create_time, update_time from rt_enlistment_reserve
|
|
|
|
|
select id, apply_no, student_id, teacher_name, student_name, gender, nation, grade, student_no, class_name, major, family_address, parent_phone, apply_reason, apply_status, process_instance_id, reserve_no, reserve_start_date, reserve_end_date, approval_no, create_time, update_time from rt_enlistment_reserve
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectRtEnlistmentReserveList" parameterType="RtEnlistmentReserve" resultMap="RtEnlistmentReserveResult">
|
|
|
|
|
<include refid="selectRtEnlistmentReserveVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="applyNo != null and applyNo != ''"> and apply_no = #{applyNo}</if>
|
|
|
|
|
<if test="studentId != null "> and student_id = #{studentId}</if>
|
|
|
|
|
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
|
|
|
|
|
<if test="studentName != null and studentName != ''"> and student_name like concat('%', #{studentName}, '%')</if>
|
|
|
|
|
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
|
|
|
|
<if test="nation != null and nation != ''"> and nation = #{nation}</if>
|
|
|
|
|
@@ -61,6 +63,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String" resultMap="RtEnlistmentReserveResult">
|
|
|
|
|
<include refid="selectRtEnlistmentReserveVo"/>
|
|
|
|
|
where process_instance_id = #{processInstanceId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 根据学号查询辅导员信息 -->
|
|
|
|
|
<select id="getCounselorInfo" resultType="com.srs.common.doman.vo.TeacherVo">
|
|
|
|
|
SELECT d.user_id userId, d.dept_id deptId, d.user_name userName, d.nick_name nickName
|
|
|
|
|
@@ -70,12 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
LEFT JOIN sys_user d ON c.employee_id = d.user_name
|
|
|
|
|
WHERE a.stu_no = #{stuNo}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertRtEnlistmentReserve" parameterType="RtEnlistmentReserve" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into rt_enlistment_reserve
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="applyNo != null and applyNo != ''">apply_no,</if>
|
|
|
|
|
<if test="studentId != null">student_id,</if>
|
|
|
|
|
<if test="teacherName != null and teacherName != ''">teacher_name,</if>
|
|
|
|
|
<if test="studentName != null and studentName != ''">student_name,</if>
|
|
|
|
|
<if test="gender != null and gender != ''">gender,</if>
|
|
|
|
|
<if test="nation != null and nation != ''">nation,</if>
|
|
|
|
|
@@ -94,10 +102,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="approvalNo != null">approval_no,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
|
|
|
|
|
<if test="studentId != null">#{studentId},</if>
|
|
|
|
|
<if test="teacherName != null and teacherName != ''">#{teacherName},</if>
|
|
|
|
|
<if test="studentName != null and studentName != ''">#{studentName},</if>
|
|
|
|
|
<if test="gender != null and gender != ''">#{gender},</if>
|
|
|
|
|
<if test="nation != null and nation != ''">#{nation},</if>
|
|
|
|
|
@@ -116,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="approvalNo != null">#{approvalNo},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateRtEnlistmentReserve" parameterType="RtEnlistmentReserve">
|
|
|
|
|
@@ -124,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
|
|
|
|
|
<if test="studentId != null">student_id = #{studentId},</if>
|
|
|
|
|
<if test="teacherName != null and teacherName != ''">teacher_name = #{teacherName},</if>
|
|
|
|
|
<if test="studentName != null and studentName != ''">student_name = #{studentName},</if>
|
|
|
|
|
<if test="gender != null and gender != ''">gender = #{gender},</if>
|
|
|
|
|
<if test="nation != null and nation != ''">nation = #{nation},</if>
|
|
|
|
|
@@ -151,7 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteRtEnlistmentReserveByIds" parameterType="String">
|
|
|
|
|
delete from rt_enlistment_reserve where id in
|
|
|
|
|
delete from rt_enlistment_reserve where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
|