From a6430ffc4448d79a95fb28f1ac464f0f35f2a10c Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 02 七月 2025 11:00:03 +0800
Subject: [PATCH] art:点检工单、点检标准数据库设计修改

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml |   85 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml
index edd1eae..3056797 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentOvertimeMapper.xml
@@ -2,4 +2,89 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.mdc.mapper.MdcEquipmentOvertimeMapper">
 
+    <!--鍒嗛〉鏌ヨ-->
+    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime">
+        SELECT
+            t1.id,
+            t1.equipment_id equipmentId,
+            t2.equipment_name equipmentName,
+            t1.the_date theDate,
+            t1.start_time startTime,
+            t1.end_time endTime,
+            t1.duration duration,
+            t1.remark remark,
+            t1.create_by createBy,
+            t1.create_time createTime,
+            t1.update_by updateBy,
+            t1.update_time updateTime
+        FROM
+            mdc_equipment_overtime t1
+            LEFT JOIN mdc_equipment t2 ON t2.equipment_id = t1.equipment_id
+        <where>
+            <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' ">
+                AND t2.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%')
+            </if>
+            <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' ">
+                AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%')
+            </if>
+            <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 ">
+                AND t1.equipment_id IN
+                <foreach collection="mdcEquipmentOvertime.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
+                    #{ id }
+                </foreach>
+            </if>
+            <if test="mdcEquipmentOvertime.startTime != null and mdcEquipmentOvertime.startTime != '' and mdcEquipmentOvertime.endTime != null and mdcEquipmentOvertime.endTime != ''">
+                AND t1.the_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime }
+            </if>
+        </where>
+        order by t1.the_date asc
+    </select>
+
+    <!--list鍒楄〃-->
+    <select id="list" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime">
+        SELECT
+            t1.id,
+            t1.equipment_id equipmentId,
+            t2.equipment_name equipmentName,
+            t1.the_date theDate,
+            t1.start_time startTime,
+            t1.end_time endTime,
+            t1.duration duration,
+            t1.remark remark,
+            t1.create_by createBy,
+            t1.create_time createTime,
+            t1.update_by updateBy,
+            t1.update_time updateTime
+        FROM
+            mdc_equipment_overtime t1
+            LEFT JOIN mdc_equipment t2 ON t2.equipment_id = t1.equipment_id
+        <where>
+            <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' ">
+                AND t2.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%')
+            </if>
+            <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' ">
+                AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%')
+            </if>
+            <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 ">
+                AND t1.equipment_id IN
+                <foreach collection="mdcEquipmentOvertime.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
+                    #{ id }
+                </foreach>
+            </if>
+            <if test="mdcEquipmentOvertime.startTime != null and mdcEquipmentOvertime.startTime != '' and mdcEquipmentOvertime.endTime != null and mdcEquipmentOvertime.endTime != ''">
+                AND t1.the_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime }
+            </if>
+        </where>
+            order by t1.the_date asc
+    </select>
+
+    <!--鏌ヨ鍔犵彮鏃堕暱-->
+    <select id="computeOvertime" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime">
+        SELECT
+            *
+        FROM
+            mdc_equipment_overtime
+        WHERE
+            the_date LIKE CONCAT(#{ validDate }, '%') AND equipment_id = #{ equipmentId }
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3