From 2025f35965b29684c3dbea687a837333af020629 Mon Sep 17 00:00:00 2001 From: liuzhaotian Date: Fri, 17 Jan 2025 12:26:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E6=9C=AA=E6=8E=92=E5=8D=95=EF=BC=8C=E6=9D=83=E9=99=90=E6=A0=87?= =?UTF-8?q?=E8=AF=86=E6=9B=B4=E6=94=B9=EF=BC=8C=E4=BC=98=E5=8C=96=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E9=94=81=E5=8D=95=E9=80=BB=E8=BE=91=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/plan/OptimizePlanController.java | 7 ++++--- .../controller/admin/plan/PlanController.java | 14 +++++++------- .../controller/admin/plan/vo/PlateResList.java | 2 +- .../controller/admin/plate/PlateController.java | 6 +++--- .../optimizeplan/OptimizePlanServiceImpl.java | 6 +++++- .../admin/systemconfig/SystemConfigController.java | 4 ++-- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/OptimizePlanController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/OptimizePlanController.java index 55115e9e5..0bcfe25a7 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/OptimizePlanController.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/OptimizePlanController.java @@ -139,7 +139,7 @@ public class OptimizePlanController { @GetMapping("/getProcessSchemeConfig") @Operation(summary = "查询加工方案组对应的配置信息") @Parameter(name = "planId", description = "排单ID", required = true) - @PreAuthorize("@ss.hasPermission('manage:pack:query')") + @PreAuthorize("@ss.hasPermission('placeorder:optimize')") public CommonResult getProcessSchemeConfig(@Schema(description = "方案组ID") @NotNull(message = "方案组的ID不能为空") Long processId, @Schema(description = "排单id") @RequestParam(required = false) Long planId) { @@ -153,7 +153,7 @@ public class OptimizePlanController { @PutMapping("/updateProcessScheme") @Operation(summary = "修改排单对应的方案组的是否锁单") - @PreAuthorize("@ss.hasPermission('placeorder:update')") + @PreAuthorize("@ss.hasPermission('placeorder:optimize')") public CommonResult updateProcessScheme(@RequestBody PlanProcessSchemeReqVO reqVO) { optimizePlanService.updateProcessScheme(reqVO); return success(true); @@ -174,9 +174,10 @@ public class OptimizePlanController { } + @GetMapping("/getPlanPlateData") @Operation(summary = "未排单获取板材的所有数据") - @PreAuthorize("@ss.hasPermission('manage:pack:query')") + @PreAuthorize("@ss.hasPermission('unplannedOrders:query')") public CommonResult getNoPlanPlateData (@Valid NoPlanFilterPlateReqVO reqVO) { return success(optimizePlanService.getNoPlanPlateData(reqVO)); diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/PlanController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/PlanController.java index 06c176192..80b81694b 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/PlanController.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/PlanController.java @@ -76,14 +76,14 @@ public class PlanController { @GetMapping("getPlateByPlanId") @Operation(summary = "根据排单id获取小板分页") - @PreAuthorize("@ss.hasPermission('placeorder:orderlist')") + @PreAuthorize("@ss.hasPermission('placeorder:query')") public CommonResult> getPlateByPlanId(@Valid GetPlateByPlanIdVO vo) { return success(planService.getPlateByPlanId(vo)); } @GetMapping("getOrderByPlan") @Operation(summary = "根据排单获取生产单分页") - @PreAuthorize("@ss.hasPermission('placeorder:orderlist')") + @PreAuthorize("@ss.hasPermission('placeorder:query')") public CommonResult> getOrderByPlanId(@Valid PlanOrderPageReqVO pageReqVO) { return success(planService.getOrderByPlanId(pageReqVO)); } @@ -99,7 +99,7 @@ public class PlanController { @GetMapping("getPlanList") @Operation(summary = "查询排单(未分页)") - @PreAuthorize("@ss.hasPermission('placeorder:orderlist')") + @PreAuthorize("@ss.hasPermission('placeorder:query')") public CommonResult> getPlanList() { return success(planService.getPlanList()); @@ -118,7 +118,7 @@ public class PlanController { @GetMapping("getNotPlanOrderListPage") @Operation(summary = "获取未排单的生产单分页列表") - @PreAuthorize("@ss.hasPermission('placeorder:query')") + @PreAuthorize("@ss.hasPermission('unplannedOrders:query')") public CommonResult> getOrderPage(@Valid OrderPageReqVOCopy pageReqVO) { return success(planService.getOrderPage(pageReqVO)); } @@ -127,7 +127,7 @@ public class PlanController { @GetMapping("getNotPlanGoodsListPage") @Operation(summary = "获取未排单的大板板材分页列表") - @PreAuthorize("@ss.hasPermission('placeorder:query')") + @PreAuthorize("@ss.hasPermission('unplannedOrders:query')") public CommonResult> getOrderGoodsPage(@Valid OrderPageReqVOCopy pageReqVO) { return success(planService.getOrderGoodsPage(pageReqVO)); } @@ -165,7 +165,7 @@ public class PlanController { @GetMapping("getPlateList") @Operation(summary = "根据排单ID获取板材列表(未分页)") @Parameter(name = "planIds", description = "排单id", required = true) - @PreAuthorize("@ss.hasPermission('placeorder:orderlist')") + @PreAuthorize("@ss.hasPermission('placeorder:query')") public CommonResult> getPlateList(@Valid @RequestParam("planIds") @Size(max = 20,message = "最多可同时导出20个排单") List planIds) { return success(planService.getPlateList(planIds)); } @@ -174,7 +174,7 @@ public class PlanController { @GetMapping("getOrderRoomBodyList") @Operation(summary = "获取未排单的生产单的柜体和房间名称") @Parameter(name = "orderIds", description = "生产单ID", required = true) - @PreAuthorize("@ss.hasPermission('placeorder:orderlist')") + @PreAuthorize("@ss.hasPermission('unplannedOrders:query')") public CommonResult> getOrderRoomBody(@Valid @NotEmpty(message = "生产单ID不能为空") @RequestParam @Size(max = 20,message = "最多可同时查询20个生产单信息") List orderIds) { return success(planService.getOrderRoomBody(orderIds)); diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/PlateResList.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/PlateResList.java index 8fc98160f..b0f1e2f28 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/PlateResList.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plan/vo/PlateResList.java @@ -59,7 +59,7 @@ public class PlateResList { @Schema(description = "材质") private String material; @Schema(description = "纹路") - private Boolean texture; + private Integer texture; @Schema(description = "备注") private String remark; } diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/PlateController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/PlateController.java index ee6260c8f..09639de0c 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/PlateController.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/PlateController.java @@ -78,8 +78,8 @@ public class PlateController { } @GetMapping("/page") - @Operation(summary = "未排单获取实际板材") -// @PreAuthorize("@ss.hasPermission('executor:plate:query')") + @Operation(summary = "获取实际的开料大板") + @PreAuthorize("@ss.hasAnyPermissions('unplannedOrders:query','placeorder:query')") public CommonResult> getGoodsPlate(@Valid GoodsPlateFilterPageReqVO pageReqVO) { return success(plateService.getGoodsPlate(pageReqVO)); @@ -89,7 +89,7 @@ public class PlateController { @GetMapping("/getPlatePage") @Operation(summary = "获取未排单的生产单板件") -// @PreAuthorize("@ss.hasPermission('executor:plate:query')") + @PreAuthorize("@ss.hasAnyPermissions('unplannedOrders:query','placeorder:query')") public CommonResult> getPlatePage(@Valid NoPlanPlatePageReqVO reqVO) { return success(plateService.getOrderPlatePage(reqVO)); diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java index 9bba10a23..d9da17eb7 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java @@ -676,11 +676,15 @@ public class OptimizePlanServiceImpl implements OptimizePlanService { // 删除原来的优化信息 if(CollUtil.isNotEmpty(optimizeBoardModelDOS)){ + PlanDO planDO = planMapper.selectById(planId); + + AssertUtils.notEmpty(planDO,ORDER_PLAN_DATE_ERROR); + OptimizeBoardModelDO optimizeBoardModelDO = optimizeBoardModelDOS.get(0); Boolean isLock = Optional.ofNullable(optimizeBoardModelDO.getIsLock()).orElse(false); - if(Boolean.TRUE.equals(isLock)){ + if(Boolean.TRUE.equals(isLock) && planDO.getIsScheduled().equals(true)){ throw exception(THIS_PLAN_IS_LOCK); } diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/systemconfig/SystemConfigController.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/systemconfig/SystemConfigController.java index d1ecd658c..4e73d23bc 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/systemconfig/SystemConfigController.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/systemconfig/SystemConfigController.java @@ -34,7 +34,7 @@ public class SystemConfigController { @GetMapping() @Operation(summary = "获得系统配置的分页列表") - @PreAuthorize("@ss.hasPermission('system:base-setting:query')") + @PreAuthorize("@ss.hasAnyPermissions('system:base-setting:query','unplannedOrders:query','placeorder:query')") public CommonResult> getSystemConfigPage(@Valid ConfigPageReqVO pageReqVO) { List pageResult = systemConfigService.getSystemConfigList(pageReqVO); return success(BeanUtils.toBean(pageResult, ConfigRespVO.class)); @@ -42,7 +42,7 @@ public class SystemConfigController { @GetMapping("/{id}") @Operation(summary = "根据id查询系统配置") - @PreAuthorize("@ss.hasPermission('system:base-setting:query')") + @PreAuthorize("@ss.hasAnyPermissions('system:base-setting:query','unplannedOrders:query','placeorder:query')") public CommonResult getSystemConfig(@PathVariable("id") Long id) { SystemConfigDO systemConfigDO = systemConfigService.getSystemConfig(id); return success(BeanUtils.toBean(systemConfigDO, ConfigRespVO.class));