|
|
|
@ -467,7 +467,7 @@
|
|
|
|
|
<select id="getDLData" resultType="com.op.quality.domain.QcStaticTable">
|
|
|
|
|
SELECT
|
|
|
|
|
concat(q.cpkType,'-',q.ymdms) yearMonth,
|
|
|
|
|
ymdms,rule_name ruleName,
|
|
|
|
|
ymdms,rule_name ruleName,q.lineName,q.checkTypeName,
|
|
|
|
|
project_no projectNo,
|
|
|
|
|
STUFF(
|
|
|
|
|
(SELECT ',' + t.actual_value
|
|
|
|
@ -492,17 +492,20 @@
|
|
|
|
|
select
|
|
|
|
|
bpa.cpk_type cpkType,
|
|
|
|
|
CONVERT(varchar(7),qct.income_time, 120) ymdms,
|
|
|
|
|
qctd.rule_name,qctd.project_no,qctd.actual_value
|
|
|
|
|
qctd.rule_name,qctd.project_no,qctd.actual_value,
|
|
|
|
|
be.equipment_name lineName,qt.check_name checkTypeName
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
|
|
|
|
|
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
|
|
|
|
|
left join base_equipment be on be.equipment_type_code = 'equ_type_bzx' and be.del_flag = '0'
|
|
|
|
|
left join qc_check_type qt on qt.order_code = qct.check_type
|
|
|
|
|
where qct.check_type = #{checkType} and qctd.property_code = '1' and qct.check_time is not null
|
|
|
|
|
<if test="ymArrayStart != null ">and CONVERT(varchar(7),qct.income_time, 120) >= #{ymArrayStart}</if>
|
|
|
|
|
<if test="ymArrayEnd != null ">and #{ymArrayEnd}>=CONVERT(varchar(7),qct.income_time,120) </if>
|
|
|
|
|
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
|
|
|
|
|
and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType}
|
|
|
|
|
) q
|
|
|
|
|
GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no
|
|
|
|
|
GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no,q.lineName,q.checkTypeName
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -947,7 +950,7 @@
|
|
|
|
|
<select id="getDLDataDay" resultType="com.op.quality.domain.QcStaticTable">
|
|
|
|
|
SELECT
|
|
|
|
|
concat(q.cpkType,'-',q.ymdms) yearMonth,
|
|
|
|
|
ymdms,rule_name ruleName,
|
|
|
|
|
ymdms,rule_name ruleName,q.lineName,q.checkTypeName,
|
|
|
|
|
project_no projectNo,
|
|
|
|
|
STUFF(
|
|
|
|
|
(SELECT ',' + t.actual_value
|
|
|
|
@ -972,17 +975,20 @@
|
|
|
|
|
select
|
|
|
|
|
bpa.cpk_type cpkType,
|
|
|
|
|
CONVERT(varchar(10),qct.income_time, 120) ymdms,
|
|
|
|
|
qctd.rule_name,qctd.project_no,qctd.actual_value
|
|
|
|
|
qctd.rule_name,qctd.project_no,qctd.actual_value,
|
|
|
|
|
be.equipment_name lineName,qt.check_name checkTypeName
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
|
|
|
|
|
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
|
|
|
|
|
left join base_equipment be on be.equipment_type_code = 'equ_type_bzx' and be.del_flag = '0'
|
|
|
|
|
left join qc_check_type qt on qt.order_code = qct.check_type
|
|
|
|
|
where qct.check_type = #{checkType} and qctd.property_code = '1' and qct.check_time is not null
|
|
|
|
|
<if test="ymArrayStart != null ">and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart}</if>
|
|
|
|
|
<if test="ymArrayEnd != null ">and #{ymArrayEnd}>=CONVERT(varchar(10),qct.income_time,120) </if>
|
|
|
|
|
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
|
|
|
|
|
and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType}
|
|
|
|
|
) q
|
|
|
|
|
GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no
|
|
|
|
|
GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no,q.lineName,q.checkTypeName
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getXJCheckTableDetailList" resultType="com.op.quality.domain.CheckTypeXJDetail">
|
|
|
|
|
select
|
|
|
|
|