白坯检验后台报表调整

master^2
FCD 1 month ago
parent 34c377f14c
commit 308c9f3480

@ -1790,7 +1790,9 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
count = count + Integer.parseInt(data.getAttr2());
}
}else {
map.put(data.getAttr1(), "0");
if (!map.containsKey(data.getAttr1())){
map.put(data.getAttr1(), "0");
}
}
}
map.put("count", Integer.toString(count));

@ -70,6 +70,7 @@
left join qc_check_type q on q.id = qct.check_type
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
<where>
qct.order_no is not null
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''">and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''">and qct.order_no = #{orderNo}</if>

@ -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

Loading…
Cancel
Save