| | |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | Object nodeId = param.get("node_id"); |
| | | if (Cools.isEmpty(nodeId)) { |
| | | nodeId = getOriginNode().getId(); |
| | | param.put("node_id", String.valueOf(nodeId)); |
| | | } |
| | | if (!Cools.isEmpty(param.get("update_time"))){ |
| | | String val = String.valueOf(param.get("update_time")); |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | param.put("startTime", DateUtils.convert(dates[0])); |
| | | param.put("endTime", DateUtils.convert(dates[1])); |
| | | param.remove("update_time"); |
| | | } |
| | | } |
| | | return R.ok(locDetlService.getPage(toPage(curr, limit, param, LocDetl.class))); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |