From 3c8343535bec2a53855956e25598e2271fc84c0d Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期日, 07 七月 2024 10:28:21 +0800
Subject: [PATCH] 更新测试管理搜索功能
---
src/main/webapp/views/testMast/testMast.html | 10 ++++++++++
src/main/java/com/zy/asrs/controller/TestMastController.java | 24 ++++++++++++++++++++----
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/TestMastController.java b/src/main/java/com/zy/asrs/controller/TestMastController.java
index 485e7ab..a5c3239 100644
--- a/src/main/java/com/zy/asrs/controller/TestMastController.java
+++ b/src/main/java/com/zy/asrs/controller/TestMastController.java
@@ -7,6 +7,7 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.TestMast;
+import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.TestMastService;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
@@ -36,14 +37,29 @@
@RequestParam(defaultValue = "10")Integer limit,
@RequestParam(required = false)String orderByField,
@RequestParam(required = false)String orderByType,
+ @RequestParam(required = false)String condition,
@RequestParam Map<String, Object> param){
- EntityWrapper<TestMast> wrapper = new EntityWrapper<>();
+
excludeTrash(param);
+ EntityWrapper<TestMast> wrapper = new EntityWrapper<>();
convert(param, wrapper);
- orderByField="status";
- orderByType="asc";
- if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ allLike(TestMast.class, param.keySet(), wrapper, condition);
+ if (!Cools.isEmpty(orderByField)){
+ if (orderByField.endsWith("$")){
+ orderByField = orderByField.substring(0, orderByField.length()-1);
+ }
+ wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
+ }else {
+ wrapper.orderBy("appe_time", false);
+ }
return R.ok(testMastService.selectPage(new Page<>(curr, limit), wrapper));
+// EntityWrapper<TestMast> wrapper = new EntityWrapper<>();
+// excludeTrash(param);
+// convert(param, wrapper);
+// orderByField="status";
+// orderByType="asc";
+// if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+// return R.ok(testMastService.selectPage(new Page<>(curr, limit), wrapper));
}
private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
diff --git a/src/main/webapp/views/testMast/testMast.html b/src/main/webapp/views/testMast/testMast.html
index 1487f4b..23db033 100644
--- a/src/main/webapp/views/testMast/testMast.html
+++ b/src/main/webapp/views/testMast/testMast.html
@@ -23,6 +23,16 @@
<input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off">
</div>
</div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="barcode" placeholder="Pack鍖呯爜" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="user_id" placeholder="鎵樼洏鐮�" autocomplete="off">
+ </div>
+ </div>
<div class="layui-inline"> 
<button class="layui-btn icon-btn" lay-filter="search" lay-submit>
<i class="layui-icon"></i>鎼滅储
--
Gitblit v1.9.1