|
@@ -18,15 +18,9 @@ import com.inkasso.factoring.bocom.register.service.IBocomBasicInfoService;
|
|
|
import com.inkasso.factoring.bocom.register.service.IBocomLegalPersonInfoService;
|
|
|
import com.inkasso.factoring.bocom.register.service.IBocomShareholderActualControllerService;
|
|
|
import com.inkasso.factoring.bocom.vipaccount.dao.BocomVipAccountBasicInfoMapper;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.entity.BocomVipAccountBasicInfo;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.entity.BocomVipBindAccountInfo;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.entity.BocomVipLimitInfo;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.entity.BocomVipSilentAccountInfo;
|
|
|
+import com.inkasso.factoring.bocom.vipaccount.entity.*;
|
|
|
import com.inkasso.factoring.bocom.vipaccount.entity.vo.BocomVipAccountListVo;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.service.IBocomVipAccountBasicInfoService;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.service.IBocomVipBindAccoutInfoService;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.service.IBocomVipLimitInfoService;
|
|
|
-import com.inkasso.factoring.bocom.vipaccount.service.IBocomVipSilentAccoutInfoService;
|
|
|
+import com.inkasso.factoring.bocom.vipaccount.service.*;
|
|
|
import com.inkasso.factoring.common.entity.ResponseJson;
|
|
|
import com.inkasso.factoring.common.service.SerialNumberGenerator;
|
|
|
import com.inkasso.factoring.common.util.DateUtil;
|
|
@@ -85,6 +79,8 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
private IBocomShareholderActualControllerService bocomShareholderActualControllerService;
|
|
|
@Autowired
|
|
|
private IBocomAuthorizedAgentService bocomAuthorizedAgentService;
|
|
|
+ @Autowired
|
|
|
+ private IBocomVipAccountNoticeInfoService bocomVipAccountNoticeInfoService;
|
|
|
|
|
|
@Override
|
|
|
public List<BocomVipAccountListVo> findList() {
|
|
@@ -115,38 +111,8 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
vipList.forEach(vipAccountBasicInfo -> {
|
|
|
|
|
|
// autoAccountRealStatus(vipAccountBasicInfo);
|
|
|
-
|
|
|
- if (bocomBasicInfo != null) {
|
|
|
- //填充需要授权的人
|
|
|
- if (StringUtil.isNotEmpty(vipAccountBasicInfo.getNoticeObject())) {
|
|
|
- String[] values = vipAccountBasicInfo.getNoticeObject().split("/");
|
|
|
- //授权代理热
|
|
|
- BocomAuthorizedAgent authorizedAgent = bocomAuthorizedAgentService.lambdaQuery()
|
|
|
- .eq(BocomAuthorizedAgent::getBocomBasicInfoId, bocomBasicInfo.getId())
|
|
|
- .one();
|
|
|
- //法人
|
|
|
- BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
|
|
|
- .eq(BocomLegalPersonInfo::getBocomBasicInfoId, bocomBasicInfo.getId())
|
|
|
- .one();
|
|
|
- String authenticator = "";
|
|
|
- if (values.length > 0) {
|
|
|
- if (values.length == 1) {
|
|
|
- if (authorizedAgent != null) {
|
|
|
- //取授权代理人
|
|
|
- authenticator = authorizedAgent.getName();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (values.length > 1) {
|
|
|
- if (authorizedAgent != null && legalPersonInfo != null) {
|
|
|
- //取法人和授权代理人
|
|
|
- authenticator = authorizedAgent.getName() + "和" + legalPersonInfo.getName();
|
|
|
- }
|
|
|
- }
|
|
|
- vipAccountBasicInfo.setAuthenticator(authenticator);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //填充需要授权的人
|
|
|
+ autoAuthenticator(vipAccountBasicInfo);
|
|
|
|
|
|
//标识是否需要重新创建会员登记簿
|
|
|
Date afterFiveDaysDate = DateUtil.addDays(vipAccountBasicInfo.getGmtModified(), 5);
|
|
@@ -242,34 +208,7 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
}
|
|
|
}
|
|
|
//填充需要授权的人
|
|
|
- if (StringUtil.isNotEmpty(newBasicInfo.getNoticeObject())) {
|
|
|
- String[] values = newBasicInfo.getNoticeObject().split("/");
|
|
|
- //授权代理人
|
|
|
- BocomAuthorizedAgent authorizedAgent = bocomAuthorizedAgentService.lambdaQuery()
|
|
|
- .eq(BocomAuthorizedAgent::getBocomBasicInfoId, basicInfo.getId())
|
|
|
- .one();
|
|
|
- //法人
|
|
|
- BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
|
|
|
- .eq(BocomLegalPersonInfo::getBocomBasicInfoId, basicInfo.getId())
|
|
|
- .one();
|
|
|
- String authenticator = "";
|
|
|
- if (values.length > 0) {
|
|
|
- if (values.length == 1) {
|
|
|
- if (authorizedAgent != null) {
|
|
|
- //取授权代理人
|
|
|
- authenticator = authorizedAgent.getName();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (values.length > 1) {
|
|
|
- if (authorizedAgent != null && legalPersonInfo != null) {
|
|
|
- //取法人和授权代理人
|
|
|
- authenticator = authorizedAgent.getName() + "和" + legalPersonInfo.getName();
|
|
|
- }
|
|
|
- }
|
|
|
- newBasicInfo.setAuthenticator(authenticator);
|
|
|
- }
|
|
|
- }
|
|
|
+ autoAuthenticator(newBasicInfo);
|
|
|
|
|
|
return newBasicInfo;
|
|
|
}
|
|
@@ -422,10 +361,14 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
throw new BusinessException(CodeUtil.FAIL, e.getMessage());
|
|
|
}
|
|
|
newVipAccount = JSONObject.parseObject(JSONObject.toJSONString(responseJson.getData()), BocomVipAccountBasicInfo.class);
|
|
|
- lambdaUpdate().eq(BocomVipAccountBasicInfo::getId, newVipAccount.getId())
|
|
|
- .set(BocomVipAccountBasicInfo::getQrCode, newVipAccount.getQrCode())
|
|
|
- .set(BocomVipAccountBasicInfo::getQrCodeEffectTime, newVipAccount.getQrCodeEffectTime())
|
|
|
- .update();
|
|
|
+ //全删全进
|
|
|
+ bocomVipAccountNoticeInfoService.remove(new QueryWrapper<BocomVipAccountNoticeInfo>()
|
|
|
+ .eq("bocom_vip_account_basic_info_id",newVipAccount.getId()));
|
|
|
+ if (CollectionUtil.isNotEmpty(newVipAccount.getNoticeInfoList())) {
|
|
|
+ newVipAccount.getNoticeInfoList().forEach(n -> {
|
|
|
+ bocomVipAccountNoticeInfoService.save(n);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
return newVipAccount;
|
|
@@ -496,57 +439,31 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 填充账户真实状态
|
|
|
- *
|
|
|
- * @param vipAccountBasicInfo
|
|
|
+ * 填充授权代理人
|
|
|
+ * @param bocomVipAccountBasicInfo
|
|
|
*/
|
|
|
-// private void autoAccountRealStatus(BocomVipAccountBasicInfo vipAccountBasicInfo) {
|
|
|
-//
|
|
|
-// if (vipAccountBasicInfo != null) {
|
|
|
-// BocomVipLimitInfo vipLimitInfo = bocomVipLimitInfoService
|
|
|
-// .lambdaQuery()
|
|
|
-// .eq(BocomVipLimitInfo::getBocomVipAccountBasicInfoId, vipAccountBasicInfo.getId())
|
|
|
-// .one();
|
|
|
-//
|
|
|
-// String realStatus = "";
|
|
|
-// if (vipAccountBasicInfo.getAccountStatus() == 1 ) {
|
|
|
-// // 授权状态 0-待用户授权 1-银行审核中 2-授权失败(用户拒绝)3-授权失败(银行拒绝)4-授权成功
|
|
|
-// //授权代理人授权状态
|
|
|
-// Integer authorizationStatus = vipAccountBasicInfo.getAuthorizationStatus();
|
|
|
-// //法人授权状态
|
|
|
-// Integer legalAuthorizationStatus = vipAccountBasicInfo.getLegalAuthorizationStatus();
|
|
|
-//
|
|
|
-//
|
|
|
-// if (authorizationStatus == 1 || legalAuthorizationStatus == 1 ||
|
|
|
-// authorizationStatus == 2 || legalAuthorizationStatus == 2 ||
|
|
|
-// authorizationStatus == 3 || legalAuthorizationStatus == 3) {
|
|
|
-// //任一授权状态为 1/2/3 时 账户真实状态置为 开通失败
|
|
|
-// realStatus = "开通失败";
|
|
|
-// }
|
|
|
-//
|
|
|
-// if ((authorizationStatus == 0 || authorizationStatus == 4) && (authorizationStatus == 0 || authorizationStatus == 4)) {
|
|
|
-// //授权状态组合为 0+0 || 0+4 时 且 可收可付款(无收入管控且无支出管控)且 接口返回的登记簿状态为是生效 时 账户真实状态置为 生效
|
|
|
-// if (vipAccountBasicInfo.getChdbokSts() != null && vipAccountBasicInfo.getChdbokSts() == 1 || (vipLimitInfo != null && vipLimitInfo.getIncFlg() == 1 && vipLimitInfo.getPayFlg() == 1)) {
|
|
|
-// realStatus = "生效";
|
|
|
-// } else {
|
|
|
-// //授权状态组合为 0+0 || 0+4 时 且 可收可付款(无收入管控且无支出管控) 时 账户真实状态置为 待生效
|
|
|
-// realStatus = "待生效";
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (authorizationStatus == 4 && authorizationStatus == 4) {
|
|
|
-// //授权状态组合为 4+4 且 可收可付款(无收入管控且无支出管控) 时 账户真实状态置 为 生效
|
|
|
-// if (vipAccountBasicInfo.getChdbokSts() != null && vipAccountBasicInfo.getChdbokSts() == 1 || (vipLimitInfo != null && vipLimitInfo.getIncFlg() == 1 && vipLimitInfo.getPayFlg() == 1)) {
|
|
|
-// realStatus = "生效";
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// } else {
|
|
|
-// realStatus = "失效";
|
|
|
-// }
|
|
|
-// vipAccountBasicInfo.setAccountStatus(realStatus);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ private void autoAuthenticator(BocomVipAccountBasicInfo bocomVipAccountBasicInfo){
|
|
|
+ BocomBasicInfo basicInfo = bocomBasicInfoService.getById(bocomVipAccountBasicInfo.getBocomBasicInfoId());
|
|
|
+ if (CollectionUtil.isNotEmpty(bocomVipAccountBasicInfo.getNoticeInfoList())) {
|
|
|
+ //授权代理人
|
|
|
+ BocomAuthorizedAgent authorizedAgent = bocomAuthorizedAgentService.lambdaQuery()
|
|
|
+ .eq(BocomAuthorizedAgent::getBocomBasicInfoId, basicInfo.getId())
|
|
|
+ .one();
|
|
|
+ //法人
|
|
|
+ BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
|
|
|
+ .eq(BocomLegalPersonInfo::getBocomBasicInfoId, basicInfo.getId())
|
|
|
+ .one();
|
|
|
+ bocomVipAccountBasicInfo.getNoticeInfoList().forEach(n->{
|
|
|
+ if (n.getNoticeObject().equals("1")){
|
|
|
+ n.setAuthenticator(legalPersonInfo.getName());
|
|
|
+ }
|
|
|
+ if (n.getNoticeObject().equals("2")){
|
|
|
+ n.setAuthenticator(authorizedAgent.getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|