Commit edebc4d9 by kangxiaoshan

1

parent bfc95c37
......@@ -42,14 +42,6 @@ public class ContractController {
private static final Logger logger = LoggerFactory.getLogger(ContractController.class);
private static final Map<String, String> CONTRACT_STATUS = new HashMap<String, String>() {{
// put(ContractStatusEnum.WAIT.getKey(), ContractStatusEnum.WAIT.getValue());
// put(ContractStatusEnum.EXECUTING.getKey(), ContractStatusEnum.EXECUTING.getValue());
// put(ContractStatusEnum.END.getKey(), ContractStatusEnum.END.getValue());
// put(ContractStatusEnum.CANCEL.getKey(), ContractStatusEnum.CANCEL.getValue());
// put(ContractStatusEnum.MONEY_BACK_ALL.getKey(), ContractStatusEnum.MONEY_BACK_ALL.getValue());
// put(ContractStatusEnum.MONEY_BACK_PART.getKey(), ContractStatusEnum.MONEY_BACK_PART.getValue());
// put(ContractStatusEnum.MONEY_BACK_NONE.getKey(), ContractStatusEnum.MONEY_BACK_NONE.getValue());
// put(ContractStatusEnum.DELETE.getKey(), ContractStatusEnum.DELETE.getValue());
putdata(this, ContractStatusEnum.WAIT);
putdata(this, ContractStatusEnum.EXECUTING);
......
......@@ -20,7 +20,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value="select count(*) from contract where email = ?1 and platform = ?2",nativeQuery=true)
BigInteger countNumByEmail(String email, String platfrom);
@Query(value="select * from contract where start_date >= ?1 and start_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 >=?2) or (start_date >=?1 and start_date <=?2) or (end_date >=?1 and end_date <=?2 ) and platform = ?3 and status!='del' order by ds desc",nativeQuery=true)
List<Contract> findByDs(String startDate, String endDate, String platfrom);
@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)
......@@ -59,7 +59,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select * from contract where platform = ?1 and contract_code = ?2",nativeQuery = true)
Contract findByCodePlatform(String contractCode, String platform);
@Query(value="select * from contract where start_date >= ?1 and start_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 >=?2) or (start_date >=?1 and start_date <=?2) or (end_date >=?1 and end_date <=?2 ) and platform in ?3 and id in ?4 and status!='del' order by ds desc",nativeQuery=true)
List<Contract> findByDsRelation(String startDate, String endDate, List<String> platform, List<String> contractIds);
@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)
......@@ -83,16 +83,16 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select * from contract where contract_code =?2 and platform = ?1 ",nativeQuery = true)
Contract findOneByCode(String platform, String contractId);
@Query(value = "select * from contract where start_date >= ?1 and start_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 >=?2) or (start_date >=?1 and start_date <=?2) or (end_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)
List<Contract> findByDsContractBody(String startDate, String endDate, List<String> platforms, List bodyids, List<String> ids);
@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' order by ds desc",nativeQuery = true)
@Query(value = "select * from contract where (start_date <=?1 and end_date >=?2) or (start_date >=?1 and start_date <=?2) or (end_date >=?1 and end_date <=?2 ) and platform = ?3 and my_body_code in ?4 and status!='del' order by ds desc",nativeQuery = true)
List<Contract> findByDsContractBody(String startDate, String endDate, String platform, List bodyids);
@Query(value = "select * from contract where start_date >= ?1 and start_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 >=?2) or (start_date >=?1 and start_date <=?2) or (end_date >=?1 and end_date <=?2 ) and platform = ?3 and sale in ?4 and status!='del' order by ds desc",nativeQuery = true)
List<Contract> findByDsContractSalse(String startDate, String endDate, String platform, List salseid);
@Query(value = "select * from contract where start_date >= ?1 and start_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 >=?2) or (start_date >=?1 and start_date <=?2) or (end_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)
List<Contract> findByDsContractSalse(String startDate, String endDate, List<String> platforms, List salseid, List<String> ids);
@Query(value = "select contract_code,my_body_code,sale,platform from contract where contract_code in ?1",nativeQuery = true)
......
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