产品一次检验合格率修改

master
杨万里 3 months ago
parent 9eb3ef92ad
commit b51b50a7dd

@ -91,13 +91,13 @@
sum(qctd2.noOk_quality)*type2.ratio bNoOkquality,
sum(qctd3.noOk_quality)*type3.ratio cNoOkquality
from qc_check_task qct
left join qc_check_task_defect qctd1 on qct.record_id = qctd1.belong_to and qctd1.defect_code = '20231212001'
left join qc_check_task_defect qctd1 on qct.record_id = qctd1.belong_to and qctd1.defect_code = '20250823001'
left join qc_defect_type type1 on qctd1.defect_code = type1.defect_code
left join qc_check_task_defect qctd2 on qct.record_id = qctd2.belong_to and qctd2.defect_code = '20231212002'
left join qc_check_task_defect qctd2 on qct.record_id = qctd2.belong_to and qctd2.defect_code = '20240822007'
left join qc_defect_type type2 on qctd2.defect_code = type2.defect_code
left join qc_check_task_defect qctd3 on qct.record_id = qctd3.belong_to and qctd3.defect_code = '20231212003'
left join qc_check_task_defect qctd3 on qct.record_id = qctd3.belong_to and qctd3.defect_code = '20250823002'
left join qc_defect_type type3 on qctd3.defect_code = type3.defect_code
where qct.del_flag = '0' and qct.type_code = 'produce' and qct.check_type = 'checkTypeCPPC'
where qct.del_flag = '0' and qct.type_code = 'product' and qct.check_type = 'checkTypeCPPC'
<if test="materialCode != null ">and qct.material_code in (${materialCode})</if>
<if test="workCenter != null ">and qct.supplier_code = #{workCenter}</if>
<if test="ymArrayStart != null ">and CONVERT(varchar(10),qct.create_time, 120) >= #{ymArrayStart}</if>

Loading…
Cancel
Save