| | |
| | | return R.ok(basCrnpService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | | } else if (entry.getKey().endsWith("<")) { |
| | | wrapper.le(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.eq(entry.getKey(), String.valueOf(entry.getValue())); |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/basCrnp/getCrnInfoList") |
| | | public R getCrnInfoList() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>()); |
| | | ArrayList<HashMap<String, Object>> list = new ArrayList<>(); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("crnNo", basCrnp.getCrnNo()); |
| | | map.put("error", basCrnp.getCrnErr()); |
| | | map.put("errorMsg", basCrnp.getCrnErr$()); |
| | | list.add(map); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | } |