| | |
| | | rowLastno.setAppeUser(getUserId()); |
| | | rowLastno.setAppeTime(new Date()); |
| | | rowLastnoService.insert(rowLastno); |
| | | return R.ok(); |
| | | return R.ok("response.save_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rowLastno/update/auth") |
| | | @ManagerAuth |
| | | public R update(RowLastno rowLastno){ |
| | | if (Cools.isEmpty(rowLastno) || null==rowLastno.getWhsType()){ |
| | | return R.error(); |
| | | return R.error("response.param_error"); |
| | | } |
| | | rowLastno.setModiUser(getUserId()); |
| | | rowLastno.setModiTime(new Date()); |
| | | rowLastnoService.updateById(rowLastno); |
| | | return R.ok(); |
| | | return R.ok("response.update_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rowLastno/delete/auth") |
| | |
| | | public R delete(@RequestParam String param){ |
| | | List<RowLastno> list = JSONArray.parseArray(param, RowLastno.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | return R.error("response.param_error"); |
| | | } |
| | | for (RowLastno entity : list){ |
| | | rowLastnoService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.delete_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rowLastno/export/auth") |
| | |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<RowLastno> wrapper = new EntityWrapper<RowLastno>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != rowLastnoService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(RowLastno.class, String.valueOf(param.get("key")))); |
| | | R r = R.parse(BaseRes.REPEAT); |
| | | r.put("data", getComment(RowLastno.class, String.valueOf(param.get("key")))); |
| | | return r; |
| | | } |
| | | return R.ok(); |
| | | } |