From b38ef27a088410208e4643c3ab34de433fcf4849 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期四, 08 五月 2025 11:20:38 +0800
Subject: [PATCH] 1.现场收料优化
---
Controllers/Wom/WomdaaController.cs | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 230 insertions(+), 1 deletions(-)
diff --git a/Controllers/Wom/WomdaaController.cs b/Controllers/Wom/WomdaaController.cs
index 3bca6be..133ab40 100644
--- a/Controllers/Wom/WomdaaController.cs
+++ b/Controllers/Wom/WomdaaController.cs
@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
+using NewPdaSqlServer.service.@base;
using NewPdaSqlServer.service.Wom;
using NewPdaSqlServer.util;
@@ -12,6 +13,7 @@
public class WomdaaController : ControllerBase
{
private readonly WomdaaManager m = new();
+ private readonly MesPrintMangeer _mCf = new();
#region 鐢熶骇棰嗘枡
@@ -73,6 +75,15 @@
{
dynamic resultInfos = new ExpandoObject();
resultInfos.tbBillList = m.ScanCode(query);
+ if(resultInfos.tbBillList.result == "2")
+ {
+ return new ResponseResult
+ {
+ status = Convert.ToInt32(resultInfos.tbBillList.result),
+ message = resultInfos.tbBillList.strMsg,
+ data = resultInfos
+ };
+ }
return new ResponseResult
{
status = 0,
@@ -93,7 +104,10 @@
try
{
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.ScanCodeCF(query);
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
+ var scanResult = m.ScanCodeCF(query);
+ resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
return new ResponseResult
{
status = 0,
@@ -227,6 +241,7 @@
return ResponseResult.ResponseError(ex);
}
}
+
/// <summary>
/// 淇敼
@@ -251,6 +266,220 @@
return ResponseResult.ResponseError(ex);
}
}
+ #endregion
+
+ #region 鐜板満绠$悊
+
+
+ /// <summary>
+ /// 鎵弿娉ㄥ鐮侊紝鑾峰彇宸ュ崟鍜屾潯鐮佷俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("getZsBarInfo")]
+ public ResponseResult getZsBarInfo([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 鍏堝垵濮嬪寲tbBillList灞炴��
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.ZsBarInfo = m.getZsBarInfo(query);
+ resultInfos.tbBillList.Traceability = m.getTraceability(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /// <summary>
+ /// 浜у搧缁戝畾锛岃拷婧爜鍜屾祦姘寸爜缁戝畾
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("ProductBinding")]
+ public ResponseResult ProductBinding([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 鍏堝垵濮嬪寲tbBillList灞炴��
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList = m.ProductBinding(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鍗℃澘淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("getKbBarInfo")]
+ public ResponseResult getKbBarInfo([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 鍏堝垵濮嬪寲tbBillList灞炴��
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.KbBarInfo = m.getKbBarInfo(query);
+ resultInfos.tbBillList.KbBarMxInfo = m.getKbBarMxInfo(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇绠辩爜淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("getXBarInfo")]
+ public ResponseResult getXBarInfo([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 鍏堝垵濮嬪寲tbBillList灞炴��
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.XBarInfo = m.getXBarInfo(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 缁戝畾绠辩爜涓庢墭鏉跨爜
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("submitAllChecked")]
+ public ResponseResult submitAllChecked([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 鍏堝垵濮嬪寲tbBillList灞炴��
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList = m.submitAllChecked(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鏍稿閫佹
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("submitInspection")]
+ public ResponseResult submitInspection([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 鍏堝垵濮嬪寲tbBillList灞炴��
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList = m.SubmitKbInspection(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ //GetItemsXcsl
+ /// <summary>
+ /// 鏍规嵁宸ュ崟鍙疯幏鍙栧緟鏀舵枡鐗╂枡鏄庣粏
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("GetItemsXcsl")]
+ public ResponseResult GetItemsXcsl(WarehouseQuery query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetItemsXcsl(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ //GetItemsXcsl
+ /// <summary>
+ /// 鐗╂枡鏉$爜鏀舵枡
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("ScanXcsl")]
+ public ResponseResult ScanXcsl(dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.ScanXcsl(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