|
|
|
|
@ -935,7 +935,7 @@
|
|
|
|
|
qct.material_code materialCode,qct.material_name materialName,
|
|
|
|
|
bpa.cpk_type cpkType,sdd.dict_label cpkTypeName,
|
|
|
|
|
qct.order_no workorderCode,qct.income_batch_no batchNo,pow.workorder_code_sap workorderCodeSap,
|
|
|
|
|
qctd.rule_name ruleName,
|
|
|
|
|
CONCAT(qpt.project_type_name, '-', qctd.rule_name) ruleName,
|
|
|
|
|
qctd.actual_value actualValue
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
|
|
|
|
|
@ -943,9 +943,11 @@
|
|
|
|
|
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
|
|
|
|
|
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
|
|
|
|
|
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_value = bpa.cpk_type and sdd.dict_type= 'qms_category'
|
|
|
|
|
LEFT JOIN qc_check_project qcp ON qcp.id = qctd.project_id
|
|
|
|
|
LEFT JOIN qc_project_type qpt ON qpt.project_type_code = qcp.project_type
|
|
|
|
|
where qctd.project_id = #{projectId} and qct.check_type = #{checkType}
|
|
|
|
|
and qctd.actual_value is not null
|
|
|
|
|
and qctd.del_flag = '0' and qct.del_flag = '0' and be.del_flag = '0' and pow.del_flag = '0'
|
|
|
|
|
and qctd.del_flag = '0' and qct.del_flag = '0'
|
|
|
|
|
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
|
|
|
|
|
<if test="cpkType != null ">and bpa.cpk_type = #{cpkType}</if>
|
|
|
|
|
<if test="workorderCodeSap != null ">and pow.workorder_code_sap like concat('%',#{workorderCodeSap},'%')</if>
|
|
|
|
|
@ -1416,7 +1418,7 @@
|
|
|
|
|
SELECT
|
|
|
|
|
ISNULL(tc.class_name,'其他') defectSubclass,
|
|
|
|
|
FORMAT ( qct.create_time, 'yyyy-MM-dd' ) attr1,
|
|
|
|
|
SUM(td.noOk_quality) attr2,
|
|
|
|
|
ISNULL( SUM ( td.noOk_quality ), 0 ) attr2,
|
|
|
|
|
SUM(qct.sample_quality) attr3
|
|
|
|
|
FROM qc_check_task qct
|
|
|
|
|
LEFT JOIN qc_check_task_defect td ON qct.record_id = td.belong_to
|
|
|
|
|
|