2025-04-23 设备保养工单不生成问题

master
元气满满 2 months ago
parent 3bde27ba19
commit df4809d9b0

@ -33,9 +33,7 @@
where ep.del_flag = '0' and epe.del_flag = '0' and ep.plan_status = '0' where ep.del_flag = '0' and epe.del_flag = '0' and ep.plan_status = '0'
and epe.equipment_code in( and epe.equipment_code in(
select be.equipment_code from base_equipment be select be.equipment_code from base_equipment be
left join equ_bind_auxiliary_equipment ebae0 on be.equipment_code = ebae0.auxiliary_equipment_code
where be.del_flag = '0' where be.del_flag = '0'
and ebae0.del_flag = '0'
) )
and ep.plan_type = #{planType} and ep.plan_type = #{planType}
and CONVERT(varchar(10),GETDATE(), 120) >= CONVERT(varchar(10),ep.plan_loop_start, 120) and CONVERT(varchar(10),GETDATE(), 120) >= CONVERT(varchar(10),ep.plan_loop_start, 120)
@ -80,4 +78,20 @@
where CONVERT(varchar(10),pow.product_date, 120) = CONVERT(varchar(10),GETDATE(), 120) where CONVERT(varchar(10),pow.product_date, 120) = CONVERT(varchar(10),GETDATE(), 120)
and status = 'w1' and status = 'w1'
</select> </select>
<!--创建新表-->
<insert id="createNewTable">
SELECT TOP 0 * INTO ${tableNew} FROM equ_order_person
</insert>
<select id="copyBkDateByTable">
insert into ${table}
select * FROM equ_order_person
where create_time >= #{startDate} and #{endDate}>create_time
</select>
<delete id="deleteBkDateByTable">
delete from equ_order_person
where create_time >= #{startDate} and #{endDate}>create_time
</delete>
</mapper> </mapper>

Loading…
Cancel
Save