From b60d6c1abc9a41456c683a79d4ee27e7bdf7071b Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期二, 13 五月 2025 14:23:38 +0800 Subject: [PATCH] #Agv启动入库 --- rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java index d9de613..5ef37c3 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java @@ -1,11 +1,16 @@ 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.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; @@ -34,6 +39,10 @@ @Autowired private MobileService mobileService; + @Autowired + private TaskService taskService; + @Autowired + private WaitPakinService waitPakinService; /** * PDA鐢ㄦ埛鐧诲綍 * @param param @@ -123,12 +132,12 @@ @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')") @@ -138,11 +147,15 @@ 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(); @@ -169,7 +182,7 @@ return R.error("鎵樼洏鐮佷笉鑳戒负绌猴紒锛�"); } if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { - return R.error("璺熻釜鐮佷笉鑳戒负绌猴紒锛�"); + return R.error("瑙g粦鏄庣粏涓嶈兘涓虹┖锛侊紒"); } return R.ok(mobileService.unBind(param)); } @@ -196,7 +209,7 @@ @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("鍙傛暟涓嶈兘涓虹┖锛侊紒"); @@ -212,7 +225,7 @@ if (Objects.isNull(params) || params.isEmpty()) { return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒"); } - return mobileService.checkUpdate(params); + return mobileService.checkUpdate(params, getLoginUserId()); } @ApiOperation("鑾峰彇涓婃灦淇℃伅") @@ -228,11 +241,15 @@ @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("鑾峰彇浠诲姟淇℃伅") -- Gitblit v1.9.1