From 20bd270fbecc8356a17b1b429eb97abe1a48700e Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 09 七月 2025 16:43:37 +0800
Subject: [PATCH] 1
---
src/main/java/com/zy/asrs/controller/WrkMastLogController.java | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/WrkMastLogController.java b/src/main/java/com/zy/asrs/controller/WrkMastLogController.java
index 6bad9f4..9a41f8e 100644
--- a/src/main/java/com/zy/asrs/controller/WrkMastLogController.java
+++ b/src/main/java/com/zy/asrs/controller/WrkMastLogController.java
@@ -12,6 +12,7 @@
import com.core.common.R;
import com.zy.asrs.entity.WrkMastLog;
import com.zy.asrs.service.WrkMastLogService;
+import com.zy.common.utils.RoleUtils;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -51,19 +52,26 @@
}
wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
}else {
- wrapper.orderBy("io_time", false);
+ wrapper.orderBy("modi_time", false);
}
+ // 涓嶅悓缁ф壙瑙掕壊鏄剧ず涓嶅悓搴撲俊鎭�
+ RoleUtils.addRoleWrapperByCrn(getUserId(),wrapper);
return R.ok(wrkMastLogService.selectPage(new Page<>(curr, limit), wrapper));
}
- private void convert(Map<String, Object> map, EntityWrapper wrapper){
+ private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
for (Map.Entry<String, Object> entry : map.entrySet()){
- if (entry.getKey().endsWith(">")) {
- wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
- } else if (entry.getKey().endsWith("<")) {
- wrapper.le(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
+ String val = String.valueOf(entry.getValue());
+ if (val.contains(RANGE_TIME_LINK)){
+ String[] dates = val.split(RANGE_TIME_LINK);
+ wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
+ wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
} else {
- wrapper.eq(entry.getKey(), String.valueOf(entry.getValue()));
+ if (entry.getKey().equals("manu_type")) {
+ wrapper.like(entry.getKey(), val);
+ } else {
+ wrapper.eq(entry.getKey(), val);
+ }
}
}
}
--
Gitblit v1.9.1