2025-06-23 回款登记导出+分页查询条件问题修复+【采购管理】-【来票登记】,合同金额列后面增加已开票金额、待开票金额两列
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.config; |
| | | |
| | | import org.apache.catalina.connector.Connector; |
| | | import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | // ä¿®æ¹tomcaté
ç½®ï¼å¯¹getä¸[]æ¾è¡ |
| | | @Configuration |
| | | public class TomcatConfig { |
| | | @Bean |
| | | public TomcatServletWebServerFactory webServerFactory() { |
| | | TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(); |
| | | factory.addConnectorCustomizers((Connector connector) -> { |
| | | connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}"); |
| | | connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}"); |
| | | }); |
| | | return factory; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | public interface PurchaseLedgerMapper extends BaseMapper<PurchaseLedger> { |
| | | |
| | | int updateContractAmountById(@Param("id") Long id, @Param("totalTaxInclusiveAmount") BigDecimal totalTaxInclusiveAmount); |
| | | |
| | | IPage<PurchaseLedger> selectPurchaseLedgerListPage(IPage ipage, @Param("c") PurchaseLedger purchaseLedger); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | */ |
| | | private String phoneNumber; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("æ¥ç¥¨éé¢") |
| | | private String receiptPaymentAmount; |
| | | |
| | | @ApiModelProperty("æªæ¥ç¥¨éé¢") |
| | | @TableField(exist = false) |
| | | private String unReceiptPaymentAmount; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<PurchaseLedger> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedger purchaseLedger) { |
| | | LambdaQueryWrapper<PurchaseLedger> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (StringUtils.isNotBlank(purchaseLedger.getPurchaseContractNumber())) { |
| | | queryWrapper.like(PurchaseLedger::getPurchaseContractNumber, purchaseLedger.getPurchaseContractNumber()); |
| | | } |
| | | return purchaseLedgerMapper.selectPage(ipage, queryWrapper); |
| | | |
| | | return purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("/receiptPayment") |
| | |
| | | |
| | | @ApiModelProperty("导åºå款ç»è®°") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArrayList<Long> ids) { |
| | | //ids鿩就æ¯å
¨å¯¼åº |
| | | // if (ids == null || ids.size() == 0) { |
| | | // receiptPaymentService.exportPaymentList(response); |
| | | // } |
| | | receiptPaymentService.exportPaymentList(response, ids); |
| | | public void export(HttpServletResponse response, @RequestParam("ids") String idsStr) { |
| | | if (idsStr == null || idsStr.trim().isEmpty()) { |
| | | throw new RuntimeException("è¯·éæ©è¦å¯¼åºçè®°å½"); |
| | | } |
| | | |
| | | ArrayList<Long> ids = (ArrayList<Long>) Arrays.stream(idsStr.split(",")) |
| | | .map(s -> s.replaceAll("[\\[\\]]", "").trim()) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | |
| | | |
| | | receiptPaymentService.exportPaymentList(response, ids); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¼ç¥¨å°è´¦è¯¦æ
|
| | | * @param id |
| | |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ææ¬") |
| | | @Excel(isExport = false) |
| | | private String searchText; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦sales_ledger") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | public class ReceiptPaymentExeclDto { |
| | | |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | @Excel(name = "éå®ååå·",sort = 1) |
| | | private String salesContractNo; |
| | | |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | @Excel(name = "客æ·ååå·",sort = 2) |
| | | |
| | | private String customerContractNo; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | @Excel(name = "客æ·åç§°",sort = 3) |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "产å大类") |
| | | @Excel(name = "产å大类",sort = 4) |
| | | private String productCategory; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | @Excel(name = "项ç®åç§°",sort = 5) |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "å票å·") |
| | | @Excel(name = "å票å·",sort = 6) |
| | | private String invoiceNo; |
| | | |
| | | @ApiModelProperty(value = "å票éé¢") |
| | | @Excel(name = "å票éé¢",sort = 7) |
| | | private BigDecimal invoiceTotal; |
| | | |
| | | @ApiModelProperty(value = "ç¨çï¼%ï¼") |
| | | @Excel(name = "ç¨çï¼%ï¼",sort = 8) |
| | | private BigDecimal taxRate; |
| | | |
| | | @ApiModelProperty(value = "忬¾éé¢") |
| | | @Excel(name = "忬¾éé¢",sort = 9) |
| | | private BigDecimal receiptPaymentAmountTotal; |
| | | |
| | | @ApiModelProperty(value = "å¾
忬¾éé¢") |
| | | @Excel(name = "å¾
忬¾éé¢",sort = 10) |
| | | private BigDecimal noReceiptAmount; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.sales.dto.CustomerInteractionDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentExeclDto; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | List<ReceiptPaymentDto> bindInvoiceNoRegListAll(); |
| | | |
| | | List<ReceiptPaymentDto> bindInvoiceNoRegListByIds(ArrayList<Long> ids); |
| | | List<ReceiptPaymentExeclDto> bindInvoiceNoRegListByIds(List<Long> ids); |
| | | } |
| | |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | /** |
| | | * é¨å导åºå款å表 |
| | | */ |
| | | void exportPaymentList(HttpServletResponse response, ArrayList<Long> ids); |
| | | void exportPaymentList(HttpServletResponse response, List<Long> ids); |
| | | } |
| | |
| | | import com.ruoyi.sales.dto.CustomerInteractionDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentExeclDto; |
| | | import com.ruoyi.sales.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void exportPaymentList(HttpServletResponse response, ArrayList<Long> ids) { |
| | | List<ReceiptPaymentDto> receiptPaymentDtoList = receiptPaymentMapper.bindInvoiceNoRegListByIds(ids); |
| | | ExcelUtil<ReceiptPaymentDto> util = new ExcelUtil<ReceiptPaymentDto>(ReceiptPaymentDto.class); |
| | | public void exportPaymentList(HttpServletResponse response, List<Long> ids) { |
| | | List<ReceiptPaymentExeclDto> receiptPaymentDtoList = receiptPaymentMapper.bindInvoiceNoRegListByIds(ids); |
| | | ExcelUtil<ReceiptPaymentExeclDto> util = new ExcelUtil<ReceiptPaymentExeclDto>(ReceiptPaymentExeclDto.class); |
| | | util.exportExcel(response, receiptPaymentDtoList, "忬¾ç»è®°"); |
| | | } |
| | | } |
| | |
| | | SET contract_amount = #{totalTaxInclusiveAmount} |
| | | WHERE id = #{id} |
| | | </update> |
| | | <select id="selectPurchaseLedgerListPage" resultType="com.ruoyi.purchase.pojo.PurchaseLedger"> |
| | | select |
| | | pl.id, |
| | | pl.purchase_contract_number , |
| | | pl.sales_contract_no, |
| | | pl.supplier_name, |
| | | pl.project_name, |
| | | pl.contract_amount, |
| | | sum(pr.tickets_amount)as receipt_payment_amount, |
| | | pl.contract_amount-sum(pr.tickets_amount) AS unReceipt_payment_amount, |
| | | pl.entry_date, |
| | | pl.recorder_name |
| | | from purchase_ledger pl |
| | | left join product_record pr on pl.id = pr.purchase_ledger_id |
| | | <where> |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | pl.purchase_contract_number like concat('%',#{c.purchaseContractNumber},'%') |
| | | </if> |
| | | </where> |
| | | group by pl.id, pl.purchase_contract_number, pl.sales_contract_no, pl.supplier_name, |
| | | pl.project_name,pl.entry_date, |
| | | pl.recorder_name, |
| | | pl.contract_amount |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | AND T3.customer_name LIKE CONCAT('%',#{c.customerName},'%') |
| | | </if> |
| | | <if test="c.customerContractNo != null and c.customerContractNo !=''"> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{c.customerContractNo},'%') |
| | | AND T3.customer_contract_no LIKE CONCAT('%',#{c.customerContractNo},'%') |
| | | </if> |
| | | <if test="c.projectName != null and c.projectName !=''"> |
| | | AND T3.project_name LIKE CONCAT('%',#{c.projectName},'%') |
| | |
| | | AND T4.project_name LIKE CONCAT('%',#{params.projectName},'%') |
| | | </if> |
| | | <if test="params.customerContractNo != null and params.customerContractNo != '' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{params.customerContractNo},'%') |
| | | AND T4.customer_contract_no LIKE CONCAT('%',#{params.customerContractNo},'%') |
| | | </if> |
| | | <if test="params.salesContractNo != null and params.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{params.salesContractNo},'%') |
| | | AND T4.sales_contract_no LIKE CONCAT('%',#{params.salesContractNo},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.receipt_payment_date DESC |
| | |
| | | BY invoice_ledger_id |
| | | ) T6 ON T1.id = T6.invoice_ledger_id |
| | | </select> |
| | | <select id="bindInvoiceNoRegListByIds" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | <select id="bindInvoiceNoRegListByIds" resultType="com.ruoyi.sales.dto.ReceiptPaymentExeclDto"> |
| | | SELECT |
| | | T1.id , |
| | | T1.invoice_no , |
| | |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.sales_contract_no != null and salesLedgerDto.sales_contract_no != '' "> |
| | | T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |