From 0c3f8972c92d0d5ce5912be6c460a3f2165ec04c Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 02 八月 2023 17:05:44 +0800
Subject: [PATCH] BUG修改

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
index 2e8ae0f..0595f39 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -24,6 +24,7 @@
 import freemarker.template.TemplateException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.ibatis.annotations.Options;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -42,6 +43,7 @@
  * @author ruoyi
  * @date 2022-01-24
  */
+@Slf4j
 @Api("璐圭敤鐢宠涓�")
 @RestController
 @RequestMapping("/project/fund")
@@ -445,9 +447,9 @@
         double taxBefore = 0.0;
         double taxAfter = 0.0;
         for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
-
             serviceFunddetail.setFundid(id);
-            if (serviceFunddetail.getTaxedamount() != 0.0 && serviceFunddetail.getAmount() != 0.0 && serviceFunddetail.getTaxedamount() != null && serviceFunddetail.getAmount() != null) {
+            log.info("serviceFunddetail鐨勫�间负 : {}", serviceFunddetail);
+            if (serviceFunddetail.getTaxedamount() != null && serviceFunddetail.getAmount() != null && serviceFunddetail.getTaxedamount() != 0.0 && serviceFunddetail.getAmount() != 0.0) {
                 // 绋庡墠绋庡悗閮戒笉涓虹┖
                 if (serviceFunddetail.getId() == null) {
                     serviceFunddetailService.save(serviceFunddetail);
@@ -455,7 +457,7 @@
                     serviceFunddetailService.updateById(serviceFunddetail);
                 }
                 continue;
-            } else if (serviceFunddetail.getTaxedamount() != 0.0 && serviceFunddetail.getTaxedamount() != null) {
+            } else if (serviceFunddetail.getTaxedamount() != null && serviceFunddetail.getTaxedamount() != 0.0) {
                 // 绋庡悗姹傜◣鍓�,濡傛灉鏄笓瀹惰垂鐢宠  鎴� 浼︾悊涓撳璐圭敵璇�   鎵嶄細璁$畻绋庡墠绋庡悗
                 if (StringUtils.isNotEmpty(serviceFundVO.getApplytype()) && serviceFundVO.getApplytype().equals("1") || serviceFundVO.getApplytype().equals("2")) {
                     Double taxationBefore = Double.valueOf(TaxtUtils.getTaxationBefore(BigDecimal.valueOf(serviceFunddetail.getTaxedamount())));
@@ -464,7 +466,7 @@
                     serviceFunddetail.setAmount(Double.valueOf(taxationBefore));
                     serviceFunddetail.setTaxamount(Double.parseDouble(taxation));
                 }
-            } else if (serviceFunddetail.getAmount() != 0.0 && serviceFunddetail.getAmount() != null) {
+            } else if (serviceFunddetail.getAmount() != null && serviceFunddetail.getAmount() != 0.0) {
                 // 绋庡墠姹傜◣鍚�,濡傛灉鏄笓瀹惰垂鐢宠  鎴� 浼︾悊涓撳璐圭敵璇�   鎵嶄細璁$畻绋庡墠绋庡悗
                 if (StringUtils.isNotEmpty(serviceFundVO.getApplytype()) && serviceFundVO.getApplytype().equals("1") || serviceFundVO.getApplytype().equals("2")) {
                     double tax = Double.parseDouble(TaxtUtils.getTaxation(BigDecimal.valueOf(serviceFunddetail.getAmount())));

--
Gitblit v1.9.3