From 07a7e4e1a172960806e41ce686044aabc50ca379 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 29 五月 2025 14:36:01 +0800
Subject: [PATCH] 点检报表修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
index 794eca5..0f066c3 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
@@ -311,7 +311,8 @@
             t2.inspection_order_uda2 as inspectionUserName,
             t2.inspection_order_uda1 AS repairConfirmPerson,
             case t1.inspection_project_result  when '1' then '鈭�' when '2' then 'x' when '3' then '鈻�'  when '4' then 'T' else '' end as insResult,
-            CONVERT(VARCHAR, DATEPART(DAY, t2.create_time)) as dayTime
+            CONVERT(VARCHAR, DATEPART(DAY, t2.create_time)) as dayTime,
+            DATEPART(WEEK, t2.create_time) - DATEPART(WEEK, DATEADD(DAY, 1 - DAY(t2.create_time), t2.create_time)) + 1 AS weekOfMonth
         FROM
             mom_eam_inspection_order_detail t1
                 LEFT JOIN mom_eam_inspection_order t2 ON t1.inspection_order_id= t2.id
@@ -341,7 +342,8 @@
         SELECT
             t1.inspection_order_uda2 AS inspectionUserName,
             t1.inspection_order_uda1 AS repairConfirmPerson,
-            CONVERT ( VARCHAR, DATEPART( DAY, t1.create_time ) ) AS dayTime
+            CONVERT ( VARCHAR, DATEPART( DAY, t1.create_time ) ) AS dayTime,
+            DATEPART(WEEK, t1.create_time) - DATEPART(WEEK, DATEADD(DAY, 1 - DAY(t1.create_time), t1.create_time)) + 1 AS weekOfMonth
         FROM
             mom_eam_inspection_order t1
         LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id

--
Gitblit v1.9.3