diff --git a/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java b/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java index c8c3b5f5..d2ceff7a 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java +++ b/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 task=new HashMap<>(); + task.put("targetTaskState",targetTaskState); + task.put("taskId",taskId); + this.update("updateXmTaskExeUseridsAndUsernamesAndTaskStateByTaskId", task); + } public void updateFlowStateByProcInst(String flowState,Map flowVars) { flowVars.put("flowState", flowState); diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml index 23afc190..f1e823d6 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml @@ -30,6 +30,11 @@ and im.menu_id=#{menuId} ) + + 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 + ) + and ( res.admin_userid=#{compete} or exists (select 1 from XM.xm_iteration_menu im left join xm.xm_menu m on im.product_id=m.product_id where m.mm_userid=#{compete} and im.iteration_id=res.id) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml index 46acbad6..12ea5af3 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml @@ -28,15 +28,22 @@ - - and not - exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id) + + and exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id + and im.iteration_id=#{iterationId} + ) + + + and not exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id) and not exists ( select 1 from XM.xm_task t where t.menu_id=res.menu_id) + + and exists ( select 1 from XM.xm_task t where t.menu_id =res.id and t.project_id=#{projectId}) + 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 @@ and plan.project_id=#{projectId} - - and not - exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id) + + and exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id + and im.iteration_id=#{iterationId} + ) + + + and not exists ( select 1 from XM.xm_iteration_menu im where im.menu_id=res.menu_id) and not exists ( select 1 from XM.xm_task t where t.menu_id=res.menu_id) + 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) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml index cbaf1880..d87472ca 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml +++ b/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) ) + + and exists( select 1 from xm_iteration_menu im where im.product_id =res.id ) + and res.product_name like #{key} diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml index 99d82ac3..8fa86b9d 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml @@ -118,8 +118,17 @@ and exists ( select 1 from XM.xm_my_focus f where f.userid=#{userid} and f.project_id=res.id ) - 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) + + 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 + ) + + + 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} + ) + and res.name like #{key} diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml index c3789daf..2cef73b5 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml @@ -151,6 +151,9 @@ ) + + and exists ( select 1 from xm_iteration_menu im where im.menu_id=res.menu_id and im.iteration_id=#{iterationId}) + and res.name like #{key} and res.rate != '100'