From d9d6c0a29c182f63f45e21e0917f122e075c84c4 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期二, 20 一月 2026 10:02:52 +0800
Subject: [PATCH] 新增上级字段

---
 service/src/main/resources/mapper/cwgl/VoucherSubjectSettingMapper.xml |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/service/src/main/resources/mapper/cwgl/VoucherSubjectSettingMapper.xml b/service/src/main/resources/mapper/cwgl/VoucherSubjectSettingMapper.xml
index 35aceae..dc4b0a1 100644
--- a/service/src/main/resources/mapper/cwgl/VoucherSubjectSettingMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/VoucherSubjectSettingMapper.xml
@@ -7,6 +7,8 @@
     <resultMap type="com.ruoyi.cwgl.domain.VoucherSubjectSetting" id="VoucherSubjectSettingResult">
         <result property="id"    column="id"    />
         <result property="parentId"    column="parent_id"    />
+        <result property="parentSubjectCode"    column="parent_subject_code"    />
+        <result property="parentSubjectName"    column="parent_subject_name"    />
         <result property="ancestors"    column="ancestors"    />
         <result property="accountSet"    column="account_set"    />
         <result property="subjectCode"    column="subject_code"    />
@@ -35,7 +37,7 @@
     </resultMap>
 
     <sql id="selectVoucherSubjectSettingVo">
-        select thisTab.id, thisTab.parent_id, thisTab.ancestors, thisTab.account_set, thisTab.subject_code, thisTab.subject_name, thisTab.subject_type, thisTab.enabled, thisTab.balance_direction, thisTab.accounting_items, thisTab.quantity_amount_accounting, thisTab.cash_subject, thisTab.bank_subject, thisTab.cash_flow_subject, thisTab.expense_name, thisTab.mnemonic_code, thisTab.foreign_currency_accounting, thisTab.unit_of_measurement, thisTab.order_num, thisTab.status, thisTab.del_flag, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.type from voucher_subject_setting AS thisTab
+        select thisTab.id, thisTab.parent_id, thisTab.parent_subject_code, thisTab.parent_subject_name, thisTab.ancestors, thisTab.account_set, thisTab.subject_code, thisTab.subject_name, thisTab.subject_type, thisTab.enabled, thisTab.balance_direction, thisTab.accounting_items, thisTab.quantity_amount_accounting, thisTab.cash_subject, thisTab.bank_subject, thisTab.cash_flow_subject, thisTab.expense_name, thisTab.mnemonic_code, thisTab.foreign_currency_accounting, thisTab.unit_of_measurement, thisTab.order_num, thisTab.status, thisTab.del_flag, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.type from voucher_subject_setting AS thisTab
     </sql>
     <sql id="selectVoucherSubjectSettingVoCount">
         select count(0) from voucher_subject_setting as thisTab
@@ -43,6 +45,8 @@
 
     <sql id="whereCondition">
         <if test="parentId != null "> and thisTab.parent_id = #{parentId}</if>
+        <if test="parentSubjectCode != null  and parentSubjectCode != ''"> and thisTab.parent_subject_code like concat('%', #{parentSubjectCode}, '%')</if>
+        <if test="parentSubjectName != null  and parentSubjectName != ''"> and thisTab.parent_subject_name like concat('%', #{parentSubjectName}, '%')</if>
         <if test="ancestors != null  and ancestors != ''"> and thisTab.ancestors = #{ancestors}</if>
         <if test="accountSet != null  and accountSet != ''"> and thisTab.account_set = #{accountSet}</if>
         <if test="subjectCode != null  and subjectCode != ''"> and thisTab.subject_code = #{subjectCode}</if>

--
Gitblit v1.8.0