|
|
|
@ -55,22 +55,22 @@
|
|
|
|
|
left join pro_order_workorder pow ON pow.workorder_code = task.order_no
|
|
|
|
|
<where>
|
|
|
|
|
<if test="queryDate != null and queryDate != ''">
|
|
|
|
|
and CONVERT(VARCHAR(10), create_time ,23) <![CDATA[ = ]]> #{queryDate}
|
|
|
|
|
and CONVERT(VARCHAR(10), task.create_time ,23) <![CDATA[ = ]]> #{queryDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startSampleDate != null and startSampleDate != ''">
|
|
|
|
|
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ >= ]]> #{startSampleDate}
|
|
|
|
|
and CONVERT(VARCHAR(10), task.sample_time ,23) <![CDATA[ >= ]]> #{startSampleDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endSampleDate != null and endSampleDate != ''">
|
|
|
|
|
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ <= ]]> #{endSampleDate}
|
|
|
|
|
and CONVERT(VARCHAR(10), task.sample_time ,23) <![CDATA[ <= ]]> #{endSampleDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''">
|
|
|
|
|
and material_name like concat('%', #{materialName}, '%')
|
|
|
|
|
and task.material_name like concat('%', #{materialName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workOrderCodeSap != null and workOrderCodeSap != ''">
|
|
|
|
|
and SUBSTRING ( pow.workorder_code_sap, 4, 12 ) <![CDATA[ = ]]> #{workOrderCodeSap}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by sample_time desc,task.create_time desc
|
|
|
|
|
order by task.sample_time desc,task.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|