From e842ed74b3167075e4f8f0cf76b38ddc53a8fb54 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 12 九月 2025 22:18:48 +0800
Subject: [PATCH] 日志修改
---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java | 301 ++++++++++++++++++++-----------------------------
1 files changed, 125 insertions(+), 176 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 0f5631a..251704e 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
@@ -267,217 +267,166 @@
}
/**
- * 鏍规嵁鏉′欢绠楃◣
+ * 鎵归噺绠楃◣涓绘柟娉�
+ * 1. 鏍¢獙鍙傛暟
+ * 2. 鎺掑簭鏄庣粏锛屼繚璇佺◣鏃堕棿涓虹┖鐨勬帓鍦ㄥ悗闈�
+ * 3. 閬嶅巻姣忔潯鏄庣粏锛屽垎韬唤璇佸彿涓虹┖鍜屼笉涓虹┖涓ょ鎯呭喌鍒嗗埆澶勭悊
+ * - 韬唤璇佸彿涓虹┖锛氱洿鎺ユ寜瑙勫垯璧嬪�肩◣鍚庨噾棰濄�佺◣閲�
+ * - 韬唤璇佸彿涓嶄负绌猴細
+ * a. 鏌ヨ鏈湀绗竴澶╋紝鑾峰彇鏈�澶у簭鍙�
+ * b. 鏌ヨ鏈湀绱绋庡墠銆佺◣閲戙�佺◣鍚庨噾棰�
+ * c. 鏍规嵁"绋庡墠/绋庡悗"绫诲瀷鍒嗗埆璁$畻绋庨噾銆佺◣鍚庨噾棰�
+ * d. 璁剧疆绠楃◣鏃堕棿銆佸簭鍙风瓑
+ * 4. 绱鏈壒娆℃�荤◣鍓嶃�佺◣鍚庨噾棰�
+ * 5. 鎵归噺鏇存柊鎵�鏈夋槑缁�
+ * 6. 鏇存柊涓昏〃ServiceFund鐨勬�婚噾棰濄�佺畻绋庢椂闂淬�佺姸鎬�
*
- * @param serviceFunddetails
+ * @param serviceFunddetails 璐圭敤鏄庣粏鍒楄〃
+ * @return 鏄惁绠楃◣鎴愬姛
*/
@Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean calculateTax(List<ServiceFunddetail> serviceFunddetails) {
+ public Boolean calculateTax(List<ServiceFunddetail> serviceFunddetails, Map<String, TaxMoneySumEO> tempTaxSumMap) {
+ // 1. 鏍¢獙鍙傛暟
if (CollectionUtils.isEmpty(serviceFunddetails)) {
throw new BaseException("绠楃◣鏉′欢涓虹┖锛岃妫�鏌ュ悗锛屽啀杩涜璁$畻");
}
- // 鐢ㄤ簬涓存椂淇濆瓨宸茬粡绠楀ソ鐨�"璐圭敤璇︽儏鏁版嵁"
- List<ServiceFunddetail> temporarySave = new ArrayList<>();
- // 鐢ㄤ簬璁板綍搴忓彿
- Map<String, Long> xhMap = new HashMap<>();
+ // 2. 鎺掑簭锛岀◣鏃堕棿涓虹┖鐨勬帓鍚庨潰
+ serviceFunddetails.sort(Comparator.comparing(obj -> ObjectUtils.isEmpty(obj.getTaxTime()) ? 1 : 0));
- // 鍏堝serviceFunddetails鎺掑簭
- Comparator<ServiceFunddetail> customComparator = Comparator.comparing(obj -> {
- if (ObjectUtils.isEmpty(obj.getTaxTime())) {
- return 1; // 杩斿洖1琛ㄧず瀛楁涓虹┖鐨勫璞℃帓鍦ㄥ悗闈�
- } else {
- return 0; // 杩斿洖0琛ㄧず瀛楁涓嶄负绌虹殑瀵硅薄淇濇寔鍘熼『搴�
- }
- });
- Collections.sort(serviceFunddetails, customComparator);
-
- //杩欎釜鏄负浜嗚幏鍙杅und_tax_time
+ // 3. 鑾峰彇鏈壒娆undid鍙婁富琛ㄤ俊鎭�
Long fundid = serviceFunddetails.get(0).getFundid();
log.info("绠楃◣鐨刦undid鐨勫�间负锛歿}", fundid);
ServiceFund serviceFund1 = serviceFundMapper.selectById(fundid);
log.info("fund琛ㄧ殑fundtextime鍊间负锛歿}", serviceFund1.getFundtaxtime());
- //淇濆瓨鎬荤◣鍓嶉噾棰濓紙鐢ㄤ簬鏇存柊fund琛ㄩ噷鐨勶級
- BigDecimal pretaxcost = BigDecimal.valueOf(0.00);
- BigDecimal taxedcost = BigDecimal.valueOf(0.00);
- for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
- if (serviceFunddetail.getBeneficiaryname().equals("鍚村悍鏉�")) {
- System.out.println(serviceFunddetail);
- }
- if (StringUtils.isEmpty(serviceFunddetail.getIdcardno())) {
- logger.info("serviceFunddetail鏁版嵁鍏ュ弬 锛� {}", serviceFunddetail);
- //濡傛灉韬唤璇佸彿涓虹┖锛屽氨涓嶇敤鏌ヤ簡锛屽彲鑳芥槸鍖婚櫌鐨勮褰�
- if (StringUtils.isEmpty(serviceFunddetail.getServicesscopename()) || !serviceFunddetail.getServicesscopename().contains("绋庡悗")) {
- serviceFunddetail.setTaxedamount(serviceFunddetail.getAmount());
- } else {
- serviceFunddetail.setAmount(serviceFunddetail.getTaxedamount());
- }
- //鍏徃鐨勭敵璇烽噾棰濅篃瑕佸姞杩涘幓
- pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
- taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
+ // 4. 鍒濆鍖栫疮璁¢噾棰濄�佸緟鏇存柊鏄庣粏鍒楄〃銆佸簭鍙风紦瀛樸�佺疮璁¢噾棰濈紦瀛�
+ BigDecimal pretaxcost = BigDecimal.ZERO;
+ BigDecimal taxedcost = BigDecimal.ZERO;
- serviceFunddetail.setTaxamount(0.0);
- logger.info("serviceFunddetail鏇存柊鍚庣殑鏁版嵁 锛� {}", serviceFunddetail);
- boolean b = this.updateById(serviceFunddetail);
- logger.info("serviceFunddetail淇敼缁撴灉 锛� {}", b);
+ //鍒涘缓涓�涓敤浜庡瓨鏀锯�滈渶瑕佹洿鏂板埌鏁版嵁搴撶殑ServiceFunddetail瀵硅薄鈥濈殑鍒楄〃
+ List<ServiceFunddetail> updateList = new ArrayList<>();
+
+ // 5. 閬嶅巻姣忔潯鏄庣粏锛屽垎鎯呭喌澶勭悊
+ for (ServiceFunddetail detail : serviceFunddetails) {
+ // 5.1 韬唤璇佸彿涓虹┖锛岀洿鎺ヨ祴鍊硷紙涓�浜涗汉鎴栧叕鍙革紝涓嶉渶瑕佺畻绋庯級
+ if (StringUtils.isEmpty(detail.getIdcardno())) {
+ if (StringUtils.isEmpty(detail.getServicesscopename()) || !detail.getServicesscopename().contains("绋庡悗")) {
+ // 鏅�氭槑缁嗭紝绋庡悗閲戦=鐢宠閲戦
+ detail.setTaxedamount(detail.getAmount());
+ } else {
+ // 绋庡悗鏄庣粏锛岀敵璇烽噾棰�=绋庡悗閲戦
+ detail.setAmount(detail.getTaxedamount());
+ }
+ // 绱鏈壒娆℃�婚噾棰�
+ pretaxcost = pretaxcost.add(BigDecimal.valueOf(detail.getAmount()));
+ taxedcost = taxedcost.add(BigDecimal.valueOf(detail.getTaxedamount()));
+ detail.setTaxamount(0.0);
+ updateList.add(detail);
continue;
}
- //鑾峰彇褰撴湀鐨勭涓�澶�
- Date firstDay = Date.from(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).atStartOfDay(ZoneId.systemDefault()).toInstant());
- //鑾峰彇鍒板綋鍓嶄汉鐨勬湰鏈堢畻绋庡簭鍙锋渶澶у��
- TaxMoneyByItemEO taxMoneyByItemEO = new TaxMoneyByItemEO();
- taxMoneyByItemEO.setFirstDay(firstDay);
- taxMoneyByItemEO.setIDCard(serviceFunddetail.getIdcardno());
- taxMoneyByItemEO.setTaxTime(new Date());
- //鏍规嵁鏉′欢鑾峰彇琛ㄤ腑璇ユ潯鏁版嵁鐨勨�濆簭鍙封�滄渶澶у��
- Long maxXH = serviceFunddetailMapper.getMaxXH(taxMoneyByItemEO);
- if (maxXH == null) {
- maxXH = 1L;
- } else {
- maxXH = maxXH + 1;
- }
- //搴忓彿Map涓庢暟鎹簱琛ㄩ噷鐨剎h鍚屾椂涓嶄负绌猴紝閭e氨浠ap閲岀殑涓哄噯
- if (ObjectUtils.isNotEmpty(xhMap)) {
- Long xhValue = xhMap.get(serviceFunddetail.getIdcardno());
- if (xhValue != null) maxXH = xhValue + 1;
- }
+ // 5.2 韬唤璇佸彿涓嶄负绌猴紝闇�鏌ュ巻鍙茬疮璁¢噾棰濄�佸簭鍙�
+ String idcard = detail.getIdcardno().trim();
- TaxMoneyByItemEO taxMoneyVO = new TaxMoneyByItemEO();
- if (serviceFund1.getFundtaxtime() != null) {
- taxMoneyVO.setTaxTime(serviceFund1.getFundtaxtime());
- } else {
- taxMoneyVO.setTaxTime(new Date());
- }
- taxMoneyVO.setFirstDay(firstDay);
- // 鑾峰彇璇ヨ韩浠借瘉鍙峰湪鏈湀鐨勬墍鏈夎褰�
- taxMoneyVO.setFundID(serviceFunddetail.getFundid());
- taxMoneyVO.setIDCard(serviceFunddetail.getIdcardno());
- if (serviceFunddetail.getXh() != null) {
- serviceFunddetail.setXh(null);
- taxMoneyVO.setXh(maxXH);
- xhMap.put(serviceFunddetail.getIdcardno(), maxXH);
- } else {
- taxMoneyVO.setXh(maxXH);
- xhMap.put(serviceFunddetail.getIdcardno(), maxXH);
- }
- //鏌ュ嚭绋庡墠銆佺◣銆佺◣鍚庣殑鎬婚锛堜笉鍖呭惈鏈锛�
- logger.info("taxMoneyVO鍏ュ弬鐨勫�� 锛� {}", taxMoneyVO);
- TaxMoneySumEO taxSum = serviceFunddetailMapper.getTaxSum(taxMoneyVO);
- logger.info("鏌ヨ鐨則axSum鐨勫�� 锛� {}", taxSum);
- if (ObjectUtils.isEmpty(taxSum)) {
+ // 5.2.1 鏌ヨ鏈湀绱閲戦锛堢紦瀛橀伩鍏嶉噸澶嶆煡搴擄級
+ TaxMoneySumEO taxSum = tempTaxSumMap.getOrDefault(idcard, null);
+ if (taxSum == null) {
taxSum = new TaxMoneySumEO();
+ taxSum.setXh(1L);
+ detail.setXh(1L);
+ tempTaxSumMap.put(idcard, taxSum);
+ detail.setAllAmount(taxSum.getAmounts());
+ } else {
+ long xh = taxSum.getXh() + 1;
+ taxSum.setXh(xh);
+ tempTaxSumMap.put(idcard, taxSum);
+ detail.setXh(xh);
+ detail.setAllAmount(taxSum.getAmounts());
}
- //鍒ゆ柇涓存椂闆嗗悎temporarySave涓紝鏈夋病鏈夊凡缁忕畻杩囩殑鏁版嵁
- if (CollectionUtils.isNotEmpty(temporarySave)) {
- for (ServiceFunddetail serviceFunddetail1 : temporarySave) {
- //濡傛灉鏈鐨勨�濅汉鍛樼被鍨嬧�溿�佲�濊韩浠借瘉鍙封�滃湪涓存椂闆嗗悎涓瓨鍦紝鍒欏皢闆嗗悎鏁版嵁涓殑璇ュ彈鐩婁汉鐨勶紝绋庡墠銆佺◣閲戙�佺◣鍚庯紝鍜屾�荤殑鐩稿姞锛屽苟灏嗚�佺殑瑕嗙洊
- // if (serviceFunddetail1.getApplytype().equals(serviceFunddetail.getApplytype()) && serviceFunddetail1.getBeneficiaryno().equals(serviceFunddetail.getBeneficiaryno())) {
- if (serviceFunddetail1.getIdcardno().trim().equals(serviceFunddetail.getIdcardno().trim())) {
- //灏嗛泦鍚堟暟鎹腑鐨勮鍙楃泭浜虹殑锛岀◣鍓嶃�佺◣閲戙�佺◣鍚庯紝鍜屾�荤殑鐩稿姞
- BigDecimal amounts = BigDecimal.valueOf(taxSum.getAmounts()).add(new BigDecimal(String.valueOf(serviceFunddetail1.getAmount())));
- BigDecimal taxAmounts = BigDecimal.valueOf(taxSum.getTaxAmounts()).add(new BigDecimal(String.valueOf(serviceFunddetail1.getTaxamount())));
- BigDecimal TaxedAmounts = BigDecimal.valueOf(taxSum.getTaxedAmounts()).add(new BigDecimal(String.valueOf(serviceFunddetail1.getTaxedamount())));
- //灏嗚�佺殑瑕嗙洊
- taxSum.setAmounts(amounts.doubleValue());
- taxSum.setTaxAmounts(taxAmounts.doubleValue());
- taxSum.setTaxedAmounts(TaxedAmounts.doubleValue());
- }
- }
- }
- //璁板綍涓�涓嬭繖涓◣鍓嶆�婚
- serviceFunddetail.setAllAmount(taxSum.getAmounts());
-
- if (serviceFunddetail.getXh() == null) {
- serviceFunddetail.setXh(maxXH);
- }
-
- if (StringUtils.isEmpty(serviceFunddetail.getServicesscopename()) || !serviceFunddetail.getServicesscopename().contains("绋庡悗")) {
- logger.info("璁$畻绋庡墠淇℃伅寮�濮嬶細{}", serviceFunddetail);
- logger.info("taxSum鍏ュ弬鏁版嵁锛歿}", taxSum);
- // 濡備綍绋庡墠閲戦涓嶄负绌猴紝鐢ㄤ箣鍓嶇殑鈥濇�荤◣鍓嶉噾棰濃�滐紝鍔犱笂褰撳墠鈥濈◣鍓嶉噾棰濃��
- BigDecimal newAmounts = BigDecimal.valueOf(taxSum.getAmounts()).add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
-
- // 璁$畻鎬荤◣閲戯紙鍖呭惈鏈锛�
- String taxation = TaxtUtils.getTaxation(newAmounts);
- //璁$畻鏈绋庨噾锛堟�荤◣閲戯紙鍖呭惈鏈锛� - 鎬荤◣閲戯紙涓嶅寘鍚湰娆★級锛�
- BigDecimal taxAmountNow = new BigDecimal(taxation).subtract(new BigDecimal(String.valueOf(taxSum.getTaxAmounts())));
-
- //璁$畻鏈鐨勭◣鍚庨噾棰�(鏈鐨勭◣鍓嶉噾棰� - 绋庨噾)
- BigDecimal texdAfterNow = BigDecimal.valueOf(serviceFunddetail.getAmount()).subtract(taxAmountNow);
- logger.info("鎵撳嵃newAmounts锛歿},taxation:{},taxAmountNow:{},texdAfterNow:{}", newAmounts, taxation, taxAmountNow, texdAfterNow);
-
- //灏嗗惊鐜殑鏁版嵁閲嶆柊鏀惧埌涓�涓柊瀵硅薄涓�
- ServiceFunddetail serviceFunddetail3 = DtoConversionUtils.sourceToTarget(serviceFunddetail, ServiceFunddetail.class);
- serviceFunddetail3.setTaxamount(taxAmountNow.doubleValue());
- serviceFunddetail3.setTaxedamount(texdAfterNow.doubleValue());
- if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) {
- serviceFunddetail3.setTaxTime(new Date());
- } else {
- serviceFunddetail3.setTaxTime(serviceFund1.getFundtaxtime());
- }
- logger.info("鎵撳嵃绋庡墠serviceFunddetail3鏁版嵁 :{}", serviceFunddetail3);
-
- // 灏嗚鏉℃暟鎹洿鏂�
-
- 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("绋庡悗")) {
- logger.info("璁$畻绋庡悗淇℃伅寮�濮嬶細{}", serviceFunddetail);
- logger.info("taxSum鍏ュ弬鏁版嵁锛歿}", taxSum);
- //绋庡悗涓嶄负绌�, 鐢ㄤ箣鍓嶇殑鈥濇�荤◣鍚庨噾棰濃�滐紝鍔犱笂褰撳墠鈥濈◣鍚庨噾棰濃��
- BigDecimal newTaxedAmounts = BigDecimal.valueOf(taxSum.getTaxedAmounts()).add(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
-
- //閫氳繃鎬荤◣鍚庯紙鍖呭惈鏈锛夌畻鍑烘�荤◣鍓�
+ // 5.2.3 绠楃◣閫昏緫
+ if (detail.getServicesscopename().contains("绋庡悗")) {
+ // 绋庡悗鏄庣粏锛氱疮璁$◣鍚庨噾棰濓紝鍙嶆帹绋庡墠閲戦鍜岀◣閲�
+// if (idcard.equals("362329199103224511")) {
+// log.info("鏈辩幃瀹�");
+// }
+ BigDecimal newTaxedAmounts = BigDecimal.valueOf(taxSum.getTaxedAmounts()).add(BigDecimal.valueOf(detail.getTaxedamount()));
String taxationBefore = TaxtUtils.getTaxationBefore(newTaxedAmounts);
- //绠楀嚭鏈绋庡墠锛堟�荤◣鍓嶏紙鍖呭惈鏈锛� - 鎬荤◣鍓嶏紙涓嶅寘鍚湰娆★級锛�
BigDecimal amountNow = new BigDecimal(taxationBefore).subtract(BigDecimal.valueOf(taxSum.getAmounts()));
-
- //绠楀嚭鏈绋庨噾(鏈绋庡墠 - 鏈绋庡悗)
- BigDecimal tax = amountNow.subtract(BigDecimal.valueOf(serviceFunddetail.getTaxedamount()));
- logger.info("鎵撳嵃newTaxedAmounts锛歿},taxationBefore:{},amountNow:{},tax:{}", newTaxedAmounts, taxationBefore, amountNow, tax);
-
- //灏嗗惊鐜殑鏁版嵁閲嶆柊鏀惧埌涓�涓柊瀵硅薄涓�
- ServiceFunddetail serviceFunddetail3 = DtoConversionUtils.sourceToTarget(serviceFunddetail, ServiceFunddetail.class);
- serviceFunddetail3.setAmount(amountNow.doubleValue());
- serviceFunddetail3.setTaxamount(tax.doubleValue());
+ BigDecimal tax = amountNow.subtract(BigDecimal.valueOf(detail.getTaxedamount()));
+ detail.setAmount(amountNow.doubleValue());
+ detail.setTaxamount(tax.doubleValue());
if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) {
- serviceFunddetail3.setTaxTime(new Date());
+ detail.setTaxTime(new Date());
} else {
- serviceFunddetail3.setTaxTime(serviceFund1.getFundtaxtime());
+ detail.setTaxTime(serviceFund1.getFundtaxtime());
}
- logger.info("鎵撳嵃serviceFunddetail3:{}", serviceFunddetail3);
- //鑾峰彇鍒板綋鍓嶄汉鐨勬湰鏈堢畻绋庡簭鍙锋渶澶у��
- TaxMoneyByItemEO byItemEO = new TaxMoneyByItemEO();
- byItemEO.setFirstDay(firstDay);
- byItemEO.setIDCard(serviceFunddetail.getIdcardno());
- byItemEO.setTaxTime(new Date());
- // 灏嗚鏉℃暟鎹洿鏂�
- updateById(serviceFunddetail3);
- pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail3.getAmount()));
- taxedcost = taxedcost.add(BigDecimal.valueOf(serviceFunddetail3.getTaxedamount()));
-// // 鎶婅鏁版嵁锛屾斁鍒颁复鏃剁殑闆嗗悎涓�
- temporarySave.add(serviceFunddetail3);
+ taxSum.setAmounts((BigDecimal.valueOf(taxSum.getAmounts()).add(amountNow)).doubleValue());
+ taxSum.setTaxAmounts((BigDecimal.valueOf(taxSum.getTaxAmounts()).add(tax)).doubleValue());
+ taxSum.setTaxedAmounts(newTaxedAmounts.doubleValue());
+ } else {
+ // 绋庡墠鏄庣粏锛氱疮璁$◣鍓嶉噾棰濓紝绠楁�荤◣閲戯紝鍐嶇畻鏈绋庨噾鍜岀◣鍚庨噾棰�
+ BigDecimal newAmounts = BigDecimal.valueOf(taxSum.getAmounts()).add(BigDecimal.valueOf(detail.getAmount()));
+// if (idcard.equals("362329199103224511")) {
+// log.info("鏈辩幃瀹�");
+// }
+ String taxation = TaxtUtils.getTaxation(newAmounts);
+
+ BigDecimal taxAmountNow = new BigDecimal(taxation).subtract(new BigDecimal(String.valueOf(taxSum.getTaxAmounts())));
+ BigDecimal texdAfterNow = BigDecimal.valueOf(detail.getAmount()).subtract(taxAmountNow);
+ detail.setTaxamount(taxAmountNow.doubleValue());
+ detail.setTaxedamount(texdAfterNow.doubleValue());
+
+ if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) {
+ detail.setTaxTime(new Date());
+ } else {
+ detail.setTaxTime(serviceFund1.getFundtaxtime());
+ }
+ taxSum.setAmounts(newAmounts.doubleValue());
+ taxSum.setTaxAmounts((BigDecimal.valueOf(taxSum.getTaxAmounts()).add(taxAmountNow).doubleValue()));
+ taxSum.setTaxedAmounts((BigDecimal.valueOf(taxSum.getTaxedAmounts()).add(texdAfterNow)).doubleValue());
}
+
+ updateList.add(detail);
+
+ pretaxcost = pretaxcost.add(BigDecimal.valueOf(detail.getAmount()));
+ taxedcost = taxedcost.add(BigDecimal.valueOf(detail.getTaxedamount()));
+
}
+ // 6. 鎵归噺鏇存柊鎵�鏈夋槑缁�
+ for (ServiceFunddetail d : updateList) {
+ this.updateById(d);
+ }
+ // 7. 鏇存柊涓昏〃ServiceFund
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());
- }
- // 1 宸茬畻绋�
+ serviceFund.setFundtaxtime(new Date());
+
serviceFund.setIstax(1);
serviceFundMapper.updateById(serviceFund);
-
return true;
}
+// @Override
+// public Boolean calculateTax2(List<ServiceFunddetail> serviceFunddetails) {
+// //鐢ㄤ簬缂撳瓨姣忎釜韬唤璇佸彿锛坕dcardno锛夋湰鏈堢疮璁$殑绋庡墠銆佺◣閲戙�佺◣鍚庨噾棰濓紙TaxMoneySumEO瀵硅薄锛�
+// Map<String, TaxMoneySumEO> tempTaxSumMap = new HashMap<>();
+//
+// TaxMoneyByItemEO taxMoneyVO = new TaxMoneyByItemEO();
+// Date firstDay = Date.from(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).atStartOfDay(ZoneId.systemDefault()).toInstant());
+// taxMoneyVO.setFirstDay(firstDay);
+// taxMoneyVO.setTaxTime(new Date());
+//
+// List<TaxMoneySumEO> taxSum = serviceFunddetailMapper.getTaxSum(taxMoneyVO);
+// for (TaxMoneySumEO taxMoneySumEO : taxSum) {
+// tempTaxSumMap.put(taxMoneySumEO.getIDCardNo(), taxMoneySumEO);
+// }
+//
+// return calculateTax(serviceFunddetails, tempTaxSumMap);
+// }
+
+
@Override
public Map<String, Double> performance(ServiceFunddetail serviceFunddetail) {
//鏍规嵁"韬唤璇佸彿"鍜�"缁╂晥鏃ユ湡(骞翠唤)"鏌ヨ涓汉鍘嗗彶缁╂晥
--
Gitblit v1.9.3