Commit 00453272 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 2c58898c be378e1d
......@@ -11,7 +11,7 @@ import lombok.Data;
* 部门绩效分数统计实体对象
*
* @author zxfei
* @date 2023-07-11
* @date 2023-07-14
*/
@Data
public class DeptPerformStatEntity extends DeptPerformStatVo {
......@@ -31,6 +31,16 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
@Excel(name = "部门绩效总分数")
private BigDecimal totalScore;
/**
* 部门绩效加分总分数汇总
*/
@Excel(name = "部门绩效加分总分数汇总")
private BigDecimal totalAddScore;
/**
* 部门绩效减分总分数汇总
*/
@Excel(name = "部门绩效减分总分数汇总")
private BigDecimal totalSubScore;
/**
* 考勤绩效指标增加分数
*/
private BigDecimal attendScoreAdd;
......@@ -41,19 +51,27 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
/**
* 评价绩效指标增加分数
*/
private BigDecimal assessScoreAdd;
private BigDecimal reviewScoreAdd;
/**
* 评价绩效指标扣减分数
*/
private BigDecimal assessScoreSub;
private BigDecimal reviewScoreSub;
/**
* 投诉绩效指标增加分数
*/
private BigDecimal complainScoreAdd;
/**
* 投诉绩效指标扣减分数
*/
private BigDecimal complainScoreSub;
/**
* 办件绩效指标增加分数
*/
private BigDecimal workScoreAdd;
private BigDecimal goworkScoreAdd;
/**
* 办件绩效指标扣减分数
*/
private BigDecimal workScoreSub;
private BigDecimal goworkScoreSub;
/**
* 效能绩效指标增加分数
*/
......@@ -71,6 +89,11 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
*/
private BigDecimal otherScoreSub;
/**
* 部门绩效平均分数,根据部门所属人数平均
*/
@Excel(name = "部门绩效平均分数,根据部门所属人数平均")
private BigDecimal averageScore;
/**
* 备注
*/
private String remark;
......@@ -86,29 +109,6 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
* 日
*/
private Integer day;
/**
* 部门绩效加分总分数汇总
*/
@Excel(name = "部门绩效加分总分数汇总")
private BigDecimal totalAddScore;
/**
* 部门绩效减分总分数汇总
*/
@Excel(name = "部门绩效减分总分数汇总")
private BigDecimal totalSubScore;
/**
* 投诉绩效指标增加分数
*/
private BigDecimal complainScoreAdd;
/**
* 投诉绩效指标扣减分数
*/
private BigDecimal complainScoreSub;
/**
* 部门绩效平均分数,根据部门所属人数平均
*/
@Excel(name = "部门绩效平均分数,根据部门所属人数平均")
private BigDecimal averageScore;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -133,17 +133,25 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
this.totalScore = new BigDecimal(0);
this.totalAddScore = new BigDecimal(0);
this.totalSubScore = new BigDecimal(0);
this.attendScoreAdd = new BigDecimal(0);
this.attendScoreSub = new BigDecimal(0);
this.assessScoreAdd = new BigDecimal(0);
this.reviewScoreAdd = new BigDecimal(0);
this.assessScoreSub = new BigDecimal(0);
this.reviewScoreSub = new BigDecimal(0);
this.workScoreAdd = new BigDecimal(0);
this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0);
this.goworkScoreAdd = new BigDecimal(0);
this.workScoreSub = new BigDecimal(0);
this.goworkScoreSub = new BigDecimal(0);
this.effectScoreAdd = new BigDecimal(0);
......@@ -153,6 +161,8 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
this.otherScoreSub = new BigDecimal(0);
this.averageScore = new BigDecimal(0);
this.remark = "";
this.year = -1;
......@@ -160,15 +170,5 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
this.month = -1;
this.day = -1;
this.totalAddScore = new BigDecimal(0);
this.totalSubScore = new BigDecimal(0);
this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0);
this.averageScore = new BigDecimal(0);
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ import java.util.Date;
* 部门绩效分数统计视图对象
*
* @author zxfei
* @date 2023-07-11
* @date 2023-07-14
*/
@Data
public class DeptPerformStatVo extends BaseEntityLong {
......
......@@ -41,6 +41,7 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform
private PerformRulesCategoryService performRulesCategoryService;
@Override
protected void saveBefore(PerformStaffConfEntity entity, Context context) throws AppException {
super.saveBefore(entity,context);
......
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.EnableEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -37,6 +42,8 @@ public class PerformDeptConfController extends BaseCRUDJsonBodyMappingController
@Autowired
private ParamService paramService;
@Autowired
private UserService userService;
public PerformDeptConfController(){
super.setModuleDesc( "部门自动考核信息");
......@@ -46,8 +53,20 @@ public class PerformDeptConfController extends BaseCRUDJsonBodyMappingController
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", CheckTypeEnum.getEnumMap());
this.addDict(model, "enable", EnableEnum.getEnumMap());
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "updateUserId", collect);
super.init(model, context);
}
@Override
protected void doListBefore(PerformDeptConfEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.EnableEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.perform.model.PerformStaffConfEntity;
import com.mortals.xhx.module.perform.service.PerformStaffConfService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 人员自动考核信息
*
* @author zxfei
* @date 2023-05-16
*/
* 人员自动考核信息
*
* @author zxfei
* @date 2023-05-16
*/
@RestController
@RequestMapping("perform/staff/conf")
public class PerformStaffConfController extends BaseCRUDJsonBodyMappingController<PerformStaffConfService,PerformStaffConfEntity,Long> {
public class PerformStaffConfController extends BaseCRUDJsonBodyMappingController<PerformStaffConfService, PerformStaffConfEntity, Long> {
@Autowired
private ParamService paramService;
@Autowired
private UserService userService;
public PerformStaffConfController(){
super.setModuleDesc( "人员自动考核信息");
public PerformStaffConfController() {
super.setModuleDesc("人员自动考核信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", CheckTypeEnum.getEnumMap());
this.addDict(model, "enable", EnableEnum.getEnumMap());
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "updateUserId", collect);
super.init(model, context);
}
@Override
protected void doListBefore(PerformStaffConfEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
}
\ No newline at end of file
package com.mortals.xhx.module.staff.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.vo.StaffPerformStatVo;
import lombok.Data;
/**
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-13
*/
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-14
*/
@Data
public class StaffPerformStatEntity extends StaffPerformStatVo {
private static final long serialVersionUID = 1L;
......@@ -56,11 +51,11 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
/**
* 评价绩效指标增加分数
*/
private BigDecimal assessScoreAdd;
private BigDecimal reviewScoreAdd;
/**
* 评价绩效指标扣减分数
*/
private BigDecimal assessScoreSub;
private BigDecimal reviewScoreSub;
/**
* 投诉绩效指标增加分数
*/
......@@ -72,11 +67,11 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
/**
* 办件绩效指标增加分数
*/
private BigDecimal workScoreAdd;
private BigDecimal goworkScoreAdd;
/**
* 办件绩效指标扣减分数
*/
private BigDecimal workScoreSub;
private BigDecimal goworkScoreSub;
/**
* 效能绩效指标增加分数
*/
......@@ -109,12 +104,10 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
* 日
*/
private Integer day;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
......@@ -127,7 +120,7 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
return false;
}
public void initAttrValue() {
public void initAttrValue(){
this.staffId = 0L;
......@@ -143,17 +136,17 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
this.attendScoreSub = new BigDecimal(0);
this.assessScoreAdd = new BigDecimal(0);
this.reviewScoreAdd = new BigDecimal(0);
this.assessScoreSub = new BigDecimal(0);
this.reviewScoreSub = new BigDecimal(0);
this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0);
this.workScoreAdd = new BigDecimal(0);
this.goworkScoreAdd = new BigDecimal(0);
this.workScoreSub = new BigDecimal(0);
this.goworkScoreSub = new BigDecimal(0);
this.effectScoreAdd = new BigDecimal(0);
......@@ -165,10 +158,10 @@ public class StaffPerformStatEntity extends StaffPerformStatVo {
this.remark = "";
this.year = DateUtil.year(new Date());
this.year = -1;
this.month = DateUtil.month(new Date()) + 1;
this.month = -1;
this.day = DateUtil.dayOfMonth(new Date());
this.day = -1;
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ import lombok.Data;
* 员工绩效统计实体对象
*
* @author zxfei
* @date 2023-07-05
* @date 2023-07-14
*/
@Data
public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
......@@ -44,11 +44,15 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/**
* 评价绩效指标分数
*/
private BigDecimal assessScore;
private BigDecimal reviewScore;
/**
* 投诉绩效指标分数
*/
private BigDecimal complainScore;
/**
* 办件绩效分数
*/
private BigDecimal workScore;
private BigDecimal goworkScore;
/**
* 效能绩效分数
*/
......@@ -107,9 +111,11 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
this.attendScore = new BigDecimal(0);
this.assessScore = new BigDecimal(0);
this.reviewScore = new BigDecimal(0);
this.complainScore = new BigDecimal(0);
this.workScore = new BigDecimal(0);
this.goworkScore = new BigDecimal(0);
this.effectScore = new BigDecimal(0);
......
......@@ -11,7 +11,7 @@ import java.util.Date;
* 员工绩效统计视图对象
*
* @author zxfei
* @date 2023-07-11
* @date 2023-07-14
*/
@Data
public class StaffPerformStatVo extends BaseEntityLong {
......
......@@ -11,7 +11,7 @@ import java.util.Date;
* 员工绩效统计视图对象
*
* @author zxfei
* @date 2023-07-05
* @date 2023-07-14
*/
@Data
public class StaffPerformSummaryVo extends BaseEntityLong {
......
......@@ -540,3 +540,104 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
-- ----------------------------
2023-7-14
-- ----------------------------
-- ----------------------------
-- 部门绩效分数统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_dept_perform_stat`;
CREATE TABLE mortals_xhx_dept_perform_stat(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`deptId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`deptName` varchar(64) COMMENT '部门名称',
`totalScore` decimal(10,2) NOT NULL COMMENT '部门绩效总分数',
`totalAddScore` decimal(10,2) NOT NULL COMMENT '部门绩效加分总分数汇总',
`totalSubScore` decimal(10,2) NOT NULL COMMENT '部门绩效减分总分数汇总',
`attendScoreAdd` decimal(10,2) COMMENT '考勤绩效指标增加分数',
`attendScoreSub` decimal(10,2) COMMENT '考勤绩效指标扣减分数',
`reviewScoreAdd` decimal(10,2) COMMENT '评价绩效指标增加分数',
`reviewScoreSub` decimal(10,2) COMMENT '评价绩效指标扣减分数',
`complainScoreAdd` decimal(10,2) COMMENT '投诉绩效指标增加分数',
`complainScoreSub` decimal(10,2) COMMENT '投诉绩效指标扣减分数',
`goworkScoreAdd` decimal(10,2) COMMENT '办件绩效指标增加分数',
`goworkScoreSub` decimal(10,2) COMMENT '办件绩效指标扣减分数',
`effectScoreAdd` decimal(10,2) COMMENT '效能绩效指标增加分数',
`effectScoreSub` decimal(10,2) COMMENT '效能绩效指标扣减分数',
`otherScoreAdd` decimal(10,2) COMMENT '其它绩效指标增加分数',
`otherScoreSub` decimal(10,2) COMMENT '其它绩效指标扣减分数',
`averageScore` decimal(10,2) NOT NULL COMMENT '部门绩效平均分数,根据部门所属人数平均',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`day` tinyint(2) NOT NULL COMMENT '日',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='部门绩效分数统计';
-- ----------------------------
-- 员工绩效统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_staff_perform_stat`;
CREATE TABLE mortals_xhx_staff_perform_stat(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`staffId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`staffName` varchar(64) COMMENT '部门名称',
`totalScore` decimal(10,2) NOT NULL COMMENT '员工绩效总分数',
`totalAddScore` decimal(10,2) NOT NULL COMMENT '员工绩效加分总分数汇总',
`totalSubScore` decimal(10,2) NOT NULL COMMENT '员工绩效减分总分数汇总',
`attendScoreAdd` decimal(10,2) COMMENT '考勤绩效指标增加分数',
`attendScoreSub` decimal(10,2) COMMENT '考勤绩效指标扣减分数',
`reviewScoreAdd` decimal(10,2) COMMENT '评价绩效指标增加分数',
`reviewScoreSub` decimal(10,2) COMMENT '评价绩效指标扣减分数',
`complainScoreAdd` decimal(10,2) COMMENT '投诉绩效指标增加分数',
`complainScoreSub` decimal(10,2) COMMENT '投诉绩效指标扣减分数',
`goworkScoreAdd` decimal(10,2) COMMENT '办件绩效指标增加分数',
`goworkScoreSub` decimal(10,2) COMMENT '办件绩效指标扣减分数',
`effectScoreAdd` decimal(10,2) COMMENT '效能绩效指标增加分数',
`effectScoreSub` decimal(10,2) COMMENT '效能绩效指标扣减分数',
`otherScoreAdd` decimal(10,2) COMMENT '其它绩效指标增加分数',
`otherScoreSub` decimal(10,2) COMMENT '其它绩效指标扣减分数',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`day` tinyint(2) NOT NULL COMMENT '日',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
-- ----------------------------
-- 员工绩效统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_staff_perform_summary`;
CREATE TABLE mortals_xhx_staff_perform_summary(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`staffId` bigint(20) DEFAULT '0' COMMENT '人员id',
`workNum` varchar(64) COMMENT '工号',
`staffName` varchar(512) COMMENT '人员名称',
`deptId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`deptName` varchar(64) COMMENT '部门名称',
`attendScore` decimal(10,2) COMMENT '考勤绩效指标分数',
`reviewScore` decimal(10,2) COMMENT '评价绩效指标分数',
`complainScore` decimal(10,2) COMMENT '投诉绩效指标分数',
`goworkScore` decimal(10,2) COMMENT '办件绩效分数',
`effectScore` decimal(10,2) COMMENT '效能绩效分数',
`otherScore` decimal(10,2) COMMENT '其它绩效分数',
`errorScore` decimal(10,2) COMMENT '累计异常分数',
`totalScore` decimal(10,2) COMMENT '当月得分数',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
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