Commit 7a2c020ac461c8971755b21f45de1d196872d846
1 parent
2806f8ef
feature(bug): 试用期计算小数修改
试用期计算小数修改
Showing
1 changed file
with
2 additions
and
2 deletions
fw-morax-service/src/main/java/cn/fw/morax/service/biz/salary/SalaryCalcService.java
... | ... | @@ -417,10 +417,10 @@ public class SalaryCalcService { |
417 | 417 | return; |
418 | 418 | } |
419 | 419 | int lengthOfMonth = YearMonth.from(user.getDataDate()).lengthOfMonth(); |
420 | - BigDecimal dayP = new BigDecimal(count).divide(new BigDecimal(lengthOfMonth), 2, RoundingMode.HALF_UP); | |
420 | + BigDecimal dayP = new BigDecimal(count).divide(new BigDecimal(lengthOfMonth), 2, RoundingMode.DOWN); | |
421 | 421 | BigDecimal baseValue = ehrRpcService.queryProbationerSalary(user.getUserId(), user.getDataDate()); |
422 | 422 | BV.notNull(baseValue, () -> "试用期工资查询失败"); |
423 | - BigDecimal probationSalary = baseValue.multiply(dayP).divide(BigDecimal.ONE, 2, RoundingMode.HALF_UP); | |
423 | + BigDecimal probationSalary = baseValue.multiply(dayP).divide(BigDecimal.ONE, 2, RoundingMode.DOWN); | |
424 | 424 | SalaryPoolDetail detail = createDetail(pool, user.getDataDate()); |
425 | 425 | detail.setType(SalaryTypeEnum.PROBATION); |
426 | 426 | detail.setSalaryAmount(probationSalary); | ... | ... |