From 706319efad928f4df75507956a30ad95f50befee Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期三, 26 十一月 2025 13:12:07 +0800
Subject: [PATCH] 库存信息添加动态字段查询功能
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocItemController.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocItemController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocItemController.java
index 8767670..fc8bddd 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocItemController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocItemController.java
@@ -14,6 +14,7 @@
import com.vincent.rsf.server.common.utils.FieldsUtils;
import com.vincent.rsf.server.manager.controller.params.LocToTaskParams;
import com.vincent.rsf.server.manager.entity.LocItem;
+import com.vincent.rsf.server.manager.entity.ViewStockManage;
import com.vincent.rsf.server.manager.enums.TaskResouceType;
import com.vincent.rsf.server.manager.service.LocItemService;
import com.vincent.rsf.server.manager.service.LocService;
@@ -41,8 +42,11 @@
BaseParam baseParam = buildParam(map, BaseParam.class);
PageParam<LocItem, BaseParam> pageParam = new PageParam<>(baseParam, LocItem.class);
+ QueryWrapper<LocItem> wrapper = pageParam.buildWrapper(true);
+ FieldsUtils.setFieldsFilters(wrapper, pageParam, LocItem.class);
+
/**鎷兼帴鎵╁睍瀛楁*/
- PageParam<LocItem, BaseParam> page = locItemService.page(pageParam, pageParam.buildWrapper(true));
+ PageParam<LocItem, BaseParam> page = locItemService.page(pageParam, wrapper);
List<LocItem> records = page.getRecords();
for (LocItem record : records) {
if (!Objects.isNull(record.getFieldsIndex())) {
@@ -160,7 +164,7 @@
@PreAuthorize("hasAuthority('manager:locItem:list')")
@GetMapping("/locItem/{id}")
public R get(@PathVariable("id") Long id) {
- return R.ok().add(locService.getById(id));
+ return R.ok().add(locItemService.getById(id));
}
@PreAuthorize("hasAuthority('manager:locItem:save')")
--
Gitblit v1.9.1