Browse Source

添加节点类型、标签等

master
陈裕财 4 years ago
parent
commit
7e4c37071e
  1. 24
      xm-core/src/main/java/com/xm/core/entity/XmProduct.java
  2. 161
      xm-core/src/main/java/com/xm/core/entity/XmProject.java
  3. 20
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml
  4. 159
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

24
xm-core/src/main/java/com/xm/core/entity/XmProduct.java

@ -8,9 +8,9 @@ import java.math.BigDecimal;
/** /**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> * 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmProduct所有属性名: <br> * 实体 XmProduct所有属性名: <br>
* id,productName,branchId,remark,version,pmUserid,pmUsername,ctime,deptid,pstatus,startTime,endTime,deptName,admUserid,admUsername,assistantUserid,assistantUsername,bizProcInstId,bizFlowState,isTpl,baselineId,baseTime,code,pbudgetWorkload,pbudgetAmount,pmenuBudgetWorkload,pmenuBudgetAmount;<br>
* id,productName,branchId,remark,version,pmUserid,pmUsername,ctime,deptid,pstatus,startTime,endTime,deptName,admUserid,admUsername,assUserid,assUsername,bizProcInstId,bizFlowState,isTpl,baselineId,baseTime,code,pbudgetWorkload,pbudgetAmount,pmenuBudgetWorkload,pmenuBudgetAmount;<br>
* xm_product 产品表的所有字段名: <br> * xm_product 产品表的所有字段名: <br>
* id,product_name,branch_id,remark,version,pm_userid,pm_username,ctime,deptid,pstatus,start_time,end_time,dept_name,adm_userid,adm_username,assistant_userid,assistant_username,biz_proc_inst_id,biz_flow_state,is_tpl,baseline_id,base_time,code,pbudget_workload,pbudget_amount,pmenu_budget_workload,pmenu_budget_amount;<br>
* id,product_name,branch_id,remark,version,pm_userid,pm_username,ctime,deptid,pstatus,start_time,end_time,dept_name,adm_userid,adm_username,ass_userid,ass_username,biz_proc_inst_id,biz_flow_state,is_tpl,baseline_id,base_time,code,pbudget_workload,pbudget_amount,pmenu_budget_workload,pmenu_budget_amount;<br>
* 当前主键(包括多主键):<br> * 当前主键(包括多主键):<br>
* id;<br> * id;<br>
*/ */
@ -66,10 +66,10 @@ public class XmProduct implements java.io.Serializable {
String admUsername; String admUsername;
@ApiModelProperty(notes="副经理编号",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="副经理编号",allowEmptyValue=true,example="",allowableValues="")
String assistantUserid;
String assUserid;
@ApiModelProperty(notes="副经理名称",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="副经理名称",allowEmptyValue=true,example="",allowableValues="")
String assistantUsername;
String assUsername;
@ApiModelProperty(notes="当前流程实例编号",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="当前流程实例编号",allowEmptyValue=true,example="",allowableValues="")
String bizProcInstId; String bizProcInstId;
@ -203,14 +203,14 @@ public class XmProduct implements java.io.Serializable {
/** /**
* 副经理编号 * 副经理编号
**/ **/
public void setAssistantUserid(String assistantUserid) {
this.assistantUserid = assistantUserid;
public void setAssUserid(String assUserid) {
this.assUserid = assUserid;
} }
/** /**
* 副经理名称 * 副经理名称
**/ **/
public void setAssistantUsername(String assistantUsername) {
this.assistantUsername = assistantUsername;
public void setAssUsername(String assUsername) {
this.assUsername = assUsername;
} }
/** /**
* 当前流程实例编号 * 当前流程实例编号
@ -366,14 +366,14 @@ public class XmProduct implements java.io.Serializable {
/** /**
* 副经理编号 * 副经理编号
**/ **/
public String getAssistantUserid() {
return this.assistantUserid;
public String getAssUserid() {
return this.assUserid;
} }
/** /**
* 副经理名称 * 副经理名称
**/ **/
public String getAssistantUsername() {
return this.assistantUsername;
public String getAssUsername() {
return this.assUsername;
} }
/** /**
* 当前流程实例编号 * 当前流程实例编号

161
xm-core/src/main/java/com/xm/core/entity/XmProject.java

@ -8,9 +8,9 @@ import java.math.BigDecimal;
/** /**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> * 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmProject所有属性名: <br> * 实体 XmProject所有属性名: <br>
* id,code,name,xmType,startTime,endTime,urgent,priority,description,createUserid,createUsername,createTime,assess,assessRemarks,status,branchId,planTotalCost,bizProcInstId,bizFlowState,planNouserAt,planInnerUserAt,planOutUserAt,locked,baseTime,baseRemark,baselineId,planWorkload,totalReceivables,budgetMarginRate,contractAmt,planInnerUserPrice,planOutUserPrice,planOutUserCnt,planInnerUserCnt,planWorkingHours,taxRate,planInnerUserWorkload,planOutUserWorkload,fromTplId,budgetCtrl,deptid,showOut,isTpl;<br>
* id,code,name,xmType,startTime,endTime,urgent,priority,description,createUserid,createUsername,createTime,assess,assessRemarks,status,branchId,planTotalCost,bizProcInstId,bizFlowState,planNouserAt,planInnerUserAt,planOutUserAt,locked,baseTime,baseRemark,baselineId,planWorkload,totalReceivables,budgetMarginRate,contractAmt,planInnerUserPrice,planOutUserPrice,planOutUserCnt,planInnerUserCnt,planWorkingHours,taxRate,planInnerUserWorkload,planOutUserWorkload,fromTplId,budgetCtrl,deptid,showOut,isTpl,pmUserid,pmUsername,assUserid,assUsername,admUserid,admUsername;<br>
* xm_project xm_project的所有字段名: <br> * xm_project xm_project的所有字段名: <br>
* id,code,name,xm_type,start_time,end_time,urgent,priority,description,create_userid,create_username,create_time,assess,assess_remarks,status,branch_id,plan_total_cost,biz_proc_inst_id,biz_flow_state,plan_nouser_at,plan_inner_user_at,plan_out_user_at,locked,base_time,base_remark,baseline_id,plan_workload,total_receivables,budget_margin_rate,contract_amt,plan_inner_user_price,plan_out_user_price,plan_out_user_cnt,plan_inner_user_cnt,plan_working_hours,tax_rate,plan_inner_user_workload,plan_out_user_workload,from_tpl_id,budget_ctrl,deptid,show_out,is_tpl;<br>
* id,code,name,xm_type,start_time,end_time,urgent,priority,description,create_userid,create_username,create_time,assess,assess_remarks,status,branch_id,plan_total_cost,biz_proc_inst_id,biz_flow_state,plan_nouser_at,plan_inner_user_at,plan_out_user_at,locked,base_time,base_remark,baseline_id,plan_workload,total_receivables,budget_margin_rate,contract_amt,plan_inner_user_price,plan_out_user_price,plan_out_user_cnt,plan_inner_user_cnt,plan_working_hours,tax_rate,plan_inner_user_workload,plan_out_user_workload,from_tpl_id,budget_ctrl,deptid,show_out,is_tpl,pm_userid,pm_username,ass_userid,ass_username,adm_userid,adm_username;<br>
* 当前主键(包括多主键):<br> * 当前主键(包括多主键):<br>
* id;<br> * id;<br>
*/ */
@ -62,16 +62,7 @@ public class XmProject implements java.io.Serializable {
@ApiModelProperty(notes="考核备注",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="考核备注",allowEmptyValue=true,example="",allowableValues="")
String assessRemarks; String assessRemarks;
@ApiModelProperty(notes="项目状态,0|初始\n" +
"1|售前\n" +
"2|立项中\n" +
"3|实施中\n" +
"4|暂停中\n" +
"5|结项中\n" +
"6|已结项\n" +
"7|售后\n" +
"8|已完成\n" +
"9|已关闭",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="0|初始",allowEmptyValue=true,example="",allowableValues="")
String status; String status;
@ApiModelProperty(notes="机构编号",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="机构编号",allowEmptyValue=true,example="",allowableValues="")
@ -86,13 +77,13 @@ public class XmProject implements java.io.Serializable {
@ApiModelProperty(notes="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除",allowEmptyValue=true,example="",allowableValues="")
String bizFlowState; String bizFlowState;
@ApiModelProperty(notes="非人力成本总预算-应该大于或等于计划非人力总成本",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="非人力成本总预算-应该大于或等于阶段计划非人力总成本",allowEmptyValue=true,example="",allowableValues="")
BigDecimal planNouserAt; BigDecimal planNouserAt;
@ApiModelProperty(notes="内部人力成本总预算-应该大于或等于计划内部人力总成本",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="内部人力成本总预算-应该大于或等于阶段计划内部人力总成本",allowEmptyValue=true,example="",allowableValues="")
BigDecimal planInnerUserAt; BigDecimal planInnerUserAt;
@ApiModelProperty(notes="外购人力成本总预算-应该大于或等于计划外购人力总成本",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="外购人力成本总预算-应该大于或等于阶段计划外购人力总成本",allowEmptyValue=true,example="",allowableValues="")
BigDecimal planOutUserAt; BigDecimal planOutUserAt;
@ApiModelProperty(notes="是否锁定整个项目不允许变化0否1是",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="是否锁定整个项目不允许变化0否1是",allowEmptyValue=true,example="",allowableValues="")
@ -107,7 +98,7 @@ public class XmProject implements java.io.Serializable {
@ApiModelProperty(notes="基线主键",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="基线主键",allowEmptyValue=true,example="",allowableValues="")
String baselineId; String baselineId;
@ApiModelProperty(notes="总预算工作量-应该大于或等于计划总工作量",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="总预算工作量-应该大于或等于阶段计划总工作量",allowEmptyValue=true,example="",allowableValues="")
BigDecimal planWorkload; BigDecimal planWorkload;
@ApiModelProperty(notes="总预计收款金额",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="总预计收款金额",allowEmptyValue=true,example="",allowableValues="")
@ -137,10 +128,10 @@ public class XmProject implements java.io.Serializable {
@ApiModelProperty(notes="税率",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="税率",allowEmptyValue=true,example="",allowableValues="")
BigDecimal taxRate; BigDecimal taxRate;
@ApiModelProperty(notes="内部人力总工作量-应该大于或等于计划内部人力总成本",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="内部人力总工作量-应该大于或等于阶段计划内部人力总成本",allowEmptyValue=true,example="",allowableValues="")
BigDecimal planInnerUserWorkload; BigDecimal planInnerUserWorkload;
@ApiModelProperty(notes="外购人力总工作量-应该大于或等于计划外购人力总成本",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="外购人力总工作量-应该大于或等于阶段计划外购人力总成本",allowEmptyValue=true,example="",allowableValues="")
BigDecimal planOutUserWorkload; BigDecimal planOutUserWorkload;
@ApiModelProperty(notes="关联模板编号",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="关联模板编号",allowEmptyValue=true,example="",allowableValues="")
@ -158,6 +149,24 @@ public class XmProject implements java.io.Serializable {
@ApiModelProperty(notes="是否为模板",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="是否为模板",allowEmptyValue=true,example="",allowableValues="")
String isTpl; String isTpl;
@ApiModelProperty(notes="项目经理编号",allowEmptyValue=true,example="",allowableValues="")
String pmUserid;
@ApiModelProperty(notes="项目经理名称",allowEmptyValue=true,example="",allowableValues="")
String pmUsername;
@ApiModelProperty(notes="助理、副经理编号",allowEmptyValue=true,example="",allowableValues="")
String assUserid;
@ApiModelProperty(notes="助理、副经理姓名",allowEmptyValue=true,example="",allowableValues="")
String assUsername;
@ApiModelProperty(notes="主管领导编号",allowEmptyValue=true,example="",allowableValues="")
String admUserid;
@ApiModelProperty(notes="主管领导姓名",allowEmptyValue=true,example="",allowableValues="")
String admUsername;
/**项目编号**/ /**项目编号**/
public XmProject(String id) { public XmProject(String id) {
this.id = id; this.id = id;
@ -252,17 +261,7 @@ public class XmProject implements java.io.Serializable {
this.assessRemarks = assessRemarks; this.assessRemarks = assessRemarks;
} }
/** /**
* 项目状态
* 0|初始 * 0|初始
* 1|售前
* 2|立项中
* 3|实施中
* 4|暂停中
* 5|结项中
* 6|已结项
* 7|售后
* 8|已完成
* 9|已关闭
**/ **/
public void setStatus(String status) { public void setStatus(String status) {
this.status = status; this.status = status;
@ -292,19 +291,19 @@ public class XmProject implements java.io.Serializable {
this.bizFlowState = bizFlowState; this.bizFlowState = bizFlowState;
} }
/** /**
* 非人力成本总预算-应该大于或等于计划非人力总成本
* 非人力成本总预算-应该大于或等于阶段计划非人力总成本
**/ **/
public void setPlanNouserAt(BigDecimal planNouserAt) { public void setPlanNouserAt(BigDecimal planNouserAt) {
this.planNouserAt = planNouserAt; this.planNouserAt = planNouserAt;
} }
/** /**
* 内部人力成本总预算-应该大于或等于计划内部人力总成本
* 内部人力成本总预算-应该大于或等于阶段计划内部人力总成本
**/ **/
public void setPlanInnerUserAt(BigDecimal planInnerUserAt) { public void setPlanInnerUserAt(BigDecimal planInnerUserAt) {
this.planInnerUserAt = planInnerUserAt; this.planInnerUserAt = planInnerUserAt;
} }
/** /**
* 外购人力成本总预算-应该大于或等于计划外购人力总成本
* 外购人力成本总预算-应该大于或等于阶段计划外购人力总成本
**/ **/
public void setPlanOutUserAt(BigDecimal planOutUserAt) { public void setPlanOutUserAt(BigDecimal planOutUserAt) {
this.planOutUserAt = planOutUserAt; this.planOutUserAt = planOutUserAt;
@ -334,7 +333,7 @@ public class XmProject implements java.io.Serializable {
this.baselineId = baselineId; this.baselineId = baselineId;
} }
/** /**
* 总预算工作量-应该大于或等于计划总工作量
* 总预算工作量-应该大于或等于阶段计划总工作量
**/ **/
public void setPlanWorkload(BigDecimal planWorkload) { public void setPlanWorkload(BigDecimal planWorkload) {
this.planWorkload = planWorkload; this.planWorkload = planWorkload;
@ -394,13 +393,13 @@ public class XmProject implements java.io.Serializable {
this.taxRate = taxRate; this.taxRate = taxRate;
} }
/** /**
* 内部人力总工作量-应该大于或等于计划内部人力总成本
* 内部人力总工作量-应该大于或等于阶段计划内部人力总成本
**/ **/
public void setPlanInnerUserWorkload(BigDecimal planInnerUserWorkload) { public void setPlanInnerUserWorkload(BigDecimal planInnerUserWorkload) {
this.planInnerUserWorkload = planInnerUserWorkload; this.planInnerUserWorkload = planInnerUserWorkload;
} }
/** /**
* 外购人力总工作量-应该大于或等于计划外购人力总成本
* 外购人力总工作量-应该大于或等于阶段计划外购人力总成本
**/ **/
public void setPlanOutUserWorkload(BigDecimal planOutUserWorkload) { public void setPlanOutUserWorkload(BigDecimal planOutUserWorkload) {
this.planOutUserWorkload = planOutUserWorkload; this.planOutUserWorkload = planOutUserWorkload;
@ -435,6 +434,42 @@ public class XmProject implements java.io.Serializable {
public void setIsTpl(String isTpl) { public void setIsTpl(String isTpl) {
this.isTpl = isTpl; this.isTpl = isTpl;
} }
/**
* 项目经理编号
**/
public void setPmUserid(String pmUserid) {
this.pmUserid = pmUserid;
}
/**
* 项目经理名称
**/
public void setPmUsername(String pmUsername) {
this.pmUsername = pmUsername;
}
/**
* 助理副经理编号
**/
public void setAssUserid(String assUserid) {
this.assUserid = assUserid;
}
/**
* 助理副经理姓名
**/
public void setAssUsername(String assUsername) {
this.assUsername = assUsername;
}
/**
* 主管领导编号
**/
public void setAdmUserid(String admUserid) {
this.admUserid = admUserid;
}
/**
* 主管领导姓名
**/
public void setAdmUsername(String admUsername) {
this.admUsername = admUsername;
}
/** /**
* 项目编号 * 项目编号
@ -521,17 +556,7 @@ public class XmProject implements java.io.Serializable {
return this.assessRemarks; return this.assessRemarks;
} }
/** /**
* 项目状态
* 0|初始 * 0|初始
* 1|售前
* 2|立项中
* 3|实施中
* 4|暂停中
* 5|结项中
* 6|已结项
* 7|售后
* 8|已完成
* 9|已关闭
**/ **/
public String getStatus() { public String getStatus() {
return this.status; return this.status;
@ -561,19 +586,19 @@ public class XmProject implements java.io.Serializable {
return this.bizFlowState; return this.bizFlowState;
} }
/** /**
* 非人力成本总预算-应该大于或等于计划非人力总成本
* 非人力成本总预算-应该大于或等于阶段计划非人力总成本
**/ **/
public BigDecimal getPlanNouserAt() { public BigDecimal getPlanNouserAt() {
return this.planNouserAt; return this.planNouserAt;
} }
/** /**
* 内部人力成本总预算-应该大于或等于计划内部人力总成本
* 内部人力成本总预算-应该大于或等于阶段计划内部人力总成本
**/ **/
public BigDecimal getPlanInnerUserAt() { public BigDecimal getPlanInnerUserAt() {
return this.planInnerUserAt; return this.planInnerUserAt;
} }
/** /**
* 外购人力成本总预算-应该大于或等于计划外购人力总成本
* 外购人力成本总预算-应该大于或等于阶段计划外购人力总成本
**/ **/
public BigDecimal getPlanOutUserAt() { public BigDecimal getPlanOutUserAt() {
return this.planOutUserAt; return this.planOutUserAt;
@ -603,7 +628,7 @@ public class XmProject implements java.io.Serializable {
return this.baselineId; return this.baselineId;
} }
/** /**
* 总预算工作量-应该大于或等于计划总工作量
* 总预算工作量-应该大于或等于阶段计划总工作量
**/ **/
public BigDecimal getPlanWorkload() { public BigDecimal getPlanWorkload() {
return this.planWorkload; return this.planWorkload;
@ -663,13 +688,13 @@ public class XmProject implements java.io.Serializable {
return this.taxRate; return this.taxRate;
} }
/** /**
* 内部人力总工作量-应该大于或等于计划内部人力总成本
* 内部人力总工作量-应该大于或等于阶段计划内部人力总成本
**/ **/
public BigDecimal getPlanInnerUserWorkload() { public BigDecimal getPlanInnerUserWorkload() {
return this.planInnerUserWorkload; return this.planInnerUserWorkload;
} }
/** /**
* 外购人力总工作量-应该大于或等于计划外购人力总成本
* 外购人力总工作量-应该大于或等于阶段计划外购人力总成本
**/ **/
public BigDecimal getPlanOutUserWorkload() { public BigDecimal getPlanOutUserWorkload() {
return this.planOutUserWorkload; return this.planOutUserWorkload;
@ -704,5 +729,41 @@ public class XmProject implements java.io.Serializable {
public String getIsTpl() { public String getIsTpl() {
return this.isTpl; return this.isTpl;
} }
/**
* 项目经理编号
**/
public String getPmUserid() {
return this.pmUserid;
}
/**
* 项目经理名称
**/
public String getPmUsername() {
return this.pmUsername;
}
/**
* 助理副经理编号
**/
public String getAssUserid() {
return this.assUserid;
}
/**
* 助理副经理姓名
**/
public String getAssUsername() {
return this.assUsername;
}
/**
* 主管领导编号
**/
public String getAdmUserid() {
return this.admUserid;
}
/**
* 主管领导姓名
**/
public String getAdmUsername() {
return this.admUsername;
}
} }

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

@ -106,7 +106,7 @@
insert into xm_product( insert into xm_product(
<include refid="columns"/> <include refid="columns"/>
) values ( ) values (
#{id},#{productName},#{branchId},#{remark},#{version},#{pmUserid},#{pmUsername},#{ctime},#{deptid},#{pstatus},#{startTime},#{endTime},#{deptName},#{admUserid},#{admUsername},#{assistantUserid},#{assistantUsername},#{bizProcInstId},#{bizFlowState},#{isTpl},#{baselineId},#{baseTime},#{code},#{pbudgetWorkload},#{pbudgetAmount},#{pmenuBudgetWorkload},#{pmenuBudgetAmount}
#{id},#{productName},#{branchId},#{remark},#{version},#{pmUserid},#{pmUsername},#{ctime},#{deptid},#{pstatus},#{startTime},#{endTime},#{deptName},#{admUserid},#{admUsername},#{assUserid},#{assUsername},#{bizProcInstId},#{bizFlowState},#{isTpl},#{baselineId},#{baseTime},#{code},#{pbudgetWorkload},#{pbudgetAmount},#{pmenuBudgetWorkload},#{pmenuBudgetAmount}
) )
</insert> </insert>
@ -169,7 +169,7 @@
<!--sql片段 列--> <!--sql片段 列-->
<sql id="columns"> <sql id="columns">
id,product_name,branch_id,remark,version,pm_userid,pm_username,ctime,deptid,pstatus,start_time,end_time,dept_name,adm_userid,adm_username,assistant_userid,assistant_username,biz_proc_inst_id,biz_flow_state,is_tpl,baseline_id,base_time,code,pbudget_workload,pbudget_amount,pmenu_budget_workload,pmenu_budget_amount
id,product_name,branch_id,remark,version,pm_userid,pm_username,ctime,deptid,pstatus,start_time,end_time,dept_name,adm_userid,adm_username,ass_userid,ass_username,biz_proc_inst_id,biz_flow_state,is_tpl,baseline_id,base_time,code,pbudget_workload,pbudget_amount,pmenu_budget_workload,pmenu_budget_amount
</sql> </sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> <!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
@ -189,8 +189,8 @@
<if test="deptName != null and deptName != ''"> and res.dept_name = #{deptName} </if> <if test="deptName != null and deptName != ''"> and res.dept_name = #{deptName} </if>
<if test="admUserid != null and admUserid != ''"> and res.adm_userid = #{admUserid} </if> <if test="admUserid != null and admUserid != ''"> and res.adm_userid = #{admUserid} </if>
<if test="admUsername != null and admUsername != ''"> and res.adm_username = #{admUsername} </if> <if test="admUsername != null and admUsername != ''"> and res.adm_username = #{admUsername} </if>
<if test="assistantUserid != null and assistantUserid != ''"> and res.assistant_userid = #{assistantUserid} </if>
<if test="assistantUsername != null and assistantUsername != ''"> and res.assistant_username = #{assistantUsername} </if>
<if test="assUserid != null and assUserid != ''"> and res.ass_userid = #{assUserid} </if>
<if test="assUsername != null and assUsername != ''"> and res.ass_username = #{assUsername} </if>
<if test="bizProcInstId != null and bizProcInstId != ''"> and res.biz_proc_inst_id = #{bizProcInstId} </if> <if test="bizProcInstId != null and bizProcInstId != ''"> and res.biz_proc_inst_id = #{bizProcInstId} </if>
<if test="bizFlowState != null and bizFlowState != ''"> and res.biz_flow_state = #{bizFlowState} </if> <if test="bizFlowState != null and bizFlowState != ''"> and res.biz_flow_state = #{bizFlowState} </if>
<if test="isTpl != null and isTpl != ''"> and res.is_tpl = #{isTpl} </if> <if test="isTpl != null and isTpl != ''"> and res.is_tpl = #{isTpl} </if>
@ -218,8 +218,8 @@
dept_name = #{deptName}, dept_name = #{deptName},
adm_userid = #{admUserid}, adm_userid = #{admUserid},
adm_username = #{admUsername}, adm_username = #{admUsername},
assistant_userid = #{assistantUserid},
assistant_username = #{assistantUsername},
ass_userid = #{assUserid},
ass_username = #{assUsername},
biz_proc_inst_id = #{bizProcInstId}, biz_proc_inst_id = #{bizProcInstId},
biz_flow_state = #{bizFlowState}, biz_flow_state = #{bizFlowState},
is_tpl = #{isTpl}, is_tpl = #{isTpl},
@ -246,8 +246,8 @@
<if test="deptName != null and deptName != ''"> dept_name = #{deptName}, </if> <if test="deptName != null and deptName != ''"> dept_name = #{deptName}, </if>
<if test="admUserid != null and admUserid != ''"> adm_userid = #{admUserid}, </if> <if test="admUserid != null and admUserid != ''"> adm_userid = #{admUserid}, </if>
<if test="admUsername != null and admUsername != ''"> adm_username = #{admUsername}, </if> <if test="admUsername != null and admUsername != ''"> adm_username = #{admUsername}, </if>
<if test="assistantUserid != null and assistantUserid != ''"> assistant_userid = #{assistantUserid}, </if>
<if test="assistantUsername != null and assistantUsername != ''"> assistant_username = #{assistantUsername}, </if>
<if test="assUserid != null and assUserid != ''"> ass_userid = #{assUserid}, </if>
<if test="assUsername != null and assUsername != ''"> ass_username = #{assUsername}, </if>
<if test="bizProcInstId != null and bizProcInstId != ''"> biz_proc_inst_id = #{bizProcInstId}, </if> <if test="bizProcInstId != null and bizProcInstId != ''"> biz_proc_inst_id = #{bizProcInstId}, </if>
<if test="bizFlowState != null and bizFlowState != ''"> biz_flow_state = #{bizFlowState}, </if> <if test="bizFlowState != null and bizFlowState != ''"> biz_flow_state = #{bizFlowState}, </if>
<if test="isTpl != null and isTpl != ''"> is_tpl = #{isTpl}, </if> <if test="isTpl != null and isTpl != ''"> is_tpl = #{isTpl}, </if>
@ -275,8 +275,8 @@
dept_name = #{item.deptName}, dept_name = #{item.deptName},
adm_userid = #{item.admUserid}, adm_userid = #{item.admUserid},
adm_username = #{item.admUsername}, adm_username = #{item.admUsername},
assistant_userid = #{item.assistantUserid},
assistant_username = #{item.assistantUsername},
ass_userid = #{item.assUserid},
ass_username = #{item.assUsername},
biz_proc_inst_id = #{item.bizProcInstId}, biz_proc_inst_id = #{item.bizProcInstId},
biz_flow_state = #{item.bizFlowState}, biz_flow_state = #{item.bizFlowState},
is_tpl = #{item.isTpl}, is_tpl = #{item.isTpl},

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

@ -3,10 +3,68 @@
<mapper namespace="com.xm.core.entity.XmProject"> <mapper namespace="com.xm.core.entity.XmProject">
<!--开始 自定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="startYear != null and startYear != ''" >and (
date_format(start_time,'%Y') = #{startYear}
or date_format(end_time,'%Y') = #{startYear}
or ( date_format(start_time,'%Y') &lt; #{startYear} and date_format(end_time,'%Y') &gt; #{startYear} )
)
</if>
<!-- 筛选掉已结束项目 -->
<if test="hideStatus != null and hideStatus != ''">
and res.status != #{hideStatus}
</if>
<!-- 我参与的 包括我创建的,我监控的,我审核的-->
<if test=" compete !=null and compete !='' ">
and ( exists ( select 1 from xm_project_group g,XM.xm_project_group_user gu where gu.group_id=g.id and gu.userid=#{userid} and g.project_id=res.id )
or res.create_userid=#{compete}
or exists ( select 1 from xm_task_execuser exe where exe.project_id=res.id and exe.userid=#{compete} )
)
</if>
<!-- 按参与角色查询等-->
<if test="pgTypeIds != null ">
and exists ( select 1 from xm_project_group g,XM.xm_project_group_user gu where gu.group_id=g.id and gu.userid=#{userid} and g.project_id=res.id
and g.pg_type_id in
<foreach collection="pgTypeIds" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
)
</if>
<if test=" myExecuserStatus != null and myExecuserStatus != ''">
and exists ( select 1 from xm_task_execuser exe where exe.project_id=res.id and exe.userid=#{userid}
<if test=' myExecuserStatus != "all" '>
and exe.status=#{myExecuserStatus}
</if>
)
</if>
<if test="myFocus != null and myFocus != ''">
and exists ( select 1 from 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_product_project_link ppl
where ppl.product_id=#{productId} and ppl.project_id=res.id
)
</if>
<if test="iterationId!=null and iterationId!=''">
and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project_link ppl
on ipl.product_id=ppl.product_id
where ppl.project_id =res.id and ipl.iteration_id=#{iterationId}
)
</if>
<if test="key != null and key !='' "> and res.name like #{key} </if>
<if test="isTpl!=null and isTpl=='1'">
and (res.branch_id in( #{platformBranchId},#{myBranchId}) and res.is_tpl='1')
</if>
</sql>
<insert id="insertProcessApprova" <insert id="insertProcessApprova"
parameterType="HashMap" parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id"> useGeneratedKeys="false" keyProperty="id">
@ -66,70 +124,9 @@
pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project res pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project res
left join xm_project_state s on s.project_id=res.id left join xm_project_state s on s.project_id=res.id
left join xm_project_process_approva pa on res.id=pa.project_id and res.biz_proc_inst_id=pa.proc_inst_id left join xm_project_process_approva pa on res.id=pa.project_id and res.biz_proc_inst_id=pa.proc_inst_id
<where> <where>
<if test="ids != null"> and
id in
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
<include refid="whereForMap"/>
<include refid="where"/> <include refid="where"/>
<!-- 筛选属于当前年份的项目 -->
<if test="startYear != null and startYear != ''" >and (
date_format(start_time,'%Y') = #{startYear}
or date_format(end_time,'%Y') = #{startYear}
or ( date_format(start_time,'%Y') &lt; #{startYear} and date_format(end_time,'%Y') &gt; #{startYear} )
)
</if>
<!-- 筛选掉已结束项目 -->
<if test="hideStatus != null and hideStatus != ''">
and res.status != #{hideStatus}
</if>
<!-- 我参与的 包括我创建的,我监控的,我审核的-->
<if test=" compete !=null and compete !='' ">
and ( exists ( select 1 from xm_project_group g,XM.xm_project_group_user gu where gu.group_id=g.id and gu.userid=#{userid} and g.project_id=res.id )
or res.create_userid=#{compete}
or exists ( select 1 from xm_task_execuser exe where exe.project_id=res.id and exe.userid=#{compete} )
)
</if>
<!-- 按参与角色查询等-->
<if test="pgTypeIds != null ">
and exists ( select 1 from xm_project_group g,XM.xm_project_group_user gu where gu.group_id=g.id and gu.userid=#{userid} and g.project_id=res.id
and g.pg_type_id in
<foreach collection="pgTypeIds" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
)
</if>
<if test=" myExecuserStatus != null and myExecuserStatus != ''">
and exists ( select 1 from xm_task_execuser exe where exe.project_id=res.id and exe.userid=#{userid}
<if test=' myExecuserStatus != "all" '>
and exe.status=#{myExecuserStatus}
</if>
)
</if>
<if test="myFocus != null and myFocus != ''">
and exists ( select 1 from 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_product_project_link ppl
where ppl.product_id=#{productId} and ppl.project_id=res.id
)
</if>
<if test="iterationId!=null and iterationId!=''">
and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project_link ppl
on ipl.product_id=ppl.product_id
where ppl.project_id =res.id and ipl.iteration_id=#{iterationId}
)
</if>
<if test="key != null and key !='' "> and res.name like #{key} </if>
<if test="isTpl!=null and isTpl=='1'">
and (res.branch_id in( #{platformBranchId},#{myBranchId}) and res.is_tpl='1')
</if>
</where> </where>
</select> </select>
@ -166,7 +163,7 @@
insert into xm_project( insert into xm_project(
<include refid="columns"/> <include refid="columns"/>
) values ( ) values (
#{id},#{code},#{name},#{xmType},#{startTime},#{endTime},#{urgent},#{priority},#{description},#{createUserid},#{createUsername},#{createTime},#{assess},#{assessRemarks},#{status},#{branchId},#{planTotalCost},#{bizProcInstId},#{bizFlowState},#{planNouserAt},#{planInnerUserAt},#{planOutUserAt},#{locked},#{baseTime},#{baseRemark},#{baselineId},#{planWorkload},#{totalReceivables},#{budgetMarginRate},#{contractAmt},#{planInnerUserPrice},#{planOutUserPrice},#{planOutUserCnt},#{planInnerUserCnt},#{planWorkingHours},#{taxRate},#{planInnerUserWorkload},#{planOutUserWorkload},#{fromTplId},#{budgetCtrl},#{deptid},#{showOut},#{isTpl}
#{id},#{code},#{name},#{xmType},#{startTime},#{endTime},#{urgent},#{priority},#{description},#{createUserid},#{createUsername},#{createTime},#{assess},#{assessRemarks},#{status},#{branchId},#{planTotalCost},#{bizProcInstId},#{bizFlowState},#{planNouserAt},#{planInnerUserAt},#{planOutUserAt},#{locked},#{baseTime},#{baseRemark},#{baselineId},#{planWorkload},#{totalReceivables},#{budgetMarginRate},#{contractAmt},#{planInnerUserPrice},#{planOutUserPrice},#{planOutUserCnt},#{planInnerUserCnt},#{planWorkingHours},#{taxRate},#{planInnerUserWorkload},#{planOutUserWorkload},#{fromTplId},#{budgetCtrl},#{deptid},#{showOut},#{isTpl},#{pmUserid},#{pmUsername},#{assUserid},#{assUsername},#{admUserid},#{admUsername}
) )
</insert> </insert>
@ -229,7 +226,7 @@
<!--sql片段 列--> <!--sql片段 列-->
<sql id="columns"> <sql id="columns">
id,code,name,xm_type,start_time,end_time,urgent,priority,description,create_userid,create_username,create_time,assess,assess_remarks,status,branch_id,plan_total_cost,biz_proc_inst_id,biz_flow_state,plan_nouser_at,plan_inner_user_at,plan_out_user_at,locked,base_time,base_remark,baseline_id,plan_workload,total_receivables,budget_margin_rate,contract_amt,plan_inner_user_price,plan_out_user_price,plan_out_user_cnt,plan_inner_user_cnt,plan_working_hours,tax_rate,plan_inner_user_workload,plan_out_user_workload,from_tpl_id,budget_ctrl,deptid,show_out,is_tpl
id,code,name,xm_type,start_time,end_time,urgent,priority,description,create_userid,create_username,create_time,assess,assess_remarks,status,branch_id,plan_total_cost,biz_proc_inst_id,biz_flow_state,plan_nouser_at,plan_inner_user_at,plan_out_user_at,locked,base_time,base_remark,baseline_id,plan_workload,total_receivables,budget_margin_rate,contract_amt,plan_inner_user_price,plan_out_user_price,plan_out_user_cnt,plan_inner_user_cnt,plan_working_hours,tax_rate,plan_inner_user_workload,plan_out_user_workload,from_tpl_id,budget_ctrl,deptid,show_out,is_tpl,pm_userid,pm_username,ass_userid,ass_username,adm_userid,adm_username
</sql> </sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> <!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
@ -277,6 +274,12 @@
<if test="deptid != null and deptid != ''"> and res.deptid = #{deptid} </if> <if test="deptid != null and deptid != ''"> and res.deptid = #{deptid} </if>
<if test="showOut != null and showOut != ''"> and res.show_out = #{showOut} </if> <if test="showOut != null and showOut != ''"> and res.show_out = #{showOut} </if>
<if test="isTpl != null and isTpl != ''"> and res.is_tpl = #{isTpl} </if> <if test="isTpl != null and isTpl != ''"> and res.is_tpl = #{isTpl} </if>
<if test="pmUserid != null and pmUserid != ''"> and res.pm_userid = #{pmUserid} </if>
<if test="pmUsername != null and pmUsername != ''"> and res.pm_username = #{pmUsername} </if>
<if test="assUserid != null and assUserid != ''"> and res.ass_userid = #{assUserid} </if>
<if test="assUsername != null and assUsername != ''"> and res.ass_username = #{assUsername} </if>
<if test="admUserid != null and admUserid != ''"> and res.adm_userid = #{admUserid} </if>
<if test="admUsername != null and admUsername != ''"> and res.adm_username = #{admUsername} </if>
</sql> </sql>
<!--sql片段 更新字段 --> <!--sql片段 更新字段 -->
<sql id="set"> <sql id="set">
@ -321,7 +324,13 @@
budget_ctrl = #{budgetCtrl}, budget_ctrl = #{budgetCtrl},
deptid = #{deptid}, deptid = #{deptid},
show_out = #{showOut}, show_out = #{showOut},
is_tpl = #{isTpl}
is_tpl = #{isTpl},
pm_userid = #{pmUserid},
pm_username = #{pmUsername},
ass_userid = #{assUserid},
ass_username = #{assUsername},
adm_userid = #{admUserid},
adm_username = #{admUsername}
</sql> </sql>
<sql id="someFieldSet"> <sql id="someFieldSet">
<if test="code != null and code != ''"> code = #{code}, </if> <if test="code != null and code != ''"> code = #{code}, </if>
@ -366,6 +375,12 @@
<if test="deptid != null and deptid != ''"> deptid = #{deptid}, </if> <if test="deptid != null and deptid != ''"> deptid = #{deptid}, </if>
<if test="showOut != null and showOut != ''"> show_out = #{showOut}, </if> <if test="showOut != null and showOut != ''"> show_out = #{showOut}, </if>
<if test="isTpl != null and isTpl != ''"> is_tpl = #{isTpl}, </if> <if test="isTpl != null and isTpl != ''"> is_tpl = #{isTpl}, </if>
<if test="pmUserid != null and pmUserid != ''"> pm_userid = #{pmUserid}, </if>
<if test="pmUsername != null and pmUsername != ''"> pm_username = #{pmUsername}, </if>
<if test="assUserid != null and assUserid != ''"> ass_userid = #{assUserid}, </if>
<if test="assUsername != null and assUsername != ''"> ass_username = #{assUsername}, </if>
<if test="admUserid != null and admUserid != ''"> adm_userid = #{admUserid}, </if>
<if test="admUsername != null and admUsername != ''"> adm_username = #{admUsername}, </if>
</sql> </sql>
<!--sql片段 批量更新 --> <!--sql片段 批量更新 -->
<sql id="batchSet"> <sql id="batchSet">
@ -410,6 +425,12 @@
budget_ctrl = #{item.budgetCtrl}, budget_ctrl = #{item.budgetCtrl},
deptid = #{item.deptid}, deptid = #{item.deptid},
show_out = #{item.showOut}, show_out = #{item.showOut},
is_tpl = #{item.isTpl}
is_tpl = #{item.isTpl},
pm_userid = #{item.pmUserid},
pm_username = #{item.pmUsername},
ass_userid = #{item.assUserid},
ass_username = #{item.assUsername},
adm_userid = #{item.admUserid},
adm_username = #{item.admUsername}
</sql> </sql>
</mapper> </mapper>
Loading…
Cancel
Save