|
|
@ -3,13 +3,21 @@ |
|
|
<mapper namespace="com.xm.core.entity.XmMenuPlan"> |
|
|
<mapper namespace="com.xm.core.entity.XmMenuPlan"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--开始 自定sql函数区域 --> |
|
|
|
|
|
<!--请在此区域添加自定义函数--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--开始 自定sql函数区域 请在此区域添加自定义函数,其它区域尽量不要动,因为代码随时重新生成 --> |
|
|
|
|
|
|
|
|
|
|
|
<sql id="whereForMap"> |
|
|
|
|
|
<if test=" ids != null"> and (res.id) in |
|
|
|
|
|
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" > |
|
|
|
|
|
( #{item}) |
|
|
|
|
|
</foreach> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="key != null and key !='' "> </if> |
|
|
|
|
|
</sql> |
|
|
|
|
|
|
|
|
<update id="loadTasksToXmMenuPlan" parameterType="String" statementType="CALLABLE"> |
|
|
<update id="loadTasksToXmMenuPlan" parameterType="String" statementType="CALLABLE"> |
|
|
{call load_tasks_to_xm_menu_plan(#{projectId,mode=IN})} |
|
|
|
|
|
|
|
|
{call load_tasks_to_xm_menu_plan(#{projectId,mode=IN})} |
|
|
</update> |
|
|
</update> |
|
|
|
|
|
|
|
|
<!--结束 自定义sql函数区域--> |
|
|
<!--结束 自定义sql函数区域--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -17,15 +25,9 @@ |
|
|
<!-- 通过条件查询获取数据列表 返回list<map> --> |
|
|
<!-- 通过条件查询获取数据列表 返回list<map> --> |
|
|
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> |
|
|
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> |
|
|
select * from xm_menu_plan res |
|
|
select * from xm_menu_plan res |
|
|
<where> |
|
|
|
|
|
<if test="ids != null"> and |
|
|
|
|
|
id in |
|
|
|
|
|
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" > |
|
|
|
|
|
#{item} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
<include refid="whereForMap"/> |
|
|
<include refid="where"/> |
|
|
<include refid="where"/> |
|
|
<if test="key != null and key !='' "> </if> |
|
|
|
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
@ -58,7 +60,7 @@ |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
<!-- 新增一条记录 主键id,--> |
|
|
<!-- 新增一条记录 主键id,--> |
|
|
<insert id="insert" parameterType="com.xm.core.entity.XmMenuPlan" useGeneratedKeys="false" keyProperty="id"> |
|
|
|
|
|
|
|
|
<insert id="insert" parameterType="com.xm.core.entity.XmMenuPlan" useGeneratedKeys="false" keyProperty="id"> |
|
|
insert into xm_menu_plan( |
|
|
insert into xm_menu_plan( |
|
|
<include refid="columns"/> |
|
|
<include refid="columns"/> |
|
|
) values ( |
|
|
) values ( |
|
|
@ -76,13 +78,13 @@ |
|
|
|
|
|
|
|
|
<!-- 按主键删除一条记录--> |
|
|
<!-- 按主键删除一条记录--> |
|
|
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmMenuPlan"> |
|
|
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmMenuPlan"> |
|
|
delete from xm_menu_plan |
|
|
|
|
|
|
|
|
delete from xm_menu_plan |
|
|
where id = #{id} |
|
|
where id = #{id} |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
|
|
|
<!-- 根据条件修改若干条记录 --> |
|
|
<!-- 根据条件修改若干条记录 --> |
|
|
<update id="updateSomeFieldByPk" parameterType="com.xm.core.entity.XmMenuPlan"> |
|
|
<update id="updateSomeFieldByPk" parameterType="com.xm.core.entity.XmMenuPlan"> |
|
|
update xm_menu_plan |
|
|
|
|
|
|
|
|
update xm_menu_plan |
|
|
<set> |
|
|
<set> |
|
|
<include refid="someFieldSet"/> |
|
|
<include refid="someFieldSet"/> |
|
|
</set> |
|
|
</set> |
|
|
@ -91,7 +93,7 @@ |
|
|
|
|
|
|
|
|
<!-- 根据主键修改一条记录 --> |
|
|
<!-- 根据主键修改一条记录 --> |
|
|
<update id="updateByPk" parameterType="com.xm.core.entity.XmMenuPlan"> |
|
|
<update id="updateByPk" parameterType="com.xm.core.entity.XmMenuPlan"> |
|
|
update xm_menu_plan |
|
|
|
|
|
|
|
|
update xm_menu_plan |
|
|
<set> |
|
|
<set> |
|
|
<include refid="set"/> |
|
|
<include refid="set"/> |
|
|
</set> |
|
|
</set> |
|
|
@ -106,7 +108,7 @@ |
|
|
<!-- 批量更新 --> |
|
|
<!-- 批量更新 --> |
|
|
<update id="batchUpdate" parameterType="List"> |
|
|
<update id="batchUpdate" parameterType="List"> |
|
|
<foreach collection="list" item="item" index="index" separator=";" > |
|
|
<foreach collection="list" item="item" index="index" separator=";" > |
|
|
update xm_menu_plan |
|
|
|
|
|
|
|
|
update xm_menu_plan |
|
|
set |
|
|
set |
|
|
<include refid="batchSet"/> |
|
|
<include refid="batchSet"/> |
|
|
where id = #{item.id} |
|
|
where id = #{item.id} |
|
|
@ -114,11 +116,12 @@ |
|
|
</update> |
|
|
</update> |
|
|
<!-- 批量删除 --> |
|
|
<!-- 批量删除 --> |
|
|
<delete id="batchDelete" parameterType="List"> |
|
|
<delete id="batchDelete" parameterType="List"> |
|
|
delete from xm_menu_plan |
|
|
|
|
|
where id in |
|
|
|
|
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|
|
|
|
|
#{item.id } |
|
|
|
|
|
</foreach> |
|
|
|
|
|
|
|
|
delete from xm_menu_plan |
|
|
|
|
|
where |
|
|
|
|
|
(id) in |
|
|
|
|
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|
|
|
|
|
( #{item.id} ) |
|
|
|
|
|
</foreach> |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -126,17 +129,17 @@ |
|
|
<sql id="columns"> |
|
|
<sql id="columns"> |
|
|
project_id,id,project_name,menu_id,plan_start_time,plan_end_time,act_start_time,act_end_time,plan_workload,act_workload,plan_cost_amount,act_cost_amount,finish_rate,demand_rate,design_rate,dev_rate,uat_rate,sit_rate,online_status,online_time,plan_status,charge_userid,charge_username,menu_status,ctime,ltime,cuserid,cusername,calc_time,menu_name,plan_workhours,plan_worker_cnt,closed_bugs,active_bugs,confirmed_bugs,resolved_bugs,test_cases,exec_cases,design_cases,finish_cases,iteration_cnt,task_cnt,finish_task_cnt,product_id,product_name,bug_cnt |
|
|
project_id,id,project_name,menu_id,plan_start_time,plan_end_time,act_start_time,act_end_time,plan_workload,act_workload,plan_cost_amount,act_cost_amount,finish_rate,demand_rate,design_rate,dev_rate,uat_rate,sit_rate,online_status,online_time,plan_status,charge_userid,charge_username,menu_status,ctime,ltime,cuserid,cusername,calc_time,menu_name,plan_workhours,plan_worker_cnt,closed_bugs,active_bugs,confirmed_bugs,resolved_bugs,test_cases,exec_cases,design_cases,finish_cases,iteration_cnt,task_cnt,finish_task_cnt,product_id,product_name,bug_cnt |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> |
|
|
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> |
|
|
<sql id="where"> |
|
|
<sql id="where"> |
|
|
<if test="projectId != null and projectId != ''"> and res.project_id = #{projectId} </if> |
|
|
<if test="projectId != null and projectId != ''"> and res.project_id = #{projectId} </if> |
|
|
<if test="id != null and id != ''"> and res.id = #{id} </if> |
|
|
<if test="id != null and id != ''"> and res.id = #{id} </if> |
|
|
<if test="projectName != null and projectName != ''"> and res.project_name = #{projectName} </if> |
|
|
<if test="projectName != null and projectName != ''"> and res.project_name = #{projectName} </if> |
|
|
<if test="menuId != null and menuId != ''"> and res.menu_id = #{menuId} </if> |
|
|
<if test="menuId != null and menuId != ''"> and res.menu_id = #{menuId} </if> |
|
|
<if test="planStartTime != null"> and TO_CHAR(res.plan_start_time,'YYYY-MM-DD') = TO_CHAR(#{planStartTime},'YYYY-MM-DD') </if> |
|
|
|
|
|
<if test="planEndTime != null"> and TO_CHAR(res.plan_end_time,'YYYY-MM-DD') = TO_CHAR(#{planEndTime},'YYYY-MM-DD') </if> |
|
|
|
|
|
<if test="actStartTime != null"> and TO_CHAR(res.act_start_time,'YYYY-MM-DD') = TO_CHAR(#{actStartTime},'YYYY-MM-DD') </if> |
|
|
|
|
|
<if test="actEndTime != null"> and TO_CHAR(res.act_end_time,'YYYY-MM-DD') = TO_CHAR(#{actEndTime},'YYYY-MM-DD') </if> |
|
|
|
|
|
|
|
|
<if test="planStartTime != null"> and date_format(res.plan_start_time,'%Y-%m-%d') = date_format(#{planStartTime},'%Y-%m-%d') </if> |
|
|
|
|
|
<if test="planEndTime != null"> and date_format(res.plan_end_time,'%Y-%m-%d') = date_format(#{planEndTime},'%Y-%m-%d') </if> |
|
|
|
|
|
<if test="actStartTime != null"> and date_format(res.act_start_time,'%Y-%m-%d') = date_format(#{actStartTime},'%Y-%m-%d') </if> |
|
|
|
|
|
<if test="actEndTime != null"> and date_format(res.act_end_time,'%Y-%m-%d') = date_format(#{actEndTime},'%Y-%m-%d') </if> |
|
|
<if test="planWorkload != null and planWorkload != ''"> and res.plan_workload = #{planWorkload} </if> |
|
|
<if test="planWorkload != null and planWorkload != ''"> and res.plan_workload = #{planWorkload} </if> |
|
|
<if test="actWorkload != null and actWorkload != ''"> and res.act_workload = #{actWorkload} </if> |
|
|
<if test="actWorkload != null and actWorkload != ''"> and res.act_workload = #{actWorkload} </if> |
|
|
<if test="planCostAmount != null and planCostAmount != ''"> and res.plan_cost_amount = #{planCostAmount} </if> |
|
|
<if test="planCostAmount != null and planCostAmount != ''"> and res.plan_cost_amount = #{planCostAmount} </if> |
|
|
@ -148,16 +151,16 @@ |
|
|
<if test="uatRate != null and uatRate != ''"> and res.uat_rate = #{uatRate} </if> |
|
|
<if test="uatRate != null and uatRate != ''"> and res.uat_rate = #{uatRate} </if> |
|
|
<if test="sitRate != null and sitRate != ''"> and res.sit_rate = #{sitRate} </if> |
|
|
<if test="sitRate != null and sitRate != ''"> and res.sit_rate = #{sitRate} </if> |
|
|
<if test="onlineStatus != null and onlineStatus != ''"> and res.online_status = #{onlineStatus} </if> |
|
|
<if test="onlineStatus != null and onlineStatus != ''"> and res.online_status = #{onlineStatus} </if> |
|
|
<if test="onlineTime != null"> and TO_CHAR(res.online_time,'YYYY-MM-DD') = TO_CHAR(#{onlineTime},'YYYY-MM-DD') </if> |
|
|
|
|
|
|
|
|
<if test="onlineTime != null"> and date_format(res.online_time,'%Y-%m-%d') = date_format(#{onlineTime},'%Y-%m-%d') </if> |
|
|
<if test="planStatus != null and planStatus != ''"> and res.plan_status = #{planStatus} </if> |
|
|
<if test="planStatus != null and planStatus != ''"> and res.plan_status = #{planStatus} </if> |
|
|
<if test="chargeUserid != null and chargeUserid != ''"> and res.charge_userid = #{chargeUserid} </if> |
|
|
<if test="chargeUserid != null and chargeUserid != ''"> and res.charge_userid = #{chargeUserid} </if> |
|
|
<if test="chargeUsername != null and chargeUsername != ''"> and res.charge_username = #{chargeUsername} </if> |
|
|
<if test="chargeUsername != null and chargeUsername != ''"> and res.charge_username = #{chargeUsername} </if> |
|
|
<if test="menuStatus != null and menuStatus != ''"> and res.menu_status = #{menuStatus} </if> |
|
|
<if test="menuStatus != null and menuStatus != ''"> and res.menu_status = #{menuStatus} </if> |
|
|
<if test="ctime != null"> and TO_CHAR(res.ctime,'YYYY-MM-DD') = TO_CHAR(#{ctime},'YYYY-MM-DD') </if> |
|
|
|
|
|
<if test="ltime != null"> and TO_CHAR(res.ltime,'YYYY-MM-DD') = TO_CHAR(#{ltime},'YYYY-MM-DD') </if> |
|
|
|
|
|
|
|
|
<if test="ctime != null"> and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') </if> |
|
|
|
|
|
<if test="ltime != null"> and date_format(res.ltime,'%Y-%m-%d') = date_format(#{ltime},'%Y-%m-%d') </if> |
|
|
<if test="cuserid != null and cuserid != ''"> and res.cuserid = #{cuserid} </if> |
|
|
<if test="cuserid != null and cuserid != ''"> and res.cuserid = #{cuserid} </if> |
|
|
<if test="cusername != null and cusername != ''"> and res.cusername = #{cusername} </if> |
|
|
<if test="cusername != null and cusername != ''"> and res.cusername = #{cusername} </if> |
|
|
<if test="calcTime != null"> and TO_CHAR(res.calc_time,'YYYY-MM-DD') = TO_CHAR(#{calcTime},'YYYY-MM-DD') </if> |
|
|
|
|
|
|
|
|
<if test="calcTime != null"> and date_format(res.calc_time,'%Y-%m-%d') = date_format(#{calcTime},'%Y-%m-%d') </if> |
|
|
<if test="menuName != null and menuName != ''"> and res.menu_name = #{menuName} </if> |
|
|
<if test="menuName != null and menuName != ''"> and res.menu_name = #{menuName} </if> |
|
|
<if test="planWorkhours != null and planWorkhours != ''"> and res.plan_workhours = #{planWorkhours} </if> |
|
|
<if test="planWorkhours != null and planWorkhours != ''"> and res.plan_workhours = #{planWorkhours} </if> |
|
|
<if test="planWorkerCnt != null and planWorkerCnt != ''"> and res.plan_worker_cnt = #{planWorkerCnt} </if> |
|
|
<if test="planWorkerCnt != null and planWorkerCnt != ''"> and res.plan_worker_cnt = #{planWorkerCnt} </if> |
|
|
|