YZProjectCloud/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoMapper.xml

215 lines
14 KiB
XML
Raw Normal View History

2024-08-25 13:31:15 +08:00
<?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.yanzhu.manage.mapper.ProProjectInfoMapper">
<resultMap type="ProProjectInfo" id="ProProjectInfoResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="visDeptId" column="vis_dept_id" />
<result property="disDeptId" column="dis_dept_id" />
<result property="projectName" column="project_name" />
<result property="projectCode" column="project_code" />
<result property="simpleName" column="simple_name" />
<result property="projectType" column="project_type" />
<result property="projiectLevel" column="projiect_level" />
<result property="projectRegional" column="project_regional" />
<result property="projectAddress" column="project_address" />
<result property="projectNature" column="project_nature" />
<result property="licenceNumber" column="licence_number" />
<result property="projectPerson" column="project_person" />
<result property="projectPersonPhone" column="project_person_phone" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="projectTimeLimit" column="project_time_limit" />
<result property="totalInvestment" column="total_investment" />
<result property="floorArea" column="floor_area" />
<result property="totalOutputValue" column="total_output_value" />
<result property="plannedCompletionTime" column="planned_completion_time" />
<result property="scheduledStartTime" column="scheduled_start_time" />
<result property="actualOperatingTime" column="actual_operating_time" />
<result property="actualCompletionTime" column="actual_completion_time" />
<result property="contractAmount" column="contract_amount" />
<result property="paidAmount" column="paid_amount" />
<result property="onAccountAmount" column="on_account_amount" />
<result property="projectSchedule" column="project_schedule" />
<result property="projectSummarize" column="project_summarize" />
<result property="projectQrCode" column="project_qr_code" />
<result property="projectStatus" column="project_status" />
<result property="projectSort" column="project_sort" />
<result property="isDel" column="is_del" />
<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" />
</resultMap>
<sql id="selectProProjectInfoVo">
select id, dept_id, vis_dept_id, dis_dept_id, project_name, project_code, simple_name, project_type, projiect_level, project_regional, project_address, project_nature, licence_number, project_person, project_person_phone, longitude, latitude, project_time_limit, total_investment, floor_area, total_output_value, planned_completion_time, scheduled_start_time, actual_operating_time, actual_completion_time, contract_amount, paid_amount, on_account_amount, project_schedule, project_summarize, project_qr_code, project_status, project_sort, is_del, create_by, create_time, update_by, update_time, remark from pro_project_info
</sql>
<select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult">
<include refid="selectProProjectInfoVo"/>
<where>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="visDeptId != null "> and vis_dept_id = #{visDeptId}</if>
<if test="disDeptId != null "> and dis_dept_id = #{disDeptId}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
<if test="projectCode != null and projectCode != ''"> and project_code = #{projectCode}</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="projectType != null and projectType != ''"> and project_type = #{projectType}</if>
<if test="projiectLevel != null and projiectLevel != ''"> and projiect_level = #{projiectLevel}</if>
<if test="projectPerson != null and projectPerson != ''"> and project_person = #{projectPerson}</if>
<if test="projectPersonPhone != null and projectPersonPhone != ''"> and project_person_phone = #{projectPersonPhone}</if>
<if test="projectStatus != null and projectStatus != ''"> and project_status = #{projectStatus}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectProProjectInfoById" parameterType="Long" resultMap="ProProjectInfoResult">
<include refid="selectProProjectInfoVo"/>
where id = #{id}
</select>
<insert id="insertProProjectInfo" parameterType="ProProjectInfo" useGeneratedKeys="true" keyProperty="id">
insert into pro_project_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="visDeptId != null">vis_dept_id,</if>
<if test="disDeptId != null">dis_dept_id,</if>
<if test="projectName != null">project_name,</if>
<if test="projectCode != null">project_code,</if>
<if test="simpleName != null">simple_name,</if>
<if test="projectType != null">project_type,</if>
<if test="projiectLevel != null">projiect_level,</if>
<if test="projectRegional != null">project_regional,</if>
<if test="projectAddress != null">project_address,</if>
<if test="projectNature != null">project_nature,</if>
<if test="licenceNumber != null">licence_number,</if>
<if test="projectPerson != null">project_person,</if>
<if test="projectPersonPhone != null">project_person_phone,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="projectTimeLimit != null">project_time_limit,</if>
<if test="totalInvestment != null">total_investment,</if>
<if test="floorArea != null">floor_area,</if>
<if test="totalOutputValue != null">total_output_value,</if>
<if test="plannedCompletionTime != null">planned_completion_time,</if>
<if test="scheduledStartTime != null">scheduled_start_time,</if>
<if test="actualOperatingTime != null">actual_operating_time,</if>
<if test="actualCompletionTime != null">actual_completion_time,</if>
<if test="contractAmount != null">contract_amount,</if>
<if test="paidAmount != null">paid_amount,</if>
<if test="onAccountAmount != null">on_account_amount,</if>
<if test="projectSchedule != null">project_schedule,</if>
<if test="projectSummarize != null">project_summarize,</if>
<if test="projectQrCode != null">project_qr_code,</if>
<if test="projectStatus != null">project_status,</if>
<if test="projectSort != null">project_sort,</if>
<if test="isDel != null">is_del,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="visDeptId != null">#{visDeptId},</if>
<if test="disDeptId != null">#{disDeptId},</if>
<if test="projectName != null">#{projectName},</if>
<if test="projectCode != null">#{projectCode},</if>
<if test="simpleName != null">#{simpleName},</if>
<if test="projectType != null">#{projectType},</if>
<if test="projiectLevel != null">#{projiectLevel},</if>
<if test="projectRegional != null">#{projectRegional},</if>
<if test="projectAddress != null">#{projectAddress},</if>
<if test="projectNature != null">#{projectNature},</if>
<if test="licenceNumber != null">#{licenceNumber},</if>
<if test="projectPerson != null">#{projectPerson},</if>
<if test="projectPersonPhone != null">#{projectPersonPhone},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="projectTimeLimit != null">#{projectTimeLimit},</if>
<if test="totalInvestment != null">#{totalInvestment},</if>
<if test="floorArea != null">#{floorArea},</if>
<if test="totalOutputValue != null">#{totalOutputValue},</if>
<if test="plannedCompletionTime != null">#{plannedCompletionTime},</if>
<if test="scheduledStartTime != null">#{scheduledStartTime},</if>
<if test="actualOperatingTime != null">#{actualOperatingTime},</if>
<if test="actualCompletionTime != null">#{actualCompletionTime},</if>
<if test="contractAmount != null">#{contractAmount},</if>
<if test="paidAmount != null">#{paidAmount},</if>
<if test="onAccountAmount != null">#{onAccountAmount},</if>
<if test="projectSchedule != null">#{projectSchedule},</if>
<if test="projectSummarize != null">#{projectSummarize},</if>
<if test="projectQrCode != null">#{projectQrCode},</if>
<if test="projectStatus != null">#{projectStatus},</if>
<if test="projectSort != null">#{projectSort},</if>
<if test="isDel != null">#{isDel},</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>
</trim>
</insert>
<update id="updateProProjectInfo" parameterType="ProProjectInfo">
update pro_project_info
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="visDeptId != null">vis_dept_id = #{visDeptId},</if>
<if test="disDeptId != null">dis_dept_id = #{disDeptId},</if>
<if test="projectName != null">project_name = #{projectName},</if>
<if test="projectCode != null">project_code = #{projectCode},</if>
<if test="simpleName != null">simple_name = #{simpleName},</if>
<if test="projectType != null">project_type = #{projectType},</if>
<if test="projiectLevel != null">projiect_level = #{projiectLevel},</if>
<if test="projectRegional != null">project_regional = #{projectRegional},</if>
<if test="projectAddress != null">project_address = #{projectAddress},</if>
<if test="projectNature != null">project_nature = #{projectNature},</if>
<if test="licenceNumber != null">licence_number = #{licenceNumber},</if>
<if test="projectPerson != null">project_person = #{projectPerson},</if>
<if test="projectPersonPhone != null">project_person_phone = #{projectPersonPhone},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="projectTimeLimit != null">project_time_limit = #{projectTimeLimit},</if>
<if test="totalInvestment != null">total_investment = #{totalInvestment},</if>
<if test="floorArea != null">floor_area = #{floorArea},</if>
<if test="totalOutputValue != null">total_output_value = #{totalOutputValue},</if>
<if test="plannedCompletionTime != null">planned_completion_time = #{plannedCompletionTime},</if>
<if test="scheduledStartTime != null">scheduled_start_time = #{scheduledStartTime},</if>
<if test="actualOperatingTime != null">actual_operating_time = #{actualOperatingTime},</if>
<if test="actualCompletionTime != null">actual_completion_time = #{actualCompletionTime},</if>
<if test="contractAmount != null">contract_amount = #{contractAmount},</if>
<if test="paidAmount != null">paid_amount = #{paidAmount},</if>
<if test="onAccountAmount != null">on_account_amount = #{onAccountAmount},</if>
<if test="projectSchedule != null">project_schedule = #{projectSchedule},</if>
<if test="projectSummarize != null">project_summarize = #{projectSummarize},</if>
<if test="projectQrCode != null">project_qr_code = #{projectQrCode},</if>
<if test="projectStatus != null">project_status = #{projectStatus},</if>
<if test="projectSort != null">project_sort = #{projectSort},</if>
<if test="isDel != null">is_del = #{isDel},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteProProjectInfoById" parameterType="Long">
delete from pro_project_info where id = #{id}
</delete>
<delete id="deleteProProjectInfoByIds" parameterType="String">
delete from pro_project_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>