From c982d11c6f5fb34664637b509d9becf064c656eb Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Mon, 2 Mar 2026 16:59:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E/executor/order/component/vie?= =?UTF-8?q?w/{id}/list=20=E6=9F=A5=E8=AF=A2=E9=A1=B6=E7=BA=A7=E9=83=A8?= =?UTF-8?q?=E4=BB=B6=E4=B8=8B=E9=83=A8=E4=BB=B6=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ordercomponent/OrderComponentController.java | 9 +++++++++ .../ordercomponent/OrderComponentService.java | 8 ++++++++ .../ordercomponent/OrderComponentServiceImpl.java | 12 ++++++++++++ 3 files changed, 29 insertions(+) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/ordercomponent/OrderComponentController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/ordercomponent/OrderComponentController.java index f060cfa24..dd6ea028b 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/ordercomponent/OrderComponentController.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/ordercomponent/OrderComponentController.java @@ -8,11 +8,13 @@ import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.OrderDetai import com.cf.imes.module.executor.controller.admin.plate.vo.OrderViewPlatePageRespVO; import com.cf.imes.module.executor.service.ordercomponent.OrderComponentService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.Valid; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -56,6 +58,13 @@ public class OrderComponentController { return success(orderComponentService.getComponentListOnTopId(reqVO)); } + @GetMapping("/view/{id}/list") + @Operation(summary = "查询指定顶级部件下部件列表") + @Parameter(name = "id", description = "部件编号", required = true, example = "1024") + public CommonResult> getChildViewComponentList(@PathVariable Long id) { + return success(orderComponentService.getChildComponentListOnTopId(id)); + } + @PostMapping("/view/plate/page") @Operation(summary = "获取部件下的板件视图分页列表数据") public CommonResult> getComponentViewPlatesPage(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) { diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentService.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentService.java index 4ba8a93b5..6661c53de 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentService.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentService.java @@ -75,4 +75,12 @@ public interface OrderComponentService { * @return */ List getOrderComponentListOnOrders(List orderIds); + + /** + * 查询部件下所有子部件 + * + * @param id + * @return + */ + List getChildComponentListOnTopId(Long id); } \ No newline at end of file diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentServiceImpl.java index 4065b7fbd..248abe283 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/ordercomponent/OrderComponentServiceImpl.java @@ -6,6 +6,7 @@ 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; +import com.cf.imes.framework.common.enums.DeletedCodeEnum; import com.cf.imes.framework.common.exception.ServiceException; import com.cf.imes.framework.common.pojo.CommonResult; import com.cf.imes.framework.common.pojo.PageParam; @@ -585,4 +586,15 @@ public class OrderComponentServiceImpl implements OrderComponentService { .select(OrderComponentDO::getId, OrderComponentDO::getName, OrderComponentDO::getPid)); return BeanUtil.copyToList(orderComponentDOS, OrderComponentRespVO.class); } + + @Override + public List getChildComponentListOnTopId(Long id) { + List orderComponentDOS = orderComponentMapper.selectList(new LambdaQueryWrapperX() + .eq(OrderComponentDO::getOrganId, SecurityFrameworkUtils.getUserOrganId()) + .eq(OrderComponentDO::getTopId, id) + .eq(OrderComponentDO::getDeleted, DeletedCodeEnum.NOT_DELETED.getStatus()) + .select(OrderComponentDO::getId, OrderComponentDO::getName, OrderComponentDO::getPid) + ); + return BeanUtil.copyToList(orderComponentDOS, OrderComponentRespVO.class); + } } \ No newline at end of file