Commit b2f9adcfc1ee1f5fa8e23547894a0aed96f2e8d7
1 parent
8221ee3a
✨ feat(mes): 添加虚拟仓库和库区删除校验,优化物料混放规则更新
Showing
1 changed file
with
19 additions
and
0 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/MesWmWarehouseLocationController.java
| @@ -94,6 +94,25 @@ public class MesWmWarehouseLocationController { | @@ -94,6 +94,25 @@ public class MesWmWarehouseLocationController { | ||
| 94 | return success(buildWarehouseLocationRespVOList(list)); | 94 | return success(buildWarehouseLocationRespVOList(list)); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | + // TODO @AI:是不是搞个批量的接口,把 set-item-mixing、set-batch-mixing 融合成一个? | ||
| 98 | + @PutMapping("/set-item-mixing") | ||
| 99 | + @Operation(summary = "批量设置库区下所有库位的物料混放规则") | ||
| 100 | + @PreAuthorize("@ss.hasPermission('mes:wm-warehouse:update')") | ||
| 101 | + public CommonResult<Boolean> setItemMixing(@RequestParam("locationId") Long locationId, | ||
| 102 | + @RequestParam("allow") Boolean allow) { | ||
| 103 | + areaService.updateAllowItemMixingByLocationId(locationId, allow); | ||
| 104 | + return success(true); | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + @PutMapping("/set-batch-mixing") | ||
| 108 | + @Operation(summary = "批量设置库区下所有库位的批次混放规则") | ||
| 109 | + @PreAuthorize("@ss.hasPermission('mes:wm-warehouse:update')") | ||
| 110 | + public CommonResult<Boolean> setBatchMixing(@RequestParam("locationId") Long locationId, | ||
| 111 | + @RequestParam("allow") Boolean allow) { | ||
| 112 | + areaService.updateAllowBatchMixingByLocationId(locationId, allow); | ||
| 113 | + return success(true); | ||
| 114 | + } | ||
| 115 | + | ||
| 97 | // ==================== 拼接 VO ==================== | 116 | // ==================== 拼接 VO ==================== |
| 98 | 117 | ||
| 99 | /** | 118 | /** |