啊鑫
3 天以前 4a8f16f0d07d67098e538c6a03bdc979b04af9bc
MES.Service/service/BasicData/MesRohInManager.cs
@@ -129,12 +129,37 @@
            mesRohIn.Supplier = mesSupplier.Id.ToString();
        }
        // SETTLEMENT_PARTY -> MesSupplier.id
        if (!string.IsNullOrEmpty(rohIn.FSettleId))
        {
            var settlementSupplier = Db.Queryable<MesSupplier>()
                .Where(s => s.SuppNo == rohIn.FSettleId)
                .Select(s => s.Id)
                .First();
            if (settlementSupplier != null)
            {
                mesRohIn.SettlementParty = settlementSupplier.ToString();
            }
        }
        // PURCHASE_DEPT -> SYS_DEPARTMENT.DEPARTMENTID
        if (!string.IsNullOrEmpty(rohIn.FPurchaseDeptId))
        {
            var department = Db.Queryable<SysDepartment>()
                .Where(d => d.Departmentcode == rohIn.FPurchaseDeptId)
                .Select(d => d.Id)
                .First();
            if (department != null)
            {
                mesRohIn.PurchaseDept = department.ToString();
            }
        }
        mesRohIn.CloseStatus = rohIn.FCloseStatus;
        mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId;
        mesRohIn.PurchaseDept = rohIn.FPurchaseDeptId;
        // mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId;
        mesRohIn.PurchaseOrg = "1";
        mesRohIn.PurchaseGroup = rohIn.FPurchaserGroupId;
        mesRohIn.Purchaser = rohIn.FPurchaserId;
        mesRohIn.SettlementParty = rohIn.FSettleId;
        mesRohIn.PaymentParty = rohIn.FChargeId;
        mesRohIn.Email = rohIn.FProviderEMail;
        mesRohIn.Remarks = rohIn.Remarks;