Commit b762f136 by tangzhaoqian

绩效管理

parent ff5e540c
......@@ -59,6 +59,9 @@ public class JxglAppraisal extends Model<JxglAppraisal> {
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10")
private Date updateTime;
@ApiModelProperty(value = "是否可编辑 限制员工的权限", example = "1")
private Integer isEdit;
@ApiModelProperty(value = "状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档", example = "0")
private Integer sts;
......
......@@ -50,12 +50,6 @@ public class JxglAppraisalIndicators extends Model<JxglAppraisalIndicators> {
@ApiModelProperty(value = "权重 整数,单位%", example = "10")
private Integer weight;
@ApiModelProperty(value = "是否可编辑 限制员工的权限", example = "10")
private Integer isEdit;
@ApiModelProperty(value = "是否可设置权重 限制员工的权限", example = "10")
private Integer isSetWeight;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", example = "2020-10-10 10:10:10")
......
......@@ -37,7 +37,6 @@ public class JxglAppraisalIndicatorsAssessment extends Model<JxglAppraisalIndica
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "10")
private Integer id;
......
......@@ -51,12 +51,6 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> {
@ApiModelProperty(value = "权重 整数,单位%", example = "10")
private Integer weight;
@ApiModelProperty(value = "是否可编辑 限制员工的权限", example = "10")
private Integer isEdit;
@ApiModelProperty(value = "是否可设置权重 限制员工的权限", example = "10")
private Integer isSetWeight;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", example = "2020-10-10 10:10:10")
......
......@@ -5,7 +5,6 @@ import java.util.List;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -51,15 +50,22 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> {
@ApiModelProperty(value = "考核说明", example = "考核说明")
private String appraisalExplain;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", example = "2020-10-10 10:10:10")
private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "更新时间", example = "2020-10-10 10:10:10")
private Date updateTime;
@ApiModelProperty(value = "是否可编辑 限制员工的权限", example = "10")
private Integer isEdit;
@ApiModelProperty(value = "是否使用固定", example = "10")
private Integer isUseFixd;
@ApiModelProperty(value = "是否使用非固定", example = "10")
private Integer isUseNotFixd;
@TableField(exist = false) // 是否转换
@ApiModelProperty(value = "考核指标模板", example = "")
private List<JxglAppraisalIndicatorsT> appraisalIndicatorsTs;
......
......@@ -22,7 +22,7 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
this.strictInsertFill(metaObject, "regTime", Date.class, date);
this.strictInsertFill(metaObject, "registerTime", Date.class, date);
this.strictInsertFill(metaObject, "addtime", Date.class, date);
this.strictInsertFill(metaObject, "sts", int.class, 0); // 起始版本 3.3.0(推荐使用)
this.strictInsertFill(metaObject, "sts", int.class, 0);
}
......
......@@ -232,8 +232,8 @@ public interface JxglEnumInterface {
@Getter
enum AppraisalLogType implements JxglEnumInterface {
START(0, "发起考核"), TARGET_FILL_IN(1, "目标填写"),
TARGET_CONFIRMED(2, "目标确认"), TARGET_DISMISS(3, "目标驳回"),
SELF_ASSESSMENT(4, "自评"), SCORE_DISMISS(5, "评分驳回"),
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, "绩效归档");
......
......@@ -26,7 +26,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.timer.api.aspect.lang.annotation.Log;
......@@ -259,9 +258,10 @@ public class LoginController {
@ApiOperationSupport(order = 2)
public Result<String> authentication(@RequestBody EntRegisterDto entRegisterDto) {
String phone = entRegisterDto.getPhone();
String code = entRegisterDto.getCode().toString();
// String codeRedis = (String) redisTemplate.get(phone);
String codeRedis = BeanUtil.toBean(session.getAttribute(phone), String.class);
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if (code == null || !code.equals(codeRedis)) {
return ResultUtil.error("验证码不符");
......@@ -323,7 +323,7 @@ public class LoginController {
return ResultUtil.error("新密码与原密码相同,请修改后重试!");
}
} else {
String codeRedis = BeanUtil.toBean(session.getAttribute(phone), String.class);
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if (!code.equals(codeRedis)) {
return ResultUtil.error("短信验证码错误");
}
......@@ -351,7 +351,7 @@ public class LoginController {
String code = entRegisterDto.getCode();
if (entRegisterDto.getPwUpdateType() != 2) {
String codeRedis = BeanUtil.toBean(session.getAttribute(phone), String.class);
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if (code == null) {
return ResultUtil.error("请填写验证码");
}
......@@ -411,7 +411,7 @@ public class LoginController {
String phone = entRegisterDto.getPhone();
String code = entRegisterDto.getCode();
// String codeRedis = redisTemplate.get(phone).toString();
String codeRedis = BeanUtil.toBean(session.getAttribute(phone), String.class);
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if (code == null || !code.toString().equals(codeRedis)) {
return ResultUtil.error("验证码不符/失效");
......@@ -540,7 +540,7 @@ public class LoginController {
String code = entRegisterDto.getCode();
String phone = entRegisterDto.getPhone();
String codeRedis = BeanUtil.toBean(session.getAttribute(phone), String.class);
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if (codeRedis == null || !code.equals(codeRedis))
return ResultUtil.error("验证码不符");
......
......@@ -462,7 +462,7 @@ public class SpmkController {
@ApiOperationSupport(order = 17)
@Transactional(rollbackFor = Exception.class)
@Log(title = "审批-发起审批", businessType = BusinessType.INSERT)
public Result<Object> saveCa(@CurrentUser UserBean userBean,@Validated @RequestBody SpmkApproveSummaryDto spmkApproveSummaryDto) throws Exception{
public Result<Object> saveA(@CurrentUser UserBean userBean,@Validated @RequestBody SpmkApproveSummaryDto spmkApproveSummaryDto) throws Exception{
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>()
.lambda()
.select(YgglMainEmp::getHeadUrl,YgglMainEmp::getName)
......@@ -540,7 +540,7 @@ public class SpmkController {
summaryQueryDto.setOrgCode(userBean.getOrgCode());
Integer deptId = summaryQueryDto.getDeptId();
List<YgglMainEmp> listYgglMainEmp = RouterUtils.selectOtherlistent(userBean.getOrgCode(), deptId);
List<YgglMainEmp> listYgglMainEmp = zzglBmgwMService.selectOtherlistent(userBean.getOrgCode(), deptId);
if (deptId != null && (listYgglMainEmp == null || listYgglMainEmp.size() == 0)) {
return ResultUtil.data(new ArrayList<SpmkApproveSummary>());
......@@ -663,7 +663,7 @@ public class SpmkController {
return ResultUtil.success();
}
//TODO 我审批的/抄送我的
//TODO 我发起的/我审批的/抄送我的
/**
* 查询列表-我发起的/我审批的/抄送我的-分页
*/
......
......@@ -299,6 +299,14 @@ public class ZzglController {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, userBean.getOrgCode(),
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗");
// 清楚 leader 主管标记
if ((dpetId == null || dpetId == 0) || upEmpDeptDto.getIsdg() == null) {
ZzglBmgwM.builder().leader(null).build()
.update(new UpdateWrapper<ZzglBmgwM>().lambda()
.eq(ZzglBmgwM::getOrgCode, userBean.getOrgCode())
.in(ZzglBmgwM::getLeader, empNums));
}
ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda()
.set(YgglMainEmp::getBmgwId, dpetId)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getEmpNum, empNums));
......@@ -306,21 +314,6 @@ public class ZzglController {
return ResultUtil.success();
}
//修改/删除员工部门(供审批管理使用)
public void updatelistempdeptforspgl (Integer empNum,Integer orgCode, UpEmpDeptDto upEmpDeptDto) {
Integer dpetId = upEmpDeptDto.getDpetId();
List<Integer> empNums = new ArrayList<Integer>();
empNums.add(empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
zzglLogDgjlMapper.insertbyaddemp(empNums, empNum, dpetId, orgCode,
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗");
ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda()
.set(YgglMainEmp::getBmgwId, dpetId)
.eq(YgglMainEmp::getOrgCode, orgCode)
.in(YgglMainEmp::getEmpNum, empNum));
}
/**
* 岗位权限
*
......
......@@ -44,7 +44,9 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
@Autowired
private ZzglLogDgjlMapper zzglLogDgjlMapper;
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
/**
* 根据 员工 的 岗位,以及上面所有的部门id,返回integer数组
*/
@Override
public List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum) {
Set<Integer> lanzi = new HashSet<Integer>();
......
......@@ -23,4 +23,6 @@ public interface JxglAppraisalMapper extends BaseMapper<JxglAppraisal> {
IPage<JxglAppraisal> selectListEmpByQuery(IPage<JxglAppraisal> page,@Param("param") EmpPerformanceQuery query);
IPage<JxglAppraisal> selectMyEmpByQuery(IPage<JxglAppraisal> page,@Param("param") EmpPerformanceQuery query);
}
......@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.jxgl.JxglPerformanceAppraisal;
import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.dto.jxgl.EmpAppraisalQuery;
import cn.timer.api.dto.jxgl.MyPerformance;
import cn.timer.api.dto.jxgl.PerformanceAppraisalQuery;
/**
......@@ -26,6 +27,8 @@ public interface JxglPerformanceAppraisalMapper extends BaseMapper<JxglPerforman
IPage<JxglPerformanceAppraisal> selectArchiveListByQuery(IPage<SpmkApproveSummary> page,@Param("param")
PerformanceAppraisalQuery query);
IPage<JxglPerformanceAppraisal> selectMyByQuery(IPage<JxglPerformanceAppraisal> page,@Param("param") MyPerformance query);
}
package cn.timer.api.dto.jxgl;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AppraisalAssessment implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "考核id", example = "1")
private Integer appraisalId;
@ApiModelProperty(value = "考核指标id", example = "1")
private Integer appraisalIndicatorsId;
@ApiModelProperty(value = "考核评定id", example = "1")
private Integer appraisalAssessmentId;
@ApiModelProperty(value = "评分", example = "86")
private String score;
@ApiModelProperty(value = "评语/备注", example = "评语/备注")
private String remarks;
@ApiModelProperty(value = "等级", example = "A")
private String level;
}
......@@ -62,6 +62,8 @@ public class AppraisalDetail implements Serializable{
@ApiModelProperty(value = "状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档", example = "0")
private Integer sts;
private String appraisalName;
private List<JxglProcessNode> processNodes;
private List<JxglAppraisalAssessment> appraisalAssessments;
......
package cn.timer.api.dto.jxgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AppraisalReject {
@ApiModelProperty(value = "考核id", example = "")
private Integer id;
@ApiModelProperty(value = "驳回原因", example = "")
private String rejectReason;
}
package cn.timer.api.dto.jxgl;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
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 io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AppraisalUpdate implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "考核id", example = "16")
private Integer id;
@TableField(exist = false)
private List<JxglAppraisalIndicators> appraisalIndicators;
}
package cn.timer.api.dto.jxgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AppraisalUpdateSts {
@ApiModelProperty(value = "绩效考核id", example = "")
private Integer id;
@ApiModelProperty(value = "状态", example = "")
private Integer sts;
}
package cn.timer.api.dto.jxgl;
import java.util.List;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
......@@ -28,5 +30,10 @@ public class EmpPerformanceQuery extends Page {
@ApiModelProperty(value = "部门id", example = "")
private Integer bmId;
@ApiModelProperty(value = "员工id", example = "")
private List<Integer> empNums;
}
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;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MyPerformance extends Page {
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "员工id", example = "")
private Integer id;
@ApiModelProperty(value = "企业id", example = "")
private Integer orgCode;
@ApiModelProperty(value = "状态 0目标填写 1目标确认 2评分 3 结果确认", example = "")
private Integer sts;
}
package cn.timer.api.utils;
import lombok.Data;
/**
* 分页查询工具类
*
* @author Administrator
*
*/
public class Page {
//当前页
/**
* 当前页
*/
private Integer currentPage;
//当前页总条数
private Integer totalPage;
/**
* 每页总条数
*/
private Integer totalPage;
public Integer getCurrentPage() {
return currentPage == null || currentPage <= 0 ? 1 : currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getTotalPage() {
return totalPage == null || totalPage <= 0 ? 10 : totalPage;
}
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
}
}
......@@ -8,8 +8,6 @@
<result column="appraisal_id" property="appraisalId" />
<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" />
......@@ -20,8 +18,6 @@
appraisal_id,
title,
weight,
is_edit,
is_set_weight,
create_time,
update_time,
type
......@@ -32,8 +28,6 @@
appraisal_id JxglAppraisalIndicators_appraisal_id,
title JxglAppraisalIndicators_title,
weight JxglAppraisalIndicators_weight,
is_edit JxglAppraisalIndicators_is_edit,
is_set_weight JxglAppraisalIndicators_is_set_weight,
create_time JxglAppraisalIndicators_create_time,
update_time JxglAppraisalIndicators_update_time,
type JxglAppraisalIndicators_type
......@@ -53,12 +47,6 @@
<if test ='null != weight'>
weight,
</if>
<if test ='null != isEdit'>
is_edit,
</if>
<if test ='null != isSetWeight'>
is_set_weight,
</if>
<if test ='null != createTime'>
create_time,
</if>
......@@ -79,12 +67,6 @@
<if test ='null != weight'>
#{weight},
</if>
<if test ='null != isEdit'>
#{isEdit},
</if>
<if test ='null != isSetWeight'>
#{isSetWeight},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
......@@ -108,8 +90,6 @@
<if test ='null != appraisalId'>appraisal_id = #{appraisalId},</if>
<if test ='null != title'>title = #{title},</if>
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != isEdit'>is_edit = #{isEdit},</if>
<if test ='null != isSetWeight'>is_set_weight = #{isSetWeight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != type'>type = #{type}</if>
......
......@@ -8,8 +8,6 @@
<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" />
......@@ -20,8 +18,6 @@
appraisal_t_id,
title,
weight,
is_edit,
is_set_weight,
create_time,
update_time,
type
......@@ -32,8 +28,6 @@
appraisal_t_id JxglAppraisalIndicatorsT_appraisal_t_id,
title JxglAppraisalIndicatorsT_title,
weight JxglAppraisalIndicatorsT_weight,
is_edit JxglAppraisalIndicatorsT_is_edit,
is_set_weight JxglAppraisalIndicatorsT_is_set_weight,
create_time JxglAppraisalIndicatorsT_create_time,
update_time JxglAppraisalIndicatorsT_update_time,
type JxglAppraisalIndicatorsT_type
......@@ -53,12 +47,6 @@
<if test ='null != weight'>
weight,
</if>
<if test ='null != isEdit'>
is_edit,
</if>
<if test ='null != isSetWeight'>
is_set_weight,
</if>
<if test ='null != createTime'>
create_time,
</if>
......@@ -79,12 +67,6 @@
<if test ='null != weight'>
#{weight},
</if>
<if test ='null != isEdit'>
#{isEdit},
</if>
<if test ='null != isSetWeight'>
#{isSetWeight},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
......@@ -108,8 +90,6 @@
<if test ='null != appraisalTId'>appraisal_t_id = #{appraisalTId},</if>
<if test ='null != title'>title = #{title},</if>
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != isEdit'>is_edit = #{isEdit},</if>
<if test ='null != isSetWeight'>is_set_weight = #{isSetWeight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != type'>type = #{type}</if>
......
......@@ -12,6 +12,20 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="sts" property="sts" />
<result column="is_edit" property="isEdit" />
</resultMap>
<resultMap id="BaseResultMap_My" type="cn.timer.api.bean.jxgl.JxglAppraisal" >
<id column="id" property="id" />
<result column="performance_appraisal_id" property="performanceAppraisalId" />
<result column="emp_num" property="empNum" />
<result column="name" property="name" />
<result column="appraisal_explain" property="appraisalExplain" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="sts" property="sts" />
<result column="is_edit" property="isEdit" />
<result column="executor_name" property="executorName" />
</resultMap>
<resultMap id="BaseResultMap_All" type="cn.timer.api.bean.jxgl.JxglAppraisal" >
......@@ -40,6 +54,7 @@
<result column="appraisal_explain" property="appraisalExplain" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="is_edit" property="isEdit" />
<result column="sts" property="sts" />
<result column="user_name" property="userName" />
<result column="phone" property="phone" />
......@@ -58,8 +73,6 @@
<result column="appraisal_id" property="appraisalId" />
<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" />
......@@ -80,6 +93,7 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="sts" property="sts" />
<result column="appraisal_name" property="appraisalName" />
<collection column="JxglProcessNode_id" property="processNodes" ofType="cn.timer.api.bean.jxgl.JxglProcessNode"
resultMap="cn.timer.api.dao.jxgl.JxglProcessNodeMapper.BaseResultMap" columnPrefix="JxglProcessNode_">
</collection>
......@@ -104,7 +118,8 @@
appraisal_explain,
create_time,
update_time,
sts
sts,
is_edit
</sql>
<sql id="Base_Column_List_a">
......@@ -115,7 +130,8 @@
a.appraisal_explain,
a.create_time,
a.update_time,
a.sts
a.sts,
a.is_edit
</sql>
<sql id="Base_Column_List_Alias_b">
......@@ -160,8 +176,6 @@
e.appraisal_id e_id,
e.title e_title,
e.weight e_weight,
e.is_edit e_is_edit,
e.is_set_weight e_is_set_weight,
e.create_time e_create_time,
e.update_time e_update_time,
e.type e_type
......@@ -194,7 +208,8 @@
appraisal_explain JxglAppraisal_appraisal_explain,
create_time JxglAppraisal_create_time,
update_time JxglAppraisal_update_time,
sts JxglAppraisal_sts
sts JxglAppraisal_sts,
is_edit JxglAppraisal_is_edit
</sql>
<select id="selectListByQuery" resultMap="BaseResultMap_All" >
......@@ -203,7 +218,7 @@
b.name user_name, b.phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = b.bmgw_id limit 1) limit 1) as bm_name,
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name,
(SELECT executor_name FROM jxgl_process_node WHERE process_type = 4 AND sts = 2 LIMIT 1) as confirmor,
<!-- (SELECT executor_name FROM jxgl_process_node WHERE sts = 1 LIMIT 1) as confirmor, -->
d.comprehensive_score ,d.level
FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
......@@ -224,6 +239,49 @@
</select>
<select id="selectMyEmpByQuery" resultMap="BaseResultMap_All" >
SELECT
<include refid="Base_Column_List_a" />,
b.name user_name, b.phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = b.bmgw_id limit 1) limit 1) as bm_name,
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name,
<!-- (SELECT executor_name FROM jxgl_process_node WHERE sts = 1 LIMIT 1) as confirmor, -->
d.comprehensive_score ,d.level
FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.sts = 1
LEFT JOIN jxgl_appraisal_assessment d ON a.id = d.appraisal_id AND d.type = 1
<!-- 缺部门 搜索 -->
WHERE a.performance_appraisal_id = #{param.id}
<if test="param.empNums != null and param.empNums.size() > 0">
<choose>
<when test="param.empNums.size() > 1">
AND b.emp_num IN
(
<foreach item="it" index="index" collection="param.empNums" separator="," close="" >
#{it}
</foreach>
)
</when>
<otherwise>
AND asso_id = #{param.empNums[0]}
</otherwise>
</choose>
</if>
<if test="param.query != null and param.query != ''">
AND (
b.name like CONCAT('%',#{param.query},'%') or
b.phone like CONCAT('%',#{param.query},'%')
)
</if>
<if test="param.sts != null">
AND a.sts = #{param.sts}
</if>
ORDER BY a.id DESC
</select>
<select id="selectListEmpByQuery" resultMap="BaseResultMap_Emp" >
SELECT
a.emp_num,
......@@ -260,7 +318,8 @@
<include refid="Base_Column_List_Alias_d" />,
<include refid="Base_Column_List_Alias_e" />,
<include refid="Base_Column_List_Alias_f" />,
<include refid="Base_Column_List_Alias_g" />
<include refid="Base_Column_List_Alias_g" />,
h.name appraisal_name
FROM
jxgl_appraisal a
LEFT JOIN jxgl_process_node b ON a.id = b.appraisal_id
......@@ -269,7 +328,9 @@
LEFT JOIN jxgl_appraisal_indicators e ON a.id = e.appraisal_id
LEFT JOIN jxgl_appraisal_indicators_assessment f ON e.id = f.appraisal_indicators_id
LEFT JOIN jxgl_appraisal_item g ON e.id = g.appraisal_indicators_id
LEFT JOIN jxgl_performance_appraisal h ON a.performance_appraisal_id = h.id
WHERE a.id = #{id}
ORDER BY c.id , d.id
</select>
<!--
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.jxgl.JxglAppraisalTMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.jxgl.JxglAppraisalT" >
<id column="id" property="id" />
<result column="org_code" property="orgCode" />
......@@ -10,6 +10,9 @@
<result column="appraisal_explain" property="appraisalExplain" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="is_edit" property="isEdit" />
<result column="is_use_fixd" property="isUseFixd" />
<result column="is_use_not_fixd" property="isUseNotFixd" />
</resultMap>
<resultMap id="BaseResultMap_b" type="cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsT" >
......@@ -17,8 +20,6 @@
<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" />
......@@ -34,6 +35,9 @@
<result column="appraisal_explain" property="appraisalExplain" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="is_edit" property="isEdit" />
<result column="is_use_fixd" property="isUseFixd" />
<result column="is_use_not_fixd" property="isUseNotFixd" />
<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>
......@@ -45,7 +49,10 @@
name,
appraisal_explain,
create_time,
update_time
update_time,
is_edit,
is_use_fixd,
is_use_not_fixd
</sql>
<sql id="Base_Column_List_Alias">
......@@ -54,7 +61,10 @@
name JxglAppraisalT_name,
appraisal_explain JxglAppraisalT_appraisal_explain,
create_time JxglAppraisalT_create_time,
update_time JxglAppraisalT_update_time
update_time JxglAppraisalT_update_time,
is_edit JxglAppraisalT_is_edit,
is_use_fixd JxglAppraisalT_is_use_fixd,
is_use_not_fixd JxglAppraisalT_is_use_not_fixd
</sql>
<sql id="Base_Column_List_a">
......@@ -63,7 +73,10 @@
a.name,
a.appraisal_explain,
a.create_time,
a.update_time
a.update_time,
a.is_edit,
a.is_use_fixd,
a.is_use_not_fixd
</sql>
<sql id="Base_Column_List_Alias_b">
......@@ -71,8 +84,6 @@
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
......
......@@ -43,7 +43,8 @@
<result column="result_verification" property="resultVerification" />
<result column="performance_archive" property="performanceArchive" />
<association property="appraisal" column="b_id" javaType="cn.timer.api.bean.jxgl.JxglAppraisal" columnPrefix="b_"
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalMapper.BaseResultMap" />
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalMapper.BaseResultMap_My">
</association>
<association property="appraisalAssessment" column="c_id" javaType="cn.timer.api.bean.jxgl.JxglAppraisalAssessment" columnPrefix="c_"
resultMap="cn.timer.api.dao.jxgl.JxglAppraisalAssessmentMapper.BaseResultMap" />
......@@ -185,14 +186,50 @@
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,
c.comprehensive_score c_comprehensive_score,
c.level c_level
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
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND d.sts = 1
WHERE a.org_code = #{param.orgCode} AND b.emp_num = #{param.id} AND c.type = 1
</select>
<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,
c.comprehensive_score c_comprehensive_score,
c.level c_level
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
<where>
AND a.org_code = #{param.orgCode}
AND b.emp_num = #{param.id}
<if test="param.sts != null and param.sts == 0">
AND b.sts = 0
</if>
<if test="param.sts != null and param.sts == 1">
AND b.sts = 1
</if>
<if test="param.sts != null and param.sts == 2">
AND b.sts in (2,3)
</if>
<if test="param.sts != null and param.sts == 3">
AND b.sts = 4
</if>
</where>
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglPerformanceAppraisal">
......
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