|
|
|
@ -182,4 +182,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="materialCode != null "> and qct.material_code like concat('%',#{materialCode},'%')</if>
|
|
|
|
|
group by qct.supplier_code,qct.supplier_name,CONVERT(VARCHAR(2), qct.check_time, 108)
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getQmsRateTable" resultType="com.op.quality.domain.QcStaticTable">
|
|
|
|
|
select qct.supplier_code supplierCode,
|
|
|
|
|
qct.supplier_name supplierName,
|
|
|
|
|
<if test="orderNo != null ">qct.order_no orderNo, qct.unit,</if>
|
|
|
|
|
<if test="incomeBatchNo != null ">qct.income_batch_no,</if>
|
|
|
|
|
<if test="materialCode != null ">qct.material_code,qct.material_name,</if>
|
|
|
|
|
sum(quality) quality,
|
|
|
|
|
sum(qct.sample_quality) sampleQuality,
|
|
|
|
|
sum(qct.noOk_quality) noOkNums
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
where qct.del_flag = '0'
|
|
|
|
|
<if test="orderNo != null ">and qct.order_no = #{orderNo}</if>
|
|
|
|
|
<if test="incomeBatchNo != null ">and qct.income_batch_no like concat('%',#{incomeBatchNo},'%')</if>
|
|
|
|
|
<if test="materialCode != null ">and qct.material_code like concat('%',#{materialCode},'%')</if>
|
|
|
|
|
<if test="supplierCode != null ">and qct.supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="typeCode != null ">and qct.type_code = #{typeCode}</if>
|
|
|
|
|
<if test="checkType != null ">and qct.check_type = #{checkType}</if>
|
|
|
|
|
<if test="ymArrayStart != null "> and CONVERT(varchar(10),qct.income_time, 120) >= CONVERT(varchar(10),#{ymArrayStart}, 120)</if>
|
|
|
|
|
<if test="ymArrayEnd != null "> and CONVERT(varchar(10),#{ymArrayEnd}, 120)>=CONVERT(varchar(10),qct.income_time, 120)</if>
|
|
|
|
|
group by qct.supplier_code,qct.supplier_name
|
|
|
|
|
<if test="orderNo != null ">,qct.order_no,qct.unit</if>
|
|
|
|
|
<if test="incomeBatchNo != null ">,qct.income_batch_no</if>
|
|
|
|
|
<if test="materialCode != null ">,qct.material_code,qct.material_name</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getCheckTypeList" resultType="com.op.quality.domain.QcCheckType">
|
|
|
|
|
select order_code checkType,
|
|
|
|
|
check_name checkName
|
|
|
|
|
from qc_check_type
|
|
|
|
|
where del_flag = '0' and type_code= #{typeCode}
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|