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/apis/wcs/controller/OutStockController.java | 146 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 142 insertions(+), 4 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java index d0e8a8a..1d48eb5 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java @@ -1,18 +1,30 @@ package com.zy.asrs.wms.apis.wcs.controller; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.zy.asrs.framework.common.R; +import com.zy.asrs.framework.exception.CoolException; import com.zy.asrs.wms.apis.wcs.entity.request.ContainerArrivedParam; +import com.zy.asrs.wms.apis.wcs.entity.request.RfidSingalRequest; import com.zy.asrs.wms.apis.wcs.entity.request.TasksStatusCallbackParam; import com.zy.asrs.wms.apis.wcs.services.WcsApiService; +import com.zy.asrs.wms.asrs.entity.CacheSite; +import com.zy.asrs.wms.asrs.entity.Task; +import com.zy.asrs.wms.asrs.entity.param.BindPlatformParam; +import com.zy.asrs.wms.asrs.service.CacheSiteService; +import com.zy.asrs.wms.asrs.service.PlatformService; +import com.zy.asrs.wms.asrs.service.TaskService; import com.zy.asrs.wms.system.controller.BaseController; import io.netty.util.internal.StringUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; @Slf4j @RestController @@ -21,6 +33,16 @@ @Autowired private WcsApiService wcsApiService; + + @Autowired + private PlatformService platformService; + + @Resource + private CacheSiteService cacheSiteService; + + @Resource + private TaskService taskService; + /** * 鍑哄簱浠诲姟-鎺ユ敹鍥炶皟鐘舵�佹帴鍙� @@ -63,5 +85,121 @@ } + /** + * ESS 鎾澧欐媿鐏洖璋� + * 鎾澧欐媿鐏紝ESS璋冪敤 + */ + @PostMapping("/light/off") + public R lightOff(@RequestBody Map<String, Object> request) { + if (Objects.isNull(request)) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } + if (Objects.isNull(request.get("tagCode"))) { + throw new CoolException("鐢靛瓙鏍囩缂栧彿涓嶈兘涓虹┖锛侊紒"); + } + if (Objects.isNull(request.get("eventCode"))){ + throw new CoolException("浜嬩欢鍚嶇О涓嶈兘涓虹┖锛侊紒"); + } + + log.info("鎾澧欐媿鐏紝璇锋眰鍙傛暟锛歿}", JSONObject.toJSONString(request)); + + // 鏍规嵁绔欑偣缂栫爜鏌ユ挱绉嶇珯鐐逛俊鎭� + CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getSiteNo, request.get("tagCode"))); + if (Objects.isNull(cacheSite)) { + throw new CoolException("褰撳墠绔欑偣涓嶅瓨鍦紒锛�"); + } + // 鏍规嵁鎾绔欑偣淇℃伅鏉$爜锛屾煡浠诲姟 + Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, cacheSite.getBarcode())); + if (Objects.isNull(task)) { + throw new CoolException("褰撳墠绔欑偣浠诲姟涓嶅瓨鍦紒锛�"); + } + + Map<String, Object> param = new HashMap<>(); + param.put("taskNo", task.getTaskNo()); + param.put("siteNo", cacheSite.getSiteNo()); + param.put("orderNo",cacheSite.getOrderNo()); + + return wcsApiService.slapLightLogic(param); + } + + /** + * 瀹瑰櫒娴佸姩閫氱煡锛堝綋鍓嶇墿鏂欐挱绉嶅畬鎴愶級 + * //fixme 姝ゆ帴鍙e皢涓嶅啀鍗曠嫭璋冪敤 + * 1. 鏇存柊褰撳墠浠诲姟鐗╂枡淇℃伅 + * 2. + * @param code 瀹瑰櫒缂栫爜 + * @return + */ + @GetMapping("/container/converyor/{code}") + public R containerConveyor(@PathVariable String code) throws Exception { + if (StringUtil.isNullOrEmpty(code)) { + return R.error("瀹瑰櫒缂栫爜涓嶈兘涓虹┖锛侊紒锛�"); + } + return wcsApiService.containerConveryor(code); + } + + + /** + * 鍙戦�佸懡浠ょ粰鐢靛瓙鏍囩锛屽彲浠ユ帶鍒剁數瀛愭爣绛句寒鐏鑹插強鐏伅绛夈�� + * + * 1. 鍒ゆ柇褰撳墠瀹瑰櫒鏄惁杩樻湁鐗╂枡鏈嫞锛屾湭鎷e畬闂伅锛屾嫞瀹岄�氱煡瀹瑰櫒娴佸姩锛屽苟鐏伅 + * 2. 瀹瑰櫒娴佸姩鍒ゆ柇锛屽鏋滄枡绠辨病鏈夌墿鏂� code浼�200锛� 鏈夌墿鏂欎紶100 鎵ц鍥炲簱浠诲姟, IOTYP = 4 + * + * @param request + * @return + */ + @PostMapping("/slap/light") + public R slapLightLogic(@RequestBody Map<String, Object> request) { + if (Objects.isNull(request)) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } + if (Objects.isNull(request.get("taskNo"))) { + throw new CoolException("浠诲姟鍙蜂笉鑳戒负绌猴紒锛�"); + } + if (Objects.isNull(request.get("orderNo"))){ + throw new CoolException("褰撳墠浠诲姟璁㈠崟鍙蜂笉鑳戒负绌猴紒锛�"); + } + + return wcsApiService.slapLightLogic(request); + } + + + + /** + * 淇″彿鍥炰紶鎺ュ彛锛屽洖浼犵數瀛愭爣绛剧姸鎬佸彉鍖栧唴瀹圭粰涓婃父绯荤粺銆� + * 褰撲汉涓烘搷浣滐紙姣斿鎷嶇伅锛屾洿鏀规暟瀛楋紝鏀剧绛夛級瀵艰嚧鐢靛瓙鏍囩鐨勭姸鎬佸拰淇″彿绛夊彂鐢熷彉鍖栥�佹垨璁惧鏈韩鍙戠敓寮傚父鏃讹紝ESS鎺ユ敹鍒颁俊鍙峰悗锛岄�氳繃璇ユ帴鍙e皢淇″彿鍥炰紶缁欎笂娓哥郴缁熴�� + * RFID鍥炶皟鎺ュ彛 + * @param request + * @return + */ + @PostMapping("/") + public R rfidCallback(@RequestBody RfidSingalRequest request) { + if (Objects.isNull(request)) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒"); + } + return wcsApiService.rfidCallback(request); + } + + + /** + * 鑾峰彇鎵�鏈夐泦璐у尯 + * @return + */ + @GetMapping("/all/platforms") + public R getPlatforms() { + return wcsApiService.getPlatforms(); + } + +// /** +// * 缁戝畾璁㈠崟涓庨泦璐у尯鍏崇郴 +// * @param platform +// * @return +// */ +// @PostMapping("/bind/shipping/platform") +// public R bindShippingAndPlatform(@RequestBody BindPlatformParam platform) { +// return platformService.bindShippingPlatform(platform); +// } +// + } -- Gitblit v1.9.1