|
|
@ -35,7 +35,7 @@
|
|
|
|
id,
|
|
|
|
id,
|
|
|
|
material_name,
|
|
|
|
material_name,
|
|
|
|
income_batch_no,
|
|
|
|
income_batch_no,
|
|
|
|
work_order_code_sap,
|
|
|
|
SUBSTRING ( pow.workorder_code_sap, 4, 12 ) AS work_order_code_sap,
|
|
|
|
sample_time,
|
|
|
|
sample_time,
|
|
|
|
sample_num,
|
|
|
|
sample_num,
|
|
|
|
sample_address,
|
|
|
|
sample_address,
|
|
|
@ -51,7 +51,8 @@
|
|
|
|
third_check_user_name,
|
|
|
|
third_check_user_name,
|
|
|
|
third_check_result,
|
|
|
|
third_check_result,
|
|
|
|
third_check_time
|
|
|
|
third_check_time
|
|
|
|
from qc_check_sample_task
|
|
|
|
from qc_check_sample_task task
|
|
|
|
|
|
|
|
left join pro_order_workorder pow ON pow.workorder_code = task.order_no
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="queryDate != null and queryDate != ''">
|
|
|
|
<if test="queryDate != null and queryDate != ''">
|
|
|
|
and CONVERT(VARCHAR(10), create_time ,23) <![CDATA[ = ]]> #{queryDate}
|
|
|
|
and CONVERT(VARCHAR(10), create_time ,23) <![CDATA[ = ]]> #{queryDate}
|
|
|
@ -66,10 +67,10 @@
|
|
|
|
and material_name like concat('%', #{materialName}, '%')
|
|
|
|
and material_name like concat('%', #{materialName}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="workOrderCodeSap != null and workOrderCodeSap != ''">
|
|
|
|
<if test="workOrderCodeSap != null and workOrderCodeSap != ''">
|
|
|
|
and work_order_code_sap <![CDATA[ = ]]> #{workOrderCodeSap}
|
|
|
|
and SUBSTRING ( pow.workorder_code_sap, 4, 12 ) <![CDATA[ = ]]> #{workOrderCodeSap}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
order by sample_time desc,create_time desc
|
|
|
|
order by sample_time desc,task.create_time desc
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -231,4 +232,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcCheckSampleTask" parameterType="com.op.quality.domain.QcCheckSampleTask">
|
|
|
|
|
|
|
|
INSERT INTO qc_check_sample_task (
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
material_name,
|
|
|
|
|
|
|
|
income_batch_no,
|
|
|
|
|
|
|
|
order_no,
|
|
|
|
|
|
|
|
create_time
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
VALUES
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
#{id},
|
|
|
|
|
|
|
|
#{materialName},
|
|
|
|
|
|
|
|
#{incomeBatchNo},
|
|
|
|
|
|
|
|
#{orderNo},
|
|
|
|
|
|
|
|
#{createTime}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckSampleTask" parameterType="com.op.quality.domain.QcCheckSampleTask" resultType="com.op.quality.domain.QcCheckSampleTask">
|
|
|
|
|
|
|
|
SELECT id
|
|
|
|
|
|
|
|
FROM qc_check_sample_task
|
|
|
|
|
|
|
|
WHERE material_name = #{materialName} AND income_batch_no = #{incomeBatchNo} AND order_no = #{orderNo}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|