From cb23d88faf0bd112db57816c5cc02e47eb685324 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期一, 13 一月 2025 10:56:10 +0800 Subject: [PATCH] 11 --- Controllers/Warehouse/TransferOutController.cs | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 95 insertions(+), 0 deletions(-) diff --git a/Controllers/Warehouse/TransferOutController.cs b/Controllers/Warehouse/TransferOutController.cs index d37e531..314ce0f 100644 --- a/Controllers/Warehouse/TransferOutController.cs +++ b/Controllers/Warehouse/TransferOutController.cs @@ -43,6 +43,57 @@ #endregion + #region 璋冩嫧鍏ュ簱涓氬姟 + + /// <summary> + /// 鎵弿鏉$爜杩涜璋冩嫧鍏ュ簱澶勭悊 + /// </summary> + /// <param name="query">鏌ヨ鍙傛暟</param> + /// <returns>澶勭悊缁撴灉鍜屽緟澶勭悊鏄庣粏</returns> + /// <remarks> + /// 璇锋眰绀轰緥: + /// POST /api/TransferOut/ScanReceiveBarcode + /// { + /// "billNo": "DB202401010001", // 璋冩嫧鍗曞彿(蹇呭~) + /// "userName": "admin", // 鐢ㄦ埛鍚�(蹇呭~) + /// "barcode": "BC001" // 鏉$爜鍙�(蹇呭~) + /// } + /// 涓氬姟澶勭悊锛� + /// - 楠岃瘉璋冩嫧鍗曠姸鎬� + /// - 楠岃瘉鏉$爜搴撳瓨淇℃伅 + /// - 楠岃瘉浠撳簱涓�鑷存�� + /// - 楠岃瘉鏁伴噺鏄惁瓒呭嚭鏈壂鏁伴噺 + /// - 鎵ц璋冩嫧鍏ュ簱浜嬪姟澶勭悊 + /// 杩斿洖鏁版嵁鍖呭惈锛� + /// - form: 澶勭悊缁撴灉琛ㄥ崟 + /// - items: 寰呭鐞嗘槑缁嗗垪琛� + /// </remarks> + /// <response code="200">鎵弿鎴愬姛</response> + /// <response code="400">鎵弿澶辫触锛岃繑鍥炲叿浣撻敊璇俊鎭�</response> + [HttpPost("ScanReceiveBarcode")] + public ResponseResult ScanReceiveBarcode([FromBody] WarehouseQuery query) + { + try + { + dynamic resultInfos = new ExpandoObject(); + var (form, items) = _manager.ScanReceiveBarcode(query); + resultInfos.form = form; + resultInfos.items = items; + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + #endregion + #region 璋冩嫧鍑哄簱涓氬姟 /// <summary> @@ -162,5 +213,49 @@ } } + /// <summary> + /// 鍒嗗壊鏉$爜杩涜璋冩嫧鍑哄簱澶勭悊 + /// </summary> + /// <param name="query">鏌ヨ鍙傛暟</param> + /// <returns>澶勭悊缁撴灉鍜屽緟澶勭悊鏄庣粏</returns> + /// <remarks> + /// 璇锋眰绀轰緥: + /// POST /api/TransferOut/SplitBarcode + /// { + /// "billNo": "DB202401010001", // 璋冩嫧鍗曞彿(蹇呭~) + /// "userName": "admin", // 鐢ㄦ埛鍚�(蹇呭~) + /// "barcode": "BC001" // 鏉$爜鍙�(蹇呭~) + /// "fum": "1" // 鎷嗗垎鏁�(蹇呭~) + /// } + /// 涓氬姟澶勭悊锛� + /// - 楠岃瘉璋冩嫧鍗曠姸鎬� + /// - 楠岃瘉鏉$爜搴撳瓨淇℃伅 + /// - 楠岃瘉浠撳簱涓�鑷存�� + /// - 楠岃瘉鏁伴噺鏄惁瓒呭嚭鏈壂鏁伴噺 + /// - 鎵ц鍒嗗壊鏉$爜鐨勮皟鎷ㄥ嚭搴撲簨鍔″鐞� + /// </remarks> + /// <response code="200">鍒嗗壊鎴愬姛</response> + /// <response code="400">鍒嗗壊澶辫触锛岃繑鍥炲叿浣撻敊璇俊鎭�</response> + [HttpPost("SplitBarcode")] + public ResponseResult SplitBarcode([FromBody] WarehouseQuery query) + { + try + { + dynamic resultInfos = new ExpandoObject(); + var message = _manager.SplitBarcode(query); + resultInfos.tbBillList = message; + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + #endregion } \ No newline at end of file -- Gitblit v1.9.3