工作流提交

This commit is contained in:
guoshengxiong 2025-03-26 18:48:18 +08:00
parent 52c6b77450
commit ed80d179f9
2 changed files with 10 additions and 9 deletions

View File

@ -190,7 +190,7 @@ public class CustomController {
* @return
*/
private JSONObject getToObj(JSONObject jo, String toName, JSONObject children) {
if (children == null || children.getString("name") == null) {
if (children == null) {
return null;
}
if (Objects.equals(children.getString("name"), toName)) {
@ -208,10 +208,8 @@ public class CustomController {
return toObj;
}
}
} else {
return getToObj(children, toName, children.getJSONObject("children"));
}
return null;
return getToObj(children, toName, children.getJSONObject("children"));
}
/**
@ -239,8 +237,8 @@ public class CustomController {
for (int j = 0; j < array.size(); j++) {
setToObj(children, fromName, set, array.getJSONObject(j));
}
} else {
setToObj(children, fromName, set, children.getJSONObject("children"));
}
setToObj(children, fromName, set, children.getJSONObject("children"));
}
}

View File

@ -433,7 +433,11 @@ public class ProcessInstanceServiceImpl implements ProcessInstanceService {
if (Objects.equals(customStatus, 1)) {
instanceQuery.or().startedBy(startUser + "").involvedUser(startUser + "").endOr();
} else if (Objects.equals(customStatus, 2)) {
instanceQuery.or().processInstanceBusinessStatusLike("PRE%").endOr();
instanceQuery.or().startedBy(startUser + "").involvedUser(startUser + "").endOr();
instanceQuery.finished();
}
if (!Objects.equals(customStatus, 1) && !Objects.equals(customStatus, 2)) {
instanceQuery.startedBy(startUser);
}
Executor.builder()
//customStatus 1待催办2已办结3审批进行中4审批被撤销5审批被驳回6审批通过7审批被驳回(发起人是自己)
@ -441,9 +445,8 @@ public class ProcessInstanceServiceImpl implements ProcessInstanceService {
.ifTrueNext(Objects.equals(customStatus, 3), instanceQuery::unfinished)
.ifNotBlankNext(Objects.equals(customStatus, 5) ? ProcessStatus.REFUSE.toString() : null, instanceQuery::processInstanceBusinessStatus)
.ifNotBlankNext(Objects.equals(customStatus, 6) ? ProcessStatus.PRE_PASS.toString() : null, instanceQuery::processInstanceBusinessStatus)
.ifNotBlankNext(Objects.equals(customStatus, 7) ? ProcessStatus.PRE_PASS.toString() : null, instanceQuery::processInstanceBusinessStatus)
.ifNotBlankNext(Objects.equals(customStatus, 7) ? ProcessStatus.REFUSE.toString() : null, instanceQuery::processInstanceBusinessStatus)
.ifNotBlankNext(Objects.equals(customStatus, 7) ? SecurityUtils.getUser().getUserId() + "" : "", instanceQuery::startedBy)
.ifNotBlankNext(!Objects.equals(customStatus, 1) ? startUser : "", instanceQuery::startedBy)
.ifNotBlankNext(code, instanceQuery::processDefinitionKey)
.ifTrueNext(null != startTimes && startTimes.length > 1, () -> {
instanceQuery.startedAfter(DateUtil.parse(startTimes[0]));