maven
10 小时以前 1ab612fa454477bfaec03b0fe9133f8881ce29cc
yys 回款---财务收入,付款---财务支出
已添加1个文件
已修改10个文件
422 ■■■■ 文件已修改
src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inspectiontask/service/impl/TimingTaskServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/controller/TicketRegistrationController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/service/IPaymentRegistrationService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-new.yml 244 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
@@ -34,8 +34,8 @@
    {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        // ç§Ÿæˆ·æ’ä»¶
        TenantLineInnerInterceptor tenantLineInnerInterceptor = new TenantLineInnerInterceptor(new CustomTenantLineHandler());
        interceptor.addInnerInterceptor(tenantLineInnerInterceptor);
//        TenantLineInnerInterceptor tenantLineInnerInterceptor = new TenantLineInnerInterceptor(new CustomTenantLineHandler());
//        interceptor.addInnerInterceptor(tenantLineInnerInterceptor);
        // åˆ†é¡µæ’ä»¶
        interceptor.addInnerInterceptor(paginationInnerInterceptor());
        // ä¹è§‚锁插件
src/main/java/com/ruoyi/inspectiontask/service/impl/TimingTaskServiceImpl.java
@@ -121,8 +121,10 @@
        BeanUtils.copyProperties(timingTaskDto, timingTask);
        // 1. è§£æžå­—符串为 LocalDate(只包含年月日)
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate localDate = LocalDate.parse(timingTaskDto.getDateStr(), formatter);
        LocalDate localDate = LocalDate.now();
        if(StringUtils.isNotEmpty(timingTaskDto.getDateStr())){
            localDate = LocalDate.parse(timingTaskDto.getDateStr(), formatter);
        }
        // 2. èŽ·å–å½“å‰ç³»ç»Ÿçš„ LocalTime(包含时分秒)
        LocalTime currentTime = LocalTime.now();
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -14,6 +14,7 @@
import com.ruoyi.purchase.pojo.PaymentRegistration;
import com.ruoyi.purchase.service.IPaymentRegistrationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -69,6 +70,7 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.INSERT)
    @PostMapping
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult add(@RequestBody List<PaymentRegistration>  paymentRegistration) {
        return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
    }
@@ -78,6 +80,7 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.UPDATE)
    @PutMapping
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) {
        return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration));
    }
src/main/java/com/ruoyi/purchase/controller/TicketRegistrationController.java
@@ -88,7 +88,8 @@
    @ApiOperation("删除付款流水")
    @DeleteMapping("/delPaymentRegistration")
    public AjaxResult delPaymentRegistration(@RequestBody Long id) {
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult delPaymentRegistration(@RequestBody List<Long> id) {
        return toAjax(paymentRegistrationService.delPaymentRegistration(id));
    }
src/main/java/com/ruoyi/purchase/service/IPaymentRegistrationService.java
@@ -98,7 +98,7 @@
    Boolean delete(Long[] ids);
    int delPaymentRegistration(Long ids);
    int delPaymentRegistration(List<Long> ids);
    IPage<PaymentRegistrationDto> supplierNameListPage(Page page, PaymentLedgerDto paymentLedgerDto);
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -124,7 +124,7 @@
            salesLedgerProduct.setPendingTicketsTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getTicketsTotal()));
            paymentRegistrationMapper.insert(paymentRegistration);
            salesLedgerProductMapper.updateById(salesLedgerProduct);
            // 2. å¤„理账户收入
            // 2. å¤„理账户支出
            AccountExpense accountExpense = new AccountExpense();
            accountExpense.setExpenseDate(purchaseLedger.getEntryDate());
            accountExpense.setExpenseType("0");
@@ -151,18 +151,29 @@
    @Override
    public int updatePaymentRegistration(PaymentRegistration paymentRegistration) {
        PaymentRegistration paymentRegistration1 = paymentRegistrationMapper.selectById(paymentRegistration.getId());
        TicketRegistration ticketRegistration = ticketRegistrationMapper.selectById(paymentRegistration.getTicketRegistrationId()==null?paymentRegistration1.getTicketRegistrationId():paymentRegistration.getTicketRegistrationId());
        List<PaymentRegistration> paymentRegistrations = paymentRegistrationMapper.selectList(new QueryWrapper<PaymentRegistration>()
                .eq("ticket_registration_id", paymentRegistration.getTicketRegistrationId()).ne("id", paymentRegistration.getId()));
        BigDecimal total = paymentRegistrations.stream().map(PaymentRegistration::getCurrentPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
        if (total.add(paymentRegistration.getCurrentPaymentAmount()).compareTo(ticketRegistration.getInvoiceAmount()) > 0) {
            throw new RuntimeException("付款金额超出发票金额");
        if(null==paymentRegistration1) throw new RuntimeException("未找到付款登记");
        SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(paymentRegistration1.getSalesLedgerProductId());
        if(null==salesLedgerProduct) throw new RuntimeException("未找到采购单产品");
        // åˆ¤æ–­ä»˜æ¬¾é‡‘额不可大于待付款金额
        BigDecimal subtract = paymentRegistration.getCurrentPaymentAmount().subtract(paymentRegistration1.getCurrentPaymentAmount());
        if (subtract.compareTo(salesLedgerProduct.getPendingTicketsTotal()) > 0) {
            throw new RuntimeException("付款金额超出待付款金额");
        }
        paymentRegistration.setUpdateTime(DateUtils.getNowDate());
        // åŒæ­¥ä¿®æ”¹è´¦æˆ·æ”¯å‡º
        LambdaQueryWrapper<AccountExpense> accountExpenseLambdaQueryWrapper = new LambdaQueryWrapper<>();
        accountExpenseLambdaQueryWrapper.eq(AccountExpense::getBusinessId, paymentRegistration.getId())
                .eq(AccountExpense::getBusinessType, 1)
                .last("limit 1");
        AccountExpense accountExpense = accountExpenseService.getOne(accountExpenseLambdaQueryWrapper);
        if(null!=accountExpense){
            accountExpense.setExpenseMoney(paymentRegistration.getCurrentPaymentAmount());
            accountExpenseService.updateById(accountExpense);
        }
        // ä¿®æ”¹é‡‡è´­äº§å“ä»˜æ¬¾é‡‘额
        salesLedgerProduct.setTicketsTotal(salesLedgerProduct.getTicketsTotal().add(subtract));
        salesLedgerProduct.setPendingTicketsTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getTicketsTotal()));
        salesLedgerProductMapper.updateById(salesLedgerProduct);
        return paymentRegistrationMapper.updateById(paymentRegistration);
    }
@@ -464,16 +475,20 @@
    }
    @Override
    public int delPaymentRegistration(Long id) {
//        PaymentRegistration paymentRegistration = paymentRegistrationMapper.selectById(id);
//        TicketRegistration ticketRegistration = ticketRegistrationMapper.selectById(paymentRegistration.getTicketRegistrationId());
//        if (ticketRegistration != null) {
//            ticketRegistration.setPaymentAmountTotal(ticketRegistration.getPaymentAmountTotal().subtract(paymentRegistration.getCurrentPaymentAmount()));
//            ticketRegistration.setUnPaymentAmountTotal(ticketRegistration.getUnPaymentAmountTotal().add(paymentRegistration.getCurrentPaymentAmount()));
//            ticketRegistrationMapper.updateById(ticketRegistration);
//        }
        return paymentRegistrationMapper.deleteById(id);
    public int delPaymentRegistration(List<Long> ids) {
        LambdaQueryWrapper<AccountExpense> accountExpenseLambdaQueryWrapper = new LambdaQueryWrapper<>();
        accountExpenseLambdaQueryWrapper.in(AccountExpense::getBusinessId, ids)
                .eq(AccountExpense::getBusinessType, 1);
        accountExpenseService.remove(accountExpenseLambdaQueryWrapper);
        // ä¿®æ”¹é‡‡è´­äº§å“çš„已付款金额,待付款金额
        List<PaymentRegistration> paymentRegistrations = paymentRegistrationMapper.selectBatchIds(ids);
        for (PaymentRegistration paymentRegistration : paymentRegistrations) {
            SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(paymentRegistration.getSalesLedgerProductId());
            salesLedgerProduct.setTicketsTotal(salesLedgerProduct.getTicketsTotal().subtract(paymentRegistration.getCurrentPaymentAmount()));
            salesLedgerProduct.setPendingTicketsTotal(salesLedgerProduct.getPendingTicketsTotal().add(paymentRegistration.getCurrentPaymentAmount()));
            salesLedgerProductMapper.updateById(salesLedgerProduct);
        }
        return paymentRegistrationMapper.deleteBatchIds(ids);
    }
    @Override
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
@@ -19,6 +19,7 @@
import com.ruoyi.sales.service.ReceiptPaymentService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -52,6 +53,7 @@
     * @return
     */
    @PostMapping("/update")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentUpdate(receiptPayment));
    }
