From d91dfa2b823f6644f1e58dd4770f57e0d0cef08f Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 20 三月 2024 17:51:39 +0800
Subject: [PATCH] 代码提交
---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 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 079fc2e..26f1267 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
@@ -16,6 +16,7 @@
import com.ruoyi.project.domain.*;
import com.ruoyi.project.domain.vo.*;
import com.ruoyi.project.mapper.ServiceFundMapper;
+import com.ruoyi.project.mapper.SpStatBonusMapper;
import lombok.extern.flogger.Flogger;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -46,6 +47,9 @@
@Autowired
ServiceFundMapper serviceFundMapper;
+
+ @Autowired
+ SpStatBonusMapper spStatBonusMapper;
/**
@@ -98,6 +102,12 @@
}
if (serviceFunddetail.getDel_flag() != null) {
wrappers.eq(ServiceFunddetail::getDel_flag, serviceFunddetail.getDel_flag());
+ }
+ if (serviceFunddetail.getDeptId() != null) {
+ wrappers.eq(ServiceFunddetail::getDeptId, serviceFunddetail.getDeptId());
+ }
+ if (serviceFunddetail.getDeptName() != null) {
+ wrappers.eq(ServiceFunddetail::getDeptName, serviceFunddetail.getDeptName());
}
return this.list(wrappers);
}
@@ -274,9 +284,9 @@
//鐢ㄤ簬涓存椂淇濆瓨宸茬粡绠楀ソ鐨�"璐圭敤璇︽儏鏁版嵁"
List<ServiceFunddetail> temporarySave = new ArrayList<>();
-
//淇濆瓨鎬荤◣鍓嶉噾棰濓紙鐢ㄤ簬鏇存柊fund琛ㄩ噷鐨勶級
BigDecimal pretaxcost = BigDecimal.valueOf(0.00);
+ BigDecimal taxedcost = BigDecimal.valueOf(0.00);
for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
if (StringUtils.isEmpty(serviceFunddetail.getIdcardno())) {
logger.info("serviceFunddetail鏁版嵁鍏ュ弬 锛� {}", serviceFunddetail);
@@ -286,6 +296,10 @@
} else {
serviceFunddetail.setAmount(serviceFunddetail.getTaxedamount());
}
+ //鍏徃鐨勭敵璇烽噾棰濅篃瑕佸姞杩涘幓
+ pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
+ taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
+
serviceFunddetail.setTaxamount(0.0);
logger.info("serviceFunddetail鏇存柊鍚庣殑鏁版嵁 锛� {}", serviceFunddetail);
boolean b = this.updateById(serviceFunddetail);
@@ -361,6 +375,7 @@
// 灏嗚鏉℃暟鎹洿鏂�
boolean b = this.updateById(serviceFunddetail3);
pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
+ taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
// 鎶婅鏁版嵁锛屾斁鍒颁复鏃剁殑闆嗗悎涓�
temporarySave.add(serviceFunddetail3);
} else if (serviceFunddetail.getServicesscopename().contains("绋庡悗")) {
@@ -391,12 +406,14 @@
// 灏嗚鏉℃暟鎹洿鏂�
updateById(serviceFunddetail3);
pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail3.getAmount()));
+ taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail3.getTaxedamount()));
// 鎶婅鏁版嵁锛屾斁鍒颁复鏃剁殑闆嗗悎涓�
temporarySave.add(serviceFunddetail3);
}
}
ServiceFund serviceFund = new ServiceFund();
serviceFund.setPretaxcost(pretaxcost.doubleValue());
+ serviceFund.setTaxedcost(taxedcost.doubleValue());
serviceFund.setId(serviceFunddetails.get(0).getFundid());
if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) {
serviceFund.setFundtaxtime(new Date());
@@ -465,4 +482,9 @@
return map;
}
+
+ @Override
+ public List<SpStatBonus> getListBySpStatBonus(SpStatBonusReq spStatBonusReq) {
+ return spStatBonusMapper.getListBySpStatBonus(spStatBonusReq.getPabegtime(), spStatBonusReq.getPaendtime(), spStatBonusReq.getPadeptno(), spStatBonusReq.getPausername(), spStatBonusReq.getPabonustype());
+ }
}
--
Gitblit v1.9.3