Commit f495dd47 by 邓实川

电子合同报错信息优化

parent 8ce8533c
......@@ -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 jsonObject = 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();// 获取鉴权
jsonObject = 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"), "成功");
}
/**
......
......@@ -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----------------------
......
......@@ -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);
......
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