|
|
@@ -524,10 +524,12 @@
|
|
|
,ped.USE_STATUS
|
|
|
,(select a.PLAN_DATE from PRESSURE2_EQUIP_PIPE_SCHEDULING a
|
|
|
left join PRESSURE2_EQUIP_PIPE_SCHEDULING_ITEM_DETAIL b on a.ID = b.SCHEDULING_ID
|
|
|
- where b.equip_detail_id = ped.id and a.DELETED = 0 and b.DELETED = 0 and a.type = 100 limit 1) plan_legal_check_date
|
|
|
+ left join PRESSURE_TASK_ORDER pto on a.id = pto.SCHEDULING_ID
|
|
|
+ where b.equip_detail_id = ped.id and a.DELETED = 0 and b.DELETED = 0 and a.type = 100 and pto.task_status != 800 limit 1) plan_legal_check_date
|
|
|
,(select a.PLAN_DATE from PRESSURE2_EQUIP_PIPE_SCHEDULING a
|
|
|
left join PRESSURE2_EQUIP_PIPE_SCHEDULING_ITEM_DETAIL b on a.ID = b.SCHEDULING_ID
|
|
|
- where b.equip_detail_id = ped.id and a.DELETED = 0 and b.DELETED = 0 and a.type = 200 limit 1) plan_year_check_date
|
|
|
+ left join PRESSURE_TASK_ORDER pto on a.id = pto.SCHEDULING_ID
|
|
|
+ where b.equip_detail_id = ped.id and a.DELETED = 0 and b.DELETED = 0 and a.type = 200 and pto.task_status != 800 limit 1) plan_year_check_date
|
|
|
from PRESSURE2_EQUIP_PIPE_DETAIL ped
|
|
|
left join PRESSURE2_EQUIP_PIPE pe on ped.EQUIP_PIPE_ID = pe.ID
|
|
|
where pe.DELETED = 0 and ped.DELETED = 0
|