外宿申请-初始化

This commit is contained in:
962704835@qq.com
2025-12-05 19:20:39 +08:00
parent 214ad239c0
commit 351e7365be
19 changed files with 2041 additions and 2 deletions

View File

@@ -0,0 +1,262 @@
<?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.dormitory.mapper.DmsOutsideAccommodationApplyMapper">
<resultMap type="DmsOutsideAccommodationApply" id="DmsOutsideAccommodationApplyResult">
<result property="id" column="id" />
<result property="applyNo" column="apply_no" />
<result property="studentId" column="student_id" />
<result property="studentNo" column="student_no" />
<result property="studentName" column="student_name" />
<result property="gender" column="gender" />
<result property="birthDate" column="birth_date" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="majorId" column="major_id" />
<result property="majorName" column="major_name" />
<result property="classId" column="class_id" />
<result property="className" column="class_name" />
<result property="originalDormitory" column="original_dormitory" />
<result property="accommodationFeeStatus" column="accommodation_fee_status" />
<result property="applyReason" column="apply_reason" />
<result property="outsideAddress" column="outside_address" />
<result property="province" column="province" />
<result property="city" column="city" />
<result property="district" column="district" />
<result property="emergencyContact" column="emergency_contact" />
<result property="emergencyPhone" column="emergency_phone" />
<result property="parentOpinion" column="parent_opinion" />
<result property="parentSignAttachment" column="parent_sign_attachment" />
<result property="parentPhone" column="parent_phone" />
<result property="parentProvince" column="parent_province" />
<result property="parentCity" column="parent_city" />
<result property="parentDistrict" column="parent_district" />
<result property="parentDetailAddress" column="parent_detail_address" />
<result property="studentPromiseSign" column="student_promise_sign" />
<result property="promiseDate" column="promise_date" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
<result property="status" column="status" />
<result property="rejectReason" column="reject_reason" />
<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="isValid" column="is_valid" />
<result property="teacherName" column="teacher_name" />
<result property="affixId" column="affix_id" />
<result property="deployId" column="deploy_id" />
<result property="processInstanceId" column="process_instance_id" />
</resultMap>
<sql id="selectDmsOutsideAccommodationApplyVo">
select id, apply_no, student_id, student_no, student_name, gender, birth_date, dept_id, dept_name, major_id, major_name, class_id, class_name, original_dormitory, accommodation_fee_status, apply_reason, outside_address, province, city, district, emergency_contact, emergency_phone, parent_opinion, parent_sign_attachment, parent_phone, parent_province, parent_city, parent_district, parent_detail_address, student_promise_sign, promise_date, start_date, end_date, status, reject_reason, create_time, create_by, update_time, update_by, is_valid, teacher_name, affix_id, deploy_id, process_instance_id from dms_outside_accommodation_apply
</sql>
<select id="selectDmsOutsideAccommodationApplyList" parameterType="DmsOutsideAccommodationApply" resultMap="DmsOutsideAccommodationApplyResult">
<include refid="selectDmsOutsideAccommodationApplyVo"/>
<where>
<if test="applyNo != null and applyNo != ''"> and apply_no = #{applyNo}</if>
<if test="studentId != null "> and student_id = #{studentId}</if>
<if test="studentNo != null and studentNo != ''"> and student_no = #{studentNo}</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="birthDate != null "> and birth_date = #{birthDate}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="majorId != null "> and major_id = #{majorId}</if>
<if test="majorName != null and majorName != ''"> and major_name like concat('%', #{majorName}, '%')</if>
<if test="classId != null "> and class_id = #{classId}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="originalDormitory != null and originalDormitory != ''"> and original_dormitory = #{originalDormitory}</if>
<if test="accommodationFeeStatus != null "> and accommodation_fee_status = #{accommodationFeeStatus}</if>
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
<if test="outsideAddress != null and outsideAddress != ''"> and outside_address = #{outsideAddress}</if>
<if test="province != null and province != ''"> and province = #{province}</if>
<if test="city != null and city != ''"> and city = #{city}</if>
<if test="district != null and district != ''"> and district = #{district}</if>
<if test="emergencyContact != null and emergencyContact != ''"> and emergency_contact = #{emergencyContact}</if>
<if test="emergencyPhone != null and emergencyPhone != ''"> and emergency_phone = #{emergencyPhone}</if>
<if test="parentOpinion != null "> and parent_opinion = #{parentOpinion}</if>
<if test="parentSignAttachment != null and parentSignAttachment != ''"> and parent_sign_attachment = #{parentSignAttachment}</if>
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="parentProvince != null and parentProvince != ''"> and parent_province = #{parentProvince}</if>
<if test="parentCity != null and parentCity != ''"> and parent_city = #{parentCity}</if>
<if test="parentDistrict != null and parentDistrict != ''"> and parent_district = #{parentDistrict}</if>
<if test="parentDetailAddress != null and parentDetailAddress != ''"> and parent_detail_address = #{parentDetailAddress}</if>
<if test="studentPromiseSign != null and studentPromiseSign != ''"> and student_promise_sign = #{studentPromiseSign}</if>
<if test="promiseDate != null "> and promise_date = #{promiseDate}</if>
<if test="startDate != null "> and start_date = #{startDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
<if test="status != null "> and status = #{status}</if>
<if test="rejectReason != null and rejectReason != ''"> and reject_reason = #{rejectReason}</if>
<if test="isValid != null "> and is_valid = #{isValid}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
<if test="affixId != null and affixId != ''"> and affix_id = #{affixId}</if>
<if test="deployId != null and deployId != ''"> and deploy_id = #{deployId}</if>
<if test="processInstanceId != null and processInstanceId != ''"> and process_instance_id = #{processInstanceId}</if>
</where>
</select>
<select id="selectDmsOutsideAccommodationApplyById" parameterType="Long" resultMap="DmsOutsideAccommodationApplyResult">
<include refid="selectDmsOutsideAccommodationApplyVo"/>
where id = #{id}
</select>
<insert id="insertDmsOutsideAccommodationApply" parameterType="DmsOutsideAccommodationApply" useGeneratedKeys="true" keyProperty="id">
insert into dms_outside_accommodation_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyNo != null and applyNo != ''">apply_no,</if>
<if test="studentId != null">student_id,</if>
<if test="studentNo != null and studentNo != ''">student_no,</if>
<if test="studentName != null and studentName != ''">student_name,</if>
<if test="gender != null">gender,</if>
<if test="birthDate != null">birth_date,</if>
<if test="deptId != null">dept_id,</if>
<if test="deptName != null and deptName != ''">dept_name,</if>
<if test="majorId != null">major_id,</if>
<if test="majorName != null and majorName != ''">major_name,</if>
<if test="classId != null">class_id,</if>
<if test="className != null and className != ''">class_name,</if>
<if test="originalDormitory != null and originalDormitory != ''">original_dormitory,</if>
<if test="accommodationFeeStatus != null">accommodation_fee_status,</if>
<if test="applyReason != null and applyReason != ''">apply_reason,</if>
<if test="outsideAddress != null and outsideAddress != ''">outside_address,</if>
<if test="province != null and province != ''">province,</if>
<if test="city != null and city != ''">city,</if>
<if test="district != null and district != ''">district,</if>
<if test="emergencyContact != null and emergencyContact != ''">emergency_contact,</if>
<if test="emergencyPhone != null and emergencyPhone != ''">emergency_phone,</if>
<if test="parentOpinion != null">parent_opinion,</if>
<if test="parentSignAttachment != null and parentSignAttachment != ''">parent_sign_attachment,</if>
<if test="parentPhone != null and parentPhone != ''">parent_phone,</if>
<if test="parentProvince != null and parentProvince != ''">parent_province,</if>
<if test="parentCity != null and parentCity != ''">parent_city,</if>
<if test="parentDistrict != null and parentDistrict != ''">parent_district,</if>
<if test="parentDetailAddress != null and parentDetailAddress != ''">parent_detail_address,</if>
<if test="studentPromiseSign != null and studentPromiseSign != ''">student_promise_sign,</if>
<if test="promiseDate != null">promise_date,</if>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
<if test="status != null">status,</if>
<if test="rejectReason != null">reject_reason,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="isValid != null">is_valid,</if>
<if test="teacherName != null and teacherName != ''">teacher_name,</if>
<if test="affixId != null">affix_id,</if>
<if test="deployId != null">deploy_id,</if>
<if test="processInstanceId != null">process_instance_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
<if test="studentId != null">#{studentId},</if>
<if test="studentNo != null and studentNo != ''">#{studentNo},</if>
<if test="studentName != null and studentName != ''">#{studentName},</if>
<if test="gender != null">#{gender},</if>
<if test="birthDate != null">#{birthDate},</if>
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null and deptName != ''">#{deptName},</if>
<if test="majorId != null">#{majorId},</if>
<if test="majorName != null and majorName != ''">#{majorName},</if>
<if test="classId != null">#{classId},</if>
<if test="className != null and className != ''">#{className},</if>
<if test="originalDormitory != null and originalDormitory != ''">#{originalDormitory},</if>
<if test="accommodationFeeStatus != null">#{accommodationFeeStatus},</if>
<if test="applyReason != null and applyReason != ''">#{applyReason},</if>
<if test="outsideAddress != null and outsideAddress != ''">#{outsideAddress},</if>
<if test="province != null and province != ''">#{province},</if>
<if test="city != null and city != ''">#{city},</if>
<if test="district != null and district != ''">#{district},</if>
<if test="emergencyContact != null and emergencyContact != ''">#{emergencyContact},</if>
<if test="emergencyPhone != null and emergencyPhone != ''">#{emergencyPhone},</if>
<if test="parentOpinion != null">#{parentOpinion},</if>
<if test="parentSignAttachment != null and parentSignAttachment != ''">#{parentSignAttachment},</if>
<if test="parentPhone != null and parentPhone != ''">#{parentPhone},</if>
<if test="parentProvince != null and parentProvince != ''">#{parentProvince},</if>
<if test="parentCity != null and parentCity != ''">#{parentCity},</if>
<if test="parentDistrict != null and parentDistrict != ''">#{parentDistrict},</if>
<if test="parentDetailAddress != null and parentDetailAddress != ''">#{parentDetailAddress},</if>
<if test="studentPromiseSign != null and studentPromiseSign != ''">#{studentPromiseSign},</if>
<if test="promiseDate != null">#{promiseDate},</if>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="status != null">#{status},</if>
<if test="rejectReason != null">#{rejectReason},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="isValid != null">#{isValid},</if>
<if test="teacherName != null and teacherName != ''">#{teacherName},</if>
<if test="affixId != null">#{affixId},</if>
<if test="deployId != null">#{deployId},</if>
<if test="processInstanceId != null">#{processInstanceId},</if>
</trim>
</insert>
<update id="updateDmsOutsideAccommodationApply" parameterType="DmsOutsideAccommodationApply">
update dms_outside_accommodation_apply
<trim prefix="SET" suffixOverrides=",">
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
<if test="studentId != null">student_id = #{studentId},</if>
<if test="studentNo != null and studentNo != ''">student_no = #{studentNo},</if>
<if test="studentName != null and studentName != ''">student_name = #{studentName},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="birthDate != null">birth_date = #{birthDate},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
<if test="majorId != null">major_id = #{majorId},</if>
<if test="majorName != null and majorName != ''">major_name = #{majorName},</if>
<if test="classId != null">class_id = #{classId},</if>
<if test="className != null and className != ''">class_name = #{className},</if>
<if test="originalDormitory != null and originalDormitory != ''">original_dormitory = #{originalDormitory},</if>
<if test="accommodationFeeStatus != null">accommodation_fee_status = #{accommodationFeeStatus},</if>
<if test="applyReason != null and applyReason != ''">apply_reason = #{applyReason},</if>
<if test="outsideAddress != null and outsideAddress != ''">outside_address = #{outsideAddress},</if>
<if test="province != null and province != ''">province = #{province},</if>
<if test="city != null and city != ''">city = #{city},</if>
<if test="district != null and district != ''">district = #{district},</if>
<if test="emergencyContact != null and emergencyContact != ''">emergency_contact = #{emergencyContact},</if>
<if test="emergencyPhone != null and emergencyPhone != ''">emergency_phone = #{emergencyPhone},</if>
<if test="parentOpinion != null">parent_opinion = #{parentOpinion},</if>
<if test="parentSignAttachment != null and parentSignAttachment != ''">parent_sign_attachment = #{parentSignAttachment},</if>
<if test="parentPhone != null and parentPhone != ''">parent_phone = #{parentPhone},</if>
<if test="parentProvince != null and parentProvince != ''">parent_province = #{parentProvince},</if>
<if test="parentCity != null and parentCity != ''">parent_city = #{parentCity},</if>
<if test="parentDistrict != null and parentDistrict != ''">parent_district = #{parentDistrict},</if>
<if test="parentDetailAddress != null and parentDetailAddress != ''">parent_detail_address = #{parentDetailAddress},</if>
<if test="studentPromiseSign != null and studentPromiseSign != ''">student_promise_sign = #{studentPromiseSign},</if>
<if test="promiseDate != null">promise_date = #{promiseDate},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="status != null">status = #{status},</if>
<if test="rejectReason != null">reject_reason = #{rejectReason},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="isValid != null">is_valid = #{isValid},</if>
<if test="teacherName != null and teacherName != ''">teacher_name = #{teacherName},</if>
<if test="affixId != null">affix_id = #{affixId},</if>
<if test="deployId != null">deploy_id = #{deployId},</if>
<if test="processInstanceId != null">process_instance_id = #{processInstanceId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDmsOutsideAccommodationApplyById" parameterType="Long">
delete from dms_outside_accommodation_apply where id = #{id}
</delete>
<delete id="deleteDmsOutsideAccommodationApplyByIds" parameterType="String">
delete from dms_outside_accommodation_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,111 @@
<?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.dormitory.mapper.DmsOutsideAccommodationApprovalMapper">
<resultMap type="DmsOutsideAccommodationApproval" id="DmsOutsideAccommodationApprovalResult">
<result property="id" column="id" />
<result property="applyId" column="apply_id" />
<result property="applyNo" column="apply_no" />
<result property="approvalNode" column="approval_node" />
<result property="approverId" column="approver_id" />
<result property="approverName" column="approver_name" />
<result property="approverRole" column="approver_role" />
<result property="approvalOpinion" column="approval_opinion" />
<result property="approvalResult" column="approval_result" />
<result property="approvalTime" column="approval_time" />
<result property="processInstanceId" column="process_instance_id" />
<result property="studentName" column="student_name" />
<result property="studentNo" column="student_no" />
</resultMap>
<sql id="selectDmsOutsideAccommodationApprovalVo">
select id, apply_id, apply_no, approval_node, approver_id, approver_name, approver_role, approval_opinion, approval_result, approval_time, process_instance_id, student_name, student_no from dms_outside_accommodation_approval
</sql>
<select id="selectDmsOutsideAccommodationApprovalList" parameterType="DmsOutsideAccommodationApproval" resultMap="DmsOutsideAccommodationApprovalResult">
<include refid="selectDmsOutsideAccommodationApprovalVo"/>
<where>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyNo != null and applyNo != ''"> and apply_no = #{applyNo}</if>
<if test="approvalNode != null "> and approval_node = #{approvalNode}</if>
<if test="approverId != null "> and approver_id = #{approverId}</if>
<if test="approverName != null and approverName != ''"> and approver_name like concat('%', #{approverName}, '%')</if>
<if test="approverRole != null and approverRole != ''"> and approver_role = #{approverRole}</if>
<if test="approvalOpinion != null and approvalOpinion != ''"> and approval_opinion = #{approvalOpinion}</if>
<if test="approvalResult != null "> and approval_result = #{approvalResult}</if>
<if test="approvalTime != null "> and approval_time = #{approvalTime}</if>
<if test="processInstanceId != null and processInstanceId != ''"> and process_instance_id = #{processInstanceId}</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="selectDmsOutsideAccommodationApprovalById" parameterType="Long" resultMap="DmsOutsideAccommodationApprovalResult">
<include refid="selectDmsOutsideAccommodationApprovalVo"/>
where id = #{id}
</select>
<insert id="insertDmsOutsideAccommodationApproval" parameterType="DmsOutsideAccommodationApproval" useGeneratedKeys="true" keyProperty="id">
insert into dms_outside_accommodation_approval
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyId != null">apply_id,</if>
<if test="applyNo != null and applyNo != ''">apply_no,</if>
<if test="approvalNode != null">approval_node,</if>
<if test="approverId != null">approver_id,</if>
<if test="approverName != null and approverName != ''">approver_name,</if>
<if test="approverRole != null and approverRole != ''">approver_role,</if>
<if test="approvalOpinion != null">approval_opinion,</if>
<if test="approvalResult != null">approval_result,</if>
<if test="approvalTime != null">approval_time,</if>
<if test="processInstanceId != null">process_instance_id,</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="applyNo != null and applyNo != ''">#{applyNo},</if>
<if test="approvalNode != null">#{approvalNode},</if>
<if test="approverId != null">#{approverId},</if>
<if test="approverName != null and approverName != ''">#{approverName},</if>
<if test="approverRole != null and approverRole != ''">#{approverRole},</if>
<if test="approvalOpinion != null">#{approvalOpinion},</if>
<if test="approvalResult != null">#{approvalResult},</if>
<if test="approvalTime != null">#{approvalTime},</if>
<if test="processInstanceId != null">#{processInstanceId},</if>
<if test="studentName != null and studentName != ''">#{studentName},</if>
<if test="studentNo != null and studentNo != ''">#{studentNo},</if>
</trim>
</insert>
<update id="updateDmsOutsideAccommodationApproval" parameterType="DmsOutsideAccommodationApproval">
update dms_outside_accommodation_approval
<trim prefix="SET" suffixOverrides=",">
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
<if test="approvalNode != null">approval_node = #{approvalNode},</if>
<if test="approverId != null">approver_id = #{approverId},</if>
<if test="approverName != null and approverName != ''">approver_name = #{approverName},</if>
<if test="approverRole != null and approverRole != ''">approver_role = #{approverRole},</if>
<if test="approvalOpinion != null">approval_opinion = #{approvalOpinion},</if>
<if test="approvalResult != null">approval_result = #{approvalResult},</if>
<if test="approvalTime != null">approval_time = #{approvalTime},</if>
<if test="processInstanceId != null">process_instance_id = #{processInstanceId},</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="deleteDmsOutsideAccommodationApprovalById" parameterType="Long">
delete from dms_outside_accommodation_approval where id = #{id}
</delete>
<delete id="deleteDmsOutsideAccommodationApprovalByIds" parameterType="String">
delete from dms_outside_accommodation_approval where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,100 @@
<?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.dormitory.mapper.DmsOutsideAccommodationAttachmentMapper">
<resultMap type="DmsOutsideAccommodationAttachment" id="DmsOutsideAccommodationAttachmentResult">
<result property="id" column="id" />
<result property="applyId" column="apply_id" />
<result property="attachmentName" column="attachment_name" />
<result property="attachmentUrl" column="attachment_url" />
<result property="attachmentType" column="attachment_type" />
<result property="fileSize" column="file_size" />
<result property="fileSuffix" column="file_suffix" />
<result property="createTime" column="create_time" />
<result property="processInstanceId" column="process_instance_id" />
<result property="studentName" column="student_name" />
<result property="studentNo" column="student_no" />
</resultMap>
<sql id="selectDmsOutsideAccommodationAttachmentVo">
select id, apply_id, attachment_name, attachment_url, attachment_type, file_size, file_suffix, create_time, process_instance_id, student_name, student_no from dms_outside_accommodation_attachment
</sql>
<select id="selectDmsOutsideAccommodationAttachmentList" parameterType="DmsOutsideAccommodationAttachment" resultMap="DmsOutsideAccommodationAttachmentResult">
<include refid="selectDmsOutsideAccommodationAttachmentVo"/>
<where>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="attachmentName != null and attachmentName != ''"> and attachment_name like concat('%', #{attachmentName}, '%')</if>
<if test="attachmentUrl != null and attachmentUrl != ''"> and attachment_url = #{attachmentUrl}</if>
<if test="attachmentType != null "> and attachment_type = #{attachmentType}</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="fileSuffix != null and fileSuffix != ''"> and file_suffix = #{fileSuffix}</if>
<if test="processInstanceId != null and processInstanceId != ''"> and process_instance_id = #{processInstanceId}</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="selectDmsOutsideAccommodationAttachmentById" parameterType="Long" resultMap="DmsOutsideAccommodationAttachmentResult">
<include refid="selectDmsOutsideAccommodationAttachmentVo"/>
where id = #{id}
</select>
<insert id="insertDmsOutsideAccommodationAttachment" parameterType="DmsOutsideAccommodationAttachment" useGeneratedKeys="true" keyProperty="id">
insert into dms_outside_accommodation_attachment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyId != null">apply_id,</if>
<if test="attachmentName != null and attachmentName != ''">attachment_name,</if>
<if test="attachmentUrl != null and attachmentUrl != ''">attachment_url,</if>
<if test="attachmentType != null">attachment_type,</if>
<if test="fileSize != null">file_size,</if>
<if test="fileSuffix != null and fileSuffix != ''">file_suffix,</if>
<if test="createTime != null">create_time,</if>
<if test="processInstanceId != null">process_instance_id,</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="attachmentName != null and attachmentName != ''">#{attachmentName},</if>
<if test="attachmentUrl != null and attachmentUrl != ''">#{attachmentUrl},</if>
<if test="attachmentType != null">#{attachmentType},</if>
<if test="fileSize != null">#{fileSize},</if>
<if test="fileSuffix != null and fileSuffix != ''">#{fileSuffix},</if>
<if test="createTime != null">#{createTime},</if>
<if test="processInstanceId != null">#{processInstanceId},</if>
<if test="studentName != null and studentName != ''">#{studentName},</if>
<if test="studentNo != null and studentNo != ''">#{studentNo},</if>
</trim>
</insert>
<update id="updateDmsOutsideAccommodationAttachment" parameterType="DmsOutsideAccommodationAttachment">
update dms_outside_accommodation_attachment
<trim prefix="SET" suffixOverrides=",">
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="attachmentName != null and attachmentName != ''">attachment_name = #{attachmentName},</if>
<if test="attachmentUrl != null and attachmentUrl != ''">attachment_url = #{attachmentUrl},</if>
<if test="attachmentType != null">attachment_type = #{attachmentType},</if>
<if test="fileSize != null">file_size = #{fileSize},</if>
<if test="fileSuffix != null and fileSuffix != ''">file_suffix = #{fileSuffix},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="processInstanceId != null">process_instance_id = #{processInstanceId},</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="deleteDmsOutsideAccommodationAttachmentById" parameterType="Long">
delete from dms_outside_accommodation_attachment where id = #{id}
</delete>
<delete id="deleteDmsOutsideAccommodationAttachmentByIds" parameterType="String">
delete from dms_outside_accommodation_attachment where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>