From 86f6b1cd0f5fd50b002a6875aa4fe5ee9c67dd77 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 07 三月 2024 16:24:44 +0800
Subject: [PATCH] bug修复
---
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml
index 39b812f..a63838e 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcDeviceCalendarMapper.xml
@@ -53,15 +53,17 @@
t3.sleep_end_date,
t3.is_day_span,
t4.equipment_name,
- t4.equipment_id
+ t5.start_time overtimeStartTime,
+ t5.end_time overtimeEndTime
FROM
mdc_device_calendar t1
LEFT JOIN mdc_shift t2 ON t1.shift_id = t2.id
LEFT JOIN mdc_shift_sub t3 ON t1.shift_sub_id = t3.id
LEFT JOIN mdc_equipment t4 ON t1.equipment_id = t4.equipment_id
+ LEFT JOIN mdc_equipment_overtime t5 ON t5.calendar_id = t1.id
<where>
- <if test="equipmentid != null and equipmentid != ''">
- AND t4.equipment_id = #{ equipmentid }
+ <if test="equipmentId != null and equipmentId != ''">
+ AND t4.equipment_id = #{ equipmentId }
</if>
<if test="stringDate != null and stringDate != ''">
AND t1.effective_date = #{ stringDate }
@@ -85,4 +87,41 @@
WHERE t1.default_shift = 'true'
</select>
+ <!--璁$畻瀹為檯鐝骇澶╂暟-->
+ <select id="computeActualWorkDayCount" resultType="java.lang.String">
+ SELECT DISTINCT
+ effective_date
+ FROM
+ mdc_device_calendar
+ WHERE
+ effective_date LIKE CONCAT(#{ validDate }, '%')
+ AND equipment_id = #{ equipmentId }
+ </select>
+
+ <!--鏌ヨ鐝鍒嗙被-->
+ <select id="findShiftSort" resultType="java.lang.String">
+ SELECT DISTINCT
+ t2.shift_name
+ FROM
+ mdc_device_calendar t1 LEFT JOIN mdc_shift t2 ON t1.shift_id = t2.id
+ WHERE
+ t1.effective_date LIKE CONCAT(#{ validDate }, '%')
+ AND t1.equipment_id = #{ equipmentId }
+ </select>
+
+ <!--鏌ヨ鐝鏁伴噺-->
+ <select id="computeShiftTimeCount" resultType="java.lang.Integer">
+ SELECT
+ COUNT(*)
+ FROM
+ mdc_device_calendar
+ WHERE
+ effective_date LIKE CONCAT(#{ validDate }, '%')
+ AND equipment_id = #{ equipmentId }
+ </select>
+
+ <select id="getFirstData" resultType="org.jeecg.modules.mdc.entity.MdcDeviceCalendar">
+ SELECT TOP 1 * FROM mdc_device_calendar WHERE equipment_id = #{ equipmentId } ORDER BY effective_date ASC
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3