装配清单-顶级部件列表支持多订单查询

This commit is contained in:
gaoqr
2026-03-06 10:54:27 +08:00
parent 5d8e7be601
commit f19b53c0f2
2 changed files with 12 additions and 1 deletions
@@ -10,7 +10,9 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import java.util.Set;
/**
@@ -30,6 +32,10 @@ public class OrderDetailComponentListReqVO {
@NotNull(message = "{order.detail.component.list.query.orderId.not.null}")
private Long orderId;
@Schema(description = "订单编号列表", example = "[1,2]")
@Size(max = 100, message = "{order.component.assemble.req.orderIds.max}")
private List<Long> orderIds;
@Schema(description = "房间编号", example = "[1,2]")
@Size(max = 200, message = "{order.detail.component.list.query.roomIds.max}")
private Set<Long> roomIds;
@@ -43,6 +49,7 @@ public class OrderDetailComponentListReqVO {
private Set<Long> componentIds;
@Schema(description = "部件名称", example = "部件")
@Length(max = 64, message = "{order.component.assemble.req.name.max}")
private String name;
@Schema(description = "是否删除", example = "false")
@@ -127,8 +127,12 @@ public class OrderComponentServiceImpl implements OrderComponentService {
@Override
public List<OrderComponentRespVO> getOrderTopComponentList(OrderDetailComponentListReqVO reqVO) {
List<Long> orderIds = reqVO.getOrderIds();
if (CollUtil.isEmpty(orderIds)) {
return Collections.emptyList();
}
List<OrderComponentDO> orderComponentDOS = orderComponentMapper.selectList(new LambdaQueryWrapperX<OrderComponentDO>()
.eq(OrderComponentDO::getOrderId, reqVO.getOrderId())
.in(OrderComponentDO::getOrderId, orderIds)
.eq(OrderComponentDO::getPid, OrderComponentDO.PARENT_ID_ROOT)
.likeIfPresent(OrderComponentDO::getName, reqVO.getName())
.eqIfPresent(OrderComponentDO::getProcessStatus, reqVO.getProcessStatus()));