cuixq 3 лет назад
Родитель
Сommit
5027d7f9d4

+ 62 - 62
tianhu-system/src/main/java/com/tianhu/system/companyAuth/controller/OwnAuthController.java

@@ -747,38 +747,38 @@ public class OwnAuthController extends BaseController {
         String tittle = "【企业认证】"+scyName+"CFCA工商四要素认证失败,请联系用户"+phoneNumber+"线下核实企业信息;";
        ownNoticeService.sendNotice(scyId,scyId,tittle,"00",null,"09","0","1",null, null, null);
 
-//        // 审批增加分组
-//        Map<String, Object> flowableRes = flowableService.addFlowableGroup(scyId, company.getScyName());
-//        if (!"200".equals(flowableRes.get("code"))) {
-//            throw new Exception("审批数据新增失败!");
-//        }
-//        flowableRes = flowableService.addFlowableGroup(deptList.get(0).getAlternateNumber(), dept.getDeptName());
-//        if (!"200".equals(flowableRes.get("code"))) {
-//            throw new Exception("审批数据新增失败!");
-//        }
-//        // 经办人与登录用户是同一手机号
-//        if (use.getUserName().equals(phoneNumber)) {
-//            flowableRes = flowableService.addFlowableUser(String.valueOf(use.getUserId()), use.getNickName(), scyId);
-//            if (!"200".equals(flowableRes.get("code"))) {
-//                throw new Exception("审批数据新增失败!");
-//            }
-//        } else {
-//            flowableRes = flowableService.addFlowableUser(String.valueOf(use.getUserId()), use.getNickName(), scyId);
-//            if (!"200".equals(flowableRes.get("code"))) {
-//                throw new Exception("审批数据新增失败!");
-//            }
-//            flowableRes = flowableService.addFlowableUser(String.valueOf(handlerUser.getUserId()), handlerUser.getNickName(), scyId);
-//            if (!"200".equals(flowableRes.get("code"))) {
-//                throw new Exception("审批数据新增失败!");
-//            }
-//        }
-//        // 业务人员不存在
-//        if (operatorUser != null) {
-//            flowableRes = flowableService.addFlowableUser(String.valueOf(operatorUser.getUserId()), operatorUser.getNickName(), scyId);
-//            if (!"200".equals(flowableRes.get("code"))) {
-//                throw new Exception("审批数据新增失败!");
-//            }
-//        }
+        // 审批增加分组
+        Map<String, Object> flowableRes = flowableService.addFlowableGroup(scyId, company.getScyName());
+        if (!"200".equals(flowableRes.get("code"))) {
+            throw new Exception("审批数据新增失败!");
+        }
+        flowableRes = flowableService.addFlowableGroup(deptList.get(0).getAlternateNumber(), dept.getDeptName());
+        if (!"200".equals(flowableRes.get("code"))) {
+            throw new Exception("审批数据新增失败!");
+        }
+        // 经办人与登录用户是同一手机号
+        if (use.getUserName().equals(phoneNumber)) {
+            flowableRes = flowableService.addFlowableUser(String.valueOf(use.getUserId()), use.getNickName(), scyId);
+            if (!"200".equals(flowableRes.get("code"))) {
+                throw new Exception("审批数据新增失败!");
+            }
+        } else {
+            flowableRes = flowableService.addFlowableUser(String.valueOf(use.getUserId()), use.getNickName(), scyId);
+            if (!"200".equals(flowableRes.get("code"))) {
+                throw new Exception("审批数据新增失败!");
+            }
+            flowableRes = flowableService.addFlowableUser(String.valueOf(handlerUser.getUserId()), handlerUser.getNickName(), scyId);
+            if (!"200".equals(flowableRes.get("code"))) {
+                throw new Exception("审批数据新增失败!");
+            }
+        }
+        // 业务人员不存在
+        if (operatorUser != null) {
+            flowableRes = flowableService.addFlowableUser(String.valueOf(operatorUser.getUserId()), operatorUser.getNickName(), scyId);
+            if (!"200".equals(flowableRes.get("code"))) {
+                throw new Exception("审批数据新增失败!");
+            }
+        }
 
         return R.ok(company);
     }
