|  |  | 
 |  |  | package com.zy.asrs.wms.controller; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSONArray; | 
 |  |  | import com.alibaba.fastjson.JSONObject; | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
 |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
 |  |  | import com.zy.asrs.common.wms.entity.WrkLastno; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/wrkLastno/{id}/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R get(@PathVariable("id") String id) { | 
 |  |  |         return R.ok(wrkLastnoService.getById(String.valueOf(id))); | 
 |  |  |     public R get(@PathVariable("id") Long id) { | 
 |  |  |         return R.ok(wrkLastnoService.getById(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/wrkLastno/page/auth") | 
 |  |  | 
 |  |  |                   @RequestParam(required = false) String timeRange, | 
 |  |  |                   @RequestParam Map<String, Object> param) { | 
 |  |  |         LambdaQueryWrapper<WrkLastno> wrapper = new LambdaQueryWrapper<>(); | 
 |  |  |         wrapper.eq(WrkLastno::getHostId, getHostId()); | 
 |  |  |         if (!Cools.isEmpty(condition)) { | 
 |  |  |             wrapper.like(WrkLastno::getWrkMk, condition); | 
 |  |  |         } | 
 |  |  | 
 |  |  |             wrapper.ge(WrkLastno::getAppeTime, DateUtils.convert(range[0])); | 
 |  |  |             wrapper.le(WrkLastno::getAppeTime, DateUtils.convert(range[1])); | 
 |  |  |         } | 
 |  |  |         return R.ok(wrkLastnoService.page(new Page<>(curr, limit), wrapper)); | 
 |  |  |         Page<WrkLastno> page = wrkLastnoService.page(new Page<>(curr, limit), wrapper); | 
 |  |  |         return R.ok(page); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/wrkLastno/add/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R add(WrkLastno wrkLastno) { | 
 |  |  |         wrkLastno.setHostId(getHostId()); | 
 |  |  |         wrkLastnoService.save(wrkLastno); | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R query(String condition) { | 
 |  |  |         LambdaQueryWrapper<WrkLastno> wrapper = new LambdaQueryWrapper<>(); | 
 |  |  |         wrapper.eq(WrkLastno::getHostId, getHostId()); | 
 |  |  |         wrapper.like(WrkLastno::getWrkMk, condition); | 
 |  |  |         Page<WrkLastno> page = wrkLastnoService.page(new Page<>(0, 10), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  | 
 |  |  |     public R getDataKV(@RequestParam(required = false) String condition) { | 
 |  |  |         List<KeyValueVo> vos = new ArrayList<>(); | 
 |  |  |         LambdaQueryWrapper<WrkLastno> wrapper = new LambdaQueryWrapper<>(); | 
 |  |  |         wrapper.eq(WrkLastno::getHostId, getHostId()); | 
 |  |  |         if (!Cools.isEmpty(condition)) { | 
 |  |  |             wrapper.like(WrkLastno::getWrkMk, condition); | 
 |  |  |         } |