Commit 7dbba580 by kangxiaoshan

1

parent 91eebac2
...@@ -100,20 +100,20 @@ public interface ContractRepository extends JpaRepository<Contract, Long> { ...@@ -100,20 +100,20 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
// @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 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 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 status!='del' ",nativeQuery = true)
List<Contract> findShareContranctByDate3(String startDate, String endDate, String platform,String endCreate); List<Contract> findShareContranctByDate3(String startDate, String endDate, String platform );
@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 start_date <=?2 and platform=?3 and my_body_code = ?4 and status!='del' ",nativeQuery = true)
List<Contract> findShareContranctByDate2(String startDate, String endDate, String platform, String bodyCode,String endCreate); List<Contract> findShareContranctByDate2(String startDate, String endDate, String platform, String bodyCode);
@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 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)
List<Contract> findShareContranctByDateSerche(String startDate, String endDate, String platform, String serchName,String endCreate); List<Contract> findShareContranctByDateSerche(String startDate, String endDate, String platform, String serchName);
@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 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)
List<Contract> findShareContranctByDate1(String startDate, String endDate, String platform, String bodyCode, String serchName,String endCreate); List<Contract> findShareContranctByDate1(String startDate, String endDate, String platform, String bodyCode, String serchName);
@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 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)
List<Contract> findShareContranctByDateSercheFinace(String startDate, String endDate, String platform, String serchName, List<String> financeBodies,String endCreate); List<Contract> findShareContranctByDateSercheFinace(String startDate, String endDate, String platform, String serchName, List<String> financeBodies);
@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 start_date <=?2 and platform=?3 and my_body_code in ?4 and status!='del' ",nativeQuery = true)
List<Contract> findShareContranctByDateFinace(String startDate, String endDate, String platform, List<String> financeBodies,String endCreate); List<Contract> findShareContranctByDateFinace(String startDate, String endDate, String platform, List<String> financeBodies);
} }
...@@ -2387,7 +2387,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -2387,7 +2387,7 @@ public class ContractServiceImpl implements ContractService {
//沒有权限查看 //沒有权限查看
return contracts; return contracts;
} else { } else {
contracts = contractRepository.findShareContranctByDate1(startDate, endDate, platform, bodyCode, serchName,endCreate); contracts = contractRepository.findShareContranctByDate1(startDate, endDate, platform, bodyCode, serchName);
} }
} else if (!StringUtils.isEmpty(bodyCode)) { } else if (!StringUtils.isEmpty(bodyCode)) {
...@@ -2395,19 +2395,19 @@ public class ContractServiceImpl implements ContractService { ...@@ -2395,19 +2395,19 @@ public class ContractServiceImpl implements ContractService {
//沒有权限查看 //沒有权限查看
return contracts; return contracts;
} else { } else {
contracts = contractRepository.findShareContranctByDate2(startDate, endDate, platform, bodyCode,endCreate); contracts = contractRepository.findShareContranctByDate2(startDate, endDate, platform, bodyCode);
} }
} else if (!StringUtils.isEmpty(serchName)) { } else if (!StringUtils.isEmpty(serchName)) {
if (financeBodies != null) { if (financeBodies != null) {
contracts = contractRepository.findShareContranctByDateSercheFinace(startDate, endDate, platform, serchName, financeBodies,endCreate); contracts = contractRepository.findShareContranctByDateSercheFinace(startDate, endDate, platform, serchName, financeBodies);
} else { } else {
contracts = contractRepository.findShareContranctByDateSerche(startDate, endDate, platform, serchName,endCreate); contracts = contractRepository.findShareContranctByDateSerche(startDate, endDate, platform, serchName);
} }
} else { } else {
if (financeBodies != null) { if (financeBodies != null) {
contracts = contractRepository.findShareContranctByDateFinace(startDate, endDate, platform, financeBodies,endCreate); contracts = contractRepository.findShareContranctByDateFinace(startDate, endDate, platform, financeBodies);
} else { } else {
contracts = contractRepository.findShareContranctByDate3(startDate, endDate, platform,endCreate); contracts = contractRepository.findShareContranctByDate3(startDate, endDate, platform);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment