| | |
| | | * @Date 2026/1/23 9:14 |
| | | */ |
| | | @Slf4j |
| | | |
| | | @Service |
| | | public class JobWarnService { |
| | | |
| | |
| | | */ |
| | | @Scheduled(cron = "0 0 2 * * ?") |
| | | public void timer() { |
| | | doExe(); |
| | | doExe(null); |
| | | } |
| | | |
| | | /** |
| | | * 开始质押合同核算 |
| | | */ |
| | | public void doExe() { |
| | | |
| | | List<PledgeContract> contractList = contractService.getContractByPledge(new Date()); |
| | | public void doExe(String bankId) { |
| | | List<PledgeContract> contractList = contractService.getContractByPledge(new Date(), bankId); |
| | | if (null == contractList || contractList.isEmpty()) { |
| | | log.error("-----当前没有有效期的质押合同,不执行提醒核算-----"); |
| | | return; |
| | | } |
| | | |
| | | Depot depot; |
| | | FoodPrice foodPrice; |
| | | WorkOrderConf conf; |
| | |
| | | |
| | | per = sumMoney / backMoney; |
| | | |
| | | if (per > 1.1) { |
| | | if (per < 1.1) { |
| | | log.error("-----当前合同={}下质押仓库={}库存未到待还款的110%,sumMoney={},backMoney={},不生成还款提醒工单-----", pledgeContract.getName(), pledgeContract.getDepotNames(), sumMoney, backMoney); |
| | | continue; |
| | | } |