| | |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.eq(entry.getKey(), val); |
| | | if (entry.getKey().equals("manu_type")) { |
| | | wrapper.like(entry.getKey(), val); |
| | | } else { |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/add/auth") |
| | | @ManagerAuth(memo = "工作历史档添加") |
| | | @ManagerAuth(memo = "response.work_history_add") |
| | | public R add(WrkMastLog wrkMastLog) { |
| | | wrkMastLogService.insert(wrkMastLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/update/auth") |
| | | @ManagerAuth(memo = "工作历史档修改") |
| | | @ManagerAuth(memo = "response.work_history_update") |
| | | public R update(WrkMastLog wrkMastLog){ |
| | | if (Cools.isEmpty(wrkMastLog) || null==wrkMastLog.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/delete/auth") |
| | | @ManagerAuth(memo = "工作历史档删除") |
| | | @ManagerAuth(memo = "response.work_history_delete") |
| | | public R delete(@RequestParam String param){ |
| | | List<WrkMastLog> list = JSONArray.parseArray(param, WrkMastLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/export/auth") |
| | | @ManagerAuth(memo = "工作历史档导出") |
| | | @ManagerAuth(memo = "response.work_history_export") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMastLog> wrapper = new EntityWrapper<WrkMastLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastLog.class, String.valueOf(param.get("key")))); |
| | | R r = R.parse(BaseRes.REPEAT); |
| | | r.put("data", getComment(WrkMastLog.class, String.valueOf(param.get("key")))); |
| | | return r; |
| | | } |
| | | return R.ok(); |
| | | } |