| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastExecute/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_mast_execute_add") |
| | | public R add(WrkMastExecute wrkMastExecute) { |
| | | wrkMastExecuteService.insert(wrkMastExecute); |
| | | return R.ok(); |
| | | return R.ok("response.save_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastExecute/update/auth") |
| | | @ManagerAuth |
| | | @RequestMapping(value = "/wrkMastExecute/update/auth") |
| | | @ManagerAuth(memo = "response.wrk_mast_execute_update") |
| | | public R update(WrkMastExecute wrkMastExecute){ |
| | | if (Cools.isEmpty(wrkMastExecute) || null==wrkMastExecute.getWrkNo()){ |
| | | return R.error(); |
| | | return R.error("response.param_error"); |
| | | } |
| | | wrkMastExecuteService.updateById(wrkMastExecute); |
| | | return R.ok(); |
| | | return R.ok("response.update_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastExecute/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_mast_execute_delete") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | wrkMastExecuteService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.delete_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastExecute/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_mast_execute_export") |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<WrkMastExecute> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMastExecute> wrapper = new EntityWrapper<WrkMastExecute>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastExecuteService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastExecute.class, String.valueOf(param.get("key")))); |
| | | R r = R.parse(BaseRes.REPEAT); |
| | | r.put("data", getComment(WrkMastExecute.class, String.valueOf(param.get("key")))); |
| | | return r; |
| | | } |
| | | return R.ok(); |
| | | } |