diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectGroupController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectGroupController.java
index ee3652bf..5da8e3d0 100644
--- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectGroupController.java
+++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectGroupController.java
@@ -270,6 +270,9 @@ public class XmProjectGroupController {
return m;
}
}
+ if(StringUtils.hasText(xmProjectGroup.getBranchId())){
+ xmProjectGroup.setBranchId(u.getBranchId());
+ }
this.xmProjectGroupService.parentIdPathsCalcBeforeSave(xmProjectGroup);
xmProjectGroupService.insert(xmProjectGroup);
if("1".equals(xmProjectGroup.getPgClass())){
diff --git a/xm-core/src/main/java/com/xm/core/entity/XmQuestion.java b/xm-core/src/main/java/com/xm/core/entity/XmQuestion.java
index 738ff38a..4654f051 100644
--- a/xm-core/src/main/java/com/xm/core/entity/XmQuestion.java
+++ b/xm-core/src/main/java/com/xm/core/entity/XmQuestion.java
@@ -8,9 +8,9 @@ import java.math.BigDecimal;
/**
* 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmQuestion所有属性名:
- * id,name,projectId,projectName,caseId,caseName,endTime,askUserid,askUsername,handlerUserid,handlerUsername,priority,solution,description,createUserid,createUsername,createTime,bugStatus,bizProcInstId,bizFlowState,menuId,menuName,planWorkload,planCostAmount,totalActWorkload,totalActCostAmount,expectResult,opStep,currResult,refRequire,bugSeverity,bugType,tagIds,tagNames,urls,ltime,qtype,taskId,taskName,iterationId,iterationName,caseExecId,lremark;
- * 表 XM.xm_question xm_question的所有字段名:
- * id,name,project_id,project_name,case_id,case_name,end_time,ask_userid,ask_username,handler_userid,handler_username,priority,solution,description,create_userid,create_username,create_time,bug_status,biz_proc_inst_id,biz_flow_state,menu_id,menu_name,plan_workload,plan_cost_amount,total_act_workload,total_act_cost_amount,expect_result,op_step,curr_result,ref_require,bug_severity,bug_type,tag_ids,tag_names,urls,ltime,qtype,task_id,task_name,iteration_id,iteration_name,case_exec_id,lremark;
+ * id,name,projectId,projectName,caseId,caseName,endTime,askUserid,askUsername,handlerUserid,handlerUsername,priority,solution,description,createUserid,createUsername,createTime,bugStatus,bizProcInstId,bizFlowState,menuId,menuName,planWorkload,planCostAmount,totalActWorkload,totalActCostAmount,expectResult,opStep,currResult,refRequire,bugSeverity,bugType,tagIds,tagNames,urls,ltime,qtype,taskId,taskName,iterationId,iterationName,caseExecId,lremark,productId;
+ * 表 xm_question xm_question的所有字段名:
+ * id,name,project_id,project_name,case_id,case_name,end_time,ask_userid,ask_username,handler_userid,handler_username,priority,solution,description,create_userid,create_username,create_time,bug_status,biz_proc_inst_id,biz_flow_state,menu_id,menu_name,plan_workload,plan_cost_amount,total_act_workload,total_act_cost_amount,expect_result,op_step,curr_result,ref_require,bug_severity,bug_type,tag_ids,tag_names,urls,ltime,qtype,task_id,task_name,iteration_id,iteration_name,case_exec_id,lremark,product_id;
* 当前主键(包括多主键):
* id;
*/
@@ -80,10 +80,10 @@ public class XmQuestion implements java.io.Serializable {
@ApiModelProperty(notes="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除",allowEmptyValue=true,example="",allowableValues="")
String bizFlowState;
- @ApiModelProperty(notes="需求编号",allowEmptyValue=true,example="",allowableValues="")
+ @ApiModelProperty(notes="故事编号",allowEmptyValue=true,example="",allowableValues="")
String menuId;
- @ApiModelProperty(notes="需求名称",allowEmptyValue=true,example="",allowableValues="")
+ @ApiModelProperty(notes="故事名称",allowEmptyValue=true,example="",allowableValues="")
String menuName;
@ApiModelProperty(notes="预估工时单位人时",allowEmptyValue=true,example="",allowableValues="")
@@ -148,6 +148,9 @@ public class XmQuestion implements java.io.Serializable {
@ApiModelProperty(notes="最后更新说明",allowEmptyValue=true,example="",allowableValues="")
String lremark;
+
+ @ApiModelProperty(notes="产品编号",allowEmptyValue=true,example="",allowableValues="")
+ String productId;
/**问题编号**/
public XmQuestion(String id) {
@@ -279,13 +282,13 @@ public class XmQuestion implements java.io.Serializable {
this.bizFlowState = bizFlowState;
}
/**
- * 需求编号
+ * 故事编号
**/
public void setMenuId(String menuId) {
this.menuId = menuId;
}
/**
- * 需求名称
+ * 故事名称
**/
public void setMenuName(String menuName) {
this.menuName = menuName;
@@ -416,6 +419,12 @@ public class XmQuestion implements java.io.Serializable {
public void setLremark(String lremark) {
this.lremark = lremark;
}
+ /**
+ * 产品编号
+ **/
+ public void setProductId(String productId) {
+ this.productId = productId;
+ }
/**
* 问题编号
@@ -538,13 +547,13 @@ public class XmQuestion implements java.io.Serializable {
return this.bizFlowState;
}
/**
- * 需求编号
+ * 故事编号
**/
public String getMenuId() {
return this.menuId;
}
/**
- * 需求名称
+ * 故事名称
**/
public String getMenuName() {
return this.menuName;
@@ -675,5 +684,11 @@ public class XmQuestion implements java.io.Serializable {
public String getLremark() {
return this.lremark;
}
+ /**
+ * 产品编号
+ **/
+ public String getProductId() {
+ return this.productId;
+ }
}
\ No newline at end of file
diff --git a/xm-core/src/main/java/com/xm/core/service/XmProjectGroupService.java b/xm-core/src/main/java/com/xm/core/service/XmProjectGroupService.java
index 48e49d29..2ea1cbd7 100644
--- a/xm-core/src/main/java/com/xm/core/service/XmProjectGroupService.java
+++ b/xm-core/src/main/java/com/xm/core/service/XmProjectGroupService.java
@@ -738,6 +738,7 @@ public class XmProjectGroupService extends BaseService {
Tips tips = new Tips("成功");
if (!StringUtils.hasText(currNode.getPgroupId()) || "0".equals(currNode.getPgroupId())) {
currNode.setPidPaths("0," + currNode.getId() + ",");
+ currNode.setLvl(1);
return tips;
} else {
List parentList=this.getParentList(currNode);
diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml
index 3b0eeaba..9851e849 100644
--- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml
+++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml
@@ -3,45 +3,71 @@
-
-
-
-
+
-
+
+ and (res.id) in
+
+ ( #{item})
+
+
+ and
+
+ find_in_set(#{item},res.tag_ids)
+
+
+ and exists (select 1 from xm_question_handle h where h.question_id = res.id and h.handler_userid=#{hisHandlerUserid} and handle_status=#{hisHandleStatus})
+ and res.create_time between #{createTimeStart} and #{createTimeEnd}
+ and res.ltime between #{ltimeStart} and #{ltimeEnd}
+
+ and exists( select 1 from xm_menu m where m.menu_id=res.menu_id and m.product_id=#{productId})
+ and ( res.create_userid=#{myUserid} or res.handler_userid=#{myUserid})
+ and
+ res.menu_id in
+
+ #{item}
+
+
+
+ and exists ( select 1 from xm_project_group_user gu where gu.userid=#{compete} and gu.project_id=res.project_id )
+
+ and res.name like #{key}
+ and res.status != 'resolved'
+
+
+ parameterType="HashMap"
+ useGeneratedKeys="false" keyProperty="id">
insert into xm_question_process_approva (
- id,question_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
+ id,question_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
- #{id},#{questionId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
+ #{id},#{questionId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
-
+
+ parameterType="HashMap">
update xm_question b ,XM.xm_question_process_approva pa
-
- pa.agree = #{agree},
- pa.act_id = #{actId},
- pa.assignee = #{assignee},
- pa.assignee_name = #{assigneeName},
- pa.task_name = #{taskName},
- pa.comment_msg = #{commentMsg},
- pa.flow_last_time = now(),
- pa.event_name = #{eventName},
- pa.flow_state=#{flowState},
- b.biz_flow_state=#{bizFlowState},
- b.biz_proc_inst_id=#{bizProcInstId},
-
+
+ pa.agree = #{agree},
+ pa.act_id = #{actId},
+ pa.assignee = #{assignee},
+ pa.assignee_name = #{assigneeName},
+ pa.task_name = #{taskName},
+ pa.comment_msg = #{commentMsg},
+ pa.flow_last_time = now(),
+ pa.event_name = #{eventName},
+ pa.flow_state=#{flowState},
+ b.biz_flow_state=#{bizFlowState},
+ b.biz_proc_inst_id=#{bizProcInstId},
+
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
- and b.id=pa.question_id
+ and b.id=pa.question_id
+ parameterType="HashMap">
update xm_question_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
@@ -49,7 +75,7 @@
delete from xm_question
- where biz_proc_inst_id=#{procInstId}
+ where biz_proc_inst_id=#{procInstId}
@@ -58,37 +84,10 @@
@@ -125,27 +124,27 @@
insert into xm_question(
) values (
- #{id},#{name},#{projectId},#{projectName},#{caseId},#{caseName},#{endTime},#{askUserid},#{askUsername},#{handlerUserid},#{handlerUsername},#{priority},#{solution},#{description},#{createUserid},#{createUsername},#{createTime},#{bugStatus},#{bizProcInstId},#{bizFlowState},#{menuId},#{menuName},#{planWorkload},#{planCostAmount},#{totalActWorkload},#{totalActCostAmount},#{expectResult},#{opStep},#{currResult},#{refRequire},#{bugSeverity},#{bugType},#{tagIds},#{tagNames},#{urls},#{ltime},#{qtype},#{taskId},#{taskName},#{iterationId},#{iterationName},#{caseExecId},#{lremark}
+ #{id},#{name},#{projectId},#{projectName},#{caseId},#{caseName},#{endTime},#{askUserid},#{askUsername},#{handlerUserid},#{handlerUsername},#{priority},#{solution},#{description},#{createUserid},#{createUsername},#{createTime},#{bugStatus},#{bizProcInstId},#{bizFlowState},#{menuId},#{menuName},#{planWorkload},#{planCostAmount},#{totalActWorkload},#{totalActCostAmount},#{expectResult},#{opStep},#{currResult},#{refRequire},#{bugSeverity},#{bugType},#{tagIds},#{tagNames},#{urls},#{ltime},#{qtype},#{taskId},#{taskName},#{iterationId},#{iterationName},#{caseExecId},#{lremark},#{productId}
)
- delete from xm_question
+ delete from xm_question res
- 1=2
+
- delete from xm_question
+ delete from xm_question
where id = #{id}
- update xm_question
+ update xm_question
@@ -154,7 +153,7 @@
- update xm_question
+ update xm_question
@@ -169,7 +168,7 @@
- update xm_question
+ update xm_question
set
where id = #{item.id}
@@ -177,20 +176,18 @@
- delete from xm_question
+ delete from xm_question
where
- (id)
- in
+ (id) in
- ( #{item.id}
- )
+ ( #{item.id} )
- id,name,project_id,project_name,case_id,case_name,end_time,ask_userid,ask_username,handler_userid,handler_username,priority,solution,description,create_userid,create_username,create_time,bug_status,biz_proc_inst_id,biz_flow_state,menu_id,menu_name,plan_workload,plan_cost_amount,total_act_workload,total_act_cost_amount,expect_result,op_step,curr_result,ref_require,bug_severity,bug_type,tag_ids,tag_names,urls,ltime,qtype,task_id,task_name,iteration_id,iteration_name,case_exec_id,lremark
+ id,name,project_id,project_name,case_id,case_name,end_time,ask_userid,ask_username,handler_userid,handler_username,priority,solution,description,create_userid,create_username,create_time,bug_status,biz_proc_inst_id,biz_flow_state,menu_id,menu_name,plan_workload,plan_cost_amount,total_act_workload,total_act_cost_amount,expect_result,op_step,curr_result,ref_require,bug_severity,bug_type,tag_ids,tag_names,urls,ltime,qtype,task_id,task_name,iteration_id,iteration_name,case_exec_id,lremark,product_id
@@ -238,6 +235,7 @@
and res.iteration_name = #{iterationName}
and res.case_exec_id = #{caseExecId}
and res.lremark = #{lremark}
+ and res.product_id = #{productId}
@@ -282,7 +280,8 @@
iteration_id = #{iterationId},
iteration_name = #{iterationName},
case_exec_id = #{caseExecId},
- lremark = #{lremark}
+ lremark = #{lremark},
+ product_id = #{productId}
name = #{name},
@@ -327,6 +326,7 @@
iteration_name = #{iterationName},
case_exec_id = #{caseExecId},
lremark = #{lremark},
+ product_id = #{productId},
@@ -371,6 +371,7 @@
iteration_id = #{item.iterationId},
iteration_name = #{item.iterationName},
case_exec_id = #{item.caseExecId},
- lremark = #{item.lremark}
+ lremark = #{item.lremark},
+ product_id = #{item.productId}
\ No newline at end of file