| | |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.impl.ReceiptPaymentServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | LambdaQueryWrapper<ApproveProcess> approveProcessLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | approveProcessLambdaQueryWrapper.eq(ApproveProcess::getApproveDelete, 0) |
| | | .eq(ApproveProcess::getApproveUserCurrentId, loginUser.getUserId()) |
| | | .ne(ApproveProcess::getApproveStatus, 2) |
| | | .eq(ApproveProcess::getTenantId, loginUser.getTenantId()); |
| | | .ne(ApproveProcess::getApproveStatus, 2); |
| | | // .eq(ApproveProcess::getTenantId, loginUser.getTenantId()) |
| | | List<ApproveProcess> approveProcesses = approveProcessMapper.selectList(approveProcessLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty(approveProcesses)){ |
| | | approveProcesses = new ArrayList<>(); |
| | |
| | | return productionTurnoverDto; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Long overdueReceivable() { |
| | | // 通过登记日期超过15天的未回款提示 |
| | | LambdaQueryWrapper<SalesLedgerProduct> lambdaWrapper = new LambdaQueryWrapper<>(); |
| | | // 时间条件:registerDate < 当前时间 - 15天 |
| | | lambdaWrapper.apply("register_date < DATE_SUB(NOW(), INTERVAL 15 DAY)"); |
| | | // 未回款条件:pendingInvoiceTotal > 0 |
| | | lambdaWrapper.gt(SalesLedgerProduct::getPendingInvoiceTotal, 0); |
| | | return salesLedgerProductMapper.selectCount(lambdaWrapper); |
| | | } |
| | | |
| | | |
| | | } |