@@ -62,6 +64,7 @@
     * @return
     */
    @DeleteMapping("/del")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentDel (@RequestBody List<Integer> ids) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentDel(ids));
    }
src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java
@@ -4,6 +4,8 @@
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.account.pojo.AccountIncome;
import com.ruoyi.account.service.AccountIncomeService;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.sales.dto.CustomerInteractionDto;
@@ -46,6 +48,9 @@
    @Autowired
    private InvoiceLedgerMapper invoiceLedgerMapper;
    @Autowired
    private AccountIncomeService accountIncomeService;
    /**
     * å›žæ¬¾ç™»è®°æ–°å¢ž
     * @param receiptPaymentList
@@ -59,7 +64,6 @@
            if (!ObjectUtils.isEmpty(receiptPayment.getId())){
                receiptPayment = this.getById(receiptPayment.getId());
            }
//        InvoiceLedger invoiceLedger = invoiceLedgerMapper.selectById(byId.getInvoiceLedgerId());
            SalesLedger salesLedger = salesLedgerMapper.selectById(receiptPayment.getSalesLedgerId());
            if(null==salesLedger) throw new RuntimeException("未找到销售单");
            // å·²å›žæ¬¾é‡‘额
@@ -72,11 +76,35 @@
                salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().add(receiptPayment.getReceiptPaymentAmount()));
                salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal()));
                receiptPaymentMapper.insert(receiptPayment);
                // å¢žåŠ è´¢åŠ¡æ”¶å…¥è®°å½•
                AccountIncome accountIncome = new AccountIncome();
                accountIncome.setIncomeDate(salesLedger.getEntryDate());
                accountIncome.setIncomeType("0");
                accountIncome.setCustomerName(salesLedger.getCustomerName());
                accountIncome.setIncomeMoney(salesLedger.getContractAmount());
                accountIncome.setIncomeMethod("0");
                accountIncome.setInputTime(new Date());
                accountIncome.setInputUser(salesLedger.getEntryPerson());
                accountIncome.setIncomeDescribed("回款收入");
                accountIncome.setBusinessId(Long.parseLong(receiptPayment.getId().toString()));
                accountIncome.setBusinessType(1);
                accountIncomeService.save(accountIncome);
            }else {
                BigDecimal subtract = receiptPayment.getReceiptPaymentAmount().subtract(byId.getReceiptPaymentAmount());
                salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().add(subtract));
                salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal()));
                receiptPayment.setReceiptPaymentAmount(byId.getReceiptPaymentAmount());
                receiptPayment.setReceiptPaymentType(byId.getReceiptPaymentType());
                receiptPaymentMapper.updateById(receiptPayment);
                // ä¿®æ”¹è´¢åŠ¡æ”¶å…¥è®°å½•
                LambdaQueryWrapper<AccountIncome> accountIncomeLambdaQueryWrapper = new LambdaQueryWrapper<>();
                accountIncomeLambdaQueryWrapper.eq(AccountIncome::getBusinessId, receiptPayment.getId())
                        .eq(AccountIncome::getBusinessType, 1);
                AccountIncome accountIncome = accountIncomeService.getOne(accountIncomeLambdaQueryWrapper);
                if(null!=accountIncome){
                    accountIncome.setIncomeMoney(receiptPayment.getReceiptPaymentAmount());
                    accountIncomeService.updateById(accountIncome);
                }
            }
            salesLedgerProductMapper.updateById(salesLedgerProduct);
        }
@@ -90,6 +118,33 @@
     */
    @Override
    public int receiptPaymentUpdate(ReceiptPayment receiptPayment) {
        ReceiptPayment byId = receiptPayment;
        if (!ObjectUtils.isEmpty(receiptPayment.getId())){
            receiptPayment = this.getById(receiptPayment.getId());
        }
        SalesLedger salesLedger = salesLedgerMapper.selectById(receiptPayment.getSalesLedgerId());
        if(null==salesLedger) throw new RuntimeException("未找到销售单");
        // å·²å›žæ¬¾é‡‘额
        SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(receiptPayment.getSalesLedgerProductId());
        if(null==salesLedgerProduct) throw new RuntimeException("未找到销售单产品");
        if (salesLedgerProduct.getPendingInvoiceTotal().compareTo(receiptPayment.getReceiptPaymentAmount())<0){
            throw new RuntimeException("本次回款金额不能大于待回款金额");
        }
        BigDecimal subtract = receiptPayment.getReceiptPaymentAmount().subtract(byId.getReceiptPaymentAmount());
        salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().add(subtract));
        salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal()));
        // ä¿®æ”¹è´¢åŠ¡æ”¶å…¥è®°å½•
        LambdaQueryWrapper<AccountIncome> accountIncomeLambdaQueryWrapper = new LambdaQueryWrapper<>();
        accountIncomeLambdaQueryWrapper.eq(AccountIncome::getBusinessId, receiptPayment.getId())
                .eq(AccountIncome::getBusinessType, 1);
        AccountIncome accountIncome = accountIncomeService.getOne(accountIncomeLambdaQueryWrapper);
        if(null!=accountIncome){
            accountIncome.setIncomeMoney(receiptPayment.getReceiptPaymentAmount());
            accountIncomeService.updateById(accountIncome);
        }
        salesLedgerProductMapper.updateById(salesLedgerProduct);
        receiptPayment.setReceiptPaymentAmount(byId.getReceiptPaymentAmount());
        receiptPayment.setReceiptPaymentType(byId.getReceiptPaymentType());
        return receiptPaymentMapper.updateById(receiptPayment);
    }
@@ -102,6 +157,20 @@
    public int receiptPaymentDel(List<Integer> ids) {
        LambdaQueryWrapper<ReceiptPayment> delQuery = new LambdaQueryWrapper<>();
        delQuery.in(ReceiptPayment::getId, ids);
        List<ReceiptPayment> receiptPayments = receiptPaymentMapper.selectList(delQuery);
        if(CollectionUtils.isEmpty(receiptPayments)) throw new RuntimeException("未找到回款登记");
        // é‡æ–°è®¡ç®—销售产品回款金额
        for (ReceiptPayment receiptPayment : receiptPayments) {
            SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(receiptPayment.getSalesLedgerProductId());
            salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().subtract(receiptPayment.getReceiptPaymentAmount()));
            salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal()));
            salesLedgerProductMapper.updateById(salesLedgerProduct);
        }
        // åˆ é™¤è´¢åŠ¡æ”¶å…¥è®°å½•
        LambdaQueryWrapper<AccountIncome> accountIncomeLambdaQueryWrapper = new LambdaQueryWrapper<>();
        accountIncomeLambdaQueryWrapper.in(AccountIncome::getBusinessId, ids)
                .eq(AccountIncome::getBusinessType, 1);
        accountIncomeService.remove(accountIncomeLambdaQueryWrapper);
        return receiptPaymentMapper.delete(delQuery);
    }
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -522,39 +522,13 @@
            SalesLedger salesLedger = convertToEntity(salesLedgerDto);
            salesLedger.setCustomerName(customer.getCustomerName());
            salesLedger.setTenantId(customer.getTenantId());
            AccountIncome accountIncome = new AccountIncome();
            accountIncome.setIncomeDate(salesLedger.getEntryDate());
            accountIncome.setIncomeType("0");
            accountIncome.setCustomerName(customer.getCustomerName());
            accountIncome.setIncomeMoney(salesLedger.getContractAmount());
            accountIncome.setIncomeMethod("0");
            accountIncome.setInputTime(new Date());
            accountIncome.setInputUser(salesLedger.getEntryPerson());
            // 3. æ–°å¢žæˆ–更新主表
            if (salesLedger.getId() == null) {
                String contractNo = generateSalesContractNo();
                salesLedger.setSalesContractNo(contractNo);
                salesLedgerMapper.insert(salesLedger);
                accountIncome.setIncomeDescribed("销售合同:" + salesLedger.getSalesContractNo());
                accountIncome.setInvoiceNumber(salesLedger.getSalesContractNo());
                accountIncomeService.save(accountIncome);
            } else {
                salesLedgerMapper.updateById(salesLedger);
                SalesLedger salesLedgerDB = salesLedgerMapper.selectById(salesLedger.getId());
                List<AccountIncome> accountIncomeDBs = accountIncomeService.getByInvoiceNumberList(salesLedger.getSalesContractNo());
                if (!org.springframework.util.CollectionUtils.isEmpty(accountIncomeDBs)) {
                    accountIncomeDBs.forEach(accountIncomeDB -> {
                        accountIncomeDB.setCustomerName(salesLedgerDB.getCustomerName());
                        accountIncomeDB.setIncomeMoney(salesLedgerDB.getContractAmount());
                        accountIncomeDB.setIncomeDescribed("销售合同:" + salesLedgerDB.getSalesContractNo());
                        accountIncomeDB.setInvoiceNumber(salesLedgerDB.getSalesContractNo());
                        accountIncomeDB.setInputTime(new Date());
                        accountIncomeDB.setInputUser(salesLedgerDB.getEntryPerson());
                        accountIncomeService.updateById(accountIncomeDB);
                    });
                }
            }
            // 4. å¤„理子表数据
