|
|
|
@ -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>
|
|
|
|
|