自动化立体仓库 - WMS系统
zhangc
2025-03-09 dfc9552392f9f973ab52e55d58a7ae2acdaeb1f3
src/main/java/com/zy/asrs/controller/AgvWrkMastLogController.java
@@ -58,6 +58,30 @@
        return R.ok(wrkMastLogService.selectPage(new Page<>(curr, limit), wrapper));
    }
    @RequestMapping(value = "/wrkMastLogWithWrktype/list/auth")
    @ManagerAuth
    public R wrkMastLogWithWrktypeList(@RequestParam(defaultValue = "1")Integer curr,
                  @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){
        excludeTrash(param);
        EntityWrapper<AgvWrkMastLog> wrapper = new EntityWrapper<>();
        convert(param, wrapper);
        allLike(AgvWrkMastLog.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("modi_time", false);
        }
        return R.ok(wrkMastLogService.selectPage(new Page<>(curr, limit), wrapper));
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
@@ -86,7 +110,7 @@
   @ManagerAuth(memo = "工作历史档修改")
    public R update(AgvWrkMastLog wrkMastLog){
        if (Cools.isEmpty(wrkMastLog) || null==wrkMastLog.getId()){
            return R.error();
            return R.error("参数缺失");
        }
        wrkMastLogService.updateById(wrkMastLog);
        return R.ok();
@@ -97,7 +121,7 @@
    public R delete(@RequestParam String param){
        List<AgvWrkMastLog> list = JSONArray.parseArray(param, AgvWrkMastLog.class);
        if (Cools.isEmpty(list)){
            return R.error();
            return R.error("参数缺失");
        }
        for (AgvWrkMastLog entity : list){
            wrkMastLogService.delete(new EntityWrapper<>(entity));