From e09f103259fa602382bb5ce2a03361a6397af46a Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 15 十月 2026 11:49:15 +0800
Subject: [PATCH] feat(mes): 优化MES模块生产调度与数据管理功能

---
 yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/invoice/CrmInvoiceMapper.java |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/invoice/CrmInvoiceMapper.java b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/invoice/CrmInvoiceMapper.java
index 9dcbca0..303678d 100644
--- a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/invoice/CrmInvoiceMapper.java
+++ b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/invoice/CrmInvoiceMapper.java
@@ -38,6 +38,7 @@
         return selectPage(reqVO, new LambdaQueryWrapperX<CrmInvoiceDO>()
                 .eq(CrmInvoiceDO::getCustomerId, reqVO.getCustomerId()) // 蹇呴』浼犻��
                 .eqIfPresent(CrmInvoiceDO::getNo, reqVO.getNo())
+                .likeIfPresent(CrmInvoiceDO::getInvoiceNo, reqVO.getInvoiceNo())
                 .eqIfPresent(CrmInvoiceDO::getContractId, reqVO.getContractId())
                 .orderByDesc(CrmInvoiceDO::getId));
     }
@@ -50,6 +51,7 @@
         // 鎷兼帴鑷韩鐨勬煡璇㈡潯浠�
         query.selectAll(CrmInvoiceDO.class)
                 .eqIfPresent(CrmInvoiceDO::getNo, pageReqVO.getNo())
+                .likeIfPresent(CrmInvoiceDO::getInvoiceNo, pageReqVO.getInvoiceNo())
                 .eqIfPresent(CrmInvoiceDO::getContractId, pageReqVO.getContractId())
                 .eqIfPresent(CrmInvoiceDO::getAuditStatus, pageReqVO.getAuditStatus())
                 .orderByDesc(CrmInvoiceDO::getId);
@@ -91,4 +93,13 @@
         return selectCount(CrmInvoiceDO::getContractId, contractId);
     }
 
+    /**
+     * 鏌ヨ鍚堝悓涓嬬殑鍏ㄩ儴寮�绁紙瀵煎叆鍘婚噸鐢級
+     */
+    default List<CrmInvoiceDO> selectListByContractId(Long contractId) {
+        return selectList(new LambdaQueryWrapperX<CrmInvoiceDO>()
+                .eq(CrmInvoiceDO::getContractId, contractId)
+                .orderByAsc(CrmInvoiceDO::getId));
+    }
+
 }

--
Gitblit v1.9.3