From 8c65f898ed6e5b0c7a94c792c4562f6ec831dccd Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 07 十一月 2026 08:50:53 +0800
Subject: [PATCH] feat: 完善质检、生产、销售、财务与人事模块并接入审批流程
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/MesDvMachineryController.java | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/MesDvMachineryController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/MesDvMachineryController.java
index 864bf15..8c18b06 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/MesDvMachineryController.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/MesDvMachineryController.java
@@ -54,6 +54,8 @@
private MesMdWorkshopService workshopService;
@Resource
private cn.iocoder.yudao.module.mes.service.md.workstation.MesMdWorkstationService workstationService;
+ @Resource
+ private cn.iocoder.yudao.module.mes.service.md.workstation.MesMdWorkstationMachineService workstationMachineService;
@PostMapping("/create")
@Operation(summary = "鍒涘缓璁惧")
@@ -82,7 +84,6 @@
@GetMapping("/get")
@Operation(summary = "鑾峰緱璁惧")
@Parameter(name = "id", description = "缂栧彿", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('mes:dv-machinery:query')")
public CommonResult<MesDvMachineryRespVO> getMachinery(@RequestParam("id") Long id) {
MesDvMachineryDO machinery = machineryService.getMachinery(id);
if (machinery == null) {
@@ -93,7 +94,6 @@
@GetMapping("/page")
@Operation(summary = "鑾峰緱璁惧鍒嗛〉")
- @PreAuthorize("@ss.hasPermission('mes:dv-machinery:query')")
public CommonResult<PageResult<MesDvMachineryRespVO>> getMachineryPage(@Valid MesDvMachineryPageReqVO pageReqVO) {
PageResult<MesDvMachineryDO> pageResult = machineryService.getMachineryPage(pageReqVO);
return success(new PageResult<>(buildMachineryRespVOList(pageResult.getList()), pageResult.getTotal()));
@@ -113,10 +113,17 @@
}
@GetMapping("/simple-list")
- @Operation(summary = "鑾峰緱璁惧绮剧畝鍒楄〃", description = "涓昏鐢ㄤ簬鍓嶇鐨勪笅鎷夐�夐」")
- @PreAuthorize("@ss.hasPermission('mes:dv-machinery:query')")
- public CommonResult<List<MesDvMachineryRespVO>> getMachinerySimpleList() {
+ @Operation(summary = "鑾峰緱璁惧绮剧畝鍒楄〃", description = "涓昏鐢ㄤ簬鍓嶇鐨勪笅鎷夐�夐」锛涗紶 workstationId 鏃跺彧杩斿洖璇ュ伐浣滅珯缁戝畾鐨勮澶�")
+ @Parameter(name = "workstationId", description = "宸ヤ綔绔欑紪鍙凤紝鍙�夛紱浼犲垯鍙繑鍥炶宸ヤ綔绔欑粦瀹氱殑璁惧")
+ public CommonResult<List<MesDvMachineryRespVO>> getMachinerySimpleList(
+ @RequestParam(value = "workstationId", required = false) Long workstationId) {
List<MesDvMachineryDO> list = machineryService.getMachineryList();
+ if (workstationId != null) {
+ var boundIds = cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet(
+ workstationMachineService.getWorkstationMachineListByWorkstationId(workstationId),
+ cn.iocoder.yudao.module.mes.dal.dataobject.md.workstation.MesMdWorkstationMachineDO::getMachineryId);
+ list = list.stream().filter(machinery -> boundIds.contains(machinery.getId())).toList();
+ }
return success(BeanUtils.toBean(list, MesDvMachineryRespVO.class));
}
--
Gitblit v1.9.3