From 01f39fcb06b8713901975153d0a893e86eca6a88 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 07 七月 2025 19:42:26 +0800 Subject: [PATCH] 33.订单历史管理里面增加单据类型选项按钮、单据类型选项按钮 34.单据管理里面增加单据状态选项按钮 35.入库订单全部都入好了,单据状态还是作业中,现在作业中的单据是可以删除的,我不小心把这个单据删除了,怎么恢复? 36.每个界面点下一页都没反应,点第二页是有变化的,之后点任何页面都没反应 37.订单明细点开后的界面改大一点 38.新增出库订单的时候可以输入客户信息(客户名称、收件人、地址、电话等),现在拣货完成后连发给谁都不知道 39.大屏播种界面对应的数量和开单数量不一致 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 161 insertions(+), 6 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 cc07a96..db6218b 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 @@ -6,10 +6,14 @@ import com.zy.asrs.framework.annotations.ManagerAuth; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.R; -import com.zy.asrs.wms.asrs.entity.Loc; +import com.zy.asrs.framework.exception.CoolException; +import com.zy.asrs.wms.asrs.entity.CacheSite; 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.dto.PickSheetDetlDto; +import com.zy.asrs.wms.asrs.entity.dto.ShippingOrderDetlDto; +import com.zy.asrs.wms.asrs.entity.enums.OrderType; 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; @@ -19,15 +23,14 @@ 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; import io.netty.util.internal.StringUtil; +import io.swagger.annotations.ApiOperation; 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.*; @@ -63,12 +66,20 @@ * @param barcode * @return */ + @ApiOperation("鍏ュ簱鍗曟嵁--鎵爜鑾峰彇璁㈠崟鏄庣粏鍒楄〃") @PostMapping("/mat/auth") public R getProductForBarcode(@RequestBody Map<String, String> barcode) { + if (Objects.isNull(barcode)) { + return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } if (StringUtil.isNullOrEmpty(barcode.get("barcode"))) { return R.error("鏉$爜涓嶈兘涓虹┖锛侊紒"); } Order order = orderService.selectByBarcode(barcode.get("barcode")); + + if (Objects.isNull(order)) { + return R.error("璁㈠崟涓嶅瓨鍦紒"); + } List<OrderInfoDto> orders = orderService.getDetlForOrderId(order.getId()); @@ -76,6 +87,7 @@ } /** + * 骞冲簱涓婃灦 * PDA鎵爜鍏ュ簱 * 1. 缁戝畾搴撲綅鍙蜂笌鎷栫洏鐮� * 2. 搴撲綅缃负鍦ㄥ簱鐘舵�� @@ -99,7 +111,7 @@ } /** - * 鑾峰彇鎷栫爜鐩樼粦瀹氬晢鍝� + * 鑾峰彇鎷栫洏鐮佺粦瀹氬晢鍝� * @return */ @GetMapping("/barcode/matnr/{code}") @@ -107,7 +119,14 @@ if (StringUtil.isNullOrEmpty(code)) { return R.error("鎵樼洏鐮佷笉鑳戒负绌猴紒锛�"); } - List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code).eq(WaitPakin::getIoStatus, 0)); + + String str = code.trim(); + // CUT搴撴潯鐮乀寮�澶达紝鎴彇鍚�10浣� + if (str.charAt(0) == 'T') { + code = str.substring(str.length() - 10); + } + + List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code)); return R.ok(waitPakins); } @@ -135,7 +154,7 @@ return R.parse(CodeRes.USER_10003); } String system = null;//鐧婚檰绯荤粺 - if (wms) { + if (Objects.isNull(wms) || wms) { system = String.valueOf(LoginSystemType.WMS); }else { system = String.valueOf(LoginSystemType.WCS); @@ -158,6 +177,12 @@ } + /** + * @author Ryan + * @date 2025/6/25 + * @description: 缁勬墭 + * @version 1.0 + */ @PostMapping("/comb/auth") public R combMats(@RequestBody BatchMergeOrdersParam ordersParam) { if (StringUtil.isNullOrEmpty(ordersParam.getOrderNo())) { @@ -170,6 +195,16 @@ return R.error("璁㈠崟鏄庣粏涓嶈兘涓虹┖锛侊紒"); } + String str = ordersParam.getMergeNo().trim(); + // CTU搴撴潯鐮乀寮�澶达紝鎴彇鍚�10浣� + if (str.charAt(0) == 'T') { + ordersParam.setMergeNo(str.substring(str.length() - 10)); + } + if (str.startsWith("PK")) { + ordersParam.setInType(OrderType.PK_IN_ORDER.id); + } else { + ordersParam.setInType(OrderType.UTC_OUT_ORDER.id); + } boolean result = mobileService.batchMergeOrders(ordersParam); if (result) { return R.ok("缁勬墭鎴愬姛锛侊紒"); @@ -178,4 +213,124 @@ } } + /** + * 鑾峰彇鎷h揣鏄庣粏 + * @return + */ + @GetMapping("/pick/detl/{code}") + public R pickDetlByPickNo(@PathVariable String code) { + if (StringUtil.isNullOrEmpty(code)) { + return R.error("鎷h揣鍗曟嵁缂栫爜涓嶈兘涓虹┖锛侊紒"); + } + PickSheetDetlDto pickSheetDetls = mobileService.outFlatSheet(code); + + return R.ok(pickSheetDetls); + } + + /** + * 鎷h揣鍗曠‘璁ゅ嚭搴� + * @param code + * @return + */ + @GetMapping("/pick/confirm/{code}") + public R confirmOutFlatSheet(@PathVariable String code) { + if (StringUtil.isNullOrEmpty(code)) { + return R.error("鎷h揣鍗曟嵁缂栫爜涓嶈兘涓虹┖锛侊紒"); + } + if (!mobileService.confirmFlatSheet(code)) { + return R.error("鍑哄簱澶辫触锛侊紒"); + } + return R.ok("鍑哄簱鎴愬姛锛侊紒"); + } + + + /** + * 鑾峰彇鎾浣� + * @return + */ + @GetMapping("/pick/seed/locs") + public R seedLocs() { + List<CacheSite> sites = mobileService.getSeedLocs(); + return R.ok(sites); + } + + /** + * 璁㈠崟缁戝畾绔欑偣 + * @param param + * @return + */ + @PostMapping("/pick/seed/bind") + public R bindLoc(@RequestBody Map<String, Object> param) { + if (Objects.isNull(param)) { + throw new CoolException("璇锋眰鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } + if (Objects.isNull(param.get("barcode"))) { + throw new CoolException("鎾澧欏鍣ㄧ紪鐮佷笉鑳戒负绌�"); + } + if (Objects.isNull(param.get("orderNo"))) { + throw new CoolException("璁㈠崟缂栧彿涓嶈兘涓虹┖锛侊紒"); + } + if (Objects.isNull(param.get("siteNo"))) { + throw new CoolException("鎾绔欑偣涓嶈兘涓虹┖锛侊紒"); + } + if (Objects.isNull(param.get("type"))) { + throw new CoolException("鍙傛暟绫诲瀷涓嶈兘涓虹┖锛侊紒"); + } + boolean result = mobileService.bindOrderBySite(param); + if (result) { + return R.ok("缁戝畾鎴愬姛锛侊紒"); + } else { + return R.error("缁戝畾澶辫触锛侊紒"); + } + } + + + /** + * 鑾峰彇鍙戣揣璁㈠崟鏄庣粏 + * @return + */ + @PostMapping("/shipping/order/detl") + public R getOrderDetl(@RequestBody Map<String, Object> params) { + if (Objects.isNull(params)) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } + return mobileService.selectShippingDetl(params); + } + + + /** + * @author Ryan + * @date 2025/6/28 + * @description: 鑾峰彇鎺ㄨ崘搴撲綅 + * @version 1.0 + */ + @GetMapping("/recommend/locs") + public R getRecommend() { + return mobileService.getRecommendLocs(); + } + + + /** + * @author Ryan + * @date 2025/6/28 + * @description: 鏌ヨ鐗╂枡淇℃伅 + * @version 1.0 + */ + @GetMapping("/mats/search/{matnr}") + public R getMats(@PathVariable String matnr) { + return mobileService.getMatsByCode(matnr); + } + + + /** + * 纭鍙戣揣鍗曟槑缁� + * @return + */ + @PostMapping("/shipping/confirm") + public R confirmShipping(@RequestBody List<ShippingOrderDetlDto> params) { + if (params.isEmpty()) { + throw new CoolException("鍙戣揣鍗曟槑缁嗕笉鑳戒负绌猴紒锛�"); + } + return mobileService.confirmShippingDetl(params); + } } -- Gitblit v1.9.1