Browse Source

pms BOM清单列表根据设备分类排序

zhangcl 1 month ago
parent
commit
096cc0cfed

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotbom/IotBomMapper.java

@@ -47,7 +47,7 @@ public interface IotBomMapper extends BaseMapperX<IotBomDO> {
                 .likeIfPresent(IotBomDO::getName, reqVO.getName())
                 .inIfPresent(IotBomDO::getDeviceCategoryId, ids)
                 .eqIfPresent(IotBomDO::getStatus, reqVO.getStatus())
-                .orderByAsc(IotBomDO::getSort));
+                .orderByAsc(IotBomDO::getDeviceCategoryId).orderByAsc(IotBomDO::getSort));
     }
 
     default IotBomDO selectParentNode(IotBomSaveReqVO reqVO) {

+ 0 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotbom/IotBomServiceImpl.java

@@ -196,7 +196,6 @@ public class IotBomServiceImpl implements IotBomService {
             ids.add(reqVO.getDeviceCategoryId());
         }
         List<IotBomDO> list = iotBomMapper.selectList(reqVO, ids);
-        list.sort(Comparator.comparing(IotBomDO::getSort));
         return list;
     }