From 6f666ab6b8515ed988646ff1a9161f2f7eb6ee12 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 21 八月 2024 17:26:18 +0800
Subject: [PATCH] 更正

---
 MES.Service/service/BasicData/MesRohInManager.cs |   47 +++++++++++++++++++++++++----------------------
 1 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/MES.Service/service/BasicData/MesRohInManager.cs b/MES.Service/service/BasicData/MesRohInManager.cs
index cd79236..35acb3c 100644
--- a/MES.Service/service/BasicData/MesRohInManager.cs
+++ b/MES.Service/service/BasicData/MesRohInManager.cs
@@ -14,18 +14,25 @@
     {
         var rohInErpRohIn = rohIn.ErpRohIn;
         var mesRohIn = GetMesRohIn(rohInErpRohIn);
-        var mesRohInDatas = GetMesRohInDatas(rohIn.ErpRohinDatas, rohInErpRohIn.Type);
+        var mesRohInDatas =
+            GetMesRohInDatas(rohIn.ErpRohinDatas, rohInErpRohIn.Type);
 
         return UseTransaction(db =>
         {
             switch (rohInErpRohIn.Type)
             {
-                case "2":
-                case "4":
-                case "5":
-                    return SaveOrUpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0;
+                // case "2":
+                //     return InsertData(db, mesRohIn, mesRohInDatas,
+                //         rohInErpRohIn.FBILLTYPE)
+                //         ? 1
+                //         : 0;
                 case "3":
                     return UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0;
+                case "2":
+                case "4":
+                    return SaveOrUpdateData(db, mesRohIn, mesRohInDatas)
+                        ? 1
+                        : 0;
                 default:
                     throw new NotImplementedException(
                         $"type娌℃湁{rohInErpRohIn.Type}杩欎釜绫诲瀷");
@@ -140,13 +147,13 @@
         mesRohIn.PurchaseGroup = rohIn.FPurchaserGroupId;
         mesRohIn.QtyAcceptance = rohIn.Facctype;
         mesRohIn.Purchaser = rohIn.FPurchaserId;
-        //mesRohIn.QualityReq = rohIn.F_UNW_Remarks_zlyq;
+        mesRohIn.QualityReq = rohIn.F_UNW_Remarks_zlyq;
         mesRohIn.SettlementParty = rohIn.FSettleId;
         mesRohIn.PaymentParty = rohIn.FChargeId;
-       // mesRohIn.Email = rohIn.FProviderEMail;
-      //  mesRohIn.TransportMethod = rohIn.F_UNW_Text_ysfs;
-      mesRohIn.Remarks = rohIn.FHEADNOTE;
-      //  mesRohIn.FixtureMoldProcurement = rohIn.F_UNW_Combo_zjmj;
+        mesRohIn.Email = rohIn.FProviderEMail;
+        mesRohIn.TransportMethod = rohIn.F_UNW_Text_ysfs;
+        mesRohIn.Remarks = rohIn.F_UNW_BZ;
+        mesRohIn.FixtureMoldProcurement = rohIn.F_UNW_Combo_zjmj;
         mesRohIn.CancellationStatus = rohIn.FCancelStatus;
         mesRohIn.CancellationPerson = rohIn.FCancellerId;
 
@@ -185,12 +192,13 @@
                 EbelnK3id = Convert.ToDecimal(s.id),
                 ErpId = Convert.ToDecimal(s.Eid),
                 BillNo = s.FBillNo,
-                SalesOrderId=s.FDEMANDBILLNO,
-                OrderLineId=s.FSEQ,
+                SalesOrderId = s.F_UNW_Text_xsddh,
                 ItemId = s.FMaterialId,
                 PurchaseUnit = s.FUnitId,
                 PurchaseQty = Convert.ToDecimal(s.FQty),
                 InventoryUnit = s.FStockUnitID,
+                PricingUnit = s.FPriceUnitId,
+                PricingQty = Convert.ToDecimal(s.FPriceUnitQty),
                 DeliveryDate = s.FDeliveryDate != null
                     ? DateTime.ParseExact(s.FDeliveryDate,
                         "yyyy-MM-dd HH:mm:ss", null)
@@ -204,7 +212,7 @@
                         "yyyy-MM-dd HH:mm:ss", null)
                     : null,
                 IsGift = s.FGiveAway,
-                Remarks = s.Fnote,
+                Remarks = s.FEntryNote,
                 SupplierItemCode = s.FSupMatId,
                 SupplierItemName = s.FSupMatName,
                 OutsourcingOrderId = s.FSUBREQBILLNO,
@@ -238,15 +246,10 @@
                 DemandSource = s.FDEMANDTYPE,
                 DemandDocumentId = s.FDEMANDBILLNO,
                 DemandDocumentLineId = s.FDEMANDBILLENTRYSEQ,
-                DemandOrg = s.FRequireOrgId,
-                ReceivingOrg = s.FReceiveOrgId,
-                SettlementOrg = s.FSETTLEORGID,
-                PurchaseOrderLineNumber = s.FSEQ,
-                Demand =s.FRequireOrgId,
-                Receiving = s.FReceiveOrgId,
-                Settlement =s.FSETTLEORGID,
-                DemandDepartment = s.FRequireDeptId,
-                ReceivingDepartment = s.FReceiveDeptId
+                PurchaseOrderLineNumber = s.PurchaseOrderLineNumber,
+                Demand = s.Demand,
+                Receiving = s.Receiving,
+                Settlement = s.Settlement
             };
 
             var single = rohInDataManager.GetSingle(it =>

--
Gitblit v1.9.3