Commit 4c356ccd by jianan

新增应付18

parent cb5c446e
...@@ -1275,18 +1275,12 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -1275,18 +1275,12 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
BeanUtils.copyProperties(request, updateExpectedFortune); BeanUtils.copyProperties(request, updateExpectedFortune);
updateExpectedFortune.setId(expectedFortune.getId()); updateExpectedFortune.setId(expectedFortune.getId());
// 币种或金额变更,则需要重新计算港币金额和待出账金额 // 如果金额变更,则需要重新计算港币金额和待出账金额
if (ObjectUtils.notEqual(expectedFortune.getCurrency(), request.getCurrency()) || ObjectUtils.notEqual(expectedFortune.getHkdAmount(), request.getAmount())) { if (ObjectUtils.notEqual(expectedFortune.getHkdAmount(), request.getHkdAmount())) {
// 默认结算汇率
updateExpectedFortune.setDefaultExchangeRate(
queryExchangeRateByFeign(
updateExpectedFortune.getCurrency(),
"HKD"
));
// 计算港币金额 // 计算港币金额
updateExpectedFortune.setHkdAmount(updateExpectedFortune.getAmount().multiply(updateExpectedFortune.getDefaultExchangeRate())); updateExpectedFortune.setHkdAmount(request.getHkdAmount());
// 更新待出账金额 // 更新待出账金额
updateExpectedFortune.setUnpaidAmount(updateExpectedFortune.getHkdAmount()); updateExpectedFortune.setUnpaidAmount(request.getHkdAmount());
} }
// 获取当前登录用户 // 获取当前登录用户
AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser(); AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser();
......
...@@ -36,10 +36,10 @@ public class ExpectedFortuneUpdateRequest { ...@@ -36,10 +36,10 @@ public class ExpectedFortuneUpdateRequest {
private LocalDate actualPayoutDate; private LocalDate actualPayoutDate;
/** /**
* 出账金额 * 港币出账金额
*/ */
@Schema(description = "出账金额") @Schema(description = "港币出账金额")
private BigDecimal amount; private BigDecimal hkdAmount;
/** /**
* 出账状态 * 出账状态
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment