| | |
| | | import com.ruoyi.basic.vo.CustomerVo; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.mapper.InvoiceLedgerMapper; |
| | | import com.ruoyi.sales.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesQuotationMapper; |
| | |
| | | import java.time.YearMonth; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | |
| | | private final SalesQuotationMapper salesQuotationMapper; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final ReceiptPaymentMapper receiptPaymentMapper; |
| | | private final InvoiceLedgerMapper invoiceLedgerMapper; |
| | | private final SalesReceiptReturnMapper salesReceiptReturnMapper; |
| | | private final AiSessionUserContext aiSessionUserContext; |
| | | |
| | |
| | | SalesQuotationMapper salesQuotationMapper, |
| | | ShippingInfoMapper shippingInfoMapper, |
| | | ReceiptPaymentMapper receiptPaymentMapper, |
| | | InvoiceLedgerMapper invoiceLedgerMapper, |
| | | SalesReceiptReturnMapper salesReceiptReturnMapper, |
| | | AiSessionUserContext aiSessionUserContext) { |
| | | this.customerMapper = customerMapper; |
| | |
| | | this.salesQuotationMapper = salesQuotationMapper; |
| | | this.shippingInfoMapper = shippingInfoMapper; |
| | | this.receiptPaymentMapper = receiptPaymentMapper; |
| | | this.invoiceLedgerMapper = invoiceLedgerMapper; |
| | | this.salesReceiptReturnMapper = salesReceiptReturnMapper; |
| | | this.aiSessionUserContext = aiSessionUserContext; |
| | | } |
| | |
| | | return Map.of(); |
| | | } |
| | | Map<Long, BigDecimal> result = new HashMap<>(); |
| | | for (InvoiceLedgerDto item : defaultList(invoiceLedgerMapper.invoicedTotal(ledgerIds))) { |
| | | if (item.getSalesLedgerId() == null) { |
| | | continue; |
| | | } |
| | | result.merge(item.getSalesLedgerId().longValue(), defaultDecimal(item.getInvoiceTotal()), BigDecimal::add); |
| | | } |
| | | // for (InvoiceLedgerDto item : defaultList(invoiceLedgerMapper.invoicedTotal(ledgerIds))) { |
| | | // if (item.getSalesLedgerId() == null) { |
| | | // continue; |
| | | // } |
| | | // result.merge(item.getSalesLedgerId().longValue(), defaultDecimal(item.getInvoiceTotal()), BigDecimal::add); |
| | | // } |
| | | return result; |
| | | } |
| | | |