Commit cb5c446e by jianan

新增应付17

parent f0b103f5
...@@ -1274,16 +1274,20 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -1274,16 +1274,20 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
ExpectedFortune updateExpectedFortune = new ExpectedFortune(); ExpectedFortune updateExpectedFortune = new ExpectedFortune();
BeanUtils.copyProperties(request, updateExpectedFortune); BeanUtils.copyProperties(request, updateExpectedFortune);
updateExpectedFortune.setId(expectedFortune.getId()); updateExpectedFortune.setId(expectedFortune.getId());
// 默认结算汇率
updateExpectedFortune.setDefaultExchangeRate( // 币种或金额变更,则需要重新计算港币金额和待出账金额
queryExchangeRateByFeign( if (ObjectUtils.notEqual(expectedFortune.getCurrency(), request.getCurrency()) || ObjectUtils.notEqual(expectedFortune.getHkdAmount(), request.getAmount())) {
updateExpectedFortune.getCurrency(), // 默认结算汇率
"HKD" updateExpectedFortune.setDefaultExchangeRate(
)); queryExchangeRateByFeign(
// 计算港币金额 updateExpectedFortune.getCurrency(),
updateExpectedFortune.setHkdAmount(updateExpectedFortune.getAmount().multiply(updateExpectedFortune.getDefaultExchangeRate())); "HKD"
// 更新待出账金额 ));
updateExpectedFortune.setUnpaidAmount(updateExpectedFortune.getHkdAmount()); // 计算港币金额
updateExpectedFortune.setHkdAmount(updateExpectedFortune.getAmount().multiply(updateExpectedFortune.getDefaultExchangeRate()));
// 更新待出账金额
updateExpectedFortune.setUnpaidAmount(updateExpectedFortune.getHkdAmount());
}
// 获取当前登录用户 // 获取当前登录用户
AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser(); AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser();
String loginUserId = currentLoginUser.getId().toString(); String loginUserId = currentLoginUser.getId().toString();
......
...@@ -233,7 +233,7 @@ public class FortuneVO implements Serializable { ...@@ -233,7 +233,7 @@ public class FortuneVO implements Serializable {
*/ */
@Schema(description = "出账日(实)") @Schema(description = "出账日(实)")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date actualPayoutDate; private LocalDate actualPayoutDate;
/** /**
* 是否含税 0=No, 1=Yes * 是否含税 0=No, 1=Yes
......
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