Commit abcfb5e9 by Administrator

Merge branch 'tzq' into 'develop'

绩效管理-常量配置,考核模板列表、考核模板详情、修改、删除Api,

See merge request 8timerv2/8timerapiv200!124
parents c7884a30 e41d7d19
...@@ -19,7 +19,7 @@ import lombok.Data; ...@@ -19,7 +19,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
/** /**
* @author Tang 2020-05-26 * @author Tang 2020-05-27
*/ */
@Data @Data
...@@ -37,10 +37,12 @@ public class JxglAppraisal extends Model<JxglAppraisal> { ...@@ -37,10 +37,12 @@ public class JxglAppraisal extends Model<JxglAppraisal> {
@Id @Id
@GeneratedValue @GeneratedValue
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "10") @ApiModelProperty(value = "编号 编号", example = "10")
private Integer id; private Integer id;
@ApiModelProperty(value = "绩效考核id 绩效考核id", example = "10")
private Integer performanceAppraisalId;
@ApiModelProperty(value = "员工id 员工id", example = "10") @ApiModelProperty(value = "员工id 员工id", example = "10")
private Integer empNum; private Integer empNum;
...@@ -49,16 +51,14 @@ public class JxglAppraisal extends Model<JxglAppraisal> { ...@@ -49,16 +51,14 @@ public class JxglAppraisal extends Model<JxglAppraisal> {
@ApiModelProperty(value = "考核说明", example = "考核说明") @ApiModelProperty(value = "考核说明", example = "考核说明")
private String appraisalExplain; private String appraisalExplain;
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", example = "2020-10-10 10:10:10") @ApiModelProperty(value = "创建时间", example = "2020-10-10 10:10:10")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10") @ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10")
private Date updateTime; private Date updateTime;
@ApiModelProperty(value = "状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档", example = "10") @ApiModelProperty(value = "状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档", example = "0")
private Integer sts; private Integer sts;
} }
\ No newline at end of file
package cn.timer.api.bean.jxgl; package cn.timer.api.bean.jxgl;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Transient;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
...@@ -67,4 +69,8 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> { ...@@ -67,4 +69,8 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> {
@ApiModelProperty(value = "类型", example = "0 非固定 1 固定") @ApiModelProperty(value = "类型", example = "0 非固定 1 固定")
private String type; private String type;
@TableField(exist = false) // 是否转换
@ApiModelProperty(value = "考核项模板", example = "")
private List<JxglAppraisalItemT> appraisalItemTs;
} }
\ No newline at end of file
...@@ -34,10 +34,10 @@ public class JxglAppraisalItemT extends Model<JxglAppraisalItemT> { ...@@ -34,10 +34,10 @@ public class JxglAppraisalItemT extends Model<JxglAppraisalItemT> {
@GeneratedValue @GeneratedValue
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "10") @ApiModelProperty(value = "编号", example = "10")
private Integer id; private Integer id;
@ApiModelProperty(value = "考核指标id 考核指标id", example = "10") @ApiModelProperty(value = "考核指标模板id", example = "10")
private Integer appraisalIndicatorsTId; private Integer appraisalIndicatorsTId;
@ApiModelProperty(value = "标题", example = "标题") @ApiModelProperty(value = "标题", example = "标题")
...@@ -46,7 +46,7 @@ public class JxglAppraisalItemT extends Model<JxglAppraisalItemT> { ...@@ -46,7 +46,7 @@ public class JxglAppraisalItemT extends Model<JxglAppraisalItemT> {
@ApiModelProperty(value = "内容", example = "内容") @ApiModelProperty(value = "内容", example = "内容")
private String content; private String content;
@ApiModelProperty(value = "排序 排序", example = "10") @ApiModelProperty(value = "排序", example = "10")
private Integer ranks; private Integer ranks;
} }
\ No newline at end of file
package cn.timer.api.bean.jxgl; package cn.timer.api.bean.jxgl;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Transient;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
...@@ -58,4 +60,7 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> { ...@@ -58,4 +60,7 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> {
@ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10") @ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10")
private Date updateTime; private Date updateTime;
@TableField(exist = false) // 是否转换
@ApiModelProperty(value = "考核指标模板", example = "")
private List<JxglAppraisalIndicatorsT> appraisalIndicatorsTs;
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import java.util.Date; ...@@ -4,6 +4,7 @@ import java.util.Date;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.validation.Valid;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
...@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.validation.ValidList;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -54,5 +56,9 @@ public class JxglBasicSetting extends Model<JxglBasicSetting> { ...@@ -54,5 +56,9 @@ public class JxglBasicSetting extends Model<JxglBasicSetting> {
@ApiModelProperty(value="更新时间 ",example="2020-10-10 10:10:10") @ApiModelProperty(value="更新时间 ",example="2020-10-10 10:10:10")
private Date updateTime; private Date updateTime;
@Valid
@TableField(exist = false) // 是否转换
@ApiModelProperty(value="绩效等级",example="1")
private ValidList<JxglPerformanceRating> performanceRatings;
} }
\ No newline at end of file
...@@ -72,4 +72,6 @@ public class JxglPerformanceAppraisal extends Model<JxglPerformanceAppraisal> { ...@@ -72,4 +72,6 @@ public class JxglPerformanceAppraisal extends Model<JxglPerformanceAppraisal> {
@ApiModelProperty(value="流程节点",example="") @ApiModelProperty(value="流程节点",example="")
private byte[] processNode; private byte[] processNode;
@ApiModelProperty(value="被考核人员",example="")
private byte[] beingAppraisalPerson;
} }
\ No newline at end of file
...@@ -35,26 +35,26 @@ public class JxglPerformanceRating extends Model<JxglPerformanceRating> { ...@@ -35,26 +35,26 @@ public class JxglPerformanceRating extends Model<JxglPerformanceRating> {
@Id @Id
@GeneratedValue @GeneratedValue
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号", example = "10")
@ApiModelProperty(value = "编号 编号", example = "10")
private Integer id; private Integer id;
@ApiModelProperty(value = "绩效基础设置id 绩效基础设置id", example = "10") @ApiModelProperty(value = "绩效基础设置id", example = "10")
private Integer basicSettingId; private Integer basicSettingId;
@NotBlank(message = "等级名称不能为空") @NotBlank(message = "等级名称 不能为空")
@ApiModelProperty(value = "等级名称", example = "等级名称") @ApiModelProperty(value = "等级名称", example = "等级名称")
private String name; private String name;
@NotNull(message = "区间最小分数不能为空") @NotNull(message = "区间最小分数 不能为空")
@ApiModelProperty(value = "区间最小分数 区间最小分数", example = "10") @ApiModelProperty(value = "区间最小分数", example = "10")
private Integer sectionMinScore; private Integer sectionMinScore;
@NotNull(message = "区间最大分数不能为空") @NotNull(message = "区间最大分数 不能为空")
@ApiModelProperty(value = "区间最大分数 区间最大分数", example = "10") @ApiModelProperty(value = "区间最大分数", example = "10")
private Integer sectionMaxScore; private Integer sectionMaxScore;
@ApiModelProperty(value = "排序 排序", example = "10") @NotNull(message = "排序 不能为空")
@ApiModelProperty(value = "排序", example = "10")
private Integer ranks; private Integer ranks;
} }
\ No newline at end of file
package cn.timer.api.config.enuminterface;
import lombok.Getter;
public interface JxglEnumInterface {
/**
* 考核指标 类型 0员工 1部门
*/
@Getter
enum BeingAppraisalType implements JxglEnumInterface {
EMPLOYEE(0, "员工 "), DEPARTMENT(1, "部门");
private Integer type;
private String name;
BeingAppraisalType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 考核指标 状态 0被考核人 1无需被考核人
*/
@Getter
enum BeingAppraisalSts implements JxglEnumInterface {
NEED(0, "被考核人"), NOT_NEED(1, "无需被考核人");
private Integer type;
private String name;
BeingAppraisalSts(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 考核指标 类型 0 非固定 1 固定
*/
@Getter
enum IndicatorsType implements JxglEnumInterface {
NOT_FIXATION(0, "非固定 "), FIXATION(1, "固定");
private Integer type;
private String name;
IndicatorsType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 是否可见 0是 1否。评分及评分结果能否被员工看见
*/
@Getter
enum IsVisible implements JxglEnumInterface {
TRUE(0, "是"), FALSE(1, "否");
private Integer type;
private String name;
IsVisible(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
*绩效考核 状态 0目标制定 1绩效评分 2结果确认 3绩效归档 4终止考核
*/
@Getter
enum PerformanceAppraisalSts implements JxglEnumInterface {
TARGET_SETING(0, "目标制定"), PERFORMANCE_SCORE(1, "绩效评分"), RESULT_VERIFICATION(2, "结果确认"), PERFORMANCE_ARCHIVE(3, "绩效归档"), TERMINATION_ASSESSMENT(4, "终止考核");
private Integer type;
private String name;
PerformanceAppraisalSts(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
*考核 状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档
*/
@Getter
enum AppraisalSts implements JxglEnumInterface {
TARGET_FILL_IN(0, "目标填写"), TARGET_CONFIRMED(1, "目标确认"),
SELF_ASSESSMENT(2, "自评"), SUPERIOR_SCORE(3, "上级评分"),
RESULT_VERIFICATION(4, "结果确认"), ASSESSMENT_COMPLETE(5, "考核完成"),
TERMINATION_ASSESSMENT(6, "终止考核"), PERFORMANCE_ARCHIVE(7, "绩效归档");
private Integer type;
private String name;
AppraisalSts(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
*执行人类型 0被考核人 1主管 2指定成员
*/
@Getter
enum ExecuteType implements JxglEnumInterface {
BEING_APPRAISAL_PERSON(0, "被考核人"), LEADER(1, "主管"), SPECIFIED_MEMBER(2, "指定成员");
private Integer type;
private String name;
ExecuteType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
*流程类型 0目标填写 1目标确认 2自评 3上级评分 4 结果确认
*/
@Getter
enum ProcessType implements JxglEnumInterface {
TARGET_FILL_IN(0, "目标填写"), TARGET_CONFIRMED(1, "目标确认"), SELF_ASSESSMENT(2, "自评"), SUPERIOR_SCORE(3, "上级评分"), RESULT_VERIFICATION(4, "结果确认");
private Integer type;
private String name;
ProcessType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
*主管层级 0直属主管 1上上级主管
*/
@Getter
enum LeaderTier implements JxglEnumInterface {
FIRST(0, "直属主管"), SECOND(1, "上上级主管");
private Integer type;
private String name;
LeaderTier(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 节点状态 0未执行 1执行中 2 已执行
*/
@Getter
enum ProcessNodeSts implements JxglEnumInterface {
NON_EXECUTION(0, "未执行"), IN_EXECUTION(1, "执行中"), EXECUTED(2, "已执行 ");
private Integer type;
private String name;
ProcessNodeSts(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 评定类型 0自评 1上级评价
*/
@Getter
enum AssessmentType implements JxglEnumInterface {
SELF_ASSESSMENT(0, "自评"), SUPERIOR_SCORE(1, "上级评价");
private Integer type;
private String name;
AssessmentType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
*考核记录 类型 0发起考核 1目标填写 2目标确认 3目标驳回 4自评 5评分驳回 6上级评分 7结果确认 8修改评分 9 考核完成 10 终止考核 11绩效归档
*/
@Getter
enum AppraisalLogType implements JxglEnumInterface {
START(0, "发起考核"), TARGET_FILL_IN(1, "目标填写"),
TARGET_CONFIRMED(2, "目标确认"), TARGET_DISMISS(3, "目标驳回"),
SELF_ASSESSMENT(4, "自评"), SCORE_DISMISS(5, "评分驳回"),
SUPERIOR_SCORE(6, "上级评分"), RESULT_VERIFICATION(7, "结果确认"),
UPDATE_SCORE(8, "修改评分"), ASSESSMENT_COMPLETE(9, "考核完成"),
TERMINATION_ASSESSMENT(10, "终止考核"),PERFORMANCE_ARCHIVE(11, "绩效归档");
private Integer type;
private String name;
AppraisalLogType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
}
package cn.timer.api.dao.jxgl; package cn.timer.api.dao.jxgl;
import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -12,6 +14,4 @@ import cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsT; ...@@ -12,6 +14,4 @@ import cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsT;
@Repository @Repository
public interface JxglAppraisalIndicatorsTMapper extends BaseMapper<JxglAppraisalIndicatorsT> { public interface JxglAppraisalIndicatorsTMapper extends BaseMapper<JxglAppraisalIndicatorsT> {
} }
package cn.timer.api.dao.jxgl; package cn.timer.api.dao.jxgl;
import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -12,6 +14,8 @@ import cn.timer.api.bean.jxgl.JxglAppraisalItemT; ...@@ -12,6 +14,8 @@ import cn.timer.api.bean.jxgl.JxglAppraisalItemT;
@Repository @Repository
public interface JxglAppraisalItemTMapper extends BaseMapper<JxglAppraisalItemT> { public interface JxglAppraisalItemTMapper extends BaseMapper<JxglAppraisalItemT> {
int insertList(List<JxglAppraisalItemT> aItemTs);
} }
...@@ -12,6 +12,8 @@ import cn.timer.api.bean.jxgl.JxglAppraisalT; ...@@ -12,6 +12,8 @@ import cn.timer.api.bean.jxgl.JxglAppraisalT;
@Repository @Repository
public interface JxglAppraisalTMapper extends BaseMapper<JxglAppraisalT> { public interface JxglAppraisalTMapper extends BaseMapper<JxglAppraisalT> {
JxglAppraisalT selectDetailById(Integer id);
} }
...@@ -12,6 +12,8 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting; ...@@ -12,6 +12,8 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting;
@Repository @Repository
public interface JxglBasicSettingMapper extends BaseMapper<JxglBasicSetting> { public interface JxglBasicSettingMapper extends BaseMapper<JxglBasicSetting> {
JxglBasicSetting selectAll(Integer orgCode);
} }
package cn.timer.api.dao.jxgl; package cn.timer.api.dao.jxgl;
import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -12,6 +14,6 @@ import cn.timer.api.bean.jxgl.JxglPerformanceRating; ...@@ -12,6 +14,6 @@ import cn.timer.api.bean.jxgl.JxglPerformanceRating;
@Repository @Repository
public interface JxglPerformanceRatingMapper extends BaseMapper<JxglPerformanceRating> { public interface JxglPerformanceRatingMapper extends BaseMapper<JxglPerformanceRating> {
int insertList(List<JxglPerformanceRating> list);
} }
package cn.timer.api.dto.jxgl;
import java.util.Date;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import cn.timer.api.bean.jxgl.JxglPerformanceRating;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.config.validation.ValidList;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BasicSettingDto {
@ApiModelProperty(value="编号",example="10")
private Integer id;
@ApiModelProperty(value="企业id",example="10")
private Integer orgCode;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="最高分",example="100")
private Integer maxScore;
@ApiModelProperty(value="创建时间",example="2020-10-10 10:10:10")
private Date createTime;
@ApiModelProperty(value="更新时间",example="2020-10-10 10:10:10")
private Date updateTime;
@Valid
@ApiModelProperty(value="绩效等级",example="1")
private ValidList<JxglPerformanceRating> performanceRatings;
}
package cn.timer.api.dto.jxgl;
import java.io.Serializable;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.dto.spmk.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BeingAppraisalPerson implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@NotNull(message = ValidationMsg.NOTNULL)
private Integer id;
/**
* 0员工 1部门
*/
@NotNull(message = ValidationMsg.NOTNULL)
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 1,message = ValidationMsg.MAX)
private Integer type;
/**
* 0被考核人 1无需考核人
*/
@NotNull(message = ValidationMsg.NOTNULL)
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 1,message = ValidationMsg.MAX)
private Integer sts;
}
package cn.timer.api.dto.jxgl;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.google.gson.JsonObject;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PerformanceAppraisalDto implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号 编号",example="10")
private Integer id;
@ApiModelProperty(value="企业id 企业id",example="10")
private Integer orgCode;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value="名称",example="名称")
private String name;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="周期 0月 1季 2年 3半年",example="10")
private Integer period;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="开始时间",example="2020-10-10 10:10:10")
private Date appraisalStartTime;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="结束时间",example="2020-10-10 10:10:10")
private Date appraisalEndTime;
@NotNull(message = ValidationMsg.NOTNULL)
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 1,message = ValidationMsg.MAX)
@ApiModelProperty(value="是否可见 0是 1否。评分及评分结果能否被员工看见",example="1")
private Integer isVisible;
@NotNull(message = ValidationMsg.NOTNULL)
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 4,message = ValidationMsg.MAX)
@ApiModelProperty(value="状态 0目标制定 1绩效评分 2结果确认 3绩效归档 4终止考核",example="10")
private Integer sts;
@ApiModelProperty(value="范围",example="部门名称、被考核人名称")
private String scope;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value="考核模板名称",example="考核模板名称")
private String appraisalTName;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="考核模板id",example="考核模板id")
private Integer appraisalTId;
@ApiModelProperty(value="考核人数 考核人数",example="10")
private Integer appraisalPersonNum;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="流程节点",example="")
private List<ProcessNode> processNode;
@Valid
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="被考核人员",example="")
private List<BeingAppraisalPerson> beingAppraisalPerson;
}
package cn.timer.api.dto.jxgl;
import java.io.Serializable;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProcessNode implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "执行人id(员工id) 执行人id(员工id)", example = "10")
private Integer executorId;
@NotNull(message = ValidationMsg.NOTNULL)
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 2,message = ValidationMsg.MAX)
@ApiModelProperty(value = "执行人类型 0被考核人 1主管 2指定成员", example = "10")
private Integer executeType;
@NotNull(message = ValidationMsg.NOTNULL)
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 4,message = ValidationMsg.MAX)
@ApiModelProperty(value = "类型 0目标填写 1目标确认 2自评 3上级评分 4 结果确认", example = "10")
private Integer processType;
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 1,message = ValidationMsg.MAX)
@ApiModelProperty(value = "主管层级 0直属主管 1上上级主管", example = "10")
private Integer leaderTier;
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 100,message = ValidationMsg.MAX)
@ApiModelProperty(value = "权重 权重", example = "10")
private Integer weight;
}
...@@ -27,6 +27,17 @@ ...@@ -27,6 +27,17 @@
ranks JxglAppraisalItemT_ranks ranks JxglAppraisalItemT_ranks
</sql> </sql>
<insert id="insertList" useGeneratedKeys="true" keyColumn="id" parameterType="list">
INSERT INTO jxgl_appraisal_item_t
(appraisal_indicators_t_id,title,content,ranks)
values
<foreach item="item" index="index" collection="list" open="" separator="," close="">
(
#{item.appraisalIndicatorsTId},#{item.title},#{item.content},#{item.ranks}
)
</foreach>
</insert>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalItemT"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalItemT">
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<resultMap id="BaseResultMap" type="cn.timer.api.bean.jxgl.JxglAppraisal" > <resultMap id="BaseResultMap" type="cn.timer.api.bean.jxgl.JxglAppraisal" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="performance_appraisal_id" property="performanceAppraisalId" />
<result column="emp_num" property="empNum" /> <result column="emp_num" property="empNum" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="appraisal_explain" property="appraisalExplain" /> <result column="appraisal_explain" property="appraisalExplain" />
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
performance_appraisal_id,
emp_num, emp_num,
name, name,
appraisal_explain, appraisal_explain,
...@@ -25,6 +27,7 @@ ...@@ -25,6 +27,7 @@
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
id JxglAppraisal_id, id JxglAppraisal_id,
performance_appraisal_id JxglAppraisal_performance_appraisal_id,
emp_num JxglAppraisal_emp_num, emp_num JxglAppraisal_emp_num,
name JxglAppraisal_name, name JxglAppraisal_name,
appraisal_explain JxglAppraisal_appraisal_explain, appraisal_explain JxglAppraisal_appraisal_explain,
...@@ -38,6 +41,9 @@ ...@@ -38,6 +41,9 @@
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisal"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisal">
INSERT INTO jxgl_appraisal INSERT INTO jxgl_appraisal
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != performanceAppraisalId'>
performance_appraisal_id,
</if>
<if test ='null != empNum'> <if test ='null != empNum'>
emp_num, emp_num,
</if> </if>
...@@ -58,6 +64,9 @@ ...@@ -58,6 +64,9 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != performanceAppraisalId'>
#{performanceAppraisalId},
</if>
<if test ='null != empNum'> <if test ='null != empNum'>
#{empNum}, #{empNum},
</if> </if>
...@@ -87,6 +96,7 @@ ...@@ -87,6 +96,7 @@
<update id="update" parameterType="cn.timer.api.bean.jxgl.JxglAppraisal"> <update id="update" parameterType="cn.timer.api.bean.jxgl.JxglAppraisal">
UPDATE jxgl_appraisal UPDATE jxgl_appraisal
<set> <set>
<if test ='null != performanceAppraisalId'>performance_appraisal_id = #{performanceAppraisalId},</if>
<if test ='null != empNum'>emp_num = #{empNum},</if> <if test ='null != empNum'>emp_num = #{empNum},</if>
<if test ='null != name'>name = #{name},</if> <if test ='null != name'>name = #{name},</if>
<if test ='null != appraisalExplain'>appraisal_explain = #{appraisalExplain},</if> <if test ='null != appraisalExplain'>appraisal_explain = #{appraisalExplain},</if>
......
...@@ -12,6 +12,33 @@ ...@@ -12,6 +12,33 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="BaseResultMap_b" type="cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsT" >
<id column="id" property="id" />
<result column="appraisal_t_id" property="appraisalTId" />
<result column="title" property="title" />
<result column="weight" property="weight" />
<result column="is_edit" property="isEdit" />
<result column="is_set_weight" property="isSetWeight" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="type" property="type" />
<collection column="JxglAppraisalItemT_id" property="appraisalItemTs" ofType="cn.timer.api.bean.jxgl.JxglAppraisalItemT"
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalItemTMapper.BaseResultMap" columnPrefix="JxglAppraisalItemT_">
</collection>
</resultMap>
<resultMap id="BaseResultMap_All" type="cn.timer.api.bean.jxgl.JxglAppraisalT" >
<id column="id" property="id" />
<result column="org_code" property="orgCode" />
<result column="name" property="name" />
<result column="appraisal_explain" property="appraisalExplain" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<collection column="JxglAppraisalIndicatorsT_id" property="appraisalIndicatorsTs" ofType="cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsT"
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalTMapper.BaseResultMap_b" columnPrefix="JxglAppraisalIndicatorsT_">
</collection>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
org_code, org_code,
...@@ -30,6 +57,48 @@ ...@@ -30,6 +57,48 @@
update_time JxglAppraisalT_update_time update_time JxglAppraisalT_update_time
</sql> </sql>
<sql id="Base_Column_List_a">
a.id,
a.org_code,
a.name,
a.appraisal_explain,
a.create_time,
a.update_time
</sql>
<sql id="Base_Column_List_Alias_b">
b.id JxglAppraisalIndicatorsT_id,
b.appraisal_t_id JxglAppraisalIndicatorsT_appraisal_t_id,
b.title JxglAppraisalIndicatorsT_title,
b.weight JxglAppraisalIndicatorsT_weight,
b.is_edit JxglAppraisalIndicatorsT_is_edit,
b.is_set_weight JxglAppraisalIndicatorsT_is_set_weight,
b.create_time JxglAppraisalIndicatorsT_create_time,
b.update_time JxglAppraisalIndicatorsT_update_time,
b.type JxglAppraisalIndicatorsT_type
</sql>
<sql id="Base_Column_List_Alias_c">
c.id JxglAppraisalIndicatorsT_JxglAppraisalItemT_id,
c.appraisal_indicators_t_id JxglAppraisalIndicatorsT_JxglAppraisalItemT_appraisal_indicators_t_id,
c.title JxglAppraisalIndicatorsT_JxglAppraisalItemT_title,
c.content JxglAppraisalIndicatorsT_JxglAppraisalItemT_content,
c.ranks JxglAppraisalIndicatorsT_JxglAppraisalItemT_ranks
</sql>
<select id="selectDetailById" resultMap="BaseResultMap_All">
SELECT
<include refid="Base_Column_List_a" />,
<include refid="Base_Column_List_Alias_b" />,
<include refid="Base_Column_List_Alias_c" />
FROM jxgl_appraisal_t a
LEFT JOIN jxgl_appraisal_indicators_t b ON a.id = b.appraisal_t_id
LEFT JOIN jxgl_appraisal_item_t c ON b.id = c.appraisal_indicators_t_id
WHERE a.id = #{id}
</select>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalT"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalT">
......
...@@ -11,6 +11,17 @@ ...@@ -11,6 +11,17 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="BaseResultMap_All" type="cn.timer.api.bean.jxgl.JxglBasicSetting" >
<id column="id" property="id" />
<result column="org_code" property="orgCode" />
<result column="max_score" property="maxScore" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<collection column="JxglPerformanceRating_id" property="performanceRatings" ofType="cn.timer.api.bean.jxgl.JxglPerformanceRating"
resultMap="cn.timer.api.dao.jxgl.JxglPerformanceRatingMapper.BaseResultMap" columnPrefix="JxglPerformanceRating_">
</collection>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
org_code, org_code,
...@@ -27,6 +38,32 @@ ...@@ -27,6 +38,32 @@
update_time JxglBasicSetting_update_time update_time JxglBasicSetting_update_time
</sql> </sql>
<sql id="Base_Column_List_a">
a.id,
a.org_code,
a.max_score,
a.create_time,
a.update_time
</sql>
<sql id="Base_Column_List_Alias_b">
b.id JxglPerformanceRating_id,
b.basic_setting_id JxglPerformanceRating_basic_setting_id,
b.name JxglPerformanceRating_name,
b.section_min_score JxglPerformanceRating_section_min_score,
b.section_max_score JxglPerformanceRating_section_max_score,
b.ranks JxglPerformanceRating_ranks
</sql>
<select id="selectAll" resultMap="BaseResultMap_All">
SELECT
<include refid="Base_Column_List_a" />,
<include refid="Base_Column_List_Alias_b" />
FROM jxgl_basic_setting a
LEFT JOIN jxgl_performance_rating b ON a.id = b.basic_setting_id
WHERE a.org_code = #{orgCode}
</select>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglBasicSetting"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglBasicSetting">
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<result column="appraisal_t_name" property="appraisalTName" /> <result column="appraisal_t_name" property="appraisalTName" />
<result column="appraisal_person_num" property="appraisalPersonNum" /> <result column="appraisal_person_num" property="appraisalPersonNum" />
<result column="process_node" property="processNode" /> <result column="process_node" property="processNode" />
<result column="being_appraisal_person" property="beingAppraisalPerson" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -30,7 +31,8 @@ ...@@ -30,7 +31,8 @@
scope, scope,
appraisal_t_name, appraisal_t_name,
appraisal_person_num, appraisal_person_num,
process_node process_node,
being_appraisal_person
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -45,7 +47,8 @@ ...@@ -45,7 +47,8 @@
scope JxglPerformanceAppraisal_scope, scope JxglPerformanceAppraisal_scope,
appraisal_t_name JxglPerformanceAppraisal_appraisal_t_name, appraisal_t_name JxglPerformanceAppraisal_appraisal_t_name,
appraisal_person_num JxglPerformanceAppraisal_appraisal_person_num, appraisal_person_num JxglPerformanceAppraisal_appraisal_person_num,
process_node JxglPerformanceAppraisal_process_node process_node JxglPerformanceAppraisal_process_node,
being_appraisal_person JxglPerformanceAppraisal_being_appraisal_person
</sql> </sql>
<!-- <!--
...@@ -84,7 +87,10 @@ ...@@ -84,7 +87,10 @@
appraisal_person_num, appraisal_person_num,
</if> </if>
<if test ='null != processNode'> <if test ='null != processNode'>
process_node process_node,
</if>
<if test ='null != beingAppraisalPerson'>
being_appraisal_person
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -119,7 +125,10 @@ ...@@ -119,7 +125,10 @@
#{appraisalPersonNum}, #{appraisalPersonNum},
</if> </if>
<if test ='null != processNode'> <if test ='null != processNode'>
#{processNode} #{processNode},
</if>
<if test ='null != beingAppraisalPerson'>
#{beingAppraisalPerson}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -142,7 +151,8 @@ ...@@ -142,7 +151,8 @@
<if test ='null != scope'>scope = #{scope},</if> <if test ='null != scope'>scope = #{scope},</if>
<if test ='null != appraisalTName'>appraisal_t_name = #{appraisalTName},</if> <if test ='null != appraisalTName'>appraisal_t_name = #{appraisalTName},</if>
<if test ='null != appraisalPersonNum'>appraisal_person_num = #{appraisalPersonNum},</if> <if test ='null != appraisalPersonNum'>appraisal_person_num = #{appraisalPersonNum},</if>
<if test ='null != processNode'>process_node = #{processNode}</if> <if test ='null != processNode'>process_node = #{processNode},</if>
<if test ='null != beingAppraisalPerson'>being_appraisal_person = #{beingAppraisalPerson}</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
ranks JxglPerformanceRating_ranks ranks JxglPerformanceRating_ranks
</sql> </sql>
<insert id="insertList" useGeneratedKeys="true" keyColumn="id" parameterType="list">
INSERT INTO jxgl_performance_rating
(basic_setting_id,name,section_min_score,section_max_score,ranks)
values
<foreach item="item" index="index" collection="list" open="" separator="," close="">
(
#{item.basicSettingId},#{item.name},#{item.sectionMinScore},#{item.sectionMaxScore},#{item.ranks}
)
</foreach>
</insert>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglPerformanceRating"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglPerformanceRating">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment