|
@@ -0,0 +1,179 @@
|
|
|
+<?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.ruoyi.anpin.mapper.TContractManagementMapper">
|
|
|
+
|
|
|
+ <resultMap type="TContractManagement" id="TContractManagementResult">
|
|
|
+ <result property="fId" column="f_id" />
|
|
|
+ <result property="fNo" column="f_no" />
|
|
|
+ <result property="contractNo" column="contract_no" />
|
|
|
+ <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="remark" column="remark" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="fStatus" column="f_status" />
|
|
|
+ <result property="content" column="content" />
|
|
|
+ <result property="copies" column="copies" />
|
|
|
+ <result property="creationDate" column="creation_date" />
|
|
|
+ <result property="fileType" column="file_type" />
|
|
|
+ <result property="submissionMethod" column="submission_method" />
|
|
|
+ <result property="submittingDepartmentId" column="submitting_department_id" />
|
|
|
+ <result property="submittingDepartmentName" column="submitting_department_name" />
|
|
|
+ <result property="issuingUnitId" column="issuing_unit_id" />
|
|
|
+ <result property="archiveTime" column="archive_time" />
|
|
|
+ <result property="validityMonth" column="validity_month" />
|
|
|
+ <result property="storagePeriodTime" column="storage_period_time" />
|
|
|
+ <result property="custodianId" column="custodian_id" />
|
|
|
+ <result property="custodianName" column="custodian_name" />
|
|
|
+ <result property="storageLocation" column="storage_location" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTContractManagementVo">
|
|
|
+ select f_id, f_no, contract_no, create_by, create_time, update_by, update_time, remark, del_flag, f_status, content, copies, creation_date, file_type,
|
|
|
+ submission_method, submitting_department_id, submitting_department_name, issuing_unit_id, archive_time, validity_month, storage_period_time,
|
|
|
+ custodian_id, custodian_name, storage_location
|
|
|
+ from t_contract_management
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTContractManagementList" parameterType="TContractManagement" resultMap="TContractManagementResult">
|
|
|
+ <include refid="selectTContractManagementVo"/>
|
|
|
+ <where>
|
|
|
+ del_flag = 0
|
|
|
+ <if test="fNo != null and fNo != ''"> and f_no like concat('%', #{fNo}, '%')</if>
|
|
|
+ <if test="contractNo != null and contractNo != ''"> and contract_no like concat('%', #{contractNo}, '%')</if>
|
|
|
+ <if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
|
|
|
+ <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
+ <if test="copies != null "> and copies = #{copies}</if>
|
|
|
+ <if test='creationDateList != null and creationDateList[0] != null and creationDateList[0]!= ""'>
|
|
|
+ and creation_date >= #{creationDateList[0]}
|
|
|
+ </if>
|
|
|
+ <if test='creationDateList != null and creationDateList[1] != null and creationDateList[1]!= ""'>
|
|
|
+ and creation_date <= #{creationDateList[1]}
|
|
|
+ </if>
|
|
|
+ <if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
|
|
|
+ <if test="submissionMethod != null and submissionMethod != ''"> and submission_method = #{submissionMethod}</if>
|
|
|
+ <if test="submittingDepartmentId != null "> and submitting_department_id = #{submittingDepartmentId}</if>
|
|
|
+ <if test="submittingDepartmentName != null and submittingDepartmentName != ''"> and submitting_department_name like concat('%', #{submittingDepartmentName}, '%')</if>
|
|
|
+ <if test="issuingUnitId != null "> and issuing_unit_id = #{issuingUnitId}</if>
|
|
|
+ <if test='archiveTimeList != null and archiveTimeList[0] != null and archiveTimeList[0]!= ""'>
|
|
|
+ and archive_time >= #{archiveTimeList[0]}
|
|
|
+ </if>
|
|
|
+ <if test='archiveTimeList != null and archiveTimeList[1] != null and archiveTimeList[1]!= ""'>
|
|
|
+ and archive_time <= #{archiveTimeList[1]}
|
|
|
+ </if>
|
|
|
+ <if test="validityMonth != null "> and validity_month = #{validityMonth}</if>
|
|
|
+ <if test="storagePeriodTime != null "> and storage_period_time = #{storagePeriodTime}</if>
|
|
|
+ <if test="custodianId != null "> and custodian_id = #{custodianId}</if>
|
|
|
+ <if test="custodianName != null and custodianName != ''"> and custodian_name like concat('%', #{custodianName}, '%')</if>
|
|
|
+ <if test="storageLocation != null and storageLocation != ''"> and storage_location = #{storageLocation}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTContractManagementById" parameterType="Long" resultMap="TContractManagementResult">
|
|
|
+ <include refid="selectTContractManagementVo"/>
|
|
|
+ where del_flag = 0
|
|
|
+ and f_id = #{fId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTContractManagement" parameterType="TContractManagement" useGeneratedKeys="true" keyProperty="fId">
|
|
|
+ insert into t_contract_management
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="fNo != null">f_no,</if>
|
|
|
+ <if test="contractNo != null">contract_no,</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>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="fStatus != null and fStatus != ''">f_status,</if>
|
|
|
+ <if test="content != null">content,</if>
|
|
|
+ <if test="copies != null">copies,</if>
|
|
|
+ <if test="creationDate != null">creation_date,</if>
|
|
|
+ <if test="fileType != null">file_type,</if>
|
|
|
+ <if test="submissionMethod != null">submission_method,</if>
|
|
|
+ <if test="submittingDepartmentId != null">submitting_department_id,</if>
|
|
|
+ <if test="submittingDepartmentName != null">submitting_department_name,</if>
|
|
|
+ <if test="issuingUnitId != null">issuing_unit_id,</if>
|
|
|
+ <if test="archiveTime != null">archive_time,</if>
|
|
|
+ <if test="validityMonth != null">validity_month,</if>
|
|
|
+ <if test="storagePeriodTime != null">storage_period_time,</if>
|
|
|
+ <if test="custodianId != null">custodian_id,</if>
|
|
|
+ <if test="custodianName != null">custodian_name,</if>
|
|
|
+ <if test="storageLocation != null">storage_location,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="fNo != null">#{fNo},</if>
|
|
|
+ <if test="contractNo != null">#{contractNo},</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>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="fStatus != null and fStatus != ''">#{fStatus},</if>
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
+ <if test="copies != null">#{copies},</if>
|
|
|
+ <if test="creationDate != null">#{creationDate},</if>
|
|
|
+ <if test="fileType != null">#{fileType},</if>
|
|
|
+ <if test="submissionMethod != null">#{submissionMethod},</if>
|
|
|
+ <if test="submittingDepartmentId != null">#{submittingDepartmentId},</if>
|
|
|
+ <if test="submittingDepartmentName != null">#{submittingDepartmentName},</if>
|
|
|
+ <if test="issuingUnitId != null">#{issuingUnitId},</if>
|
|
|
+ <if test="archiveTime != null">#{archiveTime},</if>
|
|
|
+ <if test="validityMonth != null">#{validityMonth},</if>
|
|
|
+ <if test="storagePeriodTime != null">#{storagePeriodTime},</if>
|
|
|
+ <if test="custodianId != null">#{custodianId},</if>
|
|
|
+ <if test="custodianName != null">#{custodianName},</if>
|
|
|
+ <if test="storageLocation != null">#{storageLocation},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTContractManagement" parameterType="TContractManagement">
|
|
|
+ update t_contract_management
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="fNo != null">f_no = #{fNo},</if>
|
|
|
+ <if test="contractNo != null">contract_no = #{contractNo},</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>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="fStatus != null and fStatus != ''">f_status = #{fStatus},</if>
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
+ <if test="copies != null">copies = #{copies},</if>
|
|
|
+ <if test="creationDate != null">creation_date = #{creationDate},</if>
|
|
|
+ <if test="fileType != null">file_type = #{fileType},</if>
|
|
|
+ <if test="submissionMethod != null">submission_method = #{submissionMethod},</if>
|
|
|
+ <if test="submittingDepartmentId != null">submitting_department_id = #{submittingDepartmentId},</if>
|
|
|
+ <if test="submittingDepartmentName != null">submitting_department_name = #{submittingDepartmentName},</if>
|
|
|
+ <if test="issuingUnitId != null">issuing_unit_id = #{issuingUnitId},</if>
|
|
|
+ <if test="archiveTime != null">archive_time = #{archiveTime},</if>
|
|
|
+ <if test="validityMonth != null">validity_month = #{validityMonth},</if>
|
|
|
+ <if test="storagePeriodTime != null">storage_period_time = #{storagePeriodTime},</if>
|
|
|
+ <if test="custodianId != null">custodian_id = #{custodianId},</if>
|
|
|
+ <if test="custodianName != null">custodian_name = #{custodianName},</if>
|
|
|
+ <if test="storageLocation != null">storage_location = #{storageLocation},</if>
|
|
|
+ </trim>
|
|
|
+ where f_id = #{fId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTContractManagementById" parameterType="Long">
|
|
|
+ update t_contract_management
|
|
|
+ set del_flag = 1 where f_id = #{fId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTContractManagementByIds" parameterType="String">
|
|
|
+ update t_contract_management
|
|
|
+ set del_flag = 1
|
|
|
+ where f_id in
|
|
|
+ <foreach item="fId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{fId}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|