|  |  | 
 |  |  | package com.vincent.rsf.server.api.controller.pda; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
 |  |  | import com.vincent.rsf.framework.common.Cools; | 
 |  |  | import com.vincent.rsf.framework.common.R; | 
 |  |  | import com.vincent.rsf.framework.exception.CoolException; | 
 |  |  | import com.vincent.rsf.server.api.controller.params.*; | 
 |  |  | import com.vincent.rsf.server.api.controller.erp.params.CheckObjParams; | 
 |  |  | import com.vincent.rsf.server.api.controller.erp.params.ManualShelvingParams; | 
 |  |  | import com.vincent.rsf.server.api.controller.erp.params.OpStockParams; | 
 |  |  | import com.vincent.rsf.server.api.controller.erp.params.OtherReceiptParams; | 
 |  |  | import com.vincent.rsf.server.api.service.MobileService; | 
 |  |  | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; | 
 |  |  | import com.vincent.rsf.server.manager.entity.QlyIsptItem; | 
 |  |  | import com.vincent.rsf.server.manager.entity.WaitPakin; | 
 |  |  | import com.vincent.rsf.server.manager.service.TaskService; | 
 |  |  | import com.vincent.rsf.server.manager.service.WaitPakinService; | 
 |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
 |  |  | import com.vincent.rsf.server.system.controller.param.LoginParam; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private MobileService mobileService; | 
 |  |  |     @Autowired | 
 |  |  |     private TaskService taskService; | 
 |  |  |     @Autowired | 
 |  |  |     private WaitPakinService waitPakinService; | 
 |  |  |     /** | 
 |  |  |      * PDA用户登录 | 
 |  |  |      * @param param | 
 |  |  | 
 |  |  |  | 
 |  |  |     @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") | 
 |  |  |     @ApiOperation("获取订单物料明细") | 
 |  |  |     @GetMapping("/asnOrderItem/trackCode/{code}") | 
 |  |  |     public R getItemByTrackCode(@PathVariable String code) { | 
 |  |  |         if (StringUtils.isBlank(code)) { | 
 |  |  |             return R.error("编码不能为空!!"); | 
 |  |  |     @PostMapping("/asnOrderItem/trackCode") | 
 |  |  |     public R getItemByTrackCode(@RequestBody Map<String, Object> params) { | 
 |  |  |         if (Objects.isNull(params)) { | 
 |  |  |             throw new CoolException("参数不能为空!!"); | 
 |  |  |         } | 
 |  |  |         return mobileService.getDeltByCode(code); | 
 |  |  |         return mobileService.getDeltByCode(params); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") | 
 |  |  | 
 |  |  |         if (Objects.isNull(params)) { | 
 |  |  |             return R.error("参数不能为空!!"); | 
 |  |  |         } | 
 |  |  |         return mobileService.getItemByContainer(params); | 
 |  |  |         if (!Objects.isNull(params.get("type")) && params.get("type").equals("unbind")) { | 
 |  |  |             return mobileService.getUnItemByContainer(params); | 
 |  |  |         } else { | 
 |  |  |             return mobileService.getItemByContainer(params); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
 |  |  |     @ApiOperation("组拖") | 
 |  |  |     @ApiOperation("组托") | 
 |  |  |     @PostMapping("/waitPakin/merge") | 
 |  |  |     public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { | 
 |  |  |         Long userId = getLoginUserId(); | 
 |  |  | 
 |  |  |             return R.error("托盘码不能为空!!"); | 
 |  |  |         } | 
 |  |  |         if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { | 
 |  |  |             return R.error("跟踪码不能为空!!"); | 
 |  |  |             return R.error("解绑明细不能为空!!"); | 
 |  |  |         } | 
 |  |  |         return R.ok(mobileService.unBind(param)); | 
 |  |  |     } | 
 |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation("快速质检信息") | 
 |  |  |     @PreAuthorize("hasAuthority('manager:qlyInspect:list')") | 
 |  |  |     @PostMapping("/inspect/query") | 
 |  |  | //    @PostMapping("/inspect/query") | 
 |  |  |     public R checkObjs(@RequestBody CheckObjParams params) { | 
 |  |  |         if (Objects.isNull(params)) { | 
 |  |  |             return R.error("参数不能为空!!"); | 
 |  |  | 
 |  |  |         if (Objects.isNull(params) || params.isEmpty()) { | 
 |  |  |             return R.error("参数不能为空!!"); | 
 |  |  |         } | 
 |  |  |         return mobileService.checkUpdate(params); | 
 |  |  |         return mobileService.checkUpdate(params, getLoginUserId()); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("获取上架信息") | 
 |  |  | 
 |  |  |     @ApiOperation("人工上架") | 
 |  |  |     @PreAuthorize("hasAuthority('manager:qlyInspect:update')") | 
 |  |  |     @PostMapping("/stock/operate") | 
 |  |  |     public R publicToStock(@RequestBody PublicToStockParams params) { | 
 |  |  |         if (Objects.isNull(params)) { | 
 |  |  |     public R publicToStock(@RequestBody ManualShelvingParams params) { | 
 |  |  |         if (Cools.isEmpty(params.getItemList()) || Cools.isEmpty(params.getLocCode()) || Cools.isEmpty(params.getBarcode())) { | 
 |  |  |             return R.error("参数不能为空!!"); | 
 |  |  |         } | 
 |  |  |         return mobileService.publicToStock(params, getLoginUserId()); | 
 |  |  |         WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, params.getBarcode())); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         return taskService.generateFlatWarehouseTasks(waitPakin, params.getLocCode(), getLoginUserId()); | 
 |  |  | //        return mobileService.publicToStock(params, getLoginUserId()); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("获取任务信息") |