From e61966a89350cf11940d5bd538a5dda06cb6b437 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 03 十二月 2026 17:01:18 +0800
Subject: [PATCH] 完善个税汇总模块删除记录的问题

---
 ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java |  231 ++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 161 insertions(+), 70 deletions(-)

diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java
index 6bf6c64..afeba1a 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java
@@ -130,84 +130,140 @@
     }
 
     /**
-     * 鏍规嵁鍙楃泭浜鸿韩浠借瘉缂栧彿鑾峰彇绋庤垂閲戦
+     * 鏍规嵁鍙楃泭浜鸿韩浠借瘉缂栧彿鑾峰彇绋庤垂閲戦锛堝綍鍏ユ椂鐨勪釜绋庨瑙堬級
+     * <p>
+     * 2026-11-17锛堢疮璁″彛寰勶級锛氬悓涓�韬唤璇�**褰撴湀**鐨勫鍊肩◣銆佸煄寤虹◣銆佷釜绋庨兘鎸夌疮璁¤绠楋紝鏈瑪鍙栧樊棰濓細
+     * <pre>
+     * P绱� = 危褰撴湀绋庡墠 + 鏈锛沄绱� = calcVat(P绱�)锛堣捣寰佺偣鎸夌疮璁″垽鏂級锛汣绱� = calcCityTax(V绱�)
+     * 鏈瑪 V = V绱� 鈭� 危宸茬畻绋庡鍊肩◣锛涙湰绗� C 鍚岀悊锛涙湰绗� L = 鏈瑪 P 鈭� 鏈瑪 V 鈭� 鏈瑪 C
+     * 鏈瑪涓◣ = 涓◣(L绱) 鈭� 危宸茬畻绋庝釜绋�
+     * </pre>
      *
-     * @param taxMoneyVo
-     * @return
+     * @param taxMoneyVo 韬唤璇佸彿 + 鏈鍚◣閲戦
+     * @return 鏈鍔冲姟涓◣
      */
     @Override
     public Double getTaxByBeneFiciaryNo(TaxMoneyVO taxMoneyVo) {
         // 閲戦绱姞蹇呴』鐢� BigDecimal锛歞ouble 绱姞浼氬紩鍏ユ诞鐐瑰熬宸紝瀵艰嚧绠楀嚭鐨勪釜绋庡嚭鐜板垎浠ヤ笅璇樊
-        BigDecimal sum = BigDecimal.ZERO;
-        BigDecimal totalScore = BigDecimal.ZERO;
+        BigDecimal sumPretax = BigDecimal.ZERO;
+        BigDecimal sumVat = BigDecimal.ZERO;
+        BigDecimal sumCityTax = BigDecimal.ZERO;
+        BigDecimal sumLaborPretax = BigDecimal.ZERO;
+        BigDecimal sumTax = BigDecimal.ZERO;
         List<ServiceFunddetail> taxationByBeneFiciaryNo = serviceFunddetailMapper.getTaxBeforeByBeneFiciaryNo(taxMoneyVo);
         if (CollectionUtils.isNotEmpty(taxationByBeneFiciaryNo)) {
-            //璁$畻鐢宠閲戦鎬诲拰锛屼笉鍖呮嫭褰撳墠浼犺繘鏉ョ殑
-            sum = taxationByBeneFiciaryNo.stream()
-                    .map(ServiceFunddetail::getAmount)
-                    .filter(java.util.Objects::nonNull)
-                    .map(BigDecimal::valueOf)
-                    .reduce(BigDecimal.ZERO, BigDecimal::add);
-            //涓嶅姞鏈钖叕鐨勪釜绋�
-            totalScore = taxationByBeneFiciaryNo.stream()
-                    .map(ServiceFunddetail::getTaxamount)
-                    .filter(java.util.Objects::nonNull)
-                    .map(BigDecimal::valueOf)
-                    .reduce(BigDecimal.ZERO, BigDecimal::add);
+            for (ServiceFunddetail detail : taxationByBeneFiciaryNo) {
+                sumPretax = sumPretax.add(toMoney(detail.getAmount()));
+                sumVat = sumVat.add(toMoney(detail.getVatAmount()));
+                sumCityTax = sumCityTax.add(toMoney(detail.getCityTaxAmount()));
+                sumLaborPretax = sumLaborPretax.add(laborPretaxOf(detail));
+                sumTax = sumTax.add(toMoney(detail.getTaxamount()));
+            }
         }
 
-        sum = sum.add(new BigDecimal(taxMoneyVo.getMoney()));
-        //鍔犱笂鏈钖叕鐨勬�讳釜绋�
-        String taxation = TaxtUtils.getTaxation(sum);
+        // 鏈鍚◣閲戦 + 绱锛氭寜绱鍙e緞绠楀鍊肩◣/鍩庡缓绋庯紝鏈瑪鍙栧樊棰�
+        // 鏈鍚◣閲戦 + 绱锛氭寜绱鍙e緞绠楀鍊肩◣/鍩庡缓绋庯紝鏈瑪鍙栧樊棰�
+        BigDecimal nowPretax = new BigDecimal(taxMoneyVo.getMoney());
+        BigDecimal cumPretax = sumPretax.add(nowPretax);
+        BigDecimal cumVat = VatTaxUtils.calcVat(cumPretax);
+        BigDecimal cumCityTax = VatTaxUtils.calcCityTax(cumVat);
+        BigDecimal nowVat = VatTaxUtils.roundMoney(cumVat.subtract(sumVat));
+        BigDecimal nowCityTax = VatTaxUtils.roundMoney(cumCityTax.subtract(sumCityTax));
+        if (nowVat.signum() < 0) {
+            nowVat = BigDecimal.ZERO;
+        }
+        if (nowCityTax.signum() < 0) {
+            nowCityTax = BigDecimal.ZERO;
+        }
+        // 鍔冲姟绋庡墠 = 绋庡墠閲戦 鈭� 澧炲�肩◣锛堜笉鎵e煄寤虹◣锛�
+        BigDecimal nowLaborPretax = VatTaxUtils.roundMoney(nowPretax.subtract(nowVat));
+        if (nowLaborPretax.signum() < 0) {
+            // 涓庣畻绋庝竴鑷达細鏈瑪涓嶆墸绋庛�佸樊棰濋『寤�
+            nowVat = BigDecimal.ZERO;
+            nowCityTax = BigDecimal.ZERO;
+            nowLaborPretax = nowPretax;
+        }
 
-        Double tax = new BigDecimal(taxation).subtract(totalScore).doubleValue();
-        return tax;
+        BigDecimal cumLaborPretax = sumLaborPretax.add(nowLaborPretax);
+        // 涓◣妗d綅閲屾墸鍩庡缓绋庯紱鐢ㄢ�滃疄闄呯疮璁″煄寤虹◣鈥濅笌绱鏁版嵁淇濇寔涓�鑷�
+        BigDecimal cumCityForTax = sumCityTax.add(nowCityTax);
+        String taxation = TaxtUtils.getTaxation(cumLaborPretax, cumCityForTax);
+        return new BigDecimal(taxation).subtract(sumTax).doubleValue();
     }
 
     /**
-     * 鏍规嵁绋庡悗宸ヨ祫锛岀畻鍑虹◣鍓嶅伐璧�
+     * 鏄庣粏鐨勫姵鍔$◣鍓嶏細浼樺厛鍙栬惤搴撶殑 labor_pretax_amount锛屼负绌烘椂鍥為��鍒扮◣鍓嶉噾棰濓紙鍏煎鏈洖濉幆澧冿級
+     */
+    private static BigDecimal laborPretaxOf(ServiceFunddetail detail) {
+        if (detail.getLaborPretaxAmount() != null) {
+            return BigDecimal.valueOf(detail.getLaborPretaxAmount());
+        }
+        // 娌℃湁鍔冲姟绋庡墠鏃舵寜鈥滃惈绋庨噾棰濆仛浠风◣鍒嗙鈥濆厹搴曪紝淇濊瘉涓庣畻绋庡彛寰勪竴鑷�
+        return detail.getAmount() == null ? BigDecimal.ZERO
+                : VatTaxUtils.calcLaborPretax(BigDecimal.valueOf(detail.getAmount()));
+    }
+
+    /**
+     * 鏍规嵁绋庡悗宸ヨ祫锛岀畻鍑虹◣鍓嶅伐璧勶紙褰曞叆鏃剁殑鈥滅◣鍚� 鈫� 绋庡墠鈥濋瑙堬級
+     * <p>
+     * 2026-11-30 鍙e緞锛歿@code L = P 鈭� V}锛堜笉鎵e煄寤虹◣锛夈�亄@code N = L 鈭� C 鈭� T(L, C)}銆�
+     * 鍏堢敱鈥滅疮璁$◣鍚庘�濆弽绠楃疮璁″姵鍔$◣鍓� L绱紝鍐嶈В绱鍚◣绋庡墠 P绱紙{@code P绱� = L绱� + V绱瘆锛夛紝鏈瑪鍧囧彇宸銆�
      *
-     * @param taxMoneyVo
-     * @return
+     * @param taxMoneyVo 韬唤璇佸彿 + 鏈鍔冲姟绋庡悗閲戦
+     * @return 绋庡墠/涓◣绛夐瑙堝��
      */
     @Override
     public TaxedMoneyVO getTaxBeforeByAfterMoney(TaxMoneyVO taxMoneyVo) {
         TaxedMoneyVO taxedMoneyVO = new TaxedMoneyVO();
         // 閲戦绱姞蹇呴』鐢� BigDecimal锛岄伩鍏嶆诞鐐瑰熬宸奖鍝嶇◣鍓�/绋庨缁撴灉
-        BigDecimal sum = BigDecimal.ZERO;
-        BigDecimal totalScore = BigDecimal.ZERO;
+        BigDecimal sumTaxed = BigDecimal.ZERO;
+        BigDecimal sumPretax = BigDecimal.ZERO;
+        BigDecimal sumVat = BigDecimal.ZERO;
+        BigDecimal sumCityTax = BigDecimal.ZERO;
+        BigDecimal sumLaborPretax = BigDecimal.ZERO;
+        BigDecimal sumTax = BigDecimal.ZERO;
         List<ServiceFunddetail> taxationByBeneFiciaryNo = serviceFunddetailMapper.getTaxBeforeByBeneFiciaryNo(taxMoneyVo);
         if (CollectionUtils.isNotEmpty(taxationByBeneFiciaryNo)) {
-            //璁$畻鍑虹◣鍚庢�婚噾棰濓紙涓嶅寘鍚湰娆★級
-            sum = taxationByBeneFiciaryNo.stream()
-                    .map(ServiceFunddetail::getTaxedamount)
-                    .filter(java.util.Objects::nonNull)
-                    .map(BigDecimal::valueOf)
-                    .reduce(BigDecimal.ZERO, BigDecimal::add);
-            //姹傚嚭涔嬪墠鐨勬�荤殑涓◣
-            totalScore = taxationByBeneFiciaryNo.stream()
-                    .map(ServiceFunddetail::getTaxamount)
-                    .filter(java.util.Objects::nonNull)
-                    .map(BigDecimal::valueOf)
-                    .reduce(BigDecimal.ZERO, BigDecimal::add);
+            for (ServiceFunddetail detail : taxationByBeneFiciaryNo) {
+                sumTaxed = sumTaxed.add(toMoney(detail.getTaxedamount()));
+                sumPretax = sumPretax.add(toMoney(detail.getAmount()));
+                sumVat = sumVat.add(toMoney(detail.getVatAmount()));
+                sumCityTax = sumCityTax.add(toMoney(detail.getCityTaxAmount()));
+                sumLaborPretax = sumLaborPretax.add(laborPretaxOf(detail));
+                sumTax = sumTax.add(toMoney(detail.getTaxamount()));
+            }
         }
-        //璁$畻鍑烘�荤殑绋庡悗钖叕锛堝寘鍚湰娆★級
-        sum = sum.add(new BigDecimal(taxMoneyVo.getMoney()));
-        //绋庡墠鎬婚噾棰�
-        String taxationBefore = TaxtUtils.getTaxationBefore(sum);
-        //鎬讳釜绋�
-        BigDecimal tax = new BigDecimal(taxationBefore).subtract(sum);
 
-        //鏈鐨勭◣鍓嶉噾棰�
-        String nowTaxMoney = TaxtUtils.getTaxationBefore(new BigDecimal(taxMoneyVo.getMoney()));
-        //鏈鐨勭◣璐�
-        BigDecimal subtract = new BigDecimal(nowTaxMoney).subtract(new BigDecimal(taxMoneyVo.getMoney()));
+        // 鍚湰娆$殑绱绋庡悗
+        BigDecimal nowTaxed = new BigDecimal(taxMoneyVo.getMoney());
+        BigDecimal cumTaxed = sumTaxed.add(nowTaxed);
+        // 绱鍔冲姟绋庡墠锛堢敱绱绋庡悗鍙嶇畻锛屽唴閮ㄥ凡鍚煄寤虹◣淇锛�
+        BigDecimal cumLaborPretax = new BigDecimal(TaxtUtils.getTaxationBefore(cumTaxed));
+        // 绱鍚◣绋庡墠閲戦锛堝唴閮ㄦ寜绱 P 鍒ゆ柇璧峰緛鐐癸紝P = L + V锛�
+        VatTaxUtils.GrossAmount gross = VatTaxUtils.solveGross(cumLaborPretax);
+        // 绱涓◣锛歂 = L 鈭� C 鈭� T  鈫�  T = L 鈭� C 鈭� N
+        BigDecimal cumTax = VatTaxUtils.roundMoney(
+                cumLaborPretax.subtract(gross.getCityTax()).subtract(cumTaxed));
+        if (cumTax.signum() < 0) {
+            cumTax = BigDecimal.ZERO;
+        }
 
-        taxedMoneyVO.setAllTax(tax.toString());
-        taxedMoneyVO.setAllTaxbeforeMoney(taxationBefore);
-        taxedMoneyVO.setAllAaxAfterMoney(sum.toString());
-        taxedMoneyVO.setNowTaxBeforeMoney(nowTaxMoney);
-        taxedMoneyVO.setNowTax(subtract.toString());
+        // 鏈瑪鍏ㄩ儴鍙栧樊棰濓紝涓� calculateTax 鐨勫垎鎽婂彛寰勪竴鑷�
+        BigDecimal nowPretax = VatTaxUtils.roundMoney(gross.getPretax().subtract(sumPretax));
+        BigDecimal nowLaborPretax = VatTaxUtils.roundMoney(cumLaborPretax.subtract(sumLaborPretax));
+        BigDecimal nowTax = VatTaxUtils.roundMoney(cumTax.subtract(sumTax));
+        if (nowTax.signum() < 0) {
+            nowTax = BigDecimal.ZERO;
+        }
+        if (nowPretax.signum() < 0) {
+            nowPretax = VatTaxUtils.roundMoney(nowLaborPretax.add(gross.getVat().subtract(sumVat)));
+        }
+
+        taxedMoneyVO.setAllTax(cumTax.toString());
+        taxedMoneyVO.setAllTaxbeforeMoney(gross.getPretax().toString());
+        taxedMoneyVO.setAllAaxAfterMoney(cumTaxed.toString());
+        taxedMoneyVO.setNowTaxBeforeMoney(nowPretax.toString());
+        taxedMoneyVO.setNowTax(nowTax.toString());
 
         return taxedMoneyVO;
     }
@@ -375,7 +431,7 @@
                 detail.setLaborPretaxAmount(p.doubleValue());
                 detail.setTaxamount(0.0);
                 detail.setTaxedamount(p.doubleValue());
-                detail.setTaxVersion(VatTaxUtils.TAX_VERSION_V2);
+                detail.setTaxVersion(VatTaxUtils.TAX_VERSION_CURRENT);
                 detail.setTaxTime(taxTime);
                 updateList.add(detail);
 
@@ -416,13 +472,13 @@
             BigDecimal taxedAmount;
 
             if (afterTax) {
-                // 5.2.2 绋庡悗褰曞叆锛氬厛鍙嶇畻鍔冲姟绋庡墠锛屽啀寰幆鍙嶈В绋庡墠/澧炲�肩◣/鍩庡缓绋�
+                // 5.2.2 绋庡悗褰曞叆锛氱敱鈥滅疮璁$◣鍚庘�濆弽绠楃疮璁″姵鍔$◣鍓� L锛圠 = P 鈭� V锛屽煄寤虹◣鍦ㄤ釜绋庢。浣嶉噷鎵o級锛屽啀瑙� P/V/C
                 taxedAmount = toMoney(detail.getTaxedamount());
                 BigDecimal sumTaxed = prevTaxed.add(taxedAmount);
                 BigDecimal sumLaborPretax = new BigDecimal(TaxtUtils.getTaxationBefore(sumTaxed));
                 laborPretax = VatTaxUtils.roundMoney(sumLaborPretax.subtract(prevLaborPretax));
                 if (laborPretax.signum() < 0) {
-                    // 閫愮瑪鍚戜笂鍙栨暣鍙兘甯︽潵鍑犲垎閽辩殑鍙嶇畻璇樊锛屽宸唴鎸� 0 澶勭悊锛涜秴鍑哄宸鏄庢暟鎹紓甯�
+                    // 閫愮瑪鍙栨暣鍙兘甯︽潵鍑犲垎閽辩殑鍙嶇畻璇樊锛屽宸唴鎸� 0 澶勭悊锛涜秴鍑哄宸鏄庢暟鎹紓甯�
                     if (laborPretax.abs().compareTo(new BigDecimal("0.05")) <= 0) {
                         log.warn("绋庡悗閲戦鍙嶇畻鍔冲姟绋庡墠鍑虹幇璐熷熬宸紝宸叉寜 0 澶勭悊銆備汉鍛橈細{}锛屽弽绠楀姵鍔$◣鍓�={}锛屽師绱鍔冲姟绋庡墠={}",
                                 safeName(detail), sumLaborPretax, prevLaborPretax);
@@ -431,27 +487,62 @@
                         throw new BaseException("绋庡悗閲戦鍙嶇畻鍔冲姟绋庡墠澶辫触锛屼汉鍛橈細" + safeName(detail));
                     }
                 }
-                taxAmount = VatTaxUtils.roundMoney(laborPretax.subtract(taxedAmount));
+                // 绱鍙e緞锛歅绱� = L绱� + V绱紙V绱� 鐨勮捣寰佺偣鎸夌疮璁$◣鍓嶅垽鏂級锛屾湰绗斿彇宸
+                VatTaxUtils.GrossAmount gross = VatTaxUtils.solveGross(sumLaborPretax);
+                pretax = VatTaxUtils.roundMoney(gross.getPretax().subtract(prevAmount));
+                vat = VatTaxUtils.roundMoney(gross.getVat().subtract(prevVat));
+                cityTax = VatTaxUtils.roundMoney(gross.getCityTax().subtract(prevCityTax));
+                if (pretax.signum() < 0) {
+                    pretax = VatTaxUtils.roundMoney(laborPretax.add(vat));
+                }
+                if (vat.signum() < 0) {
+                    vat = BigDecimal.ZERO;
+                }
+                if (cityTax.signum() < 0) {
+                    cityTax = BigDecimal.ZERO;
+                }
+                // N = L 鈭� C 鈭� T  鈫�  T = L 鈭� C 鈭� N
+                taxAmount = VatTaxUtils.roundMoney(laborPretax.subtract(cityTax).subtract(taxedAmount));
                 if (taxAmount.signum() < 0) {
                     taxAmount = BigDecimal.ZERO;
+                    taxedAmount = VatTaxUtils.roundMoney(laborPretax.subtract(cityTax));
                 }
-                VatTaxUtils.GrossAmount gross = VatTaxUtils.solveGross(laborPretax);
-                pretax = gross.getPretax();
-                vat = gross.getVat();
-                cityTax = gross.getCityTax();
             } else {
-                // 5.2.3 绋庡墠褰曞叆锛氬厛绠楀鍊肩◣/鍩庡缓绋�/鍔冲姟绋庡墠锛屽啀鎸夌疮璁″姵鍔$◣鍓嶇畻鍔冲姟涓◣
+                // 5.2.3 绋庡墠褰曞叆锛氬厛鎸夌疮璁$◣鍓嶇畻绱澧炲�肩◣/鍩庡缓绋庯紝鍐嶆寜宸寰楁湰绗旓紝鏈�鍚庢寜绱鍔冲姟绋庡墠绠椾釜绋�
                 pretax = toMoney(detail.getAmount());
-                vat = VatTaxUtils.calcVat(pretax);
-                cityTax = VatTaxUtils.calcCityTax(vat);
-                laborPretax = VatTaxUtils.roundMoney(pretax.subtract(vat).subtract(cityTax));
+                BigDecimal cumPretax = prevAmount.add(pretax);
+                BigDecimal cumVat = VatTaxUtils.calcVat(cumPretax);
+                BigDecimal cumCityTax = VatTaxUtils.calcCityTax(cumVat);
+                vat = VatTaxUtils.roundMoney(cumVat.subtract(prevVat));
+                cityTax = VatTaxUtils.roundMoney(cumCityTax.subtract(prevCityTax));
+                if (vat.signum() < 0) {
+                    vat = BigDecimal.ZERO;
+                }
+                if (cityTax.signum() < 0) {
+                    cityTax = BigDecimal.ZERO;
+                }
+                // 鍔冲姟绋庡墠 = 绋庡墠閲戦 鈭� 澧炲�肩◣锛堜笉鎵e煄寤虹◣锛�
+                laborPretax = VatTaxUtils.roundMoney(pretax.subtract(vat));
+                if (laborPretax.signum() < 0) {
+                    // 鏋佺杈圭晫锛氱疮璁″垰璺ㄨ繃璧峰緛鐐广�佹湰绗旈噾棰濆皬浜庤烦鍙橀噺銆�
+                    // 鏈瑪涓嶆墸绋庛�佸樊棰濋『寤跺埌鍚庣画绗旓紙绱鍙帹杩涘疄闄呭垎鎽婂�硷紝涓嬩竴绗斿樊鍒嗘椂鑷姩琛ュ洖锛�
+                    log.warn("绱璺ㄨ捣寰佺偣瀵艰嚧鏈瑪鍔冲姟绋庡墠涓鸿礋锛屾湰绗斾笉鎵g◣銆佸樊棰濋『寤躲�備汉鍛橈細{}锛屾湰绗旂◣鍓�={}锛屾湰绗斿鍊肩◣={}锛�"
+                                    + "鏈瑪鍩庡缓绋�={}锛岀疮璁$◣鍓�={}",
+                            safeName(detail), pretax, vat, cityTax, cumPretax);
+                    vat = BigDecimal.ZERO;
+                    cityTax = BigDecimal.ZERO;
+                    laborPretax = pretax;
+                }
                 BigDecimal sumLaborPretax = prevLaborPretax.add(laborPretax);
-                BigDecimal sumTax = new BigDecimal(TaxtUtils.getTaxation(sumLaborPretax));
+                // 涓◣妗d綅閲屾墸鍩庡缓绋庯紱鐢ㄢ�滃疄闄呯疮璁″煄寤虹◣鈥濅笌绱 Map 淇濇寔涓�鑷�
+                BigDecimal cumCityForTax = prevCityTax.add(cityTax);
+                BigDecimal sumTax = new BigDecimal(TaxtUtils.getTaxation(sumLaborPretax, cumCityForTax));
                 taxAmount = VatTaxUtils.roundMoney(sumTax.subtract(prevTax));
                 if (taxAmount.signum() < 0) {
                     taxAmount = BigDecimal.ZERO;
                 }
-                taxedAmount = VatTaxUtils.roundMoney(laborPretax.subtract(taxAmount));
+                // N = L 鈭� C 鈭� T
+                taxedAmount = VatTaxUtils.roundMoney(laborPretax.subtract(cityTax).subtract(taxAmount));
             }
 
             detail.setAmount(pretax.doubleValue());
@@ -460,7 +551,7 @@
             detail.setLaborPretaxAmount(laborPretax.doubleValue());
             detail.setTaxamount(taxAmount.doubleValue());
             detail.setTaxedamount(taxedAmount.doubleValue());
-            detail.setTaxVersion(VatTaxUtils.TAX_VERSION_V2);
+            detail.setTaxVersion(VatTaxUtils.TAX_VERSION_CURRENT);
             detail.setTaxTime(taxTime);
             updateList.add(detail);
 
@@ -494,7 +585,7 @@
         serviceFund.setLaborPretaxCost(laborPretaxTotal.doubleValue());
         serviceFund.setTaxcost(taxTotal.doubleValue());
         serviceFund.setTaxedcost(taxedTotal.doubleValue());
-        serviceFund.setTaxVersion(VatTaxUtils.TAX_VERSION_V2);
+        serviceFund.setTaxVersion(VatTaxUtils.TAX_VERSION_CURRENT);
         serviceFund.setFundtaxtime(taxTime);
         serviceFund.setIstax(1);
         serviceFundMapper.updateById(serviceFund);

--
Gitblit v1.9.3