Commit bce50eb0 by Administrator

Merge branch 'tzq' into 'develop'

绩效管理优化、bug修复

See merge request 8timerv2/8timerapiv200!157
parents 29b14155 2e20ce24
......@@ -62,6 +62,9 @@ public class JxglAppraisalIndicators extends Model<JxglAppraisalIndicators> {
@ApiModelProperty(value = "类型 0 非固定 1 固定", example = "0")
private Integer type;
@ApiModelProperty(value = "是否可编辑权重", example = "0 是 1否")
private Integer isEditWeight;
@TableField(exist = false)
private List<JxglAppraisalIndicatorsAssessment> appraisalIndicatorsAssessments;
......
......@@ -63,8 +63,10 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> {
@ApiModelProperty(value = "类型", example = "0 非固定 1 固定")
private Integer type;
@ApiModelProperty(value = "是否可编辑权重", example = "0 是 1否")
private Integer isEditWeight;
@TableField(exist = false) // 是否转换
@ApiModelProperty(value = "考核项模板", example = "")
private List<JxglAppraisalItemT> appraisalItemTs;
}
\ No newline at end of file
......@@ -5,6 +5,10 @@ import java.util.List;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -12,6 +16,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -38,35 +43,44 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> {
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "10")
@ApiModelProperty(value = "编号", example = "10")
private Integer id;
@ApiModelProperty(value = "企业id 企业id", example = "10")
@ApiModelProperty(value = "企业id", example = "10")
private Integer orgCode;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "名称", example = "名称")
private String name;
@ApiModelProperty(value = "考核说明", example = "考核说明")
private String appraisalExplain;
@Null(message = ValidationMsg.NULL)
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", example = "2020-10-10 10:10:10")
private Date createTime;
@Null(message = ValidationMsg.NULL)
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10")
private Date updateTime;
@ApiModelProperty(value = "是否可编辑 限制员工的权限", example = "10")
@ApiModelProperty(value = "是否可编辑 限制员工的权限", example = "0")
private Integer isEdit;
@ApiModelProperty(value = "是否使用固定", example = "10")
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 1,message = ValidationMsg.MAX)
@ApiModelProperty(value = "是否使用固定", example = "0")
private Integer isUseFixd;
@ApiModelProperty(value = "是否使用非固定", example = "10")
@Min(value = 0,message = ValidationMsg.MIN)
@Max(value = 1,message = ValidationMsg.MAX)
@ApiModelProperty(value = "是否使用非固定", example = "0")
private Integer isUseNotFixd;
@TableField(exist = false) // 是否转换
@ApiModelProperty(value = "考核指标模板", example = "")
private List<JxglAppraisalIndicatorsT> appraisalIndicatorsTs;
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.config.validation.ValidList;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -39,13 +41,14 @@ public class JxglBasicSetting extends Model<JxglBasicSetting> {
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号 编号",example="101")
@ApiModelProperty(value="编号",example="101")
private Integer id;
@ApiModelProperty(value="企业id 企业id",example="101")
private Integer orgCode;
@ApiModelProperty(value="最高分 最高分",example="101")
@Min(value = 0,message = ValidationMsg.MIN)
@ApiModelProperty(value="最高分",example="101")
private Integer maxScore;
@TableField(fill = FieldFill.INSERT)
......
......@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -41,19 +42,19 @@ public class JxglPerformanceRating extends Model<JxglPerformanceRating> {
@ApiModelProperty(value = "绩效基础设置id", example = "10")
private Integer basicSettingId;
@NotBlank(message = "等级名称 不能为空")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "等级名称", example = "等级名称")
private String name;
@NotNull(message = "区间最小分数 不能为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "区间最小分数", example = "10")
private Integer sectionMinScore;
@NotNull(message = "区间最大分数 不能为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "区间最大分数", example = "10")
private Integer sectionMaxScore;
@NotNull(message = "排序 不能为空")
// @NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "排序", example = "10")
private Integer ranks;
......
......@@ -2,6 +2,9 @@ package cn.timer.api.dto.jxgl;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -19,6 +22,7 @@ public class AppraisalAssessment implements Serializable{
*/
private static final long serialVersionUID = 1L;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "考核id", example = "1")
private Integer appraisalId;
......@@ -28,6 +32,7 @@ public class AppraisalAssessment implements Serializable{
@ApiModelProperty(value = "考核评定id", example = "1")
private Integer appraisalAssessmentId;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "评分", example = "86")
private String score;
......
......@@ -28,7 +28,7 @@ public class AppraisalQuery extends Page{
@ApiModelProperty(value = "姓名、手机号", example = "")
private String query;
@Max(value = 4,message = ValidationMsg.MAX+" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档")
@Max(value = 7,message = ValidationMsg.MAX+" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档")
@Min(value = 0,message = ValidationMsg.MIN+" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档")
@ApiModelProperty(value = "状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档", example = "0")
private Integer sts;
......
package cn.timer.api.dto.jxgl;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -12,6 +15,7 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class AppraisalReject {
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "考核id", example = "")
private Integer id;
......
......@@ -4,11 +4,14 @@ import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableField;
import cn.timer.api.bean.jxgl.JxglAppraisal;
import cn.timer.api.bean.jxgl.JxglAppraisalIndicators;
import cn.timer.api.bean.jxgl.JxglAppraisalItem;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -26,6 +29,7 @@ public class AppraisalUpdate implements Serializable{
*/
private static final long serialVersionUID = 1L;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "考核id", example = "16")
private Integer id;
......
package cn.timer.api.dto.jxgl;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -12,9 +15,11 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class AppraisalUpdateSts {
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "绩效考核id", example = "")
private Integer id;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "状态", example = "")
private Integer sts;
......
package cn.timer.api.dto.jxgl;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -16,7 +13,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class MyPerformance extends Page {
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "员工id", example = "")
private Integer id;
......
......@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import cn.timer.api.bean.jxgl.JxglProcessNode;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -29,12 +31,15 @@ public class ProcessNodeUpdate implements Serializable{
*/
private static final long serialVersionUID = 1L;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "编号", example = "10")
private Integer id;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "考核id", example = "10")
private Integer appraisalId;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "执行人id(员工id)", example = "10")
private Integer executorId;
......
......@@ -11,6 +11,7 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="type" property="type" />
<result column="is_edit_weight" property="isEditWeight" />
</resultMap>
<sql id="Base_Column_List">
......@@ -20,7 +21,8 @@
weight,
create_time,
update_time,
type
type,
is_edit_weight
</sql>
<sql id="Base_Column_List_Alias">
......@@ -30,7 +32,8 @@
weight JxglAppraisalIndicators_weight,
create_time JxglAppraisalIndicators_create_time,
update_time JxglAppraisalIndicators_update_time,
type JxglAppraisalIndicators_type
type JxglAppraisalIndicators_type,
is_edit_weight JxglAppraisalIndicators_is_edit_weight
</sql>
<!--
......@@ -54,7 +57,10 @@
update_time,
</if>
<if test ='null != type'>
type
type,
</if>
<if test ='null != isEditWeight'>
is_edit_weight
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -74,7 +80,10 @@
#{updateTime},
</if>
<if test ='null != type'>
#{type}
#{type},
</if>
<if test ='null != isEditWeight'>
#{isEditWeight}
</if>
</trim>
</insert>
......@@ -92,7 +101,8 @@
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != type'>type = #{type}</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != isEditWeight'>is_edit_weight = #{isEditWeight}</if>
</set>
WHERE id = #{id}
</update>
......
......@@ -11,6 +11,7 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="type" property="type" />
<result column="is_edit_weight" property="isEditWeight" />
</resultMap>
<sql id="Base_Column_List">
......@@ -20,7 +21,8 @@
weight,
create_time,
update_time,
type
type,
is_edit_weight
</sql>
<sql id="Base_Column_List_Alias">
......@@ -30,7 +32,8 @@
weight JxglAppraisalIndicatorsT_weight,
create_time JxglAppraisalIndicatorsT_create_time,
update_time JxglAppraisalIndicatorsT_update_time,
type JxglAppraisalIndicatorsT_type
type JxglAppraisalIndicatorsT_type,
is_edit_weight JxglAppraisalIndicatorsT_is_edit_weight
</sql>
<!--
......@@ -54,7 +57,10 @@
update_time,
</if>
<if test ='null != type'>
type
type,
</if>
<if test ='null != isEditWeight'>
is_edit_weight
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -74,7 +80,10 @@
#{updateTime},
</if>
<if test ='null != type'>
#{type}
#{type},
</if>
<if test ='null != isEditWeight'>
#{isEditWeight}
</if>
</trim>
</insert>
......@@ -92,7 +101,8 @@
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != type'>type = #{type}</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != isEditWeight'>is_edit_weight = #{isEditWeight}</if>
</set>
WHERE id = #{id}
</update>
......
......@@ -26,6 +26,8 @@
<result column="sts" property="sts" />
<result column="is_edit" property="isEdit" />
<result column="executor_name" property="executorName" />
<result column="phone" property="phone" />
<result column="bm_name" property="bmName" />
</resultMap>
<resultMap id="BaseResultMap_All" type="cn.timer.api.bean.jxgl.JxglAppraisal" >
......@@ -76,6 +78,7 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="type" property="type" />
<result column="is_edit_weight" property="isEditWeight" />
<collection column="JxglAppraisalIndicatorsAssessment_id" property="appraisalIndicatorsAssessments" ofType="cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsAssessment"
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalIndicatorsAssessmentMapper.BaseResultMap" columnPrefix="JxglAppraisalIndicatorsAssessment_">
</collection>
......@@ -178,7 +181,8 @@
e.weight e_weight,
e.create_time e_create_time,
e.update_time e_update_time,
e.type e_type
e.type e_type,
e.is_edit_weight e_is_edit_weight
</sql>
<sql id="Base_Column_List_Alias_f">
......@@ -332,7 +336,7 @@
LEFT JOIN jxgl_performance_appraisal h ON a.performance_appraisal_id = h.id
LEFT JOIN yggl_main_emp i ON b.executor_id = i.emp_num AND i.org_code = #{orgCode}
WHERE a.id = #{id}
ORDER BY c.id , d.id
ORDER BY c.id , d.id , b.process_type
</select>
<!--
......
......@@ -23,6 +23,7 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="type" property="type" />
<result column="is_edit_weight" property="isEditWeight" />
<collection column="JxglAppraisalItemT_id" property="appraisalItemTs" ofType="cn.timer.api.bean.jxgl.JxglAppraisalItemT"
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalItemTMapper.BaseResultMap" columnPrefix="JxglAppraisalItemT_">
</collection>
......@@ -86,7 +87,8 @@
b.weight JxglAppraisalIndicatorsT_weight,
b.create_time JxglAppraisalIndicatorsT_create_time,
b.update_time JxglAppraisalIndicatorsT_update_time,
b.type JxglAppraisalIndicatorsT_type
b.type JxglAppraisalIndicatorsT_type,
b.is_edit_weight JxglAppraisalIndicatorsT_is_edit_weight
</sql>
<sql id="Base_Column_List_Alias_c">
......@@ -108,10 +110,7 @@
WHERE a.id = #{id}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalT">
INSERT INTO jxgl_appraisal_t
<trim prefix="(" suffix=")" suffixOverrides=",">
......
......@@ -62,6 +62,7 @@
FROM jxgl_basic_setting a
LEFT JOIN jxgl_performance_rating b ON a.id = b.basic_setting_id
WHERE a.org_code = #{orgCode}
ORDER BY b.ranks
</select>
<!--
......
......@@ -200,17 +200,19 @@
<select id="selectMyByQuery" resultMap="BaseResultMap_ALl" >
SELECT
a.name,a.appraisal_start_time,a.appraisal_end_time,
b.sts b_sts,
(SELECT name FROM yggl_main_emp WHERE emp_num = d.executor_id AND org_code = a.org_code) as b_executor_name,
b.id b_id,b.sts b_sts,
c.comprehensive_score c_comprehensive_score,
c.level c_level
c.level c_level,
e.name b_executor_name, e.phone b_phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = e.bmgw_id limit 1) limit 1) as b_bm_name
FROM jxgl_performance_appraisal a
LEFT JOIN jxgl_appraisal b ON b.performance_appraisal_id = a.id
LEFT JOIN jxgl_appraisal_assessment c ON b.id = c.appraisal_id AND c.type = 1
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND d.sts = 1
LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code
<where>
AND a.org_code = #{param.orgCode}
AND b.emp_num = #{param.id}
AND d.executor_id = #{param.id}
<if test="param.sts != null and param.sts == 0">
AND b.sts = 0
</if>
......@@ -223,10 +225,8 @@
<if test="param.sts != null and param.sts == 3">
AND b.sts = 4
</if>
</where>
</select>
......
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