Commit bfde41a9 authored by 赵啸非's avatar 赵啸非

考勤异常添加绩效考核

parent 79da5d5f
......@@ -304,13 +304,4 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
}
@RequestMapping("parseToken")
public IUser parseToken() throws Exception {
IUser userEntity = authTokenService.getLoginUser(request);
if (!ObjectUtils.isEmpty(userEntity)) {
authTokenService.verifyToken(userEntity);
return userEntity;
}
return null;
}
}
......@@ -3,6 +3,7 @@ package com.mortals.xhx.module.attendance.service.impl;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.util.DataUtil;
import com.mortals.xhx.busiz.h5.req.AttendSaveReq;
import com.mortals.xhx.busiz.h5.web.ApiWebPerformController;
import com.mortals.xhx.common.code.ErrorStatusEnum;
......@@ -81,7 +82,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
if (YesNoEnum.YES.getValue() == entity.getProcessStatus()) {
//判断后打绩效
String ruleCode = "";
if (ErrorStatusEnum.早退.getValue() == entity.getErrorStatus()) {
if (ErrorStatusEnum.早退.getValue() == DataUtil.converStr2Int(entity.getProcessResult(), 3)) {
if (ObjectUtils.isEmpty(entity.getErrorDateTime()) || ObjectUtils.isEmpty(entity.getGoOffDateTime())) {
//早退5分钟内
ruleCode = "ATTEND1002";
}
if (!ObjectUtils.isEmpty(entity.getErrorDateTime()) && !ObjectUtils.isEmpty(entity.getGoOffDateTime())) {
//判断时间差定义
Long earlyMin = DateUtil.between(entity.getErrorDateTime(), entity.getGoOffDateTime(), DateUnit.MINUTE);
......@@ -97,7 +104,13 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
//早退5分钟内
ruleCode = "ATTEND1006";
}
} else if (ErrorStatusEnum.迟到.getValue() == entity.getErrorStatus()) {
}
} else if (ErrorStatusEnum.迟到.getValue() == DataUtil.converStr2Int(entity.getProcessResult(), 3)) {
if (ObjectUtils.isEmpty(entity.getErrorDateTime()) || ObjectUtils.isEmpty(entity.getGoOffDateTime())) {
//早退5分钟内
ruleCode = "ATTEND1001";
}
if (!ObjectUtils.isEmpty(entity.getErrorDateTime()) && !ObjectUtils.isEmpty(entity.getGoOffDateTime())) {
Long lateMin = DateUtil.between(entity.getErrorDateTime(), entity.getGoOffDateTime(), DateUnit.MINUTE);
if (lateMin >= 0L && lateMin < 5L) {
......@@ -112,8 +125,8 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
//迟到60分钟以上
ruleCode = "ATTEND1005";
}
} else if (ErrorStatusEnum.缺卡.getValue() == entity.getErrorStatus()) {
}
} else if (ErrorStatusEnum.缺卡.getValue() == DataUtil.converStr2Int(entity.getProcessResult(), 3)) {
ruleCode = "ATTEND1007";
}
if (!ObjectUtils.isEmpty(ruleCode)) {
......@@ -130,7 +143,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
attendSaveReq.setHappenTime(entity.getErrorDateTime());
attendSaveReq.setRuleCode(ruleCode);
attendSaveReq.setStaffId(entity.getStaffId());
attendRecordService.saveAttend(attendSaveReq,context);
attendRecordService.saveAttend(attendSaveReq, context);
}
}
}
......
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