From f80d5cdf701b3d3f2e21bffaff6e99a2a240fc0e Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期五, 12 七月 2024 11:25:54 +0800
Subject: [PATCH] 调整erp接口

---
 MES.Service/Modes/SalesReturnNoticeDetail.cs                              |  155 +++
 MESApplication/bin/Release/net8.0/publish/MESApplication.pdb              |    0 
 MES.Service/Modes/MesRohInData.cs                                         |    8 
 MESApplication/Controllers/SJController.cs                                |    1 
 MESApplication/Controllers/BasicData/ShipmentDetailController.cs          |  162 +++
 MESApplication/bin/Release/net8.0/publish/MESApplication.dll              |    0 
 MES.Service/Modes/MesRohIn.cs                                             |    8 
 MESApplication/bin/Debug/net8.0/MESApplication.pdb                        |    0 
 MESApplication/bin/Release/net8.0/MES.Service.dll                         |    0 
 MESApplication/bin/Release/net8.0/MESApplication.dll                      |    0 
 MESApplication/bin/Release/net8.0/publish/MES.Service.pdb                 |    0 
 MESApplication/bin/Release/net8.0/MES.Service.pdb                         |    0 
 MESApplication/Controllers/RKJController.cs                               |    1 
 MESApplication/bin/Release/net8.0/MESApplication.pdb                      |    0 
 MES.Service/bin/Debug/net8.0/MES.Service.pdb                              |    0 
 MESApplication/bin/Release/net8.0/publish/MES.Service.dll                 |    0 
 MES.Service/Modes/SysDepartment.cs                                        |    4 
 MES.Service/Modes/SalesOrderDetail.cs                                     |  113 ++
 MESApplication/Controllers/BasicData/SalesOrderController.cs              |  162 +++
 MES.Service/service/BasicData/ShipmentNoticeManager.cs                    |   75 +
 MESApplication/bin/Debug/net8.0/MESApplication.exe                        |    0 
 MES.Service/bin/Release/net8.0/MES.Service.dll                            |    0 
 MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs       |  163 +++
 MES.Service/bin/Release/net8.0/MES.Service.pdb                            |    0 
 MESApplication/Controllers/XJController.cs                                |    1 
 MES.Service/service/BasicData/SalesReturnNoticeManager.cs                 |   78 +
 MES.Service/service/BasicData/SalesOrderManager.cs                        |   78 +
 MES.Service/Modes/SalesReturnNotice.cs                                    |   83 +
 MESApplication/bin/Release/net8.0/MESApplication.exe                      |    0 
 MES.Service/service/BasicData/MesStaffManager.cs                          |    6 
 MES.Service/service/BasicData/MesRohInManager.cs                          |  488 ++++-----
 MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs |  164 +++
 MES.Service/Dto/webApi/ErpRohIn.cs                                        |    5 
 MES.Service/service/BasicData/ShipmentDetailManager.cs                    |   78 +
 MESApplication/bin/Debug/net8.0/MES.Service.pdb                           |    0 
 MESApplication/Controllers/BasicData/SalesOrderDetailController.cs        |  162 +++
 MES.Service/Modes/SalesOrder.cs                                           |  112 ++
 MESApplication/bin/Debug/net8.0/MES.Service.dll                           |    0 
 MES.Service/Dto/webApi/ErpShipment.cs                                     |    8 
 MESApplication/Controllers/BaseController.cs                              |    1 
 MES.Service/service/BasicData/SalesOrderDetailManager.cs                  |   78 +
 MES.Service/Dto/webApi/ErpShipmentDetail.cs                               |   20 
 MES.Service/service/BasicData/MesSupplierManager.cs                       |    9 
 MES.Service/Modes/MesSupplier.cs                                          |    4 
 MESApplication/bin/Release/net8.0/publish/MESApplication.exe              |    0 
 MESApplication/Controllers/BasicData/ShipmentNoticeController.cs          |  162 +++
 MES.Service/Modes/ShipmentDetail.cs                                       |  155 +++
 MES.Service/Dto/webApi/ErpShipmentNotice.cs                               |   16 
 MES.Service/Dto/webApi/ErpItems.cs                                        |    2 
 MESApplication/bin/Debug/net8.0/MESApplication.dll                        |    0 
 MES.Service/bin/Debug/net8.0/MES.Service.dll                              |    0 
 MESApplication/Controllers/SuspendController.cs                           |    1 
 MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs           |   79 +
 MES.Service/Modes/ShipmentNotice.cs                                       |  125 ++
 MESApplication/Controllers/LoginController.cs                             |    1 
 55 files changed, 2,480 insertions(+), 288 deletions(-)

diff --git a/MES.Service/Dto/webApi/ErpItems.cs b/MES.Service/Dto/webApi/ErpItems.cs
index ca68e49..e2b3a76 100644
--- a/MES.Service/Dto/webApi/ErpItems.cs
+++ b/MES.Service/Dto/webApi/ErpItems.cs
@@ -25,7 +25,7 @@
     public string? FForbidStatus { get; set; }
     public string? FErpClsID { get; set; }
     public string? FWorkShopId { get; set; }
