From fdb948154f070ce648ed4ee0b7e15d556a8b5886 Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期五, 06 十二月 2024 16:05:17 +0800
Subject: [PATCH] 销售退货通知单完善、销售收货通知单增加

---
 MES.Service/Modes/SalesReturnNoticeDetail.cs                                |    3 
 MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs                           |   37 
 MESApplication/bin/Debug/net8.0/MES.Service.pdb                             |    0 
 MESApplication/bin/Debug/net8.0/MES.Service.dll                             |    0 
 MESApplication/bin/Debug/net8.0/MESApplication.pdb                          |    0 
 MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs           |   78 ++
 MES.Service/bin/Debug/net8.0/MES.Service.pdb                                |    0 
 MES.Service/Dto/webApi/ErpItems.cs                                          |    3 
 MES.Service/Dto/webApi/ErpSalesDelivery.cs                                  |   10 
 MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs                 |  225 ++++++
 MESApplication/bin/Debug/net8.0/MESApplication.dll                          |    0 
 MES.Service/bin/Debug/net8.0/MES.Service.dll                                |    0 
 MES.Service/Modes/MesItems.cs                                               |   12 
 MESApplication/bin/Debug/net8.0/MESApplication.xml                          |   84 ++
 MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs                               |   44 +
 MES.Service/Dto/webApi/ErpSalesReturnDto.cs                                 |   50 
 MES.Service/Modes/SalesDeliveryNotice.cs                                    |  229 ++++++
 MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs                         |   48 +
 MESApplication/bin/Debug/net8.0/MESApplication.exe                          |    0 
 MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs         |  104 ++
 MES.Service/Modes/SalesDeliveryNoticeDetail.cs                              |  174 ++++
 MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs       |  271 +++++++
 MES.Service/service/BasicData/MesItemsManager.cs                            |    5 
 MES.Service/service/BasicData/SalesReturnNoticeManager.cs                   |  175 ++--
 MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs |  169 ++++
 MES.Service/Modes/SalesReturnNotice.cs                                      |  367 +++++----
 26 files changed, 1,779 insertions(+), 309 deletions(-)

diff --git a/MES.Service/Dto/webApi/ErpItems.cs b/MES.Service/Dto/webApi/ErpItems.cs
index e2b3a76..fd36eff 100644
--- a/MES.Service/Dto/webApi/ErpItems.cs
+++ b/MES.Service/Dto/webApi/ErpItems.cs
@@ -28,4 +28,7 @@
 
     public string? FPRODUCEUNITID { get; set; }
     public string? FSUBCONUNITID { get; set; }
+
+    public string? F_UNW_CheckBox_SFBZ { get; set; }
+    public string? F_UNW_CheckBox_SFDB { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesDelivery.cs b/MES.Service/Dto/webApi/ErpSalesDelivery.cs
new file mode 100644
index 0000000..a6559c8
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesDelivery.cs
@@ -0,0 +1,10 @@
+锘縰sing MES.Service.Modes;
+
+namespace MES.Service.Dto.webApi;
+
+public class ErpSalesDelivery
+{
+    public ErpSalesDeliveryDto OrderDto { get; set; }
+
+    public List<ErpSalesDeliveryDetailDto> Items { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs b/MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs
new file mode 100644
index 0000000..9ec8308
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs
@@ -0,0 +1,48 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesDeliveryDetailDto
+{
+    public string? Type { get; set; }
+    public string? F_UNW_Text_xsddh { get; set; }  // 閿�鍞鍗曞彿
+    public string? FMaterialId { get; set; }  // 鐗╂枡缂栫爜
+    public string? FMaterialName { get; set; }  // 鐗╂枡鍚嶇О
+    public string? FMaterialModel { get; set; }  // 瑙勬牸鍨嬪彿
+    public string? FUnitID { get; set; }  // 閿�鍞崟浣�
+    public string? FQty { get; set; }  // 閿�鍞暟閲�
+    public string? FIsFree { get; set; }  // 鏄惁璧犲搧
+    public string? FDeliverydate { get; set; }  // 閫�璐ф棩鏈�
+    public string? FStockId { get; set; }  // 浠撳簱
+    public string? FMtoNo { get; set; }  // 璁″垝璺熻釜鍙�
+    public string? FLot { get; set; }  // 鎵瑰彿
+    public string? FEntryDescription { get; set; }  // 澶囨敞
+    public string? FRmType { get; set; }  // 閫�璐х被鍨�
+    public string? F_UNW_Base_GDY { get; set; }  // 璺熷崟鍛�
+    public string? FStockUnitID { get; set; }  // 搴撳瓨鍗曚綅
+    public decimal? FStockQty { get; set; }  // 搴撳瓨鏁伴噺
+    public string? FMaterialType { get; set; }  // 鐗╂枡绫诲埆
+    public string? FOwnerTypeID { get; set; }  // 璐т富绫诲瀷
+    public string? FOwnerId { get; set; }  // 璐т富
+    public string? FSrcType { get; set; }  // 婧愬崟绫诲瀷
+    public string? FSrcBillNo { get; set; }  // 婧愬崟缂栧彿
+    public string? FOrderNo { get; set; }  // 璁㈠崟鍗曞彿
+
+    public decimal? FPriceUnitQty { get; set; }  // 璁′环鏁伴噺
+    public string? FOwnerIdHead { get; set; }  // 璐т富
+
+    public string? FPlanDeliveryDate { get; set; }  //璁″垝鍙戣揣鏃ユ湡
+    public string? FOutLmtUnit { get; set; }  // 瓒呭彂鎺у埗鍗曚綅
+    public decimal? FOutMaxQty { get; set; }  // 鍑哄簱涓婇檺
+    public decimal? FOutMinQty { get; set; }  // 鍑哄簱涓嬮檺
+    public string? FDeliveryLoc { get; set; }  // 浜よ揣鍦扮偣
+    public string? FDeliveryLAddress { get; set; }  // 浜よ揣鍦板潃
+    public string? FTerminationStatus { get; set; }  // 缁堟鐘舵��
+    public string? FTerminateDate { get; set; }  // 涓氬姟缁堟鏃ユ湡
+    public decimal? FSumOutQty { get; set; }  // 绱鍑哄簱鏁伴噺
+    public decimal? FRemainOutQty { get; set; }  // 鏈嚭搴撴暟閲�
+
+
+
+    public string? ErpID { get; set; }  // ERPID
+    public string? EHID { get; set; }  // ERP澶碔D
+
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs b/MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs
new file mode 100644
index 0000000..d30651b
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs
@@ -0,0 +1,44 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesDeliveryDto
+{
+    public string? Type { get; set; }
+    public string? ErpID { get; set; } // ERPID
+    public string? FBillTypeID { get; set; } // 鍗曟嵁绫诲瀷
+    public string? FBillNo { get; set; } // 鍗曟嵁缂栧彿
+    public string? FDate { get; set; } // 鏃ユ湡
+    public string? FSettleCurrld { get; set; } // 缁撶畻甯佸埆
+    public string? FSaleDeptId { get; set; } // 閿�鍞儴闂�
+    public string? F_UNW_Text_KHDD { get; set; } // 瀹㈡埛璁㈠崟
+    public string? FCustomerID { get; set; } // 瀹㈡埛
+    public string? F_UNW_LargeText_TBKHBZ { get; set; } // 娣樺疂瀹㈡埛澶囨敞
+    public string? FHeadDeliveryWay { get; set; } // 浜よ揣鏂瑰紡
+    public string? FHeadLocId { get; set; } // 浜よ揣鍦扮偣
+    public string? FCarrierID { get; set; } // 鎵胯繍鍟�
+    public string? FCarriageNO { get; set; } // 杩愯緭鍗曞彿
+    public string? FDeliveryDeptID { get; set; } // 鍙戣揣閮ㄩ棬
+    public string? FStockerGroupId { get; set; } // 搴撳瓨缁�
+    public string? FStockerId { get; set; } // 浠撶鍛�
+    public string? FSaleGroupId { get; set; } // 閿�鍞粍
+    public string? FSalesManId { get; set; } // 閿�鍞憳
+    public string? FReceiveCusId { get; set; } // 鏀惰揣鏂�
+    public string? FReceiveCusContact { get; set; } // 鏀惰揣鏂硅仈绯讳汉
+    public string? FReceiveAddress { get; set; } // 鏀惰揣鏂瑰湴鍧�
+    public string? FLinkMan { get; set; } // 鏀惰揣鏂瑰鍚�
+    public string? FLinkPhone { get; set; } // 鑱旂郴鐢佃瘽
+    public string? FSettleID { get; set; } // 缁撶畻鏂�
+    public string? FPayerID { get; set; } // 浠樻鏂�
+    public string? FCreatorId { get; set; } // 鍒涘缓浜�
+    public string? FCreateDate { get; set; } // 鍒涘缓鏃ユ湡
+    public string? FModifierId { get; set; } // 鏈�鍚庝慨鏀逛汉
+    public string? FModifyDate { get; set; } // 鏈�鍚庝慨鏀规棩鏈�
+    public string? FApproverId { get; set; } // 瀹℃牳浜�
+    public string? FApproveDate { get; set; } // 瀹℃牳鏃ユ湡
+    public string? FCloserId { get; set; } // 鍏抽棴浜�
+    public string? FCloseReason { get; set; } // 鍏抽棴鍘熷洜
+    public string? FBillCloseStatus { get; set; } // 鍏抽棴鐘舵��
+    public string? FCancelStatus { get; set; } // 浣滃簾鐘舵��
+    public string? FCancellerId { get; set; } // 浣滃簾浜�
+    public string? FCancelDate { get; set; } // 浣滃簾鏃ユ湡
+
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs b/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs
index b7c0a3a..c5547a3 100644
--- a/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs
+++ b/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs
@@ -3,35 +3,28 @@
 public class ErpSalesReturnDetailDto
 {
     public string? Type { get; set; }
+    public string? F_UNW_Text_xsddh { get; set; }  // 閿�鍞鍗曞彿
     public string? FMaterialId { get; set; }  // 鐗╂枡缂栫爜
+    public string? FMaterialName { get; set; }  // 鐗╂枡鍚嶇О
+    public string? FMaterialModel { get; set; }  // 瑙勬牸鍨嬪彿
     public string? FUnitID { get; set; }  // 閿�鍞崟浣�
     public string? FQty { get; set; }  // 閿�鍞暟閲�
-    public string? FPriceUnitId { get; set; }  // 璁′环鍗曚綅
-    public string? FPriceUnitQty { get; set; }  // 璁′环鏁伴噺
-    public string? FDeliveryDate { get; set; }  // 瑕佽揣鏃ユ湡
     public string? FIsFree { get; set; }  // 鏄惁璧犲搧
-    public string? F_UNW_Text_xsddh { get; set; }  // 閿�鍞鍗曞彿
-    public string? F_UNW_Base_GDY { get; set; }  // 璺熷崟鍛�
-    public string? FOwnerTypeId { get; set; }  // 璐т富绫诲瀷
-    public string? FOwnerId { get; set; }  // 璐т富
-    public string? FEntryNote { get; set; }  // 澶囨敞
+    public string? FDeliverydate { get; set; }  // 閫�璐ф棩鏈�
+    public string? FStockId { get; set; }  // 浠撳簱
     public string? FMtoNo { get; set; }  // 璁″垝璺熻釜鍙�
     public string? FLot { get; set; }  // 鎵瑰彿
-    public string? FDeliveryMaxQty { get; set; }  // 鍙戣揣涓婇檺
-    public string? FDeliveryMinQty { get; set; }  // 鍙戣揣涓嬮檺
-    public string? FOutLmtUnitID { get; set; }  // 瓒呭彂鎺у埗鍗曚綅
-    public string? FMrpCloseStatus { get; set; }  // 涓氬姟鍏抽棴
-    public string? FMrpTerminateStatus { get; set; }  // 涓氬姟缁堟
-    public string? FTerminateDate { get; set; }  // 缁堟鏃ユ湡
-    public string? FTerminatorId { get; set; }  // 缁堟浜�
+    public string? FEntryDescription { get; set; }  // 澶囨敞
+    public string? FRmType { get; set; }  // 閫�璐х被鍨�
+    public string? F_UNW_Base_GDY { get; set; }  // 璺熷崟鍛�
+    public string? FStockUnitID { get; set; }  // 搴撳瓨鍗曚綅
+    public decimal? FStockQty { get; set; }  // 搴撳瓨鏁伴噺
+    public string? FMaterialType { get; set; }  // 鐗╂枡绫诲埆
+    public string? FOwnerTypeID { get; set; }  // 璐т富绫诲瀷
+    public string? FOwnerId { get; set; }  // 璐т富
     public string? FSrcType { get; set; }  // 婧愬崟绫诲瀷
-    public string? FSrcBillNo { get; set; }  // 婧愬崟鍗曞彿
-    public string? FDeliQty { get; set; }  // 绱鍙戣揣閫氱煡鏁伴噺
-    public string? FStockOutQty { get; set; }  // 绱鍑哄簱鏁伴噺
-    public string? FBaseRetNoticeQty { get; set; }  // 绱閫�璐ч�氱煡鏁伴噺锛堥攢鍞熀鏈級
-    public string? FBaseReturnQty { get; set; }  // 绱閫�璐ф暟閲忥紙閿�鍞熀鏈級
-    public string? FBaseRemainOutQty { get; set; }  // 鍓╀綑鏈嚭鏁伴噺锛堥攢鍞熀鏈級
-    public string? FBASEARQTY { get; set; }  // 绱搴旀敹鏁伴噺锛堥攢鍞熀鏈級
+    public string? FSrcBillNo { get; set; }  // 婧愬崟缂栧彿
+    public string? FOrderNo { get; set; }  // 璁㈠崟鍗曞彿
     public string? ErpID { get; set; }  // ERPID
     public string? EHID { get; set; }  // ERP澶碔D
 
diff --git a/MES.Service/Dto/webApi/ErpSalesReturnDto.cs b/MES.Service/Dto/webApi/ErpSalesReturnDto.cs
index 6e07cb3..a6929ee 100644
--- a/MES.Service/Dto/webApi/ErpSalesReturnDto.cs
+++ b/MES.Service/Dto/webApi/ErpSalesReturnDto.cs
@@ -4,40 +4,38 @@
 {
     public string? Type { get; set; }
     public string? ErpID { get; set; } // ERPID
-    public string? FBillNo { get; set; } // 鍗曟嵁缂栧彿
     public string? FBillTypeID { get; set; } // 鍗曟嵁绫诲瀷
-    public string? FDocumentStatus { get; set; } // 鍗曟嵁鐘舵��
-    public string? FDate { get; set; } // 鍗曟嵁鏃ユ湡
-    public string? FBusinessType { get; set; } // 涓氬姟绫诲瀷
-    public string? FHeadDeliveryWay { get; set; } // 浜よ揣鏂瑰紡
-    public string? FHEADLOCID { get; set; } // 浜よ揣鍦扮偣
-    public string? F_UNW_Text_KHDD { get; set; } // 瀹㈡埛璁㈠崟
-    public string? F_UNW_Date_KHXQ { get; set; } // 瀹㈡埛闇�姹備氦鏈�
-    public string? F_UNW_BaseProperty_KHDJ { get; set; } // 瀹㈡埛绛夌骇
-    public string? FCustId { get; set; } // 瀹㈡埛
-    public string? F_UNW_LargeText_TBKHBZ { get; set; } // 娣樺疂瀹㈡埛澶囨敞
-    public string? FCloseStatus { get; set; } // 鍏抽棴鐘舵��
+    public string? FBillNo { get; set; } // 鍗曟嵁缂栧彿
+    public string? FDate { get; set; } // 鏃ユ湡
+    public string? FSettleCurrld { get; set; } // 缁撶畻甯佸埆
     public string? FSaleDeptId { get; set; } // 閿�鍞儴闂�
-    public string? FSalerId { get; set; } // 閿�鍞憳
-    public string? FChangeReason { get; set; } // 鍙樻洿鍘熷洜
-    public string? FNote { get; set; } // 澶囨敞
-    public string? F_UNW_Remarks_KHJHDD { get; set; } // 瀹㈡埛浜よ揣鍦扮偣
-    public string? FSettleId { get; set; } // 缁撶畻鏂�
-    public string? FApproverId { get; set; } // 瀹℃牳浜�
-    public string? FLinkMan { get; set; } // 鏀惰揣浜哄鍚�
-    public string? FChargeId { get; set; } // 浠樻鏂�
-    public string? FLinkPhone { get; set; } // 鑱旂郴鐢佃瘽
+    public string? FRetcustId { get; set; } // 閫�璐у鎴�
+    public string? F_UNW_LargeText_TBKHBZ { get; set; } // 娣樺疂瀹㈡埛澶囨敞
+    public string? FRetcustReason { get; set; } // 閫�璐у師鍥�
+    public string? FHeadLocId { get; set; } // 浜よ揣鍦扮偣
+    public string? FRetDeptId { get; set; } // 搴撳瓨閮ㄩ棬
+    public string? FStockerGroupId { get; set; } // 搴撳瓨缁�
+    public string? FStockerId { get; set; } // 浠撶鍛�
+    public string? FSaleGroupId { get; set; } // 閿�鍞粍
+    public string? FSalesManId { get; set; } // 閿�鍞憳
+
+    public string? F_UNW_Text_KDDH { get; set; } // 蹇�掑崟鍙�
+    public string? FReceiveCusId { get; set; } // 鏀惰揣鏂�
+    public string? FReceiveCusContact { get; set; } // 鏀惰揣鏂硅仈绯讳汉
+    public string? FReceiveAddress { get; set; } // 鏀惰揣鏂瑰湴鍧�
+    public string? FLinkMan { get; set; } // 鏀惰揣鏂瑰鍚�
+    public string? FSettleCusId { get; set; } // 缁撶畻鏂�
     public string? FCreatorId { get; set; } // 鍒涘缓浜�
     public string? FCreateDate { get; set; } // 鍒涘缓鏃ユ湡
     public string? FModifierId { get; set; } // 鏈�鍚庝慨鏀逛汉
     public string? FModifyDate { get; set; } // 鏈�鍚庝慨鏀规棩鏈�
-    public string? FApproveDate { get; set; } // 瀹℃牳鏃ユ湡
     public string? FCloserId { get; set; } // 鍏抽棴浜�
+    public string? FCloseReason { get; set; } // 鍏抽棴鍘熷洜
     public string? FCloseDate { get; set; } // 鍏抽棴鏃ユ湡
-    public string? FChangeDate { get; set; } // 鍙樻洿鏃ユ湡
+    public string? FApproverId { get; set; } // 瀹℃牳浜�
+    public string? FApproveDate { get; set; } // 瀹℃牳鏃ユ湡
     public string? FCancelStatus { get; set; } // 浣滃簾鐘舵��
     public string? FCancellerId { get; set; } // 浣滃簾浜�
-    public string? FVersionNo { get; set; } // 鐗堟湰鍙�
-    public string? FChangerId { get; set; } // 鍙樻洿浜�
-    public string? FEntryNote { get; set; } // 澶囨敞
+    public string? FCancelDate { get; set; } // 浣滃簾鏃ユ湡
+    public string? FBillCloseStatus { get; set; } // 鍏抽棴鐘舵��
 }
\ No newline at end of file
diff --git a/MES.Service/Modes/MesItems.cs b/MES.Service/Modes/MesItems.cs
index f90f8fa..9e33027 100644
--- a/MES.Service/Modes/MesItems.cs
+++ b/MES.Service/Modes/MesItems.cs
@@ -219,16 +219,16 @@
     public string Fpurchaseunitid { get; set; }
 
     /// <summary>
-    ///     鑷畾涔夊瓧娈�1
+    ///     鏄惁鍖呰
     /// </summary>
-    [SugarColumn(ColumnName = "REMARK1")]
-    public string Remark1 { get; set; }
+    [SugarColumn(ColumnName = "CHECKBOX_SFBZ")]
+    public string CheckbosSFBZ { get; set; }
 
     /// <summary>
-    ///     鑷畾涔夊瓧娈�2
+    ///     鏄惁鎵撴爣
     /// </summary>
-    [SugarColumn(ColumnName = "REMARK2")]
-    public string Remark2 { get; set; }
+    [SugarColumn(ColumnName = "CHECKBOX_SFDB")]
+    public string CheckbosSFDB { get; set; }
 
     /// <summary>
     ///     鑷畾涔夊瓧娈�3
diff --git a/MES.Service/Modes/SalesDeliveryNotice.cs b/MES.Service/Modes/SalesDeliveryNotice.cs
new file mode 100644
index 0000000..5a51d7a
--- /dev/null
+++ b/MES.Service/Modes/SalesDeliveryNotice.cs
@@ -0,0 +1,229 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace MES.Service.Modes
+{
+    /// <summary>
+    /// 閿�鍞彂璐ч�氱煡鍗�
+    ///</summary>
+    [SugarTable("SALES_DELIVERY_NOTICE")]
+    public class SalesDeliveryNotice
+    {
+        /// <summary>
+        ///  
+        ///</summary>
+         [SugarColumn(ColumnName="ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+         public decimal? Id { get; set; }
+        /// <summary>
+        /// 鍗曟嵁绫诲瀷 
+        ///</summary>
+         [SugarColumn(ColumnName="BILL_TYPE"    )]
+         public string BillType { get; set; }
+        /// <summary>
+        /// 鍗曟嵁缂栧彿 
+        ///</summary>
+         [SugarColumn(ColumnName="BILL_NO"    )]
+         public string BillNo { get; set; }
+        /// <summary>
+        /// 鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="F_DATE"    )]
+         public DateTime? FDate { get; set; }
+        /// <summary>
+        /// 缁撶畻甯佸埆 
+        ///</summary>
+         [SugarColumn(ColumnName="CURRENCY"    )]
+         public string Currency { get; set; }
+        /// <summary>
+        /// 閿�鍞粍缁� 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_ORG"    )]
+         public string SalesOrg { get; set; }
+        /// <summary>
+        /// 閿�鍞儴闂� 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_DEPT"    )]
+         public string SalesDept { get; set; }
+        /// <summary>
+        /// 瀹㈡埛璁㈠崟 
+        ///</summary>
+         [SugarColumn(ColumnName="CUSTOMER_ORDER_NO"    )]
+         public string CustomerOrderNo { get; set; }
+        /// <summary>
+        /// 瀹㈡埛 
+        ///</summary>
+         [SugarColumn(ColumnName="CUSTOMER"    )]
+         public string Customer { get; set; }
+        /// <summary>
+        /// 娣樺疂瀹㈡埛澶囨敞 
+        ///</summary>
+         [SugarColumn(ColumnName="TAOBAO_REMARK"    )]
+         public string TaobaoRemark { get; set; }
+        /// <summary>
+        /// 浜よ揣鏂瑰紡 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERY_METHOD"    )]
+         public string DeliveryMethod { get; set; }
+        /// <summary>
+        /// 浜よ揣鍦扮偣 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERY_LOCATION"    )]
+         public string DeliveryLocation { get; set; }
+        /// <summary>
+        /// 鎵胯繍鍟� 
+        ///</summary>
+         [SugarColumn(ColumnName="CARRIER"    )]
+         public string Carrier { get; set; }
+        /// <summary>
+        /// 杩愯緭鍗曞彿 
+        ///</summary>
+         [SugarColumn(ColumnName="TRANSPORT_NO"    )]
+         public string TransportNo { get; set; }
+        /// <summary>
+        /// 鍗曟嵁鐘舵�� 
+        ///</summary>
+         [SugarColumn(ColumnName="BILL_NO_TYPE"    )]
+         public string BillNoType { get; set; }
+        /// <summary>
+        /// 鍙戣揣缁勭粐 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERY_ORG"    )]
+         public string DeliveryOrg { get; set; }
+        /// <summary>
+        /// 鍙戣揣閮ㄩ棬 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERY_DEPT"    )]
+         public string DeliveryDept { get; set; }
+        /// <summary>
+        /// 搴撳瓨缁� 
+        ///</summary>
+         [SugarColumn(ColumnName="INVENTORY_GROUP"    )]
+         public string InventoryGroup { get; set; }
+        /// <summary>
+        /// 浠撶鍛� 
+        ///</summary>
+         [SugarColumn(ColumnName="WAREHOUSE_MANAGER"    )]
+         public string WarehouseManager { get; set; }
+        /// <summary>
+        /// 閿�鍞粍 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_GROUP"    )]
+         public string SalesGroup { get; set; }
+        /// <summary>
+        /// 閿�鍞憳 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_PERSON"    )]
+         public string SalesPerson { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂� 
+        ///</summary>
+         [SugarColumn(ColumnName="RECEIVER"    )]
+         public string Receiver { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂硅仈绯讳汉 
+        ///</summary>
+         [SugarColumn(ColumnName="RECEIVER_CONTACT"    )]
+         public string ReceiverContact { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂瑰湴鍧� 
+        ///</summary>
+         [SugarColumn(ColumnName="RECEIVER_ADDRESS"    )]
+         public string ReceiverAddress { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂瑰鍚� 
+        ///</summary>
+         [SugarColumn(ColumnName="RECEIVER_NAME"    )]
+         public string ReceiverName { get; set; }
+        /// <summary>
+        /// 鑱旂郴鐢佃瘽 
+        ///</summary>
+         [SugarColumn(ColumnName="LINK_PHONE"    )]
+         public string LinkPhone { get; set; }
+        /// <summary>
+        /// 缁撶畻鏂� 
+        ///</summary>
+         [SugarColumn(ColumnName="SETTLE_PARTY"    )]
+         public string SettleParty { get; set; }
+        /// <summary>
+        /// 浠樻鏂� 
+        ///</summary>
+         [SugarColumn(ColumnName="PAYER_PARTY"    )]
+         public string PayerParty { get; set; }
+        /// <summary>
+        /// 鍒涘缓浜� 
+        ///</summary>
+         [SugarColumn(ColumnName="CREATED_BY"    )]
+         public string CreatedBy { get; set; }
+        /// <summary>
+        /// 鍒涘缓鏃堕棿 
+        ///</summary>
+         [SugarColumn(ColumnName="CREATED_DATE"    )]
+         public DateTime? CreatedDate { get; set; }
+        /// <summary>
+        /// 淇敼浜� 
+        ///</summary>
+         [SugarColumn(ColumnName="MODIFIED_BY"    )]
+         public string ModifiedBy { get; set; }
+        /// <summary>
+        /// 淇敼鏃堕棿 
+        ///</summary>
+         [SugarColumn(ColumnName="MODIFIED_DATE"    )]
+         public DateTime? ModifiedDate { get; set; }
+        /// <summary>
+        /// 鍏抽棴浜� 
+        ///</summary>
+         [SugarColumn(ColumnName="CLOSED_BY"    )]
+         public string ClosedBy { get; set; }
+        /// <summary>
+        /// 鍏抽棴鍘熷洜 
+        ///</summary>
+         [SugarColumn(ColumnName="CLOSE_REASON"    )]
+         public string CloseReason { get; set; }
+        /// <summary>
+        /// 鍏抽棴鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="CLOSE_DATE"    )]
+         public DateTime? CloseDate { get; set; }
+        /// <summary>
+        /// 瀹℃牳浜� 
+        ///</summary>
+         [SugarColumn(ColumnName="APPROVED_BY"    )]
+         public string ApprovedBy { get; set; }
+        /// <summary>
+        /// 瀹℃牳鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="APPROVED_DATE"    )]
+         public DateTime? ApprovedDate { get; set; }
+        /// <summary>
+        /// 浣滃簾鐘舵�� 
+        ///</summary>
+         [SugarColumn(ColumnName="CANCEL_STATUS"    )]
+         public string CancelStatus { get; set; }
+        /// <summary>
+        /// 浣滃簾浜� 
+        ///</summary>
+         [SugarColumn(ColumnName="CANCELLED_BY"    )]
+         public string CancelledBy { get; set; }
+        /// <summary>
+        /// 浣滃簾鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="CANCEL_DATE"    )]
+         public DateTime? CancelDate { get; set; }
+        /// <summary>
+        /// 鍏抽棴鐘舵�� 
+        ///</summary>
+         [SugarColumn(ColumnName="CLOSE_STATUS"    )]
+         public string CloseStatus { get; set; }
+        /// <summary>
+        /// 鏄惁鎵嬪姩鍏抽棴 
+        ///</summary>
+         [SugarColumn(ColumnName="MANUAL_CLOSE_FLAG"    )]
+         public string ManualCloseFlag { get; set; }
+        /// <summary>
+        /// ERP澶碔D 
+        ///</summary>
+         [SugarColumn(ColumnName="ERP_ID"    )]
+         public string ErpId { get; set; }
+    }
+}
diff --git a/MES.Service/Modes/SalesDeliveryNoticeDetail.cs b/MES.Service/Modes/SalesDeliveryNoticeDetail.cs
new file mode 100644
index 0000000..6620ac6
--- /dev/null
+++ b/MES.Service/Modes/SalesDeliveryNoticeDetail.cs
@@ -0,0 +1,174 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace MES.Service.Modes
+{
+    /// <summary>
+    /// 閿�鍞彂璐ч�氱煡鍗曟槑缁嗚〃
+    ///</summary>
+    [SugarTable("SALES_DELIVERY_NOTICE_DETAIL")]
+    public class SalesDeliveryNoticeDetail
+    {
+        /// <summary>
+        ///  
+        ///</summary>
+         [SugarColumn(ColumnName="ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+         public decimal? Id { get; set; }
+        /// <summary>
+        /// 閿�鍞鍗曞彿 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_ORDER_ID"    )]
+         public string SalesOrderId { get; set; }
+        /// <summary>
+        /// 鐗╂枡缂栫爜 
+        ///</summary>
+         [SugarColumn(ColumnName="MATERIAL_ID"    )]
+         public string MaterialId { get; set; }
+        /// <summary>
+        /// 鐗╂枡鍚嶇О 
+        ///</summary>
+         [SugarColumn(ColumnName="MATERIAL_NAME"    )]
+         public string MaterialName { get; set; }
+        /// <summary>
+        /// 鐗╂枡瑙勬牸 
+        ///</summary>
+         [SugarColumn(ColumnName="MATERIAL_SPECIFICATION"    )]
+         public string MaterialSpecification { get; set; }
+        /// <summary>
+        /// 閿�鍞崟浣� 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_UNIT_ID"    )]
+         public string SalesUnitId { get; set; }
+        /// <summary>
+        /// 閿�鍞暟閲� 
+        ///</summary>
+         [SugarColumn(ColumnName="SALES_QUANTITY"    )]
+         public decimal? SalesQuantity { get; set; }
+        /// <summary>
+        /// 鏄惁璧犲搧 
+        ///</summary>
+         [SugarColumn(ColumnName="IS_FREE"    )]
+         public string IsFree { get; set; }
+        /// <summary>
+        /// 瑕佽揣鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERY_DATE"    )]
+         public DateTime? DeliveryDate { get; set; }
+        /// <summary>
+        /// 鍑鸿揣浠撳簱 
+        ///</summary>
+         [SugarColumn(ColumnName="WAREHOUSE"    )]
+         public string Warehouse { get; set; }
+        /// <summary>
+        /// 璁″垝璺熻釜鍙� 
+        ///</summary>
+         [SugarColumn(ColumnName="PLAN_TRACKING_NUMBER"    )]
+         public string PlanTrackingNumber { get; set; }
+        /// <summary>
+        /// 鎵瑰彿 
+        ///</summary>
+         [SugarColumn(ColumnName="LOT_NUMBER"    )]
+         public string LotNumber { get; set; }
+        /// <summary>
+        /// 婧愬崟缂栧彿 
+        ///</summary>
+         [SugarColumn(ColumnName="SRC_BILL_NO"    )]
+         public string SrcBillNo { get; set; }
+        /// <summary>
+        /// 璁′环鏁伴噺 
+        ///</summary>
+         [SugarColumn(ColumnName="PRICE_QTY"    )]
+         public decimal? PriceQty { get; set; }
+        /// <summary>
+        /// 璐т富 
+        ///</summary>
+         [SugarColumn(ColumnName="OWNER_ID"    )]
+         public string OwnerId { get; set; }
+        /// <summary>
+        /// 搴撳瓨鍗曚綅 
+        ///</summary>
+         [SugarColumn(ColumnName="INVENTORY_UNIT"    )]
+         public string InventoryUnit { get; set; }
+        /// <summary>
+        /// 搴撳瓨鏁伴噺 
+        ///</summary>
+         [SugarColumn(ColumnName="INVENTORY_QUANTITY"    )]
+         public decimal? InventoryQuantity { get; set; }
+        /// <summary>
+        /// 鐗╂枡绫诲埆 
+        ///</summary>
+         [SugarColumn(ColumnName="MATERIAL_CATEGORY"    )]
+         public string MaterialCategory { get; set; }
+        /// <summary>
+        /// 璁″垝鍙戣揣鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="PLAN_DELIVERY_DATE"    )]
+         public DateTime? PlanDeliveryDate { get; set; }
+        /// <summary>
+        /// 瓒呭彂鎺у埗鍗曚綅 
+        ///</summary>
+         [SugarColumn(ColumnName="OUT_LMT_UNIT"    )]
+         public string OutLmtUnit { get; set; }
+        /// <summary>
+        /// 鍑哄簱涓婇檺 
+        ///</summary>
+         [SugarColumn(ColumnName="OUT_MAX_QTY"    )]
+         public decimal? OutMaxQty { get; set; }
+        /// <summary>
+        /// 鍑哄簱涓嬮檺 
+        ///</summary>
+         [SugarColumn(ColumnName="OUT_MIN_QTY"    )]
+         public decimal? OutMinQty { get; set; }
+        /// <summary>
+        /// 浜よ揣鍦扮偣 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERY_LOC"    )]
+         public string DeliveryLoc { get; set; }
+        /// <summary>
+        /// 浜よ揣鍦板潃 
+        ///</summary>
+         [SugarColumn(ColumnName="DELIVERYL_ADDRESS"    )]
+         public string DeliverylAddress { get; set; }
+        /// <summary>
+        /// 婧愬崟鍗曞彿 
+        ///</summary>
+         [SugarColumn(ColumnName="SOURCE_BILL_NO"    )]
+         public string SourceBillNo { get; set; }
+        /// <summary>
+        /// 璁㈠崟鍗曞彿 
+        ///</summary>
+         [SugarColumn(ColumnName="ORDER_BILL_NO"    )]
+         public string OrderBillNo { get; set; }
+        /// <summary>
+        /// 缁堟鐘舵�� 
+        ///</summary>
+         [SugarColumn(ColumnName="TERMINATION_STATUS"    )]
+         public string TerminationStatus { get; set; }
+        /// <summary>
+        /// 缁堟鏃ユ湡 
+        ///</summary>
+         [SugarColumn(ColumnName="TERMINATION_DATE"    )]
+         public DateTime? TerminationDate { get; set; }
+        /// <summary>
+        /// 绱鍑哄簱鏁伴噺 
+        ///</summary>
+         [SugarColumn(ColumnName="SUM_OUT_QTY"    )]
+         public decimal? SumOutQty { get; set; }
+        /// <summary>
+        /// 鏈嚭搴撴暟閲� 
+        ///</summary>
+         [SugarColumn(ColumnName="REMAIN_OUT_QTY"    )]
+         public decimal? RemainOutQty { get; set; }
+        /// <summary>
+        /// ERP琛孖D 
+        ///</summary>
+         [SugarColumn(ColumnName="ERP_LINE_ID"    )]
+         public string ErpLineId { get; set; }
+        /// <summary>
+        /// ERP澶碔D 
+        ///</summary>
+         [SugarColumn(ColumnName="ERP_HEAD_ID"    )]
+         public string ErpHeadId { get; set; }
+    }
+}
diff --git a/MES.Service/Modes/SalesReturnNotice.cs b/MES.Service/Modes/SalesReturnNotice.cs
index dd21ad4..b2a8115 100644
--- a/MES.Service/Modes/SalesReturnNotice.cs
+++ b/MES.Service/Modes/SalesReturnNotice.cs
@@ -1,162 +1,209 @@
-锘縰sing SqlSugar;
-
-namespace MES.Service.Modes;
-
-/// <summary>
-///     閿�鍞��璐ч�氱煡鍗曡〃
-/// </summary>
-[SugarTable("SALES_RETURN_NOTICE")]
-public class SalesReturn
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace MES.Service.Modes
 {
     /// <summary>
-    ///     SEQ_sales
-    /// </summary>
-    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
-        IsPrimaryKey = true)]
-    public decimal Id { get; set; }
-
-    /// <summary>
-    ///     閿�鍞鍗曞彿
-    /// </summary>
-    [SugarColumn(ColumnName = "SALES_ORDER_ID")]
-    public string SalesOrderId { get; set; }
-
-    /// <summary>
-    ///     鐗╂枡缂栫爜
-    /// </summary>
-    [SugarColumn(ColumnName = "MATERIAL_ID")]
-    public string MaterialId { get; set; }
-
-    /// <summary>
-    ///     鐗╂枡鍚嶇О
-    /// </summary>
-    [SugarColumn(ColumnName = "MATERIAL_NAME")]
-    public string MaterialName { get; set; }
-
-    /// <summary>
-    ///     鐗╂枡瑙勬牸
-    /// </summary>
-    [SugarColumn(ColumnName = "MATERIAL_SPECIFICATION")]
-    public string MaterialSpecification { get; set; }
-
-    /// <summary>
-    ///     閿�鍞崟浣�
-    /// </summary>
-    [SugarColumn(ColumnName = "SALES_UNIT_ID")]
-    public string SalesUnitId { get; set; }
-
-    /// <summary>
-    ///     閿�鍞暟閲�
-    /// </summary>
-    [SugarColumn(ColumnName = "SALES_QUANTITY")]
-    public decimal SalesQuantity { get; set; }
-
-    /// <summary>
-    ///     鏄惁璧犲搧
-    /// </summary>
-    [SugarColumn(ColumnName = "IS_FREE")]
-    public bool IsFree { get; set; }
-
-    /// <summary>
-    ///     閫�璐ф棩鏈�
-    /// </summary>
-    [SugarColumn(ColumnName = "RETURN_DATE")]
-    public DateTime? ReturnDate { get; set; }
-
-    /// <summary>
-    ///     浠撳簱
-    /// </summary>
-    [SugarColumn(ColumnName = "WAREHOUSE")]
-    public string Warehouse { get; set; }
-
-    /// <summary>
-    ///     璁″垝璺熻釜鍙�
-    /// </summary>
-    [SugarColumn(ColumnName = "PLAN_TRACKING_NUMBER")]
-    public string PlanTrackingNumber { get; set; }
-
-    /// <summary>
-    ///     鎵瑰彿
-    /// </summary>
-    [SugarColumn(ColumnName = "LOT_NUMBER")]
-    public string LotNumber { get; set; }
-
-    /// <summary>
-    ///     澶囨敞
-    /// </summary>
-    [SugarColumn(ColumnName = "NOTE")]
-    public string Note { get; set; }
-
-    /// <summary>
-    ///     閫�璐х被鍨�
-    /// </summary>
-    [SugarColumn(ColumnName = "RETURN_TYPE")]
-    public string ReturnType { get; set; }
-
-    /// <summary>
-    ///     璺熷崟鍛�
-    /// </summary>
-    [SugarColumn(ColumnName = "SALES_CLERK")]
-    public string SalesClerk { get; set; }
-
-    /// <summary>
-    ///     搴撳瓨鍗曚綅
-    /// </summary>
-    [SugarColumn(ColumnName = "INVENTORY_UNIT")]
-    public string InventoryUnit { get; set; }
-
-    /// <summary>
-    ///     搴撳瓨鏁伴噺
-    /// </summary>
-    [SugarColumn(ColumnName = "INVENTORY_QUANTITY")]
-    public decimal InventoryQuantity { get; set; }
-
-    /// <summary>
-    ///     鐗╂枡绫诲埆
-    /// </summary>
-    [SugarColumn(ColumnName = "MATERIAL_CATEGORY")]
-    public string MaterialCategory { get; set; }
-
-    /// <summary>
-    ///     璐т富绫诲瀷
-    /// </summary>
-    [SugarColumn(ColumnName = "OWNER_TYPE_ID")]
-    public string OwnerTypeId { get; set; }
-
-    /// <summary>
-    ///     璐т富
-    /// </summary>
-    [SugarColumn(ColumnName = "OWNER_ID")]
-    public string OwnerId { get; set; }
-
-    /// <summary>
-    ///     婧愬崟绫诲瀷
-    /// </summary>
-    [SugarColumn(ColumnName = "SOURCE_BILL_TYPE")]
-    public string SourceBillType { get; set; }
-
-    /// <summary>
-    ///     婧愬崟鍗曞彿
-    /// </summary>
-    [SugarColumn(ColumnName = "SOURCE_BILL_NO")]
-    public string SourceBillNo { get; set; }
-
-    /// <summary>
-    ///     璁㈠崟鍗曞彿
-    /// </summary>
-    [SugarColumn(ColumnName = "ORDER_BILL_NO")]
-    public string OrderBillNo { get; set; }
-
-    /// <summary>
-    ///     ERP琛孖D
-    /// </summary>
-    [SugarColumn(ColumnName = "ERP_LINE_ID")]
-    public string ErpLineId { get; set; }
-
-    /// <summary>
-    ///     ERP澶碔D
-    /// </summary>
-    [SugarColumn(ColumnName = "ERP_HEAD_ID")]
-    public string ErpHeadId { get; set; }
-
-}
\ No newline at end of file
+    /// 閿�鍞��璐ч�氱煡鍗曡〃
+    ///</summary>
+    [SugarTable("SALES_RETURN_NOTICE")]
+    public class SalesReturnNotice
+    {
+        /// <summary>
+        ///  
+        ///</summary>
+        [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+        public decimal? Id { get; set; }
+        /// <summary>
+        /// 鍗曟嵁绫诲瀷 
+        ///</summary>
+        [SugarColumn(ColumnName = "BILL_TYPE")]
+        public string BillType { get; set; }
+        /// <summary>
+        /// 鍗曟嵁缂栧彿 
+        ///</summary>
+        [SugarColumn(ColumnName = "BILL_NO")]
+        public string BillNo { get; set; }
+        /// <summary>
+        /// 鏃ユ湡 
+        ///</summary>
+        [SugarColumn(ColumnName = "F_DATE")]
+        public DateTime? FDate { get; set; }
+        /// <summary>
+        /// 缁撶畻甯佸埆 
+        ///</summary>
+        [SugarColumn(ColumnName = "CURRENCY")]
+        public string Currency { get; set; }
+        /// <summary>
+        /// 閿�鍞粍缁� 
+        ///</summary>
+        [SugarColumn(ColumnName = "SALES_ORG")]
+        public string SalesOrg { get; set; }
+        /// <summary>
+        /// 閿�鍞儴闂� 
+        ///</summary>
+        [SugarColumn(ColumnName = "SALES_DEPT")]
+        public string SalesDept { get; set; }
+        /// <summary>
+        /// 瀹㈡埛璁㈠崟 
+        ///</summary>
+        [SugarColumn(ColumnName = "CUSTOMER_ORDER_NO")]
+        public string CustomerOrderNo { get; set; }
+        /// <summary>
+        /// 閫�璐у鎴� 
+        ///</summary>
+        [SugarColumn(ColumnName = "RETURN_CUSTOMER")]
+        public string ReturnCustomer { get; set; }
+        /// <summary>
+        /// 娣樺疂瀹㈡埛澶囨敞 
+        ///</summary>
+        [SugarColumn(ColumnName = "TAOBAO_REMARK")]
+        public string TaobaoRemark { get; set; }
+        /// <summary>
+        /// 閫�璐у師鍥� 
+        ///</summary>
+        [SugarColumn(ColumnName = "RETURN_REASON")]
+        public string ReturnReason { get; set; }
+        /// <summary>
+        /// 浜よ揣鍦扮偣 
+        ///</summary>
+        [SugarColumn(ColumnName = "DELIVERY_LOCATION")]
+        public string DeliveryLocation { get; set; }
+        /// <summary>
+        /// 搴撳瓨缁勭粐 
+        ///</summary>
+        [SugarColumn(ColumnName = "INVENTORY_ORG")]
+        public string InventoryOrg { get; set; }
+        /// <summary>
+        /// 搴撳瓨閮ㄩ棬 
+        ///</summary>
+        [SugarColumn(ColumnName = "INVENTORY_DEPT")]
+        public string InventoryDept { get; set; }
+        /// <summary>
+        /// 搴撳瓨缁� 
+        ///</summary>
+        [SugarColumn(ColumnName = "INVENTORY_GROUP")]
+        public string InventoryGroup { get; set; }
+        /// <summary>
+        /// 浠撶鍛� 
+        ///</summary>
+        [SugarColumn(ColumnName = "WAREHOUSE_MANAGER")]
+        public string WarehouseManager { get; set; }
+        /// <summary>
+        /// 閿�鍞粍 
+        ///</summary>
+        [SugarColumn(ColumnName = "SALES_GROUP")]
+        public string SalesGroup { get; set; }
+        /// <summary>
+        /// 閿�鍞憳 
+        ///</summary>
+        [SugarColumn(ColumnName = "SALES_PERSON")]
+        public string SalesPerson { get; set; }
+        /// <summary>
+        /// 蹇�掑崟鍙� 
+        ///</summary>
+        [SugarColumn(ColumnName = "EXPRESS_NO")]
+        public string ExpressNo { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂� 
+        ///</summary>
+        [SugarColumn(ColumnName = "RECEIVER")]
+        public string Receiver { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂硅仈绯讳汉 
+        ///</summary>
+        [SugarColumn(ColumnName = "RECEIVER_CONTACT")]
+        public string ReceiverContact { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂瑰湴鍧� 
+        ///</summary>
+        [SugarColumn(ColumnName = "RECEIVER_ADDRESS")]
+        public string ReceiverAddress { get; set; }
+        /// <summary>
+        /// 鏀惰揣鏂瑰鍚� 
+        ///</summary>
+        [SugarColumn(ColumnName = "RECEIVER_NAME")]
+        public string ReceiverName { get; set; }
+        /// <summary>
+        /// 缁撶畻鏂� 
+        ///</summary>
+        [SugarColumn(ColumnName = "SETTLE_PARTY")]
+        public string SettleParty { get; set; }
+        /// <summary>
+        /// 鍒涘缓浜� 
+        ///</summary>
+        [SugarColumn(ColumnName = "CREATED_BY")]
+        public string CreatedBy { get; set; }
+        /// <summary>
+        /// 鍒涘缓鏃堕棿 
+        ///</summary>
+        [SugarColumn(ColumnName = "CREATED_DATE")]
+        public DateTime? CreatedDate { get; set; }
+        /// <summary>
+        /// 淇敼浜� 
+        ///</summary>
+        [SugarColumn(ColumnName = "MODIFIED_BY")]
+        public string ModifiedBy { get; set; }
+        /// <summary>
+        /// 淇敼鏃堕棿 
+        ///</summary>
+        [SugarColumn(ColumnName = "MODIFIED_DATE")]
+        public DateTime? ModifiedDate { get; set; }
+        /// <summary>
+        /// 鍏抽棴浜� 
+        ///</summary>
+        [SugarColumn(ColumnName = "CLOSED_BY")]
+        public string ClosedBy { get; set; }
+        /// <summary>
+        /// 鍏抽棴鍘熷洜 
+        ///</summary>
+        [SugarColumn(ColumnName = "CLOSE_REASON")]
+        public string CloseReason { get; set; }
+        /// <summary>
+        /// 鍏抽棴鏃ユ湡 
+        ///</summary>
+        [SugarColumn(ColumnName = "CLOSE_DATE")]
+        public DateTime? CloseDate { get; set; }
+        /// <summary>
+        /// 瀹℃牳浜� 
+        ///</summary>
+        [SugarColumn(ColumnName = "APPROVED_BY")]
+        public string ApprovedBy { get; set; }
+        /// <summary>
+        /// 瀹℃牳鏃ユ湡 
+        ///</summary>
+        [SugarColumn(ColumnName = "APPROVED_DATE")]
+        public DateTime? ApprovedDate { get; set; }
+        /// <summary>
+        /// 浣滃簾鐘舵�� 
+        ///</summary>
+        [SugarColumn(ColumnName = "CANCEL_STATUS")]
+        public string CancelStatus { get; set; }
+        /// <summary>
+        /// 浣滃簾浜� 
+        ///</summary>
+        [SugarColumn(ColumnName = "CANCELLED_BY")]
+        public string CancelledBy { get; set; }
+        /// <summary>
+        /// 浣滃簾鏃ユ湡 
+        ///</summary>
+        [SugarColumn(ColumnName = "CANCEL_DATE")]
+        public DateTime? CancelDate { get; set; }
+        /// <summary>
+        /// 鍏抽棴鐘舵�� 
+        ///</summary>
+        [SugarColumn(ColumnName = "CLOSE_STATUS")]
+        public string CloseStatus { get; set; }
+        /// <summary>
+        /// 鏄惁鎵嬪姩鍏抽棴 
+        ///</summary>
+        [SugarColumn(ColumnName = "MANUAL_CLOSE_FLAG")]
+        public string ManualCloseFlag { get; set; }
+        /// <summary>
+        /// ERP澶碔D 
+        ///</summary>
+        [SugarColumn(ColumnName = "ERP_ID")]
+        public string ErpId { get; set; }
+    }
+}
diff --git a/MES.Service/Modes/SalesReturnNoticeDetail.cs b/MES.Service/Modes/SalesReturnNoticeDetail.cs
index c8be8ac..38d4584 100644
--- a/MES.Service/Modes/SalesReturnNoticeDetail.cs
+++ b/MES.Service/Modes/SalesReturnNoticeDetail.cs
@@ -11,8 +11,7 @@
     /// <summary>
     ///     SEQ_sales
     /// </summary>
-    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
-        IsPrimaryKey = true)]
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
     public decimal Id { get; set; }
 
     /// <summary>
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll
index 61c39f8..cd0897f 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 a29051a..ae04c86 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/service/BasicData/MesItemsManager.cs b/MES.Service/service/BasicData/MesItemsManager.cs
index 42a4dde..fa57d25 100644
--- a/MES.Service/service/BasicData/MesItemsManager.cs
+++ b/MES.Service/service/BasicData/MesItemsManager.cs
@@ -156,7 +156,10 @@
             SubconUnit = item.FSUBCONUNITID,
             CreateDate = DateTime.Now,
             Company = "1000",
-            Factory = "1000"
+            Factory = "1000",
+            CheckbosSFBZ = item.F_UNW_CheckBox_SFBZ,
+            CheckbosSFDB = item.F_UNW_CheckBox_SFDB
+
         };
     }
 
diff --git a/MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs b/MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs
new file mode 100644
index 0000000..d083dde
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs
@@ -0,0 +1,78 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using MES.Service.DB;
+using MES.Service.Modes;
+
+namespace MES.Service.service
+{
+public class SalesDeliveryNoticeDetailManager : Repository<SalesDeliveryNoticeDetail>
+{
+ 
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesDeliveryNoticeDetailManager.cs
+
+
+    #region 鏁欏鏂规硶
+    /// <summary>
+    /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉�
+    /// </summary>
+    public void Study()
+    {
+	     
+	   /*********鏌ヨ*********/
+
+        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(), OrderByType.Asc);// 鍒嗛〉鏌ヨ鍔犳帓搴�
+        Console.Write(p.TotalCount);//杩斿洖鎬绘暟
+     
+        List<IConditionalModel> conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+        conModels.Add(new ConditionalModel() { FieldName= typeof(SalesDeliveryNoticeDetail).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
+        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc);
+
+        base.AsQueryable().Where(x => 1 == 1).ToList();//鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+ 
+
+        /*********鎻掑叆*********/
+        var insertData = new SalesDeliveryNoticeDetail() { };//娴嬭瘯鍙傛暟
+        var insertArray = new SalesDeliveryNoticeDetail[] { insertData };
+        base.Insert(insertData);//鎻掑叆
+        base.InsertRange(insertArray);//鎵归噺鎻掑叆
+        var id = base.InsertReturnIdentity(insertData);//鎻掑叆杩斿洖鑷鍒�
+        base.AsInsertable(insertData).ExecuteCommand();//鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+
+		/*********鏇存柊*********/
+	    var updateData = new SalesDeliveryNoticeDetail() {  };//娴嬭瘯鍙傛暟
+        var updateArray = new SalesDeliveryNoticeDetail[] { updateData };//娴嬭瘯鍙傛暟
+        base.Update(updateData);//鏍规嵁瀹炰綋鏇存柊
+        base.UpdateRange(updateArray);//鎵归噺鏇存柊
+        //base.Update(it => new SalesDeliveryNoticeDetail() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+        base.AsUpdateable(updateData).ExecuteCommand();  //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+
+		/*********鍒犻櫎*********/
+	    var deldata = new SalesDeliveryNoticeDetail() {  };//娴嬭瘯鍙傛暟
+        base.Delete(deldata);//鏍规嵁瀹炰綋鍒犻櫎
+        base.DeleteById(1);//鏍规嵁涓婚敭鍒犻櫎
+        base.DeleteById(new int[] { 1,2});//鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+        base.Delete(it=>1==2);//鏍规嵁鏉′欢鍒犻櫎
+        base.AsDeleteable().Where(it=>1==2).ExecuteCommand();//杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+    } 
+    #endregion
+
+ 
+ }
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs b/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs
new file mode 100644
index 0000000..c1c3e48
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs
@@ -0,0 +1,225 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using MES.Service.DB;
+using MES.Service.Modes;
+using MES.Service.Dto.webApi;
+using MES.Service.service.BasicData;
+using System.Globalization;
+
+namespace MES.Service.service
+{
+    public class SalesDeliveryNoticeManager : Repository<SalesDeliveryNotice>
+    {
+
+        //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+        private readonly SalesDeliveryNoticeDetailManager _SalesDeliveryDetailManager =
+            new();
+        //ErpSalesRerurn
+        public bool Save(ErpSalesDelivery SalesDelivery)
+        {
+            var erpSalesDeliveryDto = SalesDelivery.OrderDto;
+            var mesSalesDelivery = ConvertErpToSalesDelivery(SalesDelivery.OrderDto);
+            var mesSalesDeliveryDatas = ConvertErpToSalesDeliveryDetail(SalesDelivery.Items);
+
+            return UseTransaction(db =>
+            {
+                switch (erpSalesDeliveryDto.Type)
+                {
+                    // case "2":
+                    //     return InsertData(db, mesSalesReturn, mesSalesReturnDatas,
+                    //         rohInErpRohIn.FBILLTYPE)
+                    //         ? 1
+                    //         : 0;
+                    case "3":
+                        return UpdateData(db, mesSalesDelivery, mesSalesDeliveryDatas) ? 1 : 0;
+                    case "2":
+                    case "4":
+                        return SaveOrUpdateData(db, mesSalesDelivery, mesSalesDeliveryDatas, erpSalesDeliveryDto.Type)
+                            ? 1
+                            : 0;
+                    default:
+                        throw new NotImplementedException(
+                            $"type娌℃湁{erpSalesDeliveryDto.Type}杩欎釜绫诲瀷");
+                }
+            }) > 0;
+        }
+    
+        private bool UpdateData(SqlSugarScope db, SalesDeliveryNotice mesSalesDelivery,
+            List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas)
+        {
+            var decimals = mesSalesDeliveryDatas.Select(s => s.Id).ToArray();
+            var update = base.DeleteById(mesSalesDelivery.Id);
+            var insertOrUpdate = db
+                .Deleteable<SalesDeliveryNoticeDetail>().In(decimals)
+                .ExecuteCommand() > 0;
+
+            if (update && insertOrUpdate) return true;
+            throw new NotImplementedException("鏇存柊澶辫触");
+        }
+
+        // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
+        private bool SaveOrUpdateData(SqlSugarScope db, SalesDeliveryNotice mesSalesDelivery,
+            List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas, string type)
+        {
+            if (mesSalesDelivery.Id != null) base.DeleteById(mesSalesDelivery.Id);
+
+            if (mesSalesDeliveryDatas.Count > 0)
+                db.Deleteable<SalesDeliveryNoticeDetail>()
+                    .Where(s => s.ErpHeadId == mesSalesDelivery.ErpId).ExecuteCommand();
+
+            var orUpdate = base.Insert(mesSalesDelivery);
+            var baOrUpdate = _SalesDeliveryDetailManager.InsertRange(mesSalesDeliveryDatas);
+            if (orUpdate && baOrUpdate) return true;
+
+
+            throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
+        }
+
+        // 鎵归噺淇濆瓨璁板綍鐨勬柟娉�
+        public bool SaveList(List<ErpSalesDelivery> salesOrder)
+        {
+            var result = salesOrder.Select(Save).ToList();
+            return result.All(b => b);
+        }
+ 
+        private SalesDeliveryNotice ConvertErpToSalesDelivery(
+            ErpSalesDeliveryDto erpDto)
+        {
+            DateTime parsedDate;
+
+            // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+            DateTime? ParseDateTime(string dateStr)
+            {
+                if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+                        CultureInfo.InvariantCulture,
+                        DateTimeStyles.None,
+                        out parsedDate))
+                    return parsedDate;
+
+                return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+            }
+
+            var salesOrder = new SalesDeliveryNotice
+            {
+                BillNo = erpDto.FBillNo,
+                ErpId = erpDto.ErpID,
+                FDate = ParseDateTime(erpDto.FDate) ?? null,
+                BillType = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷
+                Currency = erpDto.FSettleCurrld, // 缁撶畻甯佸埆
+                SalesDept = erpDto.FSaleDeptId, //閿�鍞儴闂�
+                CustomerOrderNo = erpDto.F_UNW_Text_KHDD, // 瀹㈡埛璁㈠崟
+                Customer = erpDto.FCustomerID, // 瀹㈡埛
+                TaobaoRemark = erpDto.F_UNW_LargeText_TBKHBZ, // 娣樺疂瀹㈡埛澶囨敞
+                DeliveryMethod = erpDto.FHeadDeliveryWay, // 浜よ揣鏂瑰紡
+                DeliveryLocation = erpDto.FHeadLocId, // 浜よ揣鍦扮偣
+                Carrier = erpDto.FCarrierID, // 鎵胯繍鍟�
+                TransportNo = erpDto.FCarriageNO, // 杩愯緭鍗曞彿
+                BillNoType = erpDto.FCarriageNO, // 鍗曟嵁鐘舵��
+                DeliveryDept = erpDto.FDeliveryDeptID, // 鍙戣揣閮ㄩ棬
+                InventoryGroup = erpDto.FStockerGroupId, // 搴撳瓨缁�
+                WarehouseManager = erpDto.FStockerId, // 浠撶鍛�
+                SalesGroup = erpDto.FSaleGroupId, // 閿�鍞粍
+                SalesPerson = erpDto.FSalesManId,//閿�鍞憳
+                Receiver = erpDto.FReceiveCusId, // 鏀惰揣鏂�
+                ReceiverContact = erpDto.FReceiveCusContact, // 鏀惰揣鏂硅仈绯讳汉
+                ReceiverAddress = erpDto.FReceiveAddress, // 鏀惰揣鏂瑰湴鍧�
+                ReceiverName = erpDto.FLinkMan, // 鏀惰揣鏂瑰鍚�
+                LinkPhone    = erpDto.FLinkPhone,//鑱旂郴鐢佃瘽
+                SettleParty = erpDto.FSettleID, // 缁撶畻鏂�
+                PayerParty = erpDto.FPayerID,//浠樻鏂�
+                CreatedBy = erpDto.FCreatorId, // 鍒涘缓浜�
+                CreatedDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃堕棿
+                ModifiedBy = erpDto.FModifierId, // 淇敼浜�
+                ModifiedDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 淇敼鏃堕棿
+                ClosedBy = erpDto.FCloserId, // 鍏抽棴浜�
+                CloseReason = erpDto.FCloseReason, // 鍏抽棴鍘熷洜
+               // CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡
+                ApprovedBy = erpDto.FApproverId, // 瀹℃牳浜�
+                ApprovedDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡
+                CancelStatus = erpDto.FCancelStatus, // 浣滃簾鐘舵��
+                CancelledBy = erpDto.FCancellerId, // 浣滃簾浜�
+                CancelDate = ParseDateTime(erpDto.FCancelDate) ?? null, // 浣滃簾鏃ユ湡
+                CloseStatus = erpDto.FBillCloseStatus, // 鍏抽棴鐘舵��
+
+            };
+
+            var single = base.GetSingle(it => it.ErpId == erpDto.ErpID);
+            if (single != null) salesOrder.Id = single.Id;
+
+            return salesOrder;
+        }
+
+        private List<SalesDeliveryNoticeDetail> ConvertErpToSalesDeliveryDetail(
+            List<ErpSalesDeliveryDetailDto> erpDtoList)
+
+        {
+            var salesOrderSubList =
+                new List<SalesDeliveryNoticeDetail>();
+
+            DateTime parsedDate;
+            // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+            DateTime? ParseDateTime(string dateStr)
+            {
+                if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+                        CultureInfo.InvariantCulture,
+                        DateTimeStyles.None,
+                        out parsedDate))
+                    return parsedDate;
+
+                return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+            }
+
+
+
+            foreach (var erpDto in erpDtoList)
+            {
+                var salesOrderSub = new SalesDeliveryNoticeDetail
+                {
+                    ErpLineId = erpDto.ErpID,//ERP琛孖D
+                    ErpHeadId = erpDto.EHID,//ERP澶碔D
+                    SalesOrderId = erpDto.F_UNW_Text_xsddh,//閿�鍞鍗曞彿
+                    MaterialId = erpDto.FMaterialId,//鐗╂枡缂栧彿
+                    MaterialName = erpDto.FMaterialName,// 鐗╂枡鍚嶇О
+                    MaterialSpecification = erpDto.FMaterialModel,//瑙勬牸鍨嬪彿
+                    SalesUnitId = erpDto.FUnitID,//閿�鍞崟浣�
+                    SalesQuantity = Convert.ToDecimal(erpDto.FQty),//閿�鍞暟閲�
+                    IsFree = erpDto.FIsFree,//鏄惁璧犲搧
+                    DeliveryDate = ParseDateTime(erpDto.FDeliverydate),//瑕佽揣鏃ユ湡
+                    Warehouse = erpDto.FStockId,//鍑鸿揣浠撳簱
+                    PlanTrackingNumber = erpDto.FMtoNo,//璁″垝璺熻釜鍙�
+                    LotNumber = erpDto.FLot,//鎵瑰彿
+                    SrcBillNo = erpDto.FSrcBillNo,//婧愬崟缂栧彿
+                    PriceQty = erpDto.FPriceUnitQty,//璁′环鏁伴噺
+                    OwnerId = erpDto.FOwnerIdHead,//璐т富
+                    InventoryUnit = erpDto.FStockUnitID,//搴撳瓨鍗曚綅
+                    InventoryQuantity = Convert.ToDecimal(erpDto.FStockQty),//搴撳瓨鏁伴噺
+                    MaterialCategory = erpDto.FMaterialType,//鐗╂枡绫诲埆
+                    PlanDeliveryDate = ParseDateTime(erpDto.FPlanDeliveryDate),//璁″垝鍙戣揣鏃ユ湡
+                    OutLmtUnit = erpDto.FOutLmtUnit,//瓒呭彂鎺у埗鍗曚綅
+                    OutMaxQty = erpDto.FOutMaxQty,//鍑哄簱涓婇檺
+                    OutMinQty = erpDto.FOutMinQty,//鍑哄簱涓嬮檺
+                    DeliveryLoc = erpDto.FDeliveryLoc,//浜よ揣鍦扮偣
+                    DeliverylAddress = erpDto.FDeliveryLAddress,//浜よ揣鍦板潃
+                    SourceBillNo = erpDto.FSrcBillNo,//鍘熷崟鍗曞彿
+                    OrderBillNo = erpDto.FOrderNo,//璁㈠崟鍗曞彿
+                    TerminationStatus = erpDto.FTerminationStatus,//缁堟鐘舵��
+                    TerminationDate = ParseDateTime(erpDto.FTerminateDate),//涓氬姟缁堟鏃ユ湡
+                    SumOutQty = erpDto.FSumOutQty,//绱鍑哄簱鏁伴噺
+                    RemainOutQty = erpDto.FRemainOutQty//鏈嚭搴撴暟閲�
+
+                };
+
+                var single = _SalesDeliveryDetailManager.GetSingle(it =>
+                    it.ErpLineId == salesOrderSub.ErpLineId);
+                if (single != null) salesOrderSub.Id = single.Id;
+
+                salesOrderSubList.Add(salesOrderSub);
+            }
+
+            return salesOrderSubList;
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesReturnNoticeManager.cs b/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
index bca2db2..d715bf2 100644
--- a/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
+++ b/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
@@ -8,7 +8,7 @@
 
 namespace MES.Service.service.BasicData;
 
-public class SalesReturnManager : Repository<SalesReturn>
+public class SalesReturnNoticeManager : Repository<SalesReturnNotice>
 {
     //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
 
@@ -44,13 +44,13 @@
         }) > 0;
     }
 
-    private bool UpdateData(SqlSugarScope db, SalesReturn mesSalesReturn,
-        List<SalesReturnDetail> mesSalesReturnDatas)
+    private bool UpdateData(SqlSugarScope db, SalesReturnNotice mesSalesReturn,
+        List<SalesReturnNoticeDetail> mesSalesReturnDatas)
     {
         var decimals = mesSalesReturnDatas.Select(s => s.Id).ToArray();
         var update = base.DeleteById(mesSalesReturn.Id);
         var insertOrUpdate = db
-            .Deleteable<SalesReturnDetail>().In(decimals)
+            .Deleteable<SalesReturnNoticeDetail>().In(decimals)
             .ExecuteCommand() > 0;
 
         if (update && insertOrUpdate) return true;
@@ -58,14 +58,14 @@
     }
 
     // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
-    private bool SaveOrUpdateData(SqlSugarScope db, SalesReturn mesSalesReturn,
-        List<SalesReturnDetail> mesSalesReturnDatas,string type)
+    private bool SaveOrUpdateData(SqlSugarScope db, SalesReturnNotice mesSalesReturn,
+        List<SalesReturnNoticeDetail> mesSalesReturnDatas,string type)
     {
         if (mesSalesReturn.Id != null) base.DeleteById(mesSalesReturn.Id);
 
         if (mesSalesReturnDatas.Count > 0)
-            db.Deleteable<SalesReturnDetail>()
-                .Where(s => s.EHID == mesSalesReturn.ErpID).ExecuteCommand();
+            db.Deleteable<SalesReturnNoticeDetail>()
+                .Where(s => s.ErpHeadId == mesSalesReturn.ErpId).ExecuteCommand();
 
         var orUpdate = base.Insert(mesSalesReturn);
         var baOrUpdate = _SalesReturnDetailManager.InsertRange(mesSalesReturnDatas);
@@ -82,8 +82,8 @@
         return result.All(b => b);
     }
 
-    private SalesReturn ConvertErpToSalesReturn(
-        ErpSalesRerurnDto erpDto)
+    private SalesReturnNotice ConvertErpToSalesReturn(
+        ErpSalesReturnDto erpDto)
     {
         DateTime parsedDate;
 
@@ -99,103 +99,106 @@
             return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
         }
 
-        var salesOrder = new SalesReturn
+        var salesOrder = new SalesReturnNotice
         {
             BillNo = erpDto.FBillNo,
-            ErpID = Convert.ToDecimal(erpDto.ErpID),
+            ErpId = erpDto.ErpID,
             FDate = ParseDateTime(erpDto.FDate) ?? null,
-            BillTypeId = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷
-            DocumentStatus = erpDto.FDocumentStatus, // 鍗曟嵁鐘舵��
-            BusinessType = erpDto.FBusinessType, // 涓氬姟绫诲瀷
-            HeadDeliveryWay = erpDto.FHeadDeliveryWay, // 浜よ揣鏂瑰紡
-            HeadLocId = erpDto.FHEADLOCID, // 浜よ揣鍦扮偣
-            UnWTextKhdd = erpDto.F_UNW_Text_KHDD, // 瀹㈡埛璁㈠崟
-            UnWDateKhxq = ParseDateTime(erpDto.F_UNW_Date_KHXQ) ?? null, // 瀹㈡埛闇�姹備氦鏈�
-            UnWBasePropertyKhdj = erpDto.F_UNW_BaseProperty_KHDJ, // 瀹㈡埛绛夌骇
-            CustId = erpDto.FCustId, // 瀹㈡埛
-            UnWLargetextTbkhbz = erpDto.F_UNW_LargeText_TBKHBZ, // 娣樺疂瀹㈡埛澶囨敞
-            CloseStatus = erpDto.FCloseStatus, // 鍏抽棴鐘舵��
-            SaleDeptId = erpDto.FSaleDeptId, // 閿�鍞儴闂�
-            SalerId = erpDto.FSalerId, // 閿�鍞憳
-            ChangeReason = erpDto.FChangeReason, // 鍙樻洿鍘熷洜
-            Note = erpDto.FNote, // 澶囨敞
-            UnWRemarksKhjHdd = erpDto.F_UNW_Remarks_KHJHDD, // 瀹㈡埛浜よ揣鍦扮偣
-            SettleId = erpDto.FSettleId, // 缁撶畻鏂�
-            ApproverId = erpDto.FApproverId, // 瀹℃牳浜�
-            LinkMan = erpDto.FLinkMan, // 鏀惰揣浜哄鍚�
-            ChargeId = erpDto.FChargeId, // 浠樻鏂�
-            LinkPhone = erpDto.FLinkPhone, // 鑱旂郴鐢佃瘽
-            CreatorId = erpDto.FCreatorId, // 鍒涘缓浜�
-            CreateDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃ユ湡
-            ModifierId = erpDto.FModifierId, // 鏈�鍚庝慨鏀逛汉
-            ModifyDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 鏈�鍚庝慨鏀规棩鏈�
-            ApproveDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡
-            CloserId = erpDto.FCloserId, // 鍏抽棴浜�
+            BillType = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷
+            Currency = erpDto.FSettleCurrld, // 缁撶畻甯佸埆
+            SalesDept = erpDto.FSaleDeptId, //閿�鍞儴闂�
+            ReturnCustomer = erpDto.FRetcustId, // 閫�璐у鎴�
+            TaobaoRemark = erpDto.F_UNW_LargeText_TBKHBZ, // 娣樺疂瀹㈡埛澶囨敞
+            ReturnReason = erpDto.FRetcustReason, // 閫�璐у師鍥�
+            DeliveryLocation = erpDto.FHeadLocId, // 浜よ揣鍦扮偣
+            InventoryDept = erpDto.FRetDeptId, // 搴撳瓨閮ㄩ棬
+            InventoryGroup = erpDto.FStockerGroupId, // 搴撳瓨缁�
+            WarehouseManager = erpDto.FStockerId, // 浠撶鍛�
+            SalesGroup = erpDto.FSaleGroupId, // 閿�鍞粍
+            SalesPerson = erpDto.FSalesManId,//閿�鍞憳
+            ExpressNo = erpDto.F_UNW_Text_KDDH, // 蹇�掑崟鍙�
+            Receiver = erpDto.FReceiveCusId, // 鏀惰揣鏂�
+            ReceiverContact = erpDto.FReceiveCusContact, // 鏀惰揣鏂硅仈绯讳汉
+            ReceiverAddress = erpDto.FReceiveAddress, // 鏀惰揣鏂瑰湴鍧�
+            ReceiverName = erpDto.FLinkMan, // 鏀惰揣鏂瑰鍚�
+            SettleParty = erpDto.FSettleCurrld, // 缁撶畻鏂�
+            CreatedBy = erpDto.FCreatorId, // 鍒涘缓浜�
+            CreatedDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃堕棿
+            ModifiedBy = erpDto.FModifierId, // 淇敼浜�
+            ModifiedDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 淇敼鏃堕棿
+            ClosedBy = erpDto.FCloserId, // 鍏抽棴浜�
+            CloseReason = erpDto.FCloseReason, // 鍏抽棴鍘熷洜
             CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡
-            ChangeDate = ParseDateTime(erpDto.FChangeDate) ?? null, // 鍙樻洿鏃ユ湡
+            ApprovedBy = erpDto.FApproverId, // 瀹℃牳浜�
+            ApprovedDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡
             CancelStatus = erpDto.FCancelStatus, // 浣滃簾鐘舵��
-            CancellerId = erpDto.FCancellerId, // 浣滃簾浜�
-            VersionNo = Convert.ToDouble(erpDto.FVersionNo), // 鐗堟湰鍙�
-            ChangerId = erpDto.FChangerId, // 鍙樻洿浜�
-            EntryNote = erpDto.FEntryNote // 澶囨敞
-            //ParseDateTime() ?? null
-            //long.Parse()
-            //Convert.ToDecimal()
-            //Convert.ToDouble()
+            CancelledBy = erpDto.FCancellerId, // 浣滃簾浜�
+            CancelDate = ParseDateTime(erpDto.FCancelDate) ?? null, // 浣滃簾鏃ユ湡
+            CloseStatus = erpDto.FBillCloseStatus, // 鍏抽棴鐘舵��
+         
         };
 
-        var single = base.GetSingle(it => it.ErpID == Convert.ToDecimal(erpDto.ErpID));
+        var single = base.GetSingle(it => it.ErpId == erpDto.ErpID);
         if (single != null) salesOrder.Id = single.Id;
 
         return salesOrder;
     }
 
-    private List<SalesReturnDetail> ConvertErpToSalesReturnDetail(
-        List<ErpSalesRerurnDetailDto> erpDtoList)
+    private List<SalesReturnNoticeDetail> ConvertErpToSalesReturnDetail(
+        List<ErpSalesReturnDetailDto> erpDtoList)
+        
     {
         var salesOrderSubList =
-            new List<SalesReturnDetail>();
+            new List<SalesReturnNoticeDetail>();
+
+        DateTime parsedDate;
+        // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+        DateTime? ParseDateTime(string dateStr)
+        {
+            if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+                    CultureInfo.InvariantCulture,
+                    DateTimeStyles.None,
+                    out parsedDate))
+                return parsedDate;
+
+            return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+        }
+
+
 
         foreach (var erpDto in erpDtoList)
         {
-            var salesOrderSub = new SalesReturnDetail
+            var salesOrderSub = new SalesReturnNoticeDetail
             {
-                ErpID = Convert.ToDecimal(erpDto.ErpID),
-                EHID = Convert.ToDecimal(erpDto.EHID),
-                MaterialId = erpDto.FMaterialId,
-                UnitId = erpDto.FUnitID,
-                Qty = Convert.ToDecimal(erpDto.FQty),
-                PriceUnitId = erpDto.FPriceUnitId,
-                PriceUnitQty = Convert.ToDecimal(erpDto.FPriceUnitQty),
-                DeliveryDate = Convert.ToDateTime(erpDto.FDeliveryDate),
-                IsFree = erpDto.FIsFree,
-                SalesReturnNo = erpDto.F_UNW_Text_xsddh,
-                SalesFollowUp = erpDto.F_UNW_Base_GDY,
-                OwnerTypeId = erpDto.FOwnerTypeId,
-                OwnerId = erpDto.FOwnerId,
-                EntryNote = erpDto.FEntryNote,
-                MtoNo = erpDto.FMtoNo,
-                Lot = erpDto.FLot,
-                DeliveryMaxQty = Convert.ToDecimal(erpDto.FDeliveryMaxQty),
-                DeliveryMinQty = Convert.ToDecimal(erpDto.FDeliveryMinQty),
-                OutLmtUnitId = erpDto.FOutLmtUnitID,
-                MrpCloseStatus = erpDto.FMrpCloseStatus,
-                MrpTerminateStatus = erpDto.FMrpTerminateStatus,
-                TerminateDate = Convert.ToDateTime(erpDto.FTerminateDate),
-                TerminaterId = erpDto.FTerminatorId,
-                SrcType = erpDto.FSrcType,
-                SrcBillNo = erpDto.FSrcBillNo,
-                DeliQty = Convert.ToDecimal(erpDto.FDeliQty),
-                StockOutQty = Convert.ToDecimal(erpDto.FStockOutQty),
-                BaseRetNoticeQty = Convert.ToDecimal(erpDto.FBaseRetNoticeQty),
-                BaseReturnQty = Convert.ToDecimal(erpDto.FBaseReturnQty),
-                BaseRemainOutQty = Convert.ToDecimal(erpDto.FBaseRemainOutQty),
-                BASEARQTY = Convert.ToDecimal(erpDto.FBASEARQTY),
+                ErpLineId = erpDto.ErpID,//ERP琛孖D
+                ErpHeadId = erpDto.EHID,//ERP澶碔D
+                SalesOrderId = erpDto.F_UNW_Text_xsddh,//閿�鍞鍗曞彿
+                MaterialId = erpDto.FMaterialId,//鐗╂枡缂栧彿
+                MaterialName = erpDto.FMaterialName,// 鐗╂枡鍚嶇О
+                MaterialSpecification = erpDto.FMaterialModel,//瑙勬牸鍨嬪彿
+                SalesUnitId = erpDto.FUnitID,//閿�鍞崟浣�
+                SalesQuantity = Convert.ToDecimal(erpDto.FQty),//閿�鍞暟閲�
+                IsFree = erpDto.FIsFree,//鏄惁璧犲搧
+                ReturnDate = ParseDateTime(erpDto.FDeliverydate),//閫�璐ф棩鏈�
+                Warehouse = erpDto.FStockId,//浠撳簱
+                PlanTrackingNumber = erpDto.FMtoNo,//璁″垝璺熻釜鍙�
+                LotNumber = erpDto.FLot,//鎵瑰彿
+                Note = erpDto.FEntryDescription,//澶囨敞
+                ReturnType = erpDto.FRmType,//閫�璐х被鍨�
+                SalesClerk = erpDto.F_UNW_Base_GDY,//璺熷崟鍛�
+                InventoryUnit = erpDto.FStockUnitID,//搴撳瓨鍗曚綅
+                InventoryQuantity = Convert.ToDecimal(erpDto.FStockQty),//搴撳瓨鏁伴噺
+                MaterialCategory = erpDto.FMaterialType,//鐗╂枡绫诲埆
+                OwnerTypeId = erpDto.FOwnerTypeID,//璐т富绫诲瀷
+                OwnerId = erpDto.FOwnerId,//璐т富
+                SourceBillType = erpDto.FSrcType,
+                SourceBillNo = erpDto.FSrcBillNo,
+                OrderBillNo = erpDto.FOrderNo
 
             };
 
             var single = _SalesReturnDetailManager.GetSingle(it =>
-                it.ErpID == Convert.ToDecimal(salesOrderSub.ErpID));
+                it.ErpLineId == salesOrderSub.ErpLineId);
             if (single != null) salesOrderSub.Id = single.Id;
 
             salesOrderSubList.Add(salesOrderSub);
@@ -204,5 +207,5 @@
         return salesOrderSubList;
     }
 
-    #endregion
+ 
 }
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs
new file mode 100644
index 0000000..4605bce
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs
@@ -0,0 +1,271 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service;
+using MES.Service.util;
+using MES.Service.service.BasicData;
+using MES.Service.Dto.webApi;
+using Newtonsoft.Json;
+
+namespace MESApplication.Controllers
+{
+    [ApiController]
+    [Route("api/[controller]")]
+    public class SalesDeliveryNoticeController : ControllerBase
+    {
+        
+       
+
+        private readonly MessageCenterManager _manager = new();
+
+        private SalesDeliveryNoticeManager m = new SalesDeliveryNoticeManager();
+
+        private readonly string METHOD = "POST";
+
+        private readonly string TableName = "SALES_DELIVERY_NOTICE";
+
+        private readonly string URL = "http://localhost:10054/api/SalesDeliveryNotice/";
+
+
+        //
+        [HttpPost("Save")]
+        public ResponseResult Save(ErpSalesDelivery salesOrder)
+        {
+            var entity = new MessageCenter();
+            entity.TableName = TableName;
+            entity.Url = URL + "Save";
+            entity.Method = METHOD;
+            entity.Data = JsonConvert.SerializeObject(salesOrder);
+            entity.Status = 1;
+            entity.CreateBy = "PL017";
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                var save = m.Save(salesOrder);
+
+                resultInfos.tbBillList = save;
+
+                entity.Result = 0;
+                if (save) entity.Result = 1;
+
+                entity.DealWith = 1;
+                _manager.save(entity);
+
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                entity.Result = 0;
+
+                entity.DealWith = 0;
+
+                entity.ResultData = ex.Message;
+
+                _manager.save(entity);
+
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        [HttpPost("SaveList")]
+        public ResponseResult SaveList(List<ErpSalesDelivery> units)
+        {
+            var entity = new MessageCenter();
+            entity.TableName = TableName;
+            entity.Url = URL + "SaveList";
+            entity.Method = METHOD;
+            entity.Data = JsonConvert.SerializeObject(units);
+            entity.Status = 1;
+            entity.CreateBy = "PL017";
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                var save = m.SaveList(units);
+                resultInfos.tbBillList = save;
+
+                entity.Result = 0;
+                if (save) entity.Result = 1;
+
+                entity.DealWith = 1;
+                _manager.save(entity);
+
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                entity.Result = 0;
+
+                entity.DealWith = 0;
+
+                entity.ResultData = ex.Message;
+
+                _manager.save(entity);
+
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+
+        /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈�
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("GetList")]
+        public ResponseResult GetList()
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.GetList();
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+
+        /// <summary>
+        /// 鏍规嵁涓婚敭鑾峰彇
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("GetById")]
+        public ResponseResult GetById(int id)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.GetById(id);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        /// <summary>
+        /// 鏍规嵁涓婚敭鍒犻櫎
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("DeleteByIds")]
+        public ResponseResult DeleteByIds([FromBody] object[] ids)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.DeleteByIds(ids);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        /// <summary>
+        /// 娣诲姞 
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("Insert")]
+        public ResponseResult Add([FromBody] SalesDeliveryNotice data)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.Insert(data);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+        /// <summary>
+        /// 娣诲姞杩斿洖鑷
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("InsertReturnIdentity")]
+        public ResponseResult InsertReturnIdentity([FromBody] SalesDeliveryNotice data)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.InsertReturnIdentity(data);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        /// <summary>
+        /// 淇敼
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("Update")]
+        public ResponseResult Update([FromBody] SalesDeliveryNotice data)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.Update(data);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+    }
+}
diff --git a/MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs
new file mode 100644
index 0000000..935a343
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs
@@ -0,0 +1,169 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service;
+using MES.Service.util;
+
+namespace MESApplication.Controllers
+{
+    [ApiController]
+    [Route("api/[controller]")]
+    public class SalesDeliveryNoticeDetailController : ControllerBase
+    {
+        
+        private SalesDeliveryNoticeDetailManager m = new SalesDeliveryNoticeDetailManager();
+
+
+        /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈�
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("GetList")]
+        public ResponseResult GetList()
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.GetList();
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+
+        /// <summary>
+        /// 鏍规嵁涓婚敭鑾峰彇
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("GetById")]
+        public ResponseResult GetById(int id)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.GetById(id);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        /// <summary>
+        /// 鏍规嵁涓婚敭鍒犻櫎
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("DeleteByIds")]
+        public ResponseResult DeleteByIds([FromBody] object[] ids)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.DeleteByIds(ids);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        /// <summary>
+        /// 娣诲姞 
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("Insert")]
+        public ResponseResult Add([FromBody] SalesDeliveryNoticeDetail data)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.Insert(data);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+        /// <summary>
+        /// 娣诲姞杩斿洖鑷
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("InsertReturnIdentity")]
+        public ResponseResult InsertReturnIdentity([FromBody] SalesDeliveryNoticeDetail data)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.InsertReturnIdentity(data);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+
+        /// <summary>
+        /// 淇敼
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("Update")]
+        public ResponseResult Update([FromBody] SalesDeliveryNoticeDetail data)
+        {
+            try
+            {
+                dynamic resultInfos = new ExpandoObject();
+                resultInfos.tbBillList = m.Update(data);
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = resultInfos
+                };
+            }
+            catch (Exception ex)
+            {
+                return ResponseResult.ResponseError(ex);
+            }
+        }
+    }
+}
diff --git a/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs b/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
index 8df7421..bc5249d 100644
--- a/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
+++ b/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
@@ -1,8 +1,11 @@
 锘縰sing System.Dynamic;
