From a12a74003597af2d6a7fd37e54509909bd4b23bb Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 04 七月 2025 10:20:38 +0800
Subject: [PATCH] 1.其他入库优化 2.条码入库前拆分优化 3.携客云送货单签收显示优化
---
Controllers/Warehouse/MesItemBlController.cs | 122 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 114 insertions(+), 8 deletions(-)
diff --git a/Controllers/Warehouse/MesItemBlController.cs b/Controllers/Warehouse/MesItemBlController.cs
index 998066a..0c04c6e 100644
--- a/Controllers/Warehouse/MesItemBlController.cs
+++ b/Controllers/Warehouse/MesItemBlController.cs
@@ -1,7 +1,9 @@
锘縰sing System.Dynamic;
+using Masuit.Tools.Win32.AntiVirus;
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
+using NewPdaSqlServer.service.@base;
using NewPdaSqlServer.service.Warehouse;
using NewPdaSqlServer.util;
@@ -15,6 +17,7 @@
public class MesItemBlController : ControllerBase
{
private readonly MesItemBlManager _manager = new();
+ private readonly MesPrintMangeer _mCf = new();
/***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
@@ -162,6 +165,64 @@
}
}
+ /// <summary>
+ /// 鐢熶骇琛ユ枡鍗曟潯鐮佹媶鍒�
+ /// </summary>
+ /// <param name="query">鏌ヨ鍙傛暟</param>
+ /// <returns>鎷嗗垎缁撴灉鍜屽緟澶勭悊鍒楄〃</returns>
+ /// <remarks>
+ /// 璇锋眰绀轰緥:
+ /// POST /api/MesItemBl/SplitBarcode
+ /// {
+ /// "billNo": "WO202401010001", // 宸ュ崟鍙�(蹇呭~)
+ /// "barcode": "BC001", // 鏉$爜鍙�(蹇呭~)
+ /// "userName": "admin", // 鐢ㄦ埛鍚�(蹇呭~)
+ /// "blNo": "BL202401010001", // 琛ユ枡鍗曞彿(蹇呭~)
+ /// "Num": 10 // 鎷嗗垎鏁伴噺(蹇呭~,蹇呴』澶т簬0)
+ /// }
+ /// 涓氬姟澶勭悊锛�
+ /// - 楠岃瘉琛ユ枡鍗曠姸鎬�
+ /// - 楠岃瘉鏉$爜搴撳瓨淇℃伅
+ /// - 楠岃瘉鎷嗗垎鏁伴噺鏄惁鍚堢悊
+ /// - 鎵ц鏉$爜鎷嗗垎浜嬪姟澶勭悊
+ /// - 鏇存柊宸ュ崟鍜岃ˉ鏂欏崟鐩稿叧鏁伴噺
+ /// 杩斿洖鏁版嵁鍖呭惈锛�
+ /// - success: 鎷嗗垎鏄惁鎴愬姛
+ /// - pendingList: 寰呭鐞嗘槑缁嗗垪琛紝鍖呭惈锛�
+ /// * Bld012: 鐗╂枡ID
+ /// * Bld002: 鐗╂枡缂栧彿
+ /// * Bld003: 鐗╂枡鍚嶇О
+ /// * Bld004: 鐗╂枡瑙勬牸
+ /// * Bld007: 璁″垝鏁伴噺
+ /// * Bld008: 宸茶ˉ鏁伴噺
+ /// </remarks>
+ /// <response code="200">鎷嗗垎鎴愬姛</response>
+ /// <response code="400">鎷嗗垎澶辫触锛岃繑鍥炲叿浣撻敊璇俊鎭�</response>
+ [HttpPost("SplitBarcode")]
+ public ResponseResult SplitBarcode([FromBody] WarehouseQuery query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
+ var scanResult = _manager.SplitBarcode(query);
+ resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
+ //resultInfos.success = success;
+ //resultInfos.pendingList = pendingList;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
#region 鐢熶骇琛ユ枡
/// <summary>
@@ -171,12 +232,12 @@
/// <response code="200">鎴愬姛鑾峰彇琛ユ枡鍗曞彿鍒楄〃</response>
/// <response code="400">鑾峰彇澶辫触</response>
[HttpPost("GetSCBLBillNo")]
- public ResponseResult GetSCBLBillNo()
+ public ResponseResult GetSCBLBillNo(WarehouseQuery query)
{
try
{
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = _manager.GetSCBLBillNo();
+ resultInfos.tbBillList = _manager.GetSCBLBillNo(query);
return new ResponseResult
{
status = 0,
@@ -242,15 +303,24 @@
/// </remarks>
/// <response code="200">鎵弿鎴愬姛</response>
/// <response code="400">鎵弿澶辫触锛岃繑鍥炲叿浣撻敊璇俊鎭�</response>
- [HttpPost("SctlScanBarcode")]
- public ResponseResult SctlScanBarcode([FromBody] WarehouseQuery query)
+ [HttpPost("ScblScanBarcode")]
+ public ResponseResult ScblScanBarcode([FromBody] WarehouseQuery query)
{
try
{
dynamic resultInfos = new ExpandoObject();
- var (success, pendingList) = _manager.SctlScanBarcode(query);
+ var (success, pendingList) = _manager.ScblScanBarcode(query);
resultInfos.success = success;
resultInfos.pendingList = pendingList;
+ if(success.status == 2)
+ {
+ return new ResponseResult
+ {
+ status = Convert.ToInt32(success.status),
+ message = success.message,
+ data = resultInfos.success
+ };
+ }
return new ResponseResult
{
status = 0,
@@ -275,12 +345,12 @@
/// <response code="200">鎴愬姛鑾峰彇瓒呴鍗曞彿鍒楄〃</response>
/// <response code="400">鑾峰彇澶辫触</response>
[HttpPost("GetSccList")]
- public ResponseResult GetSccList()
+ public ResponseResult GetSccList(WarehouseQuery query)
{
try
{
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = _manager.GetSccList();
+ resultInfos.tbBillList = _manager.GetSccList(query);
return new ResponseResult
{
status = 0,
@@ -331,7 +401,7 @@
}
/// <summary>
- /// 鐢熶骇瓒呴鎵弿鏉$爜
+ /// 鐢熶骇瓒呴鎵弿鏉$爜1
/// </summary>
/// <param name="query">鏌ヨ鍙傛暟</param>
/// <returns>鎵弿缁撴灉鍜屽緟澶勭悊鍒楄〃</returns>
@@ -395,5 +465,41 @@
}
}
+
+ /// <summary>
+ /// 鏍规嵁鍗曞彿鑾峰彇鐢熶骇琛ユ枡鍗曟槑缁�
+ /// </summary>
+ /// <param name="query">鏌ヨ鍙傛暟锛屽繀椤诲寘鍚玝illNo</param>
+ /// <returns>琛ユ枡鍗曟槑缁嗗垪琛�</returns>
+ /// <remarks>
+ /// 璇锋眰绀轰緥:
+ /// POST /api/MesItemBl/GetMesItemBlDetailByBillNo
+ /// {
+ /// "billNo": "BL202401010001"
+ /// }
+ /// </remarks>
+ /// <response code="200">鎴愬姛鑾峰彇琛ユ枡鍗曟槑缁�</response>
+ /// <response code="400">鑾峰彇澶辫触锛屽彲鑳芥槸鍗曟嵁鍙蜂笉瀛樺湪鎴栧凡瀹屾垚</response>
+ [HttpPost("GetMesItemWWBlDetailByBillNo")]
+ public ResponseResult GetMesItemWWBlDetailByBillNo(
+ [FromBody] WarehouseQuery query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = _manager.GetMesItemWWBlDetailByBillNo(query);
+ 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