|
|
@@ -202,6 +202,7 @@ public class ZhongcheServiceImpl implements ZhongcheService {
|
|
|
Map map2 = result2.get(0);
|
|
|
tbOperatorId = UtilMap.getString(map2, "tbUserId");
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -349,6 +350,36 @@ public class ZhongcheServiceImpl implements ZhongcheService {
|
|
|
String taskId = UtilMap.getString(formData, "textField_mkkrgg8y");
|
|
|
String projectId = UtilMap.getString(formData, "textField_mkkrgg8u");
|
|
|
|
|
|
+ //获取质检员审批人
|
|
|
+ String tbOperatorId = tbConf.getOperatorId();
|
|
|
+
|
|
|
+ Map param = new HashMap();
|
|
|
+ param.put("appType",ydConf.getAppType());
|
|
|
+ param.put("systemToken",ydConf.getSystemToken());
|
|
|
+ param.put("userId","yida_pub_account");
|
|
|
+ param.put("processInstanceId",formInstId);
|
|
|
+ Map jsonMap = (Map) JSONObject.parse(UtilHttp.doGet("https://api.dingtalk.com/v1.0/yida/processes/operationRecords", ddClient.initTokenHeader(), param));
|
|
|
+ List<Map> processResult = UtilMap.getList(jsonMap, "result");
|
|
|
+
|
|
|
+ //Q1~Q6上传tb附件
|
|
|
+ List<String> activityIds = Arrays.asList("node_ocmq4wx0ihc", "node_ocmq4wz6qf1","node_ocmq4wz6qf2","node_ocmq4wz6qf3","node_ocmq4wz6qf4","node_ocmq4wz6qf5");
|
|
|
+
|
|
|
+ for (Map map1 : processResult) {
|
|
|
+ String activityId = UtilMap.getString(map1, "activityId");
|
|
|
+
|
|
|
+ if (activityIds.contains(activityId)){
|
|
|
+ String operatorUserId = UtilMap.getString(map1, "operatorUserId");
|
|
|
+
|
|
|
+ Map jsonMap2 = (Map) JSONObject.parse(UtilHttp.doGet("https://open.teambition.com/api/idmap/dingtalk/getTbUserId", initHeaderToken(), UtilMap.map("dingUserIds", operatorUserId)));
|
|
|
+ List<Map> result2 = UtilMap.getList(jsonMap2, "result");
|
|
|
+ if (Objects.nonNull(result2) && !result2.isEmpty()){
|
|
|
+ Map map2 = result2.get(0);
|
|
|
+ tbOperatorId = UtilMap.getString(map2, "tbUserId");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (Objects.nonNull(formData.get("attachmentField_mpzbe3w8"))){
|
|
|
List<Map> addValues = new ArrayList<>();
|
|
|
|
|
|
@@ -400,7 +431,7 @@ public class ZhongcheServiceImpl implements ZhongcheService {
|
|
|
body.put("customfieldId", "67e372b0142aea12588c2d22");
|
|
|
body.put("addValues",addValues);
|
|
|
|
|
|
- Map map2 = tbClient.updateTaskCustomField(taskId, tbConf.getOperatorId(), body);
|
|
|
+ Map map2 = tbClient.updateTaskCustomField(taskId, tbOperatorId, body);
|
|
|
log.info("map2:{}",JSONObject.toJSONString(map2));
|
|
|
|
|
|
//查询任务所在工作流的任务状态列表
|
|
|
@@ -414,7 +445,7 @@ public class ZhongcheServiceImpl implements ZhongcheService {
|
|
|
if ("已完成".equals(tfsName)){
|
|
|
String tfsId = UtilMap.getString(tfsMap, "id");
|
|
|
//完成tb任务
|
|
|
- tbClient.updateTaskFlowStatus(taskId, tbConf.getOperatorId(), tfsId,null);
|
|
|
+ tbClient.updateTaskFlowStatus(taskId, tbOperatorId, tfsId,null);
|
|
|
}
|
|
|
}
|
|
|
}
|