/// <summary> /// 获取“我要采购——中标商家信息” /// </summary> /// <param name="userId"></param> /// <returns></returns> public Result_Model <Result_IWantToSupply> Get_SupplyModel_ByIWantToBuyID(long userId) { Result_Model <Result_IWantToSupply> res = new Result_Model <Result_IWantToSupply>() { Msg = new Result_Msg() { IsSuccess = false } }; Result_Model <IWantToSupply> res1 = supplyService.Get_SupplyModel_ByIWantToBuyID(userId); var listHash = hashSet.Get_DictionariesList(); if (res1.Msg.IsSuccess) { res.Msg = res1.Msg; res.Model = new Result_IWantToSupply() { Id = res1.Model.Id, PurchaseNum = res1.Model.PurchaseNum.ToString(), IWantToBuyID = res1.Model.IWantToBuyID, UnitPrice = res1.Model.UnitPrice, Quantity = res1.Model.Quantity, Unit = res1.Model.Unit, TotalPrice = res1.Model.TotalPrice, SupplierID = res1.Model.SupplierID, TypeOfCurrency = listHash.Where(y => y.DictionaryTypeId == 1 && y.DValue == res1.Model.TypeOfCurrency.ToString()).FirstOrDefault().Remarks, ShopName = supplyService.GetCompanyInfo_ByUserIdAndUserType(res1.Model.SupplierID).Model.CompanyName, IsMine = res1.Model.SupplierID == base.CurrentUser.Id ? 1 : 0, CreateDate = res1.Model.CreateDate.ToString("yyyy-MM-dd hh:mm"), BidDate = res1.Model.BidDate.ToString("yyyy-MM-dd hh:mm"), LatestDeliveryTime = res1.Model.LatestDeliveryTime.ToString("yyyy-MM-dd hh:mm"), UpdateDate = res1.Model.UpdateDate.ToString("yyyy-MM-dd hh:mm"), Status = res1.Model.Status, StatusStr = listHash.Where(y => y.DictionaryTypeId == 108 && y.DKey == res1.Model.Status.ToString()).FirstOrDefault().DValue }; } return(res); }