+using MES.Service.Dto.webApi;
 using MES.Service.Modes;
+using MES.Service.service;
 using MES.Service.service.BasicData;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
 
 namespace MESApplication.Controllers.BasicData;
 
@@ -10,8 +13,109 @@
 [Route("api/[controller]")]
 public class SalesReturnNoticeController : ControllerBase
 {
+   private readonly MessageCenterManager _manager = new();
+
     private readonly SalesReturnNoticeManager m = new();
 
+    private readonly string METHOD = "POST";
+
+    private readonly string TableName = "SALES_RETURN_NOTICE";
+
+    private readonly string URL = "http://localhost:10054/api/SalesReturnNotice/";
+
+
+    //
+    [HttpPost("Save")]
+    public ResponseResult Save(ErpSalesRerurn salesOrder)
+    {
+        var entity = new MessageCenter();
+        entity.TableName = TableName;
+        entity.Url = URL + "Save";
+        entity.Method = METHOD;
+        entity.Data = JsonConvert.SerializeObject(salesOrder);
+        entity.Status = 1;
+        entity.CreateBy = "PL017";
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var save = m.Save(salesOrder);
+
+            resultInfos.tbBillList = save;
+
+            entity.Result = 0;
+            if (save) entity.Result = 1;
+
+            entity.DealWith = 1;
+            _manager.save(entity);
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            entity.Result = 0;
+
+            entity.DealWith = 0;
+
+            entity.ResultData = ex.Message;
+
+            _manager.save(entity);
+
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    [HttpPost("SaveList")]
+    public ResponseResult SaveList(List<ErpSalesRerurn> units)
+    {
+        var entity = new MessageCenter();
+        entity.TableName = TableName;
+        entity.Url = URL + "SaveList";
+        entity.Method = METHOD;
+        entity.Data = JsonConvert.SerializeObject(units);
+        entity.Status = 1;
+        entity.CreateBy = "PL017";
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var save = m.SaveList(units);
+            resultInfos.tbBillList = save;
+
+            entity.Result = 0;
+            if (save) entity.Result = 1;
+
+            entity.DealWith = 1;
+            _manager.save(entity);
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            entity.Result = 0;
+
+            entity.DealWith = 0;
+
+            entity.ResultData = ex.Message;
+
+            _manager.save(entity);
+
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+
+
+
 
     /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
 
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll
index 61c39f8..cd0897f 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 a29051a..ae04c86 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 25278a5..ebd43c1 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 9cd978c..e4fe256 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 13817b2..719b7b9 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 2968e69..c906c3c 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.xml
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.xml
@@ -606,37 +606,37 @@
             </summary>
             <returns></returns>
         </member>
-        <member name="M:MESApplication.Controllers.BasicData.SalesReturnNoticeDetailController.GetList">
+        <member name="M:MESApplication.Controllers.BasicData.SalesReturnDetailController.GetList">
             <summary>
                 鑾峰彇鎵�鏈�
             </summary>
             <returns></returns>
         </member>
-        <member name="M:MESApplication.Controllers.BasicData.SalesReturnNoticeDetailController.GetById(System.Int32)">
+        <member name="M:MESApplication.Controllers.BasicData.SalesReturnDetailController.GetById(System.Int32)">
             <summary>
                 鏍规嵁涓婚敭鑾峰彇
             </summary>
             <returns></returns>
         </member>
-        <member name="M:MESApplication.Controllers.BasicData.SalesReturnNoticeDetailController.DeleteByIds(System.Object[])">
+        <member name="M:MESApplication.Controllers.BasicData.SalesReturnDetailController.DeleteByIds(System.Object[])">
             <summary>
                 鏍规嵁涓婚敭鍒犻櫎
             </summary>
             <returns></returns>
         </member>
-        <member name="M:MESApplication.Controllers.BasicData.SalesReturnNoticeDetailController.Add(MES.Service.Modes.SalesReturnNoticeDetail)">
+        <member name="M:MESApplication.Controllers.BasicData.SalesReturnDetailController.Add(MES.Service.Modes.SalesReturnNoticeDetail)">
             <summary>
                 娣诲姞
             </summary>
             <returns></returns>
         </member>
-        <member name="M:MESApplication.Controllers.BasicData.SalesReturnNoticeDetailController.InsertReturnIdentity(MES.Service.Modes.SalesReturnNoticeDetail)">
+        <member name="M:MESApplication.Controllers.BasicData.SalesReturnDetailController.InsertReturnIdentity(MES.Service.Modes.SalesReturnNoticeDetail)">
             <summary>
                 娣诲姞杩斿洖鑷
             </summary>
             <returns></returns>
         </member>
-        <member name="M:MESApplication.Controllers.BasicData.SalesReturnNoticeDetailController.Update(MES.Service.Modes.SalesReturnNoticeDetail)">
+        <member name="M:MESApplication.Controllers.BasicData.SalesReturnDetailController.Update(MES.Service.Modes.SalesReturnNoticeDetail)">
             <summary>
                 淇敼
             </summary>
@@ -750,6 +750,78 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeController.GetList">
+            <summary>
+            鑾峰彇鎵�鏈�
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeController.GetById(System.Int32)">
+            <summary>
+            鏍规嵁涓婚敭鑾峰彇
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeController.DeleteByIds(System.Object[])">
+            <summary>
+            鏍规嵁涓婚敭鍒犻櫎
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeController.Add(MES.Service.Modes.SalesDeliveryNotice)">
+            <summary>
+            娣诲姞 
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeController.InsertReturnIdentity(MES.Service.Modes.SalesDeliveryNotice)">
+            <summary>
+            娣诲姞杩斿洖鑷
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeController.Update(MES.Service.Modes.SalesDeliveryNotice)">
+            <summary>
+            淇敼
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeDetailController.GetList">
+            <summary>
+            鑾峰彇鎵�鏈�
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeDetailController.GetById(System.Int32)">
+            <summary>
+            鏍规嵁涓婚敭鑾峰彇
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeDetailController.DeleteByIds(System.Object[])">
+            <summary>
+            鏍规嵁涓婚敭鍒犻櫎
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeDetailController.Add(MES.Service.Modes.SalesDeliveryNoticeDetail)">
+            <summary>
+            娣诲姞 
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeDetailController.InsertReturnIdentity(MES.Service.Modes.SalesDeliveryNoticeDetail)">
+            <summary>
+            娣诲姞杩斿洖鑷
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:MESApplication.Controllers.SalesDeliveryNoticeDetailController.Update(MES.Service.Modes.SalesDeliveryNoticeDetail)">
+            <summary>
+            淇敼
+            </summary>
+            <returns></returns>
+        </member>
         <member name="M:MESApplication.Controllers.MesRfPrnbarcodeController.GetList">
             <summary>
                 鑾峰彇鎵�鏈�

--
Gitblit v1.9.3