|
@@ -100,7 +100,7 @@ public class EsignController extends ApiBaseController {
|
|
/* 根据订单id关联查询企业代号*/
|
|
/* 根据订单id关联查询企业代号*/
|
|
String chainsCode = customersExtService.selectchainsCodeByOrderId(orderId);
|
|
String chainsCode = customersExtService.selectchainsCodeByOrderId(orderId);
|
|
/*首先根据订单id-orderId查询订单是否已被签署*/
|
|
/*首先根据订单id-orderId查询订单是否已被签署*/
|
|
- OrderFile orderFlag = orderFileService.selectOrderFileById(orderId);
|
|
|
|
|
|
+// OrderFile orderFlag = orderFileService.selectOrderFileById(orderId);
|
|
Map<String,Object> map = eSignService.upload(deliveryNumber,shipmentNumber,belongTo,sysUser.getSysUserExt().getOrgName());
|
|
Map<String,Object> map = eSignService.upload(deliveryNumber,shipmentNumber,belongTo,sysUser.getSysUserExt().getOrgName());
|
|
/*1、根据传入订单id,查询订单相关信息生成PDF,调用e签宝上传方法返回文件fileId*/
|
|
/*1、根据传入订单id,查询订单相关信息生成PDF,调用e签宝上传方法返回文件fileId*/
|
|
Object fileId = map.get("fileId");
|
|
Object fileId = map.get("fileId");
|
|
@@ -139,17 +139,19 @@ public class EsignController extends ApiBaseController {
|
|
@PostMapping("updateOrderFile")
|
|
@PostMapping("updateOrderFile")
|
|
public Object updateOrderFile() {
|
|
public Object updateOrderFile() {
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
- obj.checkParameterNotNull("flowId");
|
|
|
|
|
|
+ obj.checkParameterNotNull("flowId,signResult");
|
|
String flowId = obj.getString("flowId");
|
|
String flowId = obj.getString("flowId");
|
|
- String fileUrl = signService.processDocumentDownload(flowId);
|
|
|
|
-
|
|
|
|
- /*下载保存签署后的文件,返回文件存储地址*/
|
|
|
|
- OrderFile orderFlag = orderFileService.selectOrderFileByFlowId(flowId);
|
|
|
|
- fileDownloadUtil.downloadFile(Global.getPdfPath(), orderFlag.getOrderId() + "_签收订单.pdf", fileUrl);
|
|
|
|
- OrderFile orderFile = new OrderFile();
|
|
|
|
- orderFile.setFlowId(flowId);
|
|
|
|
- orderFile.setFileUrl(Constants.RESOURCE_PREFIX+"/"+"pdf/"+orderFlag.getOrderId() + "_签收订单.pdf");
|
|
|
|
- orderFileService.updateOrderFileByFlowId(orderFile);
|
|
|
|
|
|
+ String signResult = obj.getString("signResult");
|
|
|
|
+ if ("2".equals(signResult)) {
|
|
|
|
+ String fileUrl = signService.processDocumentDownload(flowId);
|
|
|
|
+ /*下载保存签署后的文件,返回文件存储地址*/
|
|
|
|
+ OrderFile orderFlag = orderFileService.selectOrderFileByFlowId(flowId);
|
|
|
|
+ fileDownloadUtil.downloadFile(Global.getPdfPath(), orderFlag.getOrderId() + "_签收订单.pdf", fileUrl);
|
|
|
|
+ OrderFile orderFile = new OrderFile();
|
|
|
|
+ orderFile.setFlowId(flowId);
|
|
|
|
+ orderFile.setFileUrl(Constants.RESOURCE_PREFIX+"/"+"pdf/"+orderFlag.getOrderId() + "_签收订单.pdf");
|
|
|
|
+ orderFileService.updateOrderFileByFlowId(orderFile);
|
|
|
|
+ }
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -225,6 +227,26 @@ public class EsignController extends ApiBaseController {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "E签宝企业认证", notes = "参数:{'userId':'XXXXXXX','redirectUrl':'xxxxx'}" +
|
|
|
|
+ "\n(userId:待认证e签宝用户id" +
|
|
|
|
+ "\n redirectUrl:企业认证成功跳转URl)")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "params", paramType = "body")
|
|
|
|
+ })
|
|
|
|
+ @PostMapping("organRealVerify1")
|
|
|
|
+ public Object organRealVerify1() {
|
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
|
+ obj.checkParameterNotNull("userId,redirectUrl");
|
|
|
|
+ String userId = obj.getString("userId");
|
|
|
|
+ String redirectUrl = obj.getString("redirectUrl");
|
|
|
|
+ SysUser sysUser = userService.selectUserById(Long.parseLong(userId));
|
|
|
|
+ String result="";
|
|
|
|
+ if (sysUser!=null){
|
|
|
|
+ result = organRealVerifyService.organRealVerify(sysUser.getAccountId(), "customersExt.getOrgId()",redirectUrl);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
/*调用修改数据库企业认证状态*/
|
|
/*调用修改数据库企业认证状态*/
|
|
@ApiOperation(value = "E签宝企业认证成功回调接口(修改认证状态)",
|
|
@ApiOperation(value = "E签宝企业认证成功回调接口(修改认证状态)",
|
|
notes = "参数:{" +
|
|
notes = "参数:{" +
|
|
@@ -263,7 +285,7 @@ public class EsignController extends ApiBaseController {
|
|
|
|
|
|
@ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
@ApiOperation(value = "E签宝个人注册返回认证接口",
|
|
notes = "参数:{" +
|
|
notes = "参数:{" +
|
|
- "userId:'123','userName':'真实姓名','redirectUrl':'跳转url(http://baidu.com)'}" +
|
|
|
|
|
|
+ "userId:'123','redirectUrl':'跳转url(http://baidu.com)'}" +
|
|
"错误:" +
|
|
"错误:" +
|
|
"301 用户已经注册且认证" +
|
|
"301 用户已经注册且认证" +
|
|
"500 注册失败" +
|
|
"500 注册失败" +
|
|
@@ -276,13 +298,12 @@ public class EsignController extends ApiBaseController {
|
|
public Object createPersonalAccount(){
|
|
public Object createPersonalAccount(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
//判断参数
|
|
//判断参数
|
|
- obj.checkParameterNotNull("userId,userName,idNumber,redirectUrl");
|
|
|
|
|
|
+ obj.checkParameterNotNull("userId,redirectUrl");
|
|
String userId = obj.getString("userId");
|
|
String userId = obj.getString("userId");
|
|
- String userName = obj.getString("userName");
|
|
|
|
String redirectUrl = obj.getString("redirectUrl");
|
|
String redirectUrl = obj.getString("redirectUrl");
|
|
//根据用户loginName查询用户信息
|
|
//根据用户loginName查询用户信息
|
|
SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
SysUser user = userService.selectUserById(Long.parseLong(userId));
|
|
- user.setUserName(userName);
|
|
|
|
|
|
+// user.setUserName(userName);
|
|
//判断是否注册
|
|
//判断是否注册
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
if (user.getAccountId()!=null&&user.getAccountId()!=""){//已经注册
|
|
//判断是否认证
|
|
//判断是否认证
|
|
@@ -321,9 +342,7 @@ public class EsignController extends ApiBaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "E签宝企业注册返回认证接口",
|
|
@ApiOperation(value = "E签宝企业注册返回认证接口",
|
|
notes = "参数:{" +
|
|
notes = "参数:{" +
|
|
- "userId:'123',customersName:'机构名称(XXX商贸公司)'," +
|
|
|
|
- "orgLegalIdNumber:'企业法定代表人证件号','orgLegalName':'企业法定代表人名称'" +
|
|
|
|
- ",'redirectUrl':'认证成功跳转url'}" +
|
|
|
|
|
|
+ "userId:'123','redirectUrl':'认证成功跳转url'}" +
|
|
"错误:" +
|
|
"错误:" +
|
|
"301 企业已经注册且认证" +
|
|
"301 企业已经注册且认证" +
|
|
"201 个人未注册" +
|
|
"201 个人未注册" +
|
|
@@ -336,11 +355,8 @@ public class EsignController extends ApiBaseController {
|
|
@PostMapping("/createThirdParty")
|
|
@PostMapping("/createThirdParty")
|
|
public Object createThirdParty(){
|
|
public Object createThirdParty(){
|
|
ParameterObject obj = getParameterObject();
|
|
ParameterObject obj = getParameterObject();
|
|
- obj.checkParameterNotNull("userId,customersName,orgLegalIdNumber,orgLegalName");
|
|
|
|
|
|
+ obj.checkParameterNotNull("userId,redirectUrl");
|
|
Long userId = obj.getLong("userId");
|
|
Long userId = obj.getLong("userId");
|
|
- String customersName = obj.getString("customersName");
|
|
|
|
- String orgLegalIdNumber = obj.getString("orgLegalIdNumber");
|
|
|
|
- String orgLegalName = obj.getString("orgLegalName");
|
|
|
|
String redirectUrl = obj.getString("redirectUrl");
|
|
String redirectUrl = obj.getString("redirectUrl");
|
|
SysUser user = userService.selectUserById(userId);
|
|
SysUser user = userService.selectUserById(userId);
|
|
// CustomersExt customersExt = obj.parseBean(CustomersExt.class);
|
|
// CustomersExt customersExt = obj.parseBean(CustomersExt.class);
|
|
@@ -353,9 +369,6 @@ public class EsignController extends ApiBaseController {
|
|
return AjaxResult.error(201,"个人未注册");
|
|
return AjaxResult.error(201,"个人未注册");
|
|
}
|
|
}
|
|
customersExt.setChainsCode(user.getSysUserExt().getOrgCode());
|
|
customersExt.setChainsCode(user.getSysUserExt().getOrgCode());
|
|
- customersExt.setCustomersName(customersName);
|
|
|
|
- customersExt.setOrgLegalidNumber(orgLegalIdNumber);
|
|
|
|
- customersExt.setOrgLegalName(orgLegalName);
|
|
|
|
}
|
|
}
|
|
//判断是否注册
|
|
//判断是否注册
|
|
if (customersExt.getOrgId()!=null&&customersExt.getOrgId()!=""){//已经注册
|
|
if (customersExt.getOrgId()!=null&&customersExt.getOrgId()!=""){//已经注册
|