Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
f495dd47
Commit
f495dd47
authored
May 23, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子合同报错信息优化
parent
8ce8533c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
15 deletions
+27
-15
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+13
-6
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/helper/SignHelper.java
+13
-8
src/main/java/cn/timer/api/utils/CheckUtil.java
+1
-1
No files found.
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
f495dd47
...
...
@@ -895,19 +895,21 @@ public class DzhtController2 {
@ApiOperation
(
value
=
"获取签署地址"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
qrySignUrl
(
@CurrentUser
UserBean
userBean
,
@RequestParam
String
flowId
,
@RequestParam
(
required
=
false
)
String
organizeId
,
@RequestParam
(
required
=
false
)
String
urlType
)
{
JSONObject
json
Object
=
null
;
JSONObject
json
=
null
;
try
{
QueryWrapper
<
DzhtAssoGrzc
>
queryWrapper
=
new
QueryWrapper
<
DzhtAssoGrzc
>();
queryWrapper
.
eq
(
"emp_num"
,
userBean
.
getEmpNum
()).
select
(
"account_id"
);
String
accountId
=
DzhtAssoGrzc
.
builder
().
build
().
selectOne
(
queryWrapper
).
getAccountId
();
TokenHelper
.
getTokenData
();
// 获取鉴权
json
Object
=
SignHelper
.
qrySignUrl
(
flowId
,
accountId
,
organizeId
,
urlType
);
json
=
SignHelper
.
qrySignUrl
(
flowId
,
accountId
,
organizeId
,
urlType
);
}
catch
(
DefineException
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
}
return
ResultUtil
.
data
(
jsonObject
,
"获取成功"
);
if
(
json
!=
null
&&
json
.
getLong
(
"code"
)
!=
0
)
return
ResultUtil
.
error
(
json
.
getString
(
"message"
));
return
ResultUtil
.
data
(
json
.
getJSONObject
(
"data"
),
"成功"
);
}
// 流程签署人催签
...
...
@@ -943,7 +945,11 @@ public class DzhtController2 {
if
(
grzc
!=
null
)
{
operatorId
=
grzc
.
getAccountId
();
}
SignHelper
.
revokeSignFlow
(
flowId
,
revokeReason
,
operatorId
);
JSONObject
json
=
SignHelper
.
revokeSignFlow
(
flowId
,
revokeReason
,
operatorId
);
if
(
json
!=
null
&&
json
.
getLong
(
"code"
)
!=
0
)
{
return
ResultUtil
.
error
(
json
.
getString
(
"message"
));
}
}
catch
(
DefineException
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
...
...
@@ -975,9 +981,10 @@ public class DzhtController2 {
json
=
SignHelper
.
downloadFlowDoc
(
flowId
);
}
catch
(
DefineException
e
)
{
e
.
printStackTrace
();
return
ResultUtil
.
error
();
}
return
ResultUtil
.
data
(
json
,
"成功"
);
if
(
json
!=
null
&&
json
.
getLong
(
"code"
)
!=
0
)
return
ResultUtil
.
error
(
json
.
getString
(
"message"
));
return
ResultUtil
.
data
(
json
.
getJSONObject
(
"data"
),
"成功"
);
}
/**
...
...
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/helper/SignHelper.java
View file @
f495dd47
...
...
@@ -89,13 +89,16 @@ public class SignHelper {
* @param flowId 创建签署流程时返回的签署流程ID
* @throws DefineException
* @author 宫清
* @param operatorId
* @param operatorId
* @return
* @date 2019年7月21日 下午5:38:42
*/
public
static
void
revokeSignFlow
(
String
flowId
,
String
revokeReason
,
String
operatorId
)
throws
DefineException
{
public
static
JSONObject
revokeSignFlow
(
String
flowId
,
String
revokeReason
,
String
operatorId
)
throws
DefineException
{
String
param
=
SignParamUtil
.
revokeSignFlowParam
(
revokeReason
,
operatorId
);
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
PUT
,
ConfigConstant
.
revokeFlows_URL
(
flowId
),
param
);
JSONHelper
.
castDataJson
(
json
,
Object
.
class
);
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
PUT
,
ConfigConstant
.
revokeFlows_URL
(
flowId
),
param
);
// JSONHelper.castDataJson(json, Object.class);
return
json
;
}
/**
...
...
@@ -176,7 +179,8 @@ public class SignHelper {
*/
public
static
JSONObject
downloadFlowDoc
(
String
flowId
)
throws
DefineException
{
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
GET
,
ConfigConstant
.
aboutDocument_URL
(
flowId
,
null
),
null
);
return
JSONHelper
.
castDataJson
(
json
,
JSONObject
.
class
);
// return JSONHelper.castDataJson(json, JSONObject.class);
return
json
;
}
// ------------------------------------------------------------------------------------------------流程文档相关end-----------------------
...
...
@@ -360,7 +364,7 @@ public class SignHelper {
* @author 宫清
* @date 2019年7月21日 下午8:09:07
*/
public
static
JSONObject
addSignerHandSignArea
(
String
flowId
,
List
<
Signfield
>
list
)
throws
DefineException
{
public
static
JSONObject
addSignerHandSignArea
(
String
flowId
,
List
<
Signfield
>
list
)
throws
DefineException
{
String
param
=
SignParamUtil
.
addSignerHandSignAreaParam
(
list
);
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
POST
,
ConfigConstant
.
addHandSignfieldsForPerson_URL
(
flowId
),
...
...
@@ -426,7 +430,7 @@ public class SignHelper {
* @param flowId 创建签署流程时返回的签署流程ID
* @throws DefineException
* @author 宫清
* @return
* @return
* @date 2019年7月21日 下午9:27:41
*/
public
static
JSONObject
rushSign
(
String
flowId
,
String
accoundId
,
String
noticeTypes
,
String
rushsignAccountId
)
...
...
@@ -458,7 +462,8 @@ public class SignHelper {
throws
DefineException
{
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
GET
,
ConfigConstant
.
Sign_URL
(
flowId
,
accountId
,
organizeId
,
urlType
),
null
);
return
JSONHelper
.
castDataJson
(
json
,
JSONObject
.
class
);
// return JSONHelper.castDataJson(json, JSONObject.class);
return
json
;
}
// ------------------------------------------------------------------------------------------------流程签署人相关end----------------------
...
...
src/main/java/cn/timer/api/utils/CheckUtil.java
View file @
f495dd47
...
...
@@ -31,7 +31,7 @@ public class CheckUtil {
* @param obj 实体对象
* @return 有则返回true
*/
public
static
boolean
checkObjFieldIsNull
(
Object
obj
)
{
public
static
<
T
>
boolean
checkObjFieldIsNull
(
T
obj
)
{
boolean
flag
=
false
;
for
(
Field
f
:
obj
.
getClass
().
getDeclaredFields
())
{
f
.
setAccessible
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment