Commit a6d91800 authored by 5359's avatar 5359

正式环境参数修改

parent 18c9ffa8
......@@ -12,12 +12,16 @@ import com.hand.hap.core.IRequest;
import com.hand.hap.system.controllers.BaseController;
import hls.support.core.wechat.formbean.AttachmentInfo;
import com.hand.hap.system.dto.ResponseData;
import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.*;
/**
......@@ -321,6 +325,39 @@ public class SignHclcController extends BaseController {
}
/**
* 获取人身核验地址
*
* @param request
* @param dto 获取人身核验地址
* @return Map
*/
@ResponseBody
@RequestMapping("/auth/api/license/ocr")
public JSONObject getOcrLicense(HttpServletRequest request,
@RequestBody SignUserInfoHclc dto) {
String img = "";
String realPath = "d:\\1610543886923.jpg";
File file = new File(realPath);
FileInputStream inputFile;
byte[] buffer = null;
try {
inputFile = new FileInputStream(file);
buffer = new byte[(int) file.length()];
inputFile.read(buffer);
inputFile.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
img= Base64.encodeBase64String(buffer);
return signHclcService.ocrLicense(createRequestContext(request), img);
}
/**
* 经办人授权/取消授权
*
......@@ -530,6 +567,21 @@ public class SignHclcController extends BaseController {
}
/**
* 文件直传
*
* @param request
* @param dto 文件直传
* @return Map
*/
@ResponseBody
@RequestMapping("/sign/files/download")
public Map<String, Object> signFileDownload(HttpServletRequest request,
@RequestBody AttachmentInfo dto) {
return signHclcService.signFileDownload(createRequestContext(request), dto);
}
/**
* 创建签署流程
*
......@@ -562,6 +614,20 @@ public class SignHclcController extends BaseController {
return json;
}
/**
* 创建印章
*
* @param request
* @param params 创建签署流程
* @return Map
*/
@ResponseBody
@RequestMapping(value = "/sign/flows/cancel", method = RequestMethod.POST)
public JSONObject cancelSignFlows(HttpServletRequest request,
@RequestBody(required = true) JSONObject params) {
return signHclcService.cancelSignFlows(createRequestContext(request), params);
}
// /**
// * 创建签署流程
// *
......
......@@ -51,4 +51,17 @@ public class SignHclcListenController extends BaseController {
responseData.setMessage("接收成功!");
return responseData;
}
@ResponseBody
@RequestMapping(value = "/api/public/user", method = RequestMethod.POST)
public JSONObject posttest(HttpServletRequest request,
@RequestBody(required = false) JSONObject params) {
JSONObject responseData = new JSONObject();
responseData.put("objectVersionNumber",1);
responseData.put("_token","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9/eyJhdWQiOlsiYXBpLXJlc291cmNlIl0sInVzZXJfbmFt==");
responseData.put("id",1);
responseData.put("code","lishuangyi");
responseData.put("name","黎双意");
return responseData;
}
}
......@@ -33,8 +33,12 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
Map<String, Object> signFileUpload(IRequest requestContext, AttachmentInfo dto);
Map<String, Object> signFileDownload(IRequest requestContext, AttachmentInfo dto);
JSONObject createSignFlows(IRequest requestContext, JSONObject params);
JSONObject cancelSignFlows(IRequest requestContext, JSONObject params);
String createTemplateSeals(String accountId, String openId);
// JSONObject cancelSignFlows(IRequest requestContext, JSONObject params);
......@@ -42,4 +46,6 @@ public interface ISignInfoHclcService extends IBaseService<SignUserInfoHclc>, Pr
void postSignFlowsResult(IRequest iRequest, JSONObject params);
JSONObject sendWxTemplateMsg(JSONObject json);
JSONObject ocrLicense(IRequest iRequest, String img);
}
......@@ -116,11 +116,19 @@ public class SignHclcUtils {
inStream.close();
result = strber.toString();
if (!urls.contains("v2/identity/auth/api/ocr/license")) {
if (httpResponse.getStatusLine().getStatusCode() == 200) {
logger.info("请求服务器成功, urls ={},params ={} ,contentType ={} ,result ={}", urls, params.toString(), contentType, result);
} else {
logger.info("请求服务端失败, urls ={},params ={} ,contentType ={} ,result ={}", urls, params.toString(), contentType, result);
}
}else{
if (httpResponse.getStatusLine().getStatusCode() == 200) {
logger.info("请求服务器成功, urls ={},contentType ={} ,result ={}", urls, contentType, result);
} else {
logger.info("请求服务端失败, urls ={},contentType ={} ,result ={}", urls, contentType, result);
}
}
return result;
} catch (Exception var12) {
......
......@@ -82,6 +82,9 @@
<logger name="com.hand.app.esignHclc.utils.SignHclcUtils" level="INFO" additivity="false">
<appender-ref ref="REQ"/>
</logger>
<logger name="com.hand.app.esignHclc.service.impl.SignInfoHclcServiceImpl" level="INFO" additivity="false">
<appender-ref ref="REQ"/>
</logger>
<logger name="com.timevale" level="INFO" additivity="false">
<appender-ref ref="STDOUT"/>
</logger>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment