diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs index 85b3cb2..bb8a551 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs @@ -1565,16 +1565,17 @@ namespace EasyBL.WEBAPP.ShowEasy do { var sORIGID = WebAppGlobalConstWord.TG_ORGID; - objONSiteBaseInfo = db.Queryable((t1, t2,t3) => + objONSiteBaseInfo = db.Queryable((t1, t2,t3, t4) => new object[] { JoinType.Left, t1.OrgID == t2.OrgID && t1.ConfirmDays == t2.ArgumentID && t2.ArgumentClassID=="OrderConfirmDays", - JoinType.Left, t1.OrgID == t3.OrgID && t1.CurrencyID == t3.ArgumentID && t3.ArgumentClassID=="Currency" + JoinType.Left, t1.OrgID == t3.OrgID && t1.CurrencyID == t3.ArgumentID && t3.ArgumentClassID=="Currency", + JoinType.Left, t1.OrgID == t4.OrgID && t1.SupplierID == t4.SupplierID && t1.LangID == t4.LangType } ) //搜尋條件 .Where((t1) => t1.OrgID == sORIGID && t1.ServiceID == sServiceID && t1.LangID == sLanguageID) - .Select((t1, t2, t3) => new ONSiteBaseInfoDTO + .Select((t1, t2, t3,t4) => new ONSiteBaseInfoDTO { ServiceID = t1.ServiceID, ServiceNo=t1.ServiceNo, @@ -1587,7 +1588,9 @@ namespace EasyBL.WEBAPP.ShowEasy MinPrice=t1.MinPrice, CurrencyID=t1.CurrencyID, CurrencyName=t3.ArgumentValue, - ExpenseDescription ="" + ExpenseDescription ="", + SupplierName=t4.CompanyName, + SupplierLogo=t4.LogoFile }).Single(); //常見問題 @@ -1700,6 +1703,31 @@ namespace EasyBL.WEBAPP.ShowEasy } objONSiteBaseInfo.ReceivinPlaces = sReceivinPlaces; } + + if (!string.IsNullOrEmpty(objONSiteBaseInfo.SupplierLogo)) { + + string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); + var oFilePath = db.Queryable() + .Where(x => x.ParentID == objONSiteBaseInfo.SupplierLogo && x.OrgID == sORIGID) + .Select(x => new FileDTO + { + FileID = x.FileID, + FileName = x.FileName, + FilePath = x.FilePath + }) + .Single(); + + + if (oFilePath != null) + { + objONSiteBaseInfo.SupplierLogo = requestUrl + "/" + oFilePath.FilePath.Replace("\\", "/"); + + } + + } + + + return objONSiteBaseInfo; diff --git a/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs b/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs index c2eff7e..9209534 100644 --- a/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs +++ b/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs @@ -42,7 +42,8 @@ namespace Entity.ShowEasyDtos public string CurrencyID { get; set; } public string CurrencyName { get; set; } - //public string SupplierID { get; set; } + public string SupplierName { get; set; } + public string SupplierLogo { get; set; } //public string CurrencyID { get; set; }