|
|
@@ -183,7 +183,9 @@ public class WbsSynchronousEViSaServiceImpl {
|
|
|
.eq(WbsTreeContract::getPId, pId)
|
|
|
.eq(WbsTreeContract::getIsDeleted, 0)
|
|
|
.notIn(WbsTreeContract::getPKeyId, pKeyIds)
|
|
|
- .orderByAsc(WbsTreeContract::getSort));
|
|
|
+// .orderByAsc(WbsTreeContract::getSort));
|
|
|
+ // 确保顺序与 blade-manager/wbsPrivate/get-group-node-tables 查询接口一致
|
|
|
+ .last(" order by sort, ifnull(if(length(trim(full_name)) > 0, full_name, node_name), node_name)"));
|
|
|
if (CollectionUtil.isNotEmpty(resourceData)) {
|
|
|
for (int i = 0; i < resourceData.size(); i++) {
|
|
|
resourceData.get(i).setSort(i + 1);
|
|
|
@@ -210,7 +212,9 @@ public class WbsSynchronousEViSaServiceImpl {
|
|
|
.select(WbsTreeContract::getPKeyId, WbsTreeContract::getSort)
|
|
|
.eq(WbsTreeContract::getPId, pId)
|
|
|
.eq(WbsTreeContract::getIsDeleted, 0)
|
|
|
- .orderByAsc(WbsTreeContract::getSort));
|
|
|
+// .orderByAsc(WbsTreeContract::getSort));
|
|
|
+ // 确保顺序与 blade-manager/wbsPrivate/get-group-node-tables 查询接口一致
|
|
|
+ .last(" order by sort, ifnull(if(length(trim(full_name)) > 0, full_name, node_name), node_name)"));
|
|
|
if (CollectionUtil.isNotEmpty(resourceData)) {
|
|
|
for (int i = 0; i < resourceData.size(); i++) {
|
|
|
resourceData.get(i).setSort(i + 1);
|
|
|
@@ -218,6 +222,7 @@ public class WbsSynchronousEViSaServiceImpl {
|
|
|
//修改排序为连续排序
|
|
|
wbsTreeContractMapper.updateSortBatchByPKeyId(resourceData);
|
|
|
}
|
|
|
+ wbsTreeContractMapper.update(null, Wrappers.<WbsTreeContract>lambdaUpdate().eq(WbsTreeContract::getPKeyId, pId).set(WbsTreeContract::getIsUseSort, 1));
|
|
|
}
|
|
|
|
|
|
//处理html 复制之后记录在新表中w
|