|
@@ -148,4 +148,57 @@
|
|
|
select * FROM sg_wbs_project where ${propertyName} = '${value}'
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 根据工程id查找项目 -->
|
|
|
+ <select id="findItem" parameterType="String" resultMap="WbsProject">
|
|
|
+ select * From sg_wbs_item where project_id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 根据工程id删除项目 -->
|
|
|
+ <update id="deleteItem" parameterType="java.util.List">
|
|
|
+ <foreach collection="wbsItems" item="wbsItem" index="index" open="" close="" separator=";">
|
|
|
+ UPDATE sg_wbs_item
|
|
|
+ <set>
|
|
|
+ <if test="wbsItem.parentId != null and wbsItem.parentId != ''">
|
|
|
+ del_flag = #{wbsItem.delFlag,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <where>
|
|
|
+ ID = #{wbsItem.parentId,jdbcType=VARCHAR}
|
|
|
+ </where>
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 根据工程id逻辑删除结算表 -->
|
|
|
+ <update id="deleteItemCount" parameterType="java.util.List">
|
|
|
+ <foreach collection="settlements" item="settlement" index="index" open="" close="" separator=";">
|
|
|
+ UPDATE sg_sett_count
|
|
|
+ <set>
|
|
|
+ <if test="wbsItem.id != null and wbsItem.id != ''">
|
|
|
+ del_flag = #{settlement.delFlag,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <where>
|
|
|
+ ID = #{settlement.id,jdbcType=VARCHAR}
|
|
|
+ </where>
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--<!– 根据工程id逻辑删除项目 –>-->
|
|
|
+ <!--<update id="deleteItemDetail" parameterType="java.util.List">-->
|
|
|
+ <!--<foreach collection="settlements" item="settlement" index="index" open="" close="" separator=";">-->
|
|
|
+ <!--UPDATE sg_sett_count-->
|
|
|
+ <!--<set>-->
|
|
|
+ <!--<if test="wbsItem.parentId != null and wbsItem.parentId != ''">-->
|
|
|
+ <!--del_flag = #{wbsItem.delFlag,jdbcType=VARCHAR},-->
|
|
|
+ <!--</if>-->
|
|
|
+ <!--</set>-->
|
|
|
+ <!--<where>-->
|
|
|
+ <!--ID = #{wbsItem.parentId,jdbcType=VARCHAR}-->
|
|
|
+ <!--</where>-->
|
|
|
+ <!--</foreach>-->
|
|
|
+ <!--</update>-->
|
|
|
+ <!-- 逻辑删除工程id -->
|
|
|
+ <update id="deleteProject" parameterType="WbsProject">
|
|
|
+ update sg_wbs_project set del_flag = #{delFlag} where id = #{id}
|
|
|
+ </update>
|
|
|
</mapper>
|