From 2a891d0391bc9f2dfaaaee8f63fcb20ff0932202 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 七月 2024 15:11:40 +0800
Subject: [PATCH] 修改订单报表
---
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
index 7c1cd65..d120567 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
@@ -9,7 +9,7 @@
<!--鑾峰彇琛ョ墖鏁版嵁-->
- <select id="SelectReplenish" >
+ <select id="SelectReplenish" >
select
r.id,
r.review_status,
@@ -22,7 +22,7 @@
o.batch,
od.building_number,
od.product_name,
- ogd.technology_number,
+ r.technology_number,
ogd.glass_address,
r.patch_num,
od.width,
@@ -88,6 +88,7 @@
update pp.patch_log set reviewer=#{userName},review_status=1,update_time=now() where id=#{patchLog.id}
</update>
+
<update id="updateOrderProcessDetail" >
update sd.order_process_detail
set reporting_work_num=reporting_work_num - #{patchLog.patchNum}
@@ -107,6 +108,11 @@
<update id="updateDamageDetails" >
update pp.damage_details set quantity=quantity+#{patchLog.patchNum},patch_status=1 where id=#{patchLog.reviewer}
+ </update>
+
+ <update id="updateReportingWorkDetail" >
+ update pp.reporting_work_detail set patch_status=1 where reporting_work_id=#{reportingWorkId}
+ and order_number=#{orderSort} and technology_number=#{technologyNumber}
</update>
@@ -148,7 +154,7 @@
left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
- where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1))
+ where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1)) and rw.reviewed_state!=-1
order by dd.id desc
</select>
--
Gitblit v1.8.0