@@ -1136,36 +1136,36 @@ public class OwnAuthController extends BaseController {
         sysCompany.setScyId(scyId);
         //正常状态
         sysCompany.setScyStatus("00");
-//        JSONObject companyAccount =null;
-//        //jks路径
-//        String jksPath = configService.selectConfigByKey("jks_path");
-//        //密码
-//        String keyStorePassword = configService.selectConfigByKey("cfca_key_store_password");
-//        //渠道
-//        String channel = configService.selectConfigByKey("cfca_channel");
-//        //platId
-//        String platId = configService.selectConfigByKey("cfca_platId");
-//        if(CommonUtil.isNotEmpty(handler)) {
-//            try {
-//                companyAccount = AxqCommonUtil.companyAccount(scyName, IDENTTYPECODE, scySocialCode, phoneNumber, scyPhone, AUTHENTICATIONMODE, handler, TYPECODE, handlerCard,new HttpConnector(jksPath,keyStorePassword,channel,platId));
-//                }catch (Exception e) {
-//                throw new Exception("开户失败!");
-//                }
-//        }else{
-//            try {
-//                companyAccount = AxqCommonUtil.companyAccount(scyName, IDENTTYPECODE, scySocialCode, phoneNumber, scyPhone, AUTHENTICATIONMODE, scyLegal, TYPECODE, scyLegalId,new HttpConnector(jksPath,keyStorePassword,channel,platId));
-//            }catch (Exception e) {
-//                throw new Exception("开户失败!");
-//            }
-//            }
-//        System.out.print("开户结果==========>" + companyAccount);
-//        //返回cfca用户id
-//        if(companyAccount.getJSONObject("enterprise")!=null||CommonUtil.isNotEmpty(companyAccount.getJSONObject("enterprise").getString("userId"))){
-//            String userId = companyAccount.getJSONObject("enterprise").getString("userId");
-//            sysCompany.setScyCfcaUserId(userId);
-//        }else{
-//            throw new Exception("开户失败!");
-//        }
+        JSONObject companyAccount =null;
+        //jks路径
+        String jksPath = configService.selectConfigByKey("jks_path");
+        //密码
+        String keyStorePassword = configService.selectConfigByKey("cfca_key_store_password");
+        //渠道
+        String channel = configService.selectConfigByKey("cfca_channel");
+        //platId
+        String platId = configService.selectConfigByKey("cfca_platId");
+        if(CommonUtil.isNotEmpty(handler)) {
+            try {
+                companyAccount = AxqCommonUtil.companyAccount(scyName, IDENTTYPECODE, scySocialCode, phoneNumber, scyPhone, AUTHENTICATIONMODE, handler, TYPECODE, handlerCard,new HttpConnector(jksPath,keyStorePassword,channel,platId));
+                }catch (Exception e) {
+                throw new Exception("开户失败!");
+                }
+        }else{
+            try {
+                companyAccount = AxqCommonUtil.companyAccount(scyName, IDENTTYPECODE, scySocialCode, phoneNumber, scyPhone, AUTHENTICATIONMODE, scyLegal, TYPECODE, scyLegalId,new HttpConnector(jksPath,keyStorePassword,channel,platId));
+            }catch (Exception e) {
+                throw new Exception("开户失败!");
+            }
+            }
+        System.out.print("开户结果==========>" + companyAccount);
+        //返回cfca用户id
+        if(companyAccount.getJSONObject("enterprise")!=null||CommonUtil.isNotEmpty(companyAccount.getJSONObject("enterprise").getString("userId"))){
+            String userId = companyAccount.getJSONObject("enterprise").getString("userId");
+            sysCompany.setScyCfcaUserId(userId);
+        }else{
+            throw new Exception("开户失败!");
+        }
         sysCompanyService.updateSysCompany(sysCompany);
         //查询企业
         LambdaQueryWrapper<SysCompany> company = new LambdaQueryWrapper<>();

+ 0 - 6
tianhu-system/src/main/java/com/tianhu/system/companyAuth/service/impl/OwnAuthServiceImpl.java

@@ -1,8 +1,5 @@
 package com.tianhu.system.companyAuth.service.impl;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;
 import com.tianhu.common.core.ocr.OcrUtil;
 import com.tianhu.common.core.utils.CommonUtil;
 import com.tianhu.common.redis.service.RedisService;
@@ -10,15 +7,12 @@ import com.tianhu.system.companyAuth.mapper.OwnAuthMapper;
 import com.tianhu.system.companyAuth.service.IOwnAuthService;
 import com.tianhu.system.domain.SysCompany;
 import lombok.SneakyThrows;
-import lombok.SneakyThrows;
 import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.text.SimpleDateFormat;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;