|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.R; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.PickSheetDetl; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.param.PageRequest; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.service.PickSheetService; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/pick") | 
|---|
|  |  |  | @RequestMapping("/api") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class PickSheetController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickSheetService pickSheetService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 平仓出库拣货单 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/pick/flat/page") | 
|---|
|  |  |  | public R getOutFlatSheet(@RequestBody PageRequest params) { | 
|---|
|  |  |  | IPage page = pickSheetService.getOutFlatSheet(params); | 
|---|
|  |  |  | return R.ok(page.getRecords()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取拣货单明细 | 
|---|
|  |  |  | * @param pageRequest | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/pick/flat/detl/page") | 
|---|
|  |  |  | public R getSheetDetl(@RequestBody PageRequest pageRequest) { | 
|---|
|  |  |  | IPage page = pickSheetService.getSheetDetl(pageRequest); | 
|---|
|  |  |  | return R.ok(page.getRecords()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取拣货单明细 | 
|---|
|  |  |  | * @param id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("/pick/flat/remove/{id}") | 
|---|
|  |  |  | public R getRemoveSheet(@PathVariable String id) { | 
|---|
|  |  |  | int result = pickSheetService.removePickSheet(Long.valueOf(id)); | 
|---|
|  |  |  | if (result > 0) { | 
|---|
|  |  |  | return R.ok("删除成功!!"); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | return R.error("删除失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|