From 579b5c04843d65748f3c60816ee8ec376c178d43 Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期五, 14 二月 2025 20:02:50 +0800
Subject: [PATCH] 泰莱姆销售相关接口字段
---
MES.Service/Modes/SalesReturnNoticeDetail.cs | 210 ++-
MESApplication/bin/Release/net8.0/MESApplication.exe | 0
MESApplication/bin/Release/net8.0/publish/MESApplication.pdb | 0
MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs | 4
MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs | 31
MESApplication/bin/Release/net8.0/MESApplication.deps.json | 5
MESApplication/bin/Release/net8.0/publish/MESApplication.dll | 0
MES.Service/Modes/SalesOrder.cs | 207 ++-
MES.Service/Dto/webApi/ErpSalesOrdeDetailDto.cs | 38
MESApplication/bin/Release/net8.0/MES.Service.dll | 0
MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs | 78 +
MESApplication/bin/Release/net8.0/MESApplication.dll | 0
MESApplication/bin/Release/net8.0/publish/MES.Service.pdb | 0
MES.Service/Dto/webApi/ErpSalesOrder.cs | 8
MESApplication/bin/Release/net8.0/MES.Service.pdb | 0
MESApplication/bin/Release/net8.0/publish/MESApplication.exe | 0
MESApplication/bin/Release/net8.0/MESApplication.pdb | 0
MESApplication/bin/Release/net8.0/publish/MES.Service.dll | 0
MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json | 5
MES.Service/Modes/SalesOrderDetail.cs | 264 +++-
MES.Service/Dto/webApi/ErpSalesDelivery.cs | 10
MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs | 226 ++++
MESApplication/Controllers/BasicData/SalesOrderController.cs | 100 +
MES.Service/Dto/webApi/ErpSalesReturn.cs | 10
MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs | 45
MES.Service/Dto/webApi/ErpSalesOrderDto.cs | 43
MESApplication/MESApplication.csproj.user | 2
MES.Service/Dto/webApi/ErpSalesReturnDto.cs | 42
MES.Service/Modes/SalesDeliveryNotice.cs | 236 ++++
MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user | 4
MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs | 46
MES.Service/bin/Release/net8.0/MES.Service.dll | 0
MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs | 104 +
MES.Service/Modes/SalesDeliveryNoticeDetail.cs | 174 +++
MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs | 2
MES.Service/bin/Release/net8.0/MES.Service.pdb | 0
MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs | 271 +++++
MES.Service/service/BasicData/SalesReturnNoticeManager.cs | 258 +++-
MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs | 169 +++
MES.Service/service/BasicData/SalesOrderManager.cs | 252 +++-
MES.Service/Modes/SalesReturnNotice.cs | 293 ++++-
41 files changed, 2,633 insertions(+), 504 deletions(-)
diff --git a/MES.Service/Dto/webApi/ErpSalesDelivery.cs b/MES.Service/Dto/webApi/ErpSalesDelivery.cs
new file mode 100644
index 0000000..a6559c8
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesDelivery.cs
@@ -0,0 +1,10 @@
+锘縰sing MES.Service.Modes;
+
+namespace MES.Service.Dto.webApi;
+
+public class ErpSalesDelivery
+{
+ public ErpSalesDeliveryDto OrderDto { get; set; }
+
+ public List<ErpSalesDeliveryDetailDto> Items { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs b/MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs
new file mode 100644
index 0000000..60c9165
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesDeliveryDetailDto.cs
@@ -0,0 +1,46 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesDeliveryDetailDto
+{
+ public string? Type { get; set; }
+ public string? F_UNW_Text_xsddh { get; set; } // 閿�鍞鍗曞彿
+ public string? FMaterialId { get; set; } // 鐗╂枡缂栫爜
+ //public string? FMaterialName { get; set; } // 鐗╂枡鍚嶇О
+ //public string? FMaterialModel { get; set; } // 瑙勬牸鍨嬪彿
+ public string? FUnitID { get; set; } // 閿�鍞崟浣�
+ public string? FQty { get; set; } // 閿�鍞暟閲�
+ public string? FIsFree { get; set; } // 鏄惁璧犲搧
+ public string? FDeliverydate { get; set; } // 閫�璐ф棩鏈�
+ public string? FStockId { get; set; } // 浠撳簱
+ public string? FMtoNo { get; set; } // 璁″垝璺熻釜鍙�
+ public string? FLot { get; set; } // 鎵瑰彿
+ //public string? FEntryDescription { get; set; } // 澶囨敞
+ //public string? FRmType { get; set; } // 閫�璐х被鍨�
+ public string? F_UNW_Base_GDY { get; set; } // 璺熷崟鍛�
+ public string? FStockUnitID { get; set; } // 搴撳瓨鍗曚綅
+ public decimal? FStockQty { get; set; } // 搴撳瓨鏁伴噺
+ // public string? FMaterialType { get; set; } // 鐗╂枡绫诲埆
+ public string? FOwnerTypeID { get; set; } // 璐т富绫诲瀷
+ public string? FOwnerId { get; set; } // 璐т富
+ public string? FSrcType { get; set; } // 婧愬崟绫诲瀷
+ public string? FSrcBillNo { get; set; } // 婧愬崟缂栧彿
+ public string? FOrderNo { get; set; } // 璁㈠崟鍗曞彿
+
+ public decimal? FPriceUnitQty { get; set; } // 璁′环鏁伴噺
+ public string? FOwnerIdHead { get; set; } // 璐т富
+
+ public string? FPlanDeliveryDate { get; set; } //璁″垝鍙戣揣鏃ユ湡
+ public string? FOutLmtUnit { get; set; } // 瓒呭彂鎺у埗鍗曚綅
+ public decimal? FOutMaxQty { get; set; } // 鍑哄簱涓婇檺
+ public decimal? FOutMinQty { get; set; } // 鍑哄簱涓嬮檺
+ public string? FDeliveryLoc { get; set; } // 浜よ揣鍦扮偣
+ public string? FDeliveryLAddress { get; set; } // 浜よ揣鍦板潃
+ public string? FTerminationStatus { get; set; } // 缁堟鐘舵��
+ public string? FTerminateDate { get; set; } // 涓氬姟缁堟鏃ユ湡
+ public decimal? FSumOutQty { get; set; } // 绱鍑哄簱鏁伴噺
+ public decimal? FRemainOutQty { get; set; } // 鏈嚭搴撴暟閲�
+
+ public string? ErpID { get; set; } // ERPID
+ public string? EHID { get; set; } // ERP澶碔D
+
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs b/MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs
new file mode 100644
index 0000000..b117617
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesDeliveryDto.cs
@@ -0,0 +1,45 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesDeliveryDto
+{
+ public string? Type { get; set; }
+ public string? ErpID { get; set; } // ERPID
+ public string? FBillTypeID { get; set; } // 鍗曟嵁绫诲瀷
+ public string? FBillNo { get; set; } // 鍗曟嵁缂栧彿
+ public string? FDate { get; set; } // 鏃ユ湡
+ public string? FSettleCurrld { get; set; } // 缁撶畻甯佸埆
+ public string? FSaleDeptId { get; set; } // 閿�鍞儴闂�
+ public string? F_UNW_Text_KHDD { get; set; } // 瀹㈡埛璁㈠崟
+ public string? FCustomerID { get; set; } // 瀹㈡埛
+ public string? F_UNW_LargeText_TBKHBZ { get; set; } // 娣樺疂瀹㈡埛澶囨敞
+ public string? FHeadDeliveryWay { get; set; } // 浜よ揣鏂瑰紡
+ public string? FHeadLocId { get; set; } // 浜よ揣鍦扮偣
+ public string? FCarrierID { get; set; } // 鎵胯繍鍟�
+ public string? FCarriageNO { get; set; } // 杩愯緭鍗曞彿
+ public string? FDeliveryDeptID { get; set; } // 鍙戣揣閮ㄩ棬
+ public string? FStockerGroupId { get; set; } // 搴撳瓨缁�
+ public string? FStockerId { get; set; } // 浠撶鍛�
+ public string? FSaleGroupId { get; set; } // 閿�鍞粍
+ public string? FSalesManId { get; set; } // 閿�鍞憳
+ public string? FReceiveCusId { get; set; } // 鏀惰揣鏂�
+ public string? FReceiveCusContact { get; set; } // 鏀惰揣鏂硅仈绯讳汉
+ public string? FReceiveAddress { get; set; } // 鏀惰揣鏂瑰湴鍧�
+ public string? FLinkMan { get; set; } // 鏀惰揣鏂瑰鍚�
+ public string? FLinkPhone { get; set; } // 鑱旂郴鐢佃瘽
+ public string? FSettleID { get; set; } // 缁撶畻鏂�
+ public string? FPayerID { get; set; } // 浠樻鏂�
+ public string? FCreatorId { get; set; } // 鍒涘缓浜�
+ public string? FCreateDate { get; set; } // 鍒涘缓鏃ユ湡
+ public string? FModifierId { get; set; } // 鏈�鍚庝慨鏀逛汉
+ public string? FModifyDate { get; set; } // 鏈�鍚庝慨鏀规棩鏈�
+ public string? FApproverId { get; set; } // 瀹℃牳浜�
+ public string? FApproveDate { get; set; } // 瀹℃牳鏃ユ湡
+ public string? FCloserId { get; set; } // 鍏抽棴浜�
+ public string? FCloseReason { get; set; } // 鍏抽棴鍘熷洜
+ public string? FBillCloseStatus { get; set; } // 鍏抽棴鐘舵��
+ public string? FCancelStatus { get; set; } // 浣滃簾鐘舵��
+ public string? FCancellerId { get; set; } // 浣滃簾浜�
+ public string? FCancelDate { get; set; } // 浣滃簾鏃ユ湡
+ public string? FDocumentStatus { get; set; } // 鍗曟嵁鐘舵��
+
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesOrdeDetailDto.cs b/MES.Service/Dto/webApi/ErpSalesOrdeDetailDto.cs
new file mode 100644
index 0000000..a3436a2
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesOrdeDetailDto.cs
@@ -0,0 +1,38 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesOrderDetailDto
+{
+ public string? Type { get; set; }
+ public string? FMaterialId { get; set; } // 鐗╂枡缂栫爜
+ public string? FUnitID { get; set; } // 閿�鍞崟浣�
+ public string? FQty { get; set; } // 閿�鍞暟閲�
+ public string? FPriceUnitId { get; set; } // 璁′环鍗曚綅
+ public string? FPriceUnitQty { get; set; } // 璁′环鏁伴噺
+ public string? FDeliveryDate { get; set; } // 瑕佽揣鏃ユ湡
+ public string? FIsFree { get; set; } // 鏄惁璧犲搧
+ public string? F_UNW_Text_xsddh { get; set; } // 閿�鍞鍗曞彿
+ public string? F_UNW_Base_GDY { get; set; } // 璺熷崟鍛�
+ public string? FOwnerTypeId { get; set; } // 璐т富绫诲瀷
+ public string? FOwnerId { get; set; } // 璐т富
+ public string? FEntryNote { get; set; } // 澶囨敞
+ public string? FMtoNo { get; set; } // 璁″垝璺熻釜鍙�
+ public string? FLot { get; set; } // 鎵瑰彿
+ public string? FDeliveryMaxQty { get; set; } // 鍙戣揣涓婇檺
+ public string? FDeliveryMinQty { get; set; } // 鍙戣揣涓嬮檺
+ public string? FOutLmtUnitID { get; set; } // 瓒呭彂鎺у埗鍗曚綅
+ public string? FMrpCloseStatus { get; set; } // 涓氬姟鍏抽棴
+ public string? FMrpTerminateStatus { get; set; } // 涓氬姟缁堟
+ public string? FTerminateDate { get; set; } // 缁堟鏃ユ湡
+ public string? FTerminatorId { get; set; } // 缁堟浜�
+ public string? FSrcType { get; set; } // 婧愬崟绫诲瀷
+ public string? FSrcBillNo { get; set; } // 婧愬崟鍗曞彿
+ public string? FDeliQty { get; set; } // 绱鍙戣揣閫氱煡鏁伴噺
+ public string? FStockOutQty { get; set; } // 绱鍑哄簱鏁伴噺
+ public string? FBaseRetNoticeQty { get; set; } // 绱閫�璐ч�氱煡鏁伴噺锛堥攢鍞熀鏈級
+ public string? FBaseReturnQty { get; set; } // 绱閫�璐ф暟閲忥紙閿�鍞熀鏈級
+ public string? FBaseRemainOutQty { get; set; } // 鍓╀綑鏈嚭鏁伴噺锛堥攢鍞熀鏈級
+ public string? FBASEARQTY { get; set; } // 绱搴旀敹鏁伴噺锛堥攢鍞熀鏈級
+ public string? ErpID { get; set; } // ERPID
+ public string? EHID { get; set; } // ERP澶碔D
+
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesOrder.cs b/MES.Service/Dto/webApi/ErpSalesOrder.cs
new file mode 100644
index 0000000..c9849e6
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesOrder.cs
@@ -0,0 +1,8 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesOrder
+{
+ public ErpSalesOrderDto OrderDto { get; set; }
+
+ public List<ErpSalesOrderDetailDto> Items { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesOrderDto.cs b/MES.Service/Dto/webApi/ErpSalesOrderDto.cs
new file mode 100644
index 0000000..c7eb822
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesOrderDto.cs
@@ -0,0 +1,43 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesOrderDto
+{
+ public string? Type { get; set; }
+ public string? ErpID { get; set; } // ERPID
+ public string? FBillNo { get; set; } // 鍗曟嵁缂栧彿
+ public string? FBillTypeID { get; set; } // 鍗曟嵁绫诲瀷
+ public string? FDocumentStatus { get; set; } // 鍗曟嵁鐘舵��
+ public string? FDate { get; set; } // 鍗曟嵁鏃ユ湡
+ public string? FBusinessType { get; set; } // 涓氬姟绫诲瀷
+ public string? FHeadDeliveryWay { get; set; } // 浜よ揣鏂瑰紡
+ public string? FHEADLOCID { get; set; } // 浜よ揣鍦扮偣
+ public string? F_UNW_Text_KHDD { get; set; } // 瀹㈡埛璁㈠崟
+ public string? F_UNW_Date_KHXQ { get; set; } // 瀹㈡埛闇�姹備氦鏈�
+ public string? F_UNW_BaseProperty_KHDJ { get; set; } // 瀹㈡埛绛夌骇
+ public string? FCustId { get; set; } // 瀹㈡埛
+ public string? F_UNW_LargeText_TBKHBZ { get; set; } // 娣樺疂瀹㈡埛澶囨敞
+ public string? FCloseStatus { get; set; } // 鍏抽棴鐘舵��
+ public string? FSaleDeptId { get; set; } // 閿�鍞儴闂�
+ public string? FSalerId { get; set; } // 閿�鍞憳
+ public string? FChangeReason { get; set; } // 鍙樻洿鍘熷洜
+ public string? FNote { get; set; } // 澶囨敞
+ public string? F_UNW_Remarks_KHJHDD { get; set; } // 瀹㈡埛浜よ揣鍦扮偣
+ public string? FSettleId { get; set; } // 缁撶畻鏂�
+ public string? FApproverId { get; set; } // 瀹℃牳浜�
+ public string? FLinkMan { get; set; } // 鏀惰揣浜哄鍚�
+ public string? FChargeId { get; set; } // 浠樻鏂�
+ public string? FLinkPhone { get; set; } // 鑱旂郴鐢佃瘽
+ public string? FCreatorId { get; set; } // 鍒涘缓浜�
+ public string? FCreateDate { get; set; } // 鍒涘缓鏃ユ湡
+ public string? FModifierId { get; set; } // 鏈�鍚庝慨鏀逛汉
+ public string? FModifyDate { get; set; } // 鏈�鍚庝慨鏀规棩鏈�
+ public string? FApproveDate { get; set; } // 瀹℃牳鏃ユ湡
+ public string? FCloserId { get; set; } // 鍏抽棴浜�
+ public string? FCloseDate { get; set; } // 鍏抽棴鏃ユ湡
+ public string? FChangeDate { get; set; } // 鍙樻洿鏃ユ湡
+ public string? FCancelStatus { get; set; } // 浣滃簾鐘舵��
+ public string? FCancellerId { get; set; } // 浣滃簾浜�
+ public string? FVersionNo { get; set; } // 鐗堟湰鍙�
+ public string? FChangerId { get; set; } // 鍙樻洿浜�
+ public string? FEntryNote { get; set; } // 澶囨敞
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesReturn.cs b/MES.Service/Dto/webApi/ErpSalesReturn.cs
new file mode 100644
index 0000000..9a03469
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesReturn.cs
@@ -0,0 +1,10 @@
+锘縰sing MES.Service.Modes;
+
+namespace MES.Service.Dto.webApi;
+
+public class ErpSalesRerurn
+{
+ public ErpSalesReturnDto OrderDto { get; set; }
+
+ public List<ErpSalesReturnDetailDto> Items { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs b/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs
new file mode 100644
index 0000000..c5547a3
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesReturnDetailDto.cs
@@ -0,0 +1,31 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesReturnDetailDto
+{
+ public string? Type { get; set; }
+ public string? F_UNW_Text_xsddh { get; set; } // 閿�鍞鍗曞彿
+ public string? FMaterialId { get; set; } // 鐗╂枡缂栫爜
+ public string? FMaterialName { get; set; } // 鐗╂枡鍚嶇О
+ public string? FMaterialModel { get; set; } // 瑙勬牸鍨嬪彿
+ public string? FUnitID { get; set; } // 閿�鍞崟浣�
+ public string? FQty { get; set; } // 閿�鍞暟閲�
+ public string? FIsFree { get; set; } // 鏄惁璧犲搧
+ public string? FDeliverydate { get; set; } // 閫�璐ф棩鏈�
+ public string? FStockId { get; set; } // 浠撳簱
+ public string? FMtoNo { get; set; } // 璁″垝璺熻釜鍙�
+ public string? FLot { get; set; } // 鎵瑰彿
+ public string? FEntryDescription { get; set; } // 澶囨敞
+ public string? FRmType { get; set; } // 閫�璐х被鍨�
+ public string? F_UNW_Base_GDY { get; set; } // 璺熷崟鍛�
+ public string? FStockUnitID { get; set; } // 搴撳瓨鍗曚綅
+ public decimal? FStockQty { get; set; } // 搴撳瓨鏁伴噺
+ public string? FMaterialType { get; set; } // 鐗╂枡绫诲埆
+ public string? FOwnerTypeID { get; set; } // 璐т富绫诲瀷
+ public string? FOwnerId { get; set; } // 璐т富
+ public string? FSrcType { get; set; } // 婧愬崟绫诲瀷
+ public string? FSrcBillNo { get; set; } // 婧愬崟缂栧彿
+ public string? FOrderNo { get; set; } // 璁㈠崟鍗曞彿
+ public string? ErpID { get; set; } // ERPID
+ public string? EHID { get; set; } // ERP澶碔D
+
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpSalesReturnDto.cs b/MES.Service/Dto/webApi/ErpSalesReturnDto.cs
new file mode 100644
index 0000000..221f20b
--- /dev/null
+++ b/MES.Service/Dto/webApi/ErpSalesReturnDto.cs
@@ -0,0 +1,42 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpSalesReturnDto
+{
+ public string? Type { get; set; }
+ public string? ErpID { get; set; } // ERPID
+ public string? FBillTypeID { get; set; } // 鍗曟嵁绫诲瀷
+ public string? FBillNo { get; set; } // 鍗曟嵁缂栧彿
+ public string? FDate { get; set; } // 鏃ユ湡
+ public string? FSettleCurrld { get; set; } // 缁撶畻甯佸埆
+ public string? FSaleDeptId { get; set; } // 閿�鍞儴闂�
+ public string? FRetcustId { get; set; } // 閫�璐у鎴�
+ public string? F_UNW_LargeText_TBKHBZ { get; set; } // 娣樺疂瀹㈡埛澶囨敞
+ public string? FRetcustReason { get; set; } // 閫�璐у師鍥�
+ public string? FHeadLocId { get; set; } // 浜よ揣鍦扮偣
+ public string? FRetDeptId { get; set; } // 搴撳瓨閮ㄩ棬
+ public string? FStockerGroupId { get; set; } // 搴撳瓨缁�
+ public string? FStockerId { get; set; } // 浠撶鍛�
+ public string? FSaleGroupId { get; set; } // 閿�鍞粍
+ public string? FSalesManId { get; set; } // 閿�鍞憳
+
+ public string? F_UNW_Text_KDDH { get; set; } // 蹇�掑崟鍙�
+ public string? FReceiveCusId { get; set; } // 鏀惰揣鏂�
+ public string? FReceiveCusContact { get; set; } // 鏀惰揣鏂硅仈绯讳汉
+ public string? FReceiveAddress { get; set; } // 鏀惰揣鏂瑰湴鍧�
+ public string? FLinkMan { get; set; } // 鏀惰揣鏂瑰鍚�
+ public string? FSettleCusId { get; set; } // 缁撶畻鏂�
+ public string? FCreatorId { get; set; } // 鍒涘缓浜�
+ public string? FCreateDate { get; set; } // 鍒涘缓鏃ユ湡
+ public string? FModifierId { get; set; } // 鏈�鍚庝慨鏀逛汉
+ public string? FModifyDate { get; set; } // 鏈�鍚庝慨鏀规棩鏈�
+ public string? FCloserId { get; set; } // 鍏抽棴浜�
+ public string? FCloseReason { get; set; } // 鍏抽棴鍘熷洜
+ public string? FCloseDate { get; set; } // 鍏抽棴鏃ユ湡
+ public string? FApproverId { get; set; } // 瀹℃牳浜�
+ public string? FApproveDate { get; set; } // 瀹℃牳鏃ユ湡
+ public string? FCancelStatus { get; set; } // 浣滃簾鐘舵��
+ public string? FCancellerId { get; set; } // 浣滃簾浜�
+ public string? FCancelDate { get; set; } // 浣滃簾鏃ユ湡
+ public string? FBillCloseStatus { get; set; } // 鍏抽棴鐘舵��
+ public string? FDocumentStatus { get; set; } // 鍗曟嵁鐘舵��
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesDeliveryNotice.cs b/MES.Service/Modes/SalesDeliveryNotice.cs
new file mode 100644
index 0000000..7027191
--- /dev/null
+++ b/MES.Service/Modes/SalesDeliveryNotice.cs
@@ -0,0 +1,236 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace MES.Service.Modes
+{
+ /// <summary>
+ /// 閿�鍞彂璐ч�氱煡鍗�
+ ///</summary>
+ [SugarTable("SALES_DELIVERY_NOTICE")]
+ public class SalesDeliveryNotice
+ {
+ /// <summary>
+ ///
+ ///</summary>
+ [SugarColumn(ColumnName="ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+ public decimal? Id { get; set; }
+ /// <summary>
+ /// 鍗曟嵁绫诲瀷
+ ///</summary>
+ [SugarColumn(ColumnName="BILL_TYPE" )]
+ public string BillType { get; set; }
+ /// <summary>
+ /// 鍗曟嵁缂栧彿
+ ///</summary>
+ [SugarColumn(ColumnName="BILL_NO" )]
+ public string BillNo { get; set; }
+ /// <summary>
+ /// 鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="F_DATE" )]
+ public DateTime? FDate { get; set; }
+ /// <summary>
+ /// 缁撶畻甯佸埆
+ ///</summary>
+ [SugarColumn(ColumnName="CURRENCY" )]
+ public string Currency { get; set; }
+ /// <summary>
+ /// 閿�鍞粍缁�
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_ORG" )]
+ public string SalesOrg { get; set; }
+ /// <summary>
+ /// 閿�鍞儴闂�
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_DEPT" )]
+ public string SalesDept { get; set; }
+ /// <summary>
+ /// 瀹㈡埛璁㈠崟
+ ///</summary>
+ [SugarColumn(ColumnName="CUSTOMER_ORDER_NO" )]
+ public string CustomerOrderNo { get; set; }
+ /// <summary>
+ /// 瀹㈡埛
+ ///</summary>
+ [SugarColumn(ColumnName="CUSTOMER" )]
+ public string Customer { get; set; }
+ /// <summary>
+ /// 娣樺疂瀹㈡埛澶囨敞
+ ///</summary>
+ [SugarColumn(ColumnName="TAOBAO_REMARK" )]
+ public string TaobaoRemark { get; set; }
+ /// <summary>
+ /// 浜よ揣鏂瑰紡
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERY_METHOD" )]
+ public string DeliveryMethod { get; set; }
+ /// <summary>
+ /// 浜よ揣鍦扮偣
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERY_LOCATION" )]
+ public string DeliveryLocation { get; set; }
+ /// <summary>
+ /// 鎵胯繍鍟�
+ ///</summary>
+ [SugarColumn(ColumnName="CARRIER" )]
+ public string Carrier { get; set; }
+ /// <summary>
+ /// 杩愯緭鍗曞彿
+ ///</summary>
+ [SugarColumn(ColumnName="TRANSPORT_NO" )]
+ public string TransportNo { get; set; }
+ /// <summary>
+ /// 鍗曟嵁鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName="BILL_NO_TYPE" )]
+ public string BillNoType { get; set; }
+ /// <summary>
+ /// 鍙戣揣缁勭粐
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERY_ORG" )]
+ public string DeliveryOrg { get; set; }
+ /// <summary>
+ /// 鍙戣揣閮ㄩ棬
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERY_DEPT" )]
+ public string DeliveryDept { get; set; }
+ /// <summary>
+ /// 搴撳瓨缁�
+ ///</summary>
+ [SugarColumn(ColumnName="INVENTORY_GROUP" )]
+ public string InventoryGroup { get; set; }
+ /// <summary>
+ /// 浠撶鍛�
+ ///</summary>
+ [SugarColumn(ColumnName="WAREHOUSE_MANAGER" )]
+ public string WarehouseManager { get; set; }
+ /// <summary>
+ /// 閿�鍞粍
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_GROUP" )]
+ public string SalesGroup { get; set; }
+ /// <summary>
+ /// 閿�鍞憳
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_PERSON" )]
+ public string SalesPerson { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂�
+ ///</summary>
+ [SugarColumn(ColumnName="RECEIVER" )]
+ public string Receiver { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂硅仈绯讳汉
+ ///</summary>
+ [SugarColumn(ColumnName="RECEIVER_CONTACT" )]
+ public string ReceiverContact { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂瑰湴鍧�
+ ///</summary>
+ [SugarColumn(ColumnName="RECEIVER_ADDRESS" )]
+ public string ReceiverAddress { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂瑰鍚�
+ ///</summary>
+ [SugarColumn(ColumnName="RECEIVER_NAME" )]
+ public string ReceiverName { get; set; }
+ /// <summary>
+ /// 鑱旂郴鐢佃瘽
+ ///</summary>
+ [SugarColumn(ColumnName="LINK_PHONE" )]
+ public string LinkPhone { get; set; }
+ /// <summary>
+ /// 缁撶畻鏂�
+ ///</summary>
+ [SugarColumn(ColumnName="SETTLE_PARTY" )]
+ public string SettleParty { get; set; }
+ /// <summary>
+ /// 浠樻鏂�
+ ///</summary>
+ [SugarColumn(ColumnName="PAYER_PARTY" )]
+ public string PayerParty { get; set; }
+ /// <summary>
+ /// 鍒涘缓浜�
+ ///</summary>
+ [SugarColumn(ColumnName="CREATED_BY" )]
+ public string CreatedBy { get; set; }
+ /// <summary>
+ /// 鍒涘缓鏃堕棿
+ ///</summary>
+ [SugarColumn(ColumnName="CREATED_DATE" )]
+ public DateTime? CreatedDate { get; set; }
+ /// <summary>
+ /// 淇敼浜�
+ ///</summary>
+ [SugarColumn(ColumnName="MODIFIED_BY" )]
+ public string ModifiedBy { get; set; }
+ /// <summary>
+ /// 淇敼鏃堕棿
+ ///</summary>
+ [SugarColumn(ColumnName="MODIFIED_DATE" )]
+ public DateTime? ModifiedDate { get; set; }
+ /// <summary>
+ /// 鍏抽棴浜�
+ ///</summary>
+ [SugarColumn(ColumnName="CLOSED_BY" )]
+ public string ClosedBy { get; set; }
+ /// <summary>
+ /// 鍏抽棴鍘熷洜
+ ///</summary>
+ [SugarColumn(ColumnName="CLOSE_REASON" )]
+ public string CloseReason { get; set; }
+ /// <summary>
+ /// 鍏抽棴鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="CLOSE_DATE" )]
+ public DateTime? CloseDate { get; set; }
+ /// <summary>
+ /// 瀹℃牳浜�
+ ///</summary>
+ [SugarColumn(ColumnName="APPROVED_BY" )]
+ public string ApprovedBy { get; set; }
+ /// <summary>
+ /// 瀹℃牳鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="APPROVED_DATE" )]
+ public DateTime? ApprovedDate { get; set; }
+ /// <summary>
+ /// 浣滃簾鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName="CANCEL_STATUS" )]
+ public string CancelStatus { get; set; }
+ /// <summary>
+ /// 浣滃簾浜�
+ ///</summary>
+ [SugarColumn(ColumnName="CANCELLED_BY" )]
+ public string CancelledBy { get; set; }
+ /// <summary>
+ /// 浣滃簾鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="CANCEL_DATE" )]
+ public DateTime? CancelDate { get; set; }
+ /// <summary>
+ /// 鍏抽棴鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName="CLOSE_STATUS" )]
+ public string CloseStatus { get; set; }
+ /// <summary>
+ /// 鏄惁鎵嬪姩鍏抽棴
+ ///</summary>
+ [SugarColumn(ColumnName="MANUAL_CLOSE_FLAG" )]
+ public string ManualCloseFlag { get; set; }
+ /// <summary>
+ /// ERP澶碔D
+ ///</summary>
+ [SugarColumn(ColumnName="ERP_ID" )]
+ public string ErpId { get; set; }
+
+ /// <summary>
+ /// 鍗曟嵁鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_STATUS")]
+ public string BillStatus { get; set; }
+
+ }
+}
diff --git a/MES.Service/Modes/SalesDeliveryNoticeDetail.cs b/MES.Service/Modes/SalesDeliveryNoticeDetail.cs
new file mode 100644
index 0000000..6620ac6
--- /dev/null
+++ b/MES.Service/Modes/SalesDeliveryNoticeDetail.cs
@@ -0,0 +1,174 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace MES.Service.Modes
+{
+ /// <summary>
+ /// 閿�鍞彂璐ч�氱煡鍗曟槑缁嗚〃
+ ///</summary>
+ [SugarTable("SALES_DELIVERY_NOTICE_DETAIL")]
+ public class SalesDeliveryNoticeDetail
+ {
+ /// <summary>
+ ///
+ ///</summary>
+ [SugarColumn(ColumnName="ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+ public decimal? Id { get; set; }
+ /// <summary>
+ /// 閿�鍞鍗曞彿
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_ORDER_ID" )]
+ public string SalesOrderId { get; set; }
+ /// <summary>
+ /// 鐗╂枡缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName="MATERIAL_ID" )]
+ public string MaterialId { get; set; }
+ /// <summary>
+ /// 鐗╂枡鍚嶇О
+ ///</summary>
+ [SugarColumn(ColumnName="MATERIAL_NAME" )]
+ public string MaterialName { get; set; }
+ /// <summary>
+ /// 鐗╂枡瑙勬牸
+ ///</summary>
+ [SugarColumn(ColumnName="MATERIAL_SPECIFICATION" )]
+ public string MaterialSpecification { get; set; }
+ /// <summary>
+ /// 閿�鍞崟浣�
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_UNIT_ID" )]
+ public string SalesUnitId { get; set; }
+ /// <summary>
+ /// 閿�鍞暟閲�
+ ///</summary>
+ [SugarColumn(ColumnName="SALES_QUANTITY" )]
+ public decimal? SalesQuantity { get; set; }
+ /// <summary>
+ /// 鏄惁璧犲搧
+ ///</summary>
+ [SugarColumn(ColumnName="IS_FREE" )]
+ public string IsFree { get; set; }
+ /// <summary>
+ /// 瑕佽揣鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERY_DATE" )]
+ public DateTime? DeliveryDate { get; set; }
+ /// <summary>
+ /// 鍑鸿揣浠撳簱
+ ///</summary>
+ [SugarColumn(ColumnName="WAREHOUSE" )]
+ public string Warehouse { get; set; }
+ /// <summary>
+ /// 璁″垝璺熻釜鍙�
+ ///</summary>
+ [SugarColumn(ColumnName="PLAN_TRACKING_NUMBER" )]
+ public string PlanTrackingNumber { get; set; }
+ /// <summary>
+ /// 鎵瑰彿
+ ///</summary>
+ [SugarColumn(ColumnName="LOT_NUMBER" )]
+ public string LotNumber { get; set; }
+ /// <summary>
+ /// 婧愬崟缂栧彿
+ ///</summary>
+ [SugarColumn(ColumnName="SRC_BILL_NO" )]
+ public string SrcBillNo { get; set; }
+ /// <summary>
+ /// 璁′环鏁伴噺
+ ///</summary>
+ [SugarColumn(ColumnName="PRICE_QTY" )]
+ public decimal? PriceQty { get; set; }
+ /// <summary>
+ /// 璐т富
+ ///</summary>
+ [SugarColumn(ColumnName="OWNER_ID" )]
+ public string OwnerId { get; set; }
+ /// <summary>
+ /// 搴撳瓨鍗曚綅
+ ///</summary>
+ [SugarColumn(ColumnName="INVENTORY_UNIT" )]
+ public string InventoryUnit { get; set; }
+ /// <summary>
+ /// 搴撳瓨鏁伴噺
+ ///</summary>
+ [SugarColumn(ColumnName="INVENTORY_QUANTITY" )]
+ public decimal? InventoryQuantity { get; set; }
+ /// <summary>
+ /// 鐗╂枡绫诲埆
+ ///</summary>
+ [SugarColumn(ColumnName="MATERIAL_CATEGORY" )]
+ public string MaterialCategory { get; set; }
+ /// <summary>
+ /// 璁″垝鍙戣揣鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="PLAN_DELIVERY_DATE" )]
+ public DateTime? PlanDeliveryDate { get; set; }
+ /// <summary>
+ /// 瓒呭彂鎺у埗鍗曚綅
+ ///</summary>
+ [SugarColumn(ColumnName="OUT_LMT_UNIT" )]
+ public string OutLmtUnit { get; set; }
+ /// <summary>
+ /// 鍑哄簱涓婇檺
+ ///</summary>
+ [SugarColumn(ColumnName="OUT_MAX_QTY" )]
+ public decimal? OutMaxQty { get; set; }
+ /// <summary>
+ /// 鍑哄簱涓嬮檺
+ ///</summary>
+ [SugarColumn(ColumnName="OUT_MIN_QTY" )]
+ public decimal? OutMinQty { get; set; }
+ /// <summary>
+ /// 浜よ揣鍦扮偣
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERY_LOC" )]
+ public string DeliveryLoc { get; set; }
+ /// <summary>
+ /// 浜よ揣鍦板潃
+ ///</summary>
+ [SugarColumn(ColumnName="DELIVERYL_ADDRESS" )]
+ public string DeliverylAddress { get; set; }
+ /// <summary>
+ /// 婧愬崟鍗曞彿
+ ///</summary>
+ [SugarColumn(ColumnName="SOURCE_BILL_NO" )]
+ public string SourceBillNo { get; set; }
+ /// <summary>
+ /// 璁㈠崟鍗曞彿
+ ///</summary>
+ [SugarColumn(ColumnName="ORDER_BILL_NO" )]
+ public string OrderBillNo { get; set; }
+ /// <summary>
+ /// 缁堟鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName="TERMINATION_STATUS" )]
+ public string TerminationStatus { get; set; }
+ /// <summary>
+ /// 缁堟鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName="TERMINATION_DATE" )]
+ public DateTime? TerminationDate { get; set; }
+ /// <summary>
+ /// 绱鍑哄簱鏁伴噺
+ ///</summary>
+ [SugarColumn(ColumnName="SUM_OUT_QTY" )]
+ public decimal? SumOutQty { get; set; }
+ /// <summary>
+ /// 鏈嚭搴撴暟閲�
+ ///</summary>
+ [SugarColumn(ColumnName="REMAIN_OUT_QTY" )]
+ public decimal? RemainOutQty { get; set; }
+ /// <summary>
+ /// ERP琛孖D
+ ///</summary>
+ [SugarColumn(ColumnName="ERP_LINE_ID" )]
+ public string ErpLineId { get; set; }
+ /// <summary>
+ /// ERP澶碔D
+ ///</summary>
+ [SugarColumn(ColumnName="ERP_HEAD_ID" )]
+ public string ErpHeadId { get; set; }
+ }
+}
diff --git a/MES.Service/Modes/SalesOrder.cs b/MES.Service/Modes/SalesOrder.cs
index 304b4ec..26feda0 100644
--- a/MES.Service/Modes/SalesOrder.cs
+++ b/MES.Service/Modes/SalesOrder.cs
@@ -13,101 +13,118 @@
/// </summary>
[SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
IsPrimaryKey = true)]
- public decimal Id { get; set; }
+ 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; }
+ public decimal? ErpID { get; set; } // ERPID
+
+ [SugarColumn(ColumnName = "BILL_NO")]
+ public string? BillNo { get; set; } // 鍗曟嵁缂栧彿
+
+ [SugarColumn(ColumnName = "BILL_TYPE_ID")]
+ public string? BillTypeId { get; set; } // 鍗曟嵁绫诲瀷
+
+ [SugarColumn(ColumnName = "DOCUMENT_STATUS")]
+ public string? DocumentStatus { get; set; } // 鍗曟嵁鐘舵��
+
+ [SugarColumn(ColumnName = "F_DATE")]
+ public DateTime? FDate { get; set; } // 鏃ユ湡
+
+ [SugarColumn(ColumnName = "BUSINESS_TYPE")]
+ public string? BusinessType { get; set; } // 涓氬姟绫诲瀷
+
+ [SugarColumn(ColumnName = "HEAD_DELIVERY_WAY")]
+ public string? HeadDeliveryWay { get; set; } // 浜よ揣鏂瑰紡
+
+ [SugarColumn(ColumnName = "HEAD_LOC_ID")]
+ public string? HeadLocId { get; set; } // 浜よ揣鍦扮偣
+
+ [SugarColumn(ColumnName = "UNW_TEXT_KHDD")]
+ public string? UnWTextKhdd { get; set; } // 瀹㈡埛璁㈠崟
+
+ [SugarColumn(ColumnName = "UNW_DATE_KHXQ")]
+ public DateTime? UnWDateKhxq { get; set; } // 瀹㈡埛闇�姹備氦鏈�
+
+ [SugarColumn(ColumnName = "UNW_BASE_PROPERTY_KHDJ")]
+ public string? UnWBasePropertyKhdj { get; set; } // 瀹㈡埛绛夌骇
+
+ [SugarColumn(ColumnName = "CUST_ID")]
+ public string? CustId { get; set; } // 瀹㈡埛
+
+ [SugarColumn(ColumnName = "UNW_LARGE_TEXT_TBKHBZ")]
+ public string? UnWLargetextTbkhbz { get; set; } // 娣樺疂瀹㈡埛澶囨敞
+
+ [SugarColumn(ColumnName = "CLOSE_STATUS")]
+ public string? CloseStatus { get; set; } // 鍏抽棴鐘舵��
+
+ [SugarColumn(ColumnName = "SALE_DEPT_ID")]
+ public string? SaleDeptId { get; set; } // 閿�鍞儴闂�
+
+ [SugarColumn(ColumnName = "SALER_ID")]
+ public string? SalerId { get; set; } // 閿�鍞憳
+
+ [SugarColumn(ColumnName = "CHANGE_REASON")]
+ public string? ChangeReason { get; set; } // 鍙樻洿鍘熷洜
+
+ [SugarColumn(ColumnName = "NOTE")]
+ public string? Note { get; set; } // 澶囨敞
+
+ [SugarColumn(ColumnName = "UNW_REMARKS_KHJHDD")]
+ public string? UnWRemarksKhjHdd { get; set; } // 瀹㈡埛浜よ揣鍦扮偣
+
+ [SugarColumn(ColumnName = "SETTLE_ID")]
+ public string? SettleId { get; set; } // 缁撶畻鏂�
+
+ [SugarColumn(ColumnName = "APPROVER_ID")]
+ public string? ApproverId { get; set; } // 瀹℃牳浜�
+
+ [SugarColumn(ColumnName = "LINK_MAN")]
+ public string? LinkMan { get; set; } // 鏀惰揣浜哄鍚�
+
+ [SugarColumn(ColumnName = "CHARGE_ID")]
+ public string? ChargeId { get; set; } // 浠樻鏂�
+
+ [SugarColumn(ColumnName = "LINK_PHONE")]
+ public string? LinkPhone { get; set; } // 鑱旂郴鐢佃瘽
+
+ [SugarColumn(ColumnName = "CREATOR_ID")]
+ public string? CreatorId { get; set; } // 鍒涘缓浜�
+
+ [SugarColumn(ColumnName = "CREATE_DATE")]
+ public DateTime? CreateDate { get; set; } // 鍒涘缓鏃ユ湡
+
+ [SugarColumn(ColumnName = "MODIFIER_ID")]
+ public string? ModifierId { get; set; } // 鏈�鍚庝慨鏀逛汉
+
+ [SugarColumn(ColumnName = "MODIFY_DATE")]
+ public DateTime? ModifyDate { get; set; } // 鏈�鍚庝慨鏀规棩鏈�
+
+ [SugarColumn(ColumnName = "APPROVE_DATE")]
+ public DateTime? ApproveDate { get; set; } // 瀹℃牳鏃ユ湡
+
+ [SugarColumn(ColumnName = "CLOSER_ID")]
+ public string? CloserId { get; set; } // 鍏抽棴浜�
+
+ [SugarColumn(ColumnName = "CLOSE_DATE")]
+ public DateTime? CloseDate { get; set; } // 鍏抽棴鏃ユ湡
+
+ [SugarColumn(ColumnName = "CHANGE_DATE")]
+ public DateTime? ChangeDate { get; set; } // 鍙樻洿鏃ユ湡
+
+ [SugarColumn(ColumnName = "CANCEL_STATUS")]
+ public string? CancelStatus { get; set; } // 浣滃簾鐘舵��
+
+ [SugarColumn(ColumnName = "CANCELLER_ID")]
+ public string? CancellerId { get; set; } // 浣滃簾浜�
+
+ [SugarColumn(ColumnName = "VERSION_NO")]
+ public double? VersionNo { get; set; } // 鐗堟湰鍙�
+
+ [SugarColumn(ColumnName = "CHANGER_ID")]
+ public string? ChangerId { get; set; } // 鍙樻洿浜�
+
+ [SugarColumn(ColumnName = "ENTRY_NOTE")]
+ public string? EntryNote { get; set; } // 澶囨敞
+
+
}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesOrderDetail.cs b/MES.Service/Modes/SalesOrderDetail.cs
index 0dd800e..17ae63e 100644
--- a/MES.Service/Modes/SalesOrderDetail.cs
+++ b/MES.Service/Modes/SalesOrderDetail.cs
@@ -16,98 +16,188 @@
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; }
+ public decimal? ErpID { get; set; }
/// <summary>
/// ERP澶碔D
/// </summary>
- [SugarColumn(ColumnName = "ERP_HEAD_ID")]
- public string ErpHeadId { get; set; }
+ [SugarColumn(ColumnName = "E_HID")]
+ public decimal? EHID { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡缂栫爜
+ /// </summary>
+ [SugarColumn(ColumnName = "MATERIAL_ID")]
+ public string? MaterialId { get; set; }
+
+ /// <summary>
+ /// 閿�鍞崟浣�
+ /// </summary>
+ [SugarColumn(ColumnName = "UNIT_ID")]
+ public string? UnitId { get; set; }
+
+ /// <summary>
+ /// 閿�鍞暟閲�
+ /// </summary>
+ [SugarColumn(ColumnName = "QTY")]
+ public decimal? Qty { get; set; }
+
+ /// <summary>
+ /// 璁′环鍗曚綅
+ /// </summary>
+ [SugarColumn(ColumnName = "PRICE_UNIT_ID")]
+ public string? PriceUnitId { get; set; }
+
+ /// <summary>
+ /// 璁′环鏁伴噺
+ /// </summary>
+ [SugarColumn(ColumnName = "PRICE_UNIT_QTY")]
+ public decimal? PriceUnitQty { get; set; }
+
+ /// <summary>
+ /// 瑕佽揣鏃ユ湡
+ /// </summary>
+ [SugarColumn(ColumnName = "DELIVERY_DATE")]
+ public DateTime? DeliveryDate { get; set; }
+
+ /// <summary>
+ /// 鏄惁璧犲搧
+ /// </summary>
+ [SugarColumn(ColumnName = "IS_FREE")]
+ public string? IsFree { get; set; }
+
+ /// <summary>
+ /// 閿�鍞鍗曞彿
+ /// </summary>
+ [SugarColumn(ColumnName = "UNW_TEXT_XSDDH")]
+ public string? SalesOrderNo { get; set; }
+
+ /// <summary>
+ /// 璺熷崟鍛�
+ /// </summary>
+ [SugarColumn(ColumnName = "UNW_BASE_GDY")]
+ public string? SalesFollowUp { get; set; }
+
+ /// <summary>
+ /// 璐т富绫诲瀷
+ /// </summary>
+ [SugarColumn(ColumnName = "OWNER_TYPE_ID")]
+ public string? OwnerTypeId { get; set; }
+
+ /// <summary>
+ /// 璐т富
+ /// </summary>
+ [SugarColumn(ColumnName = "OWNER_ID")]
+ public string? OwnerId { get; set; }
+
+ /// <summary>
+ /// 澶囨敞
+ /// </summary>
+ [SugarColumn(ColumnName = "ENTRY_NOTE")]
+ public string? EntryNote { get; set; }
+
+ /// <summary>
+ /// 璁″垝璺熻釜鍙�
+ /// </summary>
+ [SugarColumn(ColumnName = "MTO_NO")]
+ public string? MtoNo { get; set; }
+
+ /// <summary>
+ /// 鎵瑰彿
+ /// </summary>
+ [SugarColumn(ColumnName = "LOT")]
+ public string? Lot { get; set; }
+
+ /// <summary>
+ /// 鍙戣揣涓婇檺
+ /// </summary>
+ [SugarColumn(ColumnName = "DELIVERY_MAX_QTY")]
+ public decimal? DeliveryMaxQty { get; set; }
+
+ /// <summary>
+ /// 鍙戣揣涓嬮檺
+ /// </summary>
+ [SugarColumn(ColumnName = "DELIVERY_MIN_QTY")]
+ public decimal? DeliveryMinQty { get; set; }
+
+ /// <summary>
+ /// 瓒呭彂鎺у埗鍗曚綅
+ /// </summary>
+ [SugarColumn(ColumnName = "OUT_LMT_UNIT_ID")]
+ public string? OutLmtUnitId { get; set; }
+
+ /// <summary>
+ /// 涓氬姟鍏抽棴
+ /// </summary>
+ [SugarColumn(ColumnName = "MRP_CLOSE_STATUS")]
+ public string? MrpCloseStatus { get; set; }
+
+ /// <summary>
+ /// 涓氬姟缁堟
+ /// </summary>
+ [SugarColumn(ColumnName = "MRP_TERMINATE_STATUS")]
+ public string? MrpTerminateStatus { get; set; }
+
+ /// <summary>
+ /// 缁堟鏃ユ湡
+ /// </summary>
+ [SugarColumn(ColumnName = "TERMINATE_DATE")]
+ public DateTime? TerminateDate { get; set; }
+
+ /// <summary>
+ /// 缁堟浜�
+ /// </summary>
+ [SugarColumn(ColumnName = "TERMINATER_ID")]
+ public string? TerminaterId { get; set; }
+
+ /// <summary>
+ /// 婧愬崟绫诲瀷
+ /// </summary>
+ [SugarColumn(ColumnName = "SRC_TYPE")]
+ public string? SrcType { get; set; }
+
+ /// <summary>
+ /// 婧愬崟鍗曞彿
+ /// </summary>
+ [SugarColumn(ColumnName = "SRC_BILL_NO")]
+ public string? SrcBillNo { get; set; }
+
+ /// <summary>
+ /// 绱鍙戣揣閫氱煡鏁伴噺
+ /// </summary>
+ [SugarColumn(ColumnName = "DELI_QTY")]
+ public decimal? DeliQty { get; set; }
+
+ /// <summary>
+ /// 绱鍑哄簱鏁伴噺
+ /// </summary>
+ [SugarColumn(ColumnName = "STOCK_OUT_QTY")]
+ public decimal? StockOutQty { get; set; }
+
+ /// <summary>
+ /// 绱閫�璐ч�氱煡鏁伴噺锛堥攢鍞熀鏈級
+ [SugarColumn(ColumnName = "BASE_RET_NOTICE_QTY")]
+ public decimal? BaseRetNoticeQty { get; set; } /// </summary>
+
+ /// <summary>
+ /// 绱閫�璐ф暟閲忥紙閿�鍞熀鏈級
+ /// </summary>
+ [SugarColumn(ColumnName = "BASE_RETURN_QTY")]
+ public decimal? BaseReturnQty { get; set; }
+
+ /// <summary>
+ /// 鍓╀綑鏈嚭鏁伴噺锛堥攢鍞熀鏈級
+ /// </summary>
+ [SugarColumn(ColumnName = "BASE_REMAIN_OUT_QTY")]
+ public decimal? BaseRemainOutQty { get; set; }
+
+ /// <summary>
+ /// 绱搴旀敹鏁伴噺锛堥攢鍞熀鏈級
+ /// </summary>
+ [SugarColumn(ColumnName = "BASEARQTY")]
+ public decimal? BASEARQTY { get; set; }
+
}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesReturnNotice.cs b/MES.Service/Modes/SalesReturnNotice.cs
index f3c462d..3ca8eb3 100644
--- a/MES.Service/Modes/SalesReturnNotice.cs
+++ b/MES.Service/Modes/SalesReturnNotice.cs
@@ -1,83 +1,214 @@
-锘縰sing SqlSugar;
-
-namespace MES.Service.Modes;
-
-/// <summary>
-/// 閿�鍞��璐ч�氱煡鍗曡〃
-/// </summary>
-[SugarTable("SALES_RETURN_NOTICE")]
-public class SalesReturnNotice
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace MES.Service.Modes
{
/// <summary>
- /// SEQ_sales
- /// </summary>
- [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
- IsPrimaryKey = true)]
- public decimal Id { get; set; }
-
- /// <summary>
- /// 鍒跺崟浜�
- /// </summary>
- [SugarColumn(ColumnName = "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
+ /// 閿�鍞��璐ч�氱煡鍗曡〃
+ ///</summary>
+ [SugarTable("SALES_RETURN_NOTICE")]
+ public class SalesReturnNotice
+ {
+ /// <summary>
+ ///
+ ///</summary>
+ [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
+ public decimal? Id { get; set; }
+ /// <summary>
+ /// 鍗曟嵁绫诲瀷
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_TYPE")]
+ public string BillType { get; set; }
+ /// <summary>
+ /// 鍗曟嵁缂栧彿
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_NO")]
+ public string BillNo { get; set; }
+ /// <summary>
+ /// 鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName = "F_DATE")]
+ public DateTime? FDate { get; set; }
+ /// <summary>
+ /// 缁撶畻甯佸埆
+ ///</summary>
+ [SugarColumn(ColumnName = "CURRENCY")]
+ public string Currency { get; set; }
+ /// <summary>
+ /// 閿�鍞粍缁�
+ ///</summary>
+ [SugarColumn(ColumnName = "SALES_ORG")]
+ public string SalesOrg { get; set; }
+ /// <summary>
+ /// 閿�鍞儴闂�
+ ///</summary>
+ [SugarColumn(ColumnName = "SALES_DEPT")]
+ public string SalesDept { get; set; }
+ /// <summary>
+ /// 瀹㈡埛璁㈠崟
+ ///</summary>
+ [SugarColumn(ColumnName = "CUSTOMER_ORDER_NO")]
+ public string CustomerOrderNo { get; set; }
+ /// <summary>
+ /// 閫�璐у鎴�
+ ///</summary>
+ [SugarColumn(ColumnName = "RETURN_CUSTOMER")]
+ public string ReturnCustomer { get; set; }
+ /// <summary>
+ /// 娣樺疂瀹㈡埛澶囨敞
+ ///</summary>
+ [SugarColumn(ColumnName = "TAOBAO_REMARK")]
+ public string TaobaoRemark { get; set; }
+ /// <summary>
+ /// 閫�璐у師鍥�
+ ///</summary>
+ [SugarColumn(ColumnName = "RETURN_REASON")]
+ public string ReturnReason { get; set; }
+ /// <summary>
+ /// 浜よ揣鍦扮偣
+ ///</summary>
+ [SugarColumn(ColumnName = "DELIVERY_LOCATION")]
+ public string DeliveryLocation { get; set; }
+ /// <summary>
+ /// 搴撳瓨缁勭粐
+ ///</summary>
+ [SugarColumn(ColumnName = "INVENTORY_ORG")]
+ public string InventoryOrg { get; set; }
+ /// <summary>
+ /// 搴撳瓨閮ㄩ棬
+ ///</summary>
+ [SugarColumn(ColumnName = "INVENTORY_DEPT")]
+ public string InventoryDept { get; set; }
+ /// <summary>
+ /// 搴撳瓨缁�
+ ///</summary>
+ [SugarColumn(ColumnName = "INVENTORY_GROUP")]
+ public string InventoryGroup { get; set; }
+ /// <summary>
+ /// 浠撶鍛�
+ ///</summary>
+ [SugarColumn(ColumnName = "WAREHOUSE_MANAGER")]
+ public string WarehouseManager { get; set; }
+ /// <summary>
+ /// 閿�鍞粍
+ ///</summary>
+ [SugarColumn(ColumnName = "SALES_GROUP")]
+ public string SalesGroup { get; set; }
+ /// <summary>
+ /// 閿�鍞憳
+ ///</summary>
+ [SugarColumn(ColumnName = "SALES_PERSON")]
+ public string SalesPerson { get; set; }
+ /// <summary>
+ /// 蹇�掑崟鍙�
+ ///</summary>
+ [SugarColumn(ColumnName = "EXPRESS_NO")]
+ public string ExpressNo { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂�
+ ///</summary>
+ [SugarColumn(ColumnName = "RECEIVER")]
+ public string Receiver { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂硅仈绯讳汉
+ ///</summary>
+ [SugarColumn(ColumnName = "RECEIVER_CONTACT")]
+ public string ReceiverContact { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂瑰湴鍧�
+ ///</summary>
+ [SugarColumn(ColumnName = "RECEIVER_ADDRESS")]
+ public string ReceiverAddress { get; set; }
+ /// <summary>
+ /// 鏀惰揣鏂瑰鍚�
+ ///</summary>
+ [SugarColumn(ColumnName = "RECEIVER_NAME")]
+ public string ReceiverName { get; set; }
+ /// <summary>
+ /// 缁撶畻鏂�
+ ///</summary>
+ [SugarColumn(ColumnName = "SETTLE_PARTY")]
+ public string SettleParty { get; set; }
+ /// <summary>
+ /// 鍒涘缓浜�
+ ///</summary>
+ [SugarColumn(ColumnName = "CREATED_BY")]
+ public string CreatedBy { get; set; }
+ /// <summary>
+ /// 鍒涘缓鏃堕棿
+ ///</summary>
+ [SugarColumn(ColumnName = "CREATED_DATE")]
+ public DateTime? CreatedDate { get; set; }
+ /// <summary>
+ /// 淇敼浜�
+ ///</summary>
+ [SugarColumn(ColumnName = "MODIFIED_BY")]
+ public string ModifiedBy { get; set; }
+ /// <summary>
+ /// 淇敼鏃堕棿
+ ///</summary>
+ [SugarColumn(ColumnName = "MODIFIED_DATE")]
+ public DateTime? ModifiedDate { get; set; }
+ /// <summary>
+ /// 鍏抽棴浜�
+ ///</summary>
+ [SugarColumn(ColumnName = "CLOSED_BY")]
+ public string ClosedBy { get; set; }
+ /// <summary>
+ /// 鍏抽棴鍘熷洜
+ ///</summary>
+ [SugarColumn(ColumnName = "CLOSE_REASON")]
+ public string CloseReason { get; set; }
+ /// <summary>
+ /// 鍏抽棴鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName = "CLOSE_DATE")]
+ public DateTime? CloseDate { get; set; }
+ /// <summary>
+ /// 瀹℃牳浜�
+ ///</summary>
+ [SugarColumn(ColumnName = "APPROVED_BY")]
+ public string ApprovedBy { get; set; }
+ /// <summary>
+ /// 瀹℃牳鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName = "APPROVED_DATE")]
+ public DateTime? ApprovedDate { get; set; }
+ /// <summary>
+ /// 浣滃簾鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName = "CANCEL_STATUS")]
+ public string CancelStatus { get; set; }
+ /// <summary>
+ /// 浣滃簾浜�
+ ///</summary>
+ [SugarColumn(ColumnName = "CANCELLED_BY")]
+ public string CancelledBy { get; set; }
+ /// <summary>
+ /// 浣滃簾鏃ユ湡
+ ///</summary>
+ [SugarColumn(ColumnName = "CANCEL_DATE")]
+ public DateTime? CancelDate { get; set; }
+ /// <summary>
+ /// 鍏抽棴鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName = "CLOSE_STATUS")]
+ public string CloseStatus { get; set; }
+ /// <summary>
+ /// 鏄惁鎵嬪姩鍏抽棴
+ ///</summary>
+ [SugarColumn(ColumnName = "MANUAL_CLOSE_FLAG")]
+ public string ManualCloseFlag { get; set; }
+ /// <summary>
+ /// ERP澶碔D
+ ///</summary>
+ [SugarColumn(ColumnName = "ERP_ID")]
+ public string ErpId { get; set; }
+ /// <summary>
+ /// 鍗曟嵁鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName = "BILL_STATUS")]
+ public string BillStatus { get; set; }
+ }
+}
diff --git a/MES.Service/Modes/SalesReturnNoticeDetail.cs b/MES.Service/Modes/SalesReturnNoticeDetail.cs
index 3d64ef4..38d4584 100644
--- a/MES.Service/Modes/SalesReturnNoticeDetail.cs
+++ b/MES.Service/Modes/SalesReturnNoticeDetail.cs
@@ -11,145 +11,151 @@
/// <summary>
/// SEQ_sales
/// </summary>
- [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales",
- IsPrimaryKey = true)]
+ [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_sales", IsPrimaryKey = true)]
public decimal Id { get; set; }
/// <summary>
- /// 鍗曟嵁琛屽彿
- /// </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; }
+ [SugarColumn(ColumnName = "MATERIAL_ID")]
+ public string MaterialId { get; set; }
/// <summary>
- /// 閿�鍞鍗旾D
+ /// 鐗╂枡鍚嶇О
/// </summary>
- [SugarColumn(ColumnName = "SALES_ORDER_DETAIL_ID")]
- public string SalesOrderDetailId { get; set; }
+ [SugarColumn(ColumnName = "MATERIAL_NAME")]
+ public string MaterialName { get; set; }
/// <summary>
- /// 鍩烘湰鍗曚环
+ /// 鐗╂枡瑙勬牸
/// </summary>
- [SugarColumn(ColumnName = "BASE_UNIT_PRICE")]
- public decimal? BaseUnitPrice { get; set; }
+ [SugarColumn(ColumnName = "MATERIAL_SPECIFICATION")]
+ public string MaterialSpecification { get; set; }
/// <summary>
- /// 鍩烘湰鍗曚綅鏁伴噺
+ /// 閿�鍞崟浣�
/// </summary>
- [SugarColumn(ColumnName = "BASE_UNIT_QUANTITY")]
- public decimal? BaseUnitQuantity { get; set; }
+ [SugarColumn(ColumnName = "SALES_UNIT_ID")]
+ public string SalesUnitId { get; set; }
/// <summary>
- /// 浠撳簱浠g爜
+ /// 閿�鍞暟閲�
/// </summary>
- [SugarColumn(ColumnName = "WAREHOUSE_CODE")]
- public string WarehouseCode { get; set; }
+ [SugarColumn(ColumnName = "SALES_QUANTITY")]
+ public decimal SalesQuantity { get; set; }
/// <summary>
- /// 浠撳簱鍚嶇О
+ /// 鏄惁璧犲搧
/// </summary>
- [SugarColumn(ColumnName = "WAREHOUSE_NAME")]
- public string WarehouseName { get; set; }
+ [SugarColumn(ColumnName = "IS_FREE")]
+ public string IsFree { get; set; }
/// <summary>
- /// 鍩烘湰鍗曚綅鍑哄簱鏁伴噺
+ /// 閫�璐ф棩鏈�
/// </summary>
- [SugarColumn(ColumnName = "BASE_UNIT_OUT_QUANTITY")]
- public decimal? BaseUnitOutQuantity { get; set; }
+ [SugarColumn(ColumnName = "RETURN_DATE")]
+ public DateTime? ReturnDate { get; set; }
/// <summary>
- /// 鍗曚綅
+ /// 浠撳簱
/// </summary>
- [SugarColumn(ColumnName = "UNIT")]
- public string Unit { get; set; }
+ [SugarColumn(ColumnName = "WAREHOUSE")]
+ public string Warehouse { get; set; }
/// <summary>
- /// ERPID
+ /// 璁″垝璺熻釜鍙�
/// </summary>
- [SugarColumn(ColumnName = "ERP_ID")]
- public string ErpId { get; set; }
+ [SugarColumn(ColumnName = "PLAN_TRACKING_NUMBER")]
+ public string PlanTrackingNumber { get; set; }
+
+ /// <summary>
+ /// 鎵瑰彿
+ /// </summary>
+ [SugarColumn(ColumnName = "LOT_NUMBER")]
+ public string LotNumber { get; set; }
+
+ /// <summary>
+ /// 澶囨敞
+ /// </summary>
+ [SugarColumn(ColumnName = "NOTE")]
+ public string Note { get; set; }
+
+ /// <summary>
+ /// 閫�璐х被鍨�
+ /// </summary>
+ [SugarColumn(ColumnName = "RETURN_TYPE")]
+ public string ReturnType { get; set; }
+
+ /// <summary>
+ /// 璺熷崟鍛�
+ /// </summary>
+ [SugarColumn(ColumnName = "SALES_CLERK")]
+ public string SalesClerk { get; set; }
+
+ /// <summary>
+ /// 搴撳瓨鍗曚綅
+ /// </summary>
+ [SugarColumn(ColumnName = "INVENTORY_UNIT")]
+ public string InventoryUnit { get; set; }
+
+ /// <summary>
+ /// 搴撳瓨鏁伴噺
+ /// </summary>
+ [SugarColumn(ColumnName = "INVENTORY_QUANTITY")]
+ public decimal InventoryQuantity { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡绫诲埆
+ /// </summary>
+ [SugarColumn(ColumnName = "MATERIAL_CATEGORY")]
+ public string MaterialCategory { get; set; }
+
+ /// <summary>
+ /// 璐т富绫诲瀷
+ /// </summary>
+ [SugarColumn(ColumnName = "OWNER_TYPE_ID")]
+ public string OwnerTypeId { get; set; }
+
+ /// <summary>
+ /// 璐т富
+ /// </summary>
+ [SugarColumn(ColumnName = "OWNER_ID")]
+ public string OwnerId { get; set; }
+
+ /// <summary>
+ /// 婧愬崟绫诲瀷
+ /// </summary>
+ [SugarColumn(ColumnName = "SOURCE_BILL_TYPE")]
+ public string SourceBillType { get; set; }
+
+ /// <summary>
+ /// 婧愬崟鍗曞彿
+ /// </summary>
+ [SugarColumn(ColumnName = "SOURCE_BILL_NO")]
+ public string SourceBillNo { get; set; }
+
+ /// <summary>
+ /// 璁㈠崟鍗曞彿
+ /// </summary>
+ [SugarColumn(ColumnName = "ORDER_BILL_NO")]
+ public string OrderBillNo { get; set; }
+
+ /// <summary>
+ /// ERP琛孖D
+ /// </summary>
+ [SugarColumn(ColumnName = "ERP_LINE_ID")]
+ public string ErpLineId { get; set; }
/// <summary>
/// ERP澶碔D
/// </summary>
[SugarColumn(ColumnName = "ERP_HEAD_ID")]
public string ErpHeadId { get; set; }
+
}
\ No newline at end of file
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll
index f9c19cd..a61914a 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 b9ceea7..e5248a3 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/SalesDeliveryNoticeDetailManager.cs b/MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs
new file mode 100644
index 0000000..d083dde
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesDeliveryNoticeDetailManager.cs
@@ -0,0 +1,78 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using MES.Service.DB;
+using MES.Service.Modes;
+
+namespace MES.Service.service
+{
+public class SalesDeliveryNoticeDetailManager : Repository<SalesDeliveryNoticeDetail>
+{
+
+ //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+ //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesDeliveryNoticeDetailManager.cs
+
+
+ #region 鏁欏鏂规硶
+ /// <summary>
+ /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉�
+ /// </summary>
+ public void Study()
+ {
+
+ /*********鏌ヨ*********/
+
+ var data1 = base.GetById(1);//鏍规嵁ID鏌ヨ
+ var data2 = base.GetList();//鏌ヨ鎵�鏈�
+ var data3 = base.GetList(it => 1 == 1); //鏍规嵁鏉′欢鏌ヨ
+ //var data4 = base.GetSingle(it => 1 == 1);//鏍规嵁鏉′欢鏌ヨ涓�鏉�,濡傛灉瓒呰繃涓�鏉′細鎶ラ敊
+
+ var p = new PageModel() { PageIndex = 1, PageSize = 2 };// 鍒嗛〉鏌ヨ
+ var data5 = base.GetPageList(it => 1 == 1, p);
+ Console.Write(p.TotalCount);//杩斿洖鎬绘暟
+
+ var data6 = base.GetPageList(it => 1 == 1, p, it => SqlFunc.GetRandom(), OrderByType.Asc);// 鍒嗛〉鏌ヨ鍔犳帓搴�
+ Console.Write(p.TotalCount);//杩斿洖鎬绘暟
+
+ List<IConditionalModel> conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴�
+ conModels.Add(new ConditionalModel() { FieldName= typeof(SalesDeliveryNoticeDetail).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
+ var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc);
+
+ base.AsQueryable().Where(x => 1 == 1).ToList();//鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘
+
+
+
+ /*********鎻掑叆*********/
+ var insertData = new SalesDeliveryNoticeDetail() { };//娴嬭瘯鍙傛暟
+ var insertArray = new SalesDeliveryNoticeDetail[] { insertData };
+ base.Insert(insertData);//鎻掑叆
+ base.InsertRange(insertArray);//鎵归噺鎻掑叆
+ var id = base.InsertReturnIdentity(insertData);//鎻掑叆杩斿洖鑷鍒�
+ base.AsInsertable(insertData).ExecuteCommand();//鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆
+
+
+
+ /*********鏇存柊*********/
+ var updateData = new SalesDeliveryNoticeDetail() { };//娴嬭瘯鍙傛暟
+ var updateArray = new SalesDeliveryNoticeDetail[] { updateData };//娴嬭瘯鍙傛暟
+ base.Update(updateData);//鏍规嵁瀹炰綋鏇存柊
+ base.UpdateRange(updateArray);//鎵归噺鏇存柊
+ //base.Update(it => new SalesDeliveryNoticeDetail() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1
+ base.AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏�
+
+
+
+ /*********鍒犻櫎*********/
+ var deldata = new SalesDeliveryNoticeDetail() { };//娴嬭瘯鍙傛暟
+ base.Delete(deldata);//鏍规嵁瀹炰綋鍒犻櫎
+ base.DeleteById(1);//鏍规嵁涓婚敭鍒犻櫎
+ base.DeleteById(new int[] { 1,2});//鏍规嵁涓婚敭鏁扮粍鍒犻櫎
+ base.Delete(it=>1==2);//鏍规嵁鏉′欢鍒犻櫎
+ base.AsDeleteable().Where(it=>1==2).ExecuteCommand();//杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣�
+ }
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs b/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs
new file mode 100644
index 0000000..99f79d2
--- /dev/null
+++ b/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs
@@ -0,0 +1,226 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using MES.Service.DB;
+using MES.Service.Modes;
+using MES.Service.Dto.webApi;
+using MES.Service.service.BasicData;
+using System.Globalization;
+
+namespace MES.Service.service
+{
+ public class SalesDeliveryNoticeManager : Repository<SalesDeliveryNotice>
+ {
+
+ //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
+
+ private readonly SalesDeliveryNoticeDetailManager _SalesDeliveryDetailManager =
+ new();
+ //ErpSalesRerurn
+ public bool Save(ErpSalesDelivery SalesDelivery)
+ {
+ var erpSalesDeliveryDto = SalesDelivery.OrderDto;
+ var mesSalesDelivery = ConvertErpToSalesDelivery(SalesDelivery.OrderDto);
+ var mesSalesDeliveryDatas = ConvertErpToSalesDeliveryDetail(SalesDelivery.Items);
+
+ return UseTransaction(db =>
+ {
+ switch (erpSalesDeliveryDto.Type)
+ {
+ // case "2":
+ // return InsertData(db, mesSalesReturn, mesSalesReturnDatas,
+ // rohInErpRohIn.FBILLTYPE)
+ // ? 1
+ // : 0;
+ case "3":
+ return UpdateData(db, mesSalesDelivery, mesSalesDeliveryDatas) ? 1 : 0;
+ case "2":
+ case "4":
+ return SaveOrUpdateData(db, mesSalesDelivery, mesSalesDeliveryDatas, erpSalesDeliveryDto.Type)
+ ? 1
+ : 0;
+ default:
+ throw new NotImplementedException(
+ $"type娌℃湁{erpSalesDeliveryDto.Type}杩欎釜绫诲瀷");
+ }
+ }) > 0;
+ }
+
+ private bool UpdateData(SqlSugarScope db, SalesDeliveryNotice mesSalesDelivery,
+ List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas)
+ {
+ var decimals = mesSalesDeliveryDatas.Select(s => s.Id).ToArray();
+ var update = base.DeleteById(mesSalesDelivery.Id);
+ var insertOrUpdate = db
+ .Deleteable<SalesDeliveryNoticeDetail>().In(decimals)
+ .ExecuteCommand() > 0;
+
+ if (update && insertOrUpdate) return true;
+ throw new NotImplementedException("鏇存柊澶辫触");
+ }
+
+ // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
+ private bool SaveOrUpdateData(SqlSugarScope db, SalesDeliveryNotice mesSalesDelivery,
+ List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas, string type)
+ {
+ if (mesSalesDelivery.Id != null) base.DeleteById(mesSalesDelivery.Id);
+
+ if (mesSalesDeliveryDatas.Count > 0)
+ db.Deleteable<SalesDeliveryNoticeDetail>()
+ .Where(s => s.ErpHeadId == mesSalesDelivery.ErpId).ExecuteCommand();
+
+ var orUpdate = base.Insert(mesSalesDelivery);
+ var baOrUpdate = _SalesDeliveryDetailManager.InsertRange(mesSalesDeliveryDatas);
+ if (orUpdate && baOrUpdate) return true;
+
+
+ throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
+ }
+
+ // 鎵归噺淇濆瓨璁板綍鐨勬柟娉�
+ public bool SaveList(List<ErpSalesDelivery> salesOrder)
+ {
+ var result = salesOrder.Select(Save).ToList();
+ return result.All(b => b);
+ }
+
+ private SalesDeliveryNotice ConvertErpToSalesDelivery(
+ ErpSalesDeliveryDto erpDto)
+ {
+ DateTime parsedDate;
+
+ // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+ DateTime? ParseDateTime(string dateStr)
+ {
+ if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate))
+ return parsedDate;
+
+ return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+ }
+
+ var salesOrder = new SalesDeliveryNotice
+ {
+ BillNo = erpDto.FBillNo,
+ ErpId = erpDto.ErpID,
+ FDate = ParseDateTime(erpDto.FDate) ?? null,
+ BillType = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷
+ Currency = erpDto.FSettleCurrld, // 缁撶畻甯佸埆
+ SalesDept = erpDto.FSaleDeptId, //閿�鍞儴闂�
+ CustomerOrderNo = erpDto.F_UNW_Text_KHDD, // 瀹㈡埛璁㈠崟
+ Customer = erpDto.FCustomerID, // 瀹㈡埛
+ TaobaoRemark = erpDto.F_UNW_LargeText_TBKHBZ, // 娣樺疂瀹㈡埛澶囨敞
+ DeliveryMethod = erpDto.FHeadDeliveryWay, // 浜よ揣鏂瑰紡
+ DeliveryLocation = erpDto.FHeadLocId, // 浜よ揣鍦扮偣
+ Carrier = erpDto.FCarrierID, // 鎵胯繍鍟�
+ TransportNo = erpDto.FCarriageNO, // 杩愯緭鍗曞彿
+ BillNoType = erpDto.FCarriageNO, // 鍗曟嵁鐘舵��
+ DeliveryDept = erpDto.FDeliveryDeptID, // 鍙戣揣閮ㄩ棬
+ InventoryGroup = erpDto.FStockerGroupId, // 搴撳瓨缁�
+ WarehouseManager = erpDto.FStockerId, // 浠撶鍛�
+ SalesGroup = erpDto.FSaleGroupId, // 閿�鍞粍
+ SalesPerson = erpDto.FSalesManId,//閿�鍞憳
+ Receiver = erpDto.FReceiveCusId, // 鏀惰揣鏂�
+ ReceiverContact = erpDto.FReceiveCusContact, // 鏀惰揣鏂硅仈绯讳汉
+ ReceiverAddress = erpDto.FReceiveAddress, // 鏀惰揣鏂瑰湴鍧�
+ ReceiverName = erpDto.FLinkMan, // 鏀惰揣鏂瑰鍚�
+ LinkPhone = erpDto.FLinkPhone,//鑱旂郴鐢佃瘽
+ SettleParty = erpDto.FSettleID, // 缁撶畻鏂�
+ PayerParty = erpDto.FPayerID,//浠樻鏂�
+ CreatedBy = erpDto.FCreatorId, // 鍒涘缓浜�
+ CreatedDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃堕棿
+ ModifiedBy = erpDto.FModifierId, // 淇敼浜�
+ ModifiedDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 淇敼鏃堕棿
+ ClosedBy = erpDto.FCloserId, // 鍏抽棴浜�
+ CloseReason = erpDto.FCloseReason, // 鍏抽棴鍘熷洜
+ // CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡
+ ApprovedBy = erpDto.FApproverId, // 瀹℃牳浜�
+ ApprovedDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡
+ CancelStatus = erpDto.FCancelStatus, // 浣滃簾鐘舵��
+ CancelledBy = erpDto.FCancellerId, // 浣滃簾浜�
+ CancelDate = ParseDateTime(erpDto.FCancelDate) ?? null, // 浣滃簾鏃ユ湡
+ CloseStatus = erpDto.FBillCloseStatus, // 鍏抽棴鐘舵��
+ BillStatus = erpDto.FDocumentStatus //鍗曟嵁鐘舵��
+
+ };
+
+ var single = base.GetSingle(it => it.ErpId == erpDto.ErpID);
+ if (single != null) salesOrder.Id = single.Id;
+
+ return salesOrder;
+ }
+
+ private List<SalesDeliveryNoticeDetail> ConvertErpToSalesDeliveryDetail(
+ List<ErpSalesDeliveryDetailDto> erpDtoList)
+
+ {
+ var salesOrderSubList =
+ new List<SalesDeliveryNoticeDetail>();
+
+ DateTime parsedDate;
+ // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+ DateTime? ParseDateTime(string dateStr)
+ {
+ if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate))
+ return parsedDate;
+
+ return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+ }
+
+
+
+ foreach (var erpDto in erpDtoList)
+ {
+ var salesOrderSub = new SalesDeliveryNoticeDetail
+ {
+ ErpLineId = erpDto.ErpID,//ERP琛孖D
+ ErpHeadId = erpDto.EHID,//ERP澶碔D
+ SalesOrderId = erpDto.F_UNW_Text_xsddh,//閿�鍞鍗曞彿
+ MaterialId = erpDto.FMaterialId,//鐗╂枡缂栧彿
+ // MaterialName = erpDto.FMaterialName,// 鐗╂枡鍚嶇О
+ //MaterialSpecification = erpDto.FMaterialModel,//瑙勬牸鍨嬪彿
+ SalesUnitId = erpDto.FUnitID,//閿�鍞崟浣�
+ SalesQuantity = Convert.ToDecimal(erpDto.FQty),//閿�鍞暟閲�
+ IsFree = erpDto.FIsFree,//鏄惁璧犲搧
+ DeliveryDate = ParseDateTime(erpDto.FDeliverydate),//瑕佽揣鏃ユ湡
+ Warehouse = erpDto.FStockId,//鍑鸿揣浠撳簱
+ PlanTrackingNumber = erpDto.FMtoNo,//璁″垝璺熻釜鍙�
+ LotNumber = erpDto.FLot,//鎵瑰彿
+ SrcBillNo = erpDto.FSrcBillNo,//婧愬崟缂栧彿
+ PriceQty = erpDto.FPriceUnitQty,//璁′环鏁伴噺
+ OwnerId = erpDto.FOwnerIdHead,//璐т富
+ InventoryUnit = erpDto.FStockUnitID,//搴撳瓨鍗曚綅
+ InventoryQuantity = Convert.ToDecimal(erpDto.FStockQty),//搴撳瓨鏁伴噺
+ //MaterialCategory = erpDto.FMaterialType,//鐗╂枡绫诲埆
+ PlanDeliveryDate = ParseDateTime(erpDto.FPlanDeliveryDate),//璁″垝鍙戣揣鏃ユ湡
+ OutLmtUnit = erpDto.FOutLmtUnit,//瓒呭彂鎺у埗鍗曚綅
+ OutMaxQty = erpDto.FOutMaxQty,//鍑哄簱涓婇檺
+ OutMinQty = erpDto.FOutMinQty,//鍑哄簱涓嬮檺
+ DeliveryLoc = erpDto.FDeliveryLoc,//浜よ揣鍦扮偣
+ DeliverylAddress = erpDto.FDeliveryLAddress,//浜よ揣鍦板潃
+ SourceBillNo = erpDto.FSrcBillNo,//鍘熷崟鍗曞彿
+ OrderBillNo = erpDto.FOrderNo,//璁㈠崟鍗曞彿
+ TerminationStatus = erpDto.FTerminationStatus,//缁堟鐘舵��
+ TerminationDate = ParseDateTime(erpDto.FTerminateDate),//涓氬姟缁堟鏃ユ湡
+ SumOutQty = erpDto.FSumOutQty,//绱鍑哄簱鏁伴噺
+ RemainOutQty = erpDto.FRemainOutQty//鏈嚭搴撴暟閲�
+
+ };
+
+ var single = _SalesDeliveryDetailManager.GetSingle(it =>
+ it.ErpLineId == salesOrderSub.ErpLineId);
+ if (single != null) salesOrderSub.Id = single.Id;
+
+ salesOrderSubList.Add(salesOrderSub);
+ }
+
+ return salesOrderSubList;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesOrderManager.cs b/MES.Service/service/BasicData/SalesOrderManager.cs
index b466f00..228cf5c 100644
--- a/MES.Service/service/BasicData/SalesOrderManager.cs
+++ b/MES.Service/service/BasicData/SalesOrderManager.cs
@@ -1,6 +1,10 @@
锘縰sing MES.Service.DB;
+using System.Data;
+using System.Globalization;
+using MES.Service.Dto.webApi;
using MES.Service.Modes;
using SqlSugar;
+using DbType = System.Data.DbType;
namespace MES.Service.service.BasicData;
@@ -8,71 +12,195 @@
{
//褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
- //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesOrderManager.cs
-
-
- #region 鏁欏鏂规硶
-
- /// <summary>
- /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉�
- /// </summary>
- public void Study()
+ private readonly SalesOrderDetailManager _SalesOrderDetailManager =
+ new();
+ //ErpSalesOrder
+ public bool Save(ErpSalesOrder SalesOrder)
{
- /*********鏌ヨ*********/
+ var erpSalesOrderDto = SalesOrder.OrderDto;
+ var mesSalesOrder = ConvertErpToSalesOrder(SalesOrder.OrderDto);
+ var mesSalesOrderDatas = ConvertErpToSalesOrderDetail(SalesOrder.Items);
- 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
+ return UseTransaction(db =>
{
- 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瀹炵幇澶嶆潅鐨勬搷浣�
+ switch (erpSalesOrderDto.Type)
+ {
+ // case "2":
+ // return InsertData(db, mesSalesOrder, mesSalesOrderDatas,
+ // rohInErpRohIn.FBILLTYPE)
+ // ? 1
+ // : 0;
+ case "3":
+ return UpdateData(db, mesSalesOrder, mesSalesOrderDatas) ? 1 : 0;
+ case "2":
+ case "4":
+ return SaveOrUpdateData(db, mesSalesOrder, mesSalesOrderDatas, erpSalesOrderDto.Type)
+ ? 1
+ : 0;
+ default:
+ throw new NotImplementedException(
+ $"type娌℃湁{erpSalesOrderDto.Type}杩欎釜绫诲瀷");
+ }
+ }) > 0;
}
- #endregion
+ private bool UpdateData(SqlSugarScope db, SalesOrder mesSalesOrder,
+ List<SalesOrderDetail> mesSalesOrderDatas)
+ {
+ var decimals = mesSalesOrderDatas.Select(s => s.Id).ToArray();
+ var update = base.DeleteById(mesSalesOrder.Id);
+ var insertOrUpdate = db
+ .Deleteable<SalesOrderDetail>().In(decimals)
+ .ExecuteCommand() > 0;
+
+ if (update && insertOrUpdate) return true;
+ throw new NotImplementedException("鏇存柊澶辫触");
+ }
+
+ // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
+ private bool SaveOrUpdateData(SqlSugarScope db, SalesOrder mesSalesOrder,
+ List<SalesOrderDetail> mesSalesOrderDatas,string type)
+ {
+ if (mesSalesOrder.Id != null) base.DeleteById(mesSalesOrder.Id);
+
+ if (mesSalesOrderDatas.Count > 0)
+ db.Deleteable<SalesOrderDetail>()
+ .Where(s => s.EHID == mesSalesOrder.ErpID).ExecuteCommand();
+
+ var orUpdate = base.Insert(mesSalesOrder);
+ var baOrUpdate = _SalesOrderDetailManager.InsertRange(mesSalesOrderDatas);
+ if (orUpdate && baOrUpdate) return true;
+
+
+ throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
+ }
+
+ // 鎵归噺淇濆瓨璁板綍鐨勬柟娉�
+ public bool SaveList(List<ErpSalesOrder> salesOrder)
+ {
+ var result = salesOrder.Select(Save).ToList();
+ return result.All(b => b);
+ }
+
+ private SalesOrder ConvertErpToSalesOrder(
+ ErpSalesOrderDto erpDto)
+ {
+ DateTime parsedDate;
+
+ // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+ DateTime? ParseDateTime(string dateStr)
+ {
+ if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate))
+ return parsedDate;
+
+ return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+ }
+
+ var salesOrder = new SalesOrder
+ {
+ BillNo = erpDto.FBillNo,
+ ErpID = Convert.ToDecimal(erpDto.ErpID),
+ FDate = ParseDateTime(erpDto.FDate) ?? null,
+ BillTypeId = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷
+ DocumentStatus = erpDto.FDocumentStatus, // 鍗曟嵁鐘舵��
+ BusinessType = erpDto.FBusinessType, // 涓氬姟绫诲瀷
+ HeadDeliveryWay = erpDto.FHeadDeliveryWay, // 浜よ揣鏂瑰紡
+ HeadLocId = erpDto.FHEADLOCID, // 浜よ揣鍦扮偣
+ UnWTextKhdd = erpDto.F_UNW_Text_KHDD, // 瀹㈡埛璁㈠崟
+ UnWDateKhxq = ParseDateTime(erpDto.F_UNW_Date_KHXQ) ?? null, // 瀹㈡埛闇�姹備氦鏈�
+ UnWBasePropertyKhdj = erpDto.F_UNW_BaseProperty_KHDJ, // 瀹㈡埛绛夌骇
+ CustId = erpDto.FCustId, // 瀹㈡埛
+ UnWLargetextTbkhbz = erpDto.F_UNW_LargeText_TBKHBZ, // 娣樺疂瀹㈡埛澶囨敞
+ CloseStatus = erpDto.FCloseStatus, // 鍏抽棴鐘舵��
+ SaleDeptId = erpDto.FSaleDeptId, // 閿�鍞儴闂�
+ SalerId = erpDto.FSalerId, // 閿�鍞憳
+ ChangeReason = erpDto.FChangeReason, // 鍙樻洿鍘熷洜
+ Note = erpDto.FNote, // 澶囨敞
+ UnWRemarksKhjHdd = erpDto.F_UNW_Remarks_KHJHDD, // 瀹㈡埛浜よ揣鍦扮偣
+ SettleId = erpDto.FSettleId, // 缁撶畻鏂�
+ ApproverId = erpDto.FApproverId, // 瀹℃牳浜�
+ LinkMan = erpDto.FLinkMan, // 鏀惰揣浜哄鍚�
+ ChargeId = erpDto.FChargeId, // 浠樻鏂�
+ LinkPhone = erpDto.FLinkPhone, // 鑱旂郴鐢佃瘽
+ CreatorId = erpDto.FCreatorId, // 鍒涘缓浜�
+ CreateDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃ユ湡
+ ModifierId = erpDto.FModifierId, // 鏈�鍚庝慨鏀逛汉
+ ModifyDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 鏈�鍚庝慨鏀规棩鏈�
+ ApproveDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡
+ CloserId = erpDto.FCloserId, // 鍏抽棴浜�
+ CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡
+ ChangeDate = ParseDateTime(erpDto.FChangeDate) ?? null, // 鍙樻洿鏃ユ湡
+ CancelStatus = erpDto.FCancelStatus, // 浣滃簾鐘舵��
+ CancellerId = erpDto.FCancellerId, // 浣滃簾浜�
+ VersionNo = Convert.ToDouble(erpDto.FVersionNo), // 鐗堟湰鍙�
+ ChangerId = erpDto.FChangerId, // 鍙樻洿浜�
+ EntryNote = erpDto.FEntryNote // 澶囨敞
+ //ParseDateTime() ?? null
+ //long.Parse()
+ //Convert.ToDecimal()
+ //Convert.ToDouble()
+ };
+
+ var single = base.GetSingle(it => it.ErpID == Convert.ToDecimal(erpDto.ErpID));
+ if (single != null) salesOrder.Id = single.Id;
+
+ return salesOrder;
+ }
+
+ private List<SalesOrderDetail> ConvertErpToSalesOrderDetail(
+ List<ErpSalesOrderDetailDto> erpDtoList)
+ {
+ var salesOrderSubList =
+ new List<SalesOrderDetail>();
+
+ foreach (var erpDto in erpDtoList)
+ {
+ var salesOrderSub = new SalesOrderDetail
+ {
+ ErpID = Convert.ToDecimal(erpDto.ErpID),
+ EHID = Convert.ToDecimal(erpDto.EHID),
+ MaterialId = erpDto.FMaterialId,
+ UnitId = erpDto.FUnitID,
+ Qty = Convert.ToDecimal(erpDto.FQty),
+ PriceUnitId = erpDto.FPriceUnitId,
+ PriceUnitQty = Convert.ToDecimal(erpDto.FPriceUnitQty),
+ DeliveryDate = Convert.ToDateTime(erpDto.FDeliveryDate),
+ IsFree = erpDto.FIsFree,
+ SalesOrderNo = erpDto.F_UNW_Text_xsddh,
+ SalesFollowUp = erpDto.F_UNW_Base_GDY,
+ OwnerTypeId = erpDto.FOwnerTypeId,
+ OwnerId = erpDto.FOwnerId,
+ EntryNote = erpDto.FEntryNote,
+ MtoNo = erpDto.FMtoNo,
+ Lot = erpDto.FLot,
+ DeliveryMaxQty = Convert.ToDecimal(erpDto.FDeliveryMaxQty),
+ DeliveryMinQty = Convert.ToDecimal(erpDto.FDeliveryMinQty),
+ OutLmtUnitId = erpDto.FOutLmtUnitID,
+ MrpCloseStatus = erpDto.FMrpCloseStatus,
+ MrpTerminateStatus = erpDto.FMrpTerminateStatus,
+ TerminateDate = Convert.ToDateTime(erpDto.FTerminateDate),
+ TerminaterId = erpDto.FTerminatorId,
+ SrcType = erpDto.FSrcType,
+ SrcBillNo = erpDto.FSrcBillNo,
+ DeliQty = Convert.ToDecimal(erpDto.FDeliQty),
+ StockOutQty = Convert.ToDecimal(erpDto.FStockOutQty),
+ BaseRetNoticeQty = Convert.ToDecimal(erpDto.FBaseRetNoticeQty),
+ BaseReturnQty = Convert.ToDecimal(erpDto.FBaseReturnQty),
+ BaseRemainOutQty = Convert.ToDecimal(erpDto.FBaseRemainOutQty),
+ BASEARQTY = Convert.ToDecimal(erpDto.FBASEARQTY),
+
+ };
+
+ var single = _SalesOrderDetailManager.GetSingle(it =>
+ it.ErpID == Convert.ToDecimal(salesOrderSub.ErpID));
+ if (single != null) salesOrderSub.Id = single.Id;
+
+ salesOrderSubList.Add(salesOrderSub);
+ }
+
+ return salesOrderSubList;
+ }
}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs b/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs
index 78d4c7b..961ede4 100644
--- a/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs
+++ b/MES.Service/service/BasicData/SalesReturnNoticeDetailManager.cs
@@ -5,7 +5,7 @@
namespace MES.Service.service.BasicData;
public class
- SalesReturnNoticeDetailManager : Repository<SalesReturnNoticeDetail>
+ SalesReturnDetailManager : Repository<SalesReturnNoticeDetail>
{
//褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
diff --git a/MES.Service/service/BasicData/SalesReturnNoticeManager.cs b/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
index 206f0ea..41c8c09 100644
--- a/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
+++ b/MES.Service/service/BasicData/SalesReturnNoticeManager.cs
@@ -1,6 +1,10 @@
锘縰sing MES.Service.DB;
+using System.Data;
+using System.Globalization;
+using MES.Service.Dto.webApi;
using MES.Service.Modes;
using SqlSugar;
+using DbType = System.Data.DbType;
namespace MES.Service.service.BasicData;
@@ -8,71 +12,201 @@
{
//褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉�
- //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 SalesReturnNoticeManager.cs
-
-
- #region 鏁欏鏂规硶
-
- /// <summary>
- /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉�
- /// </summary>
- public void Study()
+ private readonly SalesReturnDetailManager _SalesReturnDetailManager =
+ new();
+ //ErpSalesRerurn
+ public bool Save(ErpSalesRerurn SalesReturn)
{
- /*********鏌ヨ*********/
+ var erpSalesReturnDto = SalesReturn.OrderDto;
+ var mesSalesReturn = ConvertErpToSalesReturn(SalesReturn.OrderDto);
+ var mesSalesReturnDatas = ConvertErpToSalesReturnDetail(SalesReturn.Items);
- 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
+ return UseTransaction(db =>
{
- 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瀹炵幇澶嶆潅鐨勬搷浣�
+ switch (erpSalesReturnDto.Type)
+ {
+ // case "2":
+ // return InsertData(db, mesSalesReturn, mesSalesReturnDatas,
+ // rohInErpRohIn.FBILLTYPE)
+ // ? 1
+ // : 0;
+ case "3":
+ return UpdateData(db, mesSalesReturn, mesSalesReturnDatas) ? 1 : 0;
+ case "2":
+ case "4":
+ return SaveOrUpdateData(db, mesSalesReturn, mesSalesReturnDatas, erpSalesReturnDto.Type)
+ ? 1
+ : 0;
+ default:
+ throw new NotImplementedException(
+ $"type娌℃湁{erpSalesReturnDto.Type}杩欎釜绫诲瀷");
+ }
+ }) > 0;
}
- #endregion
+ private bool UpdateData(SqlSugarScope db, SalesReturnNotice mesSalesReturn,
+ List<SalesReturnNoticeDetail> mesSalesReturnDatas)
+ {
+ var decimals = mesSalesReturnDatas.Select(s => s.Id).ToArray();
+ var update = base.DeleteById(mesSalesReturn.Id);
+ var insertOrUpdate = db
+ .Deleteable<SalesReturnNoticeDetail>().In(decimals)
+ .ExecuteCommand() > 0;
+
+ if (update && insertOrUpdate) return true;
+ throw new NotImplementedException("鏇存柊澶辫触");
+ }
+
+ // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶
+ private bool SaveOrUpdateData(SqlSugarScope db, SalesReturnNotice mesSalesReturn,
+ List<SalesReturnNoticeDetail> mesSalesReturnDatas,string type)
+ {
+ if (mesSalesReturn.Id != null) base.DeleteById(mesSalesReturn.Id);
+
+ if (mesSalesReturnDatas.Count > 0)
+ db.Deleteable<SalesReturnNoticeDetail>()
+ .Where(s => s.ErpHeadId == mesSalesReturn.ErpId).ExecuteCommand();
+
+ var orUpdate = base.Insert(mesSalesReturn);
+ var baOrUpdate = _SalesReturnDetailManager.InsertRange(mesSalesReturnDatas);
+ if (orUpdate && baOrUpdate) return true;
+
+
+ throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�");
+ }
+
+ // 鎵归噺淇濆瓨璁板綍鐨勬柟娉�
+ public bool SaveList(List<ErpSalesRerurn> salesOrder)
+ {
+ var result = salesOrder.Select(Save).ToList();
+ return result.All(b => b);
+ }
+
+ private SalesReturnNotice ConvertErpToSalesReturn(
+ ErpSalesReturnDto erpDto)
+ {
+ DateTime parsedDate;
+
+ // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+ DateTime? ParseDateTime(string dateStr)
+ {
+ if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate))
+ return parsedDate;
+
+ return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+ }
+
+ var salesOrder = new SalesReturnNotice
+ {
+ BillNo = erpDto.FBillNo,
+ ErpId = erpDto.ErpID,
+ FDate = ParseDateTime(erpDto.FDate) ?? null,
+ BillType = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷
+ Currency = erpDto.FSettleCurrld, // 缁撶畻甯佸埆
+ SalesDept = erpDto.FSaleDeptId, //閿�鍞儴闂�
+ ReturnCustomer = erpDto.FRetcustId, // 閫�璐у鎴�
+ TaobaoRemark = erpDto.F_UNW_LargeText_TBKHBZ, // 娣樺疂瀹㈡埛澶囨敞
+ ReturnReason = erpDto.FRetcustReason, // 閫�璐у師鍥�
+ DeliveryLocation = erpDto.FHeadLocId, // 浜よ揣鍦扮偣
+ InventoryDept = erpDto.FRetDeptId, // 搴撳瓨閮ㄩ棬
+ InventoryGroup = erpDto.FStockerGroupId, // 搴撳瓨缁�
+ WarehouseManager = erpDto.FStockerId, // 浠撶鍛�
+ SalesGroup = erpDto.FSaleGroupId, // 閿�鍞粍
+ SalesPerson = erpDto.FSalesManId,//閿�鍞憳
+ ExpressNo = erpDto.F_UNW_Text_KDDH, // 蹇�掑崟鍙�
+ Receiver = erpDto.FReceiveCusId, // 鏀惰揣鏂�
+ ReceiverContact = erpDto.FReceiveCusContact, // 鏀惰揣鏂硅仈绯讳汉
+ ReceiverAddress = erpDto.FReceiveAddress, // 鏀惰揣鏂瑰湴鍧�
+ ReceiverName = erpDto.FLinkMan, // 鏀惰揣鏂瑰鍚�
+ SettleParty = erpDto.FSettleCurrld, // 缁撶畻鏂�
+ CreatedBy = erpDto.FCreatorId, // 鍒涘缓浜�
+ CreatedDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃堕棿
+ ModifiedBy = erpDto.FModifierId, // 淇敼浜�
+ ModifiedDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 淇敼鏃堕棿
+ ClosedBy = erpDto.FCloserId, // 鍏抽棴浜�
+ CloseReason = erpDto.FCloseReason, // 鍏抽棴鍘熷洜
+ CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡
+ ApprovedBy = erpDto.FApproverId, // 瀹℃牳浜�
+ ApprovedDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡
+ CancelStatus = erpDto.FCancelStatus, // 浣滃簾鐘舵��
+ CancelledBy = erpDto.FCancellerId, // 浣滃簾浜�
+ CancelDate = ParseDateTime(erpDto.FCancelDate) ?? null, // 浣滃簾鏃ユ湡
+ CloseStatus = erpDto.FBillCloseStatus, // 鍏抽棴鐘舵��
+ BillStatus = erpDto.FDocumentStatus //鍗曟嵁鐘舵��
+
+ };
+
+ var single = base.GetSingle(it => it.ErpId == erpDto.ErpID);
+ if (single != null) salesOrder.Id = single.Id;
+
+ return salesOrder;
+ }
+
+ private List<SalesReturnNoticeDetail> ConvertErpToSalesReturnDetail(
+ List<ErpSalesReturnDetailDto> erpDtoList)
+
+ {
+ var salesOrderSubList =
+ new List<SalesReturnNoticeDetail>();
+
+ DateTime parsedDate;
+ // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss"
+ DateTime? ParseDateTime(string dateStr)
+ {
+ if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss",
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate))
+ return parsedDate;
+
+ return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
+ }
+
+
+
+ foreach (var erpDto in erpDtoList)
+ {
+ var salesOrderSub = new SalesReturnNoticeDetail
+ {
+ ErpLineId = erpDto.ErpID,//ERP琛孖D
+ ErpHeadId = erpDto.EHID,//ERP澶碔D
+ SalesOrderId = erpDto.F_UNW_Text_xsddh,//閿�鍞鍗曞彿
+ MaterialId = erpDto.FMaterialId,//鐗╂枡缂栧彿
+ MaterialName = erpDto.FMaterialName,// 鐗╂枡鍚嶇О
+ MaterialSpecification = erpDto.FMaterialModel,//瑙勬牸鍨嬪彿
+ SalesUnitId = erpDto.FUnitID,//閿�鍞崟浣�
+ SalesQuantity = Convert.ToDecimal(erpDto.FQty),//閿�鍞暟閲�
+ IsFree = erpDto.FIsFree,//鏄惁璧犲搧
+ ReturnDate = ParseDateTime(erpDto.FDeliverydate),//閫�璐ф棩鏈�
+ Warehouse = erpDto.FStockId,//浠撳簱
+ PlanTrackingNumber = erpDto.FMtoNo,//璁″垝璺熻釜鍙�
+ LotNumber = erpDto.FLot,//鎵瑰彿
+ Note = erpDto.FEntryDescription,//澶囨敞
+ ReturnType = erpDto.FRmType,//閫�璐х被鍨�
+ SalesClerk = erpDto.F_UNW_Base_GDY,//璺熷崟鍛�
+ InventoryUnit = erpDto.FStockUnitID,//搴撳瓨鍗曚綅
+ InventoryQuantity = Convert.ToDecimal(erpDto.FStockQty),//搴撳瓨鏁伴噺
+ MaterialCategory = erpDto.FMaterialType,//鐗╂枡绫诲埆
+ OwnerTypeId = erpDto.FOwnerTypeID,//璐т富绫诲瀷
+ OwnerId = erpDto.FOwnerId,//璐т富
+ SourceBillType = erpDto.FSrcType,
+ SourceBillNo = erpDto.FSrcBillNo,
+ OrderBillNo = erpDto.FOrderNo
+
+ };
+
+ var single = _SalesReturnDetailManager.GetSingle(it =>
+ it.ErpLineId == salesOrderSub.ErpLineId);
+ if (single != null) salesOrderSub.Id = single.Id;
+
+ salesOrderSubList.Add(salesOrderSub);
+ }
+
+ return salesOrderSubList;
+ }
+
+
}
\ No newline at end of file
diff --git a/MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs
new file mode 100644
index 0000000..4605bce
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeController.cs
@@ -0,0 +1,271 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service;
+using MES.Service.util;
+using MES.Service.service.BasicData;
+using MES.Service.Dto.webApi;
+using Newtonsoft.Json;
+
+namespace MESApplication.Controllers
+{
+ [ApiController]
+ [Route("api/[controller]")]
+ public class SalesDeliveryNoticeController : ControllerBase
+ {
+
+
+
+ private readonly MessageCenterManager _manager = new();
+
+ private SalesDeliveryNoticeManager m = new SalesDeliveryNoticeManager();
+
+ private readonly string METHOD = "POST";
+
+ private readonly string TableName = "SALES_DELIVERY_NOTICE";
+
+ private readonly string URL = "http://localhost:10054/api/SalesDeliveryNotice/";
+
+
+ //
+ [HttpPost("Save")]
+ public ResponseResult Save(ErpSalesDelivery salesOrder)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "Save";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(salesOrder);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.Save(salesOrder);
+
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ [HttpPost("SaveList")]
+ public ResponseResult SaveList(List<ErpSalesDelivery> units)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "SaveList";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(units);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.SaveList(units);
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+ /// <summary>
+ /// 鑾峰彇鎵�鏈�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("GetList")]
+ public ResponseResult GetList()
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetList();
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /// <summary>
+ /// 鏍规嵁涓婚敭鑾峰彇
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("GetById")]
+ public ResponseResult GetById(int id)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetById(id);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁涓婚敭鍒犻櫎
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("DeleteByIds")]
+ public ResponseResult DeleteByIds([FromBody] object[] ids)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.DeleteByIds(ids);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 娣诲姞
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("Insert")]
+ public ResponseResult Add([FromBody] SalesDeliveryNotice data)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.Insert(data);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 娣诲姞杩斿洖鑷
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("InsertReturnIdentity")]
+ public ResponseResult InsertReturnIdentity([FromBody] SalesDeliveryNotice data)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.InsertReturnIdentity(data);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 淇敼
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("Update")]
+ public ResponseResult Update([FromBody] SalesDeliveryNotice data)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.Update(data);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ }
+}
diff --git a/MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs
new file mode 100644
index 0000000..935a343
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/SalesDeliveryNoticeDetailController.cs
@@ -0,0 +1,169 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Dynamic;
+using MES.Service.Modes;
+using MES.Service.service;
+using MES.Service.util;
+
+namespace MESApplication.Controllers
+{
+ [ApiController]
+ [Route("api/[controller]")]
+ public class SalesDeliveryNoticeDetailController : ControllerBase
+ {
+
+ private SalesDeliveryNoticeDetailManager m = new SalesDeliveryNoticeDetailManager();
+
+
+ /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+
+ /// <summary>
+ /// 鑾峰彇鎵�鏈�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("GetList")]
+ public ResponseResult GetList()
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetList();
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /// <summary>
+ /// 鏍规嵁涓婚敭鑾峰彇
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("GetById")]
+ public ResponseResult GetById(int id)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetById(id);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁涓婚敭鍒犻櫎
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("DeleteByIds")]
+ public ResponseResult DeleteByIds([FromBody] object[] ids)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.DeleteByIds(ids);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 娣诲姞
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("Insert")]
+ public ResponseResult Add([FromBody] SalesDeliveryNoticeDetail data)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.Insert(data);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 娣诲姞杩斿洖鑷
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("InsertReturnIdentity")]
+ public ResponseResult InsertReturnIdentity([FromBody] SalesDeliveryNoticeDetail data)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.InsertReturnIdentity(data);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 淇敼
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("Update")]
+ public ResponseResult Update([FromBody] SalesDeliveryNoticeDetail data)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.Update(data);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ }
+}
diff --git a/MESApplication/Controllers/BasicData/SalesOrderController.cs b/MESApplication/Controllers/BasicData/SalesOrderController.cs
index 74cc41f..3505f28 100644
--- a/MESApplication/Controllers/BasicData/SalesOrderController.cs
+++ b/MESApplication/Controllers/BasicData/SalesOrderController.cs
@@ -1,5 +1,8 @@
锘縰sing System.Dynamic;
+using MES.Service.Dto.webApi;
+using Newtonsoft.Json;
using MES.Service.Modes;
+using MES.Service.service;
using MES.Service.service.BasicData;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
@@ -10,10 +13,105 @@
[Route("api/[controller]")]
public class SalesOrderController : ControllerBase
{
+ private readonly MessageCenterManager _manager = new();
+
private readonly SalesOrderManager m = new();
+ private readonly string METHOD = "POST";
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
+ private readonly string TableName = "SALES_ORDER";
+
+ private readonly string URL =
+ "http://localhost:10054/api/SalesOrder/";
+
+
+ //
+ [HttpPost("Save")]
+ public ResponseResult Save(ErpSalesOrder salesOrder)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "Save";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(salesOrder);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.Save(salesOrder);
+
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ [HttpPost("SaveList")]
+ public ResponseResult SaveList(List<ErpSalesOrder> units)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "SaveList";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(units);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.SaveList(units);
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
/// <summary>
/// 鑾峰彇鎵�鏈�
diff --git a/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs b/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
index 8df7421..bc5249d 100644
--- a/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
+++ b/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
@@ -1,8 +1,11 @@
锘縰sing System.Dynamic;
+using MES.Service.Dto.webApi;
using MES.Service.Modes;
+using MES.Service.service;
using MES.Service.service.BasicData;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
namespace MESApplication.Controllers.BasicData;
@@ -10,8 +13,109 @@
[Route("api/[controller]")]
public class SalesReturnNoticeController : ControllerBase
{
+ private readonly MessageCenterManager _manager = new();
+
private readonly SalesReturnNoticeManager m = new();
+ private readonly string METHOD = "POST";
+
+ private readonly string TableName = "SALES_RETURN_NOTICE";
+
+ private readonly string URL = "http://localhost:10054/api/SalesReturnNotice/";
+
+
+ //
+ [HttpPost("Save")]
+ public ResponseResult Save(ErpSalesRerurn salesOrder)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "Save";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(salesOrder);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.Save(salesOrder);
+
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ [HttpPost("SaveList")]
+ public ResponseResult SaveList(List<ErpSalesRerurn> units)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "SaveList";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(units);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.SaveList(units);
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+
+
+
/***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
diff --git a/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs b/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
index 3ed35a0..e8d3092 100644
--- a/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
+++ b/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
@@ -8,9 +8,9 @@
[ApiController]
[Route("api/[controller]")]
-public class SalesReturnNoticeDetailController : ControllerBase
+public class SalesReturnDetailController : ControllerBase
{
- private readonly SalesReturnNoticeDetailManager m = new();
+ private readonly SalesReturnDetailManager m = new();
/***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
diff --git a/MESApplication/MESApplication.csproj.user b/MESApplication/MESApplication.csproj.user
index 5b80522..03b2fa2 100644
--- a/MESApplication/MESApplication.csproj.user
+++ b/MESApplication/MESApplication.csproj.user
@@ -5,6 +5,6 @@
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>IIS Express</ActiveDebugProfile>
- <NameOfLastUsedPublishProfile>E:\Tool\LTS\PDA_NEW\StandardPda\MESApplication\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+ <NameOfLastUsedPublishProfile>F:\F鐩樻闈笓灞瀄椤圭洰浠g爜绠$悊鏂囦欢澶筡娉拌幈濮嗛」鐩�1\TLM\MESApplication\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>
\ No newline at end of file
diff --git a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user
index 1acdf34..6d13309 100644
--- a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -4,8 +4,8 @@
-->
<Project>
<PropertyGroup>
- <_PublishTargetUrl>E:\Tool\LTS\PDA_NEW\StandardPda\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl>
- <History>True|2024-12-28T01:06:17.0669698Z||;True|2024-12-26T14:45:42.2002555+08:00||;True|2024-12-26T13:03:07.9325085+08:00||;True|2024-12-26T11:43:04.0852484+08:00||;True|2024-12-21T22:33:39.6121285+08:00||;True|2024-12-16T14:40:36.9800141+08:00||;True|2024-12-14T16:23:42.9536129+08:00||;True|2024-12-11T15:50:13.8959852+08:00||;True|2024-12-11T10:47:42.1561088+08:00||;True|2024-12-08T18:32:27.3909077+08:00||;True|2024-12-06T16:30:29.0031886+08:00||;True|2024-12-05T16:20:00.9907217+08:00||;True|2024-12-05T16:19:41.4441561+08:00||;True|2024-12-05T16:19:22.9404769+08:00||;True|2024-12-05T11:07:30.6547548+08:00||;True|2024-12-03T17:12:24.9349522+08:00||;True|2024-11-27T11:05:24.9761937+08:00||;True|2024-11-19T08:57:10.9008301+08:00||;True|2024-11-18T21:02:57.0481324+08:00||;True|2024-11-05T17:25:48.6360448+08:00||;True|2024-11-05T17:16:08.2144948+08:00||;True|2024-10-28T11:56:24.2694762+08:00||;True|2024-10-28T11:40:56.4512491+08:00||;True|2024-10-28T11:28:42.4509497+08:00||;True|2024-10-28T11:11:11.1286907+08:00||;True|2024-10-28T10:09:42.4378313+08:00||;True|2024-10-28T09:57:51.0792947+08:00||;True|2024-10-23T17:07:23.7741858+08:00||;True|2024-10-22T14:34:55.4526970+08:00||;True|2024-10-17T16:37:53.4763504+08:00||;True|2024-10-13T14:04:45.3666662+08:00||;True|2024-10-13T12:30:16.7294894+08:00||;True|2024-10-13T12:22:13.5740642+08:00||;True|2024-09-26T17:43:56.9592414+08:00||;True|2024-09-25T09:56:59.0722612+08:00||;True|2024-09-20T16:35:40.9416105+08:00||;True|2024-09-13T15:42:08.2824743+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History>
+ <_PublishTargetUrl>F:\F鐩樻闈笓灞瀄椤圭洰浠g爜绠$悊鏂囦欢澶筡娉拌幈濮嗛」鐩�1\TLM\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl>
+ <History>True|2025-02-12T10:28:32.5741267Z;True|2024-12-28T09:06:17.0669698+08:00;True|2024-12-26T14:45:42.2002555+08:00;True|2024-12-26T13:03:07.9325085+08:00;True|2024-12-26T11:43:04.0852484+08:00;True|2024-12-21T22:33:39.6121285+08:00;True|2024-12-16T14:40:36.9800141+08:00;True|2024-12-14T16:23:42.9536129+08:00;True|2024-12-11T15:50:13.8959852+08:00;True|2024-12-11T10:47:42.1561088+08:00;True|2024-12-08T18:32:27.3909077+08:00;True|2024-12-06T16:30:29.0031886+08:00;True|2024-12-05T16:20:00.9907217+08:00;True|2024-12-05T16:19:41.4441561+08:00;True|2024-12-05T16:19:22.9404769+08:00;True|2024-12-05T11:07:30.6547548+08:00;True|2024-12-03T17:12:24.9349522+08:00;True|2024-11-27T11:05:24.9761937+08:00;True|2024-11-19T08:57:10.9008301+08:00;True|2024-11-18T21:02:57.0481324+08:00;True|2024-11-05T17:25:48.6360448+08:00;True|2024-11-05T17:16:08.2144948+08:00;True|2024-10-28T11:56:24.2694762+08:00;True|2024-10-28T11:40:56.4512491+08:00;True|2024-10-28T11:28:42.4509497+08:00;True|2024-10-28T11:11:11.1286907+08:00;True|2024-10-28T10:09:42.4378313+08:00;True|2024-10-28T09:57:51.0792947+08:00;True|2024-10-23T17:07:23.7741858+08:00;True|2024-10-22T14:34:55.4526970+08:00;True|2024-10-17T16:37:53.4763504+08:00;True|2024-10-13T14:04:45.3666662+08:00;True|2024-10-13T12:30:16.7294894+08:00;True|2024-10-13T12:22:13.5740642+08:00;True|2024-09-26T17:43:56.9592414+08:00;True|2024-09-25T09:56:59.0722612+08:00;True|2024-09-20T16:35:40.9416105+08:00;True|2024-09-13T15:42:08.2824743+08:00;True|2024-08-20T17:12:00.2924570+08:00;True|2024-08-17T10:57:05.6670396+08:00;True|2024-08-17T10:56:46.8068041+08:00;True|2024-08-16T14:09:17.0526491+08:00;True|2024-08-15T08:40:32.8134665+08:00;True|2024-08-14T10:00:27.7017207+08:00;True|2024-08-14T08:54:44.8284031+08:00;True|2024-08-07T10:32:10.3689256+08:00;True|2024-08-05T15:45:03.0864530+08:00;True|2024-08-03T09:59:13.7916520+08:00;True|2024-07-31T17:27:28.1965929+08:00;True|2024-07-31T15:27:34.7943845+08:00;True|2024-07-30T15:04:50.5849235+08:00;True|2024-07-30T14:09:06.2877325+08:00;True|2024-07-29T16:11:30.4493940+08:00;True|2024-07-23T14:30:34.4591002+08:00;True|2024-07-22T14:17:39.8186158+08:00;True|2024-04-10T12:55:31.3963752+08:00;True|2024-04-08T13:59:25.5487203+08:00;True|2024-04-06T09:30:09.5350539+08:00;True|2024-04-06T08:46:05.8814658+08:00;True|2024-04-05T14:06:52.0448024+08:00;True|2024-04-05T12:47:46.0561601+08:00;True|2024-02-26T08:46:22.0988887+08:00;True|2024-02-24T19:17:13.6770376+08:00;True|2024-02-24T14:32:37.4450337+08:00;True|2024-02-23T10:22:06.5150173+08:00;True|2024-02-22T13:19:56.6997993+08:00;True|2024-02-22T10:53:17.7929585+08:00;True|2024-02-21T17:08:06.5553444+08:00;True|2024-02-19T16:24:37.4912012+08:00;True|2024-02-02T10:07:23.2726075+08:00;True|2024-02-02T08:36:49.2904460+08:00;True|2024-01-29T17:44:43.6800769+08:00;True|2024-01-23T09:47:26.7811926+08:00;True|2024-01-18T16:23:30.3373836+08:00;True|2024-01-17T14:22:04.2552286+08:00;True|2024-01-16T16:54:42.2316892+08:00;True|2024-01-16T16:37:23.8028858+08:00;True|2024-01-16T09:25:24.4007775+08:00;True|2024-01-15T10:18:57.3362616+08:00;True|2024-01-15T10:07:14.2044763+08:00;True|2024-01-10T14:03:36.4451130+08:00;True|2024-01-09T16:45:32.9601815+08:00;True|2024-01-06T14:16:34.2732220+08:00;True|2024-01-06T14:11:45.2134717+08:00;True|2024-01-06T11:30:58.9198887+08:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
\ No newline at end of file
diff --git a/MESApplication/bin/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll
index f9c19cd..a61914a 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 b9ceea7..e5248a3 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.deps.json b/MESApplication/bin/Release/net8.0/MESApplication.deps.json
index 95a84e5..a38b276 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.deps.json
+++ b/MESApplication/bin/Release/net8.0/MESApplication.deps.json
@@ -1412,10 +1412,7 @@
"SqlSugarCore": "5.1.4.158"
},
"runtime": {
- "MES.Service.dll": {
- "assemblyVersion": "1.0.0",
- "fileVersion": "1.0.0.0"
- }
+ "MES.Service.dll": {}
}
}
}
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll
index 60ae3e8..4a480ba 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 700d0b3..2319f4a 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 4ef9027..fefcbd2 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 f9c19cd..a61914a 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 b9ceea7..e5248a3 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.deps.json b/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json
index 6cd3c2a..e23a3b1 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json
@@ -1160,10 +1160,7 @@
"SqlSugarCore": "5.1.4.158"
},
"runtime": {
- "MES.Service.dll": {
- "assemblyVersion": "1.0.0",
- "fileVersion": "1.0.0.0"
- }
+ "MES.Service.dll": {}
}
}
}
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll
index 60ae3e8..4a480ba 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 700d0b3..2319f4a 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 4ef9027..fefcbd2 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