| | |
| | | BpmCategoryDO category = MapUtil.get(categoryMap, definition.getCategory(), BpmCategoryDO.class); |
| | | return buildProcessDefinition(definition, deployment, processDefinitionInfo, form, category, null); |
| | | }); |
| | | // 排序 |
| | | result.sort(Comparator.comparing(BpmProcessDefinitionRespVO::getSort)); |
| | | // 排序:sort 来自流程定义扩展信息,历史数据可能为 null, |
| | | // 直接用 Comparator.comparing 会抛 NPE(接口 500),这里把 null 排到最后 |
| | | result.sort(Comparator.comparing(BpmProcessDefinitionRespVO::getSort, |
| | | Comparator.<Long>nullsLast(Comparator.<Long>naturalOrder()))); |
| | | return result; |
| | | } |
| | | |