From e5211965063b5bbd1cfcf2b9ae91e18cc9b0e3ae Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 19 八月 2024 14:14:31 +0800
Subject: [PATCH] 修改工程钢化标签打印
---
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 25 +++++++++++++++----------
1 files changed, 15 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 523f885..fdc9834 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -23,6 +23,7 @@
<result property="wornArea" column="wornArea"/>
<result property="qualityInspector" column="quality_inspector"/>
<result property="qualityInsTime" column="quality_ins_time"/>
+ <result property="notes" column="notes"/>
<association property="order" javaType="com.example.erp.entity.sd.Order">
<result property="customerId" column="customer_id"/>
@@ -87,6 +88,7 @@
left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id and rwd.technology_number=fc.technology_number
where fc.process_id = #{processIdStr}
and fc.technology_number = #{technologyStr}
+ and if(#{reportType}=1,o.order_type!='鏍峰搧璁㈠崟',o.order_id!='')
GROUP BY fc.process_id
</select>
@@ -104,11 +106,11 @@
<!-- 鏌ヨ娴佺▼鍗″伐鑹烘祦绋�-->
<select id="SelectTechnologicalProcess">
- select ogd.process
- from sd.order_glass_detail as ogd
- where ogd.production_id = LEFT(#{processIdStr}, 11)
- and ogd.technology_number=#{technologyStr}
- limit 1
+ select ifnull((select ogd.process
+ from sd.order_glass_detail as ogd
+ where ogd.production_id = LEFT(#{processIdStr}, 11)
+ and ogd.technology_number=#{technologyStr}
+ limit 1),'') as process
</select>
@@ -165,11 +167,13 @@
on patch.process_id = fc.process_id
and patch.order_sort = fc.order_number
and patch.technology_number = fc.technology_number
+ left join sd.`order` as o on o.order_id=od.order_id
WHERE
fc.process_id = #{processIdStr}
AND fc.technology_number = #{technologyStr}
AND odpd.process = #{process}
+ and if(#{reportType}=1,o.order_type!='鏍峰搧璁㈠崟',o.order_id!='')
order by fc.order_number
</select>
@@ -195,14 +199,14 @@
ogd.`group`,
if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
od.other_columns,
- ogd.id
+ ogd.id as 'glassId'
FROM
sd.order_detail AS od
LEFT JOIN sd.order_glass_detail AS ogd
ON od.order_id = ogd.order_id
AND od.order_number = ogd.order_number
- <if test="process == '澶硅兌'">
+ <if test="process == '澶硅兌' or (process == '鎵撹兌鍜岀矘妗�' and previousProcess=='澶硅兌')">
AND ogd.`group` = (select `group`
from sd.order_glass_detail
where order_id = ogd.order_id
@@ -244,7 +248,7 @@
WHERE
fc.process_id = #{processIdStr}
- <if test="process != '涓┖' and process != '澶硅兌' and process != '鍖呰'">
+ <if test="process != '涓┖' and process != '澶硅兌' and process != '鍖呰' and process != '鎵撹兌鍜岀矘妗�' ">
AND fc.technology_number = #{technologyStr}
</if>
AND odpd.process = #{process}
@@ -497,7 +501,7 @@
select rw.reporting_work_id,
(rw.reporting_work_time) as reporting_work_time,
o.order_id,
- rw.process_id,
+ CONCAT(rw.process_id,'/',GROUP_CONCAT(distinct rwd.technology_number SEPARATOR '')) as process_id,
o.project,
o.batch,
rw.this_process,
@@ -507,7 +511,8 @@
round(ogd.area * rw.this_worn_quantity,2) as wornArea,
rw.device_name,
rw.teams_groups_name,
- rw.reviewed_state
+ rw.reviewed_state,
+ rw.notes
# (IF(rw.reviewed_state = 0, '鏈鏍�', IF(rw.reviewed_state = 1, '瀹℃牳閫氳繃', '瀹℃牳涓嶉�氳繃'))) as reviewed_state
from sd.order as o
left join sd.order_glass_detail as ogd on ogd.order_id = o.order_id
--
Gitblit v1.8.0