自动化立体仓库 - WMS系统
#
野心家
2025-04-09 69414cd2a7f04b4f31d152b51876f3b559b43a3a
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){