| | |
| | | @PostMapping("/import") |
| | | @Log(title = "ä¾åºå导å
¥", businessType = BusinessType.IMPORT) |
| | | public AjaxResult importData(MultipartFile file) { |
| | | return AjaxResult.success(supplierService.importData(file)); |
| | | Boolean b = supplierService.importData(file); |
| | | if (b) { |
| | | return AjaxResult.success("导å
¥æå"); |
| | | } |
| | | return AjaxResult.error("导å
¥å¤±è´¥"); |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseDto; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseReportDto; |
| | | import com.ruoyi.purchase.pojo.InvoicePurchase; |
| | | import com.ruoyi.purchase.service.IInvoicePurchaseService; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @Api(tags = "éè´æ¥è¡¨") |
| | | @RequestMapping("/purchase/report") |
| | | @AllArgsConstructor |
| | | public class AccountingReportController { |
| | | |
| | | @Autowired |
| | | private IInvoicePurchaseService invoicePurchaseService; |
| | | |
| | | @GetMapping("/list") |
| | | @Log(title = "éè´æ¥è¡¨", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto) { |
| | | IPage<InvoicePurchaseReportDto> result =invoicePurchaseService.listPurchaseReport(page, invoicePurchaseReportDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.service.IPurchaseLedgerService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public IPage<PurchaseLedger> listPage(Page page, PurchaseLedger purchaseLedger) { |
| | | return purchaseLedgerService.selectPurchaseLedgerListPage(page ,purchaseLedger); |
| | | } |
| | | |
| | | @ApiOperation("çæéè´åºåå·") |
| | | @GetMapping("/createPurchaseNo") |
| | | @Log(title = "çæéè´åºåå·", businessType = BusinessType.OTHER) |
| | | public String createPurchaseNo() { |
| | | return purchaseLedgerService.getPurchaseNo(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * å页æ¥è¯¢äº§åä¿¡æ¯å¼ç¥¨è®°å½å表 |
| | | */ |
| | | @GetMapping("/productRecordPage") |
| | | public AjaxResult productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto) { |
| | | IPage<ProductRecord> list = productRecordService.productRecordPage(page,ticketRegistrationDto); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åç¥¨å· |
| | | */ |
| | | @GetMapping("/getTicketNo") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ¥è¡¨åæ---项ç®å©æ¶¦ |
| | | */ |
| | | @Data |
| | | public class InvoicePurchaseReportDto { |
| | | |
| | | //éå®ååå· |
| | | private String customerContractNo; |
| | | // 客æ·åç§° |
| | | private String customerName; |
| | | // 项ç®åç§° |
| | | private String projectName; |
| | | // ååéé¢ |
| | | private String contractAmount; |
| | | // éè´éé¢ |
| | | private String purchaseAmount; |
| | | |
| | | private String saleTaxExclusiveTotalPrice; |
| | | |
| | | private String taxExclusiveTotalPrice; |
| | | // 婿¶¦ |
| | | private String balance; |
| | | // 婿¶¦ç |
| | | private String balanceRatio; |
| | | // å¢å¼ç¨ |
| | | private String balanceAmount; |
| | | |
| | | } |
| | |
| | | |
| | | // 已仿¬¾æ»éé¢ |
| | | private BigDecimal paymentAmountTotal; |
| | | |
| | | private String paymentDateStart; |
| | | |
| | | private String paymentDateEnd; |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseReportDto; |
| | | import com.ruoyi.purchase.pojo.InvoicePurchase; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å票信æ¯Mapperæ¥å£ |
| | |
| | | * @date 2025-05-14 |
| | | */ |
| | | public interface InvoicePurchaseMapper extends BaseMapper<InvoicePurchase> { |
| | | |
| | | |
| | | IPage<InvoicePurchaseReportDto> selectPurchaseReport(IPage page, @Param("c") InvoicePurchaseReportDto invoicePurchaseReportDto); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.purchase.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.purchase.dto.TicketRegistrationDto; |
| | | import com.ruoyi.purchase.pojo.ProductRecord; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface ProductRecordMapper extends BaseMapper<ProductRecord> { |
| | | |
| | | IPage<ProductRecord> productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto); |
| | | } |
| | |
| | | @ApiModelProperty(value = "æªä»æ¬¾æ»éé¢") |
| | | @TableField(exist = false) |
| | | private BigDecimal unPaymentAmountTotal; |
| | | |
| | | @TableField(exist = false) |
| | | private Boolean status; |
| | | |
| | | private String issueDateStart; |
| | | private String issueDateEnd; |
| | | } |
| | |
| | | package com.ruoyi.purchase.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseDto; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseReportDto; |
| | | import com.ruoyi.purchase.pojo.InvoicePurchase; |
| | | |
| | | import java.io.IOException; |
| | |
| | | InvoicePurchaseDto getInvoiceById(InvoicePurchaseDto invoicePurchaseDto); |
| | | |
| | | List<InvoicePurchase> selectInvoicePurchaseLists(InvoicePurchase invoicePurchase); |
| | | |
| | | IPage<InvoicePurchaseReportDto> listPurchaseReport(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto); |
| | | } |
| | |
| | | package com.ruoyi.purchase.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.purchase.dto.TicketRegistrationDto; |
| | | import com.ruoyi.purchase.pojo.ProductRecord; |
| | |
| | | public interface IProductRecordService extends IService<ProductRecord> { |
| | | |
| | | List<ProductRecord> selectProductRecordList(TicketRegistrationDto ticketRegistrationDto); |
| | | |
| | | IPage<ProductRecord> productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto); |
| | | } |
| | |
| | | IPage<PurchaseLedger> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedger purchaseLedger); |
| | | |
| | | List<InvoiceRegistrationProduct> getProductBySalesNo(Long id); |
| | | |
| | | String getPurchaseNo(); |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseDto; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseReportDto; |
| | | import com.ruoyi.purchase.mapper.InvoicePurchaseMapper; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.InvoicePurchase; |
| | |
| | | public List<InvoicePurchase> selectInvoicePurchaseLists(InvoicePurchase invoicePurchase) { |
| | | return invoicePurchaseMapper.selectList(new LambdaQueryWrapper<>()); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<InvoicePurchaseReportDto> listPurchaseReport(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto) { |
| | | |
| | | return invoicePurchaseMapper.selectPurchaseReport(page, invoicePurchaseReportDto); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.purchase.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.purchase.dto.TicketRegistrationDto; |
| | | import com.ruoyi.purchase.mapper.ProductRecordMapper; |
| | |
| | | .eq(ProductRecord::getType, "2")); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProductRecord> productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto) { |
| | | |
| | | return productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.IOException; |
| | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private final ProductRecordMapper productRecordMapper; |
| | | |
| | | private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper; |
| | | |
| | | private final StringRedisTemplate redisTemplate; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | |
| | | return invoiceRegistrationProducts; |
| | | } |
| | | |
| | | @Override |
| | | public String getPurchaseNo() { |
| | | // çææ¥æåç¼ï¼ä¾å¦ï¼CG20250405ï¼ |
| | | String purchaseNo = "CG" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | |
| | | // æå»º Redis Keyï¼æå¤©åéï¼ |
| | | String redisKey = "purchase_no:" + LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE); |
| | | |
| | | // è·åå½ååºå·å¹¶éå¢ï¼ååæä½ï¼ |
| | | Long sequence = redisTemplate.opsForValue().increment(redisKey); |
| | | |
| | | // è®¾ç½®è¿ææ¶é´ï¼æ¬¡æ¥å¤±æï¼é²æ¢å使°æ®ï¼ |
| | | if (sequence == 1) { |
| | | redisTemplate.expire(redisKey, 1, TimeUnit.DAYS); |
| | | } |
| | | |
| | | // è¿å宿´ç¼å·ï¼å¦ CG202504050001ï¼ |
| | | return purchaseNo + String.format("%03d", sequence); |
| | | } |
| | | |
| | | /** |
| | | * ä¸å线å½å转驼峰å½å |
| | | */ |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | |
| | | LambdaQueryWrapper<TicketRegistration> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (StringUtils.isNotBlank(ticketRegistration.getPurchaseContractNumber())) { |
| | | queryWrapper.like(TicketRegistration::getPurchaseContractNumber, ticketRegistration.getPurchaseContractNumber()) |
| | | .like(TicketRegistration::getSupplierName, ticketRegistration.getSupplierName()) |
| | | .eq(TicketRegistration::getIssueDate, ticketRegistration.getIssueDate()); |
| | | .like(TicketRegistration::getSupplierName, ticketRegistration.getSupplierName()); |
| | | } |
| | | if (ObjectUtils.isEmpty(ticketRegistration.getIssueDateStart())&&ObjectUtils.isEmpty(ticketRegistration.getIssueDateEnd())) { |
| | | queryWrapper.between(TicketRegistration::getIssueDate,LocalDate.parse(ticketRegistration.getIssueDateStart(), DateTimeFormatter.ofPattern("yyyy-MM-dd")), LocalDate.parse(ticketRegistration.getIssueDateEnd(), DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | IPage<TicketRegistration> ticketRegistrationIPage = ticketRegistrationMapper.selectPage(page, queryWrapper); |
| | | // 计ç®å·²ä»æ¬¾éé¢ |
| | |
| | | registration.setUnPaymentAmountTotal(subtractAmount); |
| | | } |
| | | } |
| | | if (!ObjectUtils.isEmpty(ticketRegistration.getStatus())) { |
| | | |
| | | if (ticketRegistration.getStatus()) { |
| | | ticketRegistrationIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getUnPaymentAmountTotal())); |
| | | } |
| | | } |
| | | return ticketRegistrationIPage; |
| | | } |
| | | |
| | |
| | | package com.ruoyi.sales.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | } |
| | | salesLedger.setInvoiceTotal(invoiceTotal); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(salesLedgerDto.getStatus())) { |
| | | if (salesLedgerDto.getStatus()==1) { |
| | | iPage.getRecords().removeIf(salesLedger -> !Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00"))); |
| | | } |
| | | } |
| | | return iPage; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.vo.FileVo; |
| | | import com.ruoyi.sales.pojo.InvoiceRegistrationProduct; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate invoiceDate; |
| | | |
| | | @TableField(exist = false) |
| | | private String invoiceDateStart; |
| | | @TableField(exist = false) |
| | | private String invoiceDateEnd; |
| | | |
| | | @ApiModelProperty(value = "å¼ç¥¨å°è´¦id") |
| | | private Integer invoiceLedgerId; |
| | | |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class ReceiptPaymentDto extends ReceiptPayment { |
| | |
| | | @ApiModelProperty(value = "å¾
忬¾éé¢") |
| | | private BigDecimal noReceiptAmount; |
| | | |
| | | @TableField(exist = false) |
| | | private Boolean status; |
| | | |
| | | @TableField(exist = false) |
| | | private String receiptPaymentDateStart; |
| | | @TableField(exist = false) |
| | | private String receiptPaymentDateEnd; |
| | | |
| | | |
| | | } |
| | |
| | | private Integer Type; |
| | | @ApiModelProperty(value = "ç¾è®¢æ¥æ") |
| | | private LocalDate executionDate; |
| | | |
| | | private Integer status; |
| | | } |
| | |
| | | queryWrapper.eq("sales_ledger_product_id", invoiceRegistrationProduct.getSalesLedgerProductId()); |
| | | queryWrapper.orderByAsc("create_time"); |
| | | List<InvoiceRegistrationProduct> invoiceRegistrationProductList = invoiceRegistrationProductMapper.selectList(queryWrapper); |
| | | // InvoiceRegistrationProduct invoiceRegistrationProduct = invoiceRegistrationProductMapper.selectById(invoiceRegistrationProductId); |
| | | int index = -1; |
| | | for (int i = 0; i < invoiceRegistrationProductList.size(); i++) { |
| | | InvoiceRegistrationProduct currentInvoiceRegProduct = invoiceRegistrationProductList.get(i); |
| | |
| | | salesLedgerProduct.setNoInvoiceNum(salesLedgerProduct.getQuantity()); |
| | | salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | }else { |
| | | salesLedgerProduct.setNoInvoiceNum(newInvoiceRegistrationProductList.get(newInvoiceRegistrationProductList.size()-1).getNoInvoiceNum()); |
| | | salesLedgerProduct.setNoInvoiceAmount(newInvoiceRegistrationProductList.get(newInvoiceRegistrationProductList.size()-1).getNoInvoiceAmount()); |
| | | salesLedgerProduct.setNoInvoiceNum(salesLedgerProduct.getNoInvoiceNum().add(invoiceRegistrationProduct.getInvoiceNum())); |
| | | salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getNoInvoiceAmount().add(invoiceRegistrationProduct.getInvoiceAmount())); |
| | | } |
| | | salesLedgerProductMapper.updateById(salesLedgerProduct); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public IPage<ReceiptPaymentDto> bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentMapper.bindInvoiceNoRegPage(page, receiptPaymentDto); |
| | | IPage<ReceiptPaymentDto> receiptPaymentDtoIPage = receiptPaymentMapper.bindInvoiceNoRegPage(page, receiptPaymentDto); |
| | | if (receiptPaymentDto.getStatus()) { |
| | | receiptPaymentDtoIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getNoReceiptAmount())); |
| | | } |
| | | return receiptPaymentDtoIPage; |
| | | } |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.purchase.mapper.InvoicePurchaseMapper"> |
| | | |
| | | |
| | | <select id="selectPurchaseReport" resultType="com.ruoyi.purchase.dto.InvoicePurchaseReportDto"> |
| | | select sl.customer_contract_no, |
| | | sl.customer_name, |
| | | sl.project_name, |
| | | sl.contract_amount, |
| | | pl.contract_amount as purchase_amount, |
| | | sum(slp.tax_exclusive_total_price) as sale_tax_exclusive_total_price, |
| | | sum(pr.tax_exclusive_total_price) as tax_exclusive_total_price, |
| | | (sl.contract_amount-pl.contract_amount) as balance, |
| | | CONCAT(FORMAT((sl.contract_amount - pl.contract_amount) / sl.contract_amount * 100, 2), '%') AS balance_ratio, |
| | | sl.contract_amount-sum(slp.tax_exclusive_total_price)-(pl.contract_amount-sum(pr.tax_exclusive_total_price)) as balance_amount |
| | | from purchase_ledger pl |
| | | left join sales_ledger sl on pl.sales_ledger_id = sl.id |
| | | left join product_record pr on pr.purchase_ledger_id = pl.id |
| | | left join sales_ledger_product slp on slp.sales_ledger_id = sl.id |
| | | |
| | | group by sl.customer_contract_no, sl.customer_name, sl.project_name, sl.contract_amount, pl.contract_amount |
| | | having sl.customer_contract_no is not null |
| | | <where> |
| | | <if test="c.customerName != null and c.customerName != ''"> |
| | | and sl.customer_name like concat('%',#{c.customerName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="params.searchText != null and params.searchText != '' "> |
| | | AND T2.supplier_name LIKE CONCAT('%',#{params.searchText},'%') |
| | | </if> |
| | | <if test="params.paymentDateStart != null and params.paymentDateStart !='' "> |
| | | AND T1.payment_date >= STR_TO_DATE(#{params.paymentDateStart},'yyyy-MM-dd') |
| | | </if> |
| | | <if test="params.paymentDateEnd != null and params.paymentDateEnd !='' "> |
| | | AND T1.payment_date >= STR_TO_DATE(#{params.paymentDateEnd},'yyyy-MM-dd') |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.payment_date,T1.create_time DESC |
| | | </select> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.purchase.mapper.ProductRecordMapper"> |
| | | |
| | | |
| | | <select id="productRecordPage" resultType="com.ruoyi.purchase.pojo.ProductRecord"> |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | T2.customer_name LIKE CONCAT('%',#{invoiceRegistrationProductDto.searchText},'%') |
| | | ) |
| | | </if> |
| | | <if test="invoiceRegistrationProductDto.invoiceDate != null"> |
| | | AND T3.invoice_date = #{invoiceRegistrationProductDto.invoiceDate} |
| | | <if test="invoiceRegistrationProductDto.invoiceDateStart != null and invoiceRegistrationProductDto.invoiceDateStart != ''"> |
| | | AND T3.invoice_date >= STR_TO_DATE(#{invoiceRegistrationProductDto.invoiceDateStart}, '%Y-%m-%d') |
| | | </if> |
| | | <if test="invoiceRegistrationProductDto.invoiceDateEnd != null and invoiceRegistrationProductDto.invoiceDateEnd != ''"> |
| | | AND T3.invoice_date < STR_TO_DATE(#{invoiceRegistrationProductDto.invoiceDateEnd}, '%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.create_time DESC |
| | |
| | | <if test="params.searchText != null and params.searchText != '' "> |
| | | T5.customer_name LIKE CONCAT('%',#{params.searchText},'%') |
| | | </if> |
| | | <if test="params.receiptPaymentDateStart != null and params.receiptPaymentDateStart != '' "> |
| | | AND T1.receipt_payment_date >= STR_TO_DATE(#{params.receiptPaymentDateStart},'yyyy-mm-dd') |
| | | </if> |
| | | <if test="params.receiptPaymentDateEnd != null and params.receiptPaymentDateEnd != '' "> |
| | | AND T1.receipt_payment_date < STR_TO_DATE(#{params.receiptPaymentDateEnd}, '%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.receipt_payment_date DESC |
| | | </select> |
| | |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo != '' "> |
| | | T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |