From e1fba46a50e2f5036b1a5fd59f459e61495eb888 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 08 七月 2026 16:43:44 +0800
Subject: [PATCH] 已进行排班并且人员已打卡的前提下,对应的班次配置不能编辑删除。
---
src/main/resources/mapper/staff/PersonalShiftMapper.xml | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/staff/PersonalShiftMapper.xml b/src/main/resources/mapper/staff/PersonalShiftMapper.xml
index e872e01..b912e24 100644
--- a/src/main/resources/mapper/staff/PersonalShiftMapper.xml
+++ b/src/main/resources/mapper/staff/PersonalShiftMapper.xml
@@ -112,4 +112,15 @@
order by s.create_time
</select>
+ <select id="existsAttendanceUsedByConfig" resultType="boolean">
+ SELECT EXISTS (
+ SELECT 1
+ FROM personal_shift ps
+ INNER JOIN personal_attendance_records par
+ ON par.staff_on_job_id = ps.staff_on_job_id
+ AND par.date = DATE(ps.work_time)
+ WHERE ps.personal_attendance_location_config_id = #{configId}
+ )
+ </select>
+
</mapper>
--
Gitblit v1.9.3