src/main/resources/application-new.yml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,244 @@
# é¡¹ç›®ç›¸å…³é…ç½®
ruoyi:
  # åç§°
  name: RuoYi
  # ç‰ˆæœ¬
  version: 3.8.9
  # ç‰ˆæƒå¹´ä»½
  copyrightYear: 2025
  # æ–‡ä»¶è·¯å¾„ ç¤ºä¾‹ï¼ˆ Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
  profile: /javaWork/product-inventory-management/file
  # èŽ·å–ip地址开关
  addressEnabled: false
  # éªŒè¯ç ç±»åž‹ math æ•°å­—计算 char å­—符验证
  captchaType: math
# å¼€å‘环境配置
server:
  # æœåŠ¡å™¨çš„HTTP端口,默认为8080
  port: 9003
  servlet:
    # åº”用的访问路径
    context-path: /
  tomcat:
    # tomcat的URI编码
    uri-encoding: UTF-8
    # è¿žæŽ¥æ•°æ»¡åŽçš„æŽ’队数,默认为100
    accept-count: 1000
    threads:
      # tomcat最大线程数,默认为200
      max: 800
      # Tomcat启动初始化的线程数,默认值10
      min-spare: 100
# æ—¥å¿—配置
logging:
  level:
    com.ruoyi: warn
    org.springframework: warn
minio:
  endpoint: http://114.132.189.42/
  port: 7019
  secure: false
  accessKey: admin
  secretKey: 12345678
  preview-expiry: 24 # é¢„览地址默认24小时
  default-bucket: jxc
# ç”¨æˆ·é…ç½®
user:
  password:
    # å¯†ç æœ€å¤§é”™è¯¯æ¬¡æ•°
    maxRetryCount: 5
    # å¯†ç é”å®šæ—¶é—´ï¼ˆé»˜è®¤10分钟)
    lockTime: 10
