|
@@ -155,8 +155,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
insFeeAudit.setOrderNo(orders.getId());
|
|
insFeeAudit.setOrderNo(orders.getId());
|
|
|
|
|
|
|
|
// 获取协议信息
|
|
// 获取协议信息
|
|
|
- HttpResult<AgreementInfoVo> result = orgClient.queryAgreementById(orders.getAgreementId()
|
|
|
|
|
- ,baseController.getToken(), baseController.getAppSystemCode());
|
|
|
|
|
|
|
+ HttpResult<AgreementInfoVo> result = orgClient.queryAgreementById(orders.getAgreementId());
|
|
|
AssertionUtils.isFail(Objects.isNull(result.getData()),"获取协议失败!");
|
|
AssertionUtils.isFail(Objects.isNull(result.getData()),"获取协议失败!");
|
|
|
AgreementInfoVo agreementInfoVo = result.getData();
|
|
AgreementInfoVo agreementInfoVo = result.getData();
|
|
|
AgreementVo agreementVo = agreementInfoVo.getAgreement();
|
|
AgreementVo agreementVo = agreementInfoVo.getAgreement();
|
|
@@ -323,8 +322,8 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
|
|
|
|
|
// 更新用户账户
|
|
// 更新用户账户
|
|
|
feeOrders = feeOrdersService.getById(param.getOrderNo());
|
|
feeOrders = feeOrdersService.getById(param.getOrderNo());
|
|
|
- HttpResult<SysUser> sysUserResult = orgClient.getUserOnlyIdByMobile(orders.getRealQuoteUserId(), baseController.getToken());
|
|
|
|
|
- HttpResult<SysUserAccount> result = orgClient.accountGet(sysUserResult.getData().getId(), baseController.getToken());
|
|
|
|
|
|
|
+ HttpResult<SysUser> sysUserResult = orgClient.getUserOnlyIdByMobile(orders.getRealQuoteUserId());
|
|
|
|
|
+ HttpResult<SysUserAccount> result = orgClient.accountGet(sysUserResult.getData().getId());
|
|
|
AssertionUtils.isFail(result.getCode() != 200,"获取用户账户失败!");
|
|
AssertionUtils.isFail(result.getCode() != 200,"获取用户账户失败!");
|
|
|
userAccount = result.getData();
|
|
userAccount = result.getData();
|
|
|
|
|
|
|
@@ -443,14 +442,14 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
userAccount.setSumAmount(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
|
|
userAccount.setSumAmount(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
|
|
|
userAccount.setSumAmountUnpaid(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
|
|
userAccount.setSumAmountUnpaid(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
|
|
|
}
|
|
}
|
|
|
- orgClient.saveOrUpdate(userAccount, baseController.getToken());
|
|
|
|
|
|
|
+ orgClient.saveOrUpdate(userAccount);
|
|
|
|
|
|
|
|
// 进入应收表
|
|
// 进入应收表
|
|
|
List<String> orderNos = new ArrayList<>();
|
|
List<String> orderNos = new ArrayList<>();
|
|
|
orderNos.add(audit.getOrderNo());
|
|
orderNos.add(audit.getOrderNo());
|
|
|
JSONObject requestData = new JSONObject();
|
|
JSONObject requestData = new JSONObject();
|
|
|
requestData.put("orderNos",orderNos);
|
|
requestData.put("orderNos",orderNos);
|
|
|
- HttpResult httpResult = orgClient.addReceivable(requestData, baseController.getToken());
|
|
|
|
|
|
|
+ HttpResult httpResult = orgClient.addReceivable(requestData);
|
|
|
AssertionUtils.isFail(httpResult.getCode() == 500,"应收出错");
|
|
AssertionUtils.isFail(httpResult.getCode() == 500,"应收出错");
|
|
|
|
|
|
|
|
// 一级分销费用户进账
|
|
// 一级分销费用户进账
|
|
@@ -458,7 +457,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getFirstDistributorId());
|
|
HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getFirstDistributorId());
|
|
|
AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
|
|
AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
|
|
|
SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
|
|
SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
|
|
|
- HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId(), baseController.getToken());
|
|
|
|
|
|
|
+ HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
|
|
|
AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
|
|
AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
|
|
|
distributor1 = jzgAccountResult.getData();
|
|
distributor1 = jzgAccountResult.getData();
|
|
|
verifySysAccount(distributor1,jzgInfo,feeOrders);
|
|
verifySysAccount(distributor1,jzgInfo,feeOrders);
|
|
@@ -468,7 +467,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getSecondDistributorId());
|
|
HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getSecondDistributorId());
|
|
|
AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
|
|
AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
|
|
|
SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
|
|
SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
|
|
|
- HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId(), baseController.getToken());
|
|
|
|
|
|
|
+ HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
|
|
|
AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
|
|
AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
|
|
|
distributor2 = jzgAccountResult.getData();
|
|
distributor2 = jzgAccountResult.getData();
|
|
|
verifySysAccount(distributor2,jzgInfo,feeOrders);
|
|
verifySysAccount(distributor2,jzgInfo,feeOrders);
|
|
@@ -478,7 +477,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getThirdDistributorId());
|
|
HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getThirdDistributorId());
|
|
|
AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
|
|
AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
|
|
|
SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
|
|
SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
|
|
|
- HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId(), baseController.getToken());
|
|
|
|
|
|
|
+ HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
|
|
|
AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
|
|
AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
|
|
|
distributor3 = jzgAccountResult.getData();
|
|
distributor3 = jzgAccountResult.getData();
|
|
|
verifySysAccount(distributor3,jzgInfo,feeOrders);
|
|
verifySysAccount(distributor3,jzgInfo,feeOrders);
|
|
@@ -494,7 +493,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
|
|
|
|
|
// 增加账户的金额记录
|
|
// 增加账户的金额记录
|
|
|
List<SysUserAccountIncomeLog>builderIncomeLog = this.builderIncomeLog(param.getOrderNo(),feeOrders,userAccount,distributor1,distributor2,distributor3);
|
|
List<SysUserAccountIncomeLog>builderIncomeLog = this.builderIncomeLog(param.getOrderNo(),feeOrders,userAccount,distributor1,distributor2,distributor3);
|
|
|
- HttpResult result = orgClient.addUserAccountIncomeLog(builderIncomeLog,baseController.getToken());
|
|
|
|
|
|
|
+ HttpResult result = orgClient.addUserAccountIncomeLog(builderIncomeLog);
|
|
|
AssertionUtils.isFail(result.getCode() != 200,"账户记录添加失败,审核失败");
|
|
AssertionUtils.isFail(result.getCode() != 200,"账户记录添加失败,审核失败");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -570,7 +569,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
userAccount.setSumAmount(feeOrders.getFirstDistributionFee().add(userAccount.getSumAmount()));
|
|
userAccount.setSumAmount(feeOrders.getFirstDistributionFee().add(userAccount.getSumAmount()));
|
|
|
userAccount.setSumAmountUnpaid(feeOrders.getFirstDistributionFee().add(userAccount.getSumAmountUnpaid()));
|
|
userAccount.setSumAmountUnpaid(feeOrders.getFirstDistributionFee().add(userAccount.getSumAmountUnpaid()));
|
|
|
}
|
|
}
|
|
|
- orgClient.saveOrUpdate(userAccount, baseController.getToken());
|
|
|
|
|
|
|
+ orgClient.saveOrUpdate(userAccount);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -612,8 +611,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
this.getRecordCost(auditCostInfoVos, record, costTypeVos,feeOrders);
|
|
this.getRecordCost(auditCostInfoVos, record, costTypeVos,feeOrders);
|
|
|
}else {
|
|
}else {
|
|
|
// 获取协议信息
|
|
// 获取协议信息
|
|
|
- HttpResult<AgreementInfoVo> result = orgClient.queryAgreementById(feeOrders.getAgreementId()
|
|
|
|
|
- ,baseController.getToken(), baseController.getAppSystemCode());
|
|
|
|
|
|
|
+ HttpResult<AgreementInfoVo> result = orgClient.queryAgreementById(feeOrders.getAgreementId());
|
|
|
AssertionUtils.isFail(Objects.isNull(result.getData()),"获取协议失败!");
|
|
AssertionUtils.isFail(Objects.isNull(result.getData()),"获取协议失败!");
|
|
|
AgreementInfoVo agreementInfoVo = result.getData();
|
|
AgreementInfoVo agreementInfoVo = result.getData();
|
|
|
this.getAuditCost(auditCostInfoVos,costTypeVos,feeOrders,agreementInfoVo.getAgreement());
|
|
this.getAuditCost(auditCostInfoVos,costTypeVos,feeOrders,agreementInfoVo.getAgreement());
|