提交 9d033a80 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'cherry-pick-a8b72cf7' into 'develop'

Merge branch 'hotfix/lastManualScript' into 'master'

See merge request o2oa/o2oa!2622
......@@ -108,9 +108,17 @@ public class WorkContext {
list.addAll(aeiObjects.getRecords());
list.addAll(aeiObjects.getCreateRecords());
}
return gson.toJson(
list.stream().filter(o -> StringUtils.equals(o.getWork(), this.aeiObjects.getWork().getId()))
.collect(Collectors.toList()));
List<Record> records = list.stream()
.filter(o -> StringUtils.equals(o.getWork(), this.aeiObjects.getWork().getId()))
.collect(Collectors.toList());
// 考虑到比如已经是最后一个人工环节,那么work已经转为workCompleted,那么直接返回全部record
if (records.isEmpty()) {
return gson.toJson(list.stream().sorted(Comparator.nullsLast(Comparator.comparing(Record::getOrder)))
.collect(Collectors.toList()));
} else {
return gson.toJson(records.stream().sorted(Comparator.nullsLast(Comparator.comparing(Record::getOrder)))
.collect(Collectors.toList()));
}
} catch (Exception e) {
throw new IllegalStateException("getRecordList error.", e);
}
......@@ -333,6 +341,7 @@ public class WorkContext {
throw new IllegalStateException("getReadCompletedList error.", e);
}
}
@Deprecated(forRemoval = true, since = "never use.")
public String getReviewList() {
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册