|  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:warehouseAreas:save')") | 
|---|
|  |  |  | @PostMapping("/orders/confirm") | 
|---|
|  |  |  | @ApiOperation("确认收货") | 
|---|
|  |  |  | public R confirmReceipt(@RequestBody ReceiptParams params) { | 
|---|
|  |  |  | public R confirmReceipt(@RequestBody Map<String, Object> params) { | 
|---|
|  |  |  | if (Objects.isNull(params)) { | 
|---|
|  |  |  | throw new CoolException("请求参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | return mobileService.getDeltByCode(code); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") | 
|---|
|  |  |  | @ApiOperation("获取拖盘明细") | 
|---|
|  |  |  | @PostMapping("/asnOrderItem/container") | 
|---|
|  |  |  | public R getItemByContainer(@RequestBody Map<String, Object> params) { | 
|---|
|  |  |  | if (Objects.isNull(params)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return mobileService.getItemByContainer(params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
|---|
|  |  |  | @ApiOperation("组拖") | 
|---|
|  |  |  | @PostMapping("/waitPakin/merge") | 
|---|
|  |  |  | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { | 
|---|
|  |  |  | Long userId = getLoginUserId(); | 
|---|
|  |  |  | if (Objects.isNull(waitPakin)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { | 
|---|
|  |  |  | return R.error("跟踪码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(mobileService.mergeItems(waitPakin)); | 
|---|
|  |  |  | return R.ok(mobileService.mergeItems(waitPakin, userId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("快带质检") | 
|---|
|  |  |  | @ApiOperation("快速质检") | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:qlyInspect:update')") | 
|---|
|  |  |  | @PostMapping("/inspect/check/update") | 
|---|
|  |  |  | public R checkUpdate(@RequestBody QlyIsptItem params) { | 
|---|
|  |  |  | if (Objects.isNull(params)) { | 
|---|
|  |  |  | public R checkUpdate(@RequestBody List<QlyIsptItem> params) { | 
|---|
|  |  |  | if (Objects.isNull(params) || params.isEmpty()) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return mobileService.checkUpdate(params); | 
|---|
|  |  |  | 
|---|
|  |  |  | return mobileService.taskGetLocs(code); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("一键收货") | 
|---|
|  |  |  | @PostMapping("/complete/{id}") | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:asnOrder:update')") | 
|---|
|  |  |  | public R completeOrder(@PathVariable Long id) { | 
|---|
|  |  |  | if (Objects.isNull(id)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return mobileService.completeOrder(id, getLoginUserId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("获取不良托盘物料") | 
|---|
|  |  |  | @PostMapping("/defect/matnrs") | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:asnOrder:list')") | 
|---|
|  |  |  | public R getAsnDefectItemByCode(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | if (Objects.isNull(map)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return mobileService.getItemByContainer(map); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("获取订单不良物料") | 
|---|
|  |  |  | @PostMapping("/defect/{trackCode}") | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:asnOrder:list')") | 
|---|
|  |  |  | public R defectProducts(@PathVariable String trackCode) { | 
|---|
|  |  |  | if (Objects.isNull(trackCode)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return mobileService.defectProducts(trackCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|