Commit 057caf31 by jianan

新增应付2

parent 124fec83
......@@ -954,13 +954,9 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
expectedFortune.setFortuneName(queryByDict(expectedFortuneDto.getFortuneType()));
// 应付款编号(序号递增)
expectedFortune.setPayableNo(this.createPayableNo(expectedFortune.getFortuneBizType(), ++currentSeq));
// 默认结算汇率(查询当前期数入账记录的结算汇率)
expectedFortune.setDefaultExchangeRate(
queryCommissionExchangeRate(expectedFortuneDto.getPolicyNo(),expectedFortuneDto.getFortunePeriod())
);
// 计算金额
expectedFortune.setAmount(
NumberUtil.div(expectedFortuneDto.getHkdAmount(), expectedFortune.getDefaultExchangeRate(), 2)
NumberUtil.div(expectedFortuneDto.getHkdAmount(), expectedFortuneDto.getDefaultExchangeRate(), 2)
);
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
......@@ -1046,6 +1042,9 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if (Objects.isNull(expectedFortuneDto.getCurrency())) {
throw new BusinessException(ResultCode.PARAMS_ERROR.getCode(), "预计出账币种不能为空");
}
if (Objects.isNull(expectedFortuneDto.getDefaultExchangeRate())) {
throw new BusinessException(ResultCode.PARAMS_ERROR.getCode(), "结算汇率不能为空");
}
}
}
......
......@@ -76,6 +76,12 @@ public class ExpectedFortuneAddRequest {
private String fortuneType;
/**
* 结算汇率
*/
@Schema(description = "结算汇率")
private BigDecimal defaultExchangeRate;
/**
* 出账金额 单位:港币
*/
@Schema(description = "出账金额 单位:港币")
......
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