|
@@ -729,17 +729,27 @@ public class McYdServiceImpl implements McYdService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public McR approveTask(Map map) {
|
|
public McR approveTask(Map map) {
|
|
- String pid = getString(map.get("pid"));
|
|
|
|
- MDC.put("MDC_KEY_PID",pid);
|
|
|
|
-
|
|
|
|
String outResult = UtilMap.getString(map, "outResult");
|
|
String outResult = UtilMap.getString(map, "outResult");
|
|
String userId = UtilMap.getString(map, "userId");
|
|
String userId = UtilMap.getString(map, "userId");
|
|
|
|
|
|
String processInstanceId = UtilMap.getString(map, "processInstanceId");
|
|
String processInstanceId = UtilMap.getString(map, "processInstanceId");
|
|
- Long taskId = UtilMap.getLong(map, "taskId");
|
|
|
|
|
|
+ String activityId = UtilMap.getString(map, "activityId");
|
|
|
|
+ long taskId = 0;
|
|
|
|
+
|
|
|
|
+ //获取审批记录
|
|
|
|
+ List<Map> result = (List<Map>) ydClient.queryData(YDParam.builder()
|
|
|
|
+ .processInstanceId(processInstanceId)
|
|
|
|
+ .build(),YDConf.FORM_QUERY.retrieve_approval_record).getResult();
|
|
|
|
+ for (Map approveInfo : result) {
|
|
|
|
+ if (activityId.equals(UtilMap.getString(approveInfo, "activityId"))){
|
|
|
|
+ //获取taskId
|
|
|
|
+ taskId = UtilMap.getLong(approveInfo, "taskId");
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ //审批
|
|
Map body = new HashMap();
|
|
Map body = new HashMap();
|
|
-
|
|
|
|
body.put("outResult",outResult);//AGREE:同意 DISAGREE:拒绝。
|
|
body.put("outResult",outResult);//AGREE:同意 DISAGREE:拒绝。
|
|
body.put("appType",ydConf.getAppType());
|
|
body.put("appType",ydConf.getAppType());
|
|
body.put("systemToken",ydConf.getSystemToken());
|
|
body.put("systemToken",ydConf.getSystemToken());
|
|
@@ -748,10 +758,9 @@ public class McYdServiceImpl implements McYdService {
|
|
body.put("userId",userId);//用户userid
|
|
body.put("userId",userId);//用户userid
|
|
body.put("taskId",taskId);//任务id
|
|
body.put("taskId",taskId);//任务id
|
|
|
|
|
|
- //审批
|
|
|
|
- DDR_New ddrNew = (DDR_New) UtilHttp.doPost("https://api.dingtalk.com/v1.0/yida/tasks/execute", ddClient.initTokenHeader(), body, DDR_New.class);
|
|
|
|
|
|
+ UtilHttp.doPost("https://api.dingtalk.com/v1.0/yida/tasks/execute", ddClient.initTokenHeader(), null,body);
|
|
|
|
|
|
- return null;
|
|
|
|
|
|
+ return McR.success();
|
|
}
|
|
}
|
|
|
|
|
|
public String sendNotification(String access_token, List<String> userid_list, List<String> dept_id_list, boolean to_all_user, Map msg, String agent_id) {
|
|
public String sendNotification(String access_token, List<String> userid_list, List<String> dept_id_list, boolean to_all_user, Map msg, String agent_id) {
|