流程小节点增加权重
"
This commit is contained in:
parent
c736fb0f2d
commit
ddf11e0134
@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
@ -24,7 +26,7 @@ public class Flow implements java.io.Serializable {
|
||||
private Date gmtCreate;
|
||||
//最后修改时间
|
||||
private Date gmtModified;
|
||||
//自己部门小伙伴 走的 流程id
|
||||
//自己部门小伙伴 走的 流程id,考核组id
|
||||
private Long flowId;
|
||||
//
|
||||
private String opt;
|
||||
@ -32,6 +34,10 @@ public class Flow implements java.io.Serializable {
|
||||
private String optDesc;
|
||||
//角色 id
|
||||
private Long roleId;
|
||||
//chart_id,流程节点id
|
||||
private Long chartId;
|
||||
//权重,评分时的权重
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
||||
@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* </p>*考核模板流程记录表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-19
|
||||
* @since 2020-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -53,6 +55,9 @@ public class FlowChartDetailRecord implements java.io.Serializable {
|
||||
//第几步从0开始,按照有小到排序
|
||||
@ApiModelProperty(value = "第几步从0开始,按照有小到排序", name = "stepIndex")
|
||||
private Integer stepIndex;
|
||||
//权重,评分时所占权重
|
||||
@ApiModelProperty(value = "权重,评分时所占权重", name = "weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -233,6 +238,21 @@ public class FlowChartDetailRecord implements java.io.Serializable {
|
||||
this.stepIndex = stepIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 权重,评分时所占权重
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getWeight() {
|
||||
return weight;
|
||||
}
|
||||
/**
|
||||
* 权重,评分时所占权重
|
||||
* @param weight
|
||||
*/
|
||||
public void setWeight(BigDecimal weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowChartDetailRecord{" +
|
||||
@ -248,6 +268,7 @@ public class FlowChartDetailRecord implements java.io.Serializable {
|
||||
",roleIds=" + roleIds +
|
||||
",stepType=" + stepType +
|
||||
",stepIndex=" + stepIndex +
|
||||
",weight=" + weight +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -43,6 +44,9 @@ public class FlowChartDetailRecordDto {
|
||||
//第几步从0开始,按照有小到排序
|
||||
@ApiModelProperty(value = "第几步从0开始,按照有小到排序", name = "stepIndex")
|
||||
private Integer stepIndex;
|
||||
//权重,评分时所占权重
|
||||
@ApiModelProperty(value = "权重,评分时所占权重", name = "weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
||||
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
@ -62,6 +64,9 @@ public class FlowChartDetailRecordReq implements java.io.Serializable {
|
||||
//第几步从0开始,按照有小到排序
|
||||
@ApiModelProperty(value = "第几步从0开始,按照有小到排序", name = "stepIndex")
|
||||
private Integer stepIndex;
|
||||
//权重,评分时所占权重
|
||||
@ApiModelProperty(value = "权重,评分时所占权重", name = "weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
||||
@ -2,6 +2,7 @@ package com.lz.modules.performance.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lz.common.emun.ChartOptType;
|
||||
import com.lz.common.emun.CheckStaffType;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
@ -45,6 +46,9 @@ public class FlowStartController {
|
||||
@Autowired
|
||||
private FlowChartDetailRecordService flowChartDetailRecordService;
|
||||
|
||||
@Autowired
|
||||
private FlowService flowService;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -95,7 +99,7 @@ public class FlowStartController {
|
||||
}
|
||||
|
||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||
|
||||
//下面初始化参与人员
|
||||
for (String staffId:staffIds
|
||||
) {
|
||||
EvaluationStartStaff evaluationStartStaff = new EvaluationStartStaff();
|
||||
@ -106,6 +110,11 @@ public class FlowStartController {
|
||||
evaluationStartStaffs.add(evaluationStartStaff);
|
||||
|
||||
}
|
||||
if(evaluationStartStaffs.size() == 0){
|
||||
|
||||
return R.error(evaluationGroup.getName() + "——未指定考核参与人员");
|
||||
|
||||
}
|
||||
//下面初始化管理人员
|
||||
if(evaluationGroup.getManagerIds() != null && evaluationGroup.getManagerIds().length() > 0){
|
||||
String[] managerIds = evaluationGroup.getManagerIds().split(",");
|
||||
@ -122,8 +131,50 @@ public class FlowStartController {
|
||||
}
|
||||
if(evaluationStartStaffs.size() > 0){
|
||||
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||
//下面初始化lz_flow流程表 lz_flow_approval_role流程审批表
|
||||
List<Flow> flows = new ArrayList<>();
|
||||
List<FlowApprovalRole> flowApprovalRoles = new ArrayList<>();
|
||||
for (FlowChartDetailRecord flowChartDetailRecord:flowChartDetailRecords
|
||||
) {
|
||||
Flow flow = new Flow();
|
||||
flow.setFlowId(evaluationGroup.getId());
|
||||
flow.setOpt("+");
|
||||
flow.setChartId(flowChartDetailRecord.getChartId());
|
||||
|
||||
flowService.insertFlow(flow);
|
||||
|
||||
if(flowChartDetailRecord.getOptType().intValue() == ChartOptType.APPOINT.getCode()){//指定人员的
|
||||
String[] optIds = flowChartDetailRecord.getOptIds().split(",");
|
||||
for (String id:optIds
|
||||
) {
|
||||
String[] roleIds = flowChartDetailRecord.getRoleIds().split(",");
|
||||
for (String roleId:roleIds
|
||||
) {
|
||||
FlowApprovalRole flowApprovalRole = new FlowApprovalRole();
|
||||
flowApprovalRole.setFlowId(flow.getId());
|
||||
flowApprovalRole.setApprovalId(Long.getLong(id));
|
||||
flowApprovalRole.setStepType(flowChartDetailRecord.getStepType());
|
||||
flowApprovalRole.setRoleId(Long.getLong(roleId));
|
||||
flowApprovalRoles.add(flowApprovalRole);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (EvaluationStartStaff startStaff:evaluationStartStaffs
|
||||
) {
|
||||
if(startStaff.getType().intValue() == CheckStaffType.STAFF.getCode()){
|
||||
//初始化人员及流程表id
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//下面初始化lz_flow流程表 lz_flow_approval_role流程审批表
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -16,12 +16,13 @@
|
||||
<result column="role_ids" property="roleIds"/>
|
||||
<result column="step_type" property="stepType"/>
|
||||
<result column="step_index" property="stepIndex"/>
|
||||
<result column="weight" property="weight"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, chart_id AS chartId, evaluation_group_id AS evaluationGroupId, status AS status, opt_ids AS optIds, opt_type AS optType, role_ids AS roleIds, step_type AS stepType, step_index AS stepIndex
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, chart_id AS chartId, evaluation_group_id AS evaluationGroupId, status AS status, opt_ids AS optIds, opt_type AS optType, role_ids AS roleIds, step_type AS stepType, step_index AS stepIndex, weight AS weight
|
||||
</sql>
|
||||
|
||||
|
||||
@ -42,6 +43,7 @@
|
||||
<if test="roleIds != null">role_ids, </if>
|
||||
<if test="stepType != null">step_type, </if>
|
||||
<if test="stepIndex != null">step_index, </if>
|
||||
<if test="weight != null">weight, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
@ -54,6 +56,7 @@
|
||||
<if test="roleIds != null">#{ roleIds}, </if>
|
||||
<if test="stepType != null">#{ stepType}, </if>
|
||||
<if test="stepIndex != null">#{ stepIndex}, </if>
|
||||
<if test="weight != null">#{ weight}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -74,7 +77,8 @@
|
||||
<if test="optType != null">opt_type = #{optType},</if>
|
||||
<if test="roleIds != null">role_ids = #{roleIds},</if>
|
||||
<if test="stepType != null">step_type = #{stepType},</if>
|
||||
<if test="stepIndex != null">step_index = #{stepIndex}</if>
|
||||
<if test="stepIndex != null">step_index = #{stepIndex},</if>
|
||||
<if test="weight != null">weight = #{weight}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -94,7 +98,8 @@
|
||||
opt_type = #{optType},
|
||||
role_ids = #{roleIds},
|
||||
step_type = #{stepType},
|
||||
step_index = #{stepIndex}
|
||||
step_index = #{stepIndex},
|
||||
weight = #{weight}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -78,7 +78,7 @@ public class MysqlMain {
|
||||
//list.add(new TablesBean("lz_result_model"));
|
||||
//list.add(new TablesBean("lz_result_score"));
|
||||
//list.add(new TablesBean("lz_result_taget_lib"));
|
||||
list.add(new TablesBean("lz_staff_role"));
|
||||
list.add(new TablesBean("lz_flow_chart_detail_record"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user