From 1d681f4ef5bd06f4ae6ceff6e2a8abfc230fb657 Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期四, 12 六月 2025 14:27:28 +0800
Subject: [PATCH] 设置上班打卡后是否缺卡状态为是

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentPunchServiceImpl.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentPunchServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentPunchServiceImpl.java
index 8b79829..b0733d8 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentPunchServiceImpl.java
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentPunchServiceImpl.java
@@ -136,13 +136,16 @@
             MdcEquipmentPunch equipmentPunch = new MdcEquipmentPunch();
             if (first.isPresent()) {
                 equipmentPunch = first.get();
+                //宸插瓨鍦ㄨ褰曡鏄庡凡鎵撲笅鐝崱锛屾晠灏嗘槸鍚︾己鍗$疆涓哄惁
+                equipmentPunch.setIsAbsent(0);
             }else {
                 equipmentPunch.setEquipmentId(equipment);
                 equipmentPunch.setPunchUser(userId);
                 equipmentPunch.setRecordDate(currentDate);
                 equipmentPunch.setShiftSchedule(mdcEquipmentPunch.getShiftSchedule());
-                equipmentPunch.setIsAbsent(0);
                 equipmentPunch.setIsEarly(0);
+                //姝e父鎵撳崱鏃跺厛灏嗘槸鍚︾己鍗$疆涓衡�滄槸鈥濓紝闃叉鏈墦涓嬬彮鍗℃椂鏃犳硶璋冩暣鐘舵��
+                equipmentPunch.setIsAbsent(1);
             }
             equipmentPunch.setCheckInTime(mdcEquipmentPunch.getCheckInTime());
             //鎵撳崱鏃堕棿澶т簬8锛�30/17:00鏃朵负杩熷埌鎵撳崱
@@ -214,6 +217,7 @@
             MdcEquipmentPunch equipmentPunch = new MdcEquipmentPunch();
             if (mdcEquipmentPunchOptional.isPresent()) {
                 equipmentPunch = mdcEquipmentPunchOptional.get();
+                equipmentPunch.setIsAbsent(0);
             }else {
                 equipmentPunch.setIsAbsent(1);
                 equipmentPunch.setIsLate(0);

--
Gitblit v1.9.3