# Spring配置
spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.cj.jdbc.Driver
    druid:
      # ä¸»åº“数据源
      master:
        url: jdbc:mysql://172.17.0.1:3306/product-inventory-management-new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: root
        password: xd@123456..
      # ä»Žåº“数据源
      slave:
        # ä»Žæ•°æ®æºå¼€å…³/默认关闭
        enabled: false
        url:
        username:
        password:
      # åˆå§‹è¿žæŽ¥æ•°
      initialSize: 5
      # æœ€å°è¿žæŽ¥æ± æ•°é‡
      minIdle: 10
      # æœ€å¤§è¿žæŽ¥æ± æ•°é‡
      maxActive: 20
      # é…ç½®èŽ·å–è¿žæŽ¥ç­‰å¾…è¶…æ—¶çš„æ—¶é—´
      maxWait: 60000
      # é…ç½®è¿žæŽ¥è¶…æ—¶æ—¶é—´
      connectTimeout: 30000
      # é…ç½®ç½‘络超时时间
      socketTimeout: 60000
      # é…ç½®é—´éš”多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      timeBetweenEvictionRunsMillis: 60000
      # é…ç½®ä¸€ä¸ªè¿žæŽ¥åœ¨æ± ä¸­æœ€å°ç”Ÿå­˜çš„æ—¶é—´ï¼Œå•位是毫秒
      minEvictableIdleTimeMillis: 300000
      # é…ç½®ä¸€ä¸ªè¿žæŽ¥åœ¨æ± ä¸­æœ€å¤§ç”Ÿå­˜çš„æ—¶é—´ï¼Œå•位是毫秒
      maxEvictableIdleTimeMillis: 900000
      # é…ç½®æ£€æµ‹è¿žæŽ¥æ˜¯å¦æœ‰æ•ˆ
      validationQuery: SELECT 1 FROM DUAL
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      webStatFilter:
        enabled: true
      statViewServlet:
        enabled: true
        # è®¾ç½®ç™½åå•,不填则允许所有访问
        allow:
        url-pattern: /druid/*
        # æŽ§åˆ¶å°ç®¡ç†ç”¨æˆ·åå’Œå¯†ç 
        login-username: ruoyi
        login-password: 123456
      filter:
        stat:
          enabled: true
          # æ…¢SQL记录
          log-slow-sql: true
          slow-sql-millis: 1000
          merge-sql: true
        wall:
          config:
            multi-statement-allow: true
  # èµ„源信息
  messages:
    # å›½é™…化资源文件路径
    basename: i18n/messages
  # æ–‡ä»¶ä¸Šä¼ 
  servlet:
    multipart:
      # å•个文件大小
      max-file-size: 1GB
      # è®¾ç½®æ€»ä¸Šä¼ çš„æ–‡ä»¶å¤§å°
      max-request-size: 2GB
  # æœåŠ¡æ¨¡å—
  devtools:
    restart:
      # çƒ­éƒ¨ç½²å¼€å…³
      enabled: false
  # redis é…ç½®
  redis:
    # åœ°å€
    #    host: 127.0.0.1
    host: 172.17.0.1
    # ç«¯å£ï¼Œé»˜è®¤ä¸º6379
    port: 6379
    # æ•°æ®åº“索引
    database: 0
    # å¯†ç 
    #    password: root2022!
    password:
    # è¿žæŽ¥è¶…æ—¶æ—¶é—´
    timeout: 10s
    lettuce:
      pool:
        # è¿žæŽ¥æ± ä¸­çš„æœ€å°ç©ºé—²è¿žæŽ¥
        min-idle: 0
        # è¿žæŽ¥æ± ä¸­çš„æœ€å¤§ç©ºé—²è¿žæŽ¥
        max-idle: 8
        # è¿žæŽ¥æ± çš„æœ€å¤§æ•°æ®åº“连接数
        max-active: 8
        # #连接池最大阻塞等待时间(使用负值表示没有限制)
        max-wait: -1ms
  # Quartz定时任务配置(新增部分)
  quartz:
    job-store-type: jdbc  # ä½¿ç”¨æ•°æ®åº“存储
    jdbc:
      initialize-schema: never  # é¦–次运行时自动创建表结构,成功后改为never
      schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql  # MySQL表结构脚本
    properties:
      org:
        quartz:
          scheduler:
            instanceName: RuoYiScheduler
            instanceId: AUTO
          jobStore:
            class: org.quartz.impl.jdbcjobstore.JobStoreTX
            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate  # MySQL适配
            tablePrefix: qrtz_  # è¡¨åå‰ç¼€ï¼Œä¸Žè„šæœ¬ä¸€è‡´
            isClustered: false  # å•节点模式(集群需改为true)
            clusterCheckinInterval: 10000
            txIsolationLevelSerializable: true
          threadPool:
            class: org.quartz.simpl.SimpleThreadPool
            threadCount: 10  # çº¿ç¨‹æ± å¤§å°
            threadPriority: 5
            makeThreadsDaemons: true
          updateCheck: false  # å…³é—­ç‰ˆæœ¬æ£€æŸ¥
# token配置
token:
  # ä»¤ç‰Œè‡ªå®šä¹‰æ ‡è¯†
  header: Authorization
  # ä»¤ç‰Œå¯†é’¥
  secret: abcdefghijklmnopqrstuvwxyz
  # ä»¤ç‰Œæœ‰æ•ˆæœŸï¼ˆé»˜è®¤30分钟)
  expireTime: 450
# MyBatis Plus配置
mybatis-plus:
  # æœç´¢æŒ‡å®šåŒ…别名   æ ¹æ®è‡ªå·±çš„项目来
  typeAliasesPackage: com.ruoyi.**.pojo
  # é…ç½®mapper的扫描,找到所有的mapper.xml映射文件
  mapperLocations: classpath*:mapper/**/*Mapper.xml
  # åŠ è½½å…¨å±€çš„é…ç½®æ–‡ä»¶
  configLocation: classpath:mybatis/mybatis-config.xml
  global-config:
    enable-sql-runner: true
    db-config:
      id-type: auto
