|
@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="targetContractAmount" column="target_contract_amount" />
|
|
|
<result property="targetArrivalAmount" column="target_arrival_amount" />
|
|
|
<result property="targetInvestmentNum" column="target_investment_num" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBmDeptPlanVo">
|
|
@@ -25,9 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBmDeptPlanList" parameterType="BmDeptPlan" resultMap="BmDeptPlanResult">
|
|
|
- <include refid="selectBmDeptPlanVo"/>
|
|
|
+ select p.id, p.sys_dept_id, p.create_by, p.create_time, p.update_by, p.update_time, p.is_del, p.year, p.plan, p.target_signing_num, p.target_contract_amount, p.target_arrival_amount, p.target_investment_num, d.dept_name
|
|
|
+ from bm_dept_plan p
|
|
|
+ left join sys_dept d on p.sys_dept_id = d.dept_id and p.is_del = '0'
|
|
|
<where>
|
|
|
- is_del = '0'
|
|
|
<if test="sysDeptId != null "> and sys_dept_id = #{sysDeptId}</if>
|
|
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
<if test="year != null and year != ''"> and year = #{year}</if>
|
|
@@ -45,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBmDeptPlan" parameterType="BmDeptPlan" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into bm_dept_Plan
|
|
|
+ insert into bm_dept_plan
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="sysDeptId != null">sys_dept_id,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
@@ -77,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateBmDeptPlan" parameterType="BmDeptPlan">
|
|
|
- update bm_dept_Plan
|
|
|
+ update bm_dept_plan
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="sysDeptId != null">sys_dept_id = #{sysDeptId},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
@@ -96,11 +98,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteBmDeptPlanById" parameterType="Long">
|
|
|
- delete from bm_dept_Plan where id = #{id}
|
|
|
+ delete from bm_dept_plan where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteBmDeptPlanByIds" parameterType="String">
|
|
|
- delete from bm_dept_Plan where id in
|
|
|
+ delete from bm_dept_plan where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|