|  |  |  | 
|---|
|  |  |  | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); | 
|---|
|  |  |  | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | wrapper.like(entry.getKey(), val); | 
|---|
|  |  |  | wrapper.eq(entry.getKey(), val); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/orderDetlQuery/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R query(String condition) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(condition.split(",").length < 2){ | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String maktxCondition = condition.split(",")[0]; | 
|---|
|  |  |  | Long orderId = Long.parseLong(condition.split(",")[1]); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); | 
|---|
|  |  |  | wrapper.like("id", condition); | 
|---|
|  |  |  | wrapper.eq("order_id",orderId); | 
|---|
|  |  |  | wrapper.like("maktx", maktxCondition); | 
|---|
|  |  |  | Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(0, 10), wrapper); | 
|---|
|  |  |  | List<Map<String, Object>> result = new ArrayList<>(); | 
|---|
|  |  |  | for (OrderDetl orderDetl : page.getRecords()){ | 
|---|
|  |  |  | Map<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | map.put("id", orderDetl.getId()); | 
|---|
|  |  |  | map.put("value", orderDetl.getId()); | 
|---|
|  |  |  | map.put("value", orderDetl.getMaktx()); | 
|---|
|  |  |  | map.put("weight",orderDetl.getAnfme() - orderDetl.getWorkQty()); | 
|---|
|  |  |  | map.put("type","orderDetl"); | 
|---|
|  |  |  | result.add(map); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(result); | 
|---|