From 70a0b21595941890a9d26cfde01ff17e3427214a Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 23 七月 2026 09:24:41 +0800
Subject: [PATCH] 修改工资计算

---
 src/main/java/com/ruoyi/ai/tools/FinancialAgentTools.java |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/ruoyi/ai/tools/FinancialAgentTools.java b/src/main/java/com/ruoyi/ai/tools/FinancialAgentTools.java
index e907aff..ecf88ed 100644
--- a/src/main/java/com/ruoyi/ai/tools/FinancialAgentTools.java
+++ b/src/main/java/com/ruoyi/ai/tools/FinancialAgentTools.java
@@ -865,11 +865,8 @@
         }
         List<ProductionAccount> accountList = defaultList(productionAccountMapper.selectList(accountWrapper));
 
-        Map<String, BigDecimal> salaryQuotaByOperation = defaultList(technologyOperationMapper.selectList(new LambdaQueryWrapper<TechnologyOperation>()
-                        .select(TechnologyOperation::getName, TechnologyOperation::getSalaryQuota)))
-                .stream()
-                .filter(item -> StringUtils.hasText(item.getName()))
-                .collect(Collectors.toMap(TechnologyOperation::getName, item -> defaultDecimal(item.getSalaryQuota()), (a, b) -> a));
+        // 宸ヨ祫瀹氶宸插彇娑堝湪钖祫鐩稿叧璁$畻涓殑渚濊禆锛屾殏涓嶅啀鎸夊伐搴忓伐璧勫畾棰濅及绠椾汉宸ユ垚鏈��
+        Map<String, BigDecimal> salaryQuotaByOperation = new HashMap<>();
 
         Map<Long, BigDecimal> laborCostByLedger = new HashMap<>();
         Map<String, BigDecimal> processCostMap = new HashMap<>();
@@ -1994,15 +1991,15 @@
     }
 
     private BigDecimal estimateLaborCost(ProductionAccount account, Map<String, BigDecimal> salaryQuotaByOperation) {
-        BigDecimal salaryQuota = salaryQuotaByOperation.getOrDefault(safe(account.getTechnologyOperationName()), BigDecimal.ZERO);
+        // BigDecimal salaryQuota = salaryQuotaByOperation.getOrDefault(safe(account.getTechnologyOperationName()), BigDecimal.ZERO);
         BigDecimal finishedNum = defaultDecimal(account.getFinishedNum());
         BigDecimal workHours = defaultDecimal(account.getWorkHours());
-        if (salaryQuota.compareTo(BigDecimal.ZERO) > 0 && finishedNum.compareTo(BigDecimal.ZERO) > 0) {
-            return finishedNum.multiply(salaryQuota);
-        }
-        if (salaryQuota.compareTo(BigDecimal.ZERO) > 0 && workHours.compareTo(BigDecimal.ZERO) > 0) {
-            return workHours.multiply(salaryQuota);
-        }
+//        if (salaryQuota.compareTo(BigDecimal.ZERO) > 0 && finishedNum.compareTo(BigDecimal.ZERO) > 0) {
+//            return finishedNum.multiply(salaryQuota);
+//        }
+//        if (salaryQuota.compareTo(BigDecimal.ZERO) > 0 && workHours.compareTo(BigDecimal.ZERO) > 0) {
+//            return workHours.multiply(salaryQuota);
+//        }
         if (workHours.compareTo(BigDecimal.ZERO) > 0) {
             return workHours;
         }

--
Gitblit v1.9.3