|
@@ -474,12 +474,20 @@ public class ScheduleTask {
|
|
|
for (int j = 0; j < allIds.size(); j++) {
|
|
for (int j = 0; j < allIds.size(); j++) {
|
|
|
String taskId1 = allIds.get(j);
|
|
String taskId1 = allIds.get(j);
|
|
|
HashMap params3 = new HashMap();
|
|
HashMap params3 = new HashMap();
|
|
|
-
|
|
|
|
|
|
|
+ String status = "";//状态
|
|
|
String doneGet = UtilHttp.doGet("https://open.teambition.com/api/v3/task/" + taskId1 + "/node/list", header, new HashMap());
|
|
String doneGet = UtilHttp.doGet("https://open.teambition.com/api/v3/task/" + taskId1 + "/node/list", header, new HashMap());
|
|
|
JSONObject response = JSON.parseObject(doneGet);
|
|
JSONObject response = JSON.parseObject(doneGet);
|
|
|
JSONArray resultArray = response.getJSONArray("result");
|
|
JSONArray resultArray = response.getJSONArray("result");
|
|
|
-// String targetId = "6875f58cf512415e5944c652,6879e63c9cf1bbad8460b777";//【设计单的工作流节点:设计接单(1) 设计接单(2)】
|
|
|
|
|
String targetName = "设计接";
|
|
String targetName = "设计接";
|
|
|
|
|
+ //这里只是遍历每一条任务是否完成status状态
|
|
|
|
|
+ for(int n = 0;n < resultArray.size();n++){
|
|
|
|
|
+ JSONObject node = resultArray.getJSONObject(n);
|
|
|
|
|
+ String nodeName = node.getString("name");
|
|
|
|
|
+ if("已完成".equals(nodeName)){
|
|
|
|
|
+ status = node.getString("status");
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
for (int k = 0; k < resultArray.size(); k++) {
|
|
for (int k = 0; k < resultArray.size(); k++) {
|
|
|
JSONObject node = resultArray.getJSONObject(k);
|
|
JSONObject node = resultArray.getJSONObject(k);
|
|
|
String currentNodeId = node.getString("name");
|
|
String currentNodeId = node.getString("name");
|
|
@@ -494,9 +502,7 @@ public class ScheduleTask {
|
|
|
String time_start = "";//开始时间
|
|
String time_start = "";//开始时间
|
|
|
String time_end = "";//结束时间
|
|
String time_end = "";//结束时间
|
|
|
String task_type = "";//任务类型
|
|
String task_type = "";//任务类型
|
|
|
- String status = "";//状态
|
|
|
|
|
String department = "";//所属部门
|
|
String department = "";//所属部门
|
|
|
- status = node.getString("status");
|
|
|
|
|
time_start = node.getString("startDate");
|
|
time_start = node.getString("startDate");
|
|
|
time_end = node.getString("dueDate");
|
|
time_end = node.getString("dueDate");
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
|
|
@@ -585,7 +591,7 @@ public class ScheduleTask {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
UpdateWrapper<EmployeeWeeklyTasks> updateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<EmployeeWeeklyTasks> updateWrapper = new UpdateWrapper<>();
|
|
|
- updateWrapper.eq("task_id", taskId);
|
|
|
|
|
|
|
+ updateWrapper.eq("task_id", taskId).eq("manager",manager);
|
|
|
if (EmployeeWeeklyTasksList != null && EmployeeWeeklyTasksList.size() > 0) {
|
|
if (EmployeeWeeklyTasksList != null && EmployeeWeeklyTasksList.size() > 0) {
|
|
|
updateWrapper.set("task_name", taskName);
|
|
updateWrapper.set("task_name", taskName);
|
|
|
updateWrapper.set("manager", manager);
|
|
updateWrapper.set("manager", manager);
|
|
@@ -1336,6 +1342,13 @@ public class ScheduleTask {
|
|
|
return McR.success();
|
|
return McR.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /*todo:个人月度成功率*/
|
|
|
|
|
+ @SneakyThrows
|
|
|
|
|
+ @PostMapping("/personalmonthlySuccessrate")
|
|
|
|
|
+ McR personalmonthlySuccessrate(){
|
|
|
|
|
+ return McR.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/*todo:人员获取部门*/
|
|
/*todo:人员获取部门*/
|
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
|
@PostMapping("/UserGetDeprt")
|
|
@PostMapping("/UserGetDeprt")
|