|
@@ -21,11 +21,12 @@ import com.sunxung.factoring.entity.bocom.register.vo.BocomSearchVo;
|
|
|
import com.sunxung.factoring.entity.bocom.register.vo.EnterpriseDetailVo;
|
|
|
import com.sunxung.factoring.entity.bocom.request.B2BJEBM1101RequestV2;
|
|
|
import com.sunxung.factoring.entity.bocom.request.B2BJEBM1102RequestV2;
|
|
|
+import com.sunxung.factoring.entity.bocom.request.B2BJEBM2001RequestV1;
|
|
|
import com.sunxung.factoring.entity.bocom.response.B2BJEBM1101ResponseV2;
|
|
|
import com.sunxung.factoring.entity.bocom.response.B2BJEBM1102ResponseV2;
|
|
|
+import com.sunxung.factoring.entity.bocom.response.B2BJEBM2001ResponseV1;
|
|
|
import com.sunxung.factoring.entity.bocom.response.FileUploadResponseV1;
|
|
|
import com.sunxung.factoring.entity.bocom.vipaccount.BocomVipAccountBasicInfo;
|
|
|
-import com.sunxung.factoring.entity.bocom.vipaccount.BocomVipLimitInfo;
|
|
|
import com.sunxung.factoring.entity.project.BusinessProcessingLog;
|
|
|
import com.sunxung.factoring.entity.project.vo.BusinessProcessingLogDetailVo;
|
|
|
import com.sunxung.factoring.entity.sys.Dictionary;
|
|
@@ -33,8 +34,8 @@ import com.sunxung.factoring.entity.sys.*;
|
|
|
import com.sunxung.factoring.mapper.bocom.register.BocomBasicInfoMapper;
|
|
|
import com.sunxung.factoring.service.bocom.api.IBocomApiService;
|
|
|
import com.sunxung.factoring.service.bocom.register.*;
|
|
|
+import com.sunxung.factoring.service.bocom.vipaccount.BocomVipCommonService;
|
|
|
import com.sunxung.factoring.service.bocom.vipaccount.IBocomVipAccountBasicInfoService;
|
|
|
-import com.sunxung.factoring.service.bocom.vipaccount.IBocomVipLimitInfoService;
|
|
|
import com.sunxung.factoring.service.project.BusinessProcessingLogService;
|
|
|
import com.sunxung.factoring.service.sys.*;
|
|
|
import com.sunxung.factoring.service.sys.flowable.FlowableService;
|
|
@@ -153,7 +154,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
private IBocomVipAccountBasicInfoService bocomVipAccountBasicInfoService;
|
|
|
|
|
|
@Autowired
|
|
|
- private IBocomVipLimitInfoService bocomVipLimitInfoService;
|
|
|
+ private BocomVipCommonService bocomVipCommonService;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -554,6 +555,32 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
return reason;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public BocomBasicInfo resetUrlAuthorized(Long id) {
|
|
|
+
|
|
|
+ BocomBasicInfo bocomBasicInfo = baseMapper.get(id);
|
|
|
+ if (bocomBasicInfo == null) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "会员账户信息不能为空!");
|
|
|
+ }
|
|
|
+ resetUrlAuthorized(bocomBasicInfo);
|
|
|
+ //填充法人授权人
|
|
|
+ if (bocomBasicInfo.getCustomerType() == 0) {
|
|
|
+ BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery().eq(BocomLegalPersonInfo::getBocomBasicInfoId, bocomBasicInfo.getId())
|
|
|
+ .one();
|
|
|
+ if (legalPersonInfo != null) {
|
|
|
+ bocomBasicInfo.setAuthenticator(legalPersonInfo.getName());
|
|
|
+ }
|
|
|
+ } else if (bocomBasicInfo.getCustomerType() == 1) {
|
|
|
+ BocomShareholderActualController actualController = bocomShareholderActualControllerService.lambdaQuery().eq(BocomShareholderActualController::getBocomBasicInfoId, bocomBasicInfo.getId())
|
|
|
+ .eq(BocomShareholderActualController::getPersonType, 2)
|
|
|
+ .one();
|
|
|
+ if (actualController != null) {
|
|
|
+ bocomBasicInfo.setAuthenticator(actualController.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return bocomBasicInfo;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private String findReasons(int index) {
|
|
|
int number = index + 1;
|
|
@@ -834,7 +861,6 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
FileStorageDO backFile = bocomAuthorizedAgent.getBackFile();
|
|
|
FileUploadResponseV1 fileUploadResponseV11 = bocomApiService.fileUploadV1(new File(backFile.getAbsolutePath()));
|
|
|
pptmBody.setAthAgntIdImgBackId(fileUploadResponseV11.getDocumentId());
|
|
|
- bocomBasicInfo.setPushPerson("法人");
|
|
|
} else if (bocomBasicInfo.getCustomerType() == 1) {
|
|
|
pptmBody.setCustTp("G");
|
|
|
pptmBody.setCmpyNme(bocomBasicInfo.getCustomerName());
|
|
@@ -927,7 +953,6 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
FileStorageDO backFile = bocomAuthorizedAgent.getBackFile();
|
|
|
FileUploadResponseV1 fileUploadResponseV11 = bocomApiService.fileUploadV1(new File(backFile.getAbsolutePath()));
|
|
|
pptmBody.setAthAgntIdImgBackId(fileUploadResponseV11.getDocumentId());
|
|
|
- bocomBasicInfo.setPushPerson("法人");
|
|
|
} else if (bocomBasicInfo.getCustomerType() == 2) {
|
|
|
// 客户类别 新增时必送 P-个人 B-企业 G-个体工商户
|
|
|
pptmBody.setCustTp("P");
|
|
@@ -1002,6 +1027,19 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
bocomBasicInfo.setVerificationStatus(vrfySts);
|
|
|
bocomBasicInfo.setPlatformSerialNumber(plfmSerNo);
|
|
|
bocomBasicInfo.setCustomerNumber(mshpCustId);
|
|
|
+ autoCustomerRealStatus(bocomBasicInfo);
|
|
|
+
|
|
|
+ //填充授权二维码和通知推送对象
|
|
|
+ if (CollectionUtil.isNotEmpty(body.getNotyQue())) {
|
|
|
+ body.getNotyQue().forEach(notyQue -> {
|
|
|
+ if ("1".equals(notyQue.getNotyPushObj())) {
|
|
|
+ bocomBasicInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
+ bocomBasicInfo.setQrCodeEffectTime(new Date());
|
|
|
+ bocomBasicInfo.setPushPerson("法人");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
return bocomBasicInfo;
|
|
|
} else {
|
|
|
String returnMsg = b2BJEBM1101ResponseV2.getPptmHead().getReturnMsg();
|
|
@@ -1047,7 +1085,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
//3.授权代理人证件号码、授权代理人身份证、姓名、手机号、证件有效期
|
|
|
//客户号首位不带PT的字母,只能变更授权代理人。其他字段不可修改
|
|
|
|
|
|
- checkChangeBocom(bocomBasicInfo);
|
|
|
+ String modfCntlWord = checkChangeBocom(bocomBasicInfo);
|
|
|
//修改数据
|
|
|
updateInfo(bocomBasicInfo);
|
|
|
//添加日志
|
|
@@ -1066,7 +1104,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
processingLog.setEndTime(new Date());
|
|
|
businessProcessingLogService.add(processingLog);
|
|
|
//变更交行信息
|
|
|
- changeBocom(bocomBasicInfo.getId());
|
|
|
+ changeBocom(modfCntlWord, bocomBasicInfo.getId());
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1079,8 +1117,9 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
String plfmSerNo = serialNumberGenerator.generatePlfmSerNo();
|
|
|
pptmBody.setPlfmSerNo(plfmSerNo);
|
|
|
pptmBody.setMshpCustId(bocomBasicInfo.getCustomerNumber());
|
|
|
- if (bocomBasicInfo.getCustomerNumber().contains("PT")){
|
|
|
+ if (bocomBasicInfo.getCustomerNumber().contains("PT")) {
|
|
|
if (bocomBasicInfo.getCustomerType() == 0) {
|
|
|
+ pptmBody.setModfCntlWord("1001111100");
|
|
|
pptmBody.setCustTp("B");
|
|
|
String bocomBasicInfoCertificateType = bocomBasicInfo.getCertificateType();
|
|
|
String cmpyIdTp = bocomBasicInfoCertificateType.split("_")[1];
|
|
@@ -1100,7 +1139,6 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
BocomShareholderActualController bocomShareholderActualController = bocomShareholderActualControllers.get(0);
|
|
|
//股东
|
|
|
if (bocomShareholderActualController.getPersonType() == 0) {
|
|
|
- pptmBody.setModfCntlWord("0001111011");
|
|
|
pptmBody.setCntlgSrhdrNme(bocomShareholderActualController.getName());
|
|
|
String certificateType = bocomShareholderActualController.getCertificateType();
|
|
|
String cntlgSrhdrIdTp = certificateType.split("_")[1];
|
|
@@ -1111,7 +1149,6 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
pptmBody.setCntlgSrhdrIdVldDt("20440101");
|
|
|
//实控人
|
|
|
} else if (bocomShareholderActualController.getPersonType() == 1) {
|
|
|
- pptmBody.setModfCntlWord("0001011011");
|
|
|
pptmBody.setAtlctlPrsNme(bocomShareholderActualController.getName());
|
|
|
String certificateType = bocomShareholderActualController.getCertificateType();
|
|
|
String cntlgSrhdrIdTp = certificateType.split("_")[1];
|
|
@@ -1196,7 +1233,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
FileUploadResponseV1 fileUploadResponseV11 = bocomApiService.fileUploadV1(new File(backFile.getAbsolutePath()));
|
|
|
pptmBody.setAthAgntIdImgBackId(fileUploadResponseV11.getDocumentId());
|
|
|
} else if (bocomBasicInfo.getCustomerType() == 1) {
|
|
|
- pptmBody.setModfCntlWord("0101011001");
|
|
|
+ pptmBody.setModfCntlWord("0101111100");
|
|
|
pptmBody.setCustTp("G");
|
|
|
pptmBody.setCmpyNme(bocomBasicInfo.getCustomerName());
|
|
|
String bocomBasicInfoCertificateType = bocomBasicInfo.getCertificateType();
|
|
@@ -1289,7 +1326,6 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
FileUploadResponseV1 fileUploadResponseV11 = bocomApiService.fileUploadV1(new File(backFile.getAbsolutePath()));
|
|
|
pptmBody.setAthAgntIdImgBackId(fileUploadResponseV11.getDocumentId());
|
|
|
} else if (bocomBasicInfo.getCustomerType() == 2) {
|
|
|
- pptmBody.setModfCntlWord("0010000000");
|
|
|
// 客户类别 新增时必送 P-个人 B-企业 G-个体工商户
|
|
|
pptmBody.setCustTp("P");
|
|
|
//个人姓名
|
|
@@ -1322,18 +1358,31 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
throw new BusinessException(CodeUtil.FAIL, "企业信息错误!");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
b2BJEBM1101RequestV2Biz.setPptmBody(pptmBody);
|
|
|
b2BJEBM1101RequestV2.setBizContent(b2BJEBM1101RequestV2Biz);
|
|
|
B2BJEBM1101ResponseV2 b2BJEBM1101ResponseV2 = bocomApiService.sendToBocom(b2BJEBM1101RequestV2, BocomApiConstant.B2BJEBM_1101_URL);
|
|
|
B2BJEBM1101ResponseV2.PptmBody body = b2BJEBM1101ResponseV2.getPptmBody();
|
|
|
if (!b2BJEBM1101ResponseV2.isSuccess() || body.getCustSts() == null) {
|
|
|
String returnMsg = b2BJEBM1101ResponseV2.getPptmHead().getReturnMsg();
|
|
|
- throw new BusinessException(CodeUtil.FAIL, "交行开户失败" + returnMsg);
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "会员账户修改失败!" + returnMsg);
|
|
|
+ }
|
|
|
+ //填充授权二维码和通知推送对象
|
|
|
+ if (CollectionUtil.isNotEmpty(body.getNotyQue())) {
|
|
|
+ body.getNotyQue().forEach(notyQue -> {
|
|
|
+ if ("1".equals(notyQue.getNotyPushObj())) {
|
|
|
+ bocomBasicInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
+ bocomBasicInfo.setQrCodeEffectTime(new Date());
|
|
|
+ bocomBasicInfo.setPushPerson("法人");
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+ lambdaUpdate().eq(BocomBasicInfo::getId, bocomBasicInfo.getId())
|
|
|
+ .set(BocomBasicInfo::getQrCode, bocomBasicInfo.getQrCode())
|
|
|
+ .update();
|
|
|
}
|
|
|
|
|
|
- private void changeBocom(Long id) {
|
|
|
+ private void changeBocom(String modfCntlWord, Long id) {
|
|
|
+
|
|
|
BocomBasicInfo bocomBasicInfo = getDetail(id);
|
|
|
B2BJEBM1101RequestV2 b2BJEBM1101RequestV2 = new B2BJEBM1101RequestV2();
|
|
|
B2BJEBM1101RequestV2.B2BJEBM1101RequestV2Biz b2BJEBM1101RequestV2Biz = new B2BJEBM1101RequestV2.B2BJEBM1101RequestV2Biz();
|
|
@@ -1362,7 +1411,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
pptmBody.setAthAgntIdImgFrtId(fileUploadResponseV1.getDocumentId());
|
|
|
FileUploadResponseV1 fileUploadResponseV11 = bocomApiService.fileUploadV1(new File(backFile.getAbsolutePath()));
|
|
|
pptmBody.setAthAgntIdImgBackId(fileUploadResponseV11.getDocumentId());
|
|
|
- if (bocomBasicInfo.getCustomerNumber().contains("PT")){
|
|
|
+ if (bocomBasicInfo.getCustomerNumber().contains("PT")) {
|
|
|
//客户编号带‘PT’时都可以变更 授权代理人和单位名称(单位名称、营业执照、证件过期时间、注册地址)
|
|
|
String bocomBasicInfoCertificateType = bocomBasicInfo.getCertificateType();
|
|
|
String cmpyIdTp = bocomBasicInfoCertificateType.split("_")[1];
|
|
@@ -1411,10 +1460,8 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
String registeredCountry = bocomBasicInfo.getRegisteredCountry();
|
|
|
String country = registeredCountry.split("_")[1];
|
|
|
pptmBody.setCtzn(country);
|
|
|
- pptmBody.setModfCntlWord("0001000011");
|
|
|
} else if (bocomBasicInfo.getCustomerType() == 1) {
|
|
|
//个体工商户可变更 1.企业;2.授权代理人;3.负责人
|
|
|
- pptmBody.setModfCntlWord("0001000001");
|
|
|
pptmBody.setCustTp("G");
|
|
|
List<BocomShareholderActualController> bocomShareholderActualControllers = bocomBasicInfo.getBocomShareholderActualControllers();
|
|
|
BocomShareholderActualController bocomShareholderActualController = bocomShareholderActualControllers.get(0);
|
|
@@ -1474,7 +1521,6 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
pptmBody.setCtzn(country);
|
|
|
|
|
|
} else if (bocomBasicInfo.getCustomerType() == 2) {
|
|
|
- pptmBody.setModfCntlWord("0010000000");
|
|
|
// 客户类别 新增时必送 P-个人 B-企业 G-个体工商户
|
|
|
pptmBody.setCustTp("P");
|
|
|
//个人姓名
|
|
@@ -1504,11 +1550,10 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
} else {
|
|
|
throw new BusinessException(CodeUtil.FAIL, "企业信息错误!");
|
|
|
}
|
|
|
- }else {
|
|
|
- //客户编号不带‘PT’只能变更授权代理人
|
|
|
- pptmBody.setModfCntlWord("0000000001");
|
|
|
}
|
|
|
|
|
|
+ pptmBody.setModfCntlWord(modfCntlWord);
|
|
|
+
|
|
|
b2BJEBM1101RequestV2Biz.setPptmBody(pptmBody);
|
|
|
b2BJEBM1101RequestV2.setBizContent(b2BJEBM1101RequestV2Biz);
|
|
|
B2BJEBM1101ResponseV2 b2BJEBM1101ResponseV2 = bocomApiService.sendToBocom(b2BJEBM1101RequestV2, BocomApiConstant.B2BJEBM_1101_URL);
|
|
@@ -1517,6 +1562,29 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
String returnMsg = b2BJEBM1101ResponseV2.getPptmHead().getReturnMsg();
|
|
|
throw new BusinessException(CodeUtil.FAIL, "交行变更失败" + returnMsg);
|
|
|
}
|
|
|
+ //填充授权二维码和通知推送对象
|
|
|
+ if (CollectionUtil.isNotEmpty(body.getNotyQue())) {
|
|
|
+ body.getNotyQue().forEach(notyQue -> {
|
|
|
+ if ("1".equals(notyQue.getNotyPushObj())) {
|
|
|
+ bocomBasicInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
+ bocomBasicInfo.setQrCodeEffectTime(new Date());
|
|
|
+ bocomBasicInfo.setPushPerson("法人");
|
|
|
+ bocomBasicInfo.setChangePlatformSerialNumber(plfmSerNo);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ lambdaUpdate().eq(BocomBasicInfo::getId, bocomBasicInfo.getId())
|
|
|
+ .set(BocomBasicInfo::getQrCode, bocomBasicInfo.getQrCode())
|
|
|
+ .update();
|
|
|
+
|
|
|
+ //变更会员信息后 在途(非生效状态)的会员登记簿置为失效状态
|
|
|
+ bocomVipAccountBasicInfoService.lambdaUpdate()
|
|
|
+ .eq(BocomVipAccountBasicInfo::getBocomBasicInfoId, bocomBasicInfo.getId())
|
|
|
+ .notIn(BocomVipAccountBasicInfo::getChdbokSts, 1)
|
|
|
+ .set(BocomVipAccountBasicInfo::getAccountStatus, 3)
|
|
|
+ .set(BocomVipAccountBasicInfo::getAccountStatusReal, BocomVipAccountStatusDic.ChildEnum.VIP_ACCOUNT_PENDING_EXPIRE.getCode())
|
|
|
+ .update();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1569,17 +1637,32 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
*
|
|
|
* @param bocomBasicInfo
|
|
|
*/
|
|
|
- private void checkChangeBocom(BocomBasicInfo bocomBasicInfo) {
|
|
|
+ private String checkChangeBocom(BocomBasicInfo bocomBasicInfo) {
|
|
|
+
|
|
|
+ String modfCntlWord = "";
|
|
|
+ String agentFlag = "0";
|
|
|
+ String legalFlag = "0";
|
|
|
+ String companyFlag = "0";
|
|
|
|
|
|
if (bocomBasicInfo.getId() == null) {
|
|
|
throw new BusinessException(CodeUtil.FAIL, "账户id不能为空!");
|
|
|
}
|
|
|
BocomBasicInfo oldBocomBasicInfo = get(bocomBasicInfo.getId());
|
|
|
+ if (!bocomBasicInfo.getCustomerName().equals(oldBocomBasicInfo.getCustomerName())) {
|
|
|
+ //公司名称变更
|
|
|
+ companyFlag = "1";
|
|
|
+ }
|
|
|
+
|
|
|
//授权代理人
|
|
|
BocomAuthorizedAgent oldAgent = bocomAuthorizedAgentService.lambdaQuery()
|
|
|
.eq(BocomAuthorizedAgent::getBocomBasicInfoId, oldBocomBasicInfo.getId())
|
|
|
.one();
|
|
|
BocomAuthorizedAgent newAgent = bocomBasicInfo.getBocomAuthorizedAgent();
|
|
|
+ if (!oldAgent.getCertificateCode().equals(newAgent.getCertificateCode())) {
|
|
|
+ //授权代理人变更
|
|
|
+ agentFlag = "1";
|
|
|
+ }
|
|
|
+
|
|
|
if (oldBocomBasicInfo != null) {
|
|
|
if (oldBocomBasicInfo.getCustomerNumber().contains("PT")) {
|
|
|
if (oldBocomBasicInfo.getCustomerType() == 0) {
|
|
@@ -1589,12 +1672,25 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
.one();
|
|
|
BocomLegalPersonInfo newLegalPersonInfo = bocomBasicInfo.getBocomLegalPersonInfo();
|
|
|
|
|
|
+ if (!oldLegalPerson.getCertificateCode().equals(newLegalPersonInfo.getCertificateCode())) {
|
|
|
+ //法人变更
|
|
|
+ legalFlag = "1";
|
|
|
+ FileStorageDO fileStorageDO = fileService.lambdaQuery().eq(FileStorageDO::getBusinessType, FileModuleDict.ChildEnum.BOCOM_REGISTER_BUSINESS_LICENSE.getCode())
|
|
|
+ .eq(FileStorageDO::getBusinessId, bocomBasicInfo.getId())
|
|
|
+ .orderByDesc(FileStorageDO::getGmtCreate).one();
|
|
|
+ if (fileStorageDO != null && fileStorageDO.getId().equals(bocomBasicInfo.getFileId())) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "公司法人变更必须重新上传营业执照!");
|
|
|
+ }
|
|
|
+ companyFlag = "1";
|
|
|
+ }
|
|
|
+
|
|
|
//如果单位名称、法人证件号码、授权代理人证件号码与原来一致 抛异常
|
|
|
if (oldBocomBasicInfo.getCustomerName().equals(bocomBasicInfo.getCustomerName()) &&
|
|
|
oldLegalPerson.getCertificateCode().equals(newLegalPersonInfo.getCertificateCode()) &&
|
|
|
oldAgent.getCertificateCode().equals(newAgent.getCertificateCode())) {
|
|
|
throw new BusinessException(CodeUtil.FAIL, "单位名称、法人证件号码、授权代理人证件号码“未发生变更,其他信息请走修改流程!");
|
|
|
}
|
|
|
+
|
|
|
} else if (oldBocomBasicInfo.getCustomerType() == 1) {
|
|
|
Boolean changeActualController = false;
|
|
|
//负责人
|
|
@@ -1608,15 +1704,25 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
.collect(Collectors.toList());
|
|
|
if (CollectionUtil.isNotEmpty(actualControllerList)) {
|
|
|
BocomShareholderActualController actualController = actualControllerList.get(0);
|
|
|
- if (oldActualController.getCertificateCode().equals(actualController.getCertificateCode())) {
|
|
|
+ if (!oldActualController.getCertificateCode().equals(actualController.getCertificateCode())) {
|
|
|
changeActualController = true;
|
|
|
+ //负责人变更
|
|
|
+ legalFlag = "1";
|
|
|
+ FileStorageDO fileStorageDO = fileService.lambdaQuery().eq(FileStorageDO::getBusinessType, FileModuleDict.ChildEnum.BOCOM_REGISTER_BUSINESS_LICENSE.getCode())
|
|
|
+ .eq(FileStorageDO::getBusinessId, bocomBasicInfo.getId())
|
|
|
+ .orderByDesc(FileStorageDO::getGmtCreate).one();
|
|
|
+ if (fileStorageDO != null && fileStorageDO.getId().equals(bocomBasicInfo.getFileId())) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "公司法人变更必须重新上传营业执照!");
|
|
|
+ }
|
|
|
+ companyFlag = "1";
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
//如果单位名称、负责人证件号码、授权代理人证件号码与原来一致 抛异常
|
|
|
if (oldBocomBasicInfo.getCustomerName().equals(bocomBasicInfo.getCustomerName()) &&
|
|
|
- changeActualController && oldAgent.getCertificateCode().equals(newAgent.getCertificateCode())) {
|
|
|
+ !changeActualController && oldAgent.getCertificateCode().equals(newAgent.getCertificateCode())) {
|
|
|
throw new BusinessException(CodeUtil.FAIL, "单位名称、负责人证件号码、授权代理人证件号码“未发生变更,其他信息请走修改流程!");
|
|
|
}
|
|
|
|
|
@@ -1641,15 +1747,14 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
.collect(Collectors.toList());
|
|
|
if (CollectionUtil.isNotEmpty(actualControllerList)) {
|
|
|
BocomShareholderActualController actualController = actualControllerList.get(0);
|
|
|
- if (oldActualController.getCertificateCode().equals(actualController.getCertificateCode())) {
|
|
|
+ if (!oldActualController.getCertificateCode().equals(actualController.getCertificateCode())) {
|
|
|
changeActualController = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //如果单位名称、法人证件号码、授权代理人证件号码与原来一致 抛异常
|
|
|
- if (oldBocomBasicInfo.getCustomerName().equals(bocomBasicInfo.getCustomerName()) ||
|
|
|
- oldLegalPerson.getCertificateCode().equals(newLegalPersonInfo.getCertificateCode()) ||
|
|
|
+ if (!oldBocomBasicInfo.getCustomerName().equals(bocomBasicInfo.getCustomerName()) ||
|
|
|
+ !oldLegalPerson.getCertificateCode().equals(newLegalPersonInfo.getCertificateCode()) ||
|
|
|
changeActualController) {
|
|
|
throw new BusinessException(CodeUtil.FAIL, "当前账户,单位名称和法人/责任人不可变更!");
|
|
|
}
|
|
@@ -1659,6 +1764,8 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
|
|
|
}
|
|
|
|
|
|
+ modfCntlWord = "000" + companyFlag + "0000" + legalFlag + agentFlag;
|
|
|
+ return modfCntlWord;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1824,8 +1931,8 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
List<BocomVipAccountBasicInfo> vipAccountBasicInfoList = bocomVipAccountBasicInfoService.lambdaQuery().eq(BocomVipAccountBasicInfo::getBocomBasicInfoId, id)
|
|
|
.eq(BocomVipAccountBasicInfo::getAccountStatusReal, BocomVipAccountStatusDic.ChildEnum.VIP_ACCOUNT_EFFECT.getCode())
|
|
|
.list();
|
|
|
- if (CollectionUtil.isNotEmpty(vipAccountBasicInfoList)){
|
|
|
- throw new BusinessException(CodeUtil.FAIL,"存在生效中的账户,不允许终止!");
|
|
|
+ if (CollectionUtil.isNotEmpty(vipAccountBasicInfoList)) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "存在生效中的账户,不允许终止!");
|
|
|
}
|
|
|
|
|
|
BusinessProcessingLog processingLog = new BusinessProcessingLog();
|
|
@@ -1906,6 +2013,16 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
this.lambdaUpdate().eq(BocomBasicInfo::getId, id).set(BocomBasicInfo::getStage, BocomCustomerStageEnums.TERMINATION.getCode()).set(BocomBasicInfo::getCustomerStatus, BocomCustomerStatuEnums.TERMINATION.getCode()).update();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void batchReSearch() {
|
|
|
+ List<BocomBasicInfo> list = list();
|
|
|
+ if (CollectionUtil.isNotEmpty(list)) {
|
|
|
+ list.forEach(basic -> {
|
|
|
+ research(basic.getId());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void research(Long id) {
|
|
|
BocomBasicInfo bocomBasicInfo = get(id);
|
|
@@ -1920,9 +2037,11 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
B2BJEBM1102ResponseV2.PptmBody body = b2BJEBM1102ResponseV2.getPptmBody();
|
|
|
if (!b2BJEBM1102ResponseV2.isSuccess() || body.getCustSts() == null) {
|
|
|
String returnMsg = b2BJEBM1102ResponseV2.getPptmHead().getReturnMsg();
|
|
|
- throw new BusinessException(CodeUtil.FAIL, "交行开户失败" + returnMsg);
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "刷新失败!" + returnMsg);
|
|
|
} else {
|
|
|
String custSts = body.getCustSts();
|
|
|
+ Integer custStsInt = Integer.valueOf(custSts);
|
|
|
+ bocomBasicInfo.setCustSts(custStsInt);
|
|
|
String vrfySts = body.getCustInfVrfySts();
|
|
|
if (StringUtil.isNotEmpty(vrfySts)) {
|
|
|
if (vrfySts.equals("0")) {
|
|
@@ -2028,6 +2147,24 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
}
|
|
|
}
|
|
|
autoAddVipAccountFlag(basicInfo);
|
|
|
+
|
|
|
+ //填充法人授权人
|
|
|
+ if (basicInfo.getCustomerType() == 0) {
|
|
|
+ BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
|
|
|
+ .eq(BocomLegalPersonInfo::getBocomBasicInfoId, basicInfo.getId())
|
|
|
+ .one();
|
|
|
+ if (legalPersonInfo != null) {
|
|
|
+ basicInfo.setAuthenticator(legalPersonInfo.getName());
|
|
|
+ }
|
|
|
+ } else if (basicInfo.getCustomerType() == 1) {
|
|
|
+ BocomShareholderActualController actualController = bocomShareholderActualControllerService.lambdaQuery()
|
|
|
+ .eq(BocomShareholderActualController::getBocomBasicInfoId, basicInfo.getId())
|
|
|
+ .eq(BocomShareholderActualController::getPersonType, 2)
|
|
|
+ .one();
|
|
|
+ if (actualController != null) {
|
|
|
+ basicInfo.setAuthenticator(actualController.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return new GridPage<>(bocomSearchVo.getRows(), bocomSearchVo.getPage(), page.getTotal(), page.getResult());
|
|
|
}
|
|
@@ -2276,4 +2413,46 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 重置法人授权二维码
|
|
|
+ *
|
|
|
+ * @param bocomBasicInfo
|
|
|
+ */
|
|
|
+ private void resetUrlAuthorized(BocomBasicInfo bocomBasicInfo) {
|
|
|
+
|
|
|
+ if (bocomBasicInfo != null) {
|
|
|
+
|
|
|
+
|
|
|
+ B2BJEBM2001RequestV1 b2BJEBM2001RequestV1 = new B2BJEBM2001RequestV1();
|
|
|
+ B2BJEBM2001RequestV1.B2BJEBM2001RequestV1Biz b2BJEBM2001RequestV1Biz = new B2BJEBM2001RequestV1.B2BJEBM2001RequestV1Biz();
|
|
|
+ B2BJEBM2001RequestV1.B2BJEBM2001RequestV1Biz.PptmBody pptmBody = new B2BJEBM2001RequestV1.B2BJEBM2001RequestV1Biz.PptmBody();
|
|
|
+
|
|
|
+ //平台流水号
|
|
|
+ pptmBody.setPlfmSerNo(bocomBasicInfo.getChangePlatformSerialNumber());
|
|
|
+ //会员客户号
|
|
|
+ pptmBody.setMshpCustId(bocomBasicInfo.getCustomerNumber());
|
|
|
+ //功能码 01--查询 02--重置 03--登记簿开立授权
|
|
|
+ pptmBody.setFuncCode("02");
|
|
|
+
|
|
|
+
|
|
|
+ b2BJEBM2001RequestV1Biz.setPptmBody(pptmBody);
|
|
|
+ b2BJEBM2001RequestV1.setBizContent(b2BJEBM2001RequestV1Biz);
|
|
|
+ B2BJEBM2001ResponseV1.PptmBody pptmBodyResponse = bocomVipCommonService.resetUrl(b2BJEBM2001RequestV1);
|
|
|
+
|
|
|
+ pptmBodyResponse.getNotyQue().forEach(notyQue -> {
|
|
|
+ if ("1".equals(notyQue.getNotyPushObj())) {
|
|
|
+ bocomBasicInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
+ bocomBasicInfo.setQrCodeEffectTime(new Date());
|
|
|
+// replaceBase64(vipAccountBasicInfo);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ lambdaUpdate().eq(BocomBasicInfo::getId, bocomBasicInfo.getId())
|
|
|
+ .set(BocomBasicInfo::getQrCode, bocomBasicInfo.getQrCode())
|
|
|
+ .set(BocomBasicInfo::getQrCodeEffectTime, new Date())
|
|
|
+ .update();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|