Commit 75ac6503 by kangxiaoshan

分摊金

parent 5a0edc86
......@@ -117,6 +117,6 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@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)
List<Contract> findShareContranctByDateFinace(String startDate, String endDate, String platform, List<String> financeBodies);
@Query(value = "select contract_code from contract where customer_body =?1 and contract_code <> ?2 limit 3 ", nativeQuery = true)
@Query(value = "select contract_code from contract where customer_body =?1 and contract_code <> ?2 and status in ('backfirst','normal','late') limit 3 ", nativeQuery = true)
List<String> findContractBodyNames(String customerBody, String contractCode);
}
......@@ -82,8 +82,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}
}
/*contracts = new ArrayList<>();
contracts.add(contractRepository.findOne(1355L));*/
/* contracts = new ArrayList<>();
contracts.add(contractRepository.findOne(1360L));*/
List<ContractBody> bodies = contractBodyRepository.findAll();
Map<String, String> bodiesNameMap = bodies.stream().collect(
......@@ -176,9 +176,10 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
contract.setAdjustmentFund(0L);
contract.setIncomeShareAll(contract.getIntervaIncomeShare());
} else if (selected[1].isBefore(creatPoints[1].plusDays(betweenMonth > 1 ? -1 : 0))) {
//录入月1号之前 调整金为 0
} else if (selected[1].isBefore(creatPoints[1])) {
//录入月1号之前 调整金为 0 分摊为 0
contract.setIntervaIncomeShare(0L);
contract.setAdjustmentFund(0L);
contract.setIncomeShareAll(contract.getIntervaIncomeShare());
contract.setStatus(ContractStatusEnum.LATE.getKey());
} else {
......
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