From 3c52f39678034ce21c1158a01b4885e3afde4443 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 04 一月 2025 17:08:00 +0800 Subject: [PATCH] #平库入库功能 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 50 insertions(+), 7 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java index cb1c1dc..30125de 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java @@ -7,13 +7,18 @@ import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.R; import com.zy.asrs.wms.asrs.entity.Order; +import com.zy.asrs.wms.asrs.entity.WaitPakin; import com.zy.asrs.wms.asrs.entity.dto.OrderInfoDto; import com.zy.asrs.wms.asrs.entity.param.BatchMergeOrdersParam; +import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams; import com.zy.asrs.wms.asrs.service.MobileService; import com.zy.asrs.wms.asrs.service.OrderService; +import com.zy.asrs.wms.asrs.service.WaitPakinService; import com.zy.asrs.wms.system.controller.BaseController; +import com.zy.asrs.wms.system.entity.Host; import com.zy.asrs.wms.system.entity.User; import com.zy.asrs.wms.system.entity.UserLogin; +import com.zy.asrs.wms.system.service.HostService; import com.zy.asrs.wms.system.service.UserLoginService; import com.zy.asrs.wms.system.service.UserService; import io.jsonwebtoken.lang.Collections; @@ -21,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; +import sun.nio.ch.IOStatus; import java.util.*; @@ -30,7 +36,6 @@ @Value("${super.pwd}") private String superPwd; - @Autowired private UserService userService; @Autowired @@ -39,7 +44,18 @@ private OrderService orderService; @Autowired private MobileService mobileService; + @Autowired + private WaitPakinService waitPakinService; + /** + * 鑾峰彇鐢ㄦ埛鏈烘瀯 + * @return + */ + @GetMapping("/current/host") + public R getUserHost() { + List<Host> hosts = mobileService.getHosts(); + return R.ok(hosts); + } /** * 鍏ュ簱鍗曟嵁--鎵爜鑾峰彇璁㈠崟鏄庣粏鍒楄〃 @@ -53,16 +69,42 @@ } Order order = orderService.selectByBarcode(barcode.get("barcode")); - if (!(order.getOrderType() == 1)) { - return R.error("闈炲叆搴撹鍗曪紝 涓嶅彲鎿嶄綔锛侊紒"); - } - if (order.getOrderSettle() > 2) { - return R.error("鍗曟嵁褰撳墠鐘舵�佷笉鍙仛鍏ュ簱鎿嶄綔锛侊紒"); - } List<OrderInfoDto> orders = orderService.getDetlForOrderId(order.getId()); return R.ok(orders); + } + /** + * PDA鎵爜鍏ュ簱 + * 1. 缁戝畾搴撲綅鍙蜂笌鎷栫洏鐮� + * 2. 搴撲綅缃负鍦ㄥ簱鐘舵�� + * @return + */ + @PostMapping("matnr/in/barcode") + public R pakinToStock(@RequestBody PakinOnShelvesParams shelvesParams) { + if (StringUtil.isNullOrEmpty(shelvesParams.getBarcode())) { + return R.error("鎷栫洏鐮佷笉鑳戒负绌猴紒锛�"); + } + if (StringUtil.isNullOrEmpty(shelvesParams.getLoc())) { + return R.error("搴撲綅涓嶈兘涓虹┖锛侊紒"); + } + //TODO 缁戝畾搴撲綅锛屾坊鍔犲簱浣嶆槑缁� + + return R.ok(); + } + + /** + * 鑾峰彇鎷栫爜鐩樼粦瀹氬晢鍝� + * @return + */ + @GetMapping("barcode/matnr/{code}") + public R getAllGoods(@PathVariable String code) { + if (!StringUtil.isNullOrEmpty(code)) { + return R.error("鎵樼洏鐮佷笉鑳戒负绌猴紒锛�"); + } + List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code).eq(WaitPakin::getIoStatus, 0)); + + return R.ok(waitPakins); } @@ -130,4 +172,5 @@ return R.ok("缁勬墭澶辫触锛侊紒"); } } + } -- Gitblit v1.9.1