From 6ce655e8911e0b1fd54c3b73cc393154e6045dae Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Fri, 25 Apr 2025 01:15:23 +0000
Subject: [PATCH] Merge branch 'wcd' into wcd-2411-update

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java
index 752102b..731e09d 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/impl/UserLevelWageServiceImpl.java
@@ -176,18 +176,29 @@
         Map<String, Double> attendanceBusinessTravelMap = attendanceBusinessTravelList.stream().collect(Collectors.groupingBy(AttendanceBusinessTravel::getCategory, Collectors.summingDouble(AttendanceBusinessTravel::getTravelDuration)));
 
         BigDecimal travelSubsidy = new BigDecimal(0.0);
-        // 出差补助金
-        attendanceBusinessTravelMap.forEach((key, value) -> {
-            if (key.equals(Constant.ATTENDANCE_BUSINESS_TRAVEL_CATEGORY_TRAVEL)) {
+        for (Map.Entry<String, Double> entry : attendanceBusinessTravelMap.entrySet()) {
+            if (entry.getKey().equals(Constant.ATTENDANCE_BUSINESS_TRAVEL_CATEGORY_TRAVEL)) {
                 // 出差补助金
                 SysConfigProportion sysConfigProportion = sysConfigProportionRepository.findByTitle("出差补助金额");
-                travelSubsidy.add(BigDecimal.valueOf(value * sysConfigProportion.getProportion()));
-            } else if (key.equals(Constant.ATTENDANCE_BUSINESS_TRAVEL_CATEGORY_SAME_PLACE)) {
+                travelSubsidy = travelSubsidy.add(BigDecimal.valueOf(entry.getValue() * sysConfigProportion.getProportion()));
+            } else if (entry.getKey().equals(Constant.ATTENDANCE_BUSINESS_TRAVEL_CATEGORY_SAME_PLACE)) {
                 // 客户现场补助金
 //                SysConfigProportion sysConfigProportion = sysConfigProportionRepository.findByTitle("客户现场补助金额");
-                travelSubsidy.add(BigDecimal.valueOf(value * 30)); // 按30元/天计算 TODO 待调整
+                travelSubsidy = travelSubsidy.add(BigDecimal.valueOf(entry.getValue() * 30)); // 按30元/天计算 TODO 待调整
             }
-        });
+        }
+//        // 出差补助金
+//        attendanceBusinessTravelMap.forEach((key, value) -> {
+//            if (key.equals(Constant.ATTENDANCE_BUSINESS_TRAVEL_CATEGORY_TRAVEL)) {
+//                // 出差补助金
+//                SysConfigProportion sysConfigProportion = sysConfigProportionRepository.findByTitle("出差补助金额");
+//                travelSubsidy = travelSubsidy.add(BigDecimal.valueOf(value * sysConfigProportion.getProportion()));
+//            } else if (key.equals(Constant.ATTENDANCE_BUSINESS_TRAVEL_CATEGORY_SAME_PLACE)) {
+//                // 客户现场补助金
+////                SysConfigProportion sysConfigProportion = sysConfigProportionRepository.findByTitle("客户现场补助金额");
+//                travelSubsidy = travelSubsidy.add(BigDecimal.valueOf(value * 30)); // 按30元/天计算 TODO 待调整
+//            }
+//        });
         return travelSubsidy.doubleValue();
     }
 

--
Gitblit v1.9.3