Browse Source

feat(对接交行):逻辑变更

Wangyafan 1 week ago
parent
commit
bd6bf0c81c

+ 14 - 0
src/main/java/com/inkasso/factoring/bocom/register/entity/BocomBasicInfo.java

@@ -208,6 +208,12 @@ public class BocomBasicInfo extends BaseBean {
     @TableField(exist = false)
     private String reason;
 
+    /**
+     * 客户(真实)状态
+     */
+    @TableField(exist = false)
+    private String customerRealStatus;
+
     public String getUserAtuhSts() {
         return userAtuhSts;
     }
@@ -489,4 +495,12 @@ public class BocomBasicInfo extends BaseBean {
     public void setPhoneNumber(String phoneNumber) {
         this.phoneNumber = phoneNumber;
     }
+
+    public String getCustomerRealStatus() {
+        return customerRealStatus;
+    }
+
+    public void setCustomerRealStatus(String customerRealStatus) {
+        this.customerRealStatus = customerRealStatus;
+    }
 }

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

@@ -45,4 +45,11 @@ public interface IBocomBasicInfoService extends IService<BocomBasicInfo> {
      * @return
      */
     EnterpriseDetailVo getBasicDetailsByName(String keyword);
+
+    /**
+     * 查詢原因
+     * @param id
+     * @return
+     */
+    List<String> getReason(Long id);
 }

+ 134 - 0
src/main/java/com/inkasso/factoring/bocom/register/service/impl/BocomBasicInfoServiceImpl.java

@@ -369,6 +369,140 @@ public class BocomBasicInfoServiceImpl extends ServiceImpl<BocomBasicInfoMapper,
         return enterpriseDetailVo;
     }
 
+    @Override
+    public List<String> getReason(Long id) {
+        BocomBasicInfo bocomBasicInfo = getById(id);
+        String vrfyFailStsWord = bocomBasicInfo.getVrfyFailStsWord();
+        List<String> reason = new ArrayList<>();
+        if (StringUtil.isNotEmpty(vrfyFailStsWord)) {
+            char charToFind = '1';
+            int index = vrfyFailStsWord.indexOf(charToFind);
+            if (index >= 0) {
+                String reasons = findReasons(index);
+                reason.add(reasons);
+            }
+            while (index >= 0) {
+                index = vrfyFailStsWord.indexOf(charToFind, index + 1);
+                if (index >= 0) {
+                    String reasons = findReasons(index);
+                    reason.add(reasons);
+                }
+            }
+        }
+        return reason;
+    }
+
+    private String findReasons(int index) {
+        int number = index + 1;
+        String result = "";
+        if (number == 1) {
+            result = "营业执照影像文件docid错误";
+        } else if (number == 2) {
+            result = "营业执照影像文件OCR识别未通过";
+        } else if (number == 3) {
+            result = "个人证件影像文件docid错误";
+        } else if (number == 4) {
+            result = "个人证件影像文件OCR识别未通过";
+        } else if (number == 5) {
+            result = "法定代表人/负责人证件影像文件docid错误";
+        } else if (number == 6) {
+            result = "法定代表人/负责人证件影像文件OCR识别未通过";
+        } else if (number == 7) {
+            result = "受益人证件影像文件docid错误";
+        } else if (number == 8) {
+            result = "受益人证件影像文件OCR识别未通过";
+        } else if (number == 9) {
+            result = "控制人证件影像文件docid错误";
+        } else if (number == 10) {
+            result = "控制人证件影像文件OCR识别未通过";
+        } else if (number == 11) {
+            result = "股东证件影像文件docid错误";
+        } else if (number == 12) {
+            result = "股东证件影像文件OCR识别未通过";
+        } else if (number == 13) {
+            result = "授权代理人证件影像文件docid错误";
+        } else if (number == 14) {
+            result = "授权代理人证件影像文件OCR识别未通过";
+        } else if (number == 15) {
+            result = "公司客户工商联网校验未通过";
+        } else if (number == 16) {
+            result = "公司客户红盾校验失败";
+        } else if (number == 17) {
+            result = "客户反洗钱特殊名单未通过";
+        } else if (number == 18) {
+            result = "客户反洗钱风险等级较高";
+        } else if (number == 19) {
+            result = "客户电信诈骗黑名单校验未通过";
+        } else if (number == 20) {
+            result = "法定代表人/负责人公安联网核查未通过";
+        } else if (number == 21) {
+            result = "法定代表人/负责人反洗钱特殊名单未通过";
+        } else if (number == 22) {
+            result = "法定代表人/负责人反洗钱风险等级较高";
+        } else if (number == 23) {
+            result = "法定代表人/负责人手机实名制认证失败";
+        } else if (number == 24) {
+            result = "个人客户公安联网核查失败";
+        } else if (number == 25) {
+            result = "个人手机实名制认证失败";
+        } else if (number == 26) {
+            result = "授权代理人风险等级较高";
+        } else if (number == 27) {
+            result = "授权代理人公安联网核查失败";
+        } else if (number == 28) {
+            result = "授权代理人手机实名制认证失败";
+        } else if (number == 29) {
+            result = "授权代理人反洗钱特殊名单未通过";
+        } else if (number == 30) {
+            result = "受益人公安联网核查失败";
+        } else if (number == 31) {
+            result = "受益人反洗钱特殊名单未通过";
+        } else if (number == 32) {
+            result = "受益人反洗钱风险等级较高";
+        } else if (number == 33) {
+            result = "受益人电信诈骗核验失败";
+        } else if (number == 34) {
+            result = "国际负面清单";
+        } else if (number == 35) {
+            result = "控制人公安联网核查失败";
+        } else if (number == 36) {
+            result = "控制人反洗钱特殊名单未通过";
+        } else if (number == 37) {
+            result = "控制人反洗钱风险等级较高";
+        } else if (number == 38) {
+            result = "控制人电信诈骗核验失败";
+        } else if (number == 39) {
+            result = "股东公安联网核查失败(股东为个人时)";
+        } else if (number == 40) {
+            result = "股东反洗钱特殊名单未通过";
+        } else if (number == 41) {
+            result = "股东反洗钱风险等级较高";
+        } else if (number == 42) {
+            result = "股东电信诈骗核验失败";
+        } else if (number == 43) {
+            result = "股东工商校验未通过(股东为公司时)";
+        } else if (number == 44) {
+            result = "企业会员法人业务授权docid错误";
+        } else if (number == 45) {
+            result = "授权代理人个保授权docid错误";
+        } else if (number == 46) {
+            result = "法人/负责人个人信息使用授权docid错误";
+        } else if (number == 47) {
+            result = "个人业务授权docid错误";
+        } else if (number == 48) {
+            result = "个人个保授权docid错误)";
+        } else if (number == 49) {
+            result = "法人电信诈骗黑名单校验未通过";
+        } else if (number == 50) {
+            result = "负责人电信诈骗黑名单校验未通";
+        } else if (number == 51) {
+            result = "授权代理人电信诈骗黑名单校验未通过";
+        } else if (number == 52) {
+            result = "授权代理人业务授权docid错误";
+        }
+        return result;
+    }
+
     private Long addHistory(BocomBasicInfo bocomBasicInfo) {
         //主表信息
         BocomBasicInfoHistory bocomBasicInfoHistory = BeanUtilsProxy.copyProperties(bocomBasicInfo, BocomBasicInfoHistory.class);

+ 21 - 6
src/main/java/com/inkasso/factoring/bocom/register/web/BocomBasicInfoController.java

@@ -9,8 +9,6 @@ import com.inkasso.factoring.common.entity.ResponseJson;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -31,45 +29,62 @@ public class BocomBasicInfoController {
 
     /**
      * 获取企业人员信息
+     *
      * @param keyword
      * @return
      */
     @RequestMapping("getBusinessByKeyWord")
-    public ResponseJson<EnterpriseDetailVo> getBasicDetailsByName(@RequestParam String keyword){
+    public ResponseJson<EnterpriseDetailVo> getBasicDetailsByName(@RequestParam String keyword) {
         EnterpriseDetailVo enterpriseDetailVo = bocomBasicInfoService.getBasicDetailsByName(keyword);
         return new ResponseJson(enterpriseDetailVo);
     }
 
     /**
      * 暂存 提交
+     *
      * @param bocomBasicInfo
      * @return
      */
     @RequestMapping("add")
-    public ResponseJson addInfo(@RequestBody BocomBasicInfo bocomBasicInfo){
+    public ResponseJson addInfo(@RequestBody BocomBasicInfo bocomBasicInfo) {
         bocomBasicInfoService.add(bocomBasicInfo);
         return new ResponseJson();
     }
 
     /**
      * 获取详情
+     *
      * @param id
      * @return
      */
     @RequestMapping("getDetail")
-    public ResponseJson<BocomBasicInfo> getDetail(@RequestParam Long id){
+    public ResponseJson<BocomBasicInfo> getDetail(@RequestParam Long id) {
         BocomBasicInfo bocomBasicInfo = bocomBasicInfoService.getDetail(id);
         return new ResponseJson(bocomBasicInfo);
     }
 
     /**
      * 全部列表
+     *
      * @param bocomSearchVo
      * @return
      */
     @RequestMapping("findBySearch")
-    public ResponseJson<List<BocomBasicInfo>> findBySearch(@RequestBody BocomSearchVo bocomSearchVo){
+    public ResponseJson<List<BocomBasicInfo>> findBySearch(@RequestBody BocomSearchVo bocomSearchVo) {
         List<BocomBasicInfo> bocomBasicInfos = bocomBasicInfoService.findBySearch(bocomSearchVo);
         return new ResponseJson(bocomBasicInfos);
     }
+
+    /**
+     * 查询原因
+     *
+     * @param id
+     * @return
+     */
+    @RequestMapping("findReason")
+    public ResponseJson<List<String>> findReason(Long id) {
+        List<String> reason = bocomBasicInfoService.getReason(id);
+        return new ResponseJson(reason);
+    }
+
 }

+ 50 - 9
src/main/java/com/inkasso/factoring/bocom/vipaccount/entity/BocomVipAccountBasicInfo.java

@@ -48,17 +48,23 @@ public class BocomVipAccountBasicInfo extends BaseEntity {
     private String accountAlias;
 
     /**
-     * 账户状态 1-生效 3-失效
+     * 账户状态 1-生效 3-失效(交行)
      */
     @TableField("account_status")
     private Integer accountStatus;
 
     /**
-     * 授权状态 0-待用户授权 1-银行审核中 2-授权失败(用户拒绝)3-授权失败(银行拒绝)4-授权成功
+     * 授权代理人授权状态 0-待用户授权 1-银行审核中 2-授权失败(用户拒绝)3-授权失败(银行拒绝)4-授权成功
      */
     @TableField("authorization_status")
     private Integer authorizationStatus;
 
+    /**
+     * 法人授权状态 0-待用户授权 1-银行审核中 2-授权失败(用户拒绝)3-授权失败(银行拒绝)4-授权成功
+     */
+    @TableField("legal_authorization_status")
+    private Integer legalAuthorizationStatus;
+
     /**
      * 渠道
      */
@@ -107,6 +113,11 @@ public class BocomVipAccountBasicInfo extends BaseEntity {
     @TableField("currency")
     private String currency;
 
+    /**
+     * 通知推送对象  1-法人 2-授权代理人 3-个人
+     */
+    @TableField("notice_object")
+    private String noticeObject;
 
     /**
      * 授权二维码(base64)
@@ -130,7 +141,7 @@ public class BocomVipAccountBasicInfo extends BaseEntity {
      * 登记簿状态 1--可收可付2-销户
      */
     @TableField("chdbok_sts")
-    private String chdbokSts;
+    private Integer chdbokSts;
 
     /**
      * 付款方账户信息
@@ -207,6 +218,12 @@ public class BocomVipAccountBasicInfo extends BaseEntity {
     @TableField(exist = false)
     private String authenticator;
 
+    /**
+     * 账户状态(真实)
+     */
+    @TableField(exist = false)
+    private String accountStatusReal;
+
     public List<BocomVipSilentAccountInfo> getSilentAccountInfoList() {
         return silentAccountInfoList;
     }
@@ -439,20 +456,44 @@ public class BocomVipAccountBasicInfo extends BaseEntity {
         this.plfmSerNo = plfmSerNo;
     }
 
-    public String getChdbokSts() {
+    public String getAuthenticator() {
+        return authenticator;
+    }
+
+    public void setAuthenticator(String authenticator) {
+        this.authenticator = authenticator;
+    }
+
+    public Integer getLegalAuthorizationStatus() {
+        return legalAuthorizationStatus;
+    }
+
+    public void setLegalAuthorizationStatus(Integer legalAuthorizationStatus) {
+        this.legalAuthorizationStatus = legalAuthorizationStatus;
+    }
+
+    public String getAccountStatusReal() {
+        return accountStatusReal;
+    }
+
+    public void setAccountStatusReal(String accountStatusReal) {
+        this.accountStatusReal = accountStatusReal;
+    }
+
+    public Integer getChdbokSts() {
         return chdbokSts;
     }
 
-    public void setChdbokSts(String chdbokSts) {
+    public void setChdbokSts(Integer chdbokSts) {
         this.chdbokSts = chdbokSts;
     }
 
-    public String getAuthenticator() {
-        return authenticator;
+    public String getNoticeObject() {
+        return noticeObject;
     }
 
-    public void setAuthenticator(String authenticator) {
-        this.authenticator = authenticator;
+    public void setNoticeObject(String noticeObject) {
+        this.noticeObject = noticeObject;
     }
 
     @Override

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

@@ -28,7 +28,7 @@ public class BocomVipBindAccountInfo extends BaseEntity {
      * 是否为交通银行 0-否 1-是
      */
     @TableField("is_bank_of_communications")
-    private Boolean isBankOfCommunications;
+    private Integer isBankOfCommunications;
 
     /**
      * 开户银行
@@ -122,11 +122,11 @@ public class BocomVipBindAccountInfo extends BaseEntity {
         this.bocomVipAccountBasicInfoId = bocomVipAccountBasicInfoId;
     }
 
-    public Boolean getBankOfCommunications() {
+    public Integer IsBankOfCommunications() {
         return isBankOfCommunications;
     }
 
-    public void setBankOfCommunications(Boolean isBankOfCommunications) {
+    public void IsBankOfCommunications(Integer isBankOfCommunications) {
         this.isBankOfCommunications = isBankOfCommunications;
     }
 

+ 13 - 0
src/main/java/com/inkasso/factoring/bocom/vipaccount/entity/vo/BocomVipAccountListVo.java

@@ -37,6 +37,11 @@ public class BocomVipAccountListVo {
      */
     private String authenticator;
 
+    /**
+     * 能否新增会员登记簿 1 是 0 否
+     */
+    private Integer addVipAccount;
+
     /**
      * 会员登记簿信息
      */
@@ -89,4 +94,12 @@ public class BocomVipAccountListVo {
     public void setAuthenticator(String authenticator) {
         this.authenticator = authenticator;
     }
+
+    public Integer getAddVipAccount() {
+        return addVipAccount;
+    }
+
+    public void setAddVipAccount(Integer addVipAccount) {
+        this.addVipAccount = addVipAccount;
+    }
 }

+ 110 - 30
src/main/java/com/inkasso/factoring/bocom/vipaccount/service/impl/BocomVipAccountBasicInfoServiceImpl.java

@@ -6,10 +6,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.inkasso.adapter.exception.BusinessException;
 import com.inkasso.adapter.util.CodeUtil;
+import com.inkasso.adapter.util.StringUtil;
 import com.inkasso.adapter.web.LoginUserHolder;
+import com.inkasso.factoring.bocom.register.entity.BocomAuthorizedAgent;
 import com.inkasso.factoring.bocom.register.entity.BocomBasicInfo;
 import com.inkasso.factoring.bocom.register.entity.BocomLegalPersonInfo;
 import com.inkasso.factoring.bocom.register.entity.BocomShareholderActualController;
+import com.inkasso.factoring.bocom.register.service.IBocomAuthorizedAgentService;
 import com.inkasso.factoring.bocom.register.service.IBocomBasicInfoService;
 import com.inkasso.factoring.bocom.register.service.IBocomLegalPersonInfoService;
 import com.inkasso.factoring.bocom.register.service.IBocomShareholderActualControllerService;
@@ -79,6 +82,8 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
     private IBocomLegalPersonInfoService bocomLegalPersonInfoService;
     @Autowired
     private IBocomShareholderActualControllerService bocomShareholderActualControllerService;
+    @Autowired
+    private IBocomAuthorizedAgentService bocomAuthorizedAgentService;
 
     @Override
     public List<BocomVipAccountListVo> findList() {
@@ -103,37 +108,46 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
                     vo.setCustomerStatus(customerStatusDic.getName());
                 }
 
-                if (bocomBasicInfo.getCustomerType() != null) {
-                    if (bocomBasicInfo.getCustomerType() == 0) {
-                        BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
-                                .eq(BocomLegalPersonInfo::getBocomBasicInfoId, bocomBasicInfo.getId())
-                                .one();
-                        if (legalPersonInfo != null) {
-                            vo.setAuthenticator(legalPersonInfo.getName());
-                        }
-                    }
-                    if (bocomBasicInfo.getCustomerType() == 1) {
-                        List<BocomShareholderActualController> shareholderActualControllerList = bocomShareholderActualControllerService.lambdaQuery()
-                                .eq(BocomShareholderActualController::getBocomBasicInfoId, bocomBasicInfo.getId())
-                                .orderByDesc(BocomShareholderActualController::getGmtCreate)
-                                .list();
-                        if (CollectionUtil.isNotEmpty(shareholderActualControllerList)) {
-                            BocomShareholderActualController bocomShareholderActualController = shareholderActualControllerList.get(0);
-                            if (bocomShareholderActualController != null) {
-                                vo.setAuthenticator(bocomShareholderActualController.getName());
-                            }
-                        }
-                    }
-                    if (bocomBasicInfo.getCustomerType() == 2) {
-                        vo.setAuthenticator(bocomBasicInfo.getCustomerName());
-                    }
-                }
-
                 List<BocomVipAccountBasicInfo> vipList = lambdaQuery()
                         .eq(BocomVipAccountBasicInfo::getBocomBasicInfoId, bocomBasicInfo.getId())
                         .list();
                 if (CollectionUtils.isNotEmpty(vipList)) {
                     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);
+                                }
+                            }
+                        }
+
                         //标识是否需要重新创建会员登记簿
                         Date afterFiveDaysDate = DateUtil.addDays(vipAccountBasicInfo.getGmtModified(), 5);
                         if (new Date().before(afterFiveDaysDate)) {
@@ -163,10 +177,20 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
                     vo.setVipAccountBasicInfoList(vipList);
                 }
 
-                if (CollectionUtil.isNotEmpty(vipList) || (customerStatusDic != null && "bocomCustomerStatus_success".equals(customerStatusDic.getCode()))) {
-                    //生效:展示;
-                    //待生效:不展示-整个卡片都不展示;
-                    //终止:如果存在登记簿,则展示;如果不存在,则该卡片整个不展示
+                if ("生效".equals(bocomBasicInfo.getCustomerRealStatus())) {
+                    //客户真实状态为生效 且 该客户名下不存在待生效的登记簿 或者 该客户下账户状态为 生效的 会员登记簿少于五个时 展示新增账户按钮
+                    Integer addVipAccount = 1;
+                    if (CollectionUtil.isNotEmpty(vipList)){
+                        long count = vipList.stream().filter(c -> "待生效".equals(c.getAccountStatusReal())).count();
+                        if (count > 0){
+                            addVipAccount = 0;
+                        }
+                        long effectCount = vipList.stream().filter(c -> c.getAccountStatus() == 1).count();
+                        if (effectCount > 4){
+                            addVipAccount = 0;
+                        }
+                    }
+                    vo.setAddVipAccount(addVipAccount);
                     voList.add(vo);
                 }
             });
@@ -407,6 +431,9 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
             } else {
                 bindAccountInfo.setOprTp("1");
             }
+            if (bindAccountInfo.IsBankOfCommunications() == 1) {
+                bindAccountInfo.setBankName("中国交通银行");
+            }
             ResponseJson responseJson;
             try {
                 responseJson = restTemplate.postForObject(bocomVipBindDoUpdateUrl, bindAccountInfo, ResponseJson.class);
@@ -459,5 +486,58 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
 
     }
 
+    /**
+     * 填充账户真实状态
+     *
+     * @param vipAccountBasicInfo
+     */
+    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.setAccountStatusReal(realStatus);
+        }
+    }
+
 
 }

+ 1 - 1
src/main/resources/data/bocom/liutao.sql

@@ -22,7 +22,7 @@ CREATE TABLE `bocom_basic_info` (
                                   `phone_number` varchar(20) DEFAULT null COMMENT '手机号',
                                   `customer_source` varchar(20) DEFAULT null COMMENT '客户来源',
                                   `verification_status` varchar(200) DEFAULT null COMMENT '客户核验状态',
-                                  `user_atuh_sts` varchar(200) DEFAULT null COMMENT '用户授权状态 0-待用户授权 1-银行审核中 2-授权失败(用户拒绝)3-授权失败(银行拒绝)4-授权成',
+                                  `user_atuh_sts` varchar(200) DEFAULT null COMMENT '用户授权状态 0-待用户授权 1-银行审核中 2-授权失败(用户拒绝)3-授权失败(银行拒绝)4-授权成',
                                   `vrfy_fail_sts_word` varchar(200) DEFAULT null COMMENT '流程断点状态核验失败时,显示具体核验结果',
                                   `push_person` varchar(200) DEFAULT null COMMENT '通知推送对象',