| | |
| | | { |
| | | 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}这个类型"); |
| | |
| | | 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; |
| | | |
| | |
| | | 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) |
| | |
| | | "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, |
| | |
| | | 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 => |