| | |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | wrapper.like("matnr", condition).or().like("maktx", condition); |
| | | Page<Mat> page = matService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Mat mat : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", mat.getId()); |
| | | map.put("value", mat.getId()); |
| | | map.put("value", mat.getMatnr() + "(" + mat.getMaktx() + ")"); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |