From 698e84a1cd088c9d8f0108ae933e205fc14d2741 Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Fri, 20 Oct 2023 07:13:57 +0000
Subject: [PATCH] 任务相关,工资相关

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java
index 428258a..52d1892 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/SalaryServiceImpl.java
@@ -421,19 +421,19 @@
         // 基本工资比例
         salary.setBasicWageProportion(sysUserLevelWageDto.getBasicWageProportion());
         // 预计基本工资
-        salary.setBasicWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getBasicWageProportion() / 100)));
+        salary.setBasicWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getBasicWageProportion())).divide(new BigDecimal(100)));
         // 绩效工资比例
         salary.setAchievementsWageProportion(sysUserLevelWageDto.getAchievementsWageProportion());
         // 预计绩效工资
-        salary.setAchievementsWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getAchievementsWageProportion() / 100)));
+        salary.setAchievementsWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getAchievementsWageProportion())).divide(new BigDecimal(100)));
         // 业绩工资比例
         salary.setPerformanceWageProportion(sysUserLevelWageDto.getPerformanceWageProportion());
         // 预计业绩工资
-        salary.setPerformanceWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getPerformanceWageProportion() / 100)));
+        salary.setPerformanceWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getPerformanceWageProportion())).divide(new BigDecimal(100)));
         // 团队工资比例
         salary.setTeamWageProportion(sysUserLevelWageDto.getTeamWageProportion());
         // 预计团队工资
-        salary.setTeamWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getTeamWageProportion() / 100)));
+        salary.setTeamWage(sysUserLevelWageDto.getLevelWage().multiply(new BigDecimal(sysUserLevelWageDto.getTeamWageProportion())).divide(new BigDecimal(100)));
         // 返回
         return salary;
     }
@@ -451,61 +451,61 @@
         // 公积金个人缴纳比例
         salary.setAccumulationPersonalProportion(sysUserLevelInsuranceDto.getAccumulationPersonalProportion());
         // 公积金个人缴纳金额
-        salary.setAccumulationPersonalAmount(sysUserLevelInsuranceDto.getAccumulationRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getAccumulationPersonalProportion() / 100)));
+        salary.setAccumulationPersonalAmount(sysUserLevelInsuranceDto.getAccumulationRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getAccumulationPersonalProportion())).divide(new BigDecimal(100)));
         // 公积金公司缴纳比例
         salary.setAccumulationCompanyProportion(sysUserLevelInsuranceDto.getAccumulationCompanyProportion());
         // 公积金公司缴纳金额
-        salary.setAccumulationCompanyAmount(sysUserLevelInsuranceDto.getAccumulationRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getAccumulationCompanyProportion() / 100)));
+        salary.setAccumulationCompanyAmount(sysUserLevelInsuranceDto.getAccumulationRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getAccumulationCompanyProportion())).divide(new BigDecimal(100)));
         // 养老险基数
         salary.setPensionRadix(sysUserLevelInsuranceDto.getPensionRadix());
         // 养老险个人缴纳比例
         salary.setPensionPersonalProportion(sysUserLevelInsuranceDto.getPensionPersonalProportion());
         // 养老险个人缴纳金额
-        salary.setPensionPersonalAmount(sysUserLevelInsuranceDto.getPensionRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getPensionPersonalProportion() / 100)));
+        salary.setPensionPersonalAmount(sysUserLevelInsuranceDto.getPensionRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getPensionPersonalProportion())).divide(new BigDecimal(100)));
         // 养老险公司缴纳比例
         salary.setPensionCompanyProportion(sysUserLevelInsuranceDto.getPensionCompanyProportion());
         // 养老险公司缴纳金额
-        salary.setPensionCompanyAmount(sysUserLevelInsuranceDto.getPensionRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getPensionCompanyProportion() / 100)));
+        salary.setPensionCompanyAmount(sysUserLevelInsuranceDto.getPensionRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getPensionCompanyProportion())).divide(new BigDecimal(100)));
         // 医疗险基数
         salary.setMedicalRadix(sysUserLevelInsuranceDto.getMedicalRadix());
         // 医疗险个人缴纳比例
         salary.setMedicalPersonalProportion(sysUserLevelInsuranceDto.getMedicalPersonalProportion());
         // 医疗险个人缴纳金额
-        salary.setMedicalPersonalAmount(sysUserLevelInsuranceDto.getMedicalRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMedicalPersonalProportion() / 100)));
+        salary.setMedicalPersonalAmount(sysUserLevelInsuranceDto.getMedicalRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMedicalPersonalProportion())).divide(new BigDecimal(100)));
         // 医疗险公司缴纳比例
         salary.setMedicalCompanyProportion(sysUserLevelInsuranceDto.getMedicalCompanyProportion());
         // 医疗险公司缴纳金额
-        salary.setMedicalCompanyAmount(sysUserLevelInsuranceDto.getMedicalRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMedicalCompanyProportion() / 100)));
+        salary.setMedicalCompanyAmount(sysUserLevelInsuranceDto.getMedicalRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMedicalCompanyProportion())).divide(new BigDecimal(100)));
         // 失业险基数
         salary.setUnemploymentRadix(sysUserLevelInsuranceDto.getUnemploymentRadix());
         // 失业险个人缴纳比例
         salary.setUnemploymentPersonalProportion(sysUserLevelInsuranceDto.getUnemploymentPersonalProportion());
         // 失业险个人缴纳金额
-        salary.setUnemploymentPersonalAmount(sysUserLevelInsuranceDto.getUnemploymentRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getUnemploymentPersonalProportion() / 100)));
+        salary.setUnemploymentPersonalAmount(sysUserLevelInsuranceDto.getUnemploymentRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getUnemploymentPersonalProportion())).divide(new BigDecimal(100)));
         // 失业险公司缴纳比例
         salary.setUnemploymentCompanyProportion(sysUserLevelInsuranceDto.getUnemploymentCompanyProportion());
         // 失业险公司缴纳金额
-        salary.setUnemploymentCompanyAmount(sysUserLevelInsuranceDto.getUnemploymentRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getUnemploymentCompanyProportion() / 100)));
+        salary.setUnemploymentCompanyAmount(sysUserLevelInsuranceDto.getUnemploymentRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getUnemploymentCompanyProportion())).divide(new BigDecimal(100)));
         // 生育险基数
         salary.setMaternityRadix(sysUserLevelInsuranceDto.getMaternityRadix());
         // 生育险个人缴纳比例
         salary.setMaternityPersonalProportion(sysUserLevelInsuranceDto.getMaternityPersonalProportion());
         // 生育险个人缴纳金额
-        salary.setMaternityPersonalAmount(sysUserLevelInsuranceDto.getMaternityRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMaternityPersonalProportion() / 100)));
+        salary.setMaternityPersonalAmount(sysUserLevelInsuranceDto.getMaternityRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMaternityPersonalProportion())).divide(new BigDecimal(100)));
         // 生育险公司缴纳比例
         salary.setMaternityCompanyProportion(sysUserLevelInsuranceDto.getMaternityCompanyProportion());
         // 生育险公司缴纳金额
-        salary.setMaternityCompanyAmount(sysUserLevelInsuranceDto.getMaternityRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMaternityCompanyProportion() / 100)));
+        salary.setMaternityCompanyAmount(sysUserLevelInsuranceDto.getMaternityRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getMaternityCompanyProportion())).divide(new BigDecimal(100)));
         // 工伤险基数
         salary.setIndustrialInjuryRadix(sysUserLevelInsuranceDto.getIndustrialInjuryRadix());
         // 工伤险个人缴纳比例
         salary.setIndustrialInjuryPersonalProportion(sysUserLevelInsuranceDto.getIndustrialInjuryPersonalProportion());
         // 工伤险个人缴纳金额
