ly 1 سال پیش
والد
کامیت
33f8a77470

+ 4 - 0
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/domain/BizFinancialIndividualIncomeTax.java

@@ -104,6 +104,10 @@ public class BizFinancialIndividualIncomeTax extends BaseEntity implements Seria
     @Excel(name = "个税填写",sort = 6)
     @TableField(exist = false)
     private String makeOut;
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
 
 
 }

+ 4 - 1
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/domain/BizFinancialIndividualIncomeTaxIsZero.java

@@ -108,5 +108,8 @@ public class BizFinancialIndividualIncomeTaxIsZero extends BaseEntity implements
     @Excel(name = "执行人",sort = 8)
     private String serviceName;
 
-
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
 }

+ 4 - 0
src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccount.java

@@ -106,5 +106,9 @@ public class BizFinancialKeepAccount extends BaseEntity {
     @Excel(name = "执行人",sort = 7)
     @TableField(exist = false)
     private String serviceName;
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
 
 }

+ 5 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java

@@ -145,4 +145,9 @@ public class BizFinancialReceiveTicket extends BaseEntity
     @TableField(exist = false)
     private String currentDate;
 
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
+
 }

+ 4 - 0
src/main/java/cn/ezhizao/project/business/reportTax/domain/BizFinancialReportTaxNonZero.java

@@ -95,4 +95,8 @@ public class BizFinancialReportTaxNonZero extends BaseEntity {
     @Excel(name = "执行人",sort = 9)
     @TableField(exist = false)
     private String serviceName;
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
 }

+ 4 - 0
src/main/java/cn/ezhizao/project/business/reportTaxIsZero/domain/BizFinancialReportTax.java

@@ -99,4 +99,8 @@ public class BizFinancialReportTax extends BaseEntity {
     @Excel(name = "执行人",sort = 9)
     @TableField(exist = false)
     private String serviceName;
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
 }

+ 4 - 0
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java

@@ -110,4 +110,8 @@ public class BizFinancialSalary extends BaseEntity
     private String serviceName;
     @TableField(exist = false)
     private String currentDate;
+    @TableField(exist = false)
+    private Long customerLabelId;
+    @TableField(exist = false)
+    private String customerLabelName;
 }

+ 5 - 1
src/main/resources/mybatis/business/BizFinancialIndividualIncomeTaxIsZeroMapper.xml

@@ -63,9 +63,10 @@
 
     <select id="getList" parameterType="BizFinancialIndividualIncomeTax"
             resultMap="BizFinancialIndividualIncomeTaxResult">
-        SELECT * FROM biz_financial_individual_income_tax f
+        SELECT *,c.customer_label_id, t4.lable as customerLabelName FROM biz_financial_individual_income_tax f
         LEFT JOIN biz_company c ON f.company_id = c.id
         LEFT JOIN biz_tenant t ON f.tenant_id=t.id
+        left join biz_lable t4 on t4.id = c.customer_label_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             f.deleted = 0
             AND c.is_zero=1
