| | |
| | | package com.ruoyi.sales.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.service.InvoiceLedgerService; |
| | |
| | | return AjaxResult.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 开票台账查询 |
| | | * @param invoiceLedgerDto |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public AjaxResult invoiceLedgerList(InvoiceLedgerDto invoiceLedgerDto) { |
| | | return AjaxResult.success(invoiceLedgerService.invoiceLedgerList(invoiceLedgerDto)); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult receiptPaymentAdd (@RequestBody ReceiptPayment receiptPayment) { |
| | | receiptPaymentService.receiptPaymentAdd(receiptPayment); |
| | | @PostMapping("/saveOrUpdate") |
| | | public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) { |
| | | receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | return AjaxResult.success(receiptPaymentService.receiptPaymentListPage(page,receiptPaymentDto)); |
| | | } |
| | | |
| | | /** |
| | | * 回款登记详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/info") |
| | | public AjaxResult receiptPaymentInfo (Integer id) { |
| | | return AjaxResult.success(receiptPaymentService.receiptPaymentInfo(id)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class ReceiptPaymentDto extends ReceiptPayment { |
| | | |
| | | @ApiModelProperty(value = "客户合同号") |
| | | private String customerContractNo; |
| | | |
| | | @ApiModelProperty(value = "客户名称") |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "查询文本") |
| | | private String searchText; |
| | | |
| | | } |
| | |
| | | public interface ReceiptPaymentMapper extends BaseMapper<ReceiptPayment> { |
| | | |
| | | IPage<ReceiptPaymentDto> receiptPaymentListPage(Page page, @Param("receiptPaymentDto") ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | ReceiptPaymentDto receiptPaymentInfo(Integer id); |
| | | } |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | |
| | | private Integer invoiceLedgerId; |
| | | |
| | | @ApiModelProperty(value = "来款日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime receiptPaymentDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate receiptPaymentDate; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | * @return |
| | | */ |
| | | void invoiceLedgerCommitFile(InvoiceLedgerDto invoiceLedgerDto); |
| | | |
| | | /** |
| | | * 开票台账查询 |
| | | * @param invoiceLedgerDto |
| | | * @return |
| | | */ |
| | | List<InvoiceLedgerDto> invoiceLedgerList(InvoiceLedgerDto invoiceLedgerDto); |
| | | } |
| | |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | int receiptPaymentAdd(ReceiptPayment receiptPayment); |
| | | int receiptPaymentSaveOrUpdate(ReceiptPayment receiptPayment); |
| | | |
| | | /** |
| | | * 回款登记修改 |
| | |
| | | * @return |
| | | */ |
| | | IPage<ReceiptPaymentDto> receiptPaymentListPage (Page page, ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * 回款登记详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ReceiptPaymentDto receiptPaymentInfo(Integer id); |
| | | } |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.stream.Collectors; |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 开票台账查询 |
| | | * @param invoiceLedgerDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<InvoiceLedgerDto> invoiceLedgerList(InvoiceLedgerDto invoiceLedgerDto) { |
| | | return invoiceLedgerMapper.invoiceLedgerList(invoiceLedgerDto); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int receiptPaymentAdd(ReceiptPayment receiptPayment) { |
| | | public int receiptPaymentSaveOrUpdate(ReceiptPayment receiptPayment) { |
| | | if(null==receiptPayment.getId()){ |
| | | return receiptPaymentMapper.insert(receiptPayment); |
| | | }else { |
| | | return receiptPaymentMapper.updateById(receiptPayment); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | public IPage<ReceiptPaymentDto> receiptPaymentListPage(Page page, ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentMapper.receiptPaymentListPage(page, receiptPaymentDto); |
| | | } |
| | | |
| | | /** |
| | | * 回款登记详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ReceiptPaymentDto receiptPaymentInfo(Integer id) { |
| | | return receiptPaymentMapper.receiptPaymentInfo(id); |
| | | } |
| | | } |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.sales.mapper.ReceiptPaymentMapper"> |
| | | <select id="invoiceLedgerPage" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | <select id="receiptPaymentListPage" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | SELECT |
| | | T1.id , |
| | | T1.sales_ledger_id , |
| | |
| | | T1.update_time , |
| | | T1.update_user , |
| | | T1.tenant_id , |
| | | T3.customer_contract_no, |
| | | T2.customer_name |
| | | FROM receipt_payment T1 |
| | | LEFT JOIN customer T2 ON T1.customer_id = T2.id |
| | | LEFT JOIN sales_ledger T3 ON T1.sales_ledger_id = T3.id |
| | | <where> |
| | | <if test="receiptPaymentDto.searchText != null and receiptPaymentDto.searchText != ''"> |
| | | AND ( |
| | | T2.customer_name LIKE CONCAT('%',#{receiptPaymentDto.searchText},'%') |
| | | OR T1.sales_contract_no LIKE CONCAT('%',#{receiptPaymentDto.searchText},'%') |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="receiptPaymentInfo" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | SELECT |
| | | T1.id , |
| | | T1.sales_ledger_id , |
| | | T1.sales_contract_no , |
| | | T1.customer_id , |
| | | T1.invoice_no , |
| | | T1.invoice_amount , |
| | | T1.tax_rate , |
| | | T1.receipt_payment_type , |
| | | T1.receipt_payment_amount , |
| | | T1.registrant , |
| | | T1.receipt_payment_date , |
| | | T1.create_time , |
| | | T1.create_user , |
| | | T1.update_time , |
| | | T1.update_user , |
| | | T1.tenant_id, |
| | | T1.invoice_ledger_id, |
| | | T3.customer_contract_no, |
| | | T2.customer_name |
| | | FROM receipt_payment T1 |
| | | LEFT JOIN customer T2 ON T1.customer_id = T2.id |
| | | LEFT JOIN sales_ledger T3 ON T1.sales_ledger_id = T3.id |
| | | WHERE T1.id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |