|
@@ -38,24 +38,38 @@ public class McTbEventImpl implements TBEvent {
|
|
|
// if(!Arrays.asList("622ee3450cf3bb5e1a486f1f","61a9e8a36355609fb6383d40").contains(creatorId)){
|
|
// if(!Arrays.asList("622ee3450cf3bb5e1a486f1f","61a9e8a36355609fb6383d40").contains(creatorId)){
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
|
- if(status.equals("finish")||status.equals("begin")){
|
|
|
|
|
- boolean isBegin = status.equals("begin");
|
|
|
|
|
|
|
+ if(status.equals("finish")){
|
|
|
List<Map> list=tbClient.queryNodeList(taskId);
|
|
List<Map> list=tbClient.queryNodeList(taskId);
|
|
|
Map node = _getNodeDetail(list,nodeId);
|
|
Map node = _getNodeDetail(list,nodeId);
|
|
|
if(String.valueOf(node.get("name")).contains("接单")){
|
|
if(String.valueOf(node.get("name")).contains("接单")){
|
|
|
- List<String> assigneeIds = isBegin? new ArrayList<>() :UtilMap.getList(node,"assigneeIds");
|
|
|
|
|
- String startDate = isBegin? null: UtilMap.getString(node,"startDate");
|
|
|
|
|
- String dueDate = isBegin? null: UtilMap.getString(node,"dueDate");
|
|
|
|
|
|
|
+ List<String> assigneeIds = UtilMap.getList(node,"assigneeIds");
|
|
|
|
|
+ String startDate = UtilMap.getString(node,"startDate");
|
|
|
|
|
+ String dueDate = UtilMap.getString(node,"dueDate");
|
|
|
Map nextMap=_getNextNode(list,nodeId);
|
|
Map nextMap=_getNextNode(list,nodeId);
|
|
|
if(nextMap!=null){
|
|
if(nextMap!=null){
|
|
|
String nextId = UtilMap.getString(nextMap,"id");
|
|
String nextId = UtilMap.getString(nextMap,"id");
|
|
|
tbClient.updateNodeById(taskId,nextId,assigneeIds,startDate,dueDate,creatorId);
|
|
tbClient.updateNodeById(taskId,nextId,assigneeIds,startDate,dueDate,creatorId);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if(status.equals("finish")){
|
|
|
|
|
+ List<Map> list=tbClient.queryNodeList(taskId);
|
|
|
|
|
+ Map node = _getNodeDetail(list,nodeId);
|
|
|
|
|
+ if(String.valueOf(node.get("name")).contains("接单")){
|
|
|
|
|
+ nextNode(taskId,list,nodeId,creatorId);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void nextNode(String taskId,List<Map> list,String nodeId,String creatorId){
|
|
|
|
|
+ Map nextMap=_getNextNode(list,nodeId);
|
|
|
|
|
+ if(nextMap!=null){
|
|
|
|
|
+ String nextId = UtilMap.getString(nextMap,"id");
|
|
|
|
|
+ tbClient.updateNodeById(taskId,nextId,new ArrayList<>(),null,null,creatorId);
|
|
|
|
|
+ nextNode(taskId,list,nextId,creatorId);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void callBackProject(JSONObject eventJson) {
|
|
public void callBackProject(JSONObject eventJson) {
|
|
|
|
|
|