|
|
|
@ -44,6 +44,7 @@
|
|
|
|
|
<result property="pgy" column="pgy"/>
|
|
|
|
|
<result property="cxzz" column="cxzz"/>
|
|
|
|
|
<result property="workorderCodeSap" column="workorder_code_sap"/>
|
|
|
|
|
<result property="modelType" column="modelType"/>
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
@ -65,7 +66,7 @@
|
|
|
|
|
q.type_code,q.check_name,pow.workorder_code_sap
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
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
|
|
|
|
|
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
|
|
|
|
|
<where>
|
|
|
|
|
<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>
|
|
|
|
@ -88,7 +89,6 @@
|
|
|
|
|
<if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
|
|
|
|
|
<if test="typeCode != null ">and q.type_code = #{typeCode}</if>
|
|
|
|
|
<if test="checkType != null ">and qct.check_type = #{checkType}</if>
|
|
|
|
|
<if test='typeCode != "material" '>and pow.del_flag = '0'</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -279,8 +279,41 @@
|
|
|
|
|
where qctf.del_flag = '0' and qctf.check_type = #{checkType}
|
|
|
|
|
and CONVERT(varchar(10),#{incomeTime}, 120) BETWEEN qctf.start_time and qctf.end_time
|
|
|
|
|
order by create_time desc
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getPrintXJList" parameterType="QcCheckReportIncome"
|
|
|
|
|
resultMap="QcCheckReportIncomeResult">
|
|
|
|
|
select qct.order_no,qct.material_code, qct.material_name, qct.check_no, qct.income_batch_no,
|
|
|
|
|
qct.check_result, CONVERT(varchar(10),qct.income_time, 120),bp.umrez modelType,
|
|
|
|
|
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
|
|
|
|
|
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,qct.sample_quality,
|
|
|
|
|
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join base_product bp on qct.material_code = bp.product_code and bp.del_flag = '0'
|
|
|
|
|
<where>
|
|
|
|
|
<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>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''">and qct.material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''">and qct.material_name like concat('%',#{materialName}, '%')</if>
|
|
|
|
|
<if test="supplierCode != null and supplierCode != ''">and qct.supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''">and qct.supplier_name like concat('%',#{supplierName}, '%')</if>
|
|
|
|
|
<if test="checkLoc != null and checkLoc != ''">and qct.check_loc = #{checkLoc}</if>
|
|
|
|
|
<if test="checkStatus != null and checkStatus != ''">and qct.check_status = #{checkStatus}</if>
|
|
|
|
|
<if test="checkManCode != null and checkManCode != ''">and qct.check_man_code = #{checkManCode}</if>
|
|
|
|
|
<if test="checkManName != null and checkManName != ''">and qct.check_man_name like concat('%',#{checkManName}, '%')</if>
|
|
|
|
|
and qct.del_flag = '0'
|
|
|
|
|
<if test="checkResult != null and checkResult != ''">and qct.check_result = #{checkResult}</if>
|
|
|
|
|
<if test="status != null and status != ''">and qct.status = #{status}</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">and qct.del_flag = #{delFlag}</if>
|
|
|
|
|
<if test="incomeTimeStart != null ">and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
|
|
|
|
|
<if test="incomeTimeEnd != null ">and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
|
|
|
|
|
<if test="checkTimeStart != null ">and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
|
|
|
|
|
<if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
|
|
|
|
|
<if test="typeCode != null ">and qct.type_code = #{typeCode}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcCheckReportIncome" parameterType="QcCheckReportIncome">
|
|
|
|
|
insert into qc_check_task
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
@ -405,4 +438,6 @@
|
|
|
|
|
#{recordId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|