| | |
| | | page1.setTotal(wrkDetlLogService.selectWrkDetlLogsTotal(wrkNo, orderNo,matnr,specs,zpallet,batch,anfme, modiTimeStart, modiTimeEnd)); |
| | | return R.ok(page1); |
| | | } catch (Exception e) { |
| | | return R.error("异常" + e); |
| | | return R.error("response.server_exception"); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_detl_log_add") |
| | | public R add(WrkDetlLog wrkDetlLog) { |
| | | wrkDetlLogService.insert(wrkDetlLog); |
| | | return R.ok(); |
| | | return R.ok("response.save_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_detl_log_update") |
| | | public R update(WrkDetlLog wrkDetlLog) { |
| | | if (Cools.isEmpty(wrkDetlLog) || null == wrkDetlLog.getWrkNo()) { |
| | | return R.error(); |
| | | return R.error("response.parameter_error"); |
| | | } |
| | | wrkDetlLogService.updateById(wrkDetlLog); |
| | | return R.ok(); |
| | | return R.ok("response.update_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_detl_log_delete") |
| | | public R delete(@RequestParam String param) { |
| | | List<WrkDetlLog> list = JSONArray.parseArray(param, WrkDetlLog.class); |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | return R.error("response.parameter_error"); |
| | | } |
| | | for (WrkDetlLog entity : list) { |
| | | wrkDetlLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.delete_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.wrk_detl_log_export") |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkDetlLog> wrapper = new EntityWrapper<WrkDetlLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkDetlLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkDetlLog.class, String.valueOf(param.get("key")))); |
| | | R r = R.parse(BaseRes.REPEAT); |
| | | r.put("data", getComment(WrkDetlLog.class, String.valueOf(param.get("key")))); |
| | | return r; |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.operation_success"); |
| | | } |
| | | |
| | | } |