Commit 838269f5 by jianan

新增应付账款-结算汇率

parent e46558f0
...@@ -946,10 +946,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -946,10 +946,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
expectedFortune.setFortuneName(queryByDict(expectedFortuneDto.getFortuneType())); expectedFortune.setFortuneName(queryByDict(expectedFortuneDto.getFortuneType()));
// 应付款编号(序号递增) // 应付款编号(序号递增)
expectedFortune.setPayableNo(this.createPayableNo(expectedFortune.getFortuneBizType(), ++currentSeq)); expectedFortune.setPayableNo(this.createPayableNo(expectedFortune.getFortuneBizType(), ++currentSeq));
// 计算金额
expectedFortune.setAmount(
NumberUtil.div(expectedFortuneDto.getHkdAmount(), expectedFortuneDto.getDefaultExchangeRate(), 2)
);
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例 // 已出帐金额、待出帐金额、已出帐比例、待出帐比例
expectedFortune.setPaidAmount(BigDecimal.ZERO); expectedFortune.setPaidAmount(BigDecimal.ZERO);
...@@ -1012,7 +1009,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -1012,7 +1009,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if (Objects.isNull(expectedFortuneDto.getCurrency())) { if (Objects.isNull(expectedFortuneDto.getCurrency())) {
throw new BusinessException(ResultCode.PARAMS_ERROR.getCode(), "预计出账币种不能为空"); throw new BusinessException(ResultCode.PARAMS_ERROR.getCode(), "预计出账币种不能为空");
} }
if (Objects.isNull(expectedFortuneDto.getDefaultExchangeRate())) { if (Objects.isNull(expectedFortuneDto.getExchangeRate())) {
throw new BusinessException(ResultCode.PARAMS_ERROR.getCode(), "结算汇率不能为空"); throw new BusinessException(ResultCode.PARAMS_ERROR.getCode(), "结算汇率不能为空");
} }
} }
......
...@@ -79,7 +79,7 @@ public class ExpectedFortuneAddRequest { ...@@ -79,7 +79,7 @@ public class ExpectedFortuneAddRequest {
* 结算汇率 * 结算汇率
*/ */
@Schema(description = "结算汇率") @Schema(description = "结算汇率")
private BigDecimal defaultExchangeRate; private BigDecimal exchangeRate;
/** /**
* 出账金额 单位:港币 * 出账金额 单位:港币
......
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