From 00e255997ebc47587c90664b4a9fc769215b298e Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Fri, 20 Sep 2024 17:24:11 +0800
Subject: [PATCH] =?UTF-8?q?2024-09-20=20RFQ=20=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/resources/mapper/pms/EamMapper.xml | 8 +--
.../resources/mapper/pms/QcReportMapper.xml | 60 ++++---------------
2 files changed, 16 insertions(+), 52 deletions(-)
diff --git a/src/main/resources/mapper/pms/EamMapper.xml b/src/main/resources/mapper/pms/EamMapper.xml
index bfef8f1c..7e7d73b4 100644
--- a/src/main/resources/mapper/pms/EamMapper.xml
+++ b/src/main/resources/mapper/pms/EamMapper.xml
@@ -728,7 +728,7 @@
FROM eam_workOrder a
LEFT JOIN eam_defect_feedBack b on a.site = b.site and a.PlanID = b.feedBackID and a.bu_no = b.bu_no
LEFT JOIN eam_defect c on b.DefectID = c.DefectID
- LEFT JOIN operator as d on a.site = d.site and a.CreateBy = d.operator_id and d.active = 'Y'
+ LEFT JOIN operator as d on a.site = d.site and a.CreateBy = d.operator_id
left join eam_object as eo on eo.site = a.site and eo.ObjectID = a.ObjectID and eo.bu_no = a.bu_no
left join sys_department as sd ON eo.site = sd.site and eo.dept_id = sd.department_id and eo.bu_no = sd.bu_no
left join Access_dept as ead ON ead.site = sd.site and ead.department_id = sd.department_id and ead.bu_no = sd.bu_no
@@ -857,8 +857,8 @@
FROM eam_workOrder a
left join eam_defect_feedBack b on a.site = b.site and a.PlanID = b.feedBackID and a.bu_no = b.bu_no
left join eam_defect c on b.DefectID = c.DefectID
- left join operator as d on a.site = d.site and a.CreateBy = d.operator_id and d.active = 'Y'
- left join eam_object as e on a.site = e.site and a.ObjectID = e.ObjectID and e.Active = 'Y' and a.bu_no = e.bu_no
+ left join operator as d on a.site = d.site and a.CreateBy = d.operator_id
+ left join eam_object as e on a.site = e.site and a.ObjectID = e.ObjectID and a.bu_no = e.bu_no
left join sys_department as f on e.site = f.site and e.dept_id = f.department_id and e.bu_no = f.bu_no
left join Access_dept as ead ON ead.site = f.site and ead.department_id = f.department_id and ead.bu_no = f.bu_no
left join sys_user as ea on ead.username = ea.username
@@ -3082,7 +3082,7 @@
diff --git a/src/main/resources/mapper/pms/QcReportMapper.xml b/src/main/resources/mapper/pms/QcReportMapper.xml
index f7a67ad5..e530c95f 100644
--- a/src/main/resources/mapper/pms/QcReportMapper.xml
+++ b/src/main/resources/mapper/pms/QcReportMapper.xml
@@ -142,10 +142,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.create_date desc
+ a.inspection_no, b.item_no desc
@@ -270,10 +267,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.task_date desc
+ a.inspection_no, b.item_no desc
@@ -400,10 +394,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.task_date desc
+ a.inspection_no, b.item_no desc
@@ -528,10 +519,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.task_date desc
+ a.inspection_no, b.item_no desc
@@ -667,10 +655,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.create_date, c.num desc
+ a.inspection_no, b.item_no, c.num desc
@@ -1012,10 +994,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.task_date, c.num desc
+ a.inspection_no, b.item_no, c.num desc
@@ -1359,10 +1335,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.task_date, c.num desc
+ a.inspection_no, b.item_no, c.num desc
@@ -1702,10 +1672,7 @@
ORDER BY
- CASE WHEN a.state = '待检验' THEN 1
- WHEN a.state = '待审核' THEN 2
- WHEN a.state = '已完成' THEN 3
- END, a.task_date, c.num desc
+ a.inspection_no, b.item_no, c.num desc