| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/stkPlcm/add/auth") |
| | | @ManagerAuth(memo = "堆垛机异常日志添加") |
| | | @ManagerAuth(memo = "response.stk_plcm_add") |
| | | public R add(StkPlcm stkPlcm) { |
| | | stkPlcmService.insert(stkPlcm); |
| | | return R.ok(); |
| | | return R.ok("response.operation_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stkPlcm/delete/auth") |
| | | @ManagerAuth(memo = "堆垛机异常日志删除") |
| | | @ManagerAuth(memo = "response.stk_plcm_delete") |
| | | public R delete(@RequestParam String param){ |
| | | List<StkPlcm> list = JSONArray.parseArray(param, StkPlcm.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | return R.error("response.data_empty"); |
| | | } |
| | | for (StkPlcm entity : list){ |
| | | stkPlcmService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.delete_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stkPlcm/export/auth") |
| | | @ManagerAuth(memo = "堆垛机异常日志导出") |
| | | @ManagerAuth(memo = "response.stk_plcm_export") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<StkPlcm> wrapper = new EntityWrapper<>(); |
| | |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<StkPlcm> wrapper = new EntityWrapper<StkPlcm>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != stkPlcmService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(StkPlcm.class, String.valueOf(param.get("key")))); |
| | | R r = R.parse(BaseRes.REPEAT); |
| | | r.put("data", getComment(StkPlcm.class, String.valueOf(param.get("key")))); |
| | | return r; |
| | | } |
| | | return R.ok(); |
| | | } |