| | |
| | | import com.by4cloud.platformx.business.mapper.HistoryOverdueMapper; |
| | | import com.by4cloud.platformx.business.mapper.PaymentConfirmMapper; |
| | | import com.by4cloud.platformx.business.service.BusinessCustomerService; |
| | | import com.by4cloud.platformx.business.service.ContractPaymentScheduleService; |
| | | import com.by4cloud.platformx.business.service.ContractService; |
| | | import com.by4cloud.platformx.business.service.PaymentConfirmService; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 收款确认 |
| | |
| | | entity.setConfirmTime(new Date()); |
| | | baseMapper.insert(entity); |
| | | } |
| | | // 查询所有付款阶段是否都付款完成 |
| | | List<ContractPaymentSchedule> scheduleList = contractPaymentScheduleMapper.selectList(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId,contract.getId())); |
| | | if (ArrayUtil.isNotEmpty(scheduleList.toArray())){ |
| | | if (scheduleList.stream().allMatch(item -> Objects.equals(item.getPaymentStatus(), 2))){ |
| | | contract.setContractStatus(3); |
| | | contractService.updateById(contract); |
| | | }; |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |