|
|
@@ -17,6 +17,7 @@ import com.tianhu.common.core.utils.poi.WordUtil;
|
|
|
import com.tianhu.common.core.web.controller.BaseController;
|
|
|
import com.tianhu.common.core.web.domain.AjaxResult;
|
|
|
import com.tianhu.common.security.service.TokenService;
|
|
|
+import com.tianhu.system.api.RemoteConfigService;
|
|
|
import com.tianhu.system.api.RemoteFileService;
|
|
|
import com.tianhu.system.api.domain.SysUser;
|
|
|
import com.tianhu.system.api.model.LoginUser;
|
|
|
@@ -26,8 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.mock.web.MockMultipartFile;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
-import sun.misc.BASE64Encoder;
|
|
|
-
|
|
|
import java.io.*;
|
|
|
import java.net.HttpURLConnection;
|
|
|
import java.net.URL;
|
|
|
@@ -83,6 +82,9 @@ public class OwnMessageController extends BaseController {
|
|
|
//审批服务类
|
|
|
@Autowired
|
|
|
private ApprovalService approvalService;
|
|
|
+ //系统参数服务类
|
|
|
+ @Autowired
|
|
|
+ private RemoteConfigService configService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -124,8 +126,10 @@ public class OwnMessageController extends BaseController {
|
|
|
if(CommonUtil.isEmpty(iphone)){
|
|
|
throw new Exception("获取经办人手机号失败");
|
|
|
}
|
|
|
+ //机构编号
|
|
|
+ String institutionId = configService.selectConfigByKey("cfca_institution_id").getMsg();
|
|
|
//发送短信验证码
|
|
|
- JSONObject jsonObject = CfcaUtil.sendSmsCode(false,"100804","",iphone,"");
|
|
|
+ JSONObject jsonObject = CfcaUtil.sendSmsCode(false,institutionId,"",iphone,"");
|
|
|
//获取结果
|
|
|
String result = jsonObject.getString("Status");
|
|
|
//手机号掩码
|
|
|
@@ -184,7 +188,9 @@ public class OwnMessageController extends BaseController {
|
|
|
if(CommonUtil.isEmpty(iphone)){
|
|
|
throw new Exception("获取经办人手机号失败");
|
|
|
}
|
|
|
- JSONObject jsonObject = CfcaUtil.checkSmsCode(false,"100804",iphone,validCode,"");
|
|
|
+ //机构编号
|
|
|
+ String institutionId = configService.selectConfigByKey("cfca_institution_id").getMsg();
|
|
|
+ JSONObject jsonObject = CfcaUtil.checkSmsCode(false,institutionId,iphone,validCode,"");
|
|
|
//获取结果
|
|
|
String verification = jsonObject.getString("Verification");
|
|
|
Map<String,String> map = new HashMap<>();
|
|
|
@@ -389,7 +395,6 @@ public class OwnMessageController extends BaseController {
|
|
|
}
|
|
|
|
|
|
for(int i = 0 ; i < fileInfList.size(); i++){
|
|
|
- //TODO 文件路径需要修改
|
|
|
//判断是否为已盖章文件
|
|
|
LambdaQueryWrapper<ZcFinanceFileRel> fileRelLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
fileRelLambdaQueryWrapper.eq(ZcFinanceFileRel::getZffrFinanceId, zfiId);
|
|
|
@@ -414,7 +419,8 @@ public class OwnMessageController extends BaseController {
|
|
|
if (financeFileList.size() == 0) {
|
|
|
/**-------- word 变量替换 开始--------**/
|
|
|
//替换word文档中的变量
|
|
|
- String directory = FileConstants.REMOTE_FILE_PATH;
|
|
|
+ //String directory = FileConstants.REMOTE_FILE_PATH;
|
|
|
+ String directory = configService.selectConfigByKey("credit_file_path").getMsg();
|
|
|
//文件下载
|
|
|
filePath = downloadFile(fileInfList.get(i).getPfiFileUrl(),fileInfList.get(i).getPfiFileName());
|
|
|
//往word中填充数据
|
|
|
@@ -523,7 +529,8 @@ public class OwnMessageController extends BaseController {
|
|
|
throw new Exception(errorMessage);
|
|
|
}
|
|
|
String contractNo = CommonUtil.objToString(((JSONObject)(jsonObject.get("contract"))).get("contractNo"));
|
|
|
- String path = "D:/zhuomian/cfca/";
|
|
|
+ //String path = "D:/zhuomian/cfca/";
|
|
|
+ String path = configService.selectConfigByKey("cfca_file_path").getMsg();
|
|
|
//下载文件
|
|
|
AxqCommonUtil.downloadFile(contractNo,path);
|
|
|
/**-------- CFCA盖章文件下载 结束--------**/
|
|
|
@@ -675,7 +682,6 @@ public class OwnMessageController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/faceAuth")
|
|
|
public AjaxResult faceAuth() throws Exception {
|
|
|
- //TODO 需要配置系统参数
|
|
|
//获取当前用户
|
|
|
LoginUser userInfo = tokenService.getLoginUser();
|
|
|
SysUser use = userInfo.getSysUser();
|
|
|
@@ -711,10 +717,13 @@ public class OwnMessageController extends BaseController {
|
|
|
//String name = userList.get(0).getNickName();
|
|
|
String name = "小兰";
|
|
|
//前后台通知
|
|
|
- String backFrontUrl = "https://www.baidu.com";
|
|
|
+ //String backFrontUrl = "https://www.baidu.com";
|
|
|
+ String backFrontUrl = configService.selectConfigByKey("face_back_front_url").getMsg();
|
|
|
//对公
|
|
|
- String publicName = "http://zcyl.keao.tech/#/";
|
|
|
- Map<String,String> m = faceAuthService.faceAuth(false,"100804",name,"0",idCard,backFrontUrl,backFrontUrl,"",publicName);
|
|
|
+ String publicName = configService.selectConfigByKey("face_public_name").getMsg();
|
|
|
+ //机构编号
|
|
|
+ String institutionId = configService.selectConfigByKey("cfca_institution_id").getMsg();
|
|
|
+ Map<String,String> m = faceAuthService.faceAuth(false,institutionId,name,"0",idCard,backFrontUrl,backFrontUrl,"",publicName);
|
|
|
String fileUrl= m.get("fileUrl");
|
|
|
//源流水号
|
|
|
String originalTxSN = m.get("originalTxSN");
|
|
|
@@ -733,8 +742,10 @@ public class OwnMessageController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/checkFaceAuth")
|
|
|
public AjaxResult checkFaceAuth (@RequestParam(required=false) String originalTxSN) throws Exception {
|
|
|
+ //机构编号
|
|
|
+ String institutionId = configService.selectConfigByKey("cfca_institution_id").getMsg();
|
|
|
//人脸识别结果查证
|
|
|
- JSONObject jsonObject = CfcaUtil.checkFaceAuth(false,"100804",originalTxSN,"0","");
|
|
|
+ JSONObject jsonObject = CfcaUtil.checkFaceAuth(false,institutionId,originalTxSN,"0","");
|
|
|
String Verification = "";
|
|
|
String Message = "";
|
|
|
try {
|