| | |
| | | try { |
| | | Integer wrkNo = null; |
| | | String orderNo = null; |
| | | String matnr = null; |
| | | String specs = null; |
| | | String zpallet = null; |
| | | String batch = null; |
| | | Double anfme = null; |
| | | Date modiTimeStart = null, modiTimeEnd = null; |
| | | for (Map.Entry<String, Object> entry : param.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | |
| | | modiTimeEnd = DateUtils.convert(dates[1]); |
| | | } else if (entry.getKey().equals("wrk_no")) { |
| | | wrkNo = Integer.parseInt(val); |
| | | } else if (entry.getKey().equals("condition")) { |
| | | } else if (entry.getKey().equals("order_no")) { |
| | | orderNo = val; |
| | | } else if (entry.getKey().equals("specs")) { |
| | | specs = val; |
| | | } else if (entry.getKey().equals("zpallet")) { |
| | | zpallet = val; |
| | | } else if (entry.getKey().equals("batch")) { |
| | | batch = val; |
| | | } else if (entry.getKey().equals("anfme")) { |
| | | anfme = Double.parseDouble(val); |
| | | }else if (entry.getKey().equals("matnr")) { |
| | | matnr = val; |
| | | } |
| | | } |
| | | List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectWrkDetlLogs(wrkNo, orderNo, modiTimeStart, modiTimeEnd, curr, limit); |
| | | List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectWrkDetlLogs(wrkNo, orderNo,matnr,specs,zpallet,batch,anfme, modiTimeStart, modiTimeEnd, curr, limit); |
| | | Page<WrkDetlLog> page1 = new Page<WrkDetlLog>(curr, limit).setRecords(wrkDetlLogs); |
| | | page1.setTotal(wrkDetlLogService.selectWrkDetlLogsTotal(wrkNo, orderNo, modiTimeStart, modiTimeEnd)); |
| | | 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); |
| | |
| | | @ManagerAuth |
| | | 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")))); |
| | | if (null != wrkDetlLogService.selectOne(wrapper)){ |
| | | 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"); |
| | | } |
| | | |
| | | } |