自动化立体仓库 - WMS系统
lty
8 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/java/com/zy/asrs/controller/BasWrkIotypeController.java
@@ -61,54 +61,54 @@
    @ManagerAuth
    public R edit(BasWrkIotype basWrkIotype) {
        if (Cools.isEmpty(basWrkIotype)){
            return R.error();
            return R.error("response.param_error");
        }
        if (null == basWrkIotype.getIoType()){
            basWrkIotypeService.insert(basWrkIotype);
        } else {
            basWrkIotypeService.updateById(basWrkIotype);
        }
        return R.ok();
        return R.ok("response.save_success");
    }
    @RequestMapping(value = "/basWrkIotype/add/auth")
    @ManagerAuth(memo = "入出库类型添加")
    @ManagerAuth(memo = "response.bas_wrk_iotype_add")
    public R add(BasWrkIotype basWrkIotype) {
        basWrkIotype.setModiUser(getUserId());
        basWrkIotype.setModiTime(new Date());
        basWrkIotype.setAppeUser(getUserId());
        basWrkIotype.setAppeTime(new Date());
        basWrkIotypeService.insert(basWrkIotype);
        return R.ok();
        return R.ok("response.save_success");
    }
   @RequestMapping(value = "/basWrkIotype/update/auth")
    @ManagerAuth(memo = "入出库类型修改")
    @RequestMapping(value = "/basWrkIotype/update/auth")
    @ManagerAuth(memo = "response.bas_wrk_iotype_update")
    public R update(BasWrkIotype basWrkIotype){
        if (Cools.isEmpty(basWrkIotype) || null==basWrkIotype.getIoType()){
            return R.error();
            return R.error("response.param_error");
        }
        basWrkIotype.setModiUser(getUserId());
        basWrkIotype.setModiTime(new Date());
        basWrkIotypeService.updateById(basWrkIotype);
        return R.ok();
        return R.ok("response.update_success");
    }
    @RequestMapping(value = "/basWrkIotype/delete/auth")
    @ManagerAuth(memo = "入出库类型删除")
    @ManagerAuth(memo = "response.bas_wrk_iotype_delete")
    public R delete(@RequestParam String param){
        List<BasWrkIotype> list = JSONArray.parseArray(param, BasWrkIotype.class);
        if (Cools.isEmpty(list)){
            return R.error();
            return R.error("response.param_error");
        }
        for (BasWrkIotype entity : list){
            basWrkIotypeService.delete(new EntityWrapper<>(entity));
        }
        return R.ok();
        return R.ok("response.delete_success");
    }
    @RequestMapping(value = "/basWrkIotype/export/auth")
    @ManagerAuth(memo = "入出库类型导出")
    @ManagerAuth(memo = "response.bas_wrk_iotype_export")
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>();
@@ -123,7 +123,7 @@
    public R query(String condition) {
        EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>();
        wrapper.like("io_desc", condition);
        Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 10), wrapper);
        Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 20), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (BasWrkIotype basWrkIotype : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
@@ -139,7 +139,9 @@
    public R query(@RequestBody JSONObject param) {
        Wrapper<BasWrkIotype> wrapper = new EntityWrapper<BasWrkIotype>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != basWrkIotypeService.selectOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(BasWrkIotype.class, String.valueOf(param.get("key"))));
            R r = R.parse(BaseRes.REPEAT);
            r.put("data", getComment(BasWrkIotype.class, String.valueOf(param.get("key"))));
            return r;
        }
        return R.ok();
    }