117 lines
6.4 KiB
XML
117 lines
6.4 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.securitycontrol.screen.mapper.ProjectNewMapper">
|
|
<resultMap type="com.securitycontrol.screen.domain.ProjectNew" id="ProjectNewResult">
|
|
<result property="proId" column="pro_id" />
|
|
<result property="signCode" column="sign_code" />
|
|
<result property="bidCode" column="bid_code" />
|
|
<result property="proCode" column="pro_code" />
|
|
<result property="proName" column="pro_name" />
|
|
<result property="status" column="status" />
|
|
<result property="planStartTime" column="plan_start_time" />
|
|
<result property="planEndTime" column="plan_end_time" />
|
|
<result property="startTime" column="start_time" />
|
|
<result property="endTime" column="end_time" />
|
|
<result property="diffDay" column="diff_day" />
|
|
<result property="planCost" column="plan_cost" />
|
|
<result property="actualCost" column="actual_cost" />
|
|
<result property="riskLevel" column="risk_level" />
|
|
</resultMap>
|
|
|
|
<sql id="selectProjectNewVo">
|
|
select pro_id, sign_code, bid_code, pro_code, pro_name, status, plan_start_time, plan_end_time, start_time, end_time, diff_day, plan_cost, actual_cost, risk_level from tb_project_new
|
|
</sql>
|
|
|
|
<select id="selectProjectNewList" parameterType="com.securitycontrol.screen.domain.ProjectNew" resultMap="ProjectNewResult">
|
|
<include refid="selectProjectNewVo"/>
|
|
<where>
|
|
<if test="signCode != null and signCode != ''"> and sign_code = #{signCode}</if>
|
|
<if test="bidCode != null and bidCode != ''"> and bid_code = #{bidCode}</if>
|
|
<if test="proCode != null and proCode != ''"> and pro_code = #{proCode}</if>
|
|
<if test="proName != null and proName != ''"> and pro_name like concat('%', #{proName}, '%')</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="planStartTime != null "> and plan_start_time = #{planStartTime}</if>
|
|
<if test="planEndTime != null "> and plan_end_time = #{planEndTime}</if>
|
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
|
<if test="diffDay != null and diffDay != ''"> and diff_day = #{diffDay}</if>
|
|
<if test="planCost != null and planCost != ''"> and plan_cost = #{planCost}</if>
|
|
<if test="actualCost != null "> and actual_cost = #{actualCost}</if>
|
|
<if test="riskLevel != null and riskLevel != ''"> and risk_level = #{riskLevel}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectProjectNewByProId" parameterType="String" resultMap="ProjectNewResult">
|
|
<include refid="selectProjectNewVo"/>
|
|
where pro_id = #{proId}
|
|
</select>
|
|
|
|
<insert id="insertProjectNew" parameterType="com.securitycontrol.screen.domain.ProjectNew">
|
|
insert into tb_project_new
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="proId != null">pro_id,</if>
|
|
<if test="signCode != null">sign_code,</if>
|
|
<if test="bidCode != null">bid_code,</if>
|
|
<if test="proCode != null">pro_code,</if>
|
|
<if test="proName != null">pro_name,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="planStartTime != null">plan_start_time,</if>
|
|
<if test="planEndTime != null">plan_end_time,</if>
|
|
<if test="startTime != null">start_time,</if>
|
|
<if test="endTime != null">end_time,</if>
|
|
<if test="diffDay != null">diff_day,</if>
|
|
<if test="planCost != null">plan_cost,</if>
|
|
<if test="actualCost != null">actual_cost,</if>
|
|
<if test="riskLevel != null">risk_level,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="proId != null">#{proId},</if>
|
|
<if test="signCode != null">#{signCode},</if>
|
|
<if test="bidCode != null">#{bidCode},</if>
|
|
<if test="proCode != null">#{proCode},</if>
|
|
<if test="proName != null">#{proName},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="planStartTime != null">#{planStartTime},</if>
|
|
<if test="planEndTime != null">#{planEndTime},</if>
|
|
<if test="startTime != null">#{startTime},</if>
|
|
<if test="endTime != null">#{endTime},</if>
|
|
<if test="diffDay != null">#{diffDay},</if>
|
|
<if test="planCost != null">#{planCost},</if>
|
|
<if test="actualCost != null">#{actualCost},</if>
|
|
<if test="riskLevel != null">#{riskLevel},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateProjectNew" parameterType="com.securitycontrol.screen.domain.ProjectNew">
|
|
update tb_project_new
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="signCode != null">sign_code = #{signCode},</if>
|
|
<if test="bidCode != null">bid_code = #{bidCode},</if>
|
|
<if test="proCode != null">pro_code = #{proCode},</if>
|
|
<if test="proName != null">pro_name = #{proName},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="planStartTime != null">plan_start_time = #{planStartTime},</if>
|
|
<if test="planEndTime != null">plan_end_time = #{planEndTime},</if>
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
<if test="diffDay != null">diff_day = #{diffDay},</if>
|
|
<if test="planCost != null">plan_cost = #{planCost},</if>
|
|
<if test="actualCost != null">actual_cost = #{actualCost},</if>
|
|
<if test="riskLevel != null">risk_level = #{riskLevel},</if>
|
|
</trim>
|
|
where pro_id = #{proId}
|
|
</update>
|
|
|
|
<delete id="deleteProjectNewByProId" parameterType="String">
|
|
delete from tb_project_new where pro_id = #{proId}
|
|
</delete>
|
|
|
|
<delete id="deleteProjectNewByProIds" parameterType="String">
|
|
delete from tb_project_new where pro_id in
|
|
<foreach item="proId" collection="array" open="(" separator="," close=")">
|
|
#{proId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |