@@ -43,4 +43,13 @@ public interface XcdChangeOrderDao extends JpaSpecificationExecutor<XcdChangeOrd
...
@@ -43,4 +43,13 @@ public interface XcdChangeOrderDao extends JpaSpecificationExecutor<XcdChangeOrd
//根据告警id得到变更单信息 Add by Charmy
//根据告警id得到变更单信息 Add by Charmy
@Query(value="select change_order_code , change_order_title , change_start_time, change_end_time from xcd_change_order_info_t cross join (select occur_time,warning_id,cast(parameter_value as number) parameter_value,province_id from gjfx_warning_info_t, dim_system_parameter_info_t where warning_id=:warningID and parameter_name='CHANGE_ORDER_SEARCH_HOURS') gjfx_warning_info_t where (change_start_time>occur_time-parameter_value/24 and change_start_time<occur_time+parameter_value/24 or change_end_time>occur_time-parameter_value/24 and change_end_time<occur_time+parameter_value/24) and gjfx_warning_info_t.province_id=xcd_change_order_info_t.province_id order by change_end_time desc",nativeQuery=true)
@Query(value="select change_order_code , change_order_title , change_start_time, change_end_time from xcd_change_order_info_t cross join (select occur_time,warning_id,cast(parameter_value as number) parameter_value,province_id from gjfx_warning_info_t, dim_system_parameter_info_t where warning_id=:warningID and parameter_name='CHANGE_ORDER_SEARCH_HOURS') gjfx_warning_info_t where (change_start_time>occur_time-parameter_value/24 and change_start_time<occur_time+parameter_value/24 or change_end_time>occur_time-parameter_value/24 and change_end_time<occur_time+parameter_value/24) and gjfx_warning_info_t.province_id=xcd_change_order_info_t.province_id order by change_end_time desc",nativeQuery=true)