Commit 4b36d979 by kangxiaoshan

大后台

parent 8f41fafa
......@@ -111,7 +111,7 @@ public class ContractController {
.append(c.getMoney()).append(",")
.append(CONTRACT_STATUS.get(c.getContractType())).append(",")
.append(CONTRACT_STATUS.get(c.getStatus())).append(",")
.append(CONTRACT_STATUS.get(c.getBackStatus()+"")).append(",")
.append(CONTRACT_STATUS.get(c.getBackStatus()+"_back")).append(",")
.append(c.getRelationCode() == null ? "" : c.getRelationCode()).append(",")
.append("\r\n");
}
......
......@@ -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 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)
@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)
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 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)
@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)
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 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)
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 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)
List<Contract> findByDsContractBody(String startDate, String endDate, String platform, List bodyids);
@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)
List<Contract> findByDsContractSalse(String startDate, String endDate, String platform, List salseid);
@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)
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)
......
......@@ -714,7 +714,6 @@ public class ContractServiceImpl implements ContractService {
for (Contract contract : contractList) {
if (contract.getType().equals(ContractTypeEnum.MAIN.getKey())
|| (contract.getType().equals(ContractTypeEnum.INCREMENT.getKey()) && contract.getPriceLevel().equals(1L))) {
if (contract.getStatus().equals(ContractStatusEnum.EXECUTING.getKey())
|| contract.getStatus().equals(ContractStatusEnum.WAIT.getKey())) {
contract.setStatus(ContractStatusEnum.CANCEL.getKey());
......
......@@ -14,9 +14,9 @@ public enum ContractStatusEnum {
// MONEY_BACK_NONE("backnone", "未回款"),
// MONEY_BACK_PART("backpart", "部分回款"),
BACK_NONE("1", "未回款"),
BACK_PART("2", "部分回款"),
BACK_ALL("3", "已回款"),
BACK_NONE("1_back", "未回款"),
BACK_PART("2_back", "部分回款"),
BACK_ALL("3_back", "已回款"),
MONEY_BACK_FIRST("backfirst", "先回款待录入"),
CANCEL("cancel", "作废"),
......
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