From dc0ce40d1ae331a054017ae322da930f07094f52 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 08 十一月 2023 16:33:53 +0800
Subject: [PATCH] 代码提交
---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java | 14 +++++++++++---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java | 6 +++++-
2 files changed, 16 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 07ad7cd..c457492 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
@@ -2125,8 +2125,12 @@
@PostMapping("/totaltax")
@RepeatSubmit
public AjaxResult totaltax(@RequestBody TotalTaxVO totalTaxVO) {
+ Boolean totaltax = serviceFundService.totaltax(totalTaxVO);
+ if(totaltax){
+ return AjaxResult.success("鍚堣涓◣鎴愬姛,璇峰幓E:\\OPO\\WEB\\Upload\\download 涓煡鎵炬枃浠�");
+ }
- return AjaxResult.success(serviceFundService.totaltax(totalTaxVO));
+ return AjaxResult.success("鍚堣澶辫触锛岃绋嶅悗閲嶈瘯");
}
}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
index 01c8600..aaf94e9 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -14,6 +14,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.tax.TaxtUtils;
import com.ruoyi.common.utils.HttpClientKit;
import com.ruoyi.common.utils.bean.DtoConversionUtils;
@@ -759,6 +760,9 @@
totalTaxVO.setIsTaxAfter(0);
}
List<ServiceFunddetail> serviceFunddetails = serviceFunddetailMapper.totlaTax(totalTaxVO.getFundids());
+ if (CollectionUtils.isEmpty(serviceFunddetails)) {
+ throw new BaseException("鏌ヨ鐨勮鎯呮暟鎹负绌�");
+ }
//鐢ㄤ簬杩斿洖excel
List<ServiceFunddetailExcel> serviceFunddetailList = new ArrayList<>();
@@ -791,7 +795,8 @@
//鎵撳嵃绠楄繃绋庝箣鍚庣殑锛屽悎璁xcel
util.exportExcel(serviceFunddetailList, "鍚堣涓◣锛堢◣鍚庯級");
} else {
- a : for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
+ a:
+ for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
ServiceFunddetailExcel sfeBefore = new ServiceFunddetailExcel();
ServiceFunddetailExcel sfeAfter = new ServiceFunddetailExcel();
@@ -804,7 +809,10 @@
for (ServiceFunddetail serviceFunddetail2 : serviceFunddetails) {
- if (serviceFunddetail.getBeneficiaryname().trim().equals(serviceFunddetail2.getBeneficiaryname().trim()) && !(serviceFunddetail2.getServicesscopename().trim().equals("绋庡悗"))) {
+ if (StringUtils.isEmpty(serviceFunddetail2.getServicesscopename())) {
+ throw new BaseException("鏈嶅姟璇存槑涓虹┖,璇锋鏌ュ悗鍐嶈绠�");
+ }
+ if (serviceFunddetail.getBeneficiaryname().equals(serviceFunddetail2.getBeneficiaryname()) && !(serviceFunddetail2.getServicesscopename().equals("绋庡悗"))) {
//绱绋庡墠
sfeBefore.setIdcardno(serviceFunddetail2.getIdcardno());
sfeBefore.setBankcardno(serviceFunddetail2.getBankcardno());
@@ -820,7 +828,7 @@
}
sfeBefore.setTaxedamount(null);
- } else if (serviceFunddetail.getBeneficiaryname().trim().equals(serviceFunddetail2.getBeneficiaryname().trim()) && serviceFunddetail2.getServicesscopename().trim().equals("绋庡悗")) {
+ } else if (serviceFunddetail.getBeneficiaryname().equals(serviceFunddetail2.getBeneficiaryname()) && serviceFunddetail2.getServicesscopename().equals("绋庡悗")) {
//绱绋庡悗
sfeAfter.setIdcardno(serviceFunddetail2.getIdcardno());
sfeAfter.setBankcardno(serviceFunddetail2.getBankcardno());
--
Gitblit v1.9.3