装配清单顶级部件查询接口补充pid=0条件

This commit is contained in:
gaoqr
2026-02-27 10:53:28 +08:00
parent 8439b57560
commit d825ce8f6d
@@ -2,6 +2,7 @@ package com.cf.imes.module.executor.service.ordercomponent;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
@@ -11,6 +12,7 @@ import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.Assert.AssertUtils;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.security.core.util.SecurityFrameworkUtils;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.OrderComponentRespVO;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.OrderDetailComponentListReqVO;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.OrderDetailComponentPageReqVO;
@@ -126,6 +128,7 @@ public class OrderComponentServiceImpl implements OrderComponentService {
public List<OrderComponentRespVO> getOrderTopComponentList(OrderDetailComponentListReqVO reqVO) {
List<OrderComponentDO> orderComponentDOS = orderComponentMapper.selectList(new LambdaQueryWrapperX<OrderComponentDO>()
.eq(OrderComponentDO::getOrderId, reqVO.getOrderId())
.eq(OrderComponentDO::getPid, OrderComponentDO.PARENT_ID_ROOT)
.likeIfPresent(OrderComponentDO::getName, reqVO.getName())
.eqIfPresent(OrderComponentDO::getProcessStatus, reqVO.getProcessStatus()));
return BeanUtil.copyToList(orderComponentDOS, OrderComponentRespVO.class);
@@ -158,7 +161,7 @@ public class OrderComponentServiceImpl implements OrderComponentService {
.eqIfPresent(OrderComponentDO::getDeleted, reqVO.isDeleted())
.likeIfPresent(OrderComponentDO::getName, reqVO.getName())
.eqIfPresent(OrderComponentDO::getProcessStatus, reqVO.getProcessStatus())
.select(OrderComponentDO::getId, OrderComponentDO::getPid, OrderComponentDO::getName, OrderComponentDO::getCadViewFileId));
.select(OrderComponentDO::getId, OrderComponentDO::getPid, OrderComponentDO::getName, OrderComponentDO::getCadViewFileId, OrderComponentDO::getProcessStatus));
List<OrderComponentRespVO> orderComponentRespVOS = BeanUtil.copyToList(topComponentList, OrderComponentRespVO.class);
// 3、获取文件 fileHash
@@ -570,5 +573,13 @@ public class OrderComponentServiceImpl implements OrderComponentService {
return needDeleteIds;
}
// @Override
// public List<OrderComponentRespVO> getOrderComponentListOnOrders(List<Long> orderIds) {
// List<OrderComponentDO> orderComponentDOS = orderComponentMapper.selectList(new LambdaQueryWrapper<OrderComponentDO>()
// .in(OrderComponentDO::getOrderId, orderIds)
// .eq(OrderComponentDO::getDeleted, false)
// .eq(OrderComponentDO::getOrganId, SecurityFrameworkUtils.getUserOrganId())
// .select(OrderComponentDO::getId, OrderComponentDO::getName, OrderComponentDO::getPid));
// return BeanUtil.copyToList(orderComponentDOS, OrderComponentRespVO.class);
// }
}