Forráskód Böngészése

feat(对接交行):所有代码

Wangyafan 2 nap óta
szülő
commit
4014c1fd28

+ 21 - 18
build/resources/main/application-dev.yml

@@ -7,7 +7,7 @@ upload:
 datasource:
   master:
     type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://192.168.3.5:3306/factoring_trade_v4_20240620?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
+    url: jdbc:mysql://192.168.3.5:3306/factoring_trade_v4_08_14?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
     username: root
     password: root
     driver-class-name: com.mysql.cj.jdbc.Driver
@@ -130,23 +130,23 @@ fdd:
   contractUrl: "http://192.168.125.194:8888/#/register"
   caykCustomId: "8210513B14FE854DF1061E2D54665AF9"
   yhrzzpCustomId: "2291B7F84D6340530A5469FB6FC15BF3"
-  registerUrl: "http://192.168.3.6:8870/fdd/accountRegister"
-  authUrl: "http://192.168.3.6:8870/fdd/getAuthAddress/sop"
-  removeAuthInfoUrl: "http://192.168.3.6:8870/fdd/removeAuthInfoUrl"
-  authUrlV3: "http://192.168.3.6:8870/fdd/v3/getAuthAddress"
-  authUrlV3PersonalFaceRecognition: "http://192.168.3.6:8870/fdd/v3/getAuthAddress/face/recognition"
-  uploadContractUrl: "http://192.168.3.6:8870/fdd/uploadContract"
-  batchSignUrl: "http://192.168.3.6:8870/fdd/manualBatchSign"
-  batchSignUrlSearchLocation: "http://192.168.3.6:8870/fdd/manualBatchSign/searchLocation"
-  authSignUrl: "http://192.168.3.6:8870/fdd/autoSign"
-  downloadContractUrl: "http://192.168.3.6:8870/fdd/downloadContract"
-  filedContractUrl: "http://192.168.3.6:8870/fdd/contractFiled"
-  beforeAutoSignUrl: "http://192.168.3.6:8870/fdd/before_autoSign"
-  shortUrl: "http://192.168.3.6:8870/fdd/short_url"
-  reportUrl: "http://192.168.3.6:8870/fdd/compliance_contract_report"
-  authInfoUrl: "http://192.168.3.6:8870/fdd/getAuthInfo"
-  getAuthInfoDetail: "http://192.168.3.6:8870/fdd/getAuthInfoDetail"
-  signInfoUrl: "http://192.168.3.6:8870/fdd/getSignInfo"
+  registerUrl: "http://localhost:8870/fdd/accountRegister"
+  authUrl: "http://localhost:8870/fdd/getAuthAddress/sop"
+  removeAuthInfoUrl: "http://localhost:8870/fdd/removeAuthInfoUrl"
+  authUrlV3: "http://localhost:8870/fdd/v3/getAuthAddress"
+  authUrlV3PersonalFaceRecognition: "http://localhost:8870/fdd/v3/getAuthAddress/face/recognition"
+  uploadContractUrl: "http://localhost:8870/fdd/uploadContract"
+  batchSignUrl: "http://localhost:8870/fdd/manualBatchSign"
+  batchSignUrlSearchLocation: "http://localhost:8870/fdd/manualBatchSign/searchLocation"
+  authSignUrl: "http://localhost:8870/fdd/autoSign"
+  downloadContractUrl: "http://localhost:8870/fdd/downloadContract"
+  filedContractUrl: "http://localhost:8870/fdd/contractFiled"
+  beforeAutoSignUrl: "http://localhost:8870/fdd/before_autoSign"
+  shortUrl: "http://localhost:8870/fdd/short_url"
+  reportUrl: "http://localhost:8870/fdd/compliance_contract_report"
+  authInfoUrl: "http://localhost:8870/fdd/getAuthInfo"
+  getAuthInfoDetail: "http://localhost:8870/fdd/getAuthInfoDetail"
+  signInfoUrl: "http://localhost:8870/fdd/getSignInfo"
 
 sop:
   getBusinessByKeyWordUrl: http://192.168.3.6:8868/api/trade/findBusinessName
@@ -164,6 +164,7 @@ sop:
   viewLatestPlanUrl: http://192.168.3.6:8868/api/payColl/viewLatestPlan
   judgeCustomerGradeUrl: http://192.168.3.6:8868/api/judgeCustomerGrade
   getReturnedPrincipalByBusinessNo: http://192.168.3.6:8868/api/trade/getReturnedPrincipalByBusinessNo
+  getEnterpriseDetail: http://192.168.3.6:8868/api/trade/getEnterpriseDetail
 
 trade:
   biddingManagementStartProcessUrl: http://localhost:8888/api/biddingManagement/startProcess
@@ -228,3 +229,5 @@ trade:
   bocomVipResetQrCodeUrl: http://localhost:8888/api/bocomVipAccount/resetUrlAuthorized
   bocomVipResetActvtAmtUrl: http://localhost:8888/api/bocomBindAccount/resetActvtAmt
   bocomVipBindDoUpdateUrl: http://localhost:8888/api/bocomBindAccount/doUpdate
+  bocomRegisterResetUrl: http://localhost:8888/api/bocomRegister/resetUrlAuthorized
+

+ 1 - 3
build/resources/main/application-prod.yml

@@ -170,9 +170,6 @@ sop:
   judgeCustomerGradeUrl: http://222.90.211.174:10526/api/judgeCustomerGrade
   getReturnedPrincipalByBusinessNo: http://222.90.211.174:10526/api/trade/getReturnedPrincipalByBusinessNo
   getEnterpriseDetail: http://222.90.211.174:10526/api/trade/getEnterpriseDetail
-  partnerList: http://222.90.211.174:10526/api/trade/partnerList
-  actualControl: http://222.90.211.174:10526/api/trade/actualControl
-  beneficialOwner: http://222.90.211.174:10526/api/trade/beneficialOwner
 
 trade:
   biddingManagementStartProcessUrl: http://139.224.194.150:8868/tradeV4-backend/api/biddingManagement/startProcess
@@ -236,3 +233,4 @@ trade:
   bocomVipRefreshUrl: http://139.224.194.150:8868/tradeV4-backend/api/bocomVipAccount/refreshBocomVipBasic
   bocomVipResetQrCodeUrl: http://139.224.194.150:8868/tradeV4-backend/api/bocomVipAccount/resetUrlAuthorized
   bocomVipBindDoUpdateUrl: http://139.224.194.150:8868/tradeV4-backend/api/bocomBindAccount/doUpdate
+  bocomRegisterResetUrl: http://139.224.194.150:8868/api/bocomRegister/resetUrlAuthorized

+ 35 - 6
src/main/java/com/inkasso/factoring/bocom/register/entity/BocomBasicInfo.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.inkasso.adapter.bean.BaseBean;
 import com.inkasso.factoring.file.entity.FileStorageDO;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -166,6 +167,18 @@ public class BocomBasicInfo extends BaseBean {
     @TableField("push_person")
     private String pushPerson;
 
+    /**
+     * 授权二维码(base64)
+     */
+    @TableField("qr_code")
+    private String qrCode;
+
+    /**
+     * 授权二维码生效时间(base64)
+     */
+    @TableField("qr_code_effect_time")
+    private Date qrCodeEffectTime;
+
     /**
      * false暂存 true提交
      */
@@ -209,10 +222,10 @@ public class BocomBasicInfo extends BaseBean {
     private String reason;
 
     /**
-     * 客户(真实)状态
+     * 认证人
      */
     @TableField(exist = false)
-    private String customerRealStatus;
+    private String authenticator;
 
     public String getUserAtuhSts() {
         return userAtuhSts;
@@ -496,11 +509,27 @@ public class BocomBasicInfo extends BaseBean {
         this.phoneNumber = phoneNumber;
     }
 
-    public String getCustomerRealStatus() {
-        return customerRealStatus;
+    public String getQrCode() {
+        return qrCode;
+    }
+
+    public void setQrCode(String qrCode) {
+        this.qrCode = qrCode;
+    }
+
+    public Date getQrCodeEffectTime() {
+        return qrCodeEffectTime;
+    }
+
+    public void setQrCodeEffectTime(Date qrCodeEffectTime) {
+        this.qrCodeEffectTime = qrCodeEffectTime;
+    }
+
+    public String getAuthenticator() {
+        return authenticator;
     }
 
-    public void setCustomerRealStatus(String customerRealStatus) {
-        this.customerRealStatus = customerRealStatus;
+    public void setAuthenticator(String authenticator) {
+        this.authenticator = authenticator;
     }
 }

+ 7 - 0
src/main/java/com/inkasso/factoring/bocom/register/service/IBocomBasicInfoService.java

@@ -52,4 +52,11 @@ public interface IBocomBasicInfoService extends IService<BocomBasicInfo> {
      * @return
      */
     List<String> getReason(Long id);
+
+    /**
+     * 重置授权码
+     * @param id
+     * @return
+     */
+    BocomBasicInfo resetUrlAuthorized(Long id);
 }

+ 69 - 23
src/main/java/com/inkasso/factoring/bocom/register/service/impl/BocomBasicInfoServiceImpl.java

@@ -16,7 +16,6 @@ import com.inkasso.factoring.bocom.register.entity.*;
 import com.inkasso.factoring.bocom.register.entity.vo.BocomSearchVo;
 import com.inkasso.factoring.bocom.register.entity.vo.EnterpriseDetailVo;
 import com.inkasso.factoring.bocom.register.enums.BocomCustomerStageEnums;
-import com.inkasso.factoring.bocom.register.enums.BocomCustomerStatuEnums;
 import com.inkasso.factoring.bocom.register.service.*;
 import com.inkasso.factoring.dict.entity.Dictionary;
 import com.inkasso.factoring.dict.service.DictionaryService;
@@ -25,7 +24,6 @@ import com.inkasso.factoring.file.enums.FileTypeEnum;
 import com.inkasso.factoring.file.service.FileService;
 import com.inkasso.factoring.system.user.entity.UserDO;
 import com.inkasso.factoring.system.user.service.UserService;
-import org.apache.bcel.classfile.Code;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -34,7 +32,6 @@ import org.springframework.web.client.RestTemplate;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -96,13 +93,16 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
     @Autowired
     private DictionaryService dictionaryService;
 
+    @Value("${trade.bocomRegisterResetUrl}")
+    private String bocomRegisterResetUrl;
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void add(BocomBasicInfo bocomBasicInfo) {
-        if(bocomBasicInfo.getId() == null){
+        if (bocomBasicInfo.getId() == null) {
             Long count = this.lambdaQuery().notIn(BocomBasicInfo::getCustomerStatus, BocomCustomerStageEnums.FAIL.getCode()).eq(BocomBasicInfo::getSocialCreditCode, bocomBasicInfo.getSocialCreditCode()).count();
-            if(count > 0){
-                throw new BusinessException(CodeUtil.FAIL,"该用户有在途的开户数据!");
+            if (count > 0) {
+                throw new BusinessException(CodeUtil.FAIL, "该用户有在途的开户数据!");
             }
         }
         bocomBasicInfo.setCustomerSource("贸理通C");
@@ -290,23 +290,39 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
     public List<BocomBasicInfo> findBySearch(BocomSearchVo bocomSearchVo) {
         AbstractUser abstractUser = LoginUserHolder.get();
         UserDO userDO = userService.getById(abstractUser.getId());
-        List<BocomBasicInfo> list = this.lambdaQuery().in(BocomBasicInfo::getUserCreate, userDO.getLoginName(),userDO.getUserName()).list();
+        List<BocomBasicInfo> list = this.lambdaQuery().in(BocomBasicInfo::getUserCreate, userDO.getLoginName(), userDO.getUserName()).list();
         for (BocomBasicInfo bocomBasicInfo : list) {
             Dictionary stage = dictionaryService.getByCode(bocomBasicInfo.getStage());
             Dictionary status = dictionaryService.getByCode(bocomBasicInfo.getCustomerStatus());
-            if(stage != null){
+            if (stage != null) {
                 bocomBasicInfo.setStage(stage.getName());
             }
-            if(status != null){
+            if (status != null) {
                 bocomBasicInfo.setCustomerStatus(status.getName());
             }
             List<BocomApproval> bocomApprovals = bocomApprovalService.lambdaQuery().eq(BocomApproval::getBocomBasicInfoId, bocomBasicInfo.getId()).orderByDesc(BocomApproval::getGmtCreate).list();
-            if(CollectionUtil.isNotEmpty(bocomApprovals)){
+            if (CollectionUtil.isNotEmpty(bocomApprovals)) {
                 BocomApproval bocomApproval = bocomApprovals.get(0);
                 if (bocomApproval != null && bocomApproval.getApprovalConclusion().equals("back")) {
                     bocomBasicInfo.setReason(bocomApproval.getApprovalComment());
                 }
             }
+
+            //填充法人授权人
+            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 list;
     }
@@ -317,7 +333,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
         ResponseJson responseJson = restTemplate.getForObject(getEnterpriseDetail + "?keyword=" + keyword, ResponseJson.class);
         JSONObject data = new JSONObject(responseJson.getData());
         String date = data.getStr("date");
-        if(StringUtil.isEmpty(date)){
+        if (StringUtil.isEmpty(date)) {
             date = "99991231";
         }
         String scope = data.getStr("scope");
@@ -330,7 +346,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
         if (CollectionUtil.isNotEmpty(partnerArray)) {
             for (Object o : partnerArray) {
                 String name = (String) o;
-                if(name.length() <= 4){
+                if (name.length() <= 4) {
                     JSONObject jsonObject = new JSONObject();
                     jsonObject.set("name", name);
                     jsonObject.set("type", 0);
@@ -338,13 +354,13 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                 }
             }
         }
-        if(CollectionUtil.isEmpty(partnerList)){
+        if (CollectionUtil.isEmpty(partnerList)) {
             //实际控制人
             JSONArray actualControlArray = data.getJSONArray("actualControlList");
             if (CollectionUtil.isNotEmpty(actualControlArray)) {
                 for (Object o : actualControlArray) {
                     String name = (String) o;
-                    if(name.length() <= 4){
+                    if (name.length() <= 4) {
                         JSONObject jsonObject = new JSONObject();
                         jsonObject.set("name", name);
                         jsonObject.set("type", 1);
@@ -360,7 +376,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
         if (CollectionUtil.isNotEmpty(beneficialOwnerArray)) {
             for (Object o : beneficialOwnerArray) {
                 String name = (String) o;
-                if(name.length() <= 4){
+                if (name.length() <= 4) {
                     beneficialOwnerList.add(name);
                 }
             }
@@ -392,6 +408,36 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
         return reason;
     }
 
+    @Override
+    public BocomBasicInfo resetUrlAuthorized(Long id) {
+
+        try {
+            com.inkasso.factoring.common.entity.ResponseJson responseJson = restTemplate.getForObject(bocomRegisterResetUrl + "?id=" + id, com.inkasso.factoring.common.entity.ResponseJson.class);
+            if (!responseJson.getCode().equals(200)) {
+                throw new BusinessException(CodeUtil.FAIL, responseJson.getMsg().toString());
+            }
+        } catch (Exception e) {
+            throw new BusinessException(CodeUtil.FAIL, e.getMessage());
+        }
+        BocomBasicInfo basicInfo = getById(id);
+        //填充法人授权人
+        if (basicInfo.getCustomerType() == 0) {
+            BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery().eq(BocomLegalPersonInfo::getBocomBasicInfoId, id)
+                    .one();
+            if (legalPersonInfo != null) {
+                basicInfo.setAuthenticator(legalPersonInfo.getName());
+            }
+        } else if (basicInfo.getCustomerType() == 1) {
+            BocomShareholderActualController actualController = bocomShareholderActualControllerService.lambdaQuery().eq(BocomShareholderActualController::getBocomBasicInfoId, id)
+                    .eq(BocomShareholderActualController::getPersonType, 2)
+                    .one();
+            if (actualController != null){
+                basicInfo.setAuthenticator(actualController.getName());
+            }
+        }
+        return basicInfo;
+    }
+
     private String findReasons(int index) {
         int number = index + 1;
         String result = "";
@@ -540,7 +586,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
             bocomLegalPersonInfoHistory.setBocomBasicInfoId(bocomBasicInfoHistory.getId());
             bocomLegalPersonInfoHistoryService.save(bocomLegalPersonInfoHistory);
             Long front = bocomLegalPersonInfo.getFront();
-            if(front != null){
+            if (front != null) {
                 FileStorageDO frontFile = fileService.getById(front);
                 frontFile.setId(null);
                 frontFile.setBusinessType(FileTypeEnum.BOCOM_LEGAL_REPRESENTATIVE_IDCARD_FRONT_HISTORY.getCode());
@@ -548,7 +594,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                 fileService.save(frontFile);
             }
             Long back = bocomLegalPersonInfo.getBack();
-            if(back != null){
+            if (back != null) {
                 FileStorageDO backFile = fileService.getById(back);
                 backFile.setId(null);
                 backFile.setBusinessType(FileTypeEnum.BOCOM_LEGAL_REPRESENTATIVE_IDCARD_BACK_HISTORY.getCode());
@@ -564,7 +610,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                 bocomShareholderActualControllerHistory.setBocomBasicInfoId(bocomBasicInfoHistory.getId());
                 bocomShareholderActualControllerHistoryService.save(bocomShareholderActualControllerHistory);
                 Long front = bocomShareholderActualController.getFront();
-                if(front != null){
+                if (front != null) {
                     FileStorageDO frontFile = fileService.getById(front);
                     frontFile.setId(null);
                     frontFile.setBusinessType(FileTypeEnum.BOCOM_SHAREHOLDER_IDCARD_FRONT_HISTORY.getCode());
@@ -572,7 +618,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                     fileService.save(frontFile);
                 }
                 Long back = bocomShareholderActualController.getBack();
-                if(back != null){
+                if (back != null) {
                     FileStorageDO backFile = fileService.getById(back);
                     backFile.setId(null);
                     backFile.setBusinessType(FileTypeEnum.BOCOM_SHAREHOLDER_IDCARD_BACK_HISTORY.getCode());
@@ -589,7 +635,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                 bocomBeneficiaryInfoHistory.setBocomBasicInfoId(bocomBasicInfoHistory.getId());
                 bocomBeneficiaryInfoHistoryService.save(bocomBeneficiaryInfoHistory);
                 Long front = bocomBeneficiaryInfo.getFront();
-                if(front != null){
+                if (front != null) {
                     FileStorageDO frontFile = fileService.getById(front);
                     frontFile.setId(null);
                     frontFile.setBusinessType(FileTypeEnum.BOCOM_BENEFICIARY_IDCARD_FRONT_HISTORY.getCode());
@@ -597,7 +643,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                     fileService.save(frontFile);
                 }
                 Long back = bocomBeneficiaryInfo.getBack();
-                if(back != null){
+                if (back != null) {
                     FileStorageDO backFile = fileService.getById(back);
                     backFile.setId(null);
                     backFile.setBusinessType(FileTypeEnum.BOCOM_BENEFICIARY_IDCARD_BACK_HISTORY.getCode());
@@ -613,7 +659,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
             bocomAuthorizedAgentHistory.setBocomBasicInfoId(bocomBasicInfoHistory.getId());
             bocomAuthorizedAgentHistoryService.save(bocomAuthorizedAgentHistory);
             Long front = bocomAuthorizedAgent.getFront();
-            if(front != null){
+            if (front != null) {
                 FileStorageDO frontFile = fileService.getById(front);
                 frontFile.setId(null);
                 frontFile.setBusinessType(FileTypeEnum.BOCOM_AUTHORIZED_AGENT_IDCARD_FRONT_HISTORY.getCode());
@@ -621,7 +667,7 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
                 fileService.save(frontFile);
             }
             Long back = bocomAuthorizedAgent.getBack();
-            if(back != null){
+            if (back != null) {
                 FileStorageDO backFile = fileService.getById(back);
                 backFile.setId(null);
                 backFile.setBusinessType(FileTypeEnum.BOCOM_AUTHORIZED_AGENT_IDCARD_BACK_HISTORY.getCode());

+ 11 - 0
src/main/java/com/inkasso/factoring/bocom/register/web/BocomBasicInfoController.java

@@ -87,4 +87,15 @@ public class BocomBasicInfoController {
         return new ResponseJson(reason);
     }
 
+    /**
+     * 重置授权二维码
+     *
+     * @param id
+     * @return
+     */
+    @RequestMapping("resetUrlAuthorized")
+    public ResponseJson<BocomBasicInfo> resetUrlAuthorized(Long id) {
+        return new ResponseJson(bocomBasicInfoService.resetUrlAuthorized(id));
+    }
+
 }

+ 22 - 7
src/main/java/com/inkasso/factoring/bocom/vipaccount/entity/BocomVipBindAccountInfo.java

@@ -2,6 +2,7 @@ package com.inkasso.factoring.bocom.vipaccount.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.inkasso.factoring.common.entity.BaseEntity;
 
 import java.math.BigDecimal;
@@ -25,10 +26,10 @@ public class BocomVipBindAccountInfo extends BaseEntity {
     private Long bocomVipAccountBasicInfoId;
 
     /**
-     * 是否为交通银行 0-否 1-是
+     * 是否为交通银行 0-是 1-否
      */
     @TableField("is_bank_of_communications")
-    private Integer isBankOfCommunications;
+    private Integer hasBankOfCommunications;
 
     /**
      * 开户银行
@@ -108,6 +109,13 @@ public class BocomVipBindAccountInfo extends BaseEntity {
     @TableField("money_confirm_start_time")
     private Date moneyConfirmStartTime;
 
+    /**
+     * 入金激活时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField("money_confirm_time")
+    private Date moneyConfirmTime;
+
     /**
      * 操作类型0-新增1-删除2-重设入金激活金额
      */
@@ -122,12 +130,12 @@ public class BocomVipBindAccountInfo extends BaseEntity {
         this.bocomVipAccountBasicInfoId = bocomVipAccountBasicInfoId;
     }
 
-    public Integer IsBankOfCommunications() {
-        return isBankOfCommunications;
+    public Integer getHasBankOfCommunications() {
+        return hasBankOfCommunications;
     }
 
-    public void IsBankOfCommunications(Integer isBankOfCommunications) {
-        this.isBankOfCommunications = isBankOfCommunications;
+    public void setHasBankOfCommunications(Integer hasBankOfCommunications) {
+        this.hasBankOfCommunications = hasBankOfCommunications;
     }
 
     public String getBankName() {
@@ -242,11 +250,18 @@ public class BocomVipBindAccountInfo extends BaseEntity {
         this.oprTp = oprTp;
     }
 
+    public Date getMoneyConfirmTime() {
+        return moneyConfirmTime;
+    }
+
+    public void setMoneyConfirmTime(Date moneyConfirmTime) {
+        this.moneyConfirmTime = moneyConfirmTime;
+    }
+
     @Override
     public String toString() {
         return "BocomVipBindAccountInfo{" +
                 "bocomVipAccountBasicInfoId=" + bocomVipAccountBasicInfoId +
-                ", isBankOfCommunications=" + isBankOfCommunications +
                 ", bankName=" + bankName +
                 ", bindAcctTp=" + bindAcctTp +
                 ", bindAcctNo=" + bindAcctNo +

+ 32 - 27
src/main/java/com/inkasso/factoring/bocom/vipaccount/service/impl/BocomVipAccountBasicInfoServiceImpl.java

@@ -91,7 +91,6 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
 
         QueryWrapper<BocomBasicInfo> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("user_create", LoginUserHolder.get().getUserName());
-        queryWrapper.notIn("customer_status", "bocomCustomerStatus_fail", "bocomCustomerStatus_failed", "");
         queryWrapper.orderByDesc("gmt_modified");
         List<BocomBasicInfo> bocomBasicInfos = bocomBasicInfoService.list(queryWrapper);
         List<BocomVipAccountListVo> voList = new ArrayList<>();
@@ -184,20 +183,21 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
                 if (BocomCustomerStatuEnums.SUCCESS.getCode().equals(bocomBasicInfo.getCustomerStatus())) {
                     //客户真实状态为生效 且 该客户名下不存在待生效的登记簿 或者 该客户下账户状态为 生效的 会员登记簿少于五个时 展示新增账户按钮
                     Integer addVipAccount = 1;
-                    if (CollectionUtil.isNotEmpty(vipList)){
+                    if (CollectionUtil.isNotEmpty(vipList)) {
                         long count = vipList.stream().filter(c -> "待生效".equals(c.getAccountStatusReal())).count();
-                        if (count > 0){
+                        if (count > 0) {
                             addVipAccount = 0;
                         }
-                        long effectCount = vipList.stream().filter(c -> c.getAccountStatus() == 1).count();
-                        if (effectCount > 4){
+                        long effectCount = vipList.stream().filter(c->c.getAccountStatus() != null).filter(c -> c.getAccountStatus() == 1).count();
+                        if (effectCount > 4) {
                             addVipAccount = 0;
                         }
                     }
                     vo.setAddVipAccount(addVipAccount);
-                    voList.add(vo);
                 }
+                voList.add(vo);
             });
+
         }
         return voList;
     }
@@ -241,29 +241,33 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
                 bocomVipLimitInfoService.save(bocomVipLimitInfo);
             }
         }
-        if (basicInfo.getCustomerType() != null) {
-            if (0 == basicInfo.getCustomerType()) {
-                BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
-                        .eq(BocomLegalPersonInfo::getBocomBasicInfoId, basicInfo.getId())
-                        .one();
-                if (legalPersonInfo != null) {
-                    newBasicInfo.setAuthenticator(legalPersonInfo.getName());
+        //填充需要授权的人
+        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 (1 == basicInfo.getCustomerType()) {
-                List<BocomShareholderActualController> shareholderActualControllerList = bocomShareholderActualControllerService.lambdaQuery()
-                        .eq(BocomShareholderActualController::getBocomBasicInfoId, basicInfo.getId())
-                        .orderByDesc(BocomShareholderActualController::getGmtCreate)
-                        .list();
-                if (cn.hutool.core.collection.CollectionUtil.isNotEmpty(shareholderActualControllerList)) {
-                    BocomShareholderActualController bocomShareholderActualController = shareholderActualControllerList.get(0);
-                    if (bocomShareholderActualController != null) {
-                        newBasicInfo.setAuthenticator(bocomShareholderActualController.getName());
+
+                if (values.length > 1) {
+                    if (authorizedAgent != null && legalPersonInfo != null) {
+                        //取法人和授权代理人
+                        authenticator = authorizedAgent.getName() + "和" + legalPersonInfo.getName();
                     }
                 }
-            }
-            if (2 == basicInfo.getCustomerType()) {
-                newBasicInfo.setAuthenticator(basicInfo.getCustomerName());
+                newBasicInfo.setAuthenticator(authenticator);
             }
         }
 
@@ -435,9 +439,10 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
             } else {
                 bindAccountInfo.setOprTp("1");
             }
-            if (bindAccountInfo.IsBankOfCommunications() == 1) {
+            if (bindAccountInfo.getHasBankOfCommunications() == 0) {
                 bindAccountInfo.setBankName("中国交通银行");
             }
+            bindAccountInfo.setBindAcctTp(0);
             ResponseJson responseJson;
             try {
                 responseJson = restTemplate.postForObject(bocomVipBindDoUpdateUrl, bindAccountInfo, ResponseJson.class);

+ 1 - 0
src/main/resources/application-prod.yml

@@ -233,3 +233,4 @@ trade:
   bocomVipRefreshUrl: http://139.224.194.150:8868/tradeV4-backend/api/bocomVipAccount/refreshBocomVipBasic
   bocomVipResetQrCodeUrl: http://139.224.194.150:8868/tradeV4-backend/api/bocomVipAccount/resetUrlAuthorized
   bocomVipBindDoUpdateUrl: http://139.224.194.150:8868/tradeV4-backend/api/bocomBindAccount/doUpdate
+  bocomRegisterResetUrl: http://139.224.194.150:8868/api/bocomRegister/resetUrlAuthorized

+ 7 - 0
src/main/resources/data/bocom/liutao.sql

@@ -467,3 +467,10 @@ VALUES ( (select t.id from t_permission t where ename = 'CyAccountMemberInfoMana
 INSERT INTO `t_permission` ( `parentId`, `type`, `cname`, `ename`, `gradation`, `moduleName`, `url`, `icon`, `user_create`, `user_modified`, `gmt_create`, `gmt_modified`)
 VALUES ( (select t.id from t_permission t where ename = 'CyAccountMemberInfoManage' ), 'button', '重新查询会员信息', 'researchBocomInfo', 6, NULL, NULL, NULL, NULL, NULL,  now(),now());
 
+alter table bocom_basic_info add `cust_sts` tinyint(2) DEFAULT null COMMENT '客户状态  0-待生效 1-生效 2-注销';
+
+
+alter table bocom_basic_info add `qr_code` longtext  COMMENT '授权二维码';
+alter table bocom_basic_info add `qr_code_effect_time` timestamp  NULL COMMENT '授权二维码生效时间';
+
+alter table bocom_basic_info add `change_platform_serial_number` varchar(100) DEFAULT '' COMMENT '变更时的平台流水号';