Yangwl 1 week ago
commit db6b4fb84d

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

Loading…
Cancel
Save