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 +++++-
 lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
index c4d6284..9fa5fb6 100644
--- a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
+++ b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
@@ -1049,7 +1049,7 @@
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         String userId = user.getId();
         if (StringUtils.isNotEmpty(user.getEquipmentIds())) {
-            return this.baseMapper.selectList(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentId, Arrays.asList(user.getEquipmentIds().split(StringPool.COMMA))));
+            return this.baseMapper.selectList(new LambdaQueryWrapper<MdcEquipment>().in(MdcEquipment::getEquipmentId, Arrays.asList(user.getEquipmentIds().split(StringPool.COMMA))));
         }
         //鑾峰彇鎵�鏈変骇绾挎暟鎹�
         List<MdcProduction> productionList = mdcProductionService.list(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0.toString()).orderByAsc(MdcProduction::getProductionOrder));
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