You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
231 lines
8.1 KiB
XML
231 lines
8.1 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="org.dromara.oa.erp.mapper.ErpProjectChangeProgressMapper">
|
|
<resultMap type="org.dromara.oa.erp.domain.vo.ErpProjectChangeProgressVo" id="ErpProjectChangeProgressResult">
|
|
</resultMap>
|
|
|
|
<select id="selectCustomErpProjectChangeProgressVoList" resultMap="ErpProjectChangeProgressResult">
|
|
select change_progress_id, project_change_id, plan_stage_id, milestone_name, original_start, original_end, changed_start, changed_end, completion_degree, sort_order, remark, del_flag, create_dept, create_by, create_time, update_by, update_time from erp_project_change_progress t
|
|
<where>
|
|
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
|
AND ${ew.sqlSegment}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<!-- 根据ID查询详情 -->
|
|
<select id="selectCustomErpProjectChangeProgressVoById" resultMap="ErpProjectChangeProgressResult">
|
|
select change_progress_id, project_change_id, plan_stage_id, milestone_name, original_start, original_end, changed_start, changed_end, completion_degree, sort_order, remark, del_flag, create_dept, create_by, create_time, update_by, update_time
|
|
from erp_project_change_progress t
|
|
where t.change_progress_id = #{changeProgressId}
|
|
</select>
|
|
|
|
<!-- 批量查询 - 根据ID列表 -->
|
|
<select id="selectCustomErpProjectChangeProgressVoByIds" resultMap="ErpProjectChangeProgressResult">
|
|
select change_progress_id, project_change_id, plan_stage_id, milestone_name, original_start, original_end, changed_start, changed_end, completion_degree, sort_order, remark, del_flag, create_dept, create_by, create_time, update_by, update_time
|
|
from erp_project_change_progress t
|
|
where t.change_progress_id in
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</select>
|
|
|
|
<!-- 统计查询 -->
|
|
<select id="countCustomErpProjectChangeProgress" resultType="java.lang.Long">
|
|
select count(1) from erp_project_change_progress t
|
|
<where>
|
|
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
|
AND ${ew.sqlSegment}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<!-- 分页查询(带自定义条件) -->
|
|
<select id="selectCustomErpProjectChangeProgressVoPage" resultMap="ErpProjectChangeProgressResult">
|
|
select change_progress_id, project_change_id, plan_stage_id, milestone_name, original_start, original_end, changed_start, changed_end, completion_degree, sort_order, remark, del_flag, create_dept, create_by, create_time, update_by, update_time
|
|
from erp_project_change_progress t
|
|
<where>
|
|
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
|
AND ${ew.sqlSegment}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<!-- 批量插入 -->
|
|
<insert id="batchInsertErpProjectChangeProgress">
|
|
insert into erp_project_change_progress(
|
|
project_change_id,
|
|
|
|
plan_stage_id,
|
|
|
|
milestone_name,
|
|
|
|
original_start,
|
|
|
|
original_end,
|
|
|
|
changed_start,
|
|
|
|
changed_end,
|
|
|
|
completion_degree,
|
|
|
|
sort_order,
|
|
|
|
remark,
|
|
|
|
del_flag,
|
|
|
|
create_dept,
|
|
|
|
create_by,
|
|
|
|
create_time,
|
|
|
|
update_by,
|
|
|
|
update_time
|
|
|
|
)
|
|
values
|
|
<foreach collection="list" item="item" separator=",">
|
|
(
|
|
#{item.projectChangeId},
|
|
|
|
#{item.planStageId},
|
|
|
|
#{item.milestoneName},
|
|
|
|
#{item.originalStart},
|
|
|
|
#{item.originalEnd},
|
|
|
|
#{item.changedStart},
|
|
|
|
#{item.changedEnd},
|
|
|
|
#{item.completionDegree},
|
|
|
|
#{item.sortOrder},
|
|
|
|
#{item.remark},
|
|
|
|
#{item.delFlag},
|
|
|
|
#{item.createDept},
|
|
|
|
#{item.createBy},
|
|
|
|
#{item.createTime},
|
|
|
|
#{item.updateBy},
|
|
|
|
#{item.updateTime}
|
|
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
<!-- 批量更新 -->
|
|
<update id="batchUpdateErpProjectChangeProgress">
|
|
<foreach collection="list" item="item" separator=";">
|
|
update erp_project_change_progress
|
|
<set>
|
|
<if test="item.projectChangeId != null">
|
|
project_change_id = #{item.projectChangeId},
|
|
</if>
|
|
<if test="item.planStageId != null">
|
|
plan_stage_id = #{item.planStageId},
|
|
</if>
|
|
<if test="item.milestoneName != null and item.milestoneName != ''">
|
|
milestone_name = #{item.milestoneName},
|
|
</if>
|
|
<if test="item.originalStart != null">
|
|
original_start = #{item.originalStart},
|
|
</if>
|
|
<if test="item.originalEnd != null">
|
|
original_end = #{item.originalEnd},
|
|
</if>
|
|
<if test="item.changedStart != null">
|
|
changed_start = #{item.changedStart},
|
|
</if>
|
|
<if test="item.changedEnd != null">
|
|
changed_end = #{item.changedEnd},
|
|
</if>
|
|
<if test="item.completionDegree != null">
|
|
completion_degree = #{item.completionDegree},
|
|
</if>
|
|
<if test="item.sortOrder != null">
|
|
sort_order = #{item.sortOrder},
|
|
</if>
|
|
<if test="item.remark != null and item.remark != ''">
|
|
remark = #{item.remark},
|
|
</if>
|
|
<if test="item.delFlag != null and item.delFlag != ''">
|
|
del_flag = #{item.delFlag},
|
|
</if>
|
|
<if test="item.createDept != null">
|
|
create_dept = #{item.createDept},
|
|
</if>
|
|
<if test="item.createBy != null">
|
|
create_by = #{item.createBy},
|
|
</if>
|
|
<if test="item.createTime != null">
|
|
create_time = #{item.createTime},
|
|
</if>
|
|
<if test="item.updateBy != null">
|
|
update_by = #{item.updateBy},
|
|
</if>
|
|
<if test="item.updateTime != null">
|
|
update_time = #{item.updateTime}
|
|
</if>
|
|
</set>
|
|
where change_progress_id = #{item.changeProgressId}
|
|
</foreach>
|
|
</update>
|
|
|
|
<!-- 根据自定义条件删除 -->
|
|
<delete id="deleteCustomErpProjectChangeProgress">
|
|
delete from erp_project_change_progress
|
|
<where>
|
|
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
|
AND ${ew.sqlSegment}
|
|
</if>
|
|
</where>
|
|
</delete>
|
|
|
|
<!-- 根据ID列表批量删除 -->
|
|
<delete id="deleteCustomErpProjectChangeProgressByIds">
|
|
delete from erp_project_change_progress
|
|
where change_progress_id in
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<!-- 检查是否存在 -->
|
|
<select id="existsErpProjectChangeProgress" resultType="java.lang.Boolean">
|
|
select count(1) > 0 from erp_project_change_progress t
|
|
<where>
|
|
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
|
AND ${ew.sqlSegment}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<!-- 查询进度变更明细(连表查询项目阶段信息) -->
|
|
<select id="selectProgressWithStageInfo" resultType="org.dromara.oa.erp.domain.ErpProjectChangeProgress">
|
|
select
|
|
t.*,
|
|
s.project_phases
|
|
from erp_project_change_progress t
|
|
left join erp_project_plan_stage s on t.plan_stage_id = s.plan_stage_id
|
|
where t.project_change_id = #{projectChangeId}
|
|
and t.del_flag = '0'
|
|
order by t.sort_order
|
|
</select>
|
|
|
|
</mapper>
|