|
@@ -460,7 +460,12 @@ public class SysDeptController {
|
|
|
List<WmDeptRegulations> list = wmDeptRegulationsService.list(Wrappers.<WmDeptRegulations>lambdaQuery()
|
|
|
.eq(WmDeptRegulations::getDeptId, deptId)
|
|
|
.eq(WmDeptRegulations::getDelFlag, DelEnum.NOT_DEL.val()));
|
|
|
- list.sort(Comparator.comparing(WmDeptRegulations::getSort));
|
|
|
+ list.sort((o1, o2) -> {
|
|
|
+ if (o1.getSort() > 0 && o2.getSort() > 0) {
|
|
|
+ return o1.getSort() - o2.getSort();
|
|
|
+ }
|
|
|
+ return o1.getId() - o2.getId();
|
|
|
+ });
|
|
|
|
|
|
return R.ok(list);
|
|
|
}
|
|
@@ -485,7 +490,6 @@ public class SysDeptController {
|
|
|
// 后保存
|
|
|
list.forEach(regulations -> {
|
|
|
regulations.setDeptId(deptId);
|
|
|
- regulations.setEnableFlag(EnableEnum.ENABLE.val());
|
|
|
regulations.setDelFlag(DelEnum.NOT_DEL.val());
|
|
|
});
|
|
|
|