mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增根据生产单id获取未排单的商品分页列表接口
This commit is contained in:
+8
@@ -108,6 +108,14 @@ public class PlanController {
|
|||||||
return success(planService.getNotPlanPlateListPage(pageVO));
|
return success(planService.getNotPlanPlateListPage(pageVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("getNotPlanGoodsListPageByOrderId")
|
||||||
|
@Operation(summary = "根据生产单id获取未排单的商品分页列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||||
|
public CommonResult<PageResult<PlanGoodsVO>> getNotPlanGoodsListPageByOrderId(@Valid NotPlanGoodsListPageVO pageVO) {
|
||||||
|
return success(planService.getNotPlanGoodsListPageByOrderId(pageVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("addPlate")
|
@PostMapping("addPlate")
|
||||||
@Operation(summary = "添加板材")
|
@Operation(summary = "添加板材")
|
||||||
@PreAuthorize("@ss.hasPermission('executor:plan:update')")
|
@PreAuthorize("@ss.hasPermission('executor:plan:update')")
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.cf.imes.module.executor.controller.admin.plan.vo;
|
||||||
|
|
||||||
|
import com.cf.imes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Beal
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class NotPlanGoodsListPageVO extends PageParam {
|
||||||
|
@Schema(description = "生产单id")
|
||||||
|
@NotNull(message = "生产单id不能空")
|
||||||
|
private Long orderId;
|
||||||
|
}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cf.imes.module.executor.controller.admin.plan.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Beal
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PlanGoodsVO {
|
||||||
|
|
||||||
|
@Schema(description = "商品id")
|
||||||
|
private Long goodsId;
|
||||||
|
@Schema(description = "商品名称")
|
||||||
|
private String goodsName;
|
||||||
|
@Schema(description = "材质")
|
||||||
|
private String material;
|
||||||
|
@Schema(description = "颜色")
|
||||||
|
private String color;
|
||||||
|
@Schema(description = "厚度")
|
||||||
|
private BigDecimal thickness;
|
||||||
|
@Schema(description = "宽")
|
||||||
|
private BigDecimal width;
|
||||||
|
@Schema(description = "高")
|
||||||
|
private BigDecimal height;
|
||||||
|
@Schema(description = "片数")
|
||||||
|
private int num;
|
||||||
|
@Schema(description = "平方")
|
||||||
|
private BigDecimal area = new BigDecimal("0");
|
||||||
|
}
|
||||||
+2
@@ -64,4 +64,6 @@ public interface PlanService {
|
|||||||
PageResult<PlateResList> getPlateByPlanId(GetPlateByPlanIdVO vo);
|
PageResult<PlateResList> getPlateByPlanId(GetPlateByPlanIdVO vo);
|
||||||
|
|
||||||
PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);
|
PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
PageResult<PlanGoodsVO> getNotPlanGoodsListPageByOrderId( NotPlanGoodsListPageVO pageVO);
|
||||||
}
|
}
|
||||||
+15
@@ -382,4 +382,19 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
return BeanUtils.toBean(pageResult, OrderRespVO.class);
|
return BeanUtils.toBean(pageResult, OrderRespVO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<PlanGoodsVO> getNotPlanGoodsListPageByOrderId(NotPlanGoodsListPageVO pageVO) {
|
||||||
|
return goodsMapper.selectJoinPage(pageVO, PlanGoodsVO.class, new MPJLambdaWrapperX<GoodsDO>()
|
||||||
|
.leftJoin(PlateDO.class, PlateDO::getGoodsId, GoodsDO::getId)
|
||||||
|
.leftJoin(OrderItemDO.class, OrderItemDO::getPlateId, PlateDO::getId)
|
||||||
|
.leftJoin(PlanItemDO.class, PlanItemDO::getItemId, OrderItemDO::getId)
|
||||||
|
.select(GoodsDO::getGoodsId, GoodsDO::getHeight, GoodsDO::getWidth, GoodsDO::getColor, GoodsDO::getGoodsName, GoodsDO::getThickness)
|
||||||
|
.selectSum(PlateDO::getArea, "area")
|
||||||
|
.selectCount(PlateDO::getId, "num")
|
||||||
|
.isNotNull(PlanItemDO::getId)
|
||||||
|
.eq(GoodsDO::getOrderId, pageVO.getOrderId())
|
||||||
|
.groupBy(GoodsDO::getId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user