-        salary.setIndustrialInjuryPersonalAmount(sysUserLevelInsuranceDto.getIndustrialInjuryRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getIndustrialInjuryPersonalProportion() / 100)));
+        salary.setIndustrialInjuryPersonalAmount(sysUserLevelInsuranceDto.getIndustrialInjuryRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getIndustrialInjuryPersonalProportion())).divide(new BigDecimal(100)));
         // 工伤险公司缴纳比例
         salary.setIndustrialInjuryCompanyProportion(sysUserLevelInsuranceDto.getIndustrialInjuryCompanyProportion());
         // 工伤险公司缴纳金额
-        salary.setIndustrialInjuryCompanyAmount(sysUserLevelInsuranceDto.getIndustrialInjuryRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getIndustrialInjuryCompanyProportion() / 100)));
+        salary.setIndustrialInjuryCompanyAmount(sysUserLevelInsuranceDto.getIndustrialInjuryRadix().multiply(new BigDecimal(sysUserLevelInsuranceDto.getIndustrialInjuryCompanyProportion())).divide(new BigDecimal(100)));
         // 返回
         return salary;
     }
@@ -563,12 +563,12 @@
             if (salary.getBasicWage() != null && salary.getFullDays() != null) {
                 // 缺勤小时数
                 salary.setAbsenceDays(salary.getFullDays() > attendanceHours ? Double.valueOf(salary.getFullDays() - attendanceHours) : 0);
-                // 小时工资
-                BigDecimal hourWage = salary.getBasicWage().divide(new BigDecimal(salary.getFullDays()), 2);
+//                // 小时工资
+//                BigDecimal hourWage = salary.getBasicWage().divide(new BigDecimal(salary.getFullDays()), 2);
                 // 缺勤小时数
                 BigDecimal absenceDays = new BigDecimal(salary.getAbsenceDays());
                 // 实际基础工资
-                salary.setActualBasicWage(salary.getBasicWage().subtract(hourWage.multiply(absenceDays)));
+                salary.setActualBasicWage(salary.getBasicWage().subtract(salary.getBasicWage().multiply(absenceDays).divide(new BigDecimal(salary.getFullDays()))));
                 // 清空定时器
                 break;
             }
@@ -613,7 +613,7 @@
             // 判断预计绩效工资、应完成绩效工时是否为空
             if (salary.getAchievementsWage() != null && salary.getNeedCompletedAchievementsHours() != null) {
                 // 实际绩效工资
-                salary.setActualAchievementsWage(salary.getAchievementsWage().multiply(new BigDecimal(completedWork / salary.getNeedCompletedAchievementsHours())));
+                salary.setActualAchievementsWage(salary.getAchievementsWage().multiply(new BigDecimal(completedWork)).divide(new BigDecimal(salary.getNeedCompletedAchievementsHours())));
                 // 清空绩效定时器
                 break;
             }
@@ -672,7 +672,7 @@
                         // 税额
                         taxAmount.add(
                                 (sysConfigIndividualIncomeTaxDtoList.get(i).getGearAmountEnd().subtract(sysConfigIndividualIncomeTaxDtoList.get(i).getGearAmountStart()))
-                                        .multiply(new BigDecimal(sysConfigIndividualIncomeTaxDtoList.get(i).getTaxRate()).divide(new BigDecimal(100), 2))
+                                        .multiply(new BigDecimal(sysConfigIndividualIncomeTaxDtoList.get(i).getTaxRate()).divide(new BigDecimal(100)))
                         );
                     } else if (
                             (taxableAmount.compareTo(sysConfigIndividualIncomeTaxDtoList.get(i).getGearAmountStart()) == 1 ||
@@ -684,7 +684,7 @@
                         // 税额
                         taxAmount.add(
                                 (taxableAmount.subtract(sysConfigIndividualIncomeTaxDtoList.get(i).getGearAmountStart()))
-                                        .multiply(new BigDecimal(sysConfigIndividualIncomeTaxDtoList.get(i).getTaxRate()).divide(new BigDecimal(100), 2))
+                                        .multiply(new BigDecimal(sysConfigIndividualIncomeTaxDtoList.get(i).getTaxRate()).divide(new BigDecimal(100)))
                         );
                     }
                     // 判断循环是否结束

--
Gitblit v1.9.3