新增保存戒掉小流程列表,修改保存考核指标为列表
This commit is contained in:
parent
4d086ba27c
commit
cadab4891a
@ -2,23 +2,25 @@ package com.lz.common.emun;
|
||||
|
||||
public enum ChartOptType {
|
||||
|
||||
SELF(-1, "考核人自己"),
|
||||
APPOINT(0, "指定人员"),
|
||||
MANAGER_1(1, "一级管理人员"),
|
||||
MANAGER_2(2, "二级管理人员"),
|
||||
MANAGER_3(3, "三级管理人员"),
|
||||
MANAGER_4(4, "四级管理人员"),
|
||||
MANAGER_5(5, "五级管理人员"),
|
||||
MANAGER_6(6, "六级管理人员"),
|
||||
MANAGER_7(7, "七级管理人员"),
|
||||
SELF(-1, "考核人自己", "me"),
|
||||
APPOINT(0, "指定人员", "other"),
|
||||
MANAGER_1(1, "一级管理人员", "1_manager"),
|
||||
MANAGER_2(2, "二级管理人员", "2_manager"),
|
||||
MANAGER_3(3, "三级管理人员", "3_manager"),
|
||||
MANAGER_4(4, "四级管理人员", "4_manager"),
|
||||
MANAGER_5(5, "五级管理人员", "5_manager"),
|
||||
MANAGER_6(6, "六级管理人员", "6_manager"),
|
||||
MANAGER_7(7, "七级管理人员", "7_manager"),
|
||||
;
|
||||
|
||||
ChartOptType(int code, String name){
|
||||
ChartOptType(int code, String name, String type){
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
}
|
||||
private int code;
|
||||
private String name;
|
||||
private String type;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
package com.lz.datasource.config;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.wall.WallConfig;
|
||||
import com.alibaba.druid.wall.WallFilter;
|
||||
import com.lz.datasource.properties.DataSourceProperties;
|
||||
import com.lz.datasource.properties.DynamicDataSourceProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -16,6 +18,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -60,4 +63,20 @@ public class DynamicDataSourceConfig {
|
||||
return targetDataSources;
|
||||
}
|
||||
|
||||
@Bean(name = "wallConfig")
|
||||
WallConfig wallFilterConfig(){
|
||||
WallConfig wc = new WallConfig ();
|
||||
wc.setMultiStatementAllow(true);
|
||||
return wc;
|
||||
}
|
||||
|
||||
@Bean(name = "wallFilter")
|
||||
@DependsOn("wallConfig")
|
||||
WallFilter wallFilter(WallConfig wallConfig){
|
||||
WallFilter wfilter = new WallFilter ();
|
||||
wfilter.setConfig(wallConfig);
|
||||
return wfilter;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -37,4 +37,8 @@ public interface FlowChartDetailRecordMapper extends BaseMapper<FlowChartDetailR
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupIdAndChartId(@Param("groupId") Long groupId, @Param("chartId") Long chartId);
|
||||
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupId(Long groupId);
|
||||
|
||||
int insertFlowChartDetailRecords(List<FlowChartDetailRecord> inserts);
|
||||
|
||||
int updateCoverFlowChartDetailRecordByIds(List<FlowChartDetailRecord> updaes);
|
||||
}
|
||||
@ -9,6 +9,7 @@ package com.lz.modules.flow.dao;
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.modules.flow.entity.FlowChart;
|
||||
import com.lz.modules.flow.model.FlowChartDto;
|
||||
import com.lz.modules.flow.model.FlowChartRoleDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -37,4 +38,6 @@ public interface FlowChartMapper extends BaseMapper<FlowChart> {
|
||||
List<FlowChart> selectFlowChartByFlowManagerId(@Param("id") Long id);
|
||||
|
||||
List<FlowChartRoleDto> selectChartRoleByChartId(Long id);
|
||||
|
||||
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
||||
}
|
||||
@ -41,4 +41,8 @@ public interface ResultTagetLibMapper extends BaseMapper<ResultTagetLib> {
|
||||
List<ResultTagetLibDto> selectByCondition(@Param("page") IPage page, @Param("req") ResultTagetLibSearchReq req);
|
||||
|
||||
int deleteResultTagetLibByModelId(Long id);
|
||||
|
||||
int insertResultTagetLibs(@Param("list") List<ResultTagetLib> inserts);
|
||||
|
||||
int updateResultTagetLibByIds(@Param("list") List<ResultTagetLib> inserts);
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;
|
||||
* <p>
|
||||
* </p>*流程审批表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-15
|
||||
* @since 2020-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -44,6 +44,9 @@ public class FlowApprovalRole implements java.io.Serializable {
|
||||
//步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||
@ApiModelProperty(value = "步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)", name = "stepType")
|
||||
private Integer stepType;
|
||||
//-1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
@ApiModelProperty(value = "-1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....", name = "approvalType")
|
||||
private Integer approvalType;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -179,6 +182,21 @@ public class FlowApprovalRole implements java.io.Serializable {
|
||||
this.stepType = stepType;
|
||||
}
|
||||
|
||||
/**
|
||||
* -1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
* @return
|
||||
*/
|
||||
public Integer getApprovalType() {
|
||||
return approvalType;
|
||||
}
|
||||
/**
|
||||
* -1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
* @param approvalType
|
||||
*/
|
||||
public void setApprovalType(Integer approvalType) {
|
||||
this.approvalType = approvalType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowApprovalRole{" +
|
||||
@ -191,6 +209,7 @@ public class FlowApprovalRole implements java.io.Serializable {
|
||||
",roleId=" + roleId +
|
||||
",flowId=" + flowId +
|
||||
",stepType=" + stepType +
|
||||
",approvalType=" + approvalType +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -6,11 +6,11 @@ import lombok.Data;
|
||||
* <p>
|
||||
* </p>*流程审批表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-15
|
||||
* @since 2020-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "流程审批Dto")
|
||||
@ApiModel(value = "流程审批表Dto")
|
||||
public class FlowApprovalRoleDto {
|
||||
//
|
||||
@ApiModelProperty(value = "", name = "id")
|
||||
@ -30,6 +30,9 @@ public class FlowApprovalRoleDto {
|
||||
//步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||
@ApiModelProperty(value = "步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)", name = "stepType")
|
||||
private Integer stepType;
|
||||
//-1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
@ApiModelProperty(value = "-1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....", name = "approvalType")
|
||||
private Integer approvalType;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -120,15 +123,31 @@ public class FlowApprovalRoleDto {
|
||||
this.stepType = stepType;
|
||||
}
|
||||
|
||||
/**
|
||||
* -1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
* @return
|
||||
*/
|
||||
public Integer getApprovalType() {
|
||||
return approvalType;
|
||||
}
|
||||
/**
|
||||
* -1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
* @param approvalType
|
||||
*/
|
||||
public void setApprovalType(Integer approvalType) {
|
||||
this.approvalType = approvalType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowApprovalRole{" +
|
||||
return "FlowApprovalRoleDto{" +
|
||||
",id=" + id +
|
||||
",approvalId=" + approvalId +
|
||||
",type=" + type +
|
||||
",roleId=" + roleId +
|
||||
",flowId=" + flowId +
|
||||
",stepType=" + stepType +
|
||||
",approvalType=" + approvalType +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,9 @@ package com.lz.modules.flow.model;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* </p>*流程图,lz_flow的父
|
||||
@ -30,6 +33,9 @@ public class FlowChartDto {
|
||||
//执行步骤,第几步,从0开始
|
||||
@ApiModelProperty(value = "执行步骤,第几步,从0开始", name = "stepIndex")
|
||||
private Integer stepIndex;
|
||||
|
||||
@ApiModelProperty(value = "节点权限列表", name = "roleDtos")
|
||||
private List<FlowChartRoleDto> roleDtos;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
||||
@ -11,12 +11,12 @@ import java.util.Date;
|
||||
* 菜单权限表
|
||||
* </p>*流程审批表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-16
|
||||
* @since 2020-10-21
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "流程审批Req")
|
||||
@ApiModel(value = "流程审批表Req")
|
||||
public class FlowApprovalRoleReq implements java.io.Serializable {
|
||||
|
||||
@ApiModelProperty(value = "currPage", name = "当前页码")
|
||||
@ -53,6 +53,9 @@ public class FlowApprovalRoleReq implements java.io.Serializable {
|
||||
//步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||
@ApiModelProperty(value = "步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)", name = "stepType")
|
||||
private Integer stepType;
|
||||
//-1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
@ApiModelProperty(value = "-1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....", name = "approvalType")
|
||||
private Integer approvalType;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -188,9 +191,24 @@ public class FlowApprovalRoleReq implements java.io.Serializable {
|
||||
this.stepType = stepType;
|
||||
}
|
||||
|
||||
/**
|
||||
* -1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
* @return
|
||||
*/
|
||||
public Integer getApprovalType() {
|
||||
return approvalType;
|
||||
}
|
||||
/**
|
||||
* -1考核人员自己,0指定人员id,此时approval_id有值,1一级主管,2二级主管....
|
||||
* @param approvalType
|
||||
*/
|
||||
public void setApprovalType(Integer approvalType) {
|
||||
this.approvalType = approvalType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowApprovalRole{" +
|
||||
return "FlowApprovalRoleReq{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",gmtCreate=" + gmtCreate +
|
||||
@ -200,6 +218,7 @@ public class FlowApprovalRoleReq implements java.io.Serializable {
|
||||
",roleId=" + roleId +
|
||||
",flowId=" + flowId +
|
||||
",stepType=" + stepType +
|
||||
",approvalType=" + approvalType +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package com.lz.modules.flow.req;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* </p>*考核模板流程记录表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "考核模板流程记录表ListDto")
|
||||
public class FlowChartDetailRecordListReq {
|
||||
//
|
||||
@ApiModelProperty(value = "结点id,必传", name = "id")
|
||||
private Long id;
|
||||
//考核组ID
|
||||
@ApiModelProperty(value = "考核组ID", name = "evaluationGroupId")
|
||||
private Long evaluationGroupId;
|
||||
//0关闭,1开启
|
||||
@ApiModelProperty(value = "0关闭,1开启", name = "status")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "小结点列表", name = "recordSimpleDtos")
|
||||
private List<FlowChartDetailRecordSimpleReq> recordSimpleDtos;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 考核组ID
|
||||
* @return
|
||||
*/
|
||||
public Long getEvaluationGroupId() {
|
||||
return evaluationGroupId;
|
||||
}
|
||||
/**
|
||||
* 考核组ID
|
||||
* @param evaluationGroupId
|
||||
*/
|
||||
public void setEvaluationGroupId(Long evaluationGroupId) {
|
||||
this.evaluationGroupId = evaluationGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 0关闭,1开启
|
||||
* @return
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* 0关闭,1开启
|
||||
* @param status
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowChartDetailRecordDto{" +
|
||||
",id=" + id +
|
||||
",evaluationGroupId=" + evaluationGroupId +
|
||||
",status=" + status +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package com.lz.modules.flow.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
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-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "考核模板流程记录表SimpleDto")
|
||||
public class FlowChartDetailRecordSimpleReq implements java.io.Serializable {
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "是否删除0或者不传,不删除,1删除", name = "isDelete")
|
||||
private Integer isDelete;
|
||||
//操作者id集合,逗号隔开,当opt_type为0时才有值
|
||||
@ApiModelProperty(value = "操作者id集合,逗号隔开,当opt_type为0时才有值", name = "optIds")
|
||||
private String optIds;
|
||||
//-1考核人员自己,0人员id,1一级主管,2二级主管....
|
||||
@ApiModelProperty(value = "-1考核人员自己,0人员id,1一级主管,2二级主管....", name = "optType")
|
||||
private Integer optType;
|
||||
//role id集合,逗号隔开
|
||||
@ApiModelProperty(value = "role id集合,逗号隔开", name = "roleIds")
|
||||
private String roleIds;
|
||||
//步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)
|
||||
@ApiModelProperty(value = "步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)", name = "stepType")
|
||||
private Integer stepType;
|
||||
|
||||
//权重,评分时所占权重
|
||||
@ApiModelProperty(value = "权重,评分时所占权重", name = "weight")
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 操作者id集合,逗号隔开,当opt_type为0时才有值
|
||||
* @return
|
||||
*/
|
||||
public String getOptIds() {
|
||||
return optIds;
|
||||
}
|
||||
/**
|
||||
* 操作者id集合,逗号隔开,当opt_type为0时才有值
|
||||
* @param optIds
|
||||
*/
|
||||
public void setOptIds(String optIds) {
|
||||
this.optIds = optIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* -1考核人员自己,0人员id,1一级主管,2二级主管....
|
||||
* @return
|
||||
*/
|
||||
public Integer getOptType() {
|
||||
return optType;
|
||||
}
|
||||
/**
|
||||
* -1考核人员自己,0人员id,1一级主管,2二级主管....
|
||||
* @param optType
|
||||
*/
|
||||
public void setOptType(Integer optType) {
|
||||
this.optType = optType;
|
||||
}
|
||||
|
||||
/**
|
||||
* role id集合,逗号隔开
|
||||
* @return
|
||||
*/
|
||||
public String getRoleIds() {
|
||||
return roleIds;
|
||||
}
|
||||
/**
|
||||
* role id集合,逗号隔开
|
||||
* @param roleIds
|
||||
*/
|
||||
public void setRoleIds(String roleIds) {
|
||||
this.roleIds = roleIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)
|
||||
* @return
|
||||
*/
|
||||
public Integer getStepType() {
|
||||
return stepType;
|
||||
}
|
||||
/**
|
||||
* 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)
|
||||
* @param stepType
|
||||
*/
|
||||
public void setStepType(Integer stepType) {
|
||||
this.stepType = stepType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FlowChartDetailRecord{" +
|
||||
",id=" + id +
|
||||
",optIds=" + optIds +
|
||||
",optType=" + optType +
|
||||
",roleIds=" + roleIds +
|
||||
",stepType=" + stepType +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.lz.modules.flow.req;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表
|
||||
* </p>*考核维度表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "考核维模板详细Req")
|
||||
public class ResultModelDetailReq implements java.io.Serializable {
|
||||
|
||||
|
||||
|
||||
//lz_result_calculate 的id,计算法方法id
|
||||
@ApiModelProperty(value = "lz_result_calculate 的id,计算法方法id", name = "calculateId")
|
||||
private Long calculateId;
|
||||
//等级开关0关闭,1开启
|
||||
@ApiModelProperty(value = "等级开关0关闭,1开启", name = "gradeStatus")
|
||||
private Integer gradeStatus;
|
||||
//使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
@ApiModelProperty(value = "使用的哪个等级。等级组id,lz_result_grade的group_id", name = "gradeGroupId")
|
||||
private Long gradeGroupId;
|
||||
@ApiModelProperty(value = "考核维度", name = "modelItems")
|
||||
private List<ResultModelItemReq> modelItems;
|
||||
|
||||
//考核组ID
|
||||
@ApiModelProperty(value = "考核组ID", name = "evaluationGroupId")
|
||||
private Long evaluationGroupId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* lz_result_calculate 的id,计算法方法id
|
||||
* @return
|
||||
*/
|
||||
public Long getCalculateId() {
|
||||
return calculateId;
|
||||
}
|
||||
/**
|
||||
* lz_result_calculate 的id,计算法方法id
|
||||
* @param calculateId
|
||||
*/
|
||||
public void setCalculateId(Long calculateId) {
|
||||
this.calculateId = calculateId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 等级开关0关闭,1开启
|
||||
* @return
|
||||
*/
|
||||
public Integer getGradeStatus() {
|
||||
return gradeStatus;
|
||||
}
|
||||
/**
|
||||
* 等级开关0关闭,1开启
|
||||
* @param gradeStatus
|
||||
*/
|
||||
public void setGradeStatus(Integer gradeStatus) {
|
||||
this.gradeStatus = gradeStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
* @return
|
||||
*/
|
||||
public Long getGradeGroupId() {
|
||||
return gradeGroupId;
|
||||
}
|
||||
/**
|
||||
* 使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
* @param gradeGroupId
|
||||
*/
|
||||
public void setGradeGroupId(Long gradeGroupId) {
|
||||
this.gradeGroupId = gradeGroupId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultModel{" +
|
||||
",calculateId=" + calculateId +
|
||||
",gradeStatus=" + gradeStatus +
|
||||
",gradeGroupId=" + gradeGroupId +
|
||||
",evaluationGroupId=" + evaluationGroupId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
139
src/main/java/com/lz/modules/flow/req/ResultModelItemReq.java
Normal file
139
src/main/java/com/lz/modules/flow/req/ResultModelItemReq.java
Normal file
@ -0,0 +1,139 @@
|
||||
package com.lz.modules.flow.req;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表
|
||||
* </p>*考核维度表
|
||||
* @author quyixiao
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "考核维度表ItemReq")
|
||||
public class ResultModelItemReq implements java.io.Serializable {
|
||||
|
||||
|
||||
//
|
||||
private Long id;
|
||||
//
|
||||
|
||||
@ApiModelProperty(value = "是否删除0或者不传,不删除,1删除", name = "isDelete")
|
||||
private Integer isDelete;
|
||||
//维度名称
|
||||
@ApiModelProperty(value = "维度名称", name = "name")
|
||||
private String name;
|
||||
|
||||
//1:业绩 2:文化价值观
|
||||
@ApiModelProperty(value = "1:业绩 2:文化价值观", name = "type")
|
||||
private Integer type;
|
||||
//权重 0不限权重
|
||||
@ApiModelProperty(value = "权重 0不限权重", name = "weight")
|
||||
private BigDecimal weight;
|
||||
//考核子项目个数最大限制
|
||||
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
|
||||
private Integer maxCount;
|
||||
|
||||
@ApiModelProperty(value = "考核指标", name = "tagetLibItems")
|
||||
private List<ResultTagetLibItemReq> tagetLibItems;
|
||||
//lz_result_calculate 的id,计算法方法id
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 维度名称
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* 维度名称
|
||||
* @param name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1:业绩 2:文化价值观
|
||||
* @return
|
||||
*/
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
/**
|
||||
* 1:业绩 2:文化价值观
|
||||
* @param type
|
||||
*/
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 权重 0不限权重
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getWeight() {
|
||||
return weight;
|
||||
}
|
||||
/**
|
||||
* 权重 0不限权重
|
||||
* @param weight
|
||||
*/
|
||||
public void setWeight(BigDecimal weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
/**
|
||||
* 考核子项目个数最大限制
|
||||
* @return
|
||||
*/
|
||||
public Integer getMaxCount() {
|
||||
return maxCount;
|
||||
}
|
||||
/**
|
||||
* 考核子项目个数最大限制
|
||||
* @param maxCount
|
||||
*/
|
||||
public void setMaxCount(Integer maxCount) {
|
||||
this.maxCount = maxCount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultModel{" +
|
||||
",id=" + id +
|
||||
",name=" + name +
|
||||
",type=" + type +
|
||||
",weight=" + weight +
|
||||
",maxCount=" + maxCount +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
114
src/main/java/com/lz/modules/flow/req/ResultTagetLibItemReq.java
Normal file
114
src/main/java/com/lz/modules/flow/req/ResultTagetLibItemReq.java
Normal file
@ -0,0 +1,114 @@
|
||||
package com.lz.modules.flow.req;
|
||||
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
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "考核指标库表ItemReq")
|
||||
public class ResultTagetLibItemReq implements java.io.Serializable {
|
||||
|
||||
|
||||
private Long id;
|
||||
//
|
||||
@ApiModelProperty(value = "是否删除0或者不传,不删除,1删除", name = "isDelete")
|
||||
private Integer isDelete;
|
||||
|
||||
//指标名称
|
||||
@ApiModelProperty(value = "指标名称", name = "name")
|
||||
private String name;
|
||||
|
||||
//权重
|
||||
@ApiModelProperty(value = "权重", name = "weight")
|
||||
private BigDecimal weight;
|
||||
//考核标准,关键结果
|
||||
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
|
||||
private String keyResult;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 指标名称
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* 指标名称
|
||||
* @param name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 权重
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getWeight() {
|
||||
return weight;
|
||||
}
|
||||
/**
|
||||
* 权重
|
||||
* @param weight
|
||||
*/
|
||||
public void setWeight(BigDecimal weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
/**
|
||||
* 考核标准,关键结果
|
||||
* @return
|
||||
*/
|
||||
public String getKeyResult() {
|
||||
return keyResult;
|
||||
}
|
||||
/**
|
||||
* 考核标准,关键结果
|
||||
* @param keyResult
|
||||
*/
|
||||
public void setKeyResult(String keyResult) {
|
||||
this.keyResult = keyResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultTagetLib{" +
|
||||
",id=" + id +
|
||||
",name=" + name +
|
||||
",weight=" + weight +
|
||||
",keyResult=" + keyResult +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -36,4 +36,8 @@ public interface FlowChartDetailRecordService extends IService<FlowChartDetailRe
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupIdAndChartId(Long groupId, Long chartId);
|
||||
|
||||
List<FlowChartDetailRecord> selectFlowChartDetailRecordByGroupId(Long groupId);
|
||||
|
||||
int insertFlowChartDetailRecords(List<FlowChartDetailRecord> inserts);
|
||||
|
||||
int updateCoverFlowChartDetailRecordByIds(List<FlowChartDetailRecord> updaes);
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.lz.modules.flow.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.modules.flow.entity.FlowChart;
|
||||
import com.lz.modules.flow.model.FlowChartDto;
|
||||
import com.lz.modules.flow.model.FlowChartRoleDto;
|
||||
|
||||
import java.util.List;
|
||||
@ -36,4 +37,6 @@ public interface FlowChartService extends IService<FlowChart> {
|
||||
List<FlowChart> selectFlowChartByFlowManagerId(Long id);
|
||||
|
||||
List<FlowChartRoleDto> selectChartRoleByChartId(Long id);
|
||||
|
||||
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
||||
}
|
||||
@ -71,6 +71,16 @@ public class FlowChartDetailRecordServiceImpl extends ServiceImpl<FlowChartDetai
|
||||
return flowChartDetailRecordMapper.selectFlowChartDetailRecordByGroupId(groupId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertFlowChartDetailRecords(List<FlowChartDetailRecord> inserts){
|
||||
return flowChartDetailRecordMapper.insertFlowChartDetailRecords(inserts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateCoverFlowChartDetailRecordByIds(List<FlowChartDetailRecord> updaes){
|
||||
return flowChartDetailRecordMapper.updateCoverFlowChartDetailRecordByIds(updaes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.lz.modules.flow.service.impl;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lz.modules.flow.dao.FlowChartMapper;
|
||||
import com.lz.modules.flow.entity.FlowChart;
|
||||
import com.lz.modules.flow.model.FlowChartDto;
|
||||
import com.lz.modules.flow.model.FlowChartRoleDto;
|
||||
import com.lz.modules.flow.service.FlowChartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -71,6 +72,11 @@ public class FlowChartServiceImpl extends ServiceImpl<FlowChartMapper, FlowChart
|
||||
return flowChartMapper.selectChartRoleByChartId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id){
|
||||
return flowChartMapper.selectFlowChartDtoByFlowManagerId(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -9,7 +9,10 @@ import com.lz.modules.flow.entity.FlowChart;
|
||||
import com.lz.modules.flow.entity.FlowChartDetailRecord;
|
||||
import com.lz.modules.flow.entity.FlowManager;
|
||||
import com.lz.modules.flow.model.FlowChartDetailRecordDto;
|
||||
import com.lz.modules.flow.model.FlowChartDto;
|
||||
import com.lz.modules.flow.model.FlowChartRoleDto;
|
||||
import com.lz.modules.flow.req.FlowChartDetailRecordListReq;
|
||||
import com.lz.modules.flow.req.FlowChartDetailRecordSimpleReq;
|
||||
import com.lz.modules.flow.service.FlowChartDetailRecordService;
|
||||
import com.lz.modules.flow.service.FlowChartService;
|
||||
import com.lz.modules.flow.service.FlowManagerService;
|
||||
@ -47,12 +50,18 @@ public class FlowChartController {
|
||||
@GetMapping("/getByFlowManagerId")
|
||||
@ApiOperation("根据Manager Id获取大流程节点")
|
||||
@ApiImplicitParam(name = "id",value = "流程id,绩效请传1", required = true, dataType = "String",paramType = "query")
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChart.class)})
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChartDto.class)})
|
||||
public R getByFlowManagerId(@RequestParam Long id) {
|
||||
FlowManager flowManager = flowManagerService.selectFlowManagerById(id);
|
||||
if(flowManager != null){
|
||||
List<FlowChart> flowCharts = flowChartService.selectFlowChartByFlowManagerId(flowManager.getId());
|
||||
return R.ok().put("data",flowCharts);
|
||||
List<FlowChartDto> flowChartDtos = flowChartService.selectFlowChartDtoByFlowManagerId(flowManager.getId());
|
||||
for (FlowChartDto dto:flowChartDtos
|
||||
) {
|
||||
List<FlowChartRoleDto> flowCharts = flowChartService.selectChartRoleByChartId(dto.getId());
|
||||
dto.setRoleDtos(flowCharts);
|
||||
}
|
||||
|
||||
return R.ok().put("data",flowChartDtos);
|
||||
}
|
||||
return R.error("无相关流程");
|
||||
}
|
||||
@ -93,6 +102,37 @@ public class FlowChartController {
|
||||
return R.ok().put("data", flowChartDetailRecord);
|
||||
}
|
||||
|
||||
@PostMapping("/saveDetailProcs")
|
||||
@ApiOperation("保存流程节点小流程列表")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = FlowChartDetailRecord.class)})
|
||||
public R saveDetailProcs(@RequestBody @ApiParam FlowChartDetailRecordListReq flowChartDetailRecordListReq) {
|
||||
List<FlowChartDetailRecord> inserts = new ArrayList<>();
|
||||
List<FlowChartDetailRecord> updaes = new ArrayList<>();
|
||||
int index = 0;
|
||||
for (FlowChartDetailRecordSimpleReq req:flowChartDetailRecordListReq.getRecordSimpleDtos()
|
||||
) {
|
||||
FlowChartDetailRecord flowChartDetailRecord = new FlowChartDetailRecord();
|
||||
BeanUtils.copyProperties(req, flowChartDetailRecord);
|
||||
flowChartDetailRecord.setChartId(flowChartDetailRecordListReq.getId());
|
||||
flowChartDetailRecord.setEvaluationGroupId(flowChartDetailRecordListReq.getEvaluationGroupId());
|
||||
flowChartDetailRecord.setStepIndex(index);
|
||||
if(flowChartDetailRecord.getId() != null && flowChartDetailRecord.getId().intValue() > 0){
|
||||
updaes.add(flowChartDetailRecord);
|
||||
}else{
|
||||
inserts.add(flowChartDetailRecord);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if(inserts.size() > 0){
|
||||
flowChartDetailRecordService.insertFlowChartDetailRecords(inserts);
|
||||
}
|
||||
if(updaes.size() > 0){
|
||||
flowChartDetailRecordService.updateBatchById(updaes);//.updateCoverFlowChartDetailRecordByIds(updaes);
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/updateDetailProc")
|
||||
public R updateDetailProc(@RequestBody @ApiParam FlowChartDetailRecord flowChartDetailRecord) {
|
||||
flowChartDetailRecordService.updateFlowChartDetailRecordById(flowChartDetailRecord);
|
||||
|
||||
@ -155,13 +155,24 @@ public class FlowStartController {
|
||||
flowApprovalRole.setApprovalId(Long.getLong(id));
|
||||
flowApprovalRole.setStepType(flowChartDetailRecord.getStepType());
|
||||
flowApprovalRole.setRoleId(Long.getLong(roleId));
|
||||
flowApprovalRole.setApprovalType(flowChartDetailRecord.getOptType());
|
||||
flowApprovalRoles.add(flowApprovalRole);
|
||||
|
||||
}
|
||||
}
|
||||
}else{
|
||||
String[] roleIds = flowChartDetailRecord.getRoleIds().split(",");
|
||||
for (String roleId:roleIds
|
||||
) {
|
||||
FlowApprovalRole flowApprovalRole = new FlowApprovalRole();
|
||||
flowApprovalRole.setFlowId(flow.getId());
|
||||
flowApprovalRole.setStepType(flowChartDetailRecord.getStepType());
|
||||
flowApprovalRole.setRoleId(Long.getLong(roleId));
|
||||
flowApprovalRole.setApprovalType(flowChartDetailRecord.getOptType());
|
||||
flowApprovalRoles.add(flowApprovalRole);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//插入记录
|
||||
}
|
||||
|
||||
for (EvaluationStartStaff startStaff:evaluationStartStaffs
|
||||
|
||||
@ -3,14 +3,20 @@ package com.lz.modules.performance.controller;
|
||||
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.flow.entity.ResultModel;
|
||||
import com.lz.modules.flow.entity.ResultTagetLib;
|
||||
import com.lz.modules.flow.model.ResultModelDto;
|
||||
import com.lz.modules.flow.model.ResultTagetLibDto;
|
||||
import com.lz.modules.flow.req.ResultModelDetailReq;
|
||||
import com.lz.modules.flow.req.ResultModelItemReq;
|
||||
import com.lz.modules.flow.req.ResultTagetLibItemReq;
|
||||
import com.lz.modules.flow.service.ResultModelService;
|
||||
import com.lz.modules.performance.service.ResultTagetLibService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@ -26,6 +32,8 @@ public class ResultModelController {
|
||||
private ResultTagetLibService resultTagetLibService;
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getByGroupId")
|
||||
@ApiOperation(value="根据考核组id获取模板列表")
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModelDto.class)})
|
||||
@ -66,6 +74,54 @@ public class ResultModelController {
|
||||
return R.ok().put("data",resultModel);
|
||||
}
|
||||
|
||||
@PostMapping("/saveDetail")
|
||||
@ApiOperation("保存模板中的考核维度及指标")
|
||||
public R saveDetail(@RequestBody @ApiParam ResultModelDetailReq resultModelDetailReq) {
|
||||
|
||||
|
||||
int resultModelOrderBy = 0;
|
||||
for (ResultModelItemReq itemReq:
|
||||
resultModelDetailReq.getModelItems()) {
|
||||
ResultModel resultModel = new ResultModel();
|
||||
BeanUtils.copyProperties(itemReq, resultModel);
|
||||
resultModel.setCalculateId(resultModelDetailReq.getCalculateId());
|
||||
resultModel.setGradeGroupId(resultModelDetailReq.getGradeGroupId());
|
||||
resultModel.setGradeStatus(resultModelDetailReq.getGradeStatus());
|
||||
resultModel.setEvaluationGroupId(resultModelDetailReq.getEvaluationGroupId());
|
||||
resultModel.setOrderBy(resultModelOrderBy);
|
||||
if(resultModel.getId() != null && resultModel.getId().intValue() > 0){
|
||||
resultModelService.updateResultModelById(resultModel);
|
||||
}else{
|
||||
resultModelService.insertResultModel(resultModel);
|
||||
}
|
||||
int libOrderBy = 0;
|
||||
List<ResultTagetLib> inserts = new ArrayList<>();
|
||||
List<ResultTagetLib> updates = new ArrayList<>();
|
||||
for (ResultTagetLibItemReq req:itemReq.getTagetLibItems()
|
||||
) {
|
||||
ResultTagetLib resultTagetLib = new ResultTagetLib();
|
||||
BeanUtils.copyProperties(req, resultTagetLib);
|
||||
resultTagetLib.setModelId(resultModel.getId());
|
||||
resultTagetLib.setOrderBy(libOrderBy);
|
||||
if(resultTagetLib.getId() != null && resultTagetLib.getId().intValue() > 0){
|
||||
updates.add(resultTagetLib);
|
||||
}else{
|
||||
inserts.add(resultTagetLib);
|
||||
}
|
||||
|
||||
libOrderBy++;
|
||||
}
|
||||
if(inserts.size() > 0){
|
||||
resultTagetLibService.insertResultTagetLibs(inserts);
|
||||
}
|
||||
if(updates.size() > 0){
|
||||
resultTagetLibService.updateBatchById(updates);
|
||||
}
|
||||
resultModelOrderBy++;
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/delete")
|
||||
@ApiOperation("删除模板中的考核维度")
|
||||
|
||||
@ -41,4 +41,8 @@ public interface ResultTagetLibService extends IService<ResultTagetLib> {
|
||||
PageUtils selectResultTagetLibByReq(ResultTagetLibSearchReq req);
|
||||
|
||||
int deleteResultTagetLibByModelId(Long id);
|
||||
|
||||
int insertResultTagetLibs(List<ResultTagetLib> inserts);
|
||||
|
||||
int updateResultTagetLibByIds(List<ResultTagetLib> inserts);
|
||||
}
|
||||
@ -109,6 +109,16 @@ public class ResultTagetLibServiceImpl extends ServiceImpl<ResultTagetLibMapper,
|
||||
return resultTagetLibMapper.deleteResultTagetLibByModelId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertResultTagetLibs(List<ResultTagetLib> inserts){
|
||||
return resultTagetLibMapper.insertResultTagetLibs(inserts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateResultTagetLibByIds(List<ResultTagetLib> inserts){
|
||||
return resultTagetLibMapper.updateResultTagetLibByIds(inserts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -13,12 +13,13 @@
|
||||
<result column="role_id" property="roleId"/>
|
||||
<result column="flow_id" property="flowId"/>
|
||||
<result column="step_type" property="stepType"/>
|
||||
<result column="approval_type" property="approvalType"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, approval_id AS approvalId, type AS type, role_id AS roleId, flow_id AS flowId, step_type AS stepType
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, approval_id AS approvalId, type AS type, role_id AS roleId, flow_id AS flowId, step_type AS stepType, approval_type AS approvalType
|
||||
</sql>
|
||||
|
||||
|
||||
@ -36,6 +37,7 @@
|
||||
<if test="roleId != null">role_id, </if>
|
||||
<if test="flowId != null">flow_id, </if>
|
||||
<if test="stepType != null">step_type, </if>
|
||||
<if test="approvalType != null">approval_type, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
@ -45,6 +47,7 @@
|
||||
<if test="roleId != null">#{ roleId}, </if>
|
||||
<if test="flowId != null">#{ flowId}, </if>
|
||||
<if test="stepType != null">#{ stepType}, </if>
|
||||
<if test="approvalType != null">#{ approvalType}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -62,7 +65,8 @@
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="roleId != null">role_id = #{roleId},</if>
|
||||
<if test="flowId != null">flow_id = #{flowId},</if>
|
||||
<if test="stepType != null">step_type = #{stepType}</if>
|
||||
<if test="stepType != null">step_type = #{stepType},</if>
|
||||
<if test="approvalType != null">approval_type = #{approvalType}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -79,7 +83,8 @@
|
||||
type = #{type},
|
||||
role_id = #{roleId},
|
||||
flow_id = #{flowId},
|
||||
step_type = #{stepType}
|
||||
step_type = #{stepType},
|
||||
approval_type = #{approvalType}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -113,9 +113,56 @@
|
||||
select * from lz_flow_chart_detail_record where evaluation_group_id=#{groupId} and chart_id = #{chartId} and is_delete = 0 order by step_index desc
|
||||
</select>
|
||||
|
||||
<select id="selectFlowChartDetailRecordByGroupIdAndChartId" resultType="FlowChartDetailRecord" >
|
||||
<select id="selectFlowChartDetailRecordByGroupId" resultType="FlowChartDetailRecord" >
|
||||
select * from lz_flow_chart_detail_record where evaluation_group_id=#{groupId} and is_delete = 0 order by step_index desc
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowChartDetailRecords" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into lz_flow_chart_detail_record(
|
||||
chart_id,
|
||||
evaluation_group_id,
|
||||
status,
|
||||
opt_ids,
|
||||
opt_type,
|
||||
role_ids,
|
||||
step_type,
|
||||
step_index,
|
||||
weight
|
||||
)values
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{ item.chartId},
|
||||
#{ item.evaluationGroupId},
|
||||
#{ item.status},
|
||||
#{ item.optIds},
|
||||
#{ item.optType},
|
||||
#{ item.roleIds},
|
||||
#{ item.stepType},
|
||||
#{ item.stepIndex},
|
||||
#{ item.weight}
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
<insert id="updateCoverFlowChartDetailRecordByIds" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update
|
||||
lz_flow_chart_detail_record
|
||||
set
|
||||
<if test="item.isDelete != null">is_delete = #{item.isDelete},</if>
|
||||
chart_id = #{ item.chartId},
|
||||
evaluation_group_id = #{ item.evaluationGroupId},
|
||||
status = #{ item.status},
|
||||
opt_ids = #{ item.optIds},
|
||||
opt_type = #{ item.optType},
|
||||
role_ids = #{ item.roleIds},
|
||||
step_type = #{ item.stepType},
|
||||
step_index = #{ item.stepIndex},
|
||||
weight = #{ item.weight}
|
||||
,gmt_modified = now()
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
;
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -97,5 +97,9 @@
|
||||
SELECT crole.id as id, crole.chart_id as chart_id, crole.role_id as role_id, role.name as role_name, crole.type as type FROM lz_flow_chart_role crole left join lz_record_role role on role.id=crole.role_id where crole.chart_id=#{id}
|
||||
</select>
|
||||
|
||||
<select id="selectFlowChartDtoByFlowManagerId" resultType="com.lz.modules.flow.model.FlowChartDto" >
|
||||
select * from lz_flow_chart where process_id=#{id} and is_delete = 0 order by step_index asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -104,5 +104,41 @@
|
||||
update lz_result_taget_lib set is_delete = 1 where model_id=#{id}
|
||||
</update>
|
||||
|
||||
<insert id="insertResultTagetLibs" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into lz_result_taget_lib(
|
||||
name,
|
||||
model_id,
|
||||
weight,
|
||||
key_result,
|
||||
order_by
|
||||
)values
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
|
||||
#{ item.name},
|
||||
#{ item.modelId},
|
||||
#{ item.weight},
|
||||
#{ item.keyResult},
|
||||
#{ item.orderBy}
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
<insert id="updateResultTagetLibByIds" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update
|
||||
lz_result_taget_lib
|
||||
set
|
||||
<if test="item.isDelete != null">is_delete = #{item.isDelete},</if>
|
||||
name = #{item.name},
|
||||
model_id = #{item.modelId},
|
||||
weight = #{item.weight},
|
||||
key_result = #{item.keyResult},
|
||||
order_by = #{item.orderBy}
|
||||
,gmt_modified = now()
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
;
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -78,7 +78,8 @@ 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_flow_chart_detail_record"));
|
||||
//list.add(new TablesBean("lz_flow_chart_detail_record"));
|
||||
list.add(new TablesBean("lz_flow_approval_role"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user