@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and create_account in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and create_account in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="SELECT * from contract where platform = ?1 and email = ?2 and (status = 'wait' or status = 'executing') and type = 'main' order by ds desc limit 1",nativeQuery=true)
@Query(value="SELECT * from contract where platform = ?1 and email = ?2 and (status = 'wait' or status = 'executing') and type = 'main' order by ds desc limit 1",nativeQuery=true)
@Query(value="SELECT * from contract where start_date = ?1 and status <> 'cancel'",nativeQuery=true)
@Query(value="SELECT * from contract where start_date = ?1 and status <> 'cancel'",nativeQuery=true)
List<Contract>findByStartDate(StringstartDate);
List<Contract>findByStartDate(StringstartDate);
@Query(value="SELECT * from contract where end_date <= ?1 and (status <> 'end' or status <> 'cancel')",nativeQuery=true)
@Query(value="SELECT * from contract where end_date <= ?1 and (status <> 'end' or status <> 'cancel')",nativeQuery=true)
List<Contract>findByEndDate(StringendDate);
List<Contract>findByEndDate(StringendDate);
@Query(value="select count(*) from contract where my_body_code = ?1",nativeQuery=true)
@Query(value="select count(*) from contract where my_body_code = ?1",nativeQuery=true)
BigIntegerfindcountContract(Stringplatform);
BigIntegerfindcountContract(Stringplatform);
@Query(value="select new map( c.id as id, c.contractCode as contractCode ) from Contract c where c.platform in ?1 and c.contractCode is not null and c.contractCode <> 'null' and c.status <>'del'")
@Query(value="select new map( c.id as id, c.contractCode as contractCode ) from Contract c where c.platform in ?1 and c.contractCode is not null and c.contractCode <> 'null' and c.status <>'del'")
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and id in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and id in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and create_account in ?4 and id in ?5 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and create_account in ?4 and id in ?5 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and my_body_code in ?4 and id in ?5 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and my_body_code in ?4 and id in ?5 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and my_body_code in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and my_body_code in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and sale in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and sale in ?4 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and sale in ?4 and id in ?5 and status!='del' order by ds desc",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and sale in ?4 and id in ?5 and status!='del' order by ds desc",nativeQuery=true)
// @Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and end_date >= ?1 and create_time <= ?4 and platform=?3 and status!='del' ",nativeQuery = true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and platform=?3 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and platform=?3 and my_body_code = ?4 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code = ?4 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?4%) and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?4%) and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and platform=?3 and my_body_code = ?4 and (my_body_name like %?5% or customer_body like %?5% or contract_code like %?5%) and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code = ?4 and (my_body_name like %?5% or customer_body like %?5% or contract_code like %?5%) and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?5%) and my_body_code in ?5 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?5%) and my_body_code in ?5 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where start_date >= ?1 and start_date <=?2 and platform=?3 and my_body_code in ?4 and status!='del' ",nativeQuery=true)
@Query(value="select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code in ?4 and status!='del' ",nativeQuery=true)