|
|
|
@ -203,22 +203,21 @@
|
|
|
|
|
and CONVERT(varchar(7),feedback_time, 120) = SUBSTRING(#{ymd},0,8)
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getDayNoOkHz" resultType="com.op.quality.domain.QcInterface">
|
|
|
|
|
SELECT
|
|
|
|
|
concat(t.machine_code,t.ymd) ymd,
|
|
|
|
|
sum(t.noOk_quality) noOkQuality,
|
|
|
|
|
t.machine_code machineCode
|
|
|
|
|
from(
|
|
|
|
|
select CONVERT(varchar(10),qct.income_time, 120) ymd,
|
|
|
|
|
qct.noOk_quality,
|
|
|
|
|
mrw.machine_code
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join pro_order_workorder pow on qct.order_no = pow.workorder_code_sap
|
|
|
|
|
left join mes_report_work mrw on pow.workorder_code = mrw.workorder_code
|
|
|
|
|
where qct.type_code = #{typeCode}
|
|
|
|
|
and qct.del_flag='0'
|
|
|
|
|
and CONVERT(varchar(7),qct.income_time, 120) = SUBSTRING(#{ymd},0,8)
|
|
|
|
|
) t
|
|
|
|
|
group by t.machine_code,t.ymd
|
|
|
|
|
SELECT
|
|
|
|
|
concat(t.workorder_name,t.ymd) ymd,
|
|
|
|
|
sum(t.noOk_quality) noOkQuality,
|
|
|
|
|
t.workorder_name machineCode
|
|
|
|
|
from(
|
|
|
|
|
select CONVERT(varchar(10),qct.income_time, 120) ymd,
|
|
|
|
|
qct.noOk_quality,
|
|
|
|
|
pow.workorder_name
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join pro_order_workorder pow on qct.order_no = pow.workorder_code
|
|
|
|
|
where qct.type_code = #{typeCode}
|
|
|
|
|
and qct.del_flag='0'
|
|
|
|
|
and CONVERT(varchar(7),qct.income_time, 120) = SUBSTRING(#{ymd},0,8)
|
|
|
|
|
) t
|
|
|
|
|
group by t.workorder_name,t.ymd
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getMothNoOkNum" resultType="com.op.quality.domain.QcInterface">
|
|
|
|
|
select
|
|
|
|
|