From 547294b0c7a7de8cc84a8a8df297548c7b2f9846 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 06 八月 2025 10:07:48 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index a8921fe..4512108 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -102,7 +102,7 @@
</select>
<select id="SelectWorkBasicTeamsMp">
- select * from erp_user_info.`user` WHERE address=#{process}
+ select id,login_name,user_name,address from erp_user_info.`user` WHERE address=#{process}
</select>
<!-- 鏌ヨ娴佺▼鍗″伐鑹烘祦绋�-->
@@ -298,8 +298,8 @@
<select id="historyTeamsMp">
SELECT
- bdp.id,
- bdp.basic_type,
+ bd.id,
+ bd.basic_type,
rw.teams as basic_name,
bd.basic_name,bd.id AS basic_category,
rw.process
@@ -411,7 +411,7 @@
<!--鏌ヨ淇敼鎶ュ伐鏄庣粏鏁版嵁-->
<select id="selectByReportingWorkId" >
- select
+ select * from(select
a.reporting_work_id,
d.order_number,
d.glass_child,
@@ -422,7 +422,7 @@
d.child_height,
if(e.shape=1,'鏅舰',if(e.shape=2,'寮傚舰','')) as shape,
if(ifnull(a.completed_quantity+a.breakage_quantity,0)=0,
- c.quantity-ifnull(a.completed_quantity+a.breakage_quantity,0),
+ 0,
ifnull(a.completed_quantity+a.breakage_quantity,0)) as 'quantity', -- 鍙姤宸ユ暟
ifnull(a.completed_quantity,0) as 'completedQuantity', -- 瀹屽伐鏁�
ifnull(a.breakage_quantity,0) as 'breakageQuantity', -- 鐮存崯鏁�
@@ -481,6 +481,7 @@
from reporting_work as rw
left join reporting_work_detail as rwd
on rw.reporting_work_id = rwd.reporting_work_id
+ where rw.reviewed_state>-1
group by rw.process_id,
rw.this_process,
rwd.order_number,
@@ -512,6 +513,7 @@
</if>
where b.reporting_work_id = #{reportingWorkId}
GROUP BY c.order_number,c.technology_number
+ order BY c.order_number,c.technology_number) as result
</select>
<select id="selectReportingWorkMp" resultMap="reportingWorkMap">
select rw.reporting_work_id,
@@ -540,8 +542,8 @@
left join sd.`order` as o on o.order_id=rw.order_id
where rw.reviewed_state != 2
- and rw.reporting_work_time >= #{selectTime1}
- AND rw.reporting_work_time < #{selectTime2}
+ and date(rw.reporting_work_time) >= date(#{selectTime1})
+ AND date(rw.reporting_work_time) <= date(#{selectTime2})
and position(#{orderId} in rw.order_id)
and rw.reviewed_state!=-1
and o.create_order>0
@@ -552,7 +554,8 @@
and o.order_id regexp #{reportingWork.orderId}
</if>
<if test="reportingWork.processId != null and reportingWork.processId != ''">
- and rw.process_id regexp #{reportingWork.processId}
+
+ and CONCAT(rw.process_id,'/',rwd.goup) LIKE CONCAT('%', #{reportingWork.processId}, '%')
</if>
<if test="reportingWork.order.project != null and reportingWork.order.project != ''">
and o.project regexp #{reportingWork.order.project}
@@ -1035,8 +1038,8 @@
AND ogd.technology_number = rwd.technology_number*/
LEFT JOIN sd.`order` AS o ON o.order_id = rw.order_id
WHERE rw.reviewed_state != 2
- and rw.reporting_work_time >= #{selectTime1}
- AND rw.reporting_work_time < #{selectTime2}
+ and date(rw.reporting_work_time) >= date(#{selectTime1})
+ AND date(rw.reporting_work_time) <= date(#{selectTime2})
AND position(#{orderId} in rw.order_id)
AND rw.reviewed_state != -1
AND o.create_order > 0
--
Gitblit v1.8.0