|  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.Arrays; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/api") | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    @PreAuthorize("hasAuthority('asrs:orderType:list')") | 
|---|
|  |  |  | //    @PostMapping("/orderType/all/list") | 
|---|
|  |  |  | //    public R query(@RequestBody HashMap<String, Object> params) { | 
|---|
|  |  |  | //        List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | //        List<Integer> types = (List<Integer>) params.get("type"); | 
|---|
|  |  |  | //        String condition = (String) params.get("condition"); | 
|---|
|  |  |  | //        List<OrderType> orderTypes = orderTypeService.list(new LambdaQueryWrapper<OrderType>().like(!Cools.isEmpty(condition), OrderType::getName, condition).in(!types.isEmpty(), OrderType::getType, types)); | 
|---|
|  |  |  | //        orderTypes.forEach(item -> { | 
|---|
|  |  |  | //            vos.add(new KeyValVo(item.getId(), item.getName())); | 
|---|
|  |  |  | //        }); | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //        return R.ok().add(vos); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:orderType:list')") | 
|---|
|  |  |  | @PostMapping("/orderType/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|