Browse Source

增加按项目、迭代、产品查询项目、迭代、产品、任务、需求、缺陷功能

master
陈裕财 5 years ago
parent
commit
7f1f32289f
  1. 11
      xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java
  2. 5
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml
  3. 24
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml
  4. 3
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml
  5. 11
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml
  6. 3
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

11
xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java

@ -502,7 +502,6 @@ public class XmTaskExecuserService extends BaseService {
super.deleteByPk(xmTaskExecuser);
this.updateXmTaskExeUseridsAndUsernamesByTaskId(xmTaskExecuser.getTaskId());
}
/**
* 将执行人编号姓名同步到task中的exe_userids,exe_usernames两个字段
* @param taskId
@ -510,6 +509,16 @@ public class XmTaskExecuserService extends BaseService {
public void updateXmTaskExeUseridsAndUsernamesByTaskId(String taskId) {
this.update("updateXmTaskExeUseridsAndUsernamesByTaskId", taskId);
}
/**
* 将执行人编号姓名同步到task中的exe_userids,exe_usernames两个字段
* @param taskId
*/
public void updateXmTaskExeUseridsAndUsernamesAndTaskStateByTaskId(String taskId,String targetTaskState) {
Map<String,Object> task=new HashMap<>();
task.put("targetTaskState",targetTaskState);
task.put("taskId",taskId);
this.update("updateXmTaskExeUseridsAndUsernamesAndTaskStateByTaskId", task);
}
public void updateFlowStateByProcInst(String flowState,Map<String, Object> flowVars) {
flowVars.put("flowState", flowState);

5
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml

@ -29,6 +29,11 @@
<if test="productId != null and productId !='' "> and im.product_id=#{productId} </if>
<if test="menuId != null and menuId !='' "> and im.menu_id=#{menuId} </if>
)
</if>
<if test=" projectId !=null and projectId!=''">
and exists( select 1 from XM.xm_task t inner join xm_iteration_menu im on t.menu_id=im.menu_id
where t.project_id=#{projectId} and im.iteration_id =res.id
)
</if>
<if test="compete !=null and compete!=''">
and ( res.admin_userid=#{compete}

24
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml

@ -28,15 +28,22 @@
</foreach>
</if>
<include refid="where"/>
<if test=' iterationFilterType!=null and iterationFilterType!=""'>
and <if test='iterationFilterType=="not-join"'> not </if>
exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id)
<if test=' iterationFilterType=="join" '>
and exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id
<if test="iterationId!=null"> and im.iteration_id=#{iterationId}</if>
)
</if>
<if test='iterationFilterType=="not-join"'>
and not exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id)
</if>
<if test=' taskFilterType!=null and taskFilterType!="" '>
and <if test='taskFilterType=="not-join"'> not </if>
exists ( select 1 from XM.xm_task t where t.menu_id=res.menu_id)
</if>
<if test=' projectId !=null and projectId!="" and ( taskFilterType==null or taskFilterType=="" )'>
and exists ( select 1 from XM.xm_task t where t.menu_id =res.id and t.project_id=#{projectId})
</if>
<if test="compete !=null and compete!=''">
and ( exists ( select 1 from XM.xm_menu m1 where m.mm_userid=#{compete} and m.product_id=res.product_id)
or exists ( select 1 from xm_product p where p.pm_userid=#{compete} and res.product_id=p.id)
@ -57,14 +64,19 @@
</if>
<include refid="where"/>
<if test=" projectId !=null and projectId !='' "> and plan.project_id=#{projectId}</if>
<if test=' iterationFilterType!=null and iterationFilterType!=""'>
and <if test='iterationFilterType=="not-join"'> not </if>
exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id)
<if test=' iterationFilterType=="join" '>
and exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id
<if test="iterationId!=null"> and im.iteration_id=#{iterationId}</if>
)
</if>
<if test='iterationFilterType=="not-join"'>
and not exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id)
</if>
<if test=' taskFilterType!=null and taskFilterType!="" '>
and <if test='taskFilterType=="not-join"'> not </if>
exists ( select 1 from XM.xm_task t where t.menu_id=res.menu_id)
</if>
<if test="compete !=null and compete!=''">
and ( exists ( select 1 from XM.xm_menu m1 where m.mm_userid=#{compete} and m.product_id=res.product_id)
or exists ( select 1 from xm_product p where p.pm_userid=#{compete} and res.product_id=p.id)

3
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml

@ -23,6 +23,9 @@
or exists ( select 1 from xm_menu m where m.mm_userid=#{compete} and m.product_id=res.id)
)
</if>
<if test="iterationId!=null and iterationId!=''">
and exists( select 1 from xm_iteration_menu im where im.product_id =res.id )
</if>
<if test="key != null and key !='' "> and res.product_name like #{key} </if>
</where>
</select>

11
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

@ -118,8 +118,17 @@
<if test="myFocus != null and myFocus != ''">
and exists ( select 1 from XM.xm_my_focus f where f.userid=#{userid} and f.project_id=res.id )
</if>
<if test="productId != null and productId !='' "> and exists ( select 1 from XM.xm_task t left join XM.xm_menu m on t.menu_id=m.menu_id and m.product_id=#{productId} where m.product_id=#{productId} and t.project_id=res.id) </if>
<if test="productId != null and productId !='' ">
and exists ( select 1 from XM.xm_task t left join XM.xm_menu m on t.menu_id=m.menu_id and m.product_id=#{productId}
where m.product_id=#{productId} and t.project_id=res.id
)
</if>
<if test="(iterationId!=null and iterationId!='' )">
and exists( select 1 from XM.xm_task t inner join xm_iteration_menu im on t.menu_id=im.menu_id
where t.project_id=res.id and im.iteration_id =#{iterationId}
)
</if>
<if test="key != null and key !='' "> and res.name like #{key} </if>
</where>
</select>

3
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

@ -151,6 +151,9 @@
)
</if>
<if test="iterationId!=null and iterationId!=''">
and exists ( select 1 from xm_iteration_menu im where im.menu_id=res.menu_id and im.iteration_id=#{iterationId})
</if>
<if test="key != null and key !='' "> and res.name like #{key} </if>
<if test="work != null and work != ''"> and res.rate != '100' </if>
</where>

Loading…
Cancel
Save