From 43aab58c9ecb1203770ba382efbdbae299ca87ec Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 26 十月 2026 15:12:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_business' into dev_business
---
yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/HrmAttendanceRecordServiceImpl.java | 340 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 183 insertions(+), 157 deletions(-)
diff --git a/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/HrmAttendanceRecordServiceImpl.java b/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/HrmAttendanceRecordServiceImpl.java
index a2d41f8..92f745d 100644
--- a/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/HrmAttendanceRecordServiceImpl.java
+++ b/yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/HrmAttendanceRecordServiceImpl.java
@@ -1,11 +1,12 @@
package cn.iocoder.yudao.module.hrm.service.attendance;
-import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceClockReqVO;
import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceMyStatusRespVO;
import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceRecordPageReqVO;
+import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceRecordRespVO;
+import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceRuleRespVO;
+import cn.iocoder.yudao.module.hrm.dal.dataobject.attendance.HrmAttendanceHolidayDO;
import cn.iocoder.yudao.module.hrm.dal.dataobject.attendance.HrmAttendanceRecordDO;
import cn.iocoder.yudao.module.hrm.dal.dataobject.attendance.HrmAttendanceRuleDO;
import cn.iocoder.yudao.module.hrm.dal.dataobject.attendance.HrmAttendanceExceptionDO;
@@ -14,7 +15,10 @@
import cn.iocoder.yudao.module.hrm.enums.HrmAttendanceClockTypeEnum;
import cn.iocoder.yudao.module.hrm.enums.HrmAttendanceDataSourceEnum;
import cn.iocoder.yudao.module.hrm.enums.HrmAttendanceExceptionTypeEnum;
+import cn.iocoder.yudao.module.hrm.enums.HrmAttendanceHolidayTypeEnum;
import cn.iocoder.yudao.module.hrm.service.employee.HrmEmployeeService;
+import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -22,6 +26,7 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
+import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
@@ -48,6 +53,8 @@
private HrmAttendanceRuleService attendanceRuleService;
@Resource
private HrmAttendanceHolidayService attendanceHolidayService;
+ @Resource
+ private DeptApi deptApi;
@Override
public PageResult<HrmAttendanceRecordDO> getAttendanceRecordPage(HrmAttendanceRecordPageReqVO pageReqVO) {
@@ -67,6 +74,162 @@
@Override
public HrmAttendanceRecordDO getAttendanceRecordByUserIdAndDate(Long userId, LocalDate date) {
return attendanceRecordMapper.selectByUserIdAndDate(userId, date);
+ }
+
+ @Override
+ public HrmAttendanceMyStatusRespVO getMyStatus(Long loginUserId, LocalDate date) {
+ LocalDate queryDate = date != null ? date : LocalDate.now();
+ // 1. 鐧诲綍鐢ㄦ埛 -> 鍛樺伐妗f
+ HrmEmployeeDO employee = employeeService.getEmployeeByUserId(loginUserId);
+ if (employee == null) {
+ throw exception(EMPLOYEE_NOT_EXISTS,
+ "褰撳墠鐧诲綍璐﹀彿鏈叧鑱斿憳宸ユ。妗堬紝鏃犳硶鎵撳崱銆傝鑱旂郴绠$悊鍛樺湪銆愬憳宸ョ鐞嗐�戜腑灏嗚鐧诲綍璐﹀彿缁戝畾鍒板憳宸ャ��");
+ }
+ HrmAttendanceMyStatusRespVO respVO = new HrmAttendanceMyStatusRespVO();
+ respVO.setUserId(loginUserId);
+ respVO.setEmployeeId(employee.getId());
+ respVO.setEmployeeName(employee.getName());
+ respVO.setDeptId(employee.getDeptId());
+ if (employee.getDeptId() != null) {
+ DeptRespDTO dept = deptApi.getDept(employee.getDeptId());
+ if (dept != null) {
+ respVO.setDeptName(dept.getName());
+ }
+ }
+ respVO.setDate(queryDate);
+ respVO.setServerTime(LocalDateTime.now());
+
+ // 2. 鏄惁宸ヤ綔鏃� + 浼戞伅鍘熷洜
+ boolean workDay = attendanceHolidayService.isWorkDay(queryDate);
+ respVO.setWorkDay(workDay);
+ if (!workDay) {
+ respVO.setRestDayReason(getRestDayReason(queryDate));
+ }
+
+ // 3. 褰撳墠鐢熸晥瑙勫垯锛堥儴闂ㄨ鍒欎紭鍏堬紝鍏舵鍏ㄥ眬瑙勫垯锛�
+ HrmAttendanceRuleDO rule = attendanceRuleService.getAttendanceRuleByDeptId(employee.getDeptId());
+ if (rule != null) {
+ HrmAttendanceRuleRespVO ruleRespVO = BeanUtils.toBean(rule, HrmAttendanceRuleRespVO.class);
+ if (rule.getDeptId() != null) {
+ DeptRespDTO ruleDept = deptApi.getDept(rule.getDeptId());
+ if (ruleDept != null) {
+ ruleRespVO.setDeptName(ruleDept.getName());
+ }
+ }
+ respVO.setRule(ruleRespVO);
+ }
+
+ // 4. 褰撴棩鑰冨嫟璁板綍
+ HrmAttendanceRecordDO record = attendanceRecordMapper.selectByUserIdAndDate(employee.getId(), queryDate);
+ if (record != null) {
+ respVO.setRecord(buildRecordRespVO(record, employee));
+ }
+
+ // 5. 褰撳墠鍙墦鍗$姸鎬�
+ respVO.setClockable(buildClockable(workDay, rule, record, queryDate));
+ return respVO;
+ }
+
+ /**
+ * 浼戞伅鏃ュ師鍥狅細浼樺厛鍙栬妭鍋囨棩閰嶇疆鍚嶇О锛屾湭閰嶇疆鏃舵寜鏄熸湡缁欏嚭鈥滃懆鍏�/鍛ㄦ棩鈥�
+ */
+ private String getRestDayReason(LocalDate date) {
+ List<HrmAttendanceHolidayDO> holidays = attendanceHolidayService.getAttendanceHolidayListByDateRange(date, date);
+ for (HrmAttendanceHolidayDO holiday : holidays) {
+ if (HrmAttendanceHolidayTypeEnum.REST_DAY.getType().equals(holiday.getType())) {
+ return holiday.getName();
+ }
+ }
+ DayOfWeek dayOfWeek = date.getDayOfWeek();
+ if (dayOfWeek == DayOfWeek.SATURDAY) {
+ return "鍛ㄥ叚";
+ }
+ if (dayOfWeek == DayOfWeek.SUNDAY) {
+ return "鍛ㄦ棩";
+ }
+ return null;
+ }
+
+ /**
+ * 鏋勫缓鎵撳崱璁板綍杩斿洖 VO锛岃ˉ榻愭墦鍗$被鍨嬪悕绉般�佸憳宸ヤ笌閮ㄩ棬淇℃伅
+ */
+ private HrmAttendanceRecordRespVO buildRecordRespVO(HrmAttendanceRecordDO record, HrmEmployeeDO employee) {
+ HrmAttendanceRecordRespVO recordRespVO = BeanUtils.toBean(record, HrmAttendanceRecordRespVO.class);
+ recordRespVO.setClockInTypeName(HrmAttendanceClockTypeEnum.getNameByType(record.getClockInType()));
+ recordRespVO.setClockOutTypeName(HrmAttendanceClockTypeEnum.getNameByType(record.getClockOutType()));
+ if (employee != null) {
+ recordRespVO.setUserName(employee.getName());
+ recordRespVO.setPhone(employee.getPhone());
+ }
+ if (record.getDeptId() != null) {
+ DeptRespDTO dept = deptApi.getDept(record.getDeptId());
+ if (dept != null) {
+ recordRespVO.setDeptName(dept.getName());
+ }
+ }
+ return recordRespVO;
+ }
+
+ /**
+ * 鏍规嵁宸ヤ綔鏃ャ�佽�冨嫟瑙勫垯涓庡綋鏃ヨ褰曡绠楀彲鎵撳崱鐘舵��
+ */
+ private HrmAttendanceMyStatusRespVO.Clockable buildClockable(boolean workDay, HrmAttendanceRuleDO rule,
+ HrmAttendanceRecordDO record, LocalDate date) {
+ HrmAttendanceMyStatusRespVO.Clockable clockable = new HrmAttendanceMyStatusRespVO.Clockable();
+ if (!workDay) {
+ clockable.setClockIn(false);
+ clockable.setClockOut(false);
+ clockable.setNextAction("none");
+ clockable.setMessage("浠婃棩浼戞伅锛屾棤闇�鎵撳崱");
+ return clockable;
+ }
+ if (rule == null) {
+ clockable.setClockIn(false);
+ clockable.setClockOut(false);
+ clockable.setNextAction("none");
+ clockable.setMessage("鏈厤缃�冨嫟瑙勫垯锛岃鑱旂郴绠$悊鍛�");
+ return clockable;
+ }
+ // 鍙湁涓嬬彮鍗°�佹病鏈変笂鐝崱锛氬綋鏃ュ凡缁撴潫锛屼笉鍐嶅厑璁哥户缁墦鍗�
+ if (record != null && record.getClockInTime() == null && record.getClockOutTime() != null) {
+ clockable.setClockIn(false);
+ clockable.setClockOut(false);
+ clockable.setNextAction("none");
+ clockable.setMessage("浠婃棩缂轰笂鐝崱锛屽凡瀹屾垚涓嬬彮鎵撳崱");
+ return clockable;
+ }
+ // 浠婂ぉ杩樻病鎵撲笂鐝崱
+ if (record == null || record.getClockInTime() == null) {
+ clockable.setClockIn(true);
+ clockable.setClockOut(false);
+ clockable.setNextAction("in");
+ clockable.setMessage("鍙笂鐝墦鍗�");
+ // 浠呭綋澶╂煡璇㈡椂鎻愮ず宸茶繜鍒版椂闀�
+ LocalDateTime now = LocalDateTime.now();
+ if (rule.getWorkStartTime() != null && date.equals(now.toLocalDate())) {
+ LocalDateTime workStart = LocalDateTime.of(date, rule.getWorkStartTime());
+ int lateAllowMinutes = rule.getLateAllowMinutes() != null ? rule.getLateAllowMinutes() : 0;
+ if (now.isAfter(workStart.plusMinutes(lateAllowMinutes))) {
+ long lateMinutes = Duration.between(workStart, now).toMinutes();
+ clockable.setMessage("宸茶秴杩囦笂鐝椂闂� " + lateMinutes + " 鍒嗛挓");
+ }
+ }
+ return clockable;
+ }
+ // 宸叉墦涓婄彮鍗°�佹湭鎵撲笅鐝崱
+ if (record.getClockOutTime() == null) {
+ clockable.setClockIn(false);
+ clockable.setClockOut(true);
+ clockable.setNextAction("out");
+ clockable.setMessage("宸蹭笂鐝墦鍗★紝鍙笅鐝墦鍗�");
+ return clockable;
+ }
+ // 涓婁笅鐝崱閮藉凡鎵�
+ clockable.setClockIn(false);
+ clockable.setClockOut(false);
+ clockable.setNextAction("none");
+ clockable.setMessage("浠婃棩宸插畬鎴愭墦鍗�");
+ return clockable;
}
@Override
@@ -151,8 +314,7 @@
@Override
@Transactional(rollbackFor = Exception.class)
- public HrmAttendanceClockResult clockIn(Long userId, LocalDateTime clockTime,
- HrmAttendanceClockReqVO reqVO, String legacyLocation) {
+ public HrmAttendanceRecordDO clockIn(Long userId, LocalDateTime clockTime, String location) {
LocalDate clockDate = clockTime.toLocalDate();
// 1. 鏍¢獙鏄惁宸ヤ綔鏃�
if (!attendanceHolidayService.isWorkDay(clockDate)) {
@@ -172,8 +334,6 @@
if (record != null && record.getClockInTime() != null) {
throw exception(ATTENDANCE_CLOCK_ALREADY_CLOCKED);
}
- // 鍦ㄤ换浣曞啓搴撴搷浣滃墠瀹屾垚瀹氫綅鏍¢獙锛屾棫鐗堝湴鐐瑰瓧绗︿覆涓嶈兘缁曡繃鑼冨洿闄愬埗銆�
- ClockLocation clockLocation = validateClockLocation(rule, reqVO);
// 4. 鍒ゆ柇鎵撳崱绫诲瀷
LocalTime workStartTime = rule.getWorkStartTime();
int lateAllowMinutes = rule.getLateAllowMinutes() != null ? rule.getLateAllowMinutes() : 0;
@@ -190,24 +350,24 @@
.date(clockDate)
.clockInTime(clockTime)
.clockInType(clockInType)
+ .location(location)
.dataSource(HrmAttendanceDataSourceEnum.CLOCK.getType())
.build();
- applyClockLocation(record, rule, clockLocation, legacyLocation, true);
attendanceRecordMapper.insert(record);
} else {
record.setClockInTime(clockTime);
record.setClockInType(clockInType);
- applyClockLocation(record, rule, clockLocation, legacyLocation, true);
+ if (location != null) {
+ record.setLocation(location);
+ }
attendanceRecordMapper.updateById(record);
}
- return new HrmAttendanceClockResult(record, rule,
- clockLocation != null ? clockLocation.distanceMeters() : null);
+ return record;
}
@Override
@Transactional(rollbackFor = Exception.class)
- public HrmAttendanceClockResult clockOut(Long userId, LocalDateTime clockTime,
- HrmAttendanceClockReqVO reqVO, String legacyLocation) {
+ public HrmAttendanceRecordDO clockOut(Long userId, LocalDateTime clockTime, String location) {
LocalDate clockDate = clockTime.toLocalDate();
// 1. 鏍¢獙鏄惁宸ヤ綔鏃�
if (!attendanceHolidayService.isWorkDay(clockDate)) {
@@ -224,11 +384,8 @@
}
// 3. 鏌ヨ褰撴棩鑰冨嫟璁板綍
HrmAttendanceRecordDO record = attendanceRecordMapper.selectByUserIdAndDate(userId, clockDate);
- if (record != null && record.getClockOutTime() != null) {
- throw exception(ATTENDANCE_CLOCK_ALREADY_CLOCKED);
- }
- ClockLocation clockLocation = validateClockLocation(rule, reqVO);
if (record == null) {
+ // 濡傛灉娌℃湁涓婄彮鎵撳崱璁板綍锛屽垱寤轰竴鏉$己鍗$殑璁板綍
record = HrmAttendanceRecordDO.builder()
.userId(userId)
.deptId(employee.getDeptId())
@@ -236,6 +393,10 @@
.clockInType(HrmAttendanceClockTypeEnum.MISSING.getType())
.dataSource(HrmAttendanceDataSourceEnum.CLOCK.getType())
.build();
+ attendanceRecordMapper.insert(record);
+ }
+ if (record.getClockOutTime() != null) {
+ throw exception(ATTENDANCE_CLOCK_ALREADY_CLOCKED);
}
// 4. 鍒ゆ柇鎵撳崱绫诲瀷
LocalTime workEndTime = rule.getWorkEndTime();
@@ -248,7 +409,9 @@
// 5. 鏇存柊鑰冨嫟璁板綍
record.setClockOutTime(clockTime);
record.setClockOutType(clockOutType);
- applyClockLocation(record, rule, clockLocation, legacyLocation, false);
+ if (location != null) {
+ record.setLocation(location);
+ }
// 6. 璁$畻宸ヤ綔鏃堕暱
if (record.getClockInTime() != null) {
Duration duration = Duration.between(record.getClockInTime(), clockTime);
@@ -256,145 +419,8 @@
.divide(BigDecimal.valueOf(60), 2, RoundingMode.HALF_UP);
record.setWorkHours(workHours);
}
- if (record.getId() == null) {
- attendanceRecordMapper.insert(record);
- } else {
- attendanceRecordMapper.updateById(record);
- }
- return new HrmAttendanceClockResult(record, rule,
- clockLocation != null ? clockLocation.distanceMeters() : null);
- }
-
- record ClockLocation(BigDecimal longitude, BigDecimal latitude, BigDecimal accuracy,
- BigDecimal distanceMeters) { }
-
- ClockLocation validateClockLocation(HrmAttendanceRuleDO rule, HrmAttendanceClockReqVO reqVO) {
- boolean required = Boolean.TRUE.equals(rule.getLocationRequired());
- if (required && (StrUtil.isBlank(rule.getLocationName()) || rule.getLongitude() == null
- || rule.getLatitude() == null || rule.getRadiusMeters() == null
- || rule.getRadiusMeters() < 10 || rule.getRadiusMeters() > 5000
- || !"WGS84".equalsIgnoreCase(rule.getCoordinateSystem()))) {
- throw exception(ATTENDANCE_LOCATION_RULE_INVALID);
- }
- if (reqVO == null || reqVO.getLongitude() == null || reqVO.getLatitude() == null
- || reqVO.getAccuracy() == null || StrUtil.isBlank(reqVO.getCoordinateSystem())) {
- if (required) throw exception(ATTENDANCE_LOCATION_REQUIRED);
- return null;
- }
- boolean coordinatesValid = reqVO.getLongitude().compareTo(BigDecimal.valueOf(-180)) >= 0
- && reqVO.getLongitude().compareTo(BigDecimal.valueOf(180)) <= 0
- && reqVO.getLatitude().compareTo(BigDecimal.valueOf(-90)) >= 0
- && reqVO.getLatitude().compareTo(BigDecimal.valueOf(90)) <= 0;
- if (!coordinatesValid) {
- if (required) throw exception(ATTENDANCE_LOCATION_COORDINATE_INVALID);
- return null;
- }
- if (reqVO.getAccuracy().signum() <= 0
- || reqVO.getAccuracy().compareTo(BigDecimal.valueOf(100)) > 0) {
- if (required) throw exception(ATTENDANCE_LOCATION_ACCURACY_INVALID);
- return null;
- }
- if (!"WGS84".equalsIgnoreCase(reqVO.getCoordinateSystem().trim())) {
- if (required) throw exception(ATTENDANCE_LOCATION_SYSTEM_INVALID);
- return null;
- }
- if (!required) {
- return new ClockLocation(reqVO.getLongitude(), reqVO.getLatitude(), reqVO.getAccuracy(), null);
- }
- double rawDistance = haversineMeters(rule.getLongitude().doubleValue(), rule.getLatitude().doubleValue(),
- reqVO.getLongitude().doubleValue(), reqVO.getLatitude().doubleValue());
- BigDecimal roundedDistance = BigDecimal.valueOf(rawDistance).setScale(2, RoundingMode.HALF_UP);
- if (rawDistance > rule.getRadiusMeters()) {
- throw exception(ATTENDANCE_LOCATION_OUT_OF_RANGE, rule.getLocationName(),
- roundedDistance.toPlainString(), rule.getRadiusMeters());
- }
- return new ClockLocation(reqVO.getLongitude(), reqVO.getLatitude(), reqVO.getAccuracy(), roundedDistance);
- }
-
- static double haversineMeters(double lon1, double lat1, double lon2, double lat2) {
- double latDelta = Math.toRadians(lat2 - lat1);
- double lonDelta = Math.toRadians(lon2 - lon1);
- double a = Math.pow(Math.sin(latDelta / 2), 2)
- + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))
- * Math.pow(Math.sin(lonDelta / 2), 2);
- double bounded = Math.max(0D, Math.min(1D, a));
- return 6_371_000D * 2D * Math.atan2(Math.sqrt(bounded), Math.sqrt(1D - bounded));
- }
-
- private void applyClockLocation(HrmAttendanceRecordDO record, HrmAttendanceRuleDO rule,
- ClockLocation location, String legacyLocation, boolean clockIn) {
- if (StrUtil.isNotBlank(rule.getLocationName())) {
- record.setLocation(rule.getLocationName());
- } else if (!Boolean.TRUE.equals(rule.getLocationRequired()) && StrUtil.isNotBlank(legacyLocation)) {
- record.setLocation(legacyLocation);
- }
- if (location == null) return;
- if (clockIn) {
- record.setClockInLongitude(location.longitude());
- record.setClockInLatitude(location.latitude());
- record.setClockInAccuracy(location.accuracy());
- record.setClockInDistance(location.distanceMeters());
- record.setClockInAddress(rule.getLocationAddress());
- } else {
- record.setClockOutLongitude(location.longitude());
- record.setClockOutLatitude(location.latitude());
- record.setClockOutAccuracy(location.accuracy());
- record.setClockOutDistance(location.distanceMeters());
- record.setClockOutAddress(rule.getLocationAddress());
- }
- }
-
- @Override
- public HrmAttendanceMyStatusRespVO getMyStatus(Long userId) {
- // 1. 鍛樺伐涓嶅瓨鍦ㄦ椂杩斿洖 null锛岀敱鍓嶇鎻愮ず鏈叧鑱斿憳宸ワ紝閬垮厤鎵撳崱椤靛姞杞界洿鎺ユ姤閿�
- HrmEmployeeDO employee = employeeService.getEmployee(userId);
- if (employee == null) {
- return null;
- }
- LocalDate today = LocalDate.now();
- // 2. 鏌ヨ浠婃棩鑰冨嫟璁板綍涓庤�冨嫟瑙勫垯
- HrmAttendanceRecordDO record = attendanceRecordMapper.selectByUserIdAndDate(userId, today);
- HrmAttendanceRuleDO rule = attendanceRuleService.getAttendanceRuleByDeptId(employee.getDeptId());
- boolean workDay = attendanceHolidayService.isWorkDay(today);
- boolean clockInDone = record != null && record.getClockInTime() != null;
- boolean clockOutDone = record != null && record.getClockOutTime() != null;
-
- // 3. 缁勮浠婃棩鎵撳崱鐘舵��
- HrmAttendanceMyStatusRespVO respVO = new HrmAttendanceMyStatusRespVO();
- respVO.setDate(today);
- respVO.setWorkDay(workDay);
- respVO.setEmployeeId(employee.getId());
- respVO.setUserName(employee.getName());
- respVO.setDeptId(employee.getDeptId());
- if (rule != null) {
- respVO.setRuleName(rule.getName());
- respVO.setWorkStartTime(rule.getWorkStartTime());
- respVO.setWorkEndTime(rule.getWorkEndTime());
- respVO.setLocationRequired(rule.getLocationRequired());
- respVO.setLocationName(rule.getLocationName());
- respVO.setLocationAddress(rule.getLocationAddress());
- respVO.setLongitude(rule.getLongitude());
- respVO.setLatitude(rule.getLatitude());
- respVO.setRadiusMeters(rule.getRadiusMeters());
- respVO.setCoordinateSystem(rule.getCoordinateSystem());
- }
- if (record != null) {
- respVO.setRecordId(record.getId());
- respVO.setClockInTime(record.getClockInTime());
- respVO.setClockOutTime(record.getClockOutTime());
- respVO.setClockInType(record.getClockInType());
- respVO.setClockOutType(record.getClockOutType());
- respVO.setWorkHours(record.getWorkHours());
- respVO.setOvertimeHours(record.getOvertimeHours());
- respVO.setLocation(record.getLocation());
- respVO.setDataSource(record.getDataSource());
- }
- respVO.setClockInDone(clockInDone);
- respVO.setClockOutDone(clockOutDone);
- // 闈炲伐浣滄棩涓嶅彲鎵撳崱锛屼笌鎵撳崱鎺ュ彛鐨勬牎楠屼繚鎸佷竴鑷�
- respVO.setCanClockIn(workDay && !clockInDone);
- respVO.setCanClockOut(workDay && !clockOutDone);
- return respVO;
+ attendanceRecordMapper.updateById(record);
+ return record;
}
@Override
@@ -443,4 +469,4 @@
attendanceRecordMapper.updateById(record);
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3