Commit 7cfce50e authored by 赵啸非's avatar 赵啸非

修改员工列表和用户列表

parent d8a91550
package com.mortals.xhx.busiz.rsp;
import com.mortals.framework.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
......@@ -14,18 +15,41 @@ public class PerformDetailInfo {
private Long id;
/**
* 标题
* 记录ID
*/
private String title;
private Long recordId;
/**
* 扣分方式(1.系统自动,2.人工添加,3.大厅巡查)
* 员工ID
*/
private Integer subMethod;
private Long staffId;
/**
* 扣分时间
* 员工姓名
*/
private Date errorTime;
private String staffName;
/**
* 工号
*/
private String workNum;
/**
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 所属考勤组ID
*/
private Long attendanceGroupId;
/**
* 所属考勤组名称
*/
private String attendanceGroupName;
/**
* 考勤时间
*/
private Date attendanceDate;
/**
* 绩效规则id
*/
......@@ -42,6 +66,153 @@ public class PerformDetailInfo {
* 扣分或增加分值
*/
private BigDecimal score;
/**
* 上下班时间
*/
private String goOffTimeStr;
/**
* 异常时间
*/
private Date errorTime;
/**
* 实际打卡时间
*/
private Date actualAttendTime;
/**
* 异常处理结果
*/
private String errorResult;
/**
* 核查人员
*/
private String checkPerson;
/**
* 核查时间
*/
private Date checkTime;
/**
* 核查说明
*/
private String checkDesc;
/**
* 核查结果
*/
private String checkResult;
/**
* 处理状态(1.未处理,2.已处理)
*/
private Integer checkStatus;
/**
* 扣分方式(1.系统自动,2.人工添加,3.大厅巡查)
*/
private Integer subMethod;
/**
* 说明
*/
private String remark;
/**
* 附件名称,多个逗号分割
*/
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
private String filePaths;
/**
* 评价结果(1.非常不满意,2.差评)
*/
private Integer reviewResult;
/**
* 评价时间
*/
private Date reviewTime;
/**
* 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)
*/
private String reviewSource;
/**
* 评价设备
*/
private String reviewDevice;
/**
* 投诉标题
*/
private String complainTitle;
/**
* 投诉内容
*/
private String complainContent;
/**
* 投诉人真实姓名
*/
private String complainRealName;
/**
* 联系电话
*/
private String contact;
/**
* 投诉时间
*/
private Date complainTime;
/**
* 投诉来源
*/
private String complainSource;
/**
* 投诉设备
*/
private String complainDevice;
/**
* 办件编码
*/
private String goworkCode;
/**
* 办件所属部门
*/
private String goworkDepts;
/**
* 事项名称
*/
private String matterlName;
/**
* 办理时间
*/
private Date goworkTime;
/**
* 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)
*/
private Integer irregularType;
/**
* 发生时间
*/
private Date happenTime;
/**
* 持续时间,秒
*/
private Integer duration;
/**
* 报警时间
*/
private Date alarmTime;
/**
* 图片凭证地址
*/
private String snapPath;
/**
* 窗口编号
*/
private String windowNum;
/**
* 违规类型(1.工作纪律)
*/
private Integer irregularOtherType;
}
package com.mortals.xhx.busiz.web;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.busiz.req.AppealReq;
import com.mortals.xhx.busiz.req.PerformReq;
......@@ -25,6 +28,9 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
/**
* h5 申诉
*
......@@ -50,8 +56,6 @@ public class AppealApiController extends BaseJsonBodyController {
private CheckOtherRecordService checkOtherRecordService;
/**
* 个人申诉绩效统计
*/
......@@ -59,8 +63,18 @@ public class AppealApiController extends BaseJsonBodyController {
public Rest<AppealStatInfo> appealStat() {
String busiDesc = "H5个人申诉绩效统计";
Rest<AppealStatInfo> rest = Rest.ok(busiDesc + " 【成功】");
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
//todo 查询当前登录人的绩效分数
AppealStatInfo appealStatInfo = new AppealStatInfo();
appealStatInfo.setTotalScore(new BigDecimal("10.52"));
appealStatInfo.setTotalTimes(12);
appealStatInfo.setTodayScore(new BigDecimal("2.5"));
appealStatInfo.setTodayTimes(3);
rest.setData(appealStatInfo);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......
package com.mortals.xhx.busiz.web;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.common.Rest;
......@@ -18,8 +20,7 @@ import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.attendance.model.AttendanceRecordEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery;
import com.mortals.xhx.module.attendance.service.AttendanceRecordService;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.model.CheckAttendRecordQuery;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.service.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
......@@ -72,8 +73,18 @@ public class PerformApiController extends BaseJsonBodyController {
public Rest<PerformStatInfo> performStat() {
String busiDesc = "H5 个人绩效统计";
Rest<PerformStatInfo> rest = Rest.ok(busiDesc + " 【成功】");
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
//todo 查询当前登录人的绩效分数
//todo
PerformStatInfo performStatInfo = new PerformStatInfo();
performStatInfo.setTotalScore(new BigDecimal("15.9"));
performStatInfo.setTotalTimes(12);
performStatInfo.setTodayScore(new BigDecimal("12.6"));
performStatInfo.setTodayTimes(11);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......@@ -96,9 +107,7 @@ public class PerformApiController extends BaseJsonBodyController {
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
String busiDesc = "个人绩效列表";
try {
if (ObjectUtils.isEmpty(performReq.getPerformStartDate())) {
//未设置时间的情况,默认为当月
......@@ -127,19 +136,88 @@ public class PerformApiController extends BaseJsonBodyController {
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
CheckReviewRecordQuery query = new CheckReviewRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
Result<CheckReviewRecordEntity> result = checkReviewRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.评价差评绩效.getValue());
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) {
CheckComplainRecordQuery query = new CheckComplainRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
Result<CheckComplainRecordEntity> result = checkComplainRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.评价投诉绩效.getValue());
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else if (PerformTypeEnum.办件绩效.getValue().equals(performReq.getPerformType())) {
CheckGoworkRecordQuery query = new CheckGoworkRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
Result<CheckGoworkRecordEntity> result = checkGoworkRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.办件绩效.getValue());
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else if (PerformTypeEnum.效能绩效.getValue().equals(performReq.getPerformType())) {
CheckEffectRecordQuery query = new CheckEffectRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
Result<CheckEffectRecordEntity> result = checkEffectRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.效能绩效.getValue());
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else if (PerformTypeEnum.其它绩效.getValue().equals(performReq.getPerformType())) {
CheckOtherRecordQuery query = new CheckOtherRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setStaffId(context.getUser().getCustomerId());
Result<CheckOtherRecordEntity> result = checkOtherRecordService.find(query, pageInfo, context);
List<PerformInfo> collect = result.getList().stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
performInfo.setPerformType(PerformTypeEnum.其它绩效.getValue());
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
} else {
throw new AppException("不支持当前绩效类型");
}
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......@@ -154,6 +232,7 @@ public class PerformApiController extends BaseJsonBodyController {
*/
@PostMapping(value = "info")
public Rest<PerformDetailInfo> performInfo(@RequestBody PerformReq performReq) {
Context context = this.getContext();
String busiDesc = "个人绩效增减详细";
Rest<PerformDetailInfo> rest = Rest.ok(busiDesc + " 【成功】");
try {
......@@ -161,23 +240,30 @@ public class PerformApiController extends BaseJsonBodyController {
throw new AppException("详细查询id不能为空!");
}
//todo 查询全部扣分绩效详细
PerformDetailInfo performDetailInfo = new PerformDetailInfo();
if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) {
CheckComplainRecordEntity checkEntity = checkComplainRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.办件绩效.getValue().equals(performReq.getPerformType())) {
CheckGoworkRecordEntity checkEntity = checkGoworkRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.效能绩效.getValue().equals(performReq.getPerformType())) {
CheckEffectRecordEntity checkEntity = checkEffectRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.其它绩效.getValue().equals(performReq.getPerformType())) {
CheckOtherRecordEntity checkEntity = checkOtherRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else {
throw new AppException("不支持当前绩效类型");
}
rest.setData(performDetailInfo);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......
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