自动化立体仓库 - WMS系统
lty
8 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/java/com/zy/asrs/controller/PackController.java
@@ -49,7 +49,7 @@
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
            wrapper.orderBy("create_time", false);
            wrapper.orderBy("settle").orderBy("create_time", false);
        }
        return R.ok(packService.selectPage(new Page<>(curr, limit), wrapper));
    }
@@ -79,7 +79,7 @@
        pack.setCreateBy(getUserId());
        pack.setCreateTime(now);
        if (!packService.insert(pack)) {
            throw new CoolException("服务器内部错误,请联系管理员");
            throw new CoolException("response.server_internal_error_contact_admin");
        }
        Mat mat = new Mat();
        mat.setTagId(tagService.getTop().getId());
@@ -88,23 +88,23 @@
        mat.setStatus(1);
        mat.setCreateTime(now);
        mat.setUpdateTime(now);
        mat.setMemo("打包上线");
        mat.setMemo("response.pack_online");
        if (!matService.insert(mat)) {
            throw new CoolException("服务器内部错误,请联系管理员");
            throw new CoolException("response.server_internal_error_contact_admin");
        }
        return R.ok();
        return R.ok("response.save_success");
    }
   @RequestMapping(value = "/pack/update/auth")
   @ManagerAuth
    @ManagerAuth
    public R update(Pack pack){
        if (Cools.isEmpty(pack) || null==pack.getId()){
            return R.error();
            return R.error("response.param_error");
        }
        pack.setUpdateBy(getUserId());
        pack.setUpdateTime(new Date());
        packService.updateById(pack);
        return R.ok();
        return R.ok("response.update_success");
    }
    @RequestMapping(value = "/pack/delete/auth")
@@ -113,7 +113,7 @@
         for (Long id : ids){
            packService.deleteById(id);
        }
        return R.ok();
        return R.ok("response.delete_success");
    }
    @RequestMapping(value = "/pack/export/auth")
@@ -148,9 +148,11 @@
    public R query(@RequestBody JSONObject param) {
        Wrapper<Pack> wrapper = new EntityWrapper<Pack>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != packService.selectOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(Pack.class, String.valueOf(param.get("key"))));
            R r = R.parse(BaseRes.REPEAT);
            r.put("data",  getComment(Pack.class, String.valueOf(param.get("key"))));
            return r;
        }
        return R.ok();
        return R.ok("response.operation_success");
    }
}