From a2a03daab62b89ff8e791db4af368a391acf0d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 10 May 2021 10:21:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=BB=E5=8A=A1=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E6=8C=89=E6=9C=AC?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E5=8F=B7=E6=9F=A5=E8=AF=A2=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=98=AF=E4=BC=97=E5=8C=85?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8C=E5=88=99=E6=8C=89=E5=85=A8=E5=9F=9F?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xm/core/ctrl/XmTaskController.java | 20 +++++++++-- .../main/java/com/xm/core/entity/XmTask.java | 34 +++++++++++++++++-- .../mapper/xm/core/dao/XmTaskMapper.xml | 16 ++++++--- 3 files changed, 62 insertions(+), 8 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java index b3105521..19642bc3 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java @@ -107,6 +107,16 @@ public class XmTaskController { RequestUtils.transformArray(xmTask, "ids"); RequestUtils.transformArray(xmTask, "skillIds"); PageUtils.startPage(xmTask); + String taskOut= (String) xmTask.get("taskOut"); + if(!"1".equals(taskOut)){ + String projectId= (String) xmTask.get("projectId"); + String projectPhaseId= (String) xmTask.get("projectPhaseId"); + String userid= (String) xmTask.get("userid"); + if( !(StringUtils.hasText(projectId) || StringUtils.hasText(projectPhaseId)|| StringUtils.hasText(userid) ) ){ + User user = LoginUtils.getCurrentUserInfo(); + xmTask.put("cbranchId",user.getBranchId()); + } + } List> xmTaskVoList = xmTaskService.getTask(xmTask); //列出XmTask列表 PageUtils.responePage(m,xmTaskVoList); m.put("data",xmTaskVoList); @@ -254,10 +264,16 @@ public class XmTaskController { Map m = new HashMap<>(); RequestUtils.transformArray(xmTask, "ids"); PageUtils.startPage(xmTask); + String taskOut= (String) xmTask.get("taskOut"); if(!"1".equals(taskOut)){ - User user = LoginUtils.getCurrentUserInfo(); - xmTask.put("branchId",user.getBranchId()); + String projectId= (String) xmTask.get("projectId"); + String projectPhaseId= (String) xmTask.get("projectPhaseId"); + String userid= (String) xmTask.get("userid"); + if( !(StringUtils.hasText(projectId) || StringUtils.hasText(projectPhaseId)|| StringUtils.hasText(userid) ) ){ + User user = LoginUtils.getCurrentUserInfo(); + xmTask.put("cbranchId",user.getBranchId()); + } } List> xmTaskList = xmTaskService.selectListMapByWhere(xmTask); //列出XmTask列表 PageUtils.responePage(m, xmTaskList); diff --git a/xm-core/src/main/java/com/xm/core/entity/XmTask.java b/xm-core/src/main/java/com/xm/core/entity/XmTask.java index c0c979a4..5cb71901 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmTask.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmTask.java @@ -8,9 +8,9 @@ import java.math.BigDecimal; /** * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmTask所有属性名:
- * id,name,parentTaskid,parentTaskname,projectId,projectName,level,sortLevel,executorUserid,executorUsername,preTaskid,preTaskname,startTime,endTime,milestone,description,remarks,createUserid,createUsername,createTime,rate,budgetCost,budgetWorkload,actCost,actWorkload,taskState,taskType,taskClass,toTaskCenter,actStartTime,actEndTime,bizProcInstId,bizFlowState,projectPhaseId,projectPhaseName,taskSkillNames,exeUsernames,taskSkillIds,exeUserids,taskOut,planType,settleSchemel,menuId,menuName,iterationId,iterationName,productId,productName;
+ * id,name,parentTaskid,parentTaskname,projectId,projectName,level,sortLevel,executorUserid,executorUsername,preTaskid,preTaskname,startTime,endTime,milestone,description,remarks,createUserid,createUsername,createTime,rate,budgetCost,budgetWorkload,actCost,actWorkload,taskState,taskType,taskClass,toTaskCenter,actStartTime,actEndTime,bizProcInstId,bizFlowState,projectPhaseId,projectPhaseName,taskSkillNames,exeUsernames,taskSkillIds,exeUserids,taskOut,planType,settleSchemel,menuId,menuName,iterationId,iterationName,productId,productName,cbranchId,cdeptid;
* 表 XM.xm_task xm_task的所有字段名:
- * id,name,parent_taskid,parent_taskname,project_id,project_name,level,sort_level,executor_userid,executor_username,pre_taskid,pre_taskname,start_time,end_time,milestone,description,remarks,create_userid,create_username,create_time,rate,budget_cost,budget_workload,act_cost,act_workload,task_state,task_type,task_class,to_task_center,act_start_time,act_end_time,biz_proc_inst_id,biz_flow_state,project_phase_id,project_phase_name,task_skill_names,exe_usernames,task_skill_ids,exe_userids,task_out,plan_type,settle_schemel,menu_id,menu_name,iteration_id,iteration_name,product_id,product_name;
+ * id,name,parent_taskid,parent_taskname,project_id,project_name,level,sort_level,executor_userid,executor_username,pre_taskid,pre_taskname,start_time,end_time,milestone,description,remarks,create_userid,create_username,create_time,rate,budget_cost,budget_workload,act_cost,act_workload,task_state,task_type,task_class,to_task_center,act_start_time,act_end_time,biz_proc_inst_id,biz_flow_state,project_phase_id,project_phase_name,task_skill_names,exe_usernames,task_skill_ids,exe_userids,task_out,plan_type,settle_schemel,menu_id,menu_name,iteration_id,iteration_name,product_id,product_name,cbranch_id,cdeptid;
* 当前主键(包括多主键):
* id;
*/ @@ -163,6 +163,12 @@ public class XmTask implements java.io.Serializable { @ApiModelProperty(notes="产品名称",allowEmptyValue=true,example="",allowableValues="") String productName; + + @ApiModelProperty(notes="创建机构",allowEmptyValue=true,example="",allowableValues="") + String cbranchId; + + @ApiModelProperty(notes="创建部门",allowEmptyValue=true,example="",allowableValues="") + String cdeptid; /**任务编号**/ public XmTask(String id) { @@ -461,6 +467,18 @@ public class XmTask implements java.io.Serializable { public void setProductName(String productName) { this.productName = productName; } + /** + * 创建机构 + **/ + public void setCbranchId(String cbranchId) { + this.cbranchId = cbranchId; + } + /** + * 创建部门 + **/ + public void setCdeptid(String cdeptid) { + this.cdeptid = cdeptid; + } /** * 任务编号 @@ -750,5 +768,17 @@ public class XmTask implements java.io.Serializable { public String getProductName() { return this.productName; } + /** + * 创建机构 + **/ + public String getCbranchId() { + return this.cbranchId; + } + /** + * 创建部门 + **/ + public String getCdeptid() { + return this.cdeptid; + } } \ No newline at end of file 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 1722cc04..6ddd7e5c 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 @@ -181,7 +181,7 @@ insert into XM.xm_task( ) values ( - #{id},#{name},#{parentTaskid},#{parentTaskname},#{projectId},#{projectName},#{level},#{sortLevel},#{executorUserid},#{executorUsername},#{preTaskid},#{preTaskname},#{startTime},#{endTime},#{milestone},#{description},#{remarks},#{createUserid},#{createUsername},#{createTime},#{rate},#{budgetCost},#{budgetWorkload},#{actCost},#{actWorkload},#{taskState},#{taskType},#{taskClass},#{toTaskCenter},#{actStartTime},#{actEndTime},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{projectPhaseName},#{taskSkillNames},#{exeUsernames},#{taskSkillIds},#{exeUserids},#{taskOut},#{planType},#{settleSchemel},#{menuId},#{menuName},#{iterationId},#{iterationName},#{productId},#{productName} + #{id},#{name},#{parentTaskid},#{parentTaskname},#{projectId},#{projectName},#{level},#{sortLevel},#{executorUserid},#{executorUsername},#{preTaskid},#{preTaskname},#{startTime},#{endTime},#{milestone},#{description},#{remarks},#{createUserid},#{createUsername},#{createTime},#{rate},#{budgetCost},#{budgetWorkload},#{actCost},#{actWorkload},#{taskState},#{taskType},#{taskClass},#{toTaskCenter},#{actStartTime},#{actEndTime},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{projectPhaseName},#{taskSkillNames},#{exeUsernames},#{taskSkillIds},#{exeUserids},#{taskOut},#{planType},#{settleSchemel},#{menuId},#{menuName},#{iterationId},#{iterationName},#{productId},#{productName},#{cbranchId},#{cdeptid} ) @@ -246,7 +246,7 @@ - id,name,parent_taskid,parent_taskname,project_id,project_name,level,sort_level,executor_userid,executor_username,pre_taskid,pre_taskname,start_time,end_time,milestone,description,remarks,create_userid,create_username,create_time,rate,budget_cost,budget_workload,act_cost,act_workload,task_state,task_type,task_class,to_task_center,act_start_time,act_end_time,biz_proc_inst_id,biz_flow_state,project_phase_id,project_phase_name,task_skill_names,exe_usernames,task_skill_ids,exe_userids,task_out,plan_type,settle_schemel,menu_id,menu_name,iteration_id,iteration_name,product_id,product_name + id,name,parent_taskid,parent_taskname,project_id,project_name,level,sort_level,executor_userid,executor_username,pre_taskid,pre_taskname,start_time,end_time,milestone,description,remarks,create_userid,create_username,create_time,rate,budget_cost,budget_workload,act_cost,act_workload,task_state,task_type,task_class,to_task_center,act_start_time,act_end_time,biz_proc_inst_id,biz_flow_state,project_phase_id,project_phase_name,task_skill_names,exe_usernames,task_skill_ids,exe_userids,task_out,plan_type,settle_schemel,menu_id,menu_name,iteration_id,iteration_name,product_id,product_name,cbranch_id,cdeptid @@ -299,6 +299,8 @@ and res.iteration_name = #{iterationName} and res.product_id = #{productId} and res.product_name = #{productName} + and res.cbranch_id = #{cbranchId} + and res.cdeptid = #{cdeptid} @@ -348,7 +350,9 @@ iteration_id = #{iterationId}, iteration_name = #{iterationName}, product_id = #{productId}, - product_name = #{productName} + product_name = #{productName}, + cbranch_id = #{cbranchId}, + cdeptid = #{cdeptid} name = #{name}, @@ -398,6 +402,8 @@ iteration_name = #{iterationName}, product_id = #{productId}, product_name = #{productName}, + cbranch_id = #{cbranchId}, + cdeptid = #{cdeptid}, @@ -447,6 +453,8 @@ iteration_id = #{item.iterationId}, iteration_name = #{item.iterationName}, product_id = #{item.productId}, - product_name = #{item.productName} + product_name = #{item.productName}, + cbranch_id = #{item.cbranchId}, + cdeptid = #{item.cdeptid} \ No newline at end of file