测试获取优化算法接口,初步定义获取优化数据cfdata

This commit is contained in:
yangsb
2024-03-21 17:40:49 +08:00
parent 872b8ac3c3
commit cbe9c63ab1
2 changed files with 10 additions and 2 deletions
@@ -62,10 +62,17 @@ public class OptimizePlanController {
}
@GetMapping("/getOptimizeParam")
@Operation(summary = "获取优化算法参数 (未完成)")
@Operation(summary = "获取优化算法参数")
@PreAuthorize("@ss.hasPermission('executor:optimize-plate:create')")
public CommonResult<OptimizeParamResVO> getOptimizeParam(@RequestParam @Valid @NotNull(message = "排单id不能空") Long planId) {
return CommonResult.success(optimizePlanService.getOptimizeParam(planId));
}
@GetMapping("/getCfData")
@Operation(summary = "获取cfData")
@PreAuthorize("@ss.hasPermission('executor:optimize-plate:create')")
public CommonResult<OptimizeParamResVO> getCfData(@RequestParam @Valid @NotNull(message = "排单id不能空") Long planId) {
return CommonResult.success(optimizePlanService.getCfData(planId));
}
}
@@ -182,7 +182,8 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
.select(GoodsDO::getId ,GoodsDO::getWidth, GoodsDO::getHeight)
.leftJoin(PlateDO.class, PlateDO::getGoodsId, GoodsDO::getGoodsId)
.leftJoin(OrderItemDO.class, OrderItemDO::getPlanId, PlateDO::getPlateNo)
.leftJoin(PlanItemDO.class, PlanItemDO::getItemId, OrderItemDO::getId);
.leftJoin(PlanItemDO.class, PlanItemDO::getItemId, OrderItemDO::getId)
.eq(PlanItemDO::getPlanId, planId);
GoodsDO goodsDO = goodsMapper.selectJoinOne(GoodsDO.class, wrapper);
rawSizes.add(OptimizeParamResVO.RawSize.builder()