Commit 39d708af by zhangxingmin

push

parent 0d2f533b
...@@ -33,44 +33,56 @@ public class CsfMybatisPlusConfig { ...@@ -33,44 +33,56 @@ public class CsfMybatisPlusConfig {
/** /**
* 自动填充字段配置(如创建人、更新人等) * 自动填充字段配置(如创建人、更新人等)
*/ */
/**
* 自动填充字段配置(如创建人、更新人等)
*/
@Bean @Bean
@Primary @Primary
public MetaObjectHandler metaObjectHandler() { public MetaObjectHandler metaObjectHandler() {
log.info("MetaObjectHandler Bean 正在创建...","MetaObjectHandler Bean 正在创建==========");
return new MetaObjectHandler() { return new MetaObjectHandler() {
@Override @Override
public void insertFill(MetaObject metaObject) { public void insertFill(MetaObject metaObject) {
//获取Security上下文当前用户的登录信息
AuthUserDto authUserDto = null; AuthUserDto authUserDto = null;
try { try {
authUserDto = SecurityUtil.getCurrentLoginUser(); authUserDto = SecurityUtil.getCurrentLoginUser();
}catch (Exception e) { } catch (Exception e) {
log.info("获取Security上下文当前用户的登录信息失败,{}",e.getMessage()); log.info("获取Security上下文当前用户的登录信息失败,{}", e.getMessage());
} }
log.info("metaObjectHandler=======insertFill自动填充获取用户信息:{}", JSON.toJSONString(authUserDto)); log.info("metaObjectHandler insertFill 获取用户信息:{}", JSON.toJSONString(authUserDto));
if (authUserDto != null) { if (authUserDto != null) {
//自动注入创建人和创建用户名 // 仅当字段为空时才填充
this.strictInsertFill(metaObject, "creatorId", String.class, authUserDto.getUserBizId()); if (getFieldValByName("creatorId", metaObject) == null) {
this.strictInsertFill(metaObject, "creatorName", String.class, authUserDto.getRealName()); this.strictInsertFill(metaObject, "creatorId", String.class, authUserDto.getUserBizId());
this.strictUpdateFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId()); }
this.strictUpdateFill(metaObject, "updaterName", String.class, authUserDto.getRealName()); if (getFieldValByName("creatorName", metaObject) == null) {
this.strictInsertFill(metaObject, "creatorName", String.class, authUserDto.getRealName());
}
if (getFieldValByName("updaterId", metaObject) == null) {
this.strictInsertFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId());
}
if (getFieldValByName("updaterName", metaObject) == null) {
this.strictInsertFill(metaObject, "updaterName", String.class, authUserDto.getRealName());
}
} }
} }
@Override @Override
public void updateFill(MetaObject metaObject) { public void updateFill(MetaObject metaObject) {
//获取Security上下文当前用户的登录信息
AuthUserDto authUserDto = null; AuthUserDto authUserDto = null;
try { try {
authUserDto = SecurityUtil.getCurrentLoginUser(); authUserDto = SecurityUtil.getCurrentLoginUser();
}catch (Exception e) { } catch (Exception e) {
log.info("获取Security上下文当前用户的登录信息失败,{}",e.getMessage()); log.info("获取Security上下文当前用户的登录信息失败,{}", e.getMessage());
} }
log.info("metaObjectHandler=======updateFill自动填充获取用户信息:{}", JSON.toJSONString(authUserDto)); log.info("metaObjectHandler updateFill 获取用户信息:{}", JSON.toJSONString(authUserDto));
if (authUserDto != null) { if (authUserDto != null) {
//自动注入更新人和更新用户名 // 仅当字段为空时才填充
this.strictUpdateFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId()); if (getFieldValByName("updaterId", metaObject) == null) {
this.strictUpdateFill(metaObject, "updaterName", String.class, authUserDto.getRealName()); this.strictUpdateFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId());
}
if (getFieldValByName("updaterName", metaObject) == null) {
this.strictUpdateFill(metaObject, "updaterName", String.class, authUserDto.getRealName());
}
} }
} }
}; };
......
...@@ -1043,9 +1043,10 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte ...@@ -1043,9 +1043,10 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
} }
// 待入账金额归零 = 已入账来佣比例(累计实佣率)>= 累计产品来佣率 // 待入账金额归零 = 已入账来佣比例(累计实佣率)>= 累计产品来佣率
if (totalPaidRatio.compareTo(totalCommissionRatio) >= 0){ // if (totalPaidRatio.compareTo(totalCommissionRatio) >= 0){
vo.setPendingPaidAmount(BigDecimal.ZERO); // vo.setPendingPaidAmount(BigDecimal.ZERO);
} // }
vo.setPendingPaidAmount(totalAmount);
vo.setTotalPolicyCount(policyNoSet.size()); vo.setTotalPolicyCount(policyNoSet.size());
vo.setTotalPremium(totalPremium); vo.setTotalPremium(totalPremium);
vo.setFromTotalPremium(fromTotalPremium); vo.setFromTotalPremium(fromTotalPremium);
...@@ -1173,6 +1174,8 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte ...@@ -1173,6 +1174,8 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
commissionExpected.setUpdaterId(""); commissionExpected.setUpdaterId("");
commissionExpected.setCreateTime(new Date()); commissionExpected.setCreateTime(new Date());
commissionExpected.setUpdateTime(new Date()); commissionExpected.setUpdateTime(new Date());
commissionExpected.setCreatorName("系统生成");
commissionExpected.setUpdaterName("系统生成");
commissionExpectedList.add(commissionExpected); commissionExpectedList.add(commissionExpected);
} }
......
...@@ -24,7 +24,7 @@ public class CommissionExpectedStatisticsVO { ...@@ -24,7 +24,7 @@ public class CommissionExpectedStatisticsVO {
private BigDecimal totalPaidAmount; private BigDecimal totalPaidAmount;
/** /**
* 待入账金额(HKD) * 待入账金额(HKD)(估)
*/ */
// @Schema(description = "待入账金额(HKD)") // @Schema(description = "待入账金额(HKD)")
private BigDecimal pendingPaidAmount; private BigDecimal pendingPaidAmount;
......
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