-    
+
     public string? FPRODUCEUNITID { get; set; }
     public string? FSUBCONUNITID { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpRohIn.cs b/MES.Service/Dto/webApi/ErpRohIn.cs
index 2515982..bbd2c6b 100644
--- a/MES.Service/Dto/webApi/ErpRohIn.cs
+++ b/MES.Service/Dto/webApi/ErpRohIn.cs
@@ -39,4 +39,9 @@
     public string? FModifyDate { get; set; }
     public string? FApproverId { get; set; }
     public string? FApproveDate { get; set; }
+
+    public string? FCHANGEREASON { get; set; }
+
+    //閲囪喘璁㈠崟A  閲囪喘璁㈠崟鍙樻洿鍗旴    
+    public string? FBILLTYPE { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpShipment.cs b/MES.Service/Dto/webApi/ErpShipment.cs
new file mode 100644
index 0000000..d5768a5
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpShipment.cs
@@ -0,0 +1,8 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpShipment
+{
+    public ErpShipmentNotice ShipmentNotice { get; set; }
+
+    public List<ErpShipmentDetail> ShipmentDetails { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpShipmentDetail.cs b/MES.Service/Dto/webApi/ErpShipmentDetail.cs
new file mode 100644
index 0000000..f75020c
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpShipmentDetail.cs
@@ -0,0 +1,20 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpShipmentDetail
+{
+    public string ErpId { get; set; }
+    public string? ErpHeadId { get; set; }
+    public string? FMaterialID { get; set; }
+    public string? FMaterialName { get; set; }
+    public string? FMateriaModel { get; set; }
+    public string? FAmount { get; set; }
+    public string? FPrice { get; set; }
+    public string? FQty { get; set; }
+    public string? FLot { get; set; }
+    public string? FNoteEntry { get; set; }
+    public string? F_UNW_Text_xsddh { get; set; }
+    public string? FSOEntryId { get; set; }
+    public string? FBasePrice { get; set; }
+    public string? FStockID { get; set; }
+    public string? FBaseUnitID { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpShipmentNotice.cs b/MES.Service/Dto/webApi/ErpShipmentNotice.cs
new file mode 100644
index 0000000..cabae9d
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpShipmentNotice.cs
@@ -0,0 +1,16 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpShipmentNotice
+{
+    public string? FCreatorId { get; set; }
+    public string? FBillNo { get; set; }
+    public string? FApproverID { get; set; }
+    public string? FCreateDate { get; set; }
+    public string? FApproveDate { get; set; }
+    public string? FSaleDeptId { get; set; }
+    public string? FCustomerID { get; set; }
+    public string? FNote { get; set; }
+    public string? FSalesManID { get; set; }
+    public string ERPId { get; set; }
+    public string? Type { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/MesRohIn.cs b/MES.Service/Modes/MesRohIn.cs
index be2d3ef..abdfd74 100644
--- a/MES.Service/Modes/MesRohIn.cs
+++ b/MES.Service/Modes/MesRohIn.cs
@@ -28,7 +28,7 @@
     public string? DocumentStatus { get; set; }
 
     /// <summary>
-    ///     鍗曟嵁绫诲瀷 1銆侀噰璐� 2銆佸澶�
+    ///     鍗曟嵁绫诲瀷
     /// </summary>
     [SugarColumn(ColumnName = "DOCUMENT_TYPE")]
     public string? DocumentType { get; set; }
@@ -236,6 +236,12 @@
     /// <summary>
     ///     鑷畾涔夊瓧娈�1
     /// </summary>
+    [SugarColumn(ColumnName = "changereason")]
+    public string? Changereason { get; set; }
+
+    /// <summary>
+    ///     鑷畾涔夊瓧娈�1
+    /// </summary>
     [SugarColumn(ColumnName = "REMARK1")]
     public string? Remark1 { get; set; }
 
diff --git a/MES.Service/Modes/MesRohInData.cs b/MES.Service/Modes/MesRohInData.cs
index da6d2ac..0fd7920 100644
--- a/MES.Service/Modes/MesRohInData.cs
+++ b/MES.Service/Modes/MesRohInData.cs
@@ -323,7 +323,7 @@
     /// </summary>
     [SugarColumn(ColumnName = "ERP_ID")]
     public decimal? ErpId { get; set; }
-    
+
     /// <summary>
     ///     閲囪喘璁㈠崟琛屽彿
     /// </summary>
@@ -333,18 +333,18 @@
     /// <summary>
     ///     闇�姹傜粍缁�
     /// </summary>
-    [SugarColumn(ColumnName = "ERP_ID")]
+    [SugarColumn(ColumnName = "DEMAND")]
     public string? Demand { get; set; }
 
     /// <summary>
     ///     鏀舵枡缁勭粐
     /// </summary>
-    [SugarColumn(ColumnName = "ERP_ID")]
+    [SugarColumn(ColumnName = "RECEIVING")]
     public string? Receiving { get; set; }
 
     /// <summary>
     ///     缁撶畻缁勭粐
     /// </summary>
-    [SugarColumn(ColumnName = "ERP_ID")]
+    [SugarColumn(ColumnName = "SETTLEMENT")]
     public string? Settlement { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/Modes/MesSupplier.cs b/MES.Service/Modes/MesSupplier.cs
index 7269980..8736c2b 100644
--- a/MES.Service/Modes/MesSupplier.cs
+++ b/MES.Service/Modes/MesSupplier.cs
@@ -11,13 +11,13 @@
     /// <summary>
     ///     ID
     /// </summary>
-    [SugarColumn(ColumnName = "ID")]
+    [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
     public decimal Id { get; set; }
 
     /// <summary>
     ///     渚涘簲鍟嗙紪鐮�
     /// </summary>
-    [SugarColumn(ColumnName = "SUPP_NO", IsPrimaryKey = true)]
+    [SugarColumn(ColumnName = "SUPP_NO")]
     public string? SuppNo { get; set; }
 
     /// <summary>
diff --git a/MES.Service/Modes/SalesOrder.cs b/MES.Service/Modes/SalesOrder.cs
new file mode 100644
index 0000000..76d12b9
--- /dev/null
+++ b/MES.Service/Modes/SalesOrder.cs
@@ -0,0 +1,112 @@
+锘縰sing SqlSugar;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+///     閿�鍞鍗曡〃
+/// </summary>
+[SugarTable("SALES_ORDER")]
+public class SalesOrder
+{
+    /// <summary>
+    ///     SEQ_sales搴忓垪
+    /// </summary>
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+    public decimal Id { get; set; }
+
+    /// <summary>
+    ///     璁㈠崟鍗曞彿
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_ID")]
+    public string OrderId { get; set; }
+
+    /// <summary>
+    ///     璁㈠崟鍗曞埆
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_TYPE")]
+    public string OrderType { get; set; }
+
+    /// <summary>
+    ///     鍙楄鏃ユ湡
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_DATE")]
+    public DateTime? OrderDate { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁鐗堟湰
+    /// </summary>
+    [SugarColumn(ColumnName = "DOCUMENT_VERSION")]
+    public long? DocumentVersion { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁鏃ユ湡
+    /// </summary>
+    [SugarColumn(ColumnName = "DOCUMENT_DATE")]
+    public DateTime? DocumentDate { get; set; }
+
+    /// <summary>
+    ///     宸ュ巶缂栧彿
+    /// </summary>
+    [SugarColumn(ColumnName = "FACTORY_ID")]
+    public string FactoryId { get; set; }
+
+    /// <summary>
+    ///     宸ュ巶绠�绉�
+    /// </summary>
+    [SugarColumn(ColumnName = "FACTORY_NAME")]
+    public string FactoryName { get; set; }
+
+    /// <summary>
+    ///     瀹㈡埛缂栧彿
+    /// </summary>
+    [SugarColumn(ColumnName = "CUSTOMER_ID")]
+    public string CustomerId { get; set; }
+
+    /// <summary>
+    ///     瀹㈡埛绠�绉�
+    /// </summary>
+    [SugarColumn(ColumnName = "CUSTOMER_NAME")]
+    public string CustomerName { get; set; }
+
+    /// <summary>
+    ///     瀹㈡埛鍗曞彿
+    /// </summary>
+    [SugarColumn(ColumnName = "CUSTOMER_ORDER_ID")]
+    public string CustomerOrderId { get; set; }
+
+    /// <summary>
+    ///     閮ㄩ棬缂栧彿
+    /// </summary>
+    [SugarColumn(ColumnName = "DEPARTMENT_ID")]
+    public string DepartmentId { get; set; }
+
+    /// <summary>
+    ///     鎬绘暟閲�
+    /// </summary>
+    [SugarColumn(ColumnName = "TOTAL_QUANTITY")]
+    public decimal? TotalQuantity { get; set; }
+
+    /// <summary>
+    ///     澶囨敞
+    /// </summary>
+    [SugarColumn(ColumnName = "REMARKS")]
+    public string Remarks { get; set; }
+
+    /// <summary>
+    ///     erp瀹℃牳鏃ユ湡
+    /// </summary>
+    [SugarColumn(ColumnName = "APPROVAL_DATE")]
+    public DateTime? ApprovalDate { get; set; }
+
+    /// <summary>
+    ///     erp瀹℃牳鑰�
+    /// </summary>
+    [SugarColumn(ColumnName = "APPROVER")]
+    public string Approver { get; set; }
+
+    /// <summary>
+    ///     ERPID
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_ID")]
+    public string ErpId { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesOrderDetail.cs b/MES.Service/Modes/SalesOrderDetail.cs
new file mode 100644
index 0000000..0dd800e
--- /dev/null
+++ b/MES.Service/Modes/SalesOrderDetail.cs
@@ -0,0 +1,113 @@
+锘縰sing SqlSugar;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+///     閿�鍞鍗曟槑缁嗚〃
+/// </summary>
+[SugarTable("SALES_ORDER_DETAIL")]
+public class SalesOrderDetail
+{
+    /// <summary>
+    ///     SEQ_sales搴忓垪
+    /// </summary>
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
+        IsPrimaryKey = true)]
+    public decimal Id { get; set; }
+
+    /// <summary>
+    ///     璁㈠崟鍗曞彿
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_ID")]
+    public string OrderId { get; set; }
+
+    /// <summary>
+    ///     搴忓彿
+    /// </summary>
+    [SugarColumn(ColumnName = "LINE_NUMBER")]
+    public long? LineNumber { get; set; }
+
+    /// <summary>
+    ///     浜у搧缂栫爜
+    /// </summary>
+    [SugarColumn(ColumnName = "PRODUCT_CODE")]
+    public string ProductCode { get; set; }
+
+    /// <summary>
+    ///     浜у搧鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "PRODUCT_NAME")]
+    public string ProductName { get; set; }
+
+    /// <summary>
+    ///     浜у搧瑙勬牸
+    /// </summary>
+    [SugarColumn(ColumnName = "PRODUCT_SPEC")]
+    public string ProductSpec { get; set; }
+
+    /// <summary>
+    ///     棰勪氦璐ф棩鏈�
+    /// </summary>
+    [SugarColumn(ColumnName = "SCHEDULED_DELIVERY_DATE")]
+    public DateTime? ScheduledDeliveryDate { get; set; }
+
+    /// <summary>
+    ///     璁㈠崟鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_QUANTITY")]
+    public decimal? OrderQuantity { get; set; }
+
+    /// <summary>
+    ///     鍗曚綅
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIT")]
+    public string Unit { get; set; }
+
+    /// <summary>
+    ///     鍗曚环
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIT_PRICE")]
+    public decimal? UnitPrice { get; set; }
+
+    /// <summary>
+    ///     閲戦
+    /// </summary>
+    [SugarColumn(ColumnName = "AMOUNT")]
+    public decimal? Amount { get; set; }
+
+    /// <summary>
+    ///     瀹㈡埛浜у搧缂栫爜
+    /// </summary>
+    [SugarColumn(ColumnName = "CUSTOMER_PRODUCT_CODE")]
+    public string CustomerProductCode { get; set; }
+
+    /// <summary>
+    ///     宸蹭氦璐ф暟
+    /// </summary>
+    [SugarColumn(ColumnName = "DELIVERED_QUANTITY")]
+    public decimal? DeliveredQuantity { get; set; }
+
+    /// <summary>
+    ///     缁撴潫
+    /// </summary>
+    [SugarColumn(ColumnName = "IS_CLOSED")]
+    public string IsClosed { get; set; }
+
+    /// <summary>
+    ///     澶囨敞
+    /// </summary>
+    [SugarColumn(ColumnName = "REMARKS")]
+    public string Remarks { get; set; }
+
+    /// <summary>
+    ///     ERPID
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_ID")]
+    public string ErpId { get; set; }
+
+    /// <summary>
+    ///     ERP澶碔D
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_HEAD_ID")]
+    public string ErpHeadId { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesReturnNotice.cs b/MES.Service/Modes/SalesReturnNotice.cs
new file mode 100644
index 0000000..f3c462d
--- /dev/null
+++ b/MES.Service/Modes/SalesReturnNotice.cs
@@ -0,0 +1,83 @@
+锘縰sing SqlSugar;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+///     閿�鍞��璐ч�氱煡鍗曡〃
+/// </summary>
+[SugarTable("SALES_RETURN_NOTICE")]
+public class SalesReturnNotice
+{
+    /// <summary>
+    ///     SEQ_sales
+    /// </summary>
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
+        IsPrimaryKey = true)]
+    public decimal Id { get; set; }
+
+    /// <summary>
+    ///     鍒跺崟浜�
+    /// </summary>
+    [SugarColumn(ColumnName = "CREATED_BY")]
+    public string CreatedBy { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁缂栧彿
+    /// </summary>
+    [SugarColumn(ColumnName = "DOCUMENT_ID")]
+    public string DocumentId { get; set; }
+
+    /// <summary>
+    ///     瀹℃牳浜哄悕绉�
+    /// </summary>
+    [SugarColumn(ColumnName = "APPROVED_BY")]
+    public string ApprovedBy { get; set; }
+
+    /// <summary>
+    ///     鍒跺崟/瀹℃牳鏃ユ湡
+    /// </summary>
+    [SugarColumn(ColumnName = "CREATED_OR_APPROVED_DATE")]
+    public DateTime? CreatedOrApprovedDate { get; set; }
+
+    /// <summary>
+    ///     閮ㄩ棬浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "DEPARTMENT_CODE")]
+    public string DepartmentCode { get; set; }
+
+    /// <summary>
+    ///     閮ㄩ棬鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "DEPARTMENT_NAME")]
+    public string DepartmentName { get; set; }
+
+    /// <summary>
+    ///     璐揣鍗曚綅浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "PURCHASER_CODE")]
+    public string PurchaserCode { get; set; }
+
+    /// <summary>
+    ///     璐揣鍗曚綅鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "PURCHASER_NAME")]
+    public string PurchaserName { get; set; }
+
+    /// <summary>
+    ///     涓氬姟鍛樹唬鐮�
+    /// </summary>
+    [SugarColumn(ColumnName = "SALESPERSON_CODE")]
+    public string SalespersonCode { get; set; }
+
+    /// <summary>
+    ///     涓氬姟鍛樺悕绉�
+    /// </summary>
+    [SugarColumn(ColumnName = "SALESPERSON_NAME")]
+    public string SalespersonName { get; set; }
+
+    /// <summary>
+    ///     ERPID
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_ID")]
+    public string ErpId { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesReturnNoticeDetail.cs b/MES.Service/Modes/SalesReturnNoticeDetail.cs
new file mode 100644
index 0000000..3d64ef4
--- /dev/null
+++ b/MES.Service/Modes/SalesReturnNoticeDetail.cs
@@ -0,0 +1,155 @@
+锘縰sing SqlSugar;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+///     閿�鍞��璐ч�氱煡鍗曟槑缁嗚〃
+/// </summary>
+[SugarTable("SALES_RETURN_NOTICE_DETAIL")]
+public class SalesReturnNoticeDetail
+{
+    /// <summary>
+    ///     SEQ_sales
+    /// </summary>
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
+        IsPrimaryKey = true)]
+    public decimal Id { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁琛屽彿
+    /// </summary>
+    [SugarColumn(ColumnName = "LINE_NUMBER")]
+    public long? LineNumber { get; set; }
+
+    /// <summary>
+    ///     浜у搧浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "PRODUCT_CODE")]
+    public string ProductCode { get; set; }
+
+    /// <summary>
+    ///     浜у搧鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "PRODUCT_NAME")]
+    public string ProductName { get; set; }
+
+    /// <summary>
+    ///     浜у搧瑙勬牸
+    /// </summary>
+    [SugarColumn(ColumnName = "PRODUCT_SPEC")]
+    public string ProductSpec { get; set; }
+
+    /// <summary>
+    ///     閲戦
+    /// </summary>
+    [SugarColumn(ColumnName = "AMOUNT")]
+    public decimal? Amount { get; set; }
+
+    /// <summary>
+    ///     鍗曚环
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIT_PRICE")]
+    public decimal? UnitPrice { get; set; }
+
+    /// <summary>
+    ///     鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "QUANTITY")]
+    public decimal? Quantity { get; set; }
+
+    /// <summary>
+    ///     鍑哄簱鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "OUT_QUANTITY")]
+    public decimal? OutQuantity { get; set; }
+
+    /// <summary>
+    ///     鎵瑰彿
+    /// </summary>
+    [SugarColumn(ColumnName = "BATCH_NUMBER")]
+    public string BatchNumber { get; set; }
+
+    /// <summary>
+    ///     閫�璐ф暟閲�
+    /// </summary>
+    [SugarColumn(ColumnName = "RETURN_QUANTITY")]
+    public decimal? ReturnQuantity { get; set; }
+
+    /// <summary>
+    ///     鍙戣揣鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "DELIVERY_QUANTITY")]
+    public decimal? DeliveryQuantity { get; set; }
+
+    /// <summary>
+    ///     澶囨敞
+    /// </summary>
+    [SugarColumn(ColumnName = "REMARKS")]
+    public string Remarks { get; set; }
+
+    /// <summary>
+    ///     閿�鍞鍗曞崟鍙�
+    /// </summary>
+    [SugarColumn(ColumnName = "SALES_ORDER_ID")]
+    public string SalesOrderId { get; set; }
+
+    /// <summary>
+    ///     閿�鍞鍗曞垎褰�
+    /// </summary>
+    [SugarColumn(ColumnName = "SALES_ORDER_ENTRY")]
+    public string SalesOrderEntry { get; set; }
+
+    /// <summary>
+    ///     閿�鍞鍗旾D
+    /// </summary>
+    [SugarColumn(ColumnName = "SALES_ORDER_DETAIL_ID")]
+    public string SalesOrderDetailId { get; set; }
+
+    /// <summary>
+    ///     鍩烘湰鍗曚环
+    /// </summary>
+    [SugarColumn(ColumnName = "BASE_UNIT_PRICE")]
+    public decimal? BaseUnitPrice { get; set; }
+
+    /// <summary>
+    ///     鍩烘湰鍗曚綅鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "BASE_UNIT_QUANTITY")]
+    public decimal? BaseUnitQuantity { get; set; }
+
+    /// <summary>
+    ///     浠撳簱浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "WAREHOUSE_CODE")]
+    public string WarehouseCode { get; set; }
+
+    /// <summary>
+    ///     浠撳簱鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "WAREHOUSE_NAME")]
+    public string WarehouseName { get; set; }
+
+    /// <summary>
+    ///     鍩烘湰鍗曚綅鍑哄簱鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "BASE_UNIT_OUT_QUANTITY")]
+    public decimal? BaseUnitOutQuantity { get; set; }
+
+    /// <summary>
+    ///     鍗曚綅
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIT")]
+    public string Unit { get; set; }
+
+    /// <summary>
+    ///     ERPID
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_ID")]
+    public string ErpId { get; set; }
+
+    /// <summary>
+    ///     ERP澶碔D
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_HEAD_ID")]
+    public string ErpHeadId { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/ShipmentDetail.cs b/MES.Service/Modes/ShipmentDetail.cs
new file mode 100644
index 0000000..7462202
--- /dev/null
+++ b/MES.Service/Modes/ShipmentDetail.cs
@@ -0,0 +1,155 @@
+锘縰sing SqlSugar;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+///     閿�鍞彂璐ч�氱煡鍗曟槑缁嗚〃
+/// </summary>
+[SugarTable("SHIPMENT_DETAIL")]
+public class ShipmentDetail
+{
+    /// <summary>
+    ///     SEQ_sales
+    /// </summary>
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
+        IsPrimaryKey = true)]
+    public decimal Id { get; set; }
+
+    /// <summary>
+    ///     ERPID
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_ID")]
+    public string ErpId { get; set; }
+
+    /// <summary>
+    ///     ERP澶碔D
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_HEAD_ID")]
+    public string ErpHeadId { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁琛屽彿
+    /// </summary>
+    [SugarColumn(ColumnName = "LINE_NO")]
+    public long? LineNo { get; set; }
+
+    /// <summary>
+    ///     浜у搧浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "PROD_CODE")]
+    public string ProdCode { get; set; }
+
+    /// <summary>
+    ///     浜у搧鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "PROD_NAME")]
+    public string ProdName { get; set; }
+
+    /// <summary>
+    ///     浜у搧瑙勬牸
+    /// </summary>
+    [SugarColumn(ColumnName = "PROD_SPEC")]
+    public string ProdSpec { get; set; }
+
+    /// <summary>
+    ///     閲戦
+    /// </summary>
+    [SugarColumn(ColumnName = "AMOUNT")]
+    public double? Amount { get; set; }
+
+    /// <summary>
+    ///     鍗曚环
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIT_PRICE")]
+    public double? UnitPrice { get; set; }
+
+    /// <summary>
+    ///     鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "QUANTITY")]
+    public double? Quantity { get; set; }
+
+    /// <summary>
+    ///     鍑哄簱鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "OUT_QTY")]
+    public double? OutQty { get; set; }
+
+    /// <summary>
+    ///     鎵瑰彿
+    /// </summary>
+    [SugarColumn(ColumnName = "BATCH_NO")]
+    public string BatchNo { get; set; }
+
+    /// <summary>
+    ///     閫�璐ф暟閲�
+    /// </summary>
+    [SugarColumn(ColumnName = "RETURN_QTY")]
+    public double? ReturnQty { get; set; }
+
+    /// <summary>
+    ///     鍙戣揣鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "SHIP_QTY")]
+    public double? ShipQty { get; set; }
+
+    /// <summary>
+    ///     澶囨敞
+    /// </summary>
+    [SugarColumn(ColumnName = "REMARKS")]
+    public string Remarks { get; set; }
+
+    /// <summary>
+    ///     閿�鍞鍗曞崟鍙�
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_NO")]
+    public string OrderNo { get; set; }
+
+    /// <summary>
+    ///     閿�鍞鍗曞垎褰�
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_ENTRY")]
+    public string OrderEntry { get; set; }
+
+    /// <summary>
+    ///     閿�鍞鍗旾D
+    /// </summary>
+    [SugarColumn(ColumnName = "ORDER_ID")]
+    public string OrderId { get; set; }
+
+    /// <summary>
+    ///     鍩烘湰鍗曚环
+    /// </summary>
+    [SugarColumn(ColumnName = "BASE_PRICE")]
+    public double? BasePrice { get; set; }
+
+    /// <summary>
+    ///     鍩烘湰鍗曚綅鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "BASE_QTY")]
+    public double? BaseQty { get; set; }
+
+    /// <summary>
+    ///     浠撳簱浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "WAREHOUSE_CODE")]
+    public string WarehouseCode { get; set; }
+
+    /// <summary>
+    ///     浠撳簱鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "WAREHOUSE_NAME")]
+    public string WarehouseName { get; set; }
+
+    /// <summary>
+    ///     鍩烘湰鍗曚綅鍑哄簱鏁伴噺
+    /// </summary>
+    [SugarColumn(ColumnName = "BASE_OUT_QTY")]
+    public double? BaseOutQty { get; set; }
+
+    /// <summary>
+    ///     鍗曚綅
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIT")]
+    public string Unit { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/ShipmentNotice.cs b/MES.Service/Modes/ShipmentNotice.cs
new file mode 100644
index 0000000..642a9ab
--- /dev/null
+++ b/MES.Service/Modes/ShipmentNotice.cs
@@ -0,0 +1,125 @@
+锘縰sing SqlSugar;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+///     閿�鍞彂璐ч�氱煡鍗曡〃
+/// </summary>
+[SugarTable("SHIPMENT_NOTICE")]
+public class ShipmentNotice
+{
+    /// <summary>
+    ///     SEQ_sales
+    /// </summary>
+    [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
+        IsPrimaryKey = true)]
+    public decimal Id { get; set; }
+
+    /// <summary>
+    ///     鍒跺崟浜�
+    /// </summary>
+    [SugarColumn(ColumnName = "CREATOR")]
+    public string Creator { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁缂栧彿
+    /// </summary>
+    [SugarColumn(ColumnName = "DOC_ID")]
+    public string DocId { get; set; }
+
+    /// <summary>
+    ///     瀹℃牳浜哄悕绉�
+    /// </summary>
+    [SugarColumn(ColumnName = "APPROVER")]
+    public string Approver { get; set; }
+
+    /// <summary>
+    ///     鍒跺崟鏃ユ湡
+    /// </summary>
+    [SugarColumn(ColumnName = "CREATE_DATE")]
+    public DateTime? CreateDate { get; set; }
+
+    /// <summary>
+    ///     瀹℃牳鏃ユ湡
+    /// </summary>
+    [SugarColumn(ColumnName = "APPROVE_DATE")]
+    public DateTime? ApproveDate { get; set; }
+
+    /// <summary>
+    ///     閮ㄩ棬浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "DEPT_CODE")]
+    public string DeptCode { get; set; }
+
+    /// <summary>
+    ///     閮ㄩ棬鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "DEPT_NAME")]
+    public string DeptName { get; set; }
+
+    /// <summary>
+    ///     璐揣鍗曚綅浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "BUYER_CODE")]
+    public string BuyerCode { get; set; }
+
+    /// <summary>
+    ///     璐揣鍗曚綅鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "BUYER_NAME")]
+    public string BuyerName { get; set; }
+
+    /// <summary>
+    ///     涓氬姟鍛樹唬鐮�
+    /// </summary>
+    [SugarColumn(ColumnName = "SALES_CODE")]
+    public string SalesCode { get; set; }
+
+    /// <summary>
+    ///     涓氬姟鍛樺悕绉�
+    /// </summary>
+    [SugarColumn(ColumnName = "SALES_NAME")]
+    public string SalesName { get; set; }
+
+    /// <summary>
+    ///     鍗曟嵁ID
+    /// </summary>
+    [SugarColumn(ColumnName = "UNIQUE_ID")]
+    public string UniqueId { get; set; }
+
+    /// <summary>
+    ///     瀹㈡埛浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "CUST_CODE")]
+    public string CustCode { get; set; }
+
+    /// <summary>
+    ///     瀹㈡埛鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "CUST_NAME")]
+    public string CustName { get; set; }
+
+    /// <summary>
+    ///     鍒楄〃澶囨敞
+    /// </summary>
+    [SugarColumn(ColumnName = "LIST_NOTE")]
+    public string ListNote { get; set; }
+
+    /// <summary>
+    ///     閿�鍞憳浠g爜
+    /// </summary>
+    [SugarColumn(ColumnName = "REP_CODE")]
+    public string RepCode { get; set; }
+
+    /// <summary>
+    ///     閿�鍞憳鍚嶇О
+    /// </summary>
+    [SugarColumn(ColumnName = "REP_NAME")]
+    public string RepName { get; set; }
+
+    /// <summary>
+    ///     ERPID
+    /// </summary>
+    [SugarColumn(ColumnName = "ERP_ID")]
+    public string ErpId { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/SysDepartment.cs b/MES.Service/Modes/SysDepartment.cs
index f80b5b1..f2b6669 100644
--- a/MES.Service/Modes/SysDepartment.cs
+++ b/MES.Service/Modes/SysDepartment.cs
@@ -23,7 +23,7 @@
     /// <summary>
     ///     閮ㄩ棬缂栧彿
     /// </summary>
-    [SugarColumn(ColumnName = "DEPARTMENTCODE", IsPrimaryKey = true)]
+    [SugarColumn(ColumnName = "DEPARTMENTCODE")]
     public string? Departmentcode { get; set; }
 
     /// <summary>
@@ -118,7 +118,7 @@
 
     /// <summary>
     /// </summary>
-    [SugarColumn(ColumnName = "ID")]
+    [SugarColumn(ColumnName = "ID", 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 5890005..05385d8 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 004089e..83bd29f 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll
index 5ef17a8..1e5925e 100644
--- a/MES.Service/bin/Release/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Release/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.pdb b/MES.Service/bin/Release/net8.0/MES.Service.pdb
index 2edfdce..b92a605 100644
--- a/MES.Service/bin/Release/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Release/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/service/BasicData/MesRohInManager.cs b/MES.Service/service/BasicData/MesRohInManager.cs
index 32dbef1..5ad7b39 100644
--- a/MES.Service/service/BasicData/MesRohInManager.cs
+++ b/MES.Service/service/BasicData/MesRohInManager.cs
@@ -4,286 +4,244 @@
 using MES.Service.util;
 using SqlSugar;
 
-namespace MES.Service.service.BasicData;
-
-public class MesRohInManager : Repository<MesRohIn>
+namespace MES.Service.service.BasicData
 {
-    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
-
-    private readonly MesRohInDataManager rohInDataManager = new();
-
-    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 MesRohInManager.cs
-
-    public bool Save(RohIn rohIn)
+    public class MesRohInManager : Repository<MesRohIn>
     {
-        var rohInErpRohIn = rohIn.ErpRohIn;
-        var mesRohIn = GetMesRohIn(rohInErpRohIn);
-        var mesRohInDatas =
-            GetMesRohInDatas(rohIn.ErpRohinDatas, rohInErpRohIn.Type);
-        switch (rohInErpRohIn.Type)
+        private readonly MesRohInDataManager rohInDataManager = new();
+
+        // Save 鏂规硶鐢ㄤ簬淇濆瓨鍗曚釜 RohIn 璁板綍锛屾牴鎹被鍨嬫墽琛屼笉鍚岀殑鎿嶄綔
+        public bool Save(RohIn rohIn)
         {
-            case "1":
-                var insert = base.Insert(mesRohIn);
-                var insertRange = rohInDataManager.InsertRange(mesRohInDatas);
+            var rohInErpRohIn = rohIn.ErpRohIn;
+            var mesRohIn = GetMesRohIn(rohInErpRohIn);
+            var mesRohInDatas =
+                GetMesRohInDatas(rohIn.ErpRohinDatas, rohInErpRohIn.Type);
 
-                if (insert && insertRange) return true;
-                throw new NotImplementedException("鎻掑叆澶辫触");
-            case "2":
-                var update = base.Update(mesRohIn);
-                var insertOrUpdate =
-                    rohInDataManager.InsertOrUpdate(mesRohInDatas);
-
-                if (update && insertOrUpdate) return true;
-                throw new NotImplementedException("鏇存柊澶辫触");
-            case "4":
-                var orUpdate = SaveOrUpdate(mesRohIn);
-                var baOrUpdate =
-                    rohInDataManager.InsertOrUpdate(mesRohInDatas);
-                if (orUpdate && baOrUpdate) return true;
-                throw new NotImplementedException("鎻掑叆澶辫触");
-            default:
-                throw new NotImplementedException("type娌℃湁" +
-                                                  rohInErpRohIn.Type + "杩欎釜绫诲瀷");
-        }
-    }
-
-    private bool SaveOrUpdate(MesRohIn mesRohIn)
-    {
-        var mesRohIns = base.GetList(it => it.EbelnK3id == mesRohIn.EbelnK3id);
-
-        if (CollectionUtil.IsNullOrEmpty(mesRohIns))
-        {
-            return base.Insert(mesRohIn);
-        }
-
-        return base.Update(mesRohIn);
-    }
-
-    public bool SaveList(List<RohIn> rohIns)
-    {
-        var result = new List<bool>();
-        rohIns.ForEach(s =>
-        {
-            var save = Save(s);
-            result.Add(save);
-        });
-        return result.All(b => b);
-    }
-
-    public MesRohIn GetMesRohIn(ErpRohIn rohIn)
-    {
-        var eid = Convert.ToDecimal(rohIn.id);
-        var mesRohIn = new MesRohIn();
-        if (!"1".Equals(rohIn.Type))
-        {
-            var single = base.GetSingle(it => it.EbelnK3id == eid);
-            if (single != null) mesRohIn.Id = single.Id;
-        }
-
-        mesRohIn.EbelnK3id = eid;
-
-        mesRohIn.BillNo = rohIn.FBillNo;
-        mesRohIn.DocumentStatus = rohIn.FDocumentStatus;
-        mesRohIn.DocumentType = rohIn.FBillTypeID;
-        mesRohIn.BusinessType = rohIn.FBusinessType;
-
-        if (rohIn.FDate != null)
-            mesRohIn.PurchaseDate = DateTime.ParseExact(
-                rohIn.FDate, "yyyy-MM-dd HH:mm:ss", null);
-
-        mesRohIn.Supplier = rohIn.FSupplierId;
-        mesRohIn.CloseStatus = rohIn.FCloseStatus;
-        mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId;
-        mesRohIn.PurchaseDept = rohIn.FPurchaseDeptId;
-        mesRohIn.PurchaseGroup = rohIn.FPurchaserGroupId;
-        mesRohIn.QtyAcceptance = rohIn.Facctype;
-        mesRohIn.Purchaser = rohIn.FPurchaserId;
-        mesRohIn.QualityReq = rohIn.F_UNW_Remarks_zlyq;
-        // mesRohIn.SupplierContact = rohIn.F_UNW_GYSLXR;
-        // mesRohIn.ContactPhone = rohIn.F_UNW_LXRDH;
-        // mesRohIn.Position = rohIn.FProviderJob;
-        // mesRohIn.OfficePhone = rohIn.FProviderPhone;
-        // mesRohIn.SupplierAddress = rohIn.FProviderAddress;
-        mesRohIn.SettlementParty = rohIn.FSettleId;
-        mesRohIn.PaymentParty = rohIn.FChargeId;
-        mesRohIn.Email = rohIn.FProviderEMail;
-        mesRohIn.TransportMethod = rohIn.F_UNW_Text_ysfs;
-        mesRohIn.Remarks = rohIn.F_UNW_BZ;
-        mesRohIn.FixtureMoldProcurement = rohIn.F_UNW_Combo_zjmj;
-        mesRohIn.CancellationStatus = rohIn.FCancelStatus;
-        mesRohIn.CancellationPerson = rohIn.FCancellerId;
-        if (rohIn.FCancelDate != null)
-            mesRohIn.CancellationDate = DateTime.ParseExact(
-                rohIn.FCancelDate, "yyyy-MM-dd HH:mm:ss", null);
-
-        mesRohIn.CreateBy = rohIn.FCreatorId;
-
-        if (rohIn.FCreateDate != null)
-            mesRohIn.CreateDate = DateTime.ParseExact(
-                rohIn.FCreateDate, "yyyy-MM-dd HH:mm:ss", null);
-
-        mesRohIn.LastupdateBy = rohIn.FModifierId;
-
-        if (rohIn.FModifyDate != null)
-            mesRohIn.LastupdateDate = DateTime.ParseExact(
-                rohIn.FModifyDate, "yyyy-MM-dd HH:mm:ss", null);
-
-        mesRohIn.ErpCheckBy = rohIn.FApproverId;
-        mesRohIn.ErpCheckDate = rohIn.FApproveDate;
-
-
-        return mesRohIn;
-    }
-
-    public List<MesRohInData> GetMesRohInDatas(List<ErpRohinData> ErpRohinDatas,
-        string type)
-    {
-        var list = new List<MesRohInData>();
-        ErpRohinDatas.ForEach(s =>
-        {
-            var entity = new MesRohInData();
-
-            var eid = Convert.ToDecimal(s.id);
-
-            if (!"1".Equals(type))
+            return UseTransaction(db =>
             {
-                var single =
-                    rohInDataManager.GetSingle(it => it.EbelnK3id == eid);
-                if (single != null) entity.Id = single.Id;
+                switch (rohInErpRohIn.Type)
+                {
+                    case "2":
+                        return InsertData(db, mesRohIn, mesRohInDatas,
+                            rohInErpRohIn.FBILLTYPE)
+                            ? 1
+                            : 0;
+                    case "3":
+                        return UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0;
+                    case "4":
+                        return SaveOrUpdateData(db, mesRohIn, mesRohInDatas)
+                            ? 1
+                            : 0;
+                    default:
+                        throw new NotImplementedException(
+                            $"type娌℃湁{rohInErpRohIn.Type}杩欎釜绫诲瀷");
+                }
+            }) > 0;
+        }
+
+        // 鎻掑叆鏁版嵁鐨勬柟娉�
+        private bool InsertData(SqlSugarScope db, MesRohIn mesRohIn,
+            List<MesRohInData> mesRohInDatas, string FBILLTYPE)
+        {
+            switch (FBILLTYPE)
+            {
+                case "A":
+                {
+                    var insert = base.Insert(mesRohIn);
+                    var insertRange =
+                        rohInDataManager.InsertRange(mesRohInDatas);
+
+                    if (insert && insertRange) return true;
+                    throw new NotImplementedException("鎻掑叆澶辫触");
+                }
+                case "B":
+                {
+                    var decimals = mesRohInDatas.Select(s => s.Id).ToArray();
+                    if (base.DeleteById(mesRohIn.Id) && db
+                            .Deleteable<MesRohInData>().In(decimals)
+                            .ExecuteCommand() > 0)
+                    {
+                        var insert = base.Insert(mesRohIn);
+                        var insertRange =
+                            rohInDataManager.InsertRange(mesRohInDatas);
+
+                        if (insert && insertRange) return true;
+                        throw new NotImplementedException("鎻掑叆澶辫触");
+                    }
+
+                    break;
+                }
             }
 
-            entity.EbelnK3id = Convert.ToDecimal(s.id);
-            entity.ErpId = Convert.ToDecimal(s.Eid);
+            throw new NotImplementedException("閲囪喘璁㈠崟绫诲瀷閿欒");
+        }
 
-            entity.BillNo = s.FBillNo;
-            entity.SalesOrderId = s.F_UNW_Text_xsddh;
-            entity.ItemId = s.FMaterialId;
-            entity.PurchaseUnit = s.FUnitId;
-            entity.PurchaseQty = Convert.ToDecimal(s.FQty);
-            entity.InventoryUnit = s.FStockUnitID;
-            entity.PricingUnit = s.FPriceUnitId;
-            entity.PricingQty = Convert.ToDecimal(s.FPriceUnitQty);
-
-            if (s.FDeliveryDate != null)
-                entity.DeliveryDate = DateTime.ParseExact(
-                    s.FDeliveryDate, "yyyy-MM-dd HH:mm:ss", null);
-
-            if (s.FDeliveryEarlyDate != null)
-                entity.EarliestDeliveryDate = DateTime.ParseExact(
-                    s.FDeliveryEarlyDate, "yyyy-MM-dd HH:mm:ss", null);
-
-            if (s.FDeliveryLastDate != null)
-                entity.LatestDeliveryDate = DateTime.ParseExact(
-                    s.FDeliveryLastDate, "yyyy-MM-dd HH:mm:ss", null);
-
-            entity.IsGift = s.FGiveAway;
-            entity.Remarks = s.FEntryNote;
-            entity.SupplierItemCode = s.FSupMatId;
-            entity.SupplierItemName = s.FSupMatName;
-            entity.OutsourcingOrderId = s.FSUBREQBILLNO;
-            entity.BatchNumber = s.FLot;
-            entity.BusinessClose = s.FMRPCloseStatus;
-            entity.BusinessFreeze = s.FMRPFreezeStatus;
-            entity.Freezer = s.FFreezerId;
-
-            if (s.FFreezeDate != null)
-                entity.FreezeTime = DateTime.ParseExact(
-                    s.FFreezeDate, "yyyy-MM-dd HH:mm:ss", null);
-
-            entity.BusinessTerminate = s.FMRPTerminateStatus;
-            entity.Terminator = s.FTerminaterId;
-
-            if (s.FTerminateDate != null)
-                entity.TerminateTime = DateTime.ParseExact(
-                    s.FTerminateDate, "yyyy-MM-dd HH:mm:ss", null);
-
-            entity.TotalReceivedQty = Convert.ToDecimal(s.FReceiveQty);
-            entity.RemainingReceivedQty =
-                Convert.ToDecimal(s.FRemainReceiveQty);
-            entity.TotalStoredQty = Convert.ToDecimal(s.FStockInQty);
-            entity.RemainingStoredQty = Convert.ToDecimal(s.FRemainStockINQty);
-            entity.TotalReturnedQty = Convert.ToDecimal(s.FMrbQty);
-            entity.ReturnableReceivedQty = Convert.ToDecimal(s.FCHECKRETQTY);
-            entity.ReturnableStoredQty = Convert.ToDecimal(s.FSTOCKRETQTY);
-            entity.SourceDocumentType = s.FSrcBillTypeId;
-            entity.SourceDocumentId = s.FSrcBillNo;
-            entity.DemandTrackingId = s.FReqTraceNo;
-            entity.PlanTrackingId = s.FMtoNo;
-            entity.ChangeFlag = s.FChangeFlag;
-            entity.DemandSource = s.FDEMANDTYPE;
-            entity.DemandDocumentId = s.FDEMANDBILLNO;
-            entity.DemandDocumentLineId = s.FDEMANDBILLENTRYSEQ;
-            entity.PurchaseOrderLineNumber = s.PurchaseOrderLineNumber;
-            entity.Demand = s.Demand;
-            entity.Receiving = s.Receiving;
-            entity.Settlement = s.Settlement;
-            list.Add(entity);
-        });
-        return list;
-    }
-
-    #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()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
-        Console.Write(p.TotalCount); //杩斿洖鎬绘暟
-
-        var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
-        conModels.Add(new ConditionalModel
+        // 鏇存柊鏁版嵁鐨勬柟娉�
+        private bool UpdateData(SqlSugarScope db, MesRohIn mesRohIn,
+            List<MesRohInData> mesRohInDatas)
         {
-            FieldName = typeof(MesRohIn).GetProperties()[0].Name,
-            ConditionalType = ConditionalType.Equal, FieldValue = "1"
-        }); //id=1
-        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+            var update = base.Insert(mesRohIn);
+            var insertOrUpdate = rohInDataManager.InsertRange(mesRohInDatas);
 
-        AsQueryable().Where(x => 1 == 1)
-            .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+            if (update && insertOrUpdate) return true;
+            throw new NotImplementedException("鏇存柊澶辫触");
+        }
 
+        // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
+        private bool SaveOrUpdateData(SqlSugarScope db, MesRohIn mesRohIn,
+            List<MesRohInData> mesRohInDatas)
+        {
+            var orUpdate = base.Insert(mesRohIn);
+            var baOrUpdate = rohInDataManager.InsertRange(mesRohInDatas);
+            if (orUpdate && baOrUpdate) return true;
+            throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
+        }
 
-        /*********鎻掑叆*********/
-        var insertData = new MesRohIn(); //娴嬭瘯鍙傛暟
-        var insertArray = new[] { insertData };
-        base.Insert(insertData); //鎻掑叆
-        base.InsertRange(insertArray); //鎵归噺鎻掑叆
-        var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
-        AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+        // 鎵归噺淇濆瓨璁板綍鐨勬柟娉�
+        public bool SaveList(List<RohIn> rohIns)
+        {
+            var result = rohIns.Select(Save).ToList();
+            return result.All(b => b);
+        }
 
+        // 灏� ErpRohIn 瀵硅薄杞崲涓� MesRohIn 瀵硅薄鐨勬柟娉�
+        public MesRohIn GetMesRohIn(ErpRohIn rohIn)
+        {
+            var eid = Convert.ToDecimal(rohIn.id);
+            var mesRohIn = new MesRohIn();
 
-        /*********鏇存柊*********/
-        var updateData = new MesRohIn(); //娴嬭瘯鍙傛暟
-        var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
-        base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
-        base.UpdateRange(updateArray); //鎵归噺鏇存柊
-        //base.Update(it => new MesRohIn() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
-        AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+            var single = base.GetSingle(it => it.EbelnK3id == eid);
+            if (single != null) mesRohIn.Id = single.Id;
 
+            mesRohIn.EbelnK3id = eid;
+            mesRohIn.BillNo = rohIn.FBillNo;
+            mesRohIn.DocumentStatus = rohIn.FDocumentStatus;
+            mesRohIn.DocumentType = rohIn.FBillTypeID;
+            mesRohIn.BusinessType = rohIn.FBusinessType;
 
-        /*********鍒犻櫎*********/
-        var deldata = new MesRohIn(); //娴嬭瘯鍙傛暟
-        base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
-        base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
-        base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
-        base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
-        AsDeleteable().Where(it => 1 == 2)
-            .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+            if (rohIn.FDate != null)
+                mesRohIn.PurchaseDate = DateTime.ParseExact(rohIn.FDate,
+                    "yyyy-MM-dd HH:mm:ss", null);
+
+            mesRohIn.Supplier = rohIn.FSupplierId;
+            mesRohIn.CloseStatus = rohIn.FCloseStatus;
+            mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId;
+            mesRohIn.PurchaseDept = rohIn.FPurchaseDeptId;
+            mesRohIn.PurchaseGroup = rohIn.FPurchaserGroupId;
+            mesRohIn.QtyAcceptance = rohIn.Facctype;
+            mesRohIn.Purchaser = rohIn.FPurchaserId;
+            mesRohIn.QualityReq = rohIn.F_UNW_Remarks_zlyq;
+            mesRohIn.SettlementParty = rohIn.FSettleId;
+            mesRohIn.PaymentParty = rohIn.FChargeId;
+            mesRohIn.Email = rohIn.FProviderEMail;
+            mesRohIn.TransportMethod = rohIn.F_UNW_Text_ysfs;
+            mesRohIn.Remarks = rohIn.F_UNW_BZ;
+            mesRohIn.FixtureMoldProcurement = rohIn.F_UNW_Combo_zjmj;
+            mesRohIn.CancellationStatus = rohIn.FCancelStatus;
+            mesRohIn.CancellationPerson = rohIn.FCancellerId;
+
+            if (rohIn.FCancelDate != null)
+                mesRohIn.CancellationDate =
+                    DateTime.ParseExact(rohIn.FCancelDate,
+                        "yyyy-MM-dd HH:mm:ss", null);
+
+            mesRohIn.CreateBy = rohIn.FCreatorId;
+
+            if (rohIn.FCreateDate != null)
+                mesRohIn.CreateDate = DateTime.ParseExact(rohIn.FCreateDate,
+                    "yyyy-MM-dd HH:mm:ss", null);
+
+            mesRohIn.LastupdateBy = rohIn.FModifierId;
+
+            if (rohIn.FModifyDate != null)
+                mesRohIn.LastupdateDate = DateTime.ParseExact(rohIn.FModifyDate,
+                    "yyyy-MM-dd HH:mm:ss", null);
+
+            mesRohIn.ErpCheckBy = rohIn.FApproverId;
+            mesRohIn.ErpCheckDate = rohIn.FApproveDate;
+            mesRohIn.Changereason = rohIn.FCHANGEREASON;
+
+            return mesRohIn;
+        }
+
+        // 灏� ErpRohinData 瀵硅薄杞崲涓� MesRohInData 瀵硅薄鐨勬柟娉�
+        public List<MesRohInData> GetMesRohInDatas(
+            List<ErpRohinData> erpRohinDatas, string type)
+        {
+            return erpRohinDatas.Select(s =>
+            {
+                var entity = new MesRohInData
+                {
+                    EbelnK3id = Convert.ToDecimal(s.id),
+                    ErpId = Convert.ToDecimal(s.Eid),
+                    BillNo = s.FBillNo,
+                    SalesOrderId = s.F_UNW_Text_xsddh,
+                    ItemId = s.FMaterialId,
+                    PurchaseUnit = s.FUnitId,
+                    PurchaseQty = Convert.ToDecimal(s.FQty),
+                    InventoryUnit = s.FStockUnitID,
+                    PricingUnit = s.FPriceUnitId,
+                    PricingQty = Convert.ToDecimal(s.FPriceUnitQty),
+                    DeliveryDate = s.FDeliveryDate != null
+                        ? DateTime.ParseExact(s.FDeliveryDate,
+                            "yyyy-MM-dd HH:mm:ss", null)
+                        : null,
+                    EarliestDeliveryDate = s.FDeliveryEarlyDate != null
+                        ? DateTime.ParseExact(s.FDeliveryEarlyDate,
+                            "yyyy-MM-dd HH:mm:ss", null)
+                        : null,
+                    LatestDeliveryDate = s.FDeliveryLastDate != null
+                        ? DateTime.ParseExact(s.FDeliveryLastDate,
+                            "yyyy-MM-dd HH:mm:ss", null)
+                        : null,
+                    IsGift = s.FGiveAway,
+                    Remarks = s.FEntryNote,
+                    SupplierItemCode = s.FSupMatId,
+                    SupplierItemName = s.FSupMatName,
+                    OutsourcingOrderId = s.FSUBREQBILLNO,
+                    BatchNumber = s.FLot,
+                    BusinessClose = s.FMRPCloseStatus,
+                    BusinessFreeze = s.FMRPFreezeStatus,
+                    Freezer = s.FFreezerId,
+                    FreezeTime = s.FFreezeDate != null
+                        ? DateTime.ParseExact(s.FFreezeDate,
+                            "yyyy-MM-dd HH:mm:ss", null)
+                        : null,
+                    BusinessTerminate = s.FMRPTerminateStatus,
+                    Terminator = s.FTerminaterId,
+                    TerminateTime = s.FTerminateDate != null
+                        ? DateTime.ParseExact(s.FTerminateDate,
+                            "yyyy-MM-dd HH:mm:ss", null)
+                        : null,
+                    TotalReceivedQty = Convert.ToDecimal(s.FReceiveQty),
+                    RemainingReceivedQty =
+                        Convert.ToDecimal(s.FRemainReceiveQty),
+                    TotalStoredQty = Convert.ToDecimal(s.FStockInQty),
+                    RemainingStoredQty = Convert.ToDecimal(s.FRemainStockINQty),
+                    TotalReturnedQty = Convert.ToDecimal(s.FMrbQty),
+                    ReturnableReceivedQty = Convert.ToDecimal(s.FCHECKRETQTY),
+                    ReturnableStoredQty = Convert.ToDecimal(s.FSTOCKRETQTY),
+                    SourceDocumentType = s.FSrcBillTypeId,
+                    SourceDocumentId = s.FSrcBillNo,
+                    DemandTrackingId = s.FReqTraceNo,
+                    PlanTrackingId = s.FMtoNo,
+                    ChangeFlag = s.FChangeFlag,
+                    DemandSource = s.FDEMANDTYPE,
+                    DemandDocumentId = s.FDEMANDBILLNO,
+                    DemandDocumentLineId = s.FDEMANDBILLENTRYSEQ,
+                    PurchaseOrderLineNumber = s.PurchaseOrderLineNumber,
+                    Demand = s.Demand,
+                    Receiving = s.Receiving,
+                    Settlement = s.Settlement
+                };
+
+                var single = rohInDataManager.GetSingle(it =>
+                    it.EbelnK3id == entity.EbelnK3id);
+                if (single != null) entity.Id = single.Id;
+
+                return entity;
+            }).ToList();
+        }
     }
-
-    #endregion
 }
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/MesStaffManager.cs b/MES.Service/service/BasicData/MesStaffManager.cs
index 34eafdf..ec8ed98 100644
--- a/MES.Service/service/BasicData/MesStaffManager.cs
+++ b/MES.Service/service/BasicData/MesStaffManager.cs
@@ -64,7 +64,11 @@
         var exists = db.Queryable<SysUser>().Any(u => u.Sid == sysUser.Sid);
         if (exists)
         {
-            var updateUser = db.Updateable(sysUser).ExecuteCommand();
+            var updateUser = db.Updateable<SysUser>()
+                .SetColumns(s=>s.Fcode == sysUser.Fcode)
+                .SetColumns(s=>s.Fname == sysUser.Fname)
+                .Where(s=>s.Sid == sysUser.Sid)
+                .ExecuteCommand();
             if (updateUser > 0)
             {
                 var updateStaff = db.Updateable(entity).ExecuteCommand();
diff --git a/MES.Service/service/BasicData/MesSupplierManager.cs b/MES.Service/service/BasicData/MesSupplierManager.cs
index b2e5ac3..f64e2e9 100644
--- a/MES.Service/service/BasicData/MesSupplierManager.cs
+++ b/MES.Service/service/BasicData/MesSupplierManager.cs
@@ -28,7 +28,7 @@
                         return 1;
                     break;
                 case "3":
-                    if (DeleteSupplier(db, entity.Id))
+                    if (DeleteSupplier(entity.Id))
                         return 1;
                     break;
                 case "4":
@@ -108,12 +108,9 @@
         throw new NotImplementedException("鎻掑叆澶辫触");
     }
 
-    private bool DeleteSupplier(SqlSugarScope db, decimal supplierId)
+    private bool DeleteSupplier(decimal supplierId)
     {
-        var deleteById = db.Deleteable<MesSupplier>().In(supplierId)
-            .ExecuteCommand();
-        if (deleteById > 0)
-            return true;
+        if (base.DeleteById(supplierId)) return true;
 
         throw new NotImplementedException("鍒犻櫎澶辫触");
     }
diff --git a/MES.Service/service/BasicData/SalesOrderDetailManager.cs b/MES.Service/service/BasicData/SalesOrderDetailManager.cs
new file mode 100644
index 0000000..d80f479
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesOrderDetailManager.cs
@@ -0,0 +1,78 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Modes;
+using SqlSugar;
+
+namespace MES.Service.service.BasicData;
+
+public class SalesOrderDetailManager : Repository<SalesOrderDetail>
+{
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesOrderDetailManager.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()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
+        Console.Write(p.TotalCount); //杩斿洖鎬绘暟
+
+        var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+        conModels.Add(new ConditionalModel
+        {
+            FieldName = typeof(SalesOrderDetail).GetProperties()[0].Name,
+            ConditionalType = ConditionalType.Equal, FieldValue = "1"
+        }); //id=1
+        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+
+        AsQueryable().Where(x => 1 == 1)
+            .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+
+        /*********鎻掑叆*********/
+        var insertData = new SalesOrderDetail(); //娴嬭瘯鍙傛暟
+        var insertArray = new[] { insertData };
+        base.Insert(insertData); //鎻掑叆
+        base.InsertRange(insertArray); //鎵归噺鎻掑叆
+        var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
+        AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+        /*********鏇存柊*********/
+        var updateData = new SalesOrderDetail(); //娴嬭瘯鍙傛暟
+        var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
+        base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
+        base.UpdateRange(updateArray); //鎵归噺鏇存柊
+        //base.Update(it => new SalesOrderDetail() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+        AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+        /*********鍒犻櫎*********/
+        var deldata = new SalesOrderDetail(); //娴嬭瘯鍙傛暟
+        base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
+        base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
+        base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+        base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
+        AsDeleteable().Where(it => 1 == 2)
+            .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+    }
+
+    #endregion
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesOrderManager.cs b/MES.Service/service/BasicData/SalesOrderManager.cs
new file mode 100644
index 0000000..b466f00
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesOrderManager.cs
@@ -0,0 +1,78 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Modes;
+using SqlSugar;
+
+namespace MES.Service.service.BasicData;
+
+public class SalesOrderManager : Repository<SalesOrder>
+{
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesOrderManager.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()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
+        Console.Write(p.TotalCount); //杩斿洖鎬绘暟
+
+        var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+        conModels.Add(new ConditionalModel
+        {
+            FieldName = typeof(SalesOrder).GetProperties()[0].Name,
+            ConditionalType = ConditionalType.Equal, FieldValue = "1"
+        }); //id=1
+        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+
+        AsQueryable().Where(x => 1 == 1)
+            .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+
+        /*********鎻掑叆*********/
+        var insertData = new SalesOrder(); //娴嬭瘯鍙傛暟
+        var insertArray = new[] { insertData };
+        base.Insert(insertData); //鎻掑叆
+        base.InsertRange(insertArray); //鎵归噺鎻掑叆
+        var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
+        AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+        /*********鏇存柊*********/
+        var updateData = new SalesOrder(); //娴嬭瘯鍙傛暟
+        var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
+        base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
+        base.UpdateRange(updateArray); //鎵归噺鏇存柊
+        //base.Update(it => new SalesOrder() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+        AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+        /*********鍒犻櫎*********/
+        var deldata = new SalesOrder(); //娴嬭瘯鍙傛暟
+        base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
+        base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
+        base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+        base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
+        AsDeleteable().Where(it => 1 == 2)
+            .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+    }
+
+    #endregion
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs b/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs
new file mode 100644
index 0000000..78d4c7b
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs
@@ -0,0 +1,79 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Modes;
+using SqlSugar;
+
+namespace MES.Service.service.BasicData;
+
+public class
+    SalesReturnNoticeDetailManager : Repository<SalesReturnNoticeDetail>
+{
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesReturnNoticeDetailManager.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()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
+        Console.Write(p.TotalCount); //杩斿洖鎬绘暟
+
+        var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+        conModels.Add(new ConditionalModel
+        {
+            FieldName = typeof(SalesReturnNoticeDetail).GetProperties()[0].Name,
+            ConditionalType = ConditionalType.Equal, FieldValue = "1"
+        }); //id=1
+        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+
+        AsQueryable().Where(x => 1 == 1)
+            .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+
+        /*********鎻掑叆*********/
+        var insertData = new SalesReturnNoticeDetail(); //娴嬭瘯鍙傛暟
+        var insertArray = new[] { insertData };
+        base.Insert(insertData); //鎻掑叆
+        base.InsertRange(insertArray); //鎵归噺鎻掑叆
+        var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
+        AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+        /*********鏇存柊*********/
+        var updateData = new SalesReturnNoticeDetail(); //娴嬭瘯鍙傛暟
+        var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
+        base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
+        base.UpdateRange(updateArray); //鎵归噺鏇存柊
+        //base.Update(it => new SalesReturnNoticeDetail() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+        AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+        /*********鍒犻櫎*********/
+        var deldata = new SalesReturnNoticeDetail(); //娴嬭瘯鍙傛暟
+        base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
+        base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
+        base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+        base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
+        AsDeleteable().Where(it => 1 == 2)
+            .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+    }
+
+    #endregion
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesReturnNoticeManager.cs b/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
new file mode 100644
index 0000000..206f0ea
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
@@ -0,0 +1,78 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Modes;
+using SqlSugar;
+
+namespace MES.Service.service.BasicData;
+
+public class SalesReturnNoticeManager : Repository<SalesReturnNotice>
+{
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesReturnNoticeManager.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()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
+        Console.Write(p.TotalCount); //杩斿洖鎬绘暟
+
+        var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+        conModels.Add(new ConditionalModel
+        {
+            FieldName = typeof(SalesReturnNotice).GetProperties()[0].Name,
+            ConditionalType = ConditionalType.Equal, FieldValue = "1"
+        }); //id=1
+        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+
+        AsQueryable().Where(x => 1 == 1)
+            .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+
+        /*********鎻掑叆*********/
+        var insertData = new SalesReturnNotice(); //娴嬭瘯鍙傛暟
+        var insertArray = new[] { insertData };
+        base.Insert(insertData); //鎻掑叆
+        base.InsertRange(insertArray); //鎵归噺鎻掑叆
+        var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
+        AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+        /*********鏇存柊*********/
+        var updateData = new SalesReturnNotice(); //娴嬭瘯鍙傛暟
+        var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
+        base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
+        base.UpdateRange(updateArray); //鎵归噺鏇存柊
+        //base.Update(it => new SalesReturnNotice() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+        AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+        /*********鍒犻櫎*********/
+        var deldata = new SalesReturnNotice(); //娴嬭瘯鍙傛暟
+        base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
+        base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
+        base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+        base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
+        AsDeleteable().Where(it => 1 == 2)
+            .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+    }
+
+    #endregion
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/ShipmentDetailManager.cs b/MES.Service/service/BasicData/ShipmentDetailManager.cs
new file mode 100644
index 0000000..67c9435
--- /dev/null
+++ b/MES.Service/service/BasicData/ShipmentDetailManager.cs
@@ -0,0 +1,78 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Modes;
+using SqlSugar;
+
+namespace MES.Service.service.BasicData;
+
+public class ShipmentDetailManager : Repository<ShipmentDetail>
+{
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+    //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 ShipmentDetailManager.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()); // 鍒嗛〉鏌ヨ鍔犳帓搴�
+        Console.Write(p.TotalCount); //杩斿洖鎬绘暟
+
+        var conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+        conModels.Add(new ConditionalModel
+        {
+            FieldName = typeof(ShipmentDetail).GetProperties()[0].Name,
+            ConditionalType = ConditionalType.Equal, FieldValue = "1"
+        }); //id=1
+        var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom());
+
+        AsQueryable().Where(x => 1 == 1)
+            .ToList(); //鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+
+        /*********鎻掑叆*********/
+        var insertData = new ShipmentDetail(); //娴嬭瘯鍙傛暟
+        var insertArray = new[] { insertData };
+        base.Insert(insertData); //鎻掑叆
+        base.InsertRange(insertArray); //鎵归噺鎻掑叆
+        var id = base.InsertReturnIdentity(insertData); //鎻掑叆杩斿洖鑷鍒�
+        AsInsertable(insertData).ExecuteCommand(); //鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+        /*********鏇存柊*********/
+        var updateData = new ShipmentDetail(); //娴嬭瘯鍙傛暟
+        var updateArray = new[] { updateData }; //娴嬭瘯鍙傛暟
+        base.Update(updateData); //鏍规嵁瀹炰綋鏇存柊
+        base.UpdateRange(updateArray); //鎵归噺鏇存柊
+        //base.Update(it => new ShipmentDetail() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+        AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+        /*********鍒犻櫎*********/
+        var deldata = new ShipmentDetail(); //娴嬭瘯鍙傛暟
+        base.Delete(deldata); //鏍规嵁瀹炰綋鍒犻櫎
+        base.DeleteById(1); //鏍规嵁涓婚敭鍒犻櫎
+        base.DeleteById(new[] { 1, 2 }); //鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+        base.Delete(it => 1 == 2); //鏍规嵁鏉′欢鍒犻櫎
+        AsDeleteable().Where(it => 1 == 2)
+            .ExecuteCommand(); //杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+    }
+
+    #endregion
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/ShipmentNoticeManager.cs b/MES.Service/service/BasicData/ShipmentNoticeManager.cs
new file mode 100644
index 0000000..c116032
--- /dev/null
+++ b/MES.Service/service/BasicData/ShipmentNoticeManager.cs
@@ -0,0 +1,75 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Dto.webApi;
+using MES.Service.Modes;
+using SqlSugar;
+
+namespace MES.Service.service.BasicData;
+
+public class ShipmentNoticeManager : Repository<ShipmentNotice>
+{
+    private readonly ShipmentDetailManager shipmentDetailManager = new();
+
+    //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+    public bool Save(ErpShipment shipment)
+    {
+        var shipmentNotice = GetShipmentNotice(shipment.ShipmentNotice);
+
+        var shipmentDetails = GetShipmentDetails(shipment.ShipmentDetails);
+        
+        return false;
+    }
+
+    private ShipmentNotice GetShipmentNotice(ErpShipmentNotice notice)
+    {
+        ShipmentNotice entity = new ShipmentNotice();
+
+        entity.Creator = notice.FCreatorId;
+        entity.DocId = notice.FBillNo;
+        entity.Approver = notice.FApproverID;
+
+        if (notice.FCreateDate != null)
+        {
+            entity.CreateDate = DateTime.ParseExact(notice.FCreateDate,
+                "yyyy-MM-dd HH:mm:ss", null);
+        }
+
+        if (notice.FApproveDate != null)
+        {
+            entity.ApproveDate = DateTime.ParseExact(notice.FApproveDate,
+                "yyyy-MM-dd HH:mm:ss", null);
+        }
+        
+        entity.DeptCode = notice.FSaleDeptId;
+        entity.CustCode = notice.FCustomerID;
+        entity.ListNote = notice.FNote;
+        entity.RepCode = notice.FSalesManID;
+
+        return entity;
+    }
+
+    private List<ShipmentDetail> GetShipmentDetails(
+        List<ErpShipmentDetail> shipmentDetails)
+    {
+        return shipmentDetails.Select(s =>
+            {
+                var entity = new ShipmentDetail
+                {
+                    ErpId = s.ErpId,
+                    ErpHeadId = s.ErpHeadId,
+                    ProdCode = s.FMaterialID,
+                    ProdName = s.FMaterialName,
+                    Amount = Convert.ToDouble(s.FAmount),
+                    UnitPrice = Convert.ToDouble(s.FPrice),
+                    Quantity = Convert.ToDouble(s.FQty),
+                    BatchNo = s.FLot,
+                    Remarks = s.FNoteEntry,
+                    OrderNo = s.F_UNW_Text_xsddh,
+                    OrderId = s.FSOEntryId,
+                    BasePrice = Convert.ToDouble(s.FPrice),
+                    WarehouseCode = s.FStockID,
+                    Unit = s.FBaseUnitID
+                };
+                return entity;
+            }).ToList();
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BaseController.cs b/MESApplication/Controllers/BaseController.cs
index d6e161b..22ea012 100644
--- a/MESApplication/Controllers/BaseController.cs
+++ b/MESApplication/Controllers/BaseController.cs
@@ -1,6 +1,5 @@
 锘縰sing System.Dynamic;
 using MES.Service.Dto.service;
-using MES.Service.service;
 using MES.Service.service.QC;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
diff --git a/MESApplication/Controllers/BasicData/SalesOrderController.cs b/MESApplication/Controllers/BasicData/SalesOrderController.cs
new file mode 100644
index 0000000..74cc41f
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesOrderController.cs
@@ -0,0 +1,162 @@
+锘縰sing System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service.BasicData;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+
+namespace MESApplication.Controllers.BasicData;
+
+[ApiController]
+[Route("api/[controller]")]
+public class SalesOrderController : ControllerBase
+{
+    private readonly SalesOrderManager m = new();
+
+
+    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+    /// <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] SalesOrder 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] SalesOrder 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] SalesOrder 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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/SalesOrderDetailController.cs b/MESApplication/Controllers/BasicData/SalesOrderDetailController.cs
new file mode 100644
index 0000000..ad304ba
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesOrderDetailController.cs
@@ -0,0 +1,162 @@
+锘縰sing System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service.BasicData;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+
+namespace MESApplication.Controllers.BasicData;
+
+[ApiController]
+[Route("api/[controller]")]
+public class SalesOrderDetailController : ControllerBase
+{
+    private SalesOrderDetailManager m = new SalesOrderDetailManager();
+
+
+    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+    /// <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] SalesOrderDetail 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] SalesOrderDetail 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] SalesOrderDetail 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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs b/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
new file mode 100644
index 0000000..ba82e5d
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
@@ -0,0 +1,163 @@
+锘縰sing System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service.BasicData;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+
+namespace MESApplication.Controllers.BasicData;
+
+[ApiController]
+[Route("api/[controller]")]
+public class SalesReturnNoticeController : ControllerBase
+{
+    private SalesReturnNoticeManager m = new SalesReturnNoticeManager();
+
+
+    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+    /// <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] SalesReturnNotice 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] SalesReturnNotice 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] SalesReturnNotice 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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs b/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
new file mode 100644
index 0000000..4e8286f
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
@@ -0,0 +1,164 @@
+锘縰sing System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service.BasicData;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+
+namespace MESApplication.Controllers.BasicData;
+
+[ApiController]
+[Route("api/[controller]")]
+public class SalesReturnNoticeDetailController : ControllerBase
+{
+    private SalesReturnNoticeDetailManager m =
+        new SalesReturnNoticeDetailManager();
+
+
+    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+    /// <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] SalesReturnNoticeDetail 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] SalesReturnNoticeDetail 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] SalesReturnNoticeDetail 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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/ShipmentDetailController.cs b/MESApplication/Controllers/BasicData/ShipmentDetailController.cs
new file mode 100644
index 0000000..2a08400
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/ShipmentDetailController.cs
@@ -0,0 +1,162 @@
+锘縰sing System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service.BasicData;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+
+namespace MESApplication.Controllers.BasicData;
+
+[ApiController]
+[Route("api/[controller]")]
+public class ShipmentDetailController : ControllerBase
+{
+    private ShipmentDetailManager m = new ShipmentDetailManager();
+
+
+    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+    /// <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] ShipmentDetail 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] ShipmentDetail 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] ShipmentDetail 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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/ShipmentNoticeController.cs b/MESApplication/Controllers/BasicData/ShipmentNoticeController.cs
new file mode 100644
index 0000000..099ca48
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/ShipmentNoticeController.cs
@@ -0,0 +1,162 @@
+锘縰sing System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service.BasicData;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+
+namespace MESApplication.Controllers.BasicData;
+
+[ApiController]
+[Route("api/[controller]")]
+public class ShipmentNoticeController : ControllerBase
+{
+    private ShipmentNoticeManager m = new ShipmentNoticeManager();
+
+
+    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+    /// <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] ShipmentNotice 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] ShipmentNotice 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] ShipmentNotice 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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/LoginController.cs b/MESApplication/Controllers/LoginController.cs
index f6e73dd..9872e67 100644
--- a/MESApplication/Controllers/LoginController.cs
+++ b/MESApplication/Controllers/LoginController.cs
@@ -1,5 +1,4 @@
 锘縰sing System.Dynamic;
-using MES.Service.Dto;
 using MES.Service.Dto.@base;
 using MES.Service.service;
 using MES.Service.util;
diff --git a/MESApplication/Controllers/RKJController.cs b/MESApplication/Controllers/RKJController.cs
index 54113af..a6bed3d 100644
--- a/MESApplication/Controllers/RKJController.cs
+++ b/MESApplication/Controllers/RKJController.cs
@@ -1,7 +1,6 @@
 锘縰sing System.Dynamic;
 using MES.Service.Dto.service;
 using MES.Service.Modes;
-using MES.Service.service;
 using MES.Service.service.QC;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
diff --git a/MESApplication/Controllers/SJController.cs b/MESApplication/Controllers/SJController.cs
index e5fc8b8..d634958 100644
--- a/MESApplication/Controllers/SJController.cs
+++ b/MESApplication/Controllers/SJController.cs
@@ -1,7 +1,6 @@
 锘縰sing System.Dynamic;
 using MES.Service.Dto.service;
 using MES.Service.Modes;
-using MES.Service.service;
 using MES.Service.service.QC;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
diff --git a/MESApplication/Controllers/SuspendController.cs b/MESApplication/Controllers/SuspendController.cs
index fd0dd34..54e8bfa 100644
--- a/MESApplication/Controllers/SuspendController.cs
+++ b/MESApplication/Controllers/SuspendController.cs
@@ -1,6 +1,5 @@
 锘縰sing System.Dynamic;
 using MES.Service.Dto.service;
-using MES.Service.service;
 using MES.Service.service.QC;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
diff --git a/MESApplication/Controllers/XJController.cs b/MESApplication/Controllers/XJController.cs
index 5950843..93fe18d 100644
--- a/MESApplication/Controllers/XJController.cs
+++ b/MESApplication/Controllers/XJController.cs
@@ -1,7 +1,6 @@
 锘縰sing System.Dynamic;
 using MES.Service.Dto.service;
 using MES.Service.Modes;
-using MES.Service.service;
 using MES.Service.service.QC;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll
index 5890005..05385d8 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 004089e..83bd29f 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 25bb384..1c76424 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 d55d99f..adddc97 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 32b92ef..e90d88c 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/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll
index 5ef17a8..1e5925e 100644
--- a/MESApplication/bin/Release/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Release/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MES.Service.pdb b/MESApplication/bin/Release/net8.0/MES.Service.pdb
index 2edfdce..b92a605 100644
--- a/MESApplication/bin/Release/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Release/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll
index af8e0ea..523437c 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Release/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.exe b/MESApplication/bin/Release/net8.0/MESApplication.exe
index d55d99f..adddc97 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Release/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.pdb b/MESApplication/bin/Release/net8.0/MESApplication.pdb
index fa795c3..3eb6305 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Release/net8.0/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll
index 5ef17a8..1e5925e 100644
--- a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll
+++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
index 2edfdce..b92a605 100644
--- a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
+++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
index af8e0ea..523437c 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe
index d55d99f..adddc97 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
index fa795c3..3eb6305 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
Binary files differ

--
Gitblit v1.9.3