|  |  | 
 |  |  | import com.core.common.R; | 
 |  |  | import com.core.exception.CoolException; | 
 |  |  | import com.zy.asrs.entity.TrayCode; | 
 |  |  | import com.zy.asrs.entity.param.TrayCodeParam; | 
 |  |  | import com.zy.asrs.service.TrayCodeService; | 
 |  |  | import com.zy.common.web.BaseController; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/trayCode/print/preview") | 
 |  |  |     @PostMapping(value = "/trayCode/print/preview") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R printPreview(@RequestParam String startNo, | 
 |  |  |                    @RequestParam Integer count, | 
 |  |  |                    @RequestParam Integer type) { | 
 |  |  |         if (count <= 0) { | 
 |  |  |     public R printPreview(@RequestParam TrayCodeParam param) { | 
 |  |  |         if (param.getCount() <= 0) { | 
 |  |  |             return R.error("数量必须大于零"); | 
 |  |  |         } | 
 |  |  |         List<String> res = new ArrayList<>(); | 
 |  |  |         for (int i = 0; i<count; i++) { | 
 |  |  |             res.add(String.valueOf(Integer.parseInt(startNo)+i)); | 
 |  |  |         List<Map<String, Object>> res = new ArrayList<>(); | 
 |  |  |         for (int i = 0; i<param.getCount(); i++) { | 
 |  |  |             res.add(Cools.add("item", String.valueOf(Integer.parseInt(param.getStartNo())+i))); | 
 |  |  |         } | 
 |  |  |         return R.ok().add(res); | 
 |  |  |     } |