2024-5-28 设备-点检/巡检/保养-当工单删除后,无法重新生成问题

master
A0010407 8 months ago
parent c00a9ef1b9
commit c651a1212e

@ -38,14 +38,17 @@
</select>
<select id="getNewTaskOrder" resultType="com.op.device.domain.EquOrder">
select top 1 order_code orderCode,
create_time createTime
create_time createTime
<if test="planLoopType=='day'">, DATEDIFF (day, create_time, GETDATE()) days </if>
<if test="planLoopType=='week'">, DATEDIFF (week, create_time, GETDATE()) days </if>
<if test="planLoopType=='month'">, DATEDIFF (month, create_time, GETDATE()) days </if>
<if test="planLoopType=='season'">, DATEDIFF (month, create_time, GETDATE())/3 days </if>
<if test="planLoopType=='year'">, DATEDIFF (year, create_time, GETDATE()) days </if>
from equ_order
where plan_type = #{planType} and plan_code = #{planCode} and equipment_code = #{equipmentCode}
where plan_type = #{planType}
and plan_code = #{planCode}
and equipment_code = #{equipmentCode}
and del_flag = '0'
order by create_time desc
</select>
<select id="getNewTaskOrder0" resultType="com.op.device.domain.EquOrder">
@ -57,7 +60,10 @@
<if test='planLoopType=="season"'> DATEDIFF (month, order_start, GETDATE())/3 days </if>
<if test='planLoopType=="year"'> DATEDIFF (year, order_start, GETDATE()) days </if>
from equ_order
where plan_type = #{planType} and plan_code = #{planCode} and equipment_code = #{equipmentCode}
where plan_type = #{planType}
and plan_code = #{planCode}
and equipment_code = #{equipmentCode}
and del_flag = '0'
order by create_time desc
</select>
</mapper>

Loading…
Cancel
Save