Commit 0052b908 by jianan

应付明细2

parent 944ef8fb
...@@ -429,13 +429,13 @@ public class ApiFortuneController { ...@@ -429,13 +429,13 @@ public class ApiFortuneController {
} }
/** /**
* 修改设置出账年月(实)),设置完成后,更新到应付款管理明细中 * 修改设置出账年月(实)
* *
* @param editActualPayoutDateRequest * @param editActualPayoutDateRequest
* @return * @return
*/ */
@PostMapping("/edit/actual_payout_date") @PostMapping("/edit/actual_payout_date")
@Operation(summary = "修改设置出账年月(实),设置完成后,更新到应付款管理明细中") @Operation(summary = "修改设置出账年月(实)")
public Result<Boolean> editActualPayoutDate(@RequestBody EditActualPayoutDateRequest editActualPayoutDateRequest) { public Result<Boolean> editActualPayoutDate(@RequestBody EditActualPayoutDateRequest editActualPayoutDateRequest) {
if (editActualPayoutDateRequest == null || StringUtils.isBlank(editActualPayoutDateRequest.getFortuneBizId())) { if (editActualPayoutDateRequest == null || StringUtils.isBlank(editActualPayoutDateRequest.getFortuneBizId())) {
return Result.fail(ErrorCode.PARAMS_ERROR.getCode(), "fortuneBizId 不能为空"); return Result.fail(ErrorCode.PARAMS_ERROR.getCode(), "fortuneBizId 不能为空");
......
...@@ -496,15 +496,16 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -496,15 +496,16 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
//原币种 //原币种
updateObj.setOriginalCurrency(policyCurrency); updateObj.setOriginalCurrency(policyCurrency);
//原币种金额 //原币种金额
updateObj.setOriginalAmount(expectedFortune.getRuleAmount()); BigDecimal ruleAmount = expectedFortune.getRuleAmount();
updateObj.setOriginalAmount(ruleAmount);
//原币种 -> 港币汇率 //原币种 -> 港币汇率
updateObj.setOriginalToHkdRate(originalToHkdRate); updateObj.setOriginalToHkdRate(originalToHkdRate);
//保单币种 //保单币种
updateObj.setRuleCurrency(policyCurrency); updateObj.setRuleCurrency(policyCurrency);
//默认保单币种 -> 港币汇率 //默认保单币种 -> 港币汇率
updateObj.setDefaultExchangeRate(originalToHkdRate); updateObj.setDefaultExchangeRate(originalToHkdRate);
//港币金额(标准发佣金额 * 默认保单币种 -> 港币汇率) //应发港币金额(估)(标准发佣金额 * 默认保单币种 -> 港币汇率)
BigDecimal hkdAmount = expectedFortune.getRuleAmount().multiply(originalToHkdRate); BigDecimal hkdAmount = ruleAmount.multiply(originalToHkdRate);
updateObj.setHkdAmount(hkdAmount); updateObj.setHkdAmount(hkdAmount);
//发放币种 //发放币种
updateObj.setPayoutCurrency(currency); updateObj.setPayoutCurrency(currency);
...@@ -513,6 +514,9 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -513,6 +514,9 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
//港币 -> 发放币种汇率 //港币 -> 发放币种汇率
updateObj.setHkdToPayoutRate(hkdToPayoutRate); updateObj.setHkdToPayoutRate(hkdToPayoutRate);
//默认值 //默认值
updateObj.setPaidRuleAmount(BigDecimal.ZERO);
updateObj.setUnpaidRuleAmount(ruleAmount);
updateObj.setUnpaidRuleAmountHkd(hkdAmount);
updateObj.setPaidAmount(BigDecimal.ZERO); updateObj.setPaidAmount(BigDecimal.ZERO);
updateObj.setPaidRatio(BigDecimal.ZERO); updateObj.setPaidRatio(BigDecimal.ZERO);
updateObj.setUnpaidAmount(expectedFortune.getHkdAmount()); updateObj.setUnpaidAmount(expectedFortune.getHkdAmount());
......
...@@ -35,246 +35,142 @@ public class ApiExpectedFortunePageResponse { ...@@ -35,246 +35,142 @@ public class ApiExpectedFortunePageResponse {
@Schema(description = "应付款类型 R-关联保单应付款 U-非关联保单应付款") @Schema(description = "应付款类型 R-关联保单应付款 U-非关联保单应付款")
private String fortuneBizType; private String fortuneBizType;
/** @Schema(description = "业务编号")
* 应付款编号
*/
@Schema(description = "应付款编号(业务编号)")
private String payableNo; private String payableNo;
/**
* 保单号
*/
@Schema(description = "policy no") @Schema(description = "policy no")
private String policyNo; private String policyNo;
/**
* 期交保费
*/
@Schema(description = "期交保费")
private BigDecimal premium;
/**
* 保险公司 ID
*/
@Schema(description = "保险公司 ID")
private String insuranceCompanyBizId;
/**
* 保险公司
*/
@Schema(description = "保险公司")
private String insuranceCompany;
/**
* 产品计划 ID
*/
@Schema(description = "产品计划 ID")
private String productLaunchBizId;
/**
* 产品计划
*/
@Schema(description = "产品计划")
private String productName;
/**
* 出账期数(1=第一年; 2=第二年; 3=第三年; 4=第四年; 5=第五年)
*/
@Schema(description = "出账期数")
private Integer fortunePeriod;
/**
* 总期数
*/
@Schema(description = "总期数")
private Integer fortuneTotalPeriod;
/**
* 转介人
*/
@Schema(description = "转介人") @Schema(description = "转介人")
private String broker; private String broker;
/**
* 转介人业务ID
*/
@Schema(description = "转介人业务ID") @Schema(description = "转介人业务ID")
private String brokerBizId; private String brokerBizId;
/** @Schema(description = "职级")
* 转介人等级名称
*/
@Schema(description = "转介人等级名称")
private String brokerGradeName; private String brokerGradeName;
/**
* 团队名称
*/
@Schema(description = "团队名称") @Schema(description = "团队名称")
private String team; private String team;
/**
* 所属团队业务ID
*/
@Schema(description = "所属团队业务ID") @Schema(description = "所属团队业务ID")
private String teamBizId; private String teamBizId;
/**
* 出账项目
*/
@Schema(description = "出账项目") @Schema(description = "出账项目")
private String fortuneName; private String fortuneName;
/**
* 出账项目类型
*/
@Schema(description = "出账项目类型 字典值: csf_fortune_type") @Schema(description = "出账项目类型 字典值: csf_fortune_type")
private String fortuneType; private String fortuneType;
/** @Schema(description = "出账状态 0=待出账 1=可出帐,待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出账, 已检核 7=未找到当前预计出账对应的来佣 字典值: csf_expected_fortune_status")
* 持有比例 private String status;
*/
@Schema(description = "持有比例")
private String brokerRatio;
@Schema(description = "出账期数")
private Integer fortunePeriod;
// ========== 保单币种及金额(基本法币种) ========== @Schema(description = "总期数")
/** private Integer fortuneTotalPeriod;
* 保单币种金额(保单币种金额 = 标准发佣金额 * 转介人介绍费占比)
*/
@Schema(description = "保单币种金额(保单币种金额 = 标准发佣金额 * 转介人介绍费占比)")
private BigDecimal ruleAmount;
/** @Schema(description = "出账年月(估)")
* 保单币种 @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
*/ private LocalDate payoutDate;
@Schema(description = "保单币种")
private String ruleCurrency;
/** @Schema(description = "出账年月(实)")
* 预计出账-默认保单币种汇率(保单币种 -> 港币汇率) @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
*/ private LocalDate actualPayoutDate;
@Schema(description = "预计出账-默认保单币种汇率(保单币种 -> 港币汇率)")
@Schema(description = "入账检核汇率")
private BigDecimal exchangeRate;
@Schema(description = "保单币种->HKD汇率")
private BigDecimal defaultExchangeRate; private BigDecimal defaultExchangeRate;
/** @Schema(description = "HKD->发放币种汇率")
* 预计出账-HKD应出账金额 private BigDecimal hkdToPayoutRate;
*/
@Schema(description = "预计出账-HKD应出账金额")
private BigDecimal hkdAmount;
@Schema(description = "保单币种")
private String ruleCurrency;
// ========== 原币种及金额 ==========
@Schema(description = "原币种") @Schema(description = "原币种")
private String originalCurrency; private String originalCurrency;
@Schema(description = "发放币种")
private String payoutCurrency;
@Schema(description = "原币种金额") @Schema(description = "原币种金额")
private BigDecimal originalAmount; private BigDecimal originalAmount;
@Schema(description = "原币→港币汇率") @Schema(description = "应发港币金额(估)")
private BigDecimal originalToHkdRate; private BigDecimal hkdAmount;
@Schema(description = "应发保单记账金额")
private BigDecimal ruleAmount;
// ========== 发放币种及金额 ========== @Schema(description = "本次发放保单记账金额")
@Schema(description = "发放币种") private BigDecimal currentPaymentRuleAmount;
private String payoutCurrency;
@Schema(description = "发放币种金额")
private BigDecimal payoutAmount;
@Schema(description = "港币→发放币汇率")
private BigDecimal hkdToPayoutRate;
@Schema(description = "本次发放金额")
private BigDecimal currentPayoutAmount;
/** @Schema(description = "本次发放折合港币金额")
* 实际出账-本次出账金额(HKD)
*/
@Schema(description = "实际出账-本次出账金额(HKD)")
private BigDecimal currentPaymentHkdAmount; private BigDecimal currentPaymentHkdAmount;
/** @Schema(description = "本次发放比例")
* 实际出账-本期结算汇率 private BigDecimal currentPaymentRatio;
*/
@Schema(description = "实际出账-本期结算汇率")
private BigDecimal exchangeRate;
/** @Schema(description = "累积已发放保单记账金额")
* 出账币种名称 private BigDecimal paidRuleAmount;
*/
@Schema(description = "出账币种名称")
private String currencyName;
/** @Schema(description = "累积已发放港币金额")
* 出账状态 private BigDecimal paidAmount;
*/
@Schema(description = "出账状态 0=待出账 1=可出帐,待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出账, 已检核 7=未找到当前预计出账对应的来佣 字典值: csf_expected_fortune_status")
private String status;
/** @Schema(description = "累积已发放比例")
* 出账状态-修改理由 private BigDecimal paidRatio;
*/
@Schema(description = "出账状态-修改理由")
private String statusDesc;
/** @Schema(description = "剩余发放比例")
* 出账年月(估) private BigDecimal unpaidRatio;
*/
@Schema(description = "出账年月(估)")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private LocalDate payoutDate;
/** @Schema(description = "剩余保单记账金额")
* 出账年月(实) private BigDecimal unpaidRuleAmount;
*/
@Schema(description = "出账年月(实)")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private LocalDate actualPayoutDate;
/** @Schema(description = "剩余发放折合港币金额")
* 预计出账-已出账金额(HKD) private BigDecimal unpaidRuleAmounthHkd;
*/
@Schema(description = "预计出账-已出账金额(HKD)")
private BigDecimal paidAmount;
/**
* 预计出账-待出账金额
*/
@Schema(description = "预计出账-待出账金额")
private BigDecimal unpaidAmount;
/**
* 预计出账-已出账金额比例 已出账金额/应出账金额
*/
@Schema(description = "预计出账-已出账金额比例 已出账金额/应出账金额")
private BigDecimal paidRatio;
/**
* 预计出账-待出账比例 待出账金额/应出账金额
*/
@Schema(description = "预计出账-待出账比例 待出账金额/应出账金额")
private BigDecimal unpaidRatio;
/** @Schema(description = "原币→港币汇率")
* 备注 private BigDecimal originalToHkdRate;
*/
@Schema(description = "发放币种金额")
private BigDecimal payoutAmount;
@Schema(description = "期交保费")
private BigDecimal premium;
@Schema(description = "产品计划 ID")
private String productLaunchBizId;
@Schema(description = "产品计划")
private String productName;
@Schema(description = "持有比例")
private String brokerRatio;
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
/**
* 创建人
*/
@Schema(description = "创建人") @Schema(description = "创建人")
private String creatorName; private String creatorName;
/**
* 创建时间
*/
@Schema(description = "创建时间") @Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime createTime; private LocalDateTime createTime;
/** @Schema(description = "更新时间(操作时间)")
* 更新时间(操作时间)
*/
@Schema(description = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime updateTime; private LocalDateTime updateTime;
......
...@@ -164,6 +164,24 @@ public class ExpectedFortune implements Serializable { ...@@ -164,6 +164,24 @@ public class ExpectedFortune implements Serializable {
private String ruleCurrency; private String ruleCurrency;
/** /**
* 累积已发放保单记账金额
*/
@TableField("paid_rule_amount")
private BigDecimal paidRuleAmount;
/**
* 剩余保单记账金额
*/
@TableField("unpaid_rule_amount")
private BigDecimal unpaidRuleAmount;
/**
* 剩余发放折合港币金额
*/
@TableField("unpaid_rule_amount_hkd")
private BigDecimal unpaidRuleAmountHkd;
/**
* 出账状态 0=待出账 1=可出帐 2=可出帐,待检核 3=部分出账 4=保留 5=已失效 6=可出账, 已检核 7=未找到当前预计发佣对应的来佣 字典值: csf_expected_fortune_status * 出账状态 0=待出账 1=可出帐 2=可出帐,待检核 3=部分出账 4=保留 5=已失效 6=可出账, 已检核 7=未找到当前预计发佣对应的来佣 字典值: csf_expected_fortune_status
*/ */
@TableField("status") @TableField("status")
......
...@@ -785,12 +785,10 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss ...@@ -785,12 +785,10 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
BigDecimal hkdAmount = fortune.getRuleAmount().multiply(exchangeRate); BigDecimal hkdAmount = fortune.getRuleAmount().multiply(exchangeRate);
fortune.setHkdAmount(hkdAmount); fortune.setHkdAmount(hkdAmount);
fortune.setCurrentPaymentAmount(hkdAmount);
fortune.setCurrentPaymentHkdAmount(hkdAmount); fortune.setCurrentPaymentHkdAmount(hkdAmount);
// 默认发放币种、汇率、发放币种金额 // 重新计算发放币种金额
fortune.setPayoutCurrency("HKD"); BigDecimal payoutAmount = hkdAmount.multiply(expectedFortune.getHkdToPayoutRate());
fortune.setHkdToPayoutRate(BigDecimal.ONE); fortune.setPayoutAmount(payoutAmount);
fortune.setPayoutAmount(hkdAmount);
// 更新预计发佣记录的港币金额 // 更新预计发佣记录的港币金额
ExpectedFortune update = new ExpectedFortune(); ExpectedFortune update = new ExpectedFortune();
...@@ -799,9 +797,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss ...@@ -799,9 +797,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
update.setOriginalToHkdRate(exchangeRate); update.setOriginalToHkdRate(exchangeRate);
update.setHkdAmount(hkdAmount); update.setHkdAmount(hkdAmount);
update.setUnpaidAmount(hkdAmount); update.setUnpaidAmount(hkdAmount);
update.setPayoutCurrency("HKD"); update.setPayoutAmount(payoutAmount);
update.setHkdToPayoutRate(BigDecimal.ONE);
update.setPayoutAmount(hkdAmount);
updatedExpectedFortuneList.add(update); updatedExpectedFortuneList.add(update);
} else { } else {
fortune.setExchangeRate(expectedFortune.getDefaultExchangeRate()); fortune.setExchangeRate(expectedFortune.getDefaultExchangeRate());
......
...@@ -105,8 +105,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -105,8 +105,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
Map<String, PolicyFollow> policyFollowMap = policyFollowService.queryPolicyFollowMap(policyNoList); Map<String, PolicyFollow> policyFollowMap = policyFollowService.queryPolicyFollowMap(policyNoList);
for (ApiExpectedFortunePageResponse vo : expectedFortuneList) { for (ApiExpectedFortunePageResponse vo : expectedFortuneList) {
// 出账币种名称
vo.setCurrencyName("港币");
UserGradeDto userGradeDto = userGradeMap.get(vo.getBrokerBizId()); UserGradeDto userGradeDto = userGradeMap.get(vo.getBrokerBizId());
if (userGradeDto != null) { if (userGradeDto != null) {
...@@ -115,7 +113,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -115,7 +113,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
PolicyFollow policyFollow = policyFollowMap.get(vo.getPolicyNo()); PolicyFollow policyFollow = policyFollowMap.get(vo.getPolicyNo());
if (policyFollow != null) { if (policyFollow != null) {
vo.setInsuranceCompany(policyFollow.getInsuranceCompany());
vo.setProductName(policyFollow.getProductName()); vo.setProductName(policyFollow.getProductName());
} }
} }
...@@ -161,7 +158,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -161,7 +158,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
if (CollUtil.isNotEmpty(matchedList)) { if (CollUtil.isNotEmpty(matchedList)) {
// 设置实际出账记录的字段:待出账金额(估)、已出账比例、未出账比例、已出账金额 // 设置实际出账记录的字段:待出账金额(估)、已出账比例、未出账比例、已出账金额
matchedList.forEach(actual -> { matchedList.forEach(actual -> {
actual.setUnpaidAmount(expected.getUnpaidAmount());
actual.setPaidRatio(expected.getPaidRatio()); actual.setPaidRatio(expected.getPaidRatio());
actual.setUnpaidRatio(expected.getUnpaidRatio()); actual.setUnpaidRatio(expected.getUnpaidRatio());
actual.setPaidAmount(expected.getPaidAmount()); actual.setPaidAmount(expected.getPaidAmount());
...@@ -242,8 +238,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -242,8 +238,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
ApiExpectedFortunePageResponse vo = new ApiExpectedFortunePageResponse(); ApiExpectedFortunePageResponse vo = new ApiExpectedFortunePageResponse();
BeanUtils.copyProperties(ef, vo); BeanUtils.copyProperties(ef, vo);
vo.setCurrencyName("港币");
String ratio = finalBrokerRatioMap.get(ef.getBrokerBizId()); String ratio = finalBrokerRatioMap.get(ef.getBrokerBizId());
vo.setCommissionRatio(ratio); vo.setCommissionRatio(ratio);
...@@ -254,7 +248,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -254,7 +248,6 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
vo.setBrokerGradeName(userGradeDto.getGradeName()); vo.setBrokerGradeName(userGradeDto.getGradeName());
} }
if (policy != null) { if (policy != null) {
vo.setInsuranceCompany(policy.getInsuranceCompany());
vo.setPremium(policy.getPaymentPremium()); vo.setPremium(policy.getPaymentPremium());
} }
if (follow != null) { if (follow != null) {
......
...@@ -979,7 +979,6 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune> ...@@ -979,7 +979,6 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 4. 生成新记录 // 4. 生成新记录
List<Fortune> newFortuneList = new ArrayList<>(); List<Fortune> newFortuneList = new ArrayList<>();
List<ExpectedFortune> newExpectedFortuneList = new ArrayList<>();
Date now = new Date(); Date now = new Date();
...@@ -1019,7 +1018,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune> ...@@ -1019,7 +1018,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
newFortune.setStatus(FortuneStatusEnum.CAN_SEND.getItemValue()); newFortune.setStatus(FortuneStatusEnum.CAN_SEND.getItemValue());
newFortune.setIsPart(1); newFortune.setIsPart(1);
// newFortune.setPayoutDate(); newFortune.setPayoutDate(LocalDate.parse(splitDto.getPayoutYearMonth() + "-01"));
String fortuneRemark = StringUtils.isBlank(splitDto.getRemark()) ? "" : splitDto.getRemark(); String fortuneRemark = StringUtils.isBlank(splitDto.getRemark()) ? "" : splitDto.getRemark();
if (StringUtils.isNotBlank(originalFortune.getRemark())) { if (StringUtils.isNotBlank(originalFortune.getRemark())) {
...@@ -1038,24 +1037,13 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune> ...@@ -1038,24 +1037,13 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
newFortuneList.add(newFortune); newFortuneList.add(newFortune);
} }
// 5.1 设置原始 fortune记录 is_part 为 2,表示该记录已被分期 // 5. 设置原始 fortune记录 is_part 为 2,表示该记录已被分期
this.lambdaUpdate() this.lambdaUpdate()
.set(Fortune::getIsPart, 2) .set(Fortune::getIsPart, 2)
.eq(Fortune::getId, originalFortune.getId()) .eq(Fortune::getId, originalFortune.getId())
.update(); .update();
// 5.2 设置原始 expected fortune记录 is_part 为 2,表示该记录已被分期
expectedFortuneService.lambdaUpdate()
.set(ExpectedFortune::getIsPart, 2)
.eq(ExpectedFortune::getId, originalExpectedFortune.getId())
.update();
// 6. 批量保存新记录 // 6. 批量保存新记录
boolean expectedSaveSuccess = expectedFortuneService.saveBatch(newExpectedFortuneList);
if (!expectedSaveSuccess) {
throw new BusinessException(ResultCode.FAIL.getCode(), "分期预计出账记录保存失败");
}
boolean fortuneSaveSuccess = this.saveBatch(newFortuneList); boolean fortuneSaveSuccess = this.saveBatch(newFortuneList);
if (!fortuneSaveSuccess) { if (!fortuneSaveSuccess) {
throw new BusinessException(ResultCode.FAIL.getCode(), "分期出账记录保存失败"); throw new BusinessException(ResultCode.FAIL.getCode(), "分期出账记录保存失败");
...@@ -1088,10 +1076,10 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune> ...@@ -1088,10 +1076,10 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
.eq(Fortune::getId, fortune.getId()) .eq(Fortune::getId, fortune.getId())
.update(); .update();
expectedFortuneService.lambdaUpdate() // expectedFortuneService.lambdaUpdate()
.set(ExpectedFortune::getActualPayoutDate, actualPayoutDate) // .set(ExpectedFortune::getActualPayoutDate, actualPayoutDate)
.eq(ExpectedFortune::getId, originalExpectedFortune.getId()) // .eq(ExpectedFortune::getId, originalExpectedFortune.getId())
.update(); // .update();
return true; return true;
} }
...@@ -1145,20 +1133,20 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune> ...@@ -1145,20 +1133,20 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
.update(); .update();
// 更新 expected fortune 的字段 // 更新 expected fortune 的字段
expectedFortuneService.lambdaUpdate() // expectedFortuneService.lambdaUpdate()
.set(ExpectedFortune::getRuleAmount, ruleAmount) // .set(ExpectedFortune::getRuleAmount, ruleAmount)
.set(ExpectedFortune::getRuleCurrency, ruleCurrency) // .set(ExpectedFortune::getRuleCurrency, ruleCurrency)
.set(ExpectedFortune::getDefaultExchangeRate, exchangeRate) // .set(ExpectedFortune::getDefaultExchangeRate, exchangeRate)
.set(ExpectedFortune::getOriginalCurrency, originalCurrency) // .set(ExpectedFortune::getOriginalCurrency, originalCurrency)
.set(ExpectedFortune::getOriginalAmount, originalAmount) // .set(ExpectedFortune::getOriginalAmount, originalAmount)
.set(ExpectedFortune::getOriginalToHkdRate, originalToHkdRate) // .set(ExpectedFortune::getOriginalToHkdRate, originalToHkdRate)
.set(ExpectedFortune::getPayoutCurrency, payoutCurrency) // .set(ExpectedFortune::getPayoutCurrency, payoutCurrency)
.set(ExpectedFortune::getPayoutAmount, payoutAmount) // .set(ExpectedFortune::getPayoutAmount, payoutAmount)
.set(ExpectedFortune::getHkdToPayoutRate, hkdToPayoutRate) // .set(ExpectedFortune::getHkdToPayoutRate, hkdToPayoutRate)
.set(ExpectedFortune::getHkdAmount, hkdAmount) // .set(ExpectedFortune::getHkdAmount, hkdAmount)
.set(ExpectedFortune::getUnpaidAmount, hkdAmount) // .set(ExpectedFortune::getUnpaidAmount, hkdAmount)
.eq(ExpectedFortune::getId, originalExpectedFortune.getId()) // .eq(ExpectedFortune::getId, originalExpectedFortune.getId())
.update(); // .update();
return true; return true;
} }
...@@ -1201,10 +1189,10 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune> ...@@ -1201,10 +1189,10 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
this.updateBatchById(updateFortuneList); this.updateBatchById(updateFortuneList);
// 更新预计 fortune 的字段 // 更新预计 fortune 的字段
expectedFortuneService.lambdaUpdate() // expectedFortuneService.lambdaUpdate()
.set(ExpectedFortune::getActualPayoutDate, actualPayoutDate) // .set(ExpectedFortune::getActualPayoutDate, actualPayoutDate)
.in(ExpectedFortune::getExpectedFortuneBizId, expectedFortuneBizIdList) // .in(ExpectedFortune::getExpectedFortuneBizId, expectedFortuneBizIdList)
.update(); // .update();
return String.format("设置成功。已更新 %d 条数据,跳过 %d 条(已有实际出账年月)", updateCount, skipCount); return String.format("设置成功。已更新 %d 条数据,跳过 %d 条(已有实际出账年月)", updateCount, skipCount);
} }
......
...@@ -131,13 +131,10 @@ public class ExpectedFortuneExportDTO { ...@@ -131,13 +131,10 @@ public class ExpectedFortuneExportDTO {
dto.setAmount(vo.getHkdAmount()); dto.setAmount(vo.getHkdAmount());
dto.setCurrency("港币"); dto.setCurrency("港币");
dto.setStatus(getStatusText(vo.getStatus())); dto.setStatus(getStatusText(vo.getStatus()));
dto.setStatusDesc(vo.getStatusDesc());
dto.setInsuranceCompany(vo.getInsuranceCompany());
dto.setProductName(vo.getProductName()); dto.setProductName(vo.getProductName());
dto.setPayoutDate(Convert.toDate(vo.getPayoutDate())); dto.setPayoutDate(Convert.toDate(vo.getPayoutDate()));
dto.setActualPayoutDate(Convert.toDate(vo.getActualPayoutDate())); dto.setActualPayoutDate(Convert.toDate(vo.getActualPayoutDate()));
dto.setPaidAmount(vo.getPaidAmount()); dto.setPaidAmount(vo.getPaidAmount());
dto.setUnpaidAmount(vo.getUnpaidAmount());
dto.setPaidRatio(vo.getPaidRatio()); dto.setPaidRatio(vo.getPaidRatio());
dto.setUnpaidRatio(vo.getUnpaidRatio()); dto.setUnpaidRatio(vo.getUnpaidRatio());
dto.setRemark(vo.getRemark()); dto.setRemark(vo.getRemark());
......
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