@@ -74,6 +75,9 @@
             <if test="principal != null and principal != ''">
                 AND(c.leader_id=#{principal} OR c.adviser_id=#{principal})
             </if>
+            <if test="customerLabelId != null">
+                AND c.customer_label_id = #{customerLabelId}
+            </if>
             <if test="taxType != null and taxType != null">
                 AND c.tax_type = #{taxType}
             </if>

+ 5 - 1
src/main/resources/mybatis/business/BizFinancialIndividualIncomeTaxMapper.xml

@@ -54,9 +54,10 @@
 
     <select id="getList" parameterType="BizFinancialIndividualIncomeTax"
             resultMap="BizFinancialIndividualIncomeTaxResult">
-        SELECT * FROM biz_financial_individual_income_tax f
+        SELECT *, c.customer_label_id, t4.lable as customerLabelName FROM biz_financial_individual_income_tax f
         LEFT JOIN biz_company c ON f.company_id = c.id
         LEFT JOIN biz_tenant t ON f.tenant_id=t.id
+        left join biz_lable t4 on t4.id = c.customer_label_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             f.deleted = 0
             AND c.is_zero=0
@@ -69,6 +70,9 @@
             <if test="taxType != null and taxType != null">
                 AND c.tax_type = #{taxType}
             </if>
+            <if test="customerLabelId != null">
+                AND c.customer_label_id = #{customerLabelId}
+            </if>
             <if test="month != null and year != null">
                 <if test="status != null and status != 0">
                     and exists (select 1 from biz_financial_individual_income_tax_detail f3 where

+ 5 - 1
src/main/resources/mybatis/business/BizFinancialKeepAccountMapper.xml

@@ -26,12 +26,13 @@
 
     <sql id="getListSql">
         SELECT
-        t1.*, t2.name as company_name,
+        t1.*, t2.name as company_name,t2.customer_label_id, t4.lable as customerLabelName,
         (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
         t3.account_name as from_company_name, t2.tax_type
         from biz_financial_keep_account t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_lable t4 on t4.id = t2.customer_label_id
         WHERE
         t1.deleted = 0
         <if test="id != null">
@@ -43,6 +44,9 @@
         <if test="isZero != null">
             AND t2.is_zero = #{isZero}
         </if>
+        <if test="customerLabelId != null">
+            AND t2.customer_label_id = #{customerLabelId}
+        </if>
         <if test="keyword != null and keyword != ''">
             AND (t2.name like concat('%', #{keyword}, '%') or t2.code like concat('%', #{keyword}, '%'))
         </if>

+ 5 - 1
src/main/resources/mybatis/business/BizFinancialReceiveTicketMapper.xml

@@ -13,13 +13,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="getList" parameterType="BizFinancialReceiveTicket" resultMap="BizFinancialReceiveTicketResult">
         SELECT
-        t1.*, t2.name as company_name,
+        t1.*, t2.name as company_name,t2.customer_label_id, t4.lable as customerLabelName,
 <!--        (select concat(frtd.year, '-', frtd.month) from biz_financial_receive_ticket_detail frtd where frtd.financial_receive_ticket_id = t1.id order by year desc, month desc limit 1) currentDate,-->
         (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
         t3.account_name as from_company_name, t2.tax_type
         from biz_financial_receive_ticket t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_lable t4 on t4.id = t2.customer_label_id
         WHERE
         t1.deleted = 0
         <if test="id != null">
@@ -31,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="isZero != null">
             AND t2.is_zero = #{isZero}
         </if>
+        <if test="customerLabelId != null">
+            AND t2.customer_label_id = #{customerLabelId}
+        </if>
         <if test="companyName != null and companyName != ''">
             AND (t2.name like concat('%', #{companyName}, '%'))
         </if>

+ 5 - 1
src/main/resources/mybatis/business/BizFinancialReportTaxMapper.xml

@@ -23,13 +23,14 @@
 
     <sql id="getListSql">
         SELECT
-        t1.*, t2.name as company_name, t2.social_credit_code, t2.tax_type, t2.is_zero,
+        t1.*, t2.name as company_name, t2.social_credit_code, t2.tax_type, t2.is_zero, t2.customer_label_id, t4.lable as customerLabelName,
         (select concat(frtd.year, '-', frtd.month) from biz_financial_report_tax_detail frtd where
         frtd.financial_report_tax_id = t1.id order by year desc, month desc limit 1) currentDate,
         t3.account_name as from_company_name
         from biz_financial_report_tax t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_lable t4 on t4.id = t2.customer_label_id
         <!--        left join fxy_financial_checkout t3 on t3.account_sets_id = t1.account_sets_id-->
         WHERE
         t1.deleted = 0
@@ -40,6 +41,9 @@
         <if test="taxType != null and taxType != ''">
             AND t2.tax_type = #{taxType}
         </if>
+        <if test="customerLabelId != null">
+            AND t2.customer_label_id = #{customerLabelId}
+        </if>
         <if test="fromCompanyName != null and fromCompanyName != ''">
             AND (t3.account_name like concat('%', #{fromCompanyName}, '%'))
         </if>

+ 5 - 1
src/main/resources/mybatis/business/BizFinancialReportTaxNonZeroMapper.xml

@@ -23,13 +23,14 @@
 
     <sql id="getListSql">
         SELECT
-        t1.*, t2.name as company_name, t2.social_credit_code, t2.tax_type, t2.is_zero,
+        t1.*, t2.name as company_name, t2.social_credit_code, t2.tax_type, t2.is_zero,t2.customer_label_id, t4.lable as customerLabelName,
         (select concat(frtd.year, '-', frtd.month) from biz_financial_report_tax_detail frtd where
         frtd.financial_report_tax_id = t1.id order by year desc, month desc limit 1) currentDate,
         t3.account_name as from_company_name
         from biz_financial_report_tax t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_lable t4 on t4.id = t2.customer_label_id
         <!--        left join fxy_financial_checkout t3 on t3.account_sets_id = t1.account_sets_id-->
         WHERE
         t1.deleted = 0
@@ -37,6 +38,9 @@
         <if test="id != null">
             AND t1.id = #{id}
         </if>
+        <if test="customerLabelId != null">
+            AND t2.customer_label_id = #{customerLabelId}
+        </if>
         <if test="principal != null and principal != ''">
             AND (t2.leader_id=#{principal} OR t2.adviser_id=#{principal})
         </if>

+ 5 - 0
src/main/resources/mybatis/business/BizFinancialSalaryMapper.xml

@@ -14,10 +14,12 @@
 
     <select id="getList" parameterType="BizFinancialSalary" resultMap="BizFinancialSalaryResult">
         SELECT t1.*, t2.name as company_name,t2.tax_type, t3.account_name as from_company_name,
+        t2.customer_label_id, t4.lable as customerLabelName,
         (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate
         FROM biz_financial_salary t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_lable t4 on t4.id = t2.customer_label_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0
             and t1.is_stop = 0
@@ -26,6 +28,9 @@
             <if test="taxType != null and taxType != ''">
                 AND t2.tax_type = #{taxType}
             </if>
+            <if test="customerLabelId != null">
+                AND t2.customer_label_id = #{customerLabelId}
+            </if>
             <if test="isZero != null">
                 AND t2.is_zero = #{isZero}
             </if>