From 430f4df6519253ffaf49f2d098ac1df77aa5891e Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 11 九月 2025 14:43:02 +0800
Subject: [PATCH] 销售出库添加一行'制单人'
---
Controllers/Warehouse/MesItemBlController.cs | 144 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 135 insertions(+), 9 deletions(-)
diff --git a/Controllers/Warehouse/MesItemBlController.cs b/Controllers/Warehouse/MesItemBlController.cs
index 998066a..5505fed 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;
@@ -12,9 +14,10 @@
/// </summary>
[Route("api/[controller]")]
[ApiController]
-public class MesItemBlController : ControllerBase
+public class MesItemBlController : BaseController
{
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([FromBody] dynamic query)
{
try
{
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = _manager.GetSCBLBillNo();
+ resultInfos.tbBillList = _manager.GetSCBLBillNo(query, RequestInfo);
return new ResponseResult
{
status = 0,
@@ -225,6 +286,26 @@
}
}
+ [HttpPost("GetLineInfo")]
+ public ResponseResult GetLineInfo([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbLineInfo = _manager.GetLineInfo(query, RequestInfo);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
/// <summary>
/// 鎵弿鏉$爜
/// </summary>
@@ -242,15 +323,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 +365,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 +421,7 @@
}
/// <summary>
- /// 鐢熶骇瓒呴鎵弿鏉$爜
+ /// 鐢熶骇瓒呴鎵弿鏉$爜1
/// </summary>
/// <param name="query">鏌ヨ鍙傛暟</param>
/// <returns>鎵弿缁撴灉鍜屽緟澶勭悊鍒楄〃</returns>
@@ -395,5 +485,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