应征入伍保留学籍申请表联表操作
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
<include refid="selectRtEnlistmentReserveApprovalVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 根据学生姓名、学号,申请编号查询-->
|
||||
<select id="selectRtEnlistmentReserveApprovalByStuName" resultMap="RtEnlistmentReserveApprovalResult">
|
||||
select *
|
||||
from rt_enlistment_reserve_approval
|
||||
|
||||
@@ -1,40 +1,60 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.srs.routine.mapper.RtEnlistmentReserveAttachMapper">
|
||||
|
||||
|
||||
<resultMap type="RtEnlistmentReserveAttach" id="RtEnlistmentReserveAttachResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="applyId" column="apply_id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="filePath" column="file_path" />
|
||||
<result property="fileSize" column="file_size" />
|
||||
<result property="fileType" column="file_type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="applyId" column="apply_id"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<result property="fileSize" column="file_size"/>
|
||||
<result property="fileType" column="file_type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="applyNo" column="apply_no"/>
|
||||
<result property="studentName" column="student_name"/>
|
||||
<result property="studentNo" column="student_no"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRtEnlistmentReserveAttachVo">
|
||||
select id, apply_id, file_name, file_path, file_size, file_type, create_time from rt_enlistment_reserve_attach
|
||||
select id,
|
||||
apply_id,
|
||||
file_name,
|
||||
file_path,
|
||||
file_size,
|
||||
file_type,
|
||||
create_time,
|
||||
apply_no,
|
||||
student_name,
|
||||
student_no
|
||||
from rt_enlistment_reserve_attach
|
||||
</sql>
|
||||
|
||||
<select id="selectRtEnlistmentReserveAttachList" parameterType="RtEnlistmentReserveAttach" resultMap="RtEnlistmentReserveAttachResult">
|
||||
<select id="selectRtEnlistmentReserveAttachList" parameterType="RtEnlistmentReserveAttach"
|
||||
resultMap="RtEnlistmentReserveAttachResult">
|
||||
<include refid="selectRtEnlistmentReserveAttachVo"/>
|
||||
<where>
|
||||
<if test="applyId != null "> and apply_id = #{applyId}</if>
|
||||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="filePath != null and filePath != ''"> and file_path = #{filePath}</if>
|
||||
<if test="fileSize != null "> and file_size = #{fileSize}</if>
|
||||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
|
||||
<where>
|
||||
<if test="applyId != null ">and apply_id = #{applyId}</if>
|
||||
<if test="fileName != null and fileName != ''">and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="filePath != null and filePath != ''">and file_path = #{filePath}</if>
|
||||
<if test="fileSize != null ">and file_size = #{fileSize}</if>
|
||||
<if test="fileType != null and fileType != ''">and file_type = #{fileType}</if>
|
||||
<if test="applyNo != null and applyNo != ''">and apply_no = #{applyNo}</if>
|
||||
<if test="studentName != null and studentName != ''">and student_name like concat('%', #{studentName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="studentNo != null and studentNo != ''">and student_no = #{studentNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRtEnlistmentReserveAttachById" parameterType="Long" resultMap="RtEnlistmentReserveAttachResult">
|
||||
<include refid="selectRtEnlistmentReserveAttachVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRtEnlistmentReserveAttach" parameterType="RtEnlistmentReserveAttach" useGeneratedKeys="true" keyProperty="id">
|
||||
|
||||
<insert id="insertRtEnlistmentReserveAttach" parameterType="RtEnlistmentReserveAttach" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into rt_enlistment_reserve_attach
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id,</if>
|
||||
@@ -43,7 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="fileSize != null">file_size,</if>
|
||||
<if test="fileType != null and fileType != ''">file_type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<if test="applyNo != null and applyNo != ''">apply_no,</if>
|
||||
<if test="studentName != null and studentName != ''">student_name,</if>
|
||||
<if test="studentNo != null and studentNo != ''">student_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="applyId != null">#{applyId},</if>
|
||||
<if test="fileName != null and fileName != ''">#{fileName},</if>
|
||||
@@ -51,7 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="fileSize != null">#{fileSize},</if>
|
||||
<if test="fileType != null and fileType != ''">#{fileType},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
|
||||
<if test="studentName != null and studentName != ''">#{studentName},</if>
|
||||
<if test="studentNo != null and studentNo != ''">#{studentNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRtEnlistmentReserveAttach" parameterType="RtEnlistmentReserveAttach">
|
||||
@@ -63,16 +89,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="fileSize != null">file_size = #{fileSize},</if>
|
||||
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
|
||||
<if test="studentName != null and studentName != ''">student_name = #{studentName},</if>
|
||||
<if test="studentNo != null and studentNo != ''">student_no = #{studentNo},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRtEnlistmentReserveAttachById" parameterType="Long">
|
||||
delete from rt_enlistment_reserve_attach where id = #{id}
|
||||
delete
|
||||
from rt_enlistment_reserve_attach
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRtEnlistmentReserveAttachByIds" parameterType="String">
|
||||
delete from rt_enlistment_reserve_attach where id in
|
||||
delete from rt_enlistment_reserve_attach where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@@ -1,69 +1,169 @@
|
||||
<?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">
|
||||
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" />
|
||||
<result property="grade" column="grade" />
|
||||
<result property="studentNo" column="student_no" />
|
||||
<result property="className" column="class_name" />
|
||||
<result property="major" column="major" />
|
||||
<result property="familyAddress" column="family_address" />
|
||||
<result property="parentPhone" column="parent_phone" />
|
||||
<result property="applyReason" column="apply_reason" />
|
||||
<result property="applyStatus" column="apply_status" />
|
||||
<result property="processInstanceId" column="process_instance_id" />
|
||||
<result property="reserveNo" column="reserve_no" />
|
||||
<result property="reserveStartDate" column="reserve_start_date" />
|
||||
<result property="reserveEndDate" column="reserve_end_date" />
|
||||
<result property="approvalNo" column="approval_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<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"/>
|
||||
<result property="grade" column="grade"/>
|
||||
<result property="studentNo" column="student_no"/>
|
||||
<result property="className" column="class_name"/>
|
||||
<result property="major" column="major"/>
|
||||
<result property="familyAddress" column="family_address"/>
|
||||
<result property="parentPhone" column="parent_phone"/>
|
||||
<result property="applyReason" column="apply_reason"/>
|
||||
<result property="applyStatus" column="apply_status"/>
|
||||
<result property="processInstanceId" column="process_instance_id"/>
|
||||
<result property="reserveNo" column="reserve_no"/>
|
||||
<result property="reserveStartDate" column="reserve_start_date"/>
|
||||
<result property="reserveEndDate" column="reserve_end_date"/>
|
||||
<result property="approvalNo" column="approval_no"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<!--入伍保留学籍申请表-审核记录 (多条件查询column里传入了多条件【{studentName = student_name, studentNo = student_no}】javaType里面写了list表明你有多条件 studentName student_name字段)-->
|
||||
<collection property="enlistmentReserveApprovalList"
|
||||
column="{studentName = student_name, studentNo = student_no}"
|
||||
javaType="java.util.ArrayList" select="selectRtEnlistmentReserveApprovalByStuName"/>
|
||||
<!--入伍保留学籍申请表-附件记录 (多条件查询column里传入了多条件【{studentName = student_name, studentNo = student_no}】javaType里面写了list表明你有多条件 studentName student_name字段)-->
|
||||
<collection property="enlistmentReserveAttachList"
|
||||
column="{studentName = student_name, studentNo = student_no, applyNo = apply_no}"
|
||||
javaType="java.util.ArrayList" select="selectRtEnlistmentReserveAttachByStuName"/>
|
||||
</resultMap>
|
||||
<!--入伍保留学籍申请表-审核记录子表的映射 -->
|
||||
<resultMap type="EnlistmentReserveApproval" id="RtEnlistmentReserveApprovalResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="applyId" column="apply_id"/>
|
||||
<result property="processInstanceId" column="process_instance_id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="nodeName" column="node_name"/>
|
||||
<result property="approverId" column="approver_id"/>
|
||||
<result property="approverName" column="approver_name"/>
|
||||
<result property="approvalOpinion" column="approval_opinion"/>
|
||||
<result property="approvalResult" column="approval_result"/>
|
||||
<result property="approvalTime" column="approval_time"/>
|
||||
<result property="studentName" column="student_name"/>
|
||||
<result property="studentNo" column="student_no"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRtEnlistmentReserveVo">
|
||||
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"/>
|
||||
<!-- 入伍保留申请表-审核记录子表,根据学生姓名、学号查询 -->
|
||||
<select id="selectRtEnlistmentReserveApprovalByStuName" resultMap="RtEnlistmentReserveApprovalResult">
|
||||
select *
|
||||
from rt_enlistment_reserve_approval
|
||||
<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>
|
||||
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
|
||||
<if test="studentNo != null and studentNo != ''"> and student_no = #{studentNo}</if>
|
||||
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
|
||||
<if test="major != null and major != ''"> and major = #{major}</if>
|
||||
<if test="familyAddress != null and familyAddress != ''"> and family_address = #{familyAddress}</if>
|
||||
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
|
||||
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
|
||||
<if test="applyStatus != null "> and apply_status = #{applyStatus}</if>
|
||||
<if test="processInstanceId != null and processInstanceId != ''"> and process_instance_id = #{processInstanceId}</if>
|
||||
<if test="reserveNo != null and reserveNo != ''"> and reserve_no = #{reserveNo}</if>
|
||||
<if test="reserveStartDate != null "> and reserve_start_date = #{reserveStartDate}</if>
|
||||
<if test="reserveEndDate != null "> and reserve_end_date = #{reserveEndDate}</if>
|
||||
<if test="approvalNo != null and approvalNo != ''"> and approval_no = #{approvalNo}</if>
|
||||
<if test="studentName != null and studentName != ''">
|
||||
and student_name = #{studentName}
|
||||
</if>
|
||||
<if test="studentNo != null and studentNo != ''">
|
||||
and student_no = #{studentNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--入伍保留学籍申请表-申请附件子表的映射 -->
|
||||
<resultMap type="RtEnlistmentReserveAttach" id="RtEnlistmentReserveAttachResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="applyId" column="apply_id"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<result property="fileSize" column="file_size"/>
|
||||
<result property="fileType" column="file_type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="applyNo" column="apply_no"/>
|
||||
<result property="studentName" column="student_name"/>
|
||||
<result property="studentNo" column="student_no"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 入伍保留申请表-申请附件记录子表,根据学生姓名、学号,申请编号查询 -->
|
||||
<select id="selectRtEnlistmentReserveAttachByStuName" resultMap="RtEnlistmentReserveAttachResult">
|
||||
select *
|
||||
from rt_enlistment_reserve_attach
|
||||
<where>
|
||||
<if test="studentName != null and studentName != ''">
|
||||
and student_name = #{studentName}
|
||||
</if>
|
||||
<if test="studentNo != null and studentNo != ''">
|
||||
and student_no = #{studentNo}
|
||||
</if>
|
||||
<if test="applyNo != null and applyNo != ''">
|
||||
and apply_no = #{applyNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="selectRtEnlistmentReserveVo">
|
||||
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>
|
||||
<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>
|
||||
<if test="grade != null and grade != ''">and grade = #{grade}</if>
|
||||
<if test="studentNo != null and studentNo != ''">and student_no = #{studentNo}</if>
|
||||
<if test="className != null and className != ''">and class_name like concat('%', #{className}, '%')</if>
|
||||
<if test="major != null and major != ''">and major = #{major}</if>
|
||||
<if test="familyAddress != null and familyAddress != ''">and family_address = #{familyAddress}</if>
|
||||
<if test="parentPhone != null and parentPhone != ''">and parent_phone = #{parentPhone}</if>
|
||||
<if test="applyReason != null and applyReason != ''">and apply_reason = #{applyReason}</if>
|
||||
<if test="applyStatus != null ">and apply_status = #{applyStatus}</if>
|
||||
<if test="processInstanceId != null and processInstanceId != ''">and process_instance_id =
|
||||
#{processInstanceId}
|
||||
</if>
|
||||
<if test="reserveNo != null and reserveNo != ''">and reserve_no = #{reserveNo}</if>
|
||||
<if test="reserveStartDate != null ">and reserve_start_date = #{reserveStartDate}</if>
|
||||
<if test="reserveEndDate != null ">and reserve_end_date = #{reserveEndDate}</if>
|
||||
<if test="approvalNo != null and approvalNo != ''">and approval_no = #{approvalNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRtEnlistmentReserveById" parameterType="Long" resultMap="RtEnlistmentReserveResult">
|
||||
<include refid="selectRtEnlistmentReserveVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String" resultMap="RtEnlistmentReserveResult">
|
||||
<!-- 根据流程编号查询申请记录 -->
|
||||
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String"
|
||||
resultMap="RtEnlistmentReserveResult">
|
||||
<include refid="selectRtEnlistmentReserveVo"/>
|
||||
where process_instance_id = #{processInstanceId}
|
||||
</select>
|
||||
@@ -157,7 +257,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteRtEnlistmentReserveById" parameterType="Long">
|
||||
delete from rt_enlistment_reserve where id = #{id}
|
||||
delete
|
||||
from rt_enlistment_reserve
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRtEnlistmentReserveByIds" parameterType="String">
|
||||
|
||||
Reference in New Issue
Block a user