Просмотр исходного кода

修改发票管理 重构代码

y 2 лет назад
Родитель
Сommit
19a65349fc

+ 2 - 1
src/main/java/com/ydtech/modules/inv/utils/EasyExcelUtils.java

@@ -82,8 +82,9 @@ public class EasyExcelUtils {
     private static List<List<Object>> dataList(List<InvAccount> invAccounts, List<InvAccountOp> invAccountOpList, List<InvAccountProfit> invAccountProfitList) {
         List<List<Object>> list = ListUtils.newArrayList();
         invAccounts.forEach(invAccount -> {
-            List<Object> data = ListUtils.newArrayList();
+
             invAccount.getInvAccountCardList().forEach(invAccountCard -> {
+                List<Object> data = ListUtils.newArrayList();
                 if (invAccountCard.getBankCardNum() != null) {
                     data.add(invAccount.getOuterFlag().equals("0") ? "内部账户" : "外部账户");
                     data.add(invAccount.getAccountName());

+ 2 - 2
src/main/resources/mapper/modules/inv/InvAccountMapper.xml

@@ -67,7 +67,7 @@
         a.invoicing_amount,
         a.sum_invoicing_amount,
         a.tentative_estimates,
-        ABS(sum(c.invoice_money) - 5000000) as invoicing_amount_excess,
+        ABS(sum(c.no_has_tax) - 5000000) as invoicing_amount_excess,
 
         b.bank_card_num,
         b.bank_name,
@@ -126,7 +126,7 @@
     </select>
 
     <select id="getSumInvoicingAmount" resultMap="BaseResultMap">
-        select a.account_id, SUM(b.invoice_money) as sum_invoicing_amount
+        select a.account_id, SUM(b.no_has_tax) as sum_invoicing_amount
         from inv_account a
         left join inv_account_incoice b on a.account_id = b.account_id
         left join inv_account_card c on a.account_id = c.account_id