Selaa lähdekoodia

资方特殊字符修改

cuixq 3 vuotta sitten
vanhempi
commit
1c8acb5904

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

@@ -760,40 +760,40 @@ 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);
     }
@@ -1151,36 +1151,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<>();