From 44abd42a36a8265fb6f91849df7a5a05383b3c63 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期二, 03 九月 2024 17:39:49 +0800
Subject: [PATCH] 生产领料
---
MESApplication/bin/Release/net8.0/MESApplication.exe | 0
MESApplication/bin/Release/net8.0/publish/MESApplication.pdb | 0
MESApplication/bin/Debug/net8.0/MES.Service.pdb | 0
MESApplication/bin/Release/net8.0/MESApplication.xml | 24 +
MESApplication/bin/Release/net8.0/publish/MESApplication.dll | 0
MESApplication/bin/Debug/net8.0/MES.Service.dll | 0
MES.Service/Modes/MesInvItemBarcodes.cs | 94 +-
MESApplication/bin/Debug/net8.0/MESApplication.pdb | 0
MESApplication/bin/Release/net8.0/MES.Service.dll | 0
MESApplication/Controllers/Warehouse/MesInvItemBarcodesController.cs | 25 +
MESApplication/bin/Release/net8.0/MESApplication.dll | 0
MESApplication/bin/Release/net8.0/publish/MES.Service.pdb | 0
MESApplication/bin/Release/net8.0/MES.Service.pdb | 0
MESApplication/bin/Release/net8.0/publish/MESApplication.exe | 0
MES.Service/service/Warehouse/MesInvItemBarcodesManager.cs | 704 +++++++++++++++++++++++++++--
MESApplication/bin/Release/net8.0/MESApplication.pdb | 0
MES.Service/bin/Debug/net8.0/MES.Service.pdb | 0
MESApplication/bin/Release/net8.0/publish/MES.Service.dll | 0
MESApplication/bin/Release/net8.0/publish/MESApplication.xml | 24 +
MESApplication/bin/Debug/net8.0/MESApplication.dll | 0
MES.Service/bin/Debug/net8.0/MES.Service.dll | 0
MESApplication/bin/Debug/net8.0/MESApplication.xml | 24 +
MES.Service/Modes/MesInvBusiness2.cs | 338 +++++++------
MES.Service/util/UserUtil.cs | 17
MESApplication/bin/Debug/net8.0/MESApplication.exe | 0
MES.Service/bin/Release/net8.0/MES.Service.dll | 0
MES.Service/Modes/MesInvItemOutCDetails.cs | 156 +++---
MES.Service/bin/Release/net8.0/MES.Service.pdb | 0
28 files changed, 1,067 insertions(+), 339 deletions(-)
diff --git a/MES.Service/Modes/MesInvBusiness2.cs b/MES.Service/Modes/MesInvBusiness2.cs
index 9ca8594..8bfba78 100644
--- a/MES.Service/Modes/MesInvBusiness2.cs
+++ b/MES.Service/Modes/MesInvBusiness2.cs
@@ -8,220 +8,226 @@
[SugarTable("MES_INV_BUSINESS2")]
public class MesInvBusiness2
{
- /// <summary>
- /// ID(seq_inv_id)
- /// </summary>
- [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_ID",
+ /// <summary>
+ /// ID(seq_inv_id)
+ /// </summary>
+ [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_ID",
IsPrimaryKey = true)]
public decimal Id { get; set; }
- /// <summary>
- /// 鐘舵�亅0-鏈氦鏄�1-宸蹭氦鏄�
- /// </summary>
- [SugarColumn(ColumnName = "STATUS")]
+ /// <summary>
+ /// 鐘舵�亅0-鏈氦鏄�1-宸蹭氦鏄�
+ ///</summary>
+ [SugarColumn(ColumnName = "STATUS")]
public decimal? Status { get; set; }
- /// <summary>
- /// 鍗曟嵁绫诲瀷ID
- /// </summary>
- [SugarColumn(ColumnName = "BILL_TYPE_ID")]
+ /// <summary>
+ /// 鍗曟嵁绫诲瀷ID
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_TYPE_ID")]
public decimal? BillTypeId { get; set; }
- /// <summary>
- /// 浜嬪姟绫诲瀷缂栫爜
- /// </summary>
- [SugarColumn(ColumnName = "TRANSACTION_CODE")]
- public string TransactionCode { get; set; }
+ /// <summary>
+ /// 浜嬪姟绫诲瀷缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName = "TRANSACTION_CODE")]
+ public string? TransactionCode { get; set; }
- /// <summary>
- /// 浜ゆ槗绫诲瀷|1-鍏ュ簱0-杞簱-1鍑哄簱
- /// </summary>
- [SugarColumn(ColumnName = "BUSINESS_TYPE")]
+ /// <summary>
+ /// 浜ゆ槗绫诲瀷|1-鍏ュ簱0-杞簱-1鍑哄簱
+ ///</summary>
+ [SugarColumn(ColumnName = "BUSINESS_TYPE")]
public decimal? BusinessType { get; set; }
- /// <summary>
- /// 鍗曟嵁ID
- /// </summary>
- [SugarColumn(ColumnName = "BILL_ID")]
+ /// <summary>
+ /// 鍗曟嵁ID
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_ID")]
public decimal? BillId { get; set; }
- /// <summary>
- /// 鍗曟嵁缂栫爜
- /// </summary>
- [SugarColumn(ColumnName = "BILL_NO")]
- public string BillNo { get; set; }
+ /// <summary>
+ /// 鍗曟嵁缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_NO")]
+ public string? BillNo { get; set; }
- /// <summary>
- /// 鐢熶骇璁㈠崟鍙�
- /// </summary>
- [SugarColumn(ColumnName = "TASK_NO")]
- public string TaskNo { get; set; }
+ /// <summary>
+ /// 鐢熶骇璁㈠崟鍙�
+ ///</summary>
+ [SugarColumn(ColumnName = "TASK_NO")]
+ public string? TaskNo { get; set; }
- /// <summary>
- /// 瀹㈡埛缂栧彿
- /// </summary>
- [SugarColumn(ColumnName = "CUSTOMER_NO")]
- public string CustomerNo { get; set; }
+ /// <summary>
+ /// 瀹㈡埛缂栧彿
+ ///</summary>
+ [SugarColumn(ColumnName = "CUSTOMER_NO")]
+ public string? CustomerNo { get; set; }
- /// <summary>
- /// 鍗曟嵁琛孖D
- /// </summary>
- [SugarColumn(ColumnName = "BILL_LINE_ID")]
+ /// <summary>
+ /// 鍗曟嵁琛孖D
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_LINE_ID")]
public decimal? BillLineId { get; set; }
- /// <summary>
- /// 鐗╂枡鏉$爜
- /// </summary>
- [SugarColumn(ColumnName = "ITEM_BARCODE")]
- public string ItemBarcode { get; set; }
+ /// <summary>
+ /// 鐗╂枡鏉$爜
+ ///</summary>
+ [SugarColumn(ColumnName = "ITEM_BARCODE")]
+ public string? ItemBarcode { get; set; }
- /// <summary>
- /// 鏈徃鐗╂枡缂栫爜
- /// </summary>
- [SugarColumn(ColumnName = "ITEM_NO")]
- public string ItemNo { get; set; }
+ /// <summary>
+ /// 鏈徃鐗╂枡缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName = "ITEM_NO")]
+ public string? ItemNo { get; set; }
- /// <summary>
- /// 瀹㈡埛鐗╂枡缂栫爜
- /// </summary>
- [SugarColumn(ColumnName = "C_ITEM_CODE")]
- public string CItemCode { get; set; }
+ /// <summary>
+ /// 瀹㈡埛鐗╂枡缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName = "C_ITEM_CODE")]
+ public string? CItemCode { get; set; }
- /// <summary>
- /// 鍘傚鎵规
- /// </summary>
- [SugarColumn(ColumnName = "LOT_NO")]
- public string LotNo { get; set; }
+ /// <summary>
+ /// 鍘傚鎵规
+ ///</summary>
+ [SugarColumn(ColumnName = "LOT_NO")]
+ public string? LotNo { get; set; }
- /// <summary>
- /// 鏄惁鐜繚(0:鍚�,1:鏄�)
- /// </summary>
- [SugarColumn(ColumnName = "EP_FLAG")]
+ /// <summary>
+ /// 鏄惁鐜繚(0:鍚�,1:鏄�)
+ ///</summary>
+ [SugarColumn(ColumnName = "EP_FLAG")]
public short? EpFlag { get; set; }
- /// <summary>
- /// 鏁伴噺
- /// </summary>
- [SugarColumn(ColumnName = "QUANTITY")]
+ /// <summary>
+ /// 鏁伴噺
+ ///</summary>
+ [SugarColumn(ColumnName = "QUANTITY")]
public decimal? Quantity { get; set; }
- /// <summary>
- /// 婧愬瓙搴揅ODE
- /// </summary>
- [SugarColumn(ColumnName = "FROM_INV_DEPOTS_CODE")]
- public string FromInvDepotsCode { get; set; }
+ /// <summary>
+ /// 婧愬瓙搴揅ODE
+ ///</summary>
+ [SugarColumn(ColumnName = "FROM_INV_DEPOTS_CODE")]
+ public string? FromInvDepotsCode { get; set; }
- /// <summary>
- /// 婧愯揣浣岰ODE
- /// </summary>
- [SugarColumn(ColumnName = "FROM_INV_DEPOT_SECTIONS_CODE")]
- public string FromInvDepotSectionsCode { get; set; }
+ /// <summary>
+ /// 婧愯揣浣岰ODE
+ ///</summary>
+ [SugarColumn(ColumnName = "FROM_INV_DEPOT_SECTIONS_CODE")]
+ public string? FromInvDepotSectionsCode { get; set; }
- /// <summary>
- /// 鐩殑瀛愬簱CODE
- /// </summary>
- [SugarColumn(ColumnName = "TO_INV_DEPOTS_CODE")]
- public string ToInvDepotsCode { get; set; }
+ /// <summary>
+ /// 鐩殑瀛愬簱CODE
+ ///</summary>
+ [SugarColumn(ColumnName = "TO_INV_DEPOTS_CODE")]
+ public string? ToInvDepotsCode { get; set; }
- /// <summary>
- /// 鐩殑璐т綅CODE
- /// </summary>
- [SugarColumn(ColumnName = "TO_INV_DEPOT_SECTIONS_CODE")]
- public string ToInvDepotSectionsCode { get; set; }
+ /// <summary>
+ /// 鐩殑璐т綅CODE
+ ///</summary>
+ [SugarColumn(ColumnName = "TO_INV_DEPOT_SECTIONS_CODE")]
+ public string? ToInvDepotSectionsCode { get; set; }
- /// <summary>
- /// 浜ゆ槗寮傚父淇℃伅
- /// </summary>
- [SugarColumn(ColumnName = "DESCRIPTION")]
- public string Description { get; set; }
+ /// <summary>
+ /// 浜ゆ槗寮傚父淇℃伅
+ ///</summary>
+ [SugarColumn(ColumnName = "DESCRIPTION")]
+ public string? Description { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- [SugarColumn(ColumnName = "CREATE_BY")]
- public string CreateBy { get; set; }
+ /// <summary>
+ /// 鍒涘缓浜�
+ ///</summary>
+ [SugarColumn(ColumnName = "CREATE_BY")]
+ public string? CreateBy { get; set; }
- /// <summary>
- /// 鍒涘缓鏃堕棿
- /// </summary>
- [SugarColumn(ColumnName = "CREATE_DATE")]
+ /// <summary>
+ /// 鍒涘缓鏃堕棿
+ ///</summary>
+ [SugarColumn(ColumnName = "CREATE_DATE")]
public DateTime? CreateDate { get; set; }
- /// <summary>
- /// 鏈�鍚庢洿鏂颁汉
- /// </summary>
- [SugarColumn(ColumnName = "LASTUPDATE_BY")]
- public string LastupdateBy { get; set; }
+ /// <summary>
+ /// 鏈�鍚庢洿鏂颁汉
+ ///</summary>
+ [SugarColumn(ColumnName = "LASTUPDATE_BY")]
+ public string? LastupdateBy { get; set; }
- /// <summary>
- /// 鏈�鍚庢洿鏂版椂闂�
- /// </summary>
- [SugarColumn(ColumnName = "LASTUPDATE_DATE")]
+ /// <summary>
+ /// 鏈�鍚庢洿鏂版椂闂�
+ ///</summary>
+ [SugarColumn(ColumnName = "LASTUPDATE_DATE")]
public DateTime? LastupdateDate { get; set; }
- /// <summary>
- /// 瓒呮崯缁熻鏍囪瘑
- /// </summary>
- [SugarColumn(ColumnName = "ULLAGE_STAT_FLAG")]
+ /// <summary>
+ /// 瓒呮崯缁熻鏍囪瘑
+ ///</summary>
+ [SugarColumn(ColumnName = "ULLAGE_STAT_FLAG")]
public short? UllageStatFlag { get; set; }
- /// <summary>
- /// 鍒嗗巶缂栫爜
- /// </summary>
- [SugarColumn(ColumnName = "FACTORY")]
- public string Factory { get; set; }
+ /// <summary>
+ /// 鍒嗗巶缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName = "FACTORY")]
+ public string? Factory { get; set; }
- /// <summary>
- /// 鍏徃浠g爜
- /// </summary>
- [SugarColumn(ColumnName = "COMPANY")]
- public string Company { get; set; }
+ /// <summary>
+ /// 鍏徃浠g爜
+ ///</summary>
+ [SugarColumn(ColumnName = "COMPANY")]
+ public string? Company { get; set; }
- /// <summary>
- /// 绠卞彿鏉$爜
- /// </summary>
- [SugarColumn(ColumnName = "ITEM_BARCODE2")]
- public string ItemBarcode2 { get; set; }
+ /// <summary>
+ /// 绠卞彿鏉$爜
+ ///</summary>
+ [SugarColumn(ColumnName = "ITEM_BARCODE2")]
+ public string? ItemBarcode2 { get; set; }
- /// <summary>
- /// 鍗℃澘鏉$爜
- /// </summary>
- [SugarColumn(ColumnName = "ITEM_BARCODE3")]
- public string ItemBarcode3 { get; set; }
+ /// <summary>
+ /// 鍗℃澘鏉$爜
+ ///</summary>
+ [SugarColumn(ColumnName = "ITEM_BARCODE3")]
+ public string? ItemBarcode3 { get; set; }
- /// <summary>
- /// 浠诲姟鍗曞彿
- /// </summary>
- [SugarColumn(ColumnName = "WORK_NO")]
- public string WorkNo { get; set; }
+ /// <summary>
+ /// 浠诲姟鍗曞彿
+ ///</summary>
+ [SugarColumn(ColumnName = "WORK_NO")]
+ public string? WorkNo { get; set; }
- /// <summary>
- /// 浠诲姟鍗曡鍙�
- /// </summary>
- [SugarColumn(ColumnName = "WORK_LINE")]
+ /// <summary>
+ /// 浠诲姟鍗曡鍙�
+ ///</summary>
+ [SugarColumn(ColumnName = "WORK_LINE")]
public decimal? WorkLine { get; set; }
- /// <summary>
- /// 渚涘簲鍟�
- /// </summary>
- [SugarColumn(ColumnName = "SUPP_NO")]
- public string SuppNo { get; set; }
+ /// <summary>
+ /// 渚涘簲鍟�
+ ///</summary>
+ [SugarColumn(ColumnName = "SUPP_NO")]
+ public string? SuppNo { get; set; }
- /// <summary>
- /// 鐢熶骇绾�
- /// </summary>
- [SugarColumn(ColumnName = "LINE_NO")]
- public string LineNo { get; set; }
+ /// <summary>
+ /// 鐢熶骇绾�
+ ///</summary>
+ [SugarColumn(ColumnName = "LINE_NO")]
+ public string? LineNo { get; set; }
- /// <summary>
- /// 閲囪喘璁㈠崟id
- /// </summary>
- [SugarColumn(ColumnName = "EBELN_K3ID")]
+ /// <summary>
+ /// 閲囪喘璁㈠崟id
+ ///</summary>
+ [SugarColumn(ColumnName = "EBELN_K3ID")]
public decimal? EbelnK3id { get; set; }
- /// <summary>
- /// 閲囪喘璁㈠崟琛宨d
- /// </summary>
- [SugarColumn(ColumnName = "LINE_K3ID")]
+ /// <summary>
+ /// 閲囪喘璁㈠崟琛宨d
+ ///</summary>
+ [SugarColumn(ColumnName = "LINE_K3ID")]
public decimal? LineK3id { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡ID
+ ///</summary>
+ [SugarColumn(ColumnName = "ITEM_ID")]
+ public decimal? ItemId { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/Modes/MesInvItemBarcodes.cs b/MES.Service/Modes/MesInvItemBarcodes.cs
index 99458c0..fc6f2cc 100644
--- a/MES.Service/Modes/MesInvItemBarcodes.cs
+++ b/MES.Service/Modes/MesInvItemBarcodes.cs
@@ -19,37 +19,37 @@
/// 鐗╂枡鏉$爜
/// </summary>
[SugarColumn(ColumnName = "ITEM_BARCODE")]
- public string ItemBarcode { get; set; }
+ public string? ItemBarcode { get; set; }
/// <summary>
/// 瀹㈡埛鎴愬搧缂栫爜
/// </summary>
[SugarColumn(ColumnName = "C_PRODUCT_CODE")]
- public string CProductCode { get; set; }
+ public string? CProductCode { get; set; }
/// <summary>
/// 瀹㈡埛鐗╂枡鏉$爜
/// </summary>
[SugarColumn(ColumnName = "C_ITEM_BARCODE")]
- public string CItemBarcode { get; set; }
+ public string? CItemBarcode { get; set; }
/// <summary>
/// 瀹㈡埛鐗╂枡缂栫爜
/// </summary>
[SugarColumn(ColumnName = "C_ITEM_CODE")]
- public string CItemCode { get; set; }
+ public string? CItemCode { get; set; }
/// <summary>
/// 鏈徃鐗╂枡缂栫爜
/// </summary>
[SugarColumn(ColumnName = "ITEM_NO")]
- public string ItemNo { get; set; }
+ public string? ItemNo { get; set; }
/// <summary>
/// 鍘傚鎵规
/// </summary>
[SugarColumn(ColumnName = "LOT_NO")]
- public string LotNo { get; set; }
+ public string? LotNo { get; set; }
/// <summary>
/// 鏁伴噺
@@ -67,13 +67,13 @@
/// 鐢熶骇宸ュ崟
/// </summary>
[SugarColumn(ColumnName = "TASK_NO")]
- public string TaskNo { get; set; }
+ public string? TaskNo { get; set; }
/// <summary>
/// 鍒涘缓浜�
/// </summary>
[SugarColumn(ColumnName = "CREATE_BY")]
- public string CreateBy { get; set; }
+ public string? CreateBy { get; set; }
/// <summary>
/// 鍒涘缓鏃堕棿
@@ -85,7 +85,7 @@
/// 鏈�鍚庢洿鏂颁汉
/// </summary>
[SugarColumn(ColumnName = "LASTUPDATE_BY")]
- public string LastupdateBy { get; set; }
+ public string? LastupdateBy { get; set; }
/// <summary>
/// 鏈�鍚庢洿鏂版椂闂�
@@ -97,25 +97,25 @@
/// 瀹㈡埛缂栧彿
/// </summary>
[SugarColumn(ColumnName = "CUST_NO")]
- public string CustNo { get; set; }
+ public string? CustNo { get; set; }
/// <summary>
/// 鐗╂枡鏉$爜娉ㄩ噴琛孾鍐椾綑锛屾潯鐮侀噸鎵撲娇鐢╙
/// </summary>
[SugarColumn(ColumnName = "ITEM_BARCODE_TEXT")]
- public string ItemBarcodeText { get; set; }
+ public string? ItemBarcodeText { get; set; }
/// <summary>
/// 鍘烶SN鐗╂枡鏉$爜
/// </summary>
[SugarColumn(ColumnName = "OLD_ITEM_BARCODE")]
- public string OldItemBarcode { get; set; }
+ public string? OldItemBarcode { get; set; }
/// <summary>
/// SAP鏀惰揣鐗╂枡鍑瘉鍙� --閲囪喘鍗曞彿
/// </summary>
[SugarColumn(ColumnName = "MBLNR")]
- public string Mblnr { get; set; }
+ public string? Mblnr { get; set; }
/// <summary>
/// SAP鏀惰揣鐗╂枡鍑瘉琛屽彿 --閲囪喘鍗曡鍙�
@@ -157,7 +157,7 @@
/// 鍗曚綅
/// </summary>
[SugarColumn(ColumnName = "UNIT")]
- public string Unit { get; set; }
+ public string? Unit { get; set; }
/// <summary>
/// 閲嶉噺锛堝崟浣嶏細鍏枻锛�
@@ -181,49 +181,49 @@
/// 姹囨�绘潯鐮�
/// </summary>
[SugarColumn(ColumnName = "SUM_BARCODE")]
- public string SumBarcode { get; set; }
+ public string? SumBarcode { get; set; }
/// <summary>
/// 鐢熶骇鏃ユ湡
/// </summary>
[SugarColumn(ColumnName = "LOT_DATE")]
- public string LotDate { get; set; }
+ public string? LotDate { get; set; }
/// <summary>
/// 妯″彿
/// </summary>
[SugarColumn(ColumnName = "MOCODE")]
- public string Mocode { get; set; }
+ public string? Mocode { get; set; }
/// <summary>
/// 鏉ユ簮
/// </summary>
[SugarColumn(ColumnName = "MEMO")]
- public string Memo { get; set; }
+ public string? Memo { get; set; }
/// <summary>
/// 渚涘簲鍟嗙紪鐮�
/// </summary>
[SugarColumn(ColumnName = "SUPP_NO")]
- public string SuppNo { get; set; }
+ public string? SuppNo { get; set; }
/// <summary>
/// 妗d綅浣庡��
/// </summary>
[SugarColumn(ColumnName = "SPOSTION")]
- public string Spostion { get; set; }
+ public string? Spostion { get; set; }
/// <summary>
/// 妗d綅楂樺��
/// </summary>
[SugarColumn(ColumnName = "EPOSTION")]
- public string Epostion { get; set; }
+ public string? Epostion { get; set; }
/// <summary>
/// 鐗╂枡绠�绉�
/// </summary>
[SugarColumn(ColumnName = "ITEM_SNAME")]
- public string ItemSname { get; set; }
+ public string? ItemSname { get; set; }
/// <summary>
/// 鏄惁宸插喕缁�,1鍐荤粨
@@ -235,7 +235,7 @@
/// 渚涘簲鍟嗘壒娆�
/// </summary>
[SugarColumn(ColumnName = "TR_LOTNO")]
- public string TrLotno { get; set; }
+ public string? TrLotno { get; set; }
/// <summary>
/// 鍐荤粨鏃堕棿
@@ -247,13 +247,13 @@
/// 鍐荤粨鍘熷洜
/// </summary>
[SugarColumn(ColumnName = "FLEZZ_REASON")]
- public string FlezzReason { get; set; }
+ public string? FlezzReason { get; set; }
/// <summary>
/// 鍐荤粨浜�
/// </summary>
[SugarColumn(ColumnName = "FLEZZ_BY")]
- public string FlezzBy { get; set; }
+ public string? FlezzBy { get; set; }
/// <summary>
/// 寤堕暱淇濊川鏈�
@@ -271,37 +271,37 @@
/// 鎵撳嵃ID锛岀敤鏉ュ尯鍒嗘墦鍗版鏁�
/// </summary>
[SugarColumn(ColumnName = "PRINT_ID")]
- public string PrintId { get; set; }
+ public string? PrintId { get; set; }
/// <summary>
/// 鐜繚椤圭洰
/// </summary>
[SugarColumn(ColumnName = "EP_ITEM")]
- public string EpItem { get; set; }
+ public string? EpItem { get; set; }
/// <summary>
/// 宸ュ巶缂栧彿
/// </summary>
[SugarColumn(ColumnName = "FACTORY")]
- public string Factory { get; set; }
+ public string? Factory { get; set; }
/// <summary>
/// 鍏徃缂栧彿
/// </summary>
[SugarColumn(ColumnName = "COMPANY")]
- public string Company { get; set; }
+ public string? Company { get; set; }
/// <summary>
/// 鍗℃澘缂栫爜
/// </summary>
[SugarColumn(ColumnName = "CB_NO")]
- public string CbNo { get; set; }
+ public string? CbNo { get; set; }
/// <summary>
/// 鍘傚鐢熶骇绾�
/// </summary>
[SugarColumn(ColumnName = "LINFLINE")]
- public string Linfline { get; set; }
+ public string? Linfline { get; set; }
/// <summary>
/// 鏈夋晥鏈�
@@ -313,25 +313,25 @@
/// 璐ㄦ缁撴灉
/// </summary>
[SugarColumn(ColumnName = "IQC_STATUS")]
- public string IqcStatus { get; set; }
+ public string? IqcStatus { get; set; }
/// <summary>
/// 灏忚溅鏉$爜
/// </summary>
[SugarColumn(ColumnName = "FCAR")]
- public string Fcar { get; set; }
+ public string? Fcar { get; set; }
/// <summary>
/// 姣涢噸
/// </summary>
[SugarColumn(ColumnName = "GWEIGHT")]
- public string Gweight { get; set; }
+ public string? Gweight { get; set; }
/// <summary>
/// 鍑�閲�
/// </summary>
[SugarColumn(ColumnName = "NWEIGHT")]
- public string Nweight { get; set; }
+ public string? Nweight { get; set; }
/// <summary>
/// 淇濊川鏈�
@@ -343,19 +343,19 @@
/// 渚涘簲鍟嗐�佽禒鍝併�佸渚涙枡銆佸澶�
/// </summary>
[SugarColumn(ColumnName = "BARCODETYPE")]
- public string Barcodetype { get; set; }
+ public string? Barcodetype { get; set; }
/// <summary>
/// 渚涘簲鍟嗗悕绉�
/// </summary>
[SugarColumn(ColumnName = "SUPP_NAME")]
- public string SuppName { get; set; }
+ public string? SuppName { get; set; }
/// <summary>
/// 鍒拌揣鍗曞彿/鍏ュ簱鍗曞彿
/// </summary>
[SugarColumn(ColumnName = "BILL_NO")]
- public string BillNo { get; set; }
+ public string? BillNo { get; set; }
/// <summary>
/// 鎬ユ枡鏍囪瘑
@@ -367,13 +367,13 @@
/// 棰滆壊
/// </summary>
[SugarColumn(ColumnName = "COLOR_NAME")]
- public string ColorName { get; set; }
+ public string? ColorName { get; set; }
/// <summary>
/// 浜у搧鍨嬪彿
/// </summary>
[SugarColumn(ColumnName = "BOARD_STYLE")]
- public string BoardStyle { get; set; }
+ public string? BoardStyle { get; set; }
/// <summary>
/// 鏉ユ枡鏃ユ湡
@@ -391,13 +391,13 @@
/// 涓嶈壇鍘熷洜
/// </summary>
[SugarColumn(ColumnName = "MEMO_BAD")]
- public string MemoBad { get; set; }
+ public string? MemoBad { get; set; }
/// <summary>
/// 浠诲姟鍗曞彿
/// </summary>
[SugarColumn(ColumnName = "WORK_NO")]
- public string WorkNo { get; set; }
+ public string? WorkNo { get; set; }
/// <summary>
/// 鏉$爜鏉ユ簮鏍囪瘑锛�0-鍒濇湡鐗╂枡,1-閲囪喘鍏ュ簱锛�2銆佺敓浜ч��鏂欙紝3銆佸叾瀹冨叆搴擄紝4-瀹緵鏂�,5-鍦ㄥ簱鍒嗘枡锛�6-鍒剁▼鏉$爜
@@ -409,7 +409,7 @@
/// 鐢熶骇绾夸綋
/// </summary>
[SugarColumn(ColumnName = "LINE_NO")]
- public string LineNo { get; set; }
+ public string? LineNo { get; set; }
/// <summary>
/// 涓濆嵃娆℃暟
@@ -421,7 +421,7 @@
/// 涓濆嵃娆℃暟姣�
/// </summary>
[SugarColumn(ColumnName = "SILK")]
- public string Silk { get; set; }
+ public string? Silk { get; set; }
/// <summary>
/// 涓濆嵃娲惧伐浠庤〃ID
@@ -457,7 +457,7 @@
/// 鎶ュ伐鏃堕棿
/// </summary>
[SugarColumn(ColumnName = "WORK_FLGTIME")]
- public string WorkFlgtime { get; set; }
+ public string? WorkFlgtime { get; set; }
/// <summary>
/// 閲囪喘璁㈠崟ID
@@ -486,11 +486,11 @@
/// 缁勭粐id
/// </summary>
[SugarColumn(ColumnName = "ORG_NAME")]
- public string OrgName { get; set; }
+ public string? OrgName { get; set; }
/// <summary>
/// 璐т富id
/// </summary>
[SugarColumn(ColumnName = "ORG_OWNER")]
- public string OrgOwner { get; set; }
+ public string? OrgOwner { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/Modes/MesInvItemOutCDetails.cs b/MES.Service/Modes/MesInvItemOutCDetails.cs
index 2a20b10..2aa1821 100644
--- a/MES.Service/Modes/MesInvItemOutCDetails.cs
+++ b/MES.Service/Modes/MesInvItemOutCDetails.cs
@@ -11,230 +11,238 @@
/// <summary>
/// SEQ_INV_ID
/// </summary>
- [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
+ [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_INV_ID",
+ IsPrimaryKey = true)]
public decimal Id { get; set; }
/// <summary>
- /// 鍑哄簱鍗昳d
- /// </summary>
+ /// 鍑哄簱鍗昳d
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_OUT_ID")]
public decimal? ItemOutId { get; set; }
/// <summary>
- /// 鐗╂枡鏉$爜
- /// </summary>
+ /// 鐗╂枡鏉$爜
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_BARCODE")]
public string ItemBarcode { get; set; }
/// <summary>
- /// 瀹㈡埛鐗╂枡缂栫爜锛堟棤鏉$爜鎵嬪伐褰曞叆锛屾湁鏉$爜涓哄啑浣欏瓧娈碉級
- /// </summary>
+ /// 瀹㈡埛鐗╂枡缂栫爜锛堟棤鏉$爜鎵嬪伐褰曞叆锛屾湁鏉$爜涓哄啑浣欏瓧娈碉級
+ ///</summary>
[SugarColumn(ColumnName = "C_ITEM_CODE")]
public string CItemCode { get; set; }
/// <summary>
- /// 鏈徃鐗╂枡缂栫爜锛堟棤鏉$爜鎵嬪伐褰曞叆锛屾湁鏉$爜涓哄啑浣欏瓧娈碉級
- /// </summary>
+ /// 鏈徃鐗╂枡缂栫爜锛堟棤鏉$爜鎵嬪伐褰曞叆锛屾湁鏉$爜涓哄啑浣欏瓧娈碉級
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_NO")]
public string ItemNo { get; set; }
/// <summary>
- /// 鍘傚鎵规
- /// </summary>
+ /// 鍘傚鎵规
+ ///</summary>
[SugarColumn(ColumnName = "LOT_NO")]
public string LotNo { get; set; }
/// <summary>
- /// 鏁伴噺锛堟棤鏉$爜鎵嬪伐褰曞叆锛屾湁鏉$爜涓哄啑浣欏瓧娈碉級
- /// </summary>
+ /// 鏁伴噺锛堟棤鏉$爜鎵嬪伐褰曞叆锛屾湁鏉$爜涓哄啑浣欏瓧娈碉級
+ ///</summary>
[SugarColumn(ColumnName = "QUANTITY")]
public decimal? Quantity { get; set; }
/// <summary>
- /// 鎸枡鏍囧織锛�0锛嶅惁锛�1锛嶆槸锛�
- /// </summary>
+ /// 鎸枡鏍囧織锛�0锛嶅惁锛�1锛嶆槸锛�
+ ///</summary>
[SugarColumn(ColumnName = "FORCE_OUT_FLAG")]
public decimal? ForceOutFlag { get; set; }
/// <summary>
- /// 鍒涘缓浜�
- /// </summary>
+ /// 鍒涘缓浜�
+ ///</summary>
[SugarColumn(ColumnName = "CREATE_BY")]
public string CreateBy { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
- /// </summary>
+ /// 鍒涘缓鏃堕棿
+ ///</summary>
[SugarColumn(ColumnName = "CREATE_DATE")]
public DateTime? CreateDate { get; set; }
/// <summary>
- /// 鏈�鍚庢洿鏂颁汉
- /// </summary>
+ /// 鏈�鍚庢洿鏂颁汉
+ ///</summary>
[SugarColumn(ColumnName = "LASTUPDATE_BY")]
public string LastupdateBy { get; set; }
/// <summary>
- /// 鏈�鍚庢洿鏂版椂闂�
- /// </summary>
+ /// 鏈�鍚庢洿鏂版椂闂�
+ ///</summary>
[SugarColumn(ColumnName = "LASTUPDATE_DATE")]
public DateTime? LastupdateDate { get; set; }
/// <summary>
- /// 瀹㈡埛缂栫爜
- /// </summary>
+ /// 瀹㈡埛缂栫爜
+ ///</summary>
[SugarColumn(ColumnName = "CUST_NO")]
public string CustNo { get; set; }
/// <summary>
- /// 浠撳簱缂栫爜
- /// </summary>
+ /// 浠撳簱缂栫爜
+ ///</summary>
[SugarColumn(ColumnName = "DEPOT_CODE")]
public string DepotCode { get; set; }
/// <summary>
- /// 璐т綅缂栫爜
- /// </summary>
+ /// 璐т綅缂栫爜
+ ///</summary>
[SugarColumn(ColumnName = "DEPOT_SECTION_CODE")]
public string DepotSectionCode { get; set; }
/// <summary>
- /// </summary>
+ ///
+ ///</summary>
[SugarColumn(ColumnName = "REMARK")]
public string Remark { get; set; }
/// <summary>
- /// 鍏嶆鏍囪瘑(0-鍚︼紝1-鏄�)
- /// </summary>
+ /// 鍏嶆鏍囪瘑(0-鍚︼紝1-鏄�)
+ ///</summary>
[SugarColumn(ColumnName = "FORCE_EXEMPT_FLAG")]
public short? ForceExemptFlag { get; set; }
/// <summary>
- /// 鎶曟枡鎵规
- /// </summary>
+ /// 鎶曟枡鎵规
+ ///</summary>
[SugarColumn(ColumnName = "PRD_LOT_NO")]
public string PrdLotNo { get; set; }
/// <summary>
- /// 鏄惁鍋氭帴鏀舵鏌�
- /// </summary>
+ /// 鏄惁鍋氭帴鏀舵鏌�
+ ///</summary>
[SugarColumn(ColumnName = "CHECK_STATUS")]
public short? CheckStatus { get; set; }
/// <summary>
- /// 宸ュ巶缂栧彿
- /// </summary>
+ /// 宸ュ巶缂栧彿
+ ///</summary>
[SugarColumn(ColumnName = "FACTORY")]
public string Factory { get; set; }
/// <summary>
- /// 鍏徃缂栧彿
- /// </summary>
+ /// 鍏徃缂栧彿
+ ///</summary>
[SugarColumn(ColumnName = "COMPANY")]
public string Company { get; set; }
/// <summary>
- /// 鍘熺敓浜у伐鍗�
- /// </summary>
+ /// 鍘熺敓浜у伐鍗�
+ ///</summary>
[SugarColumn(ColumnName = "TASK_NOY")]
public string TaskNoy { get; set; }
/// <summary>
- /// 绠卞彿
- /// </summary>
+ /// 绠卞彿
+ ///</summary>
[SugarColumn(ColumnName = "BOX_NO")]
public string BoxNo { get; set; }
/// <summary>
- /// 鍖呰鎵规
- /// </summary>
+ /// 鍖呰鎵规
+ ///</summary>
[SugarColumn(ColumnName = "TASK_PACK")]
public string TaskPack { get; set; }
/// <summary>
- /// 鍗℃澘
- /// </summary>
+ /// 鍗℃澘
+ ///</summary>
[SugarColumn(ColumnName = "KB_NO")]
public string KbNo { get; set; }
/// <summary>
- /// 浜у搧鏈哄瀷
- /// </summary>
+ /// 浜у搧鏈哄瀷
+ ///</summary>
[SugarColumn(ColumnName = "BOARD_STYLE")]
public string BoardStyle { get; set; }
/// <summary>
- /// 鐢熶骇宸ュ崟
- /// </summary>
+ /// 鐢熶骇宸ュ崟
+ ///</summary>
[SugarColumn(ColumnName = "TASK_NO")]
public string TaskNo { get; set; }
/// <summary>
- /// 浠诲姟鍗曞彿
- /// </summary>
+ /// 浠诲姟鍗曞彿
+ ///</summary>
[SugarColumn(ColumnName = "WORK_NO")]
public string WorkNo { get; set; }
/// <summary>
- /// 浠诲姟鍗曡鍙�
- /// </summary>
+ /// 浠诲姟鍗曡鍙�
+ ///</summary>
[SugarColumn(ColumnName = "WORK_LINE")]
public decimal? WorkLine { get; set; }
/// <summary>
- /// 渚涘簲鍟嗙紪鍙�
- /// </summary>
+ /// 渚涘簲鍟嗙紪鍙�
+ ///</summary>
[SugarColumn(ColumnName = "SUPP_NO")]
public string SuppNo { get; set; }
/// <summary>
- /// 棰嗘枡鍗曞彿/濮斿璁㈠崟
- /// </summary>
+ /// 棰嗘枡鍗曞彿/濮斿璁㈠崟
+ ///</summary>
[SugarColumn(ColumnName = "PBILL_NO")]
public string PbillNo { get; set; }
/// <summary>
- /// 鎺ユ敹鏍囪瘑/1宸叉帴鏀�
- /// </summary>
+ /// 鎺ユ敹鏍囪瘑/1宸叉帴鏀�
+ ///</summary>
[SugarColumn(ColumnName = "RECEIVE")]
public decimal? Receive { get; set; }
/// <summary>
- /// 鎺ユ敹鏃堕棿
- /// </summary>
+ /// 鎺ユ敹鏃堕棿
+ ///</summary>
[SugarColumn(ColumnName = "RTIME")]
public DateTime? Rtime { get; set; }
/// <summary>
- /// 鎺ユ敹浜�
- /// </summary>
+ /// 鎺ユ敹浜�
+ ///</summary>
[SugarColumn(ColumnName = "RCV_BY")]
public string RcvBy { get; set; }
/// <summary>
- /// 鎺ユ敹杞﹂棿
- /// </summary>
+ /// 鎺ユ敹杞﹂棿
+ ///</summary>
[SugarColumn(ColumnName = "RCV_PART")]
public string RcvPart { get; set; }
/// <summary>
- /// 鍏ュ簱鍗曞彿
- /// </summary>
+ /// 鍏ュ簱鍗曞彿
+ ///</summary>
[SugarColumn(ColumnName = "RK_NO")]
public string RkNo { get; set; }
/// <summary>
- /// 閲囪喘璁㈠崟id
- /// </summary>
+ /// 閲囪喘璁㈠崟id
+ ///</summary>
[SugarColumn(ColumnName = "EBELN_K3ID")]
public decimal? EbelnK3id { get; set; }
/// <summary>
- /// 閲囪喘璁㈠崟琛宨d
- /// </summary>
+ /// 閲囪喘璁㈠崟琛宨d
+ ///</summary>
[SugarColumn(ColumnName = "LINE_K3ID")]
public decimal? LineK3id { get; set; }
+ /// <summary>
+ /// 鐗╂枡ID
+ ///</summary>
+ [SugarColumn(ColumnName = "ITEM_ID")]
+ public decimal? ItemId { get; set; }
+
[SugarColumn(IsIgnore = true)] public string? DepotName { get; set; }
[SugarColumn(IsIgnore = true)] public string? ItemName { get; set; }
[SugarColumn(IsIgnore = true)] public string? ItemModel { get; set; }
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll
index 17b0621..564df48 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.pdb b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
index a77bd2d..fb3ffe0 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll
index b0cbbee..8d24917 100644
--- a/MES.Service/bin/Release/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Release/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.pdb b/MES.Service/bin/Release/net8.0/MES.Service.pdb
index 089d566..3e8bf81 100644
--- a/MES.Service/bin/Release/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Release/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/service/Warehouse/MesInvItemBarcodesManager.cs b/MES.Service/service/Warehouse/MesInvItemBarcodesManager.cs
index 836f395..d1a6bea 100644
--- a/MES.Service/service/Warehouse/MesInvItemBarcodesManager.cs
+++ b/MES.Service/service/Warehouse/MesInvItemBarcodesManager.cs
@@ -1,5 +1,7 @@
锘縰sing MES.Service.DB;
+using MES.Service.Dto.service;
using MES.Service.Modes;
+using MES.Service.util;
using SqlSugar;
namespace MES.Service.service.Warehouse;
@@ -10,69 +12,667 @@
//杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 MesInvItemBarcodesManager.cs
+ #region 鐢熶骇棰嗘枡鏉$爜楠岃瘉
- #region 鏁欏鏂规硶
-
- /// <summary>
- /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉�
- /// </summary>
- public void Study()
+ //鐢熶骇棰嗘枡鏉$爜楠岃瘉鍚堢悊鎬�
+ private bool PdaProdPickItemCkBar(string cBarcode, string cDaa001)
{
- /*********鏌ヨ*********/
-
- var data1 = base.GetById(1); //鏍规嵁ID鏌ヨ
- var data2 = base.GetList(); //鏌ヨ鎵�鏈�
- var data3 = base.GetList(it => 1 == 1); //鏍规嵁鏉′欢鏌ヨ
- //var data4 = base.GetSingle(it => 1 == 1);//鏍规嵁鏉′欢鏌ヨ涓�鏉�,濡傛灉瓒呰繃涓�鏉′細鎶ラ敊
-
- var p = new PageModel { PageIndex = 1, PageSize = 2 }; // 鍒嗛〉鏌ヨ
- var data5 = base.GetPageList(it => 1 == 1, p);
- Console.Write(p.TotalCount); //杩斿洖鎬绘暟
-
- var data6 =
- base.GetPageList(it => 1 == 1, p,
- it => SqlFunc.GetRandom()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
- Console.Write(p.TotalCount); //杩斿洖鎬绘暟
-
- var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
- conModels.Add(new ConditionalModel
+ try
{
- FieldName = typeof(MesInvItemBarcodes).GetProperties()[0].Name,
- ConditionalType = ConditionalType.Equal, FieldValue = "1"
- }); //id=1
- var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+ // 1. 妫�鏌ユ潯鐮佹槸鍚︿负绌�
+ if (string.IsNullOrEmpty(cBarcode))
+ {
+ throw new Exception("璇疯緭鍏ユ潯鐮侊紒");
+ }
- AsQueryable().Where(x => 1 == 1)
- .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+ // 2. 妫�鏌ユ潯鐮佹槸鍚﹀瓨鍦ㄤ簬 MesInvItemBarcodes 琛ㄤ腑
+ int tempNum = Db.Queryable<MesInvItemBarcodes>()
+ .Where(it => it.ItemBarcode == cBarcode)
+ .Count();
+ if (tempNum == 0)
+ {
+ throw new Exception("鏉$爜涓嶅瓨鍦紒");
+ }
+ // 3. 妫�鏌ユ潯鐮佹槸鍚﹀瓨鍦ㄤ簬 MesInvItemStocks 琛ㄤ腑
+ tempNum = Db.Queryable<MesInvItemStocks>()
+ .Where(it => it.ItemBarcode == cBarcode)
+ .Count();
+ if (tempNum == 0)
+ {
+ throw new Exception("搴撳瓨涓棤姝ゆ潯鐮侊紒");
+ }
- /*********鎻掑叆*********/
- var insertData = new MesInvItemBarcodes(); //娴嬭瘯鍙傛暟
- var insertArray = new[] { insertData };
- base.Insert(insertData); //鎻掑叆
- base.InsertRange(insertArray); //鎵归噺鎻掑叆
- var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
- AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+ // 4. 鑾峰彇 MesInvItemBarcodes 鐨勬暟鎹�
+ var mesInvItemBarcodes = Db.Queryable<MesInvItemBarcodes>()
+ .Where(it => it.ItemBarcode == cBarcode)
+ .First();
+ if (mesInvItemBarcodes == null)
+ {
+ throw new Exception("鏉$爜涓嶅瓨鍦紒");
+ }
+ // 5. 妫�鏌ユ潯鐮佹暟閲忔槸鍚︿负 0
+ if (mesInvItemBarcodes.Quantity == 0)
+ {
+ throw new Exception("姝ゆ潯鐮佹暟閲忎负0锛�");
+ }
- /*********鏇存柊*********/
- var updateData = new MesInvItemBarcodes(); //娴嬭瘯鍙傛暟
- var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
- base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
- base.UpdateRange(updateArray); //鎵归噺鏇存柊
- //base.Update(it => new MesInvItemBarcodes() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
- AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+ // 6. 妫�鏌ユ潯鐮佺姸鎬�
+ if (mesInvItemBarcodes.Barcodestatus == 1 ||
+ mesInvItemBarcodes.Hbdytm == 1)
+ {
+ throw new Exception("鏃犳晥鏉$爜锛�");
+ }
+ // 7. 妫�鏌ユ潯鐮佹槸鍚﹁鍐荤粨
+ if (mesInvItemBarcodes.Visable == 1)
+ {
+ throw new Exception("鏉$爜鍐荤粨锛�");
+ }
- /*********鍒犻櫎*********/
- var deldata = new MesInvItemBarcodes(); //娴嬭瘯鍙傛暟
- base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
- base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
- base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
- base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
- AsDeleteable().Where(it => 1 == 2)
- .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+ // 8. 妫�鏌ユ潯鐮佹槸鍚︿綔搴�
+ if (mesInvItemBarcodes.Location == 2)
+ {
+ throw new Exception("鏉$爜浣滃簾锛�");
+ }
+
+ // 9. 妫�鏌ユ姇鏂欏崟鏄惁闇�瑕佹鐗╂枡
+ tempNum = Db.Queryable<Womdab>()
+ .Where(it =>
+ it.Dab001 == cDaa001 && it.Dab003 ==
+ mesInvItemBarcodes.ItemId.ToString())
+ .Count();
+ if (tempNum == 0)
+ {
+ throw new Exception("鎶曟枡鍗曚笉闇�瑕佹鐗╂枡锛�");
+ }
+
+ string sql =
+ "SELECT COUNT(1) FROM WOMDAB WHERE DAB001='" + cDaa001 +
+ "' AND DAB003='" + mesInvItemBarcodes.ItemId +
+ "' AND DAB017=(SELECT DEPOTS_CODE FROM MES_INV_ITEM_STOCKS WHERE ITEM_BARCODE='" +
+ cBarcode + "')";
+
+ // 10. 妫�鏌ュ彂鏂欎粨搴撴槸鍚︽纭�
+ tempNum = Db.Ado.SqlQuerySingle<int>(sql);
+ if (tempNum == 0)
+ {
+ throw new Exception("鍙戞枡浠撳簱鏈夎锛�");
+ }
+
+ // 11. 鎴愬姛锛岃繑鍥炵粨鏋�
+ return true;
+ }
+ catch (Exception ex)
+ {
+ // 鎹曡幏寮傚父骞堕噸鏂版姏鍑�
+ throw new Exception($"鎶ラ敊: {ex.Message}");
+ }
+ }
+
+ public decimal? GetBarCodesQuan(WarehouseQuery query)
+ {
+ if (!PdaProdPickItemCkBar(query.barcode, query.daa001))
+ {
+ return null;
+ }
+
+ var invItemBarcodes = Db.Queryable<MesInvItemBarcodes>()
+ .Where(s => s.ItemBarcode == query.barcode).First();
+
+ if (invItemBarcodes == null)
+ {
+ throw new Exception("鏉$爜涓嶅瓨鍦紒");
+ }
+
+ return invItemBarcodes.Quantity;
+ }
+
+ //鐢熶骇棰嗘枡淇濆瓨
+ public string PrcRfPdaProdPickItem3(WarehouseQuery query)
+ {
+ var (factory, company) = UserUtil.GetFactory(query.userName);
+ var param = new ProdPickParams
+ {
+ CUser = query.userName,
+ CBarcode = query.barcode,
+ CDaa001 = query.daa001,
+ CNum = query.Num,
+ PiFactory = factory,
+ PiCompany = company
+ };
+
+ // 妫�鏌ュ彂鏂欐暟閲忔槸鍚﹀悎娉�
+ if (param.CNum <= 0)
+ {
+ throw new Exception("鍙戞枡鏁伴噺涓嶈兘灏忎簬绛変簬0锛�");
+ }
+
+ // 妫�鏌ユ潯鐮佹槸鍚﹀瓨鍦�
+ param.CInvItemBarcodes = Db.Queryable<MesInvItemBarcodes>()
+ .Where(it => it.ItemBarcode == param.CBarcode)
+ .First();
+ if (param.CInvItemBarcodes == null)
+ {
+ throw new Exception("鏉$爜涓嶅瓨鍦紒");
+ }
+
+ // 妫�鏌ユ潯鐮佹槸鍚﹀凡鍏ュ簱
+ param.CInvItemStocks = Db.Queryable<MesInvItemStocks>()
+ .Where(it => it.ItemBarcode == param.CBarcode)
+ .First();
+ if (param.CInvItemStocks == null)
+ {
+ throw new Exception("鏉$爜鏈叆搴擄紒");
+ }
+
+ // 妫�鏌ュ伐鍗曞彿鏄惁瀛樺湪
+ param.CWomdaa = Db.Queryable<Womdaa>()
+ .Where(it => it.Daa001 == param.CDaa001)
+ .First();
+ if (param.CWomdaa == null)
+ {
+ throw new Exception("涓嶅瓨鍦ㄦ宸ュ崟锛�");
+ }
+
+ // 妫�鏌ュ彂鏂欐暟閲忔槸鍚﹁秴鍑烘潯鐮佹暟閲�
+ if (param.CNum > param.CInvItemBarcodes.Quantity)
+ {
+ throw new Exception("鍙戞枡鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�");
+ }
+
+ // 妫�鏌ユ潯鐮佸悎娉曟��
+ if (!PdaProdPickItemCkBar(param.CBarcode, param.CDaa001))
+ {
+ return null;
+ }
+
+ // 璁$畻鍓╀綑鍙彂鏁伴噺
+ decimal? tempNum = CalculateRemainingQuantity(param.CDaa001,
+ param.CInvItemBarcodes.ItemId);
+ if (param.CNum > tempNum)
+ {
+ throw new Exception("鍙戞枡鏁伴噺涓嶈兘澶т簬瀵瑰簲鐗╂枡鐨勬湭鍙戞枡鏁伴噺锛�");
+ }
+
+ // 宸ュ崟閮ㄩ棬鍚嶇О
+ param.CDepart = Db.Queryable<SysDepartment>()
+ .Where(dep => dep.Id.ToString() == param.CWomdaa.Daa013)
+ .Select(dep => dep.Departmentname)
+ .First();
+
+ // 鐢熸垚鏂版潯鐮�
+ param.NewBarcode = GenerateNewBarcode(param.CBarcode);
+
+ UseTransaction(db =>
+ {
+ // 瀵瑰嚭搴撳崟鐨勬搷浣�
+ var (outId, outBill) = HandleInventoryOut(db, param);
+ param.COutId = outId;
+ param.OutBill = outBill;
+
+ // 鏇存柊鏉$爜鏁版嵁
+ UpdateBarcodeData(db, param);
+
+ // 鐢熸垚鎵撳嵃鏉$爜骞舵彃鍏ュ埌 mes_rf_prnbarcode
+ GenerateAndInsertPrintBarcode(db, param);
+
+ return 1;
+ });
+
+ return "001";
+ }
+
+ private void UpdateBarcodeData(SqlSugarScope db, ProdPickParams param)
+ {
+ // 鏇存柊鏉$爜鏁版嵁
+ db.Updateable<MesInvItemBarcodes>()
+ .SetColumns(it => new MesInvItemBarcodes
+ { Oldqty = it.Quantity, Quantity = it.Quantity - param.CNum })
+ .Where(it => it.ItemBarcode == param.CBarcode)
+ .ExecuteCommand();
+
+ // 鎻掑叆鏂扮殑鏉$爜璁板綍
+ db.Insertable(new MesInvItemBarcodes
+ {
+ ItemNo = param.CInvItemBarcodes.ItemNo,
+ ItemId = param.CInvItemBarcodes.ItemId,
+ CreateBy = param.CUser,
+ CreateDate = DateTime.Now,
+ TaskNo = param.CDaa001,
+ WorkNo = param.CWomdaa.Daa021,
+ SuppNo = param.CInvItemBarcodes.SuppNo,
+ Mblnr = param.CInvItemBarcodes.Mblnr,
+ Zeile = param.CInvItemBarcodes.Zeile,
+ Factory = param.CInvItemBarcodes.Factory,
+ Company = param.CInvItemBarcodes.Company,
+ EbelnK3id = param.CInvItemBarcodes.EbelnK3id,
+ LineK3id = param.CInvItemBarcodes.LineK3id,
+ Quantity = param.CNum,
+ Oldqty = param.CNum,
+ ItemBarcode = param.NewBarcode,
+ Unit = param.CInvItemBarcodes.Unit,
+ LotDate = param.CInvItemBarcodes.LotDate,
+ Memo = "鐢熶骇棰嗘枡",
+ ItemSname = param.CInvItemBarcodes.ItemSname,
+ TrLotno = param.CInvItemBarcodes.TrLotno,
+ BillNo = param.CInvItemBarcodes.BillNo,
+ InsDate = param.CInvItemBarcodes.InsDate,
+ WorkLine = param.CInvItemBarcodes.WorkLine,
+ ComeFlg = 6,
+ OldItemBarcode = param.CBarcode
+ }).ExecuteCommand();
+
+ // 鏇存柊鏉$爜搴撳瓨
+ db.Updateable<MesInvItemStocks>()
+ .SetColumns(it => new MesInvItemStocks
+ { Quantity = it.Quantity - param.CNum })
+ .Where(it => it.ItemBarcode == param.CBarcode)
+ .ExecuteCommand();
+
+ // 鎻掑叆鍑哄簱鏉$爜鏄庣粏琛�
+ db.Insertable(new MesInvItemOutCDetails
+ {
+ ItemOutId = param.COutId,
+ ItemNo = param.CInvItemBarcodes.ItemNo,
+ ItemId = param.CInvItemBarcodes.ItemId,
+ CreateBy = param.CUser,
+ CreateDate = DateTime.Now,
+ DepotCode = param.CInvItemStocks.DepotsCode,
+ DepotSectionCode = param.CInvItemStocks.DepotSectionsCode,
+ TaskNo = param.CDaa001,
+ WorkNo = param.CWomdaa.Daa021,
+ SuppNo = param.CInvItemBarcodes.SuppNo,
+ PbillNo = param.OutBill,
+ Factory = param.PiFactory,
+ Company = param.PiCompany,
+ EbelnK3id = param.CInvItemStocks.EbelnK3id,
+ LineK3id = param.CInvItemStocks.LineK3id,
+ Quantity = param.CNum,
+ ItemBarcode = param.NewBarcode
+ }).ExecuteCommand();
+
+ // 鎻掑叆鍒� MesInvBusiness2 琛�
+ db.Insertable(new MesInvBusiness2
+ {
+ Status = 1,
+ BillTypeId = 200,
+ ItemNo = param.CInvItemBarcodes.ItemNo,
+ ItemId = param.CInvItemBarcodes.ItemId,
+ CreateBy = param.CUser,
+ CreateDate = DateTime.Now,
+ TaskNo = param.CDaa001,
+ WorkNo = param.CWomdaa.Daa021,
+ SuppNo = param.CInvItemBarcodes.SuppNo,
+ Factory = param.PiFactory,
+ Company = param.PiCompany,
+ EbelnK3id = param.CInvItemStocks.EbelnK3id,
+ LineK3id = param.CInvItemStocks.LineK3id,
+ Quantity = param.CNum,
+ ItemBarcode = param.CBarcode
+ }).ExecuteCommand();
+ }
+
+ private void GenerateAndInsertPrintBarcode(SqlSugarScope db,
+ ProdPickParams param)
+ {
+ string cSupName = null;
+ if (!string.IsNullOrEmpty(param.CInvItemBarcodes.SuppNo))
+ {
+ cSupName = db.Queryable<MesSupplier>()
+ .Where(it => it.SuppNo == param.CInvItemBarcodes.SuppNo)
+ .Select(it => it.SuppName)
+ .First();
+ }
+
+ int cId =
+ db.Ado.GetInt(
+ "SELECT F_GETSEQNEXTVALUE('MES_RF_PRNBARCODE') FROM dual");
+
+ // 鎻掑叆鎵撳嵃鏉$爜璁板綍
+ db.Insertable(new MesRfPrnbarcode
+ {
+ Id = cId,
+ Forder = "1",
+ Fno = "1",
+ CreateDate = DateTime.Now,
+ Strp1 = param.CBarcode,
+ Strp2 = cSupName ?? " ",
+ Strp3 = param.CInvItemBarcodes.ItemNo,
+ Strp4 = GetItemName(param.CInvItemBarcodes.ItemId) ?? " ",
+ Strp5 =
+ $"{param.CInvItemBarcodes.Quantity - param.CNum} {GetUnitName(param.CInvItemBarcodes.Unit)}",
+ Strp6 = DateTime.Now.ToString("yyyy-MM-dd"),
+ Strp7 = GetItemModel(param.CInvItemBarcodes.ItemId) ?? " ",
+ Strp8 = param.CBarcode,
+ Strp9 = GetItemModel(param.CInvItemBarcodes.ItemId) ?? " ",
+ Strp10 = param.CBarcode,
+ Strp11 = param.CBarcode,
+ Strp12 = param.CBarcode
+ }).ExecuteCommand();
+
+ db.Insertable(new MesRfPrnbarcode
+ {
+ Id = cId,
+ Forder = "1",
+ Fno = "1",
+ CreateDate = DateTime.Now,
+ Strp1 = param.NewBarcode,
+ Strp2 = cSupName ?? " ",
+ Strp3 = param.CInvItemBarcodes.ItemNo,
+ Strp4 = GetItemName(param.CInvItemBarcodes.ItemId) ?? " ",
+ Strp5 = $"{param.CNum} {GetUnitName(param.CInvItemBarcodes.Unit)}",
+ Strp6 = DateTime.Now.ToString("yyyy-MM-dd"),
+ Strp7 = GetItemModel(param.CInvItemBarcodes.ItemId) ?? " ",
+ Strp8 = param.NewBarcode,
+ Strp9 = GetItemModel(param.CInvItemBarcodes.ItemId) ?? " ",
+ Strp10 = param.NewBarcode,
+ Strp11 = param.NewBarcode,
+ Strp12 = param.NewBarcode
+ }).ExecuteCommand();
+ }
+
+ private (int OutId, string OutBill) HandleInventoryOut(SqlSugarScope db,
+ ProdPickParams param)
+ {
+ // 澶勭悊鍑哄簱鍗曠殑鎻掑叆鎴栨洿鏂伴�昏緫
+ var tempNum = db.Queryable<MesInvItemOuts>()
+ .Where(it => it.TaskNo == param.CDaa001 && it.Status == 0)
+ .Count();
+
+ int cOutId = 0;
+ string cOutBill;
+
+ if (tempNum == 0)
+ {
+ string sql =
+ "SELECT COUNT(1) FROM MES_INV_ITEM_OUTS WHERE TRUNC(CREATE_DATE)=TRUNC(SYSDATE);";
+ int todayCount = db.Ado.SqlQuerySingle<int>(sql);
+
+ cOutBill = $"P{DateTime.Now:yyyyMMdd}{(todayCount + 1):D4}";
+
+ // 鎻掑叆鏂扮殑鍑哄簱鍗�
+ db.Insertable(new MesInvItemOuts
+ {
+ ItemOutNo = cOutBill,
+ TaskNo = param.CDaa001,
+ Status = 0,
+ CreateBy = param.CUser,
+ CreateDate = DateTime.Now,
+ WorkNo = param.CWomdaa.Daa021,
+ OutType = "鐢熶骇棰嗘枡",
+ BoardItem = param.CWomdaa.Daa002,
+ PbillNo = param.CDaa001,
+ BillTypeId = 200,
+ TransactionNo = 201,
+ Company = param.PiCompany,
+ Factory = param.PiFactory,
+ Remark = "鐢熶骇棰嗘枡",
+ DepotCode = param.CInvItemStocks.DepotsCode,
+ OutDate = DateTime.Now,
+ OutPart = param.CDepart
+ }).ExecuteCommand();
+ }
+ else
+ {
+ // 鑾峰彇鐜版湁鍑哄簱鍗曞彿
+ var outItem = db.Queryable<MesInvItemOuts>()
+ .Where(it => it.TaskNo == param.CDaa001 && it.Status == 0)
+ .Select(it => new { it.ItemOutNo, it.Id })
+ .First();
+
+ cOutBill = outItem.ItemOutNo;
+ cOutId = Convert.ToInt32(outItem.Id);
+ }
+
+ // 鎻掑叆鎴栨洿鏂颁粠琛�
+ InsertOrUpdateOutItems(db, cOutId, param);
+
+ return (cOutId, cOutBill);
+ }
+
+ private void InsertOrUpdateOutItems(SqlSugarScope db, int cOutId,
+ ProdPickParams param)
+ {
+ var tempNum = db.Queryable<MesInvItemOutItems>()
+ .Where(it =>
+ it.ItemId == param.CInvItemBarcodes.ItemId &&
+ it.ItemOutId == cOutId)
+ .Count();
+
+ decimal? cNumTemp = param.CNum;
+
+ string sql =
+ "SELECT B.Id, NVL(A.YF, 0) yfl, B.DAB006 - NVL(A.YF, 0) Qty FROM WOMDAB B LEFT JOIN (SELECT SUM(QUANTITY) YF, ITEM_DABID FROM MES_INV_ITEM_OUT_ITEMS GROUP BY ITEM_DABID) A ON A.ITEM_DABID = B.ID WHERE DAB003 = '" +
+ param.CInvItemBarcodes.ItemId + "' AND DAB001 = '" + param.CDaa001 +
+ "' ORDER BY TO_NUMBER(DAB002)";
+
+ var womdabList = db.Ado.SqlQuery<DabResult>(sql);
+
+ foreach (var item in womdabList)
+ {
+ if (item.Qty <= 0) continue;
+ var itemDabid = item.Id;
+ if (cNumTemp <= item.Qty)
+ {
+ if (tempNum == 0)
+ {
+ // 鎻掑叆鏂扮殑鍙戞枡璁板綍
+ db.Insertable(new MesInvItemOutItems
+ {
+ ItemOutId = cOutId,
+ Quantity = cNumTemp,
+ ItemDabid = itemDabid,
+ ItemId = param.CInvItemBarcodes.ItemId,
+ ItemNo = param.CInvItemBarcodes.ItemNo,
+ CreateBy = param.CUser,
+ CreateDate = DateTime.Now,
+ Factory = param.PiFactory,
+ Company = param.PiCompany,
+ DepotCode = param.CInvItemStocks.DepotsCode,
+ TaskNo = param.CDaa001,
+ EbelnK3id = param.CInvItemBarcodes.EbelnK3id,
+ LineK3id = param.CInvItemBarcodes.LineK3id,
+ PbillNo = param.CDaa001,
+ WorkNo = param.CInvItemStocks.WorkNo,
+ WorkLine = param.CInvItemStocks.WorkLine,
+ DepotSectionCode =
+ param.CInvItemStocks.DepotSectionsCode
+ }).ExecuteCommand();
+ }
+ else
+ {
+ // 鏇存柊鐜版湁鍙戞枡璁板綍鐨勬暟閲�
+ db.Updateable<MesInvItemOutItems>()
+ .SetColumns(it => new MesInvItemOutItems
+ { Quantity = it.Quantity + cNumTemp })
+ .Where(it =>
+ it.ItemOutId == cOutId &&
+ it.ItemDabid == itemDabid)
+ .ExecuteCommand();
+ }
+
+ // 鏇存柊 WOMDAB 琛ㄧ殑鍙戞枡鏁伴噺
+ db.Updateable<Womdab>()
+ .SetColumns(it => new Womdab
+ { Dab007 = item.Yfl + cNumTemp })
+ .Where(it => it.Id == itemDabid)
+ .ExecuteCommand();
+
+ break;
+ }
+
+ // 鎻掑叆鍓╀綑鐨勫彂鏂欒褰�
+ db.Insertable(new MesInvItemOutItems
+ {
+ ItemOutId = cOutId,
+ Quantity = item.Qty,
+ ItemDabid = itemDabid,
+ ItemId = param.CInvItemBarcodes.ItemId,
+ ItemNo = param.CInvItemBarcodes.ItemNo,
+ CreateBy = param.CUser,
+ CreateDate = DateTime.Now,
+ Factory = param.PiFactory,
+ Company = param.PiCompany,
+ DepotCode = param.CInvItemStocks.DepotsCode,
+ TaskNo = param.CDaa001,
+ EbelnK3id = param.CInvItemBarcodes.EbelnK3id,
+ LineK3id = param.CInvItemBarcodes.LineK3id,
+ PbillNo = param.CDaa001,
+ WorkNo = param.CInvItemStocks.WorkNo,
+ WorkLine = param.CInvItemStocks.WorkLine,
+ DepotSectionCode = param.CInvItemStocks.DepotSectionsCode
+ }).ExecuteCommand();
+
+ cNumTemp -= item.Qty;
+
+ // 鏇存柊 WOMDAB 琛ㄧ殑鍙戞枡鏁伴噺
+ db.Updateable<Womdab>()
+ .SetColumns(it => new Womdab { Dab007 = it.Dab006 })
+ .Where(it => it.Id == itemDabid)
+ .ExecuteCommand();
+ }
+ }
+
+ private string GenerateNewBarcode(string oldBarcode)
+ {
+ // 鐢熸垚鏂扮殑鏉$爜閫昏緫
+ int count = Db.Queryable<MesInvItemBarcodes>()
+ .Where(b => b.OldItemBarcode == oldBarcode).Count();
+ return $"{oldBarcode}-{count + 1}";
+ }
+
+ private decimal? CalculateRemainingQuantity(
+ string cDaa001, decimal? itemId)
+ {
+ // 璁$畻鍓╀綑鍙彂鏁伴噺
+ var womdab = Db.Queryable<Womdab, Womdaa>((b, a) => new JoinQueryInfos(
+ JoinType.Left, b.Pid == a.Id))
+ .Where((b, a) =>
+ a.Daa001 == cDaa001 && b.Dab003 == itemId.ToString())
+ .Select(b => new
+ {
+ TotalQuantity = SqlFunc.AggregateMax(b.Dab006),
+ IssuedQuantity = SqlFunc.AggregateMax(b.Dab007)
+ })
+ .First();
+
+ return womdab.TotalQuantity - womdab.IssuedQuantity;
+ }
+
+ private static string GetItemName(decimal? pId)
+ {
+ try
+ {
+ if (pId == null)
+ {
+ return null;
+ }
+
+ // 鏌ヨ鐗╂枡鍚嶇О
+ string itemName = Db.Queryable<MesItems>()
+ .Where(it => it.Id == pId)
+ .Select(it => it.ItemName)
+ .First();
+
+ return itemName;
+ }
+ catch (Exception)
+ {
+ throw new Exception("鏈壘鍒扮墿鏂欏悕绉帮紝鐗╂枡id鍙蜂负" + pId);
+ }
+ }
+
+ private string GetUnitName(string? pId)
+ {
+ try
+ {
+ if (string.IsNullOrEmpty(pId))
+ {
+ return null;
+ }
+
+ // 鏌ヨ鍗曚綅鍚嶇О鏄惁瀛樺湪
+ int tempNum = Db.Queryable<MesUnit>()
+ .Where(it => it.Id.ToString() == pId)
+ .Count();
+
+ string unitName;
+
+ if (tempNum != 0)
+ {
+ // 濡傛灉鍦� MES_UNIT 琛ㄤ腑鎵惧埌鍗曚綅鍚嶇О
+ unitName = Db.Queryable<MesUnit>()
+ .Where(it => it.Id.ToString() == pId)
+ .Select(it => it.Fname)
+ .First();
+ }
+ else
+ {
+ // 濡傛灉鍦� MES_UNIT 琛ㄤ腑鎵句笉鍒帮紝鍦� MES_ITEMS 琛ㄤ腑鏌ユ壘鐩稿叧鑱旂殑鍗曚綅鍚嶇О
+ unitName = Db.Queryable<MesItems, MesUnit>((i, u) =>
+ new JoinQueryInfos(
+ JoinType.Left, i.ItemUnit == u.Id.ToString()))
+ .Where((i, u) => i.Id.ToString() == pId)
+ .Select((i, u) => u.Fname)
+ .First();
+ }
+
+ return unitName;
+ }
+ catch (Exception)
+ {
+ throw new Exception("鍗曚綅鍚嶇О鏈壘鍒帮紝鐗╂枡id鍙蜂负" + pId);
+ }
+ }
+
+ private string GetItemModel(decimal? pId)
+ {
+ try
+ {
+ if (pId == null)
+ {
+ return null;
+ }
+
+ // 鏌ヨ鐗╂枡瑙勬牸
+ string itemModel = Db.Queryable<MesItems>()
+ .Where(it => it.Id == pId)
+ .Select(it => it.ItemModel)
+ .First();
+
+ return itemModel;
+ }
+ catch (Exception)
+ {
+ throw new Exception("鏈壘鍒扮墿鏂欏瀷鍙凤紝鐗╂枡id鍙蜂负" + pId);
+ }
}
#endregion
+}
+
+public class ProdPickParams
+{
+ public string? CUser { get; set; }
+ public string? CBarcode { get; set; }
+ public string? CDaa001 { get; set; }
+ public decimal? CNum { get; set; }
+ public MesInvItemBarcodes? CInvItemBarcodes { get; set; }
+ public MesInvItemStocks? CInvItemStocks { get; set; }
+ public Womdaa? CWomdaa { get; set; }
+ public string? NewBarcode { get; set; }
+ public string? PiCompany { get; set; }
+ public string? PiFactory { get; set; }
+ public string? CDepart { get; set; }
+ public int? COutId { get; set; }
+ public string? OutBill { get; set; }
+}
+
+public class DabResult
+{
+ public decimal? Id { get; set; }
+ public decimal? Yfl { get; set; }
+ public decimal? Qty { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/util/UserUtil.cs b/MES.Service/util/UserUtil.cs
new file mode 100644
index 0000000..8339590
--- /dev/null
+++ b/MES.Service/util/UserUtil.cs
@@ -0,0 +1,17 @@
+锘縰sing MES.Service.DB;
+
+namespace MES.Service.util;
+
+public class UserUtil : RepositoryNoEntity
+{
+ public static (string factory, string company) GetFactory(string user)
+ {
+ string sql =
+ "select t.Ffactory factory, t.Fcompany company from sys_user t where t.fcode = upper(trim('" +
+ user + "'))";
+
+ var sqlQuerySingle = Db.Ado.SqlQuerySingle<dynamic>(sql);
+
+ return (sqlQuerySingle.FACTORY, sqlQuerySingle.COMPANY);
+ }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/Warehouse/MesInvItemBarcodesController.cs b/MESApplication/Controllers/Warehouse/MesInvItemBarcodesController.cs
index 124e534..e0c9138 100644
--- a/MESApplication/Controllers/Warehouse/MesInvItemBarcodesController.cs
+++ b/MESApplication/Controllers/Warehouse/MesInvItemBarcodesController.cs
@@ -41,6 +41,31 @@
}
}
+ //PrcRfPdaProdPickItem3
+ /// <summary>
+ /// 鐢熶骇棰嗘枡鍗曚繚瀛�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("ProdPickItem3")]
+ public ResponseResult ProdPickItem3(WarehouseQuery query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.PrcRfPdaProdPickItem3(query);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
/// <summary>
/// 鑾峰彇鎵�鏈�
/// </summary>
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll
index 17b0621..564df48 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.pdb b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
index a77bd2d..fb3ffe0 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.dll b/MESApplication/bin/Debug/net8.0/MESApplication.dll
index 1869b75..767eb3e 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.exe b/MESApplication/bin/Debug/net8.0/MESApplication.exe
index 9dd5730..c089558 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.pdb b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
index a54f851..d466406 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.xml b/MESApplication/bin/Debug/net8.0/MESApplication.xml
index 3378e73..55a7b81 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.xml
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.xml
@@ -869,6 +869,18 @@
</summary>
<returns></returns>
</member>
+ <member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.GetBarCodesQuan(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鏍规嵁鏉$爜鑾峰彇鏁伴噺
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.ProdPickItem3(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鐢熶骇棰嗘枡鍗曚繚瀛�
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.GetList">
<summary>
鑾峰彇鎵�鏈�
@@ -1429,6 +1441,18 @@
</summary>
<returns></returns>
</member>
+ <member name="M:MESApplication.Controllers.WomdaaController.GetProductionPickDaa001(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 妯$硦鏌ヨ宸ュ崟鍙峰苟杩斿洖
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:MESApplication.Controllers.WomdaaController.GetItemsByDaa001(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鏍规嵁宸ュ崟鍙疯幏鍙栦唬棰嗙墿鏂欐槑缁�
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:MESApplication.Controllers.WomdaaController.GetList">
<summary>
鑾峰彇鎵�鏈�
diff --git a/MESApplication/bin/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll
index b0cbbee..8d24917 100644
--- a/MESApplication/bin/Release/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Release/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MES.Service.pdb b/MESApplication/bin/Release/net8.0/MES.Service.pdb
index 089d566..3e8bf81 100644
--- a/MESApplication/bin/Release/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Release/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll
index 2cff899..d4aedef 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Release/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.exe b/MESApplication/bin/Release/net8.0/MESApplication.exe
index 15b3623..c089558 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Release/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.pdb b/MESApplication/bin/Release/net8.0/MESApplication.pdb
index 6b36183..ccb2f94 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Release/net8.0/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.xml b/MESApplication/bin/Release/net8.0/MESApplication.xml
index 3378e73..55a7b81 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.xml
+++ b/MESApplication/bin/Release/net8.0/MESApplication.xml
@@ -869,6 +869,18 @@
</summary>
<returns></returns>
</member>
+ <member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.GetBarCodesQuan(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鏍规嵁鏉$爜鑾峰彇鏁伴噺
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.ProdPickItem3(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鐢熶骇棰嗘枡鍗曚繚瀛�
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.GetList">
<summary>
鑾峰彇鎵�鏈�
@@ -1429,6 +1441,18 @@
</summary>
<returns></returns>
</member>
+ <member name="M:MESApplication.Controllers.WomdaaController.GetProductionPickDaa001(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 妯$硦鏌ヨ宸ュ崟鍙峰苟杩斿洖
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:MESApplication.Controllers.WomdaaController.GetItemsByDaa001(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鏍规嵁宸ュ崟鍙疯幏鍙栦唬棰嗙墿鏂欐槑缁�
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:MESApplication.Controllers.WomdaaController.GetList">
<summary>
鑾峰彇鎵�鏈�
diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll
index b0cbbee..8d24917 100644
--- a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll
+++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
index 089d566..3e8bf81 100644
--- a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
+++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
index 2cff899..d4aedef 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe
index 15b3623..c089558 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
index 6b36183..ccb2f94 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.xml b/MESApplication/bin/Release/net8.0/publish/MESApplication.xml
index 3378e73..55a7b81 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.xml
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.xml
@@ -869,6 +869,18 @@
</summary>
<returns></returns>
</member>
+ <member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.GetBarCodesQuan(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鏍规嵁鏉$爜鑾峰彇鏁伴噺
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.ProdPickItem3(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鐢熶骇棰嗘枡鍗曚繚瀛�
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:MESApplication.Controllers.Warehouse.MesInvItemBarcodesController.GetList">
<summary>
鑾峰彇鎵�鏈�
@@ -1429,6 +1441,18 @@
</summary>
<returns></returns>
</member>
+ <member name="M:MESApplication.Controllers.WomdaaController.GetProductionPickDaa001(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 妯$硦鏌ヨ宸ュ崟鍙峰苟杩斿洖
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:MESApplication.Controllers.WomdaaController.GetItemsByDaa001(MES.Service.Dto.service.WarehouseQuery)">
+ <summary>
+ 鏍规嵁宸ュ崟鍙疯幏鍙栦唬棰嗙墿鏂欐槑缁�
+ </summary>
+ <returns></returns>
+ </member>
<member name="M:MESApplication.Controllers.WomdaaController.GetList">
<summary>
鑾峰彇鎵�鏈�
--
Gitblit v1.9.3