Commit 7cb939eb by zhangxingmin

Merge remote-tracking branch 'origin/test' into test

parents 3f561deb 464ac61d
......@@ -762,9 +762,8 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 查询入账记录
Map<String, Commission> commissionByPolicyPeriod = new HashMap<>();
if (CollectionUtils.isNotEmpty(policyNoSet)) {
// 查询保单号
List<Policy> policyList = policyService.lambdaQuery().in(Policy::getPolicyNo, policyNoSet).list();
policyMap = policyList.stream().collect(Collectors.toMap(Policy::getPolicyNo, Function.identity(), (oldValue, newValue) -> newValue));
// 查询保单信息
policyMap = policyService.queryPolicyMap(policyNoSet);
// 查询预计出账
expectedFortuneMap = expectedFortuneService.lambdaQuery()
......@@ -789,6 +788,11 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
}
}
// 当前登录用户
AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser();
String loginUserId = currentLoginUser.getId().toString();
String realName = currentLoginUser.getRealName();
List<Fortune> fortuneList = new ArrayList<>();
List<ExpectedFortune> expectedFortuneUpdateList = new ArrayList<>();
for (FortuneAddRequest fortuneAddRequest : fortuneAddRequestList) {
......@@ -819,6 +823,9 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
String payableNo = expectedFortuneService.getPayableNo(fortuneAddRequest.getFortuneType(), policy.getPolicyNo(), expectedFortune.getId());
expectedFortuneService.lambdaUpdate()
.set(ExpectedFortune::getPayableNo, payableNo)
.set(ExpectedFortune::getCreatorId, loginUserId)
.set(ExpectedFortune::getCreatorName, realName)
.set(ExpectedFortune::getUpdaterId, loginUserId)
.eq(ExpectedFortune::getId, expectedFortune.getId())
.update();
// 关联应付款编号
......@@ -852,6 +859,16 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
fortune.setPayoutDate(LocalDate.parse(fortuneAddRequest.getPayoutDate() + "-01"));
fortune.setActualPayoutDate(LocalDate.parse(fortuneAddRequest.getActualPayoutDate() + "-01"));
fortune.setIsPart(0);
// 创建时间、更新时间
Date now = new Date();
fortune.setCreateTime(now);
fortune.setUpdateTime(now);
// 创建人、更新人
fortune.setCreatorId(loginUserId);
fortune.setReconciliationOperator(realName);
fortune.setUpdaterId(loginUserId);
fortuneList.add(fortune);
}
this.saveBatch(fortuneList);
......@@ -897,6 +914,11 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
expectedFortune.setPaidRatio(BigDecimal.ZERO);
expectedFortune.setUnpaidRatio(BigDecimal.valueOf(100));
// 创建时间、更新时间
LocalDateTime now = LocalDateTime.now();
expectedFortune.setCreateTime(now);
expectedFortune.setUpdateTime(now);
return expectedFortune;
}
......@@ -964,7 +986,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser();
String loginUserId = currentLoginUser.getId().toString();
String username = currentLoginUser.getUsername();
String realName = currentLoginUser.getRealName();
for (int i = 0; i < splitList.size(); i++) {
FortuneSplitDto splitDto = splitList.get(i);
......@@ -1008,7 +1030,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
newExpectedFortune.setRemark(expectedRemark);
newExpectedFortune.setCreatorId(loginUserId);
newExpectedFortune.setCreatorName(username);
newExpectedFortune.setCreatorName(realName);
newExpectedFortune.setCreateTime(localDateTime);
newExpectedFortune.setUpdaterId(loginUserId);
newExpectedFortune.setUpdateTime(localDateTime);
......@@ -1048,7 +1070,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
}
newFortune.setRemark(fortuneRemark);
newFortune.setReconciliationOperator(username);
newFortune.setReconciliationOperator(realName);
newFortune.setCreatorId(loginUserId);
newFortune.setCreateTime(now);
newFortune.setUpdaterId(loginUserId);
......
......@@ -177,7 +177,7 @@
ef.payout_amount,
ef.hkd_to_payout_rate,
ef.hkd_amount,
NULL as current_payment_hkd_amount,
ef.current_payment_amount as current_payment_hkd_amount,
ef.default_exchange_rate as exchange_rate,
ef.paid_amount,
ef.unpaid_amount,
......
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