自动化立体仓库 - WMS系统
野心家
2024-07-07 3c8343535bec2a53855956e25598e2271fc84c0d
更新测试管理搜索功能
2个文件已修改
34 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/TestMastController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/testMast/testMast.html 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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){
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">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
                            <i class="layui-icon">&#xe615;</i>搜索