# PageHelper分页插件
pagehelper:
  helperDialect: mysql
  supportMethodsArguments: true
  params: count=countSql
# Swagger配置
swagger:
  # æ˜¯å¦å¼€å¯swagger
  enabled: true
  # è¯·æ±‚前缀
  pathMapping: /dev-api
# é˜²æ­¢XSS攻击
xss:
  # è¿‡æ»¤å¼€å…³
  enabled: true
  # æŽ’除链接(多个用逗号分隔)
  excludes: /system/notice
  # åŒ¹é…é“¾æŽ¥
  urlPatterns: /system/*,/monitor/*,/tool/*
# ä»£ç ç”Ÿæˆ
gen:
  # ä½œè€…
  author: ruoyi
  # é»˜è®¤ç”ŸæˆåŒ…路径 system éœ€æ”¹æˆè‡ªå·±çš„æ¨¡å—名称 å¦‚ system monitor tool
  packageName: com.ruoyi.project.system
  # è‡ªåŠ¨åŽ»é™¤è¡¨å‰ç¼€ï¼Œé»˜è®¤æ˜¯true
  autoRemovePre: false
  # è¡¨å‰ç¼€ï¼ˆç”Ÿæˆç±»åä¸ä¼šåŒ…含表前缀,多个用逗号分隔)
  tablePrefix: sys_
  # æ˜¯å¦å…è®¸ç”Ÿæˆæ–‡ä»¶è¦†ç›–到本地(自定义路径),默认不允许
  allowOverwrite: false
file:
  temp-dir: /javaWork/product-inventory-management/file/temp/uploads
  upload-dir: /javaWork/product-inventory-management/file/prod/uploads
src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
@@ -77,8 +77,7 @@
            supplier_manage T2 ON T1.supplier_id = T2.id
                LEFT JOIN
            sys_user T3 ON T3.user_id = T1.registrant_id
        left join ticket_registration T4 on T1.ticket_registration_id = T4.id
        WHERE
            T4.id = #{id}
            T1.sales_ledger_product_id = #{id}
    </select>
</mapper>