326 lines
19 KiB
XML
326 lines
19 KiB
XML
<?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">
|
|
<mapper namespace="com.srs.comprehensive.mapper.KnzzGlApplyMapper">
|
|
|
|
<resultMap type="KnzzGlApply" id="KnzzGlApplyResult">
|
|
<result property="id" column="id" />
|
|
<result property="stuYearId" column="stu_year_id" />
|
|
<result property="stuNo" column="stu_no" />
|
|
<result property="stuName" column="stu_name" />
|
|
<result property="gender" column="gender" />
|
|
<result property="birthMonth" column="birth_month" />
|
|
<result property="mz" column="mz" />
|
|
<result property="zzmm" column="zzmm" />
|
|
<result property="inTime" column="in_time" />
|
|
<result property="gradeName" column="grade_name" />
|
|
<result property="idCard" column="id_card" />
|
|
<result property="stuPhone" column="stu_phone" />
|
|
<result property="deptName" column="dept_name" />
|
|
<result property="majorName" column="major_name" />
|
|
<result property="className" column="class_name" />
|
|
<result property="pic" column="pic" />
|
|
<result property="helpHis" column="help_his" />
|
|
<result property="familyNum" column="family_num" />
|
|
<result property="monthMoney" column="month_money" />
|
|
<result property="perMoney" column="per_money" />
|
|
<result property="hardType" column="hard_type" />
|
|
<result property="moneySrc" column="money_src" />
|
|
<result property="homeAddr" column="home_addr" />
|
|
<result property="postCode" column="post_code" />
|
|
<result property="majorRank" column="major_rank" />
|
|
<result property="majorNum" column="major_num" />
|
|
<result property="isCph" column="is_cph" />
|
|
<result property="bxk" column="bxk" />
|
|
<result property="jg" column="jg" />
|
|
<result property="classRank" column="class_rank" />
|
|
<result property="classNum" column="class_num" />
|
|
<result property="applyReason" column="apply_reason" />
|
|
<result property="applySign" column="apply_sign" />
|
|
<result property="applyDate" column="apply_date" />
|
|
<result property="fdyCmt" column="fdy_cmt" />
|
|
<result property="fdySign" column="fdy_sign" />
|
|
<result property="fdyDate" column="fdy_date" />
|
|
<result property="fdyNo" column="fdy_no" />
|
|
<result property="xwCmt" column="xw_cmt" />
|
|
<result property="xwSign" column="xw_sign" />
|
|
<result property="xwDate" column="xw_date" />
|
|
<result property="xwNo" column="xw_no" />
|
|
<result property="xgCmt" column="xg_cmt" />
|
|
<result property="xgSign" column="xg_sign" />
|
|
<result property="xgDate" column="xg_date" />
|
|
<result property="xgNo" column="xg_no" />
|
|
<result property="applyStatus" column="apply_status" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="hardFile" column="hard_file" />
|
|
</resultMap>
|
|
|
|
<sql id="selectKnzzGlApplyVo">
|
|
select id, stu_year_id, stu_no, stu_name, gender, birth_month, mz, zzmm, in_time, grade_name, id_card, stu_phone, dept_name, major_name,
|
|
class_name, pic, help_his, family_num, month_money, per_money, hard_type, money_src, home_addr, post_code, major_rank, major_num,
|
|
is_cph, bxk, jg, class_rank, class_num, apply_reason, apply_sign, apply_date, fdy_cmt, fdy_sign, fdy_date, fdy_no, xw_cmt, xw_sign,
|
|
xw_date, xw_no, xg_cmt, xg_sign, xg_date, xg_no, apply_status, create_by, create_time, update_by, update_time,hard_file from knzz_gl_apply
|
|
</sql>
|
|
|
|
<select id="selectKnzzGlApplyList" parameterType="KnzzGlApply" resultMap="KnzzGlApplyResult">
|
|
<include refid="selectKnzzGlApplyVo"/>
|
|
<where>
|
|
<if test="stuYearId != null "> and stu_year_id = #{stuYearId}</if>
|
|
<if test="stuNo != null and stuNo != ''"> and stu_no = #{stuNo}</if>
|
|
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
|
|
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
|
<if test="birthMonth != null and birthMonth != ''"> and birth_month = #{birthMonth}</if>
|
|
<if test="mz != null and mz != ''"> and mz = #{mz}</if>
|
|
<if test="zzmm != null and zzmm != ''"> and zzmm = #{zzmm}</if>
|
|
<if test="inTime != null and inTime != ''"> and in_time = #{inTime}</if>
|
|
<if test="gradeName != null and gradeName != ''"> and grade_name like concat('%', #{gradeName}, '%')</if>
|
|
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
<if test="stuPhone != null and stuPhone != ''"> and stu_phone = #{stuPhone}</if>
|
|
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
|
<if test="majorName != null and majorName != ''"> and major_name like concat('%', #{majorName}, '%')</if>
|
|
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
|
|
<if test="pic != null and pic != ''"> and pic = #{pic}</if>
|
|
<if test="helpHis != null and helpHis != ''"> and help_his = #{helpHis}</if>
|
|
<if test="familyNum != null and familyNum != ''"> and family_num = #{familyNum}</if>
|
|
<if test="monthMoney != null and monthMoney != ''"> and month_money = #{monthMoney}</if>
|
|
<if test="perMoney != null and perMoney != ''"> and per_money = #{perMoney}</if>
|
|
<if test="hardType != null and hardType != ''"> and hard_type = #{hardType}</if>
|
|
<if test="moneySrc != null and moneySrc != ''"> and money_src = #{moneySrc}</if>
|
|
<if test="homeAddr != null and homeAddr != ''"> and home_addr = #{homeAddr}</if>
|
|
<if test="postCode != null and postCode != ''"> and post_code = #{postCode}</if>
|
|
<if test="majorRank != null and majorRank != ''"> and major_rank = #{majorRank}</if>
|
|
<if test="majorNum != null and majorNum != ''"> and major_num = #{majorNum}</if>
|
|
<if test="isCph != null and isCph != ''"> and is_cph = #{isCph}</if>
|
|
<if test="bxk != null and bxk != ''"> and bxk = #{bxk}</if>
|
|
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
|
|
<if test="classRank != null and classRank != ''"> and class_rank = #{classRank}</if>
|
|
<if test="classNum != null and classNum != ''"> and class_num = #{classNum}</if>
|
|
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
|
|
<if test="applySign != null and applySign != ''"> and apply_sign = #{applySign}</if>
|
|
<if test="applyDate != null "> and apply_date = #{applyDate}</if>
|
|
<if test="fdyCmt != null and fdyCmt != ''"> and fdy_cmt = #{fdyCmt}</if>
|
|
<if test="fdySign != null and fdySign != ''"> and fdy_sign = #{fdySign}</if>
|
|
<if test="fdyDate != null "> and fdy_date = #{fdyDate}</if>
|
|
<if test="fdyNo != null and fdyNo != ''"> and fdy_no = #{fdyNo}</if>
|
|
<if test="xwCmt != null and xwCmt != ''"> and xw_cmt = #{xwCmt}</if>
|
|
<if test="xwSign != null and xwSign != ''"> and xw_sign = #{xwSign}</if>
|
|
<if test="xwDate != null "> and xw_date = #{xwDate}</if>
|
|
<if test="xwNo != null and xwNo != ''"> and xw_no = #{xwNo}</if>
|
|
<if test="xgCmt != null and xgCmt != ''"> and xg_cmt = #{xgCmt}</if>
|
|
<if test="xgSign != null and xgSign != ''"> and xg_sign = #{xgSign}</if>
|
|
<if test="xgDate != null "> and xg_date = #{xgDate}</if>
|
|
<if test="xgNo != null and xgNo != ''"> and xg_no = #{xgNo}</if>
|
|
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
|
|
</where>
|
|
order by id desc
|
|
</select>
|
|
|
|
<select id="selectKnzzGlApplyById" parameterType="Long" resultMap="KnzzGlApplyResult">
|
|
<include refid="selectKnzzGlApplyVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertKnzzGlApply" parameterType="KnzzGlApply" useGeneratedKeys="true" keyProperty="id">
|
|
insert into knzz_gl_apply
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="stuYearId != null">stu_year_id,</if>
|
|
<if test="stuNo != null">stu_no,</if>
|
|
<if test="stuName != null">stu_name,</if>
|
|
<if test="gender != null">gender,</if>
|
|
<if test="birthMonth != null">birth_month,</if>
|
|
<if test="mz != null">mz,</if>
|
|
<if test="zzmm != null">zzmm,</if>
|
|
<if test="inTime != null">in_time,</if>
|
|
<if test="gradeName != null">grade_name,</if>
|
|
<if test="idCard != null">id_card,</if>
|
|
<if test="stuPhone != null">stu_phone,</if>
|
|
<if test="deptName != null">dept_name,</if>
|
|
<if test="majorName != null">major_name,</if>
|
|
<if test="className != null">class_name,</if>
|
|
<if test="pic != null">pic,</if>
|
|
<if test="helpHis != null">help_his,</if>
|
|
<if test="familyNum != null">family_num,</if>
|
|
<if test="monthMoney != null">month_money,</if>
|
|
<if test="perMoney != null">per_money,</if>
|
|
<if test="hardType != null">hard_type,</if>
|
|
<if test="moneySrc != null">money_src,</if>
|
|
<if test="homeAddr != null">home_addr,</if>
|
|
<if test="postCode != null">post_code,</if>
|
|
<if test="majorRank != null">major_rank,</if>
|
|
<if test="majorNum != null">major_num,</if>
|
|
<if test="isCph != null">is_cph,</if>
|
|
<if test="bxk != null">bxk,</if>
|
|
<if test="jg != null">jg,</if>
|
|
<if test="classRank != null">class_rank,</if>
|
|
<if test="classNum != null">class_num,</if>
|
|
<if test="applyReason != null">apply_reason,</if>
|
|
<if test="applySign != null">apply_sign,</if>
|
|
<if test="applyDate != null">apply_date,</if>
|
|
<if test="fdyCmt != null">fdy_cmt,</if>
|
|
<if test="fdySign != null">fdy_sign,</if>
|
|
<if test="fdyDate != null">fdy_date,</if>
|
|
<if test="fdyNo != null">fdy_no,</if>
|
|
<if test="xwCmt != null">xw_cmt,</if>
|
|
<if test="xwSign != null">xw_sign,</if>
|
|
<if test="xwDate != null">xw_date,</if>
|
|
<if test="xwNo != null">xw_no,</if>
|
|
<if test="xgCmt != null">xg_cmt,</if>
|
|
<if test="xgSign != null">xg_sign,</if>
|
|
<if test="xgDate != null">xg_date,</if>
|
|
<if test="xgNo != null">xg_no,</if>
|
|
<if test="applyStatus != null">apply_status,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="stuYearId != null">#{stuYearId},</if>
|
|
<if test="stuNo != null">#{stuNo},</if>
|
|
<if test="stuName != null">#{stuName},</if>
|
|
<if test="gender != null">#{gender},</if>
|
|
<if test="birthMonth != null">#{birthMonth},</if>
|
|
<if test="mz != null">#{mz},</if>
|
|
<if test="zzmm != null">#{zzmm},</if>
|
|
<if test="inTime != null">#{inTime},</if>
|
|
<if test="gradeName != null">#{gradeName},</if>
|
|
<if test="idCard != null">#{idCard},</if>
|
|
<if test="stuPhone != null">#{stuPhone},</if>
|
|
<if test="deptName != null">#{deptName},</if>
|
|
<if test="majorName != null">#{majorName},</if>
|
|
<if test="className != null">#{className},</if>
|
|
<if test="pic != null">#{pic},</if>
|
|
<if test="helpHis != null">#{helpHis},</if>
|
|
<if test="familyNum != null">#{familyNum},</if>
|
|
<if test="monthMoney != null">#{monthMoney},</if>
|
|
<if test="perMoney != null">#{perMoney},</if>
|
|
<if test="hardType != null">#{hardType},</if>
|
|
<if test="moneySrc != null">#{moneySrc},</if>
|
|
<if test="homeAddr != null">#{homeAddr},</if>
|
|
<if test="postCode != null">#{postCode},</if>
|
|
<if test="majorRank != null">#{majorRank},</if>
|
|
<if test="majorNum != null">#{majorNum},</if>
|
|
<if test="isCph != null">#{isCph},</if>
|
|
<if test="bxk != null">#{bxk},</if>
|
|
<if test="jg != null">#{jg},</if>
|
|
<if test="classRank != null">#{classRank},</if>
|
|
<if test="classNum != null">#{classNum},</if>
|
|
<if test="applyReason != null">#{applyReason},</if>
|
|
<if test="applySign != null">#{applySign},</if>
|
|
<if test="applyDate != null">#{applyDate},</if>
|
|
<if test="fdyCmt != null">#{fdyCmt},</if>
|
|
<if test="fdySign != null">#{fdySign},</if>
|
|
<if test="fdyDate != null">#{fdyDate},</if>
|
|
<if test="fdyNo != null">#{fdyNo},</if>
|
|
<if test="xwCmt != null">#{xwCmt},</if>
|
|
<if test="xwSign != null">#{xwSign},</if>
|
|
<if test="xwDate != null">#{xwDate},</if>
|
|
<if test="xwNo != null">#{xwNo},</if>
|
|
<if test="xgCmt != null">#{xgCmt},</if>
|
|
<if test="xgSign != null">#{xgSign},</if>
|
|
<if test="xgDate != null">#{xgDate},</if>
|
|
<if test="xgNo != null">#{xgNo},</if>
|
|
<if test="applyStatus != null">#{applyStatus},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateKnzzGlApply" parameterType="KnzzGlApply">
|
|
update knzz_gl_apply
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stuYearId != null">stu_year_id = #{stuYearId},</if>
|
|
<if test="stuNo != null">stu_no = #{stuNo},</if>
|
|
<if test="stuName != null">stu_name = #{stuName},</if>
|
|
<if test="gender != null">gender = #{gender},</if>
|
|
<if test="birthMonth != null">birth_month = #{birthMonth},</if>
|
|
<if test="mz != null">mz = #{mz},</if>
|
|
<if test="zzmm != null">zzmm = #{zzmm},</if>
|
|
<if test="inTime != null">in_time = #{inTime},</if>
|
|
<if test="gradeName != null">grade_name = #{gradeName},</if>
|
|
<if test="idCard != null">id_card = #{idCard},</if>
|
|
<if test="stuPhone != null">stu_phone = #{stuPhone},</if>
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
<if test="majorName != null">major_name = #{majorName},</if>
|
|
<if test="className != null">class_name = #{className},</if>
|
|
<if test="pic != null">pic = #{pic},</if>
|
|
<if test="helpHis != null">help_his = #{helpHis},</if>
|
|
<if test="familyNum != null">family_num = #{familyNum},</if>
|
|
<if test="monthMoney != null">month_money = #{monthMoney},</if>
|
|
<if test="perMoney != null">per_money = #{perMoney},</if>
|
|
<if test="hardType != null">hard_type = #{hardType},</if>
|
|
<if test="moneySrc != null">money_src = #{moneySrc},</if>
|
|
<if test="homeAddr != null">home_addr = #{homeAddr},</if>
|
|
<if test="postCode != null">post_code = #{postCode},</if>
|
|
<if test="majorRank != null">major_rank = #{majorRank},</if>
|
|
<if test="majorNum != null">major_num = #{majorNum},</if>
|
|
<if test="isCph != null">is_cph = #{isCph},</if>
|
|
<if test="bxk != null">bxk = #{bxk},</if>
|
|
<if test="jg != null">jg = #{jg},</if>
|
|
<if test="classRank != null">class_rank = #{classRank},</if>
|
|
<if test="classNum != null">class_num = #{classNum},</if>
|
|
<if test="applyReason != null">apply_reason = #{applyReason},</if>
|
|
<if test="applySign != null">apply_sign = #{applySign},</if>
|
|
<if test="applyDate != null">apply_date = #{applyDate},</if>
|
|
<if test="fdyCmt != null">fdy_cmt = #{fdyCmt},</if>
|
|
<if test="fdySign != null">fdy_sign = #{fdySign},</if>
|
|
<if test="fdyDate != null">fdy_date = #{fdyDate},</if>
|
|
<if test="fdyNo != null">fdy_no = #{fdyNo},</if>
|
|
<if test="xwCmt != null">xw_cmt = #{xwCmt},</if>
|
|
<if test="xwSign != null">xw_sign = #{xwSign},</if>
|
|
<if test="xwDate != null">xw_date = #{xwDate},</if>
|
|
<if test="xwNo != null">xw_no = #{xwNo},</if>
|
|
<if test="xgCmt != null">xg_cmt = #{xgCmt},</if>
|
|
<if test="xgSign != null">xg_sign = #{xgSign},</if>
|
|
<if test="xgDate != null">xg_date = #{xgDate},</if>
|
|
<if test="xgNo != null">xg_no = #{xgNo},</if>
|
|
<if test="applyStatus != null">apply_status = #{applyStatus},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteKnzzGlApplyById" parameterType="Long">
|
|
delete from knzz_gl_apply where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteKnzzGlApplyByIds" parameterType="String">
|
|
delete from knzz_gl_apply where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
|
|
<select id="listView" resultType="KnzzGlApply" parameterType="KnzzGlApply">
|
|
select a.*,c.stu_year_name,d.`name` as fdy_name,e.`name` as xw_name,f.`name` as xg_name
|
|
from knzz_gl_apply as a
|
|
left join view_stu_info as b on a.stu_no = b.stu_no
|
|
left join srs_stu_year as c on a.stu_year_id = c.id
|
|
left join cph_teacher as d on a.fdy_no = d.employee_id
|
|
left join qgzx_teacher as e on a.xw_no = d.employee_id
|
|
left join qgzx_teacher as f on a.xg_no = f.employee_id
|
|
<where>
|
|
<if test="stuNo != null and stuNo != ''"> and a.stu_no = #{stuNo}</if>
|
|
<if test="applyStatus != null and applyStatus != ''"> and a.apply_status = #{applyStatus}</if>
|
|
<if test="fdyNo != null and fdyNo != ''"> and b.t_no = #{fdyNo}</if>
|
|
<if test="deptId != null "> and b.dept_id = #{deptId}</if>
|
|
<if test="stuYearId != null "> and a.stu_year_id = #{stuYearId}</if>
|
|
<if test="deptName != null and deptName != ''"> and b.dept_name like concat('%',#{ deptName},'%')</if>
|
|
<if test="stuName != null and stuName != ''"> and b.stu_name like concat('%',#{stuName},'%')</if>
|
|
<if test="className != null and className != ''"> and b.class_name like concat('%',#{className},'%')</if>
|
|
</where>
|
|
order by a.id desc
|
|
</select>
|
|
|
|
</mapper>
|