berlin-tzen 2 years ago
parent
commit
d7dc6f3323
  1. 55
      EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs
  2. 5
      EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_UpdService.cs
  3. 12
      EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs

55
EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs

@ -1565,16 +1565,17 @@ namespace EasyBL.WEBAPP.ShowEasy
do
{
var sORIGID = WebAppGlobalConstWord.TG_ORGID;
objONSiteBaseInfo = db.Queryable<SETB_PDT_ONSiteBaseInfo,OTB_SYS_Arguments, OTB_SYS_Arguments>((t1, t2,t3) =>
objONSiteBaseInfo = db.Queryable<SETB_PDT_ONSiteBaseInfo,OTB_SYS_Arguments, OTB_SYS_Arguments,SETB_SCM_Supplier>((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,12 +1588,15 @@ namespace EasyBL.WEBAPP.ShowEasy
MinPrice=t1.MinPrice,
CurrencyID=t1.CurrencyID,
CurrencyName=t3.ArgumentValue,
ExpenseDescription =""
ExpenseDescription ="",
SupplierName=t4.CompanyName,
SupplierLogo=t4.LogoFile,
PreviewFile=t1.PreviewFile
}).Single();
//常見問題
var lstFQA = db.Queryable<SETB_PDT_ServiceByFQA>()
.Where(x => x.ServiceID == sServiceID && x.LangID == sLanguageID)
.Where(x => x.ServiceID == sServiceID && x.LangID == sLanguageID && x.Answer!="" && x.Question!="")
.OrderBy(x => x.CreateDate)
.Select(x => new FQADTO {
Question= x.Question,
@ -1700,6 +1704,47 @@ namespace EasyBL.WEBAPP.ShowEasy
}
objONSiteBaseInfo.ReceivinPlaces = sReceivinPlaces;
}
string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri");
if (!string.IsNullOrEmpty(objONSiteBaseInfo.SupplierLogo)) {
var oFilePath = db.Queryable<OTB_SYS_Files>()
.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("\\", "/");
}
}
if (!string.IsNullOrEmpty(objONSiteBaseInfo.PreviewFile))
{
var oFilePath = db.Queryable<OTB_SYS_Files>()
.Where(x => x.ParentID == objONSiteBaseInfo.PreviewFile && x.OrgID == sORIGID)
.Select(x => new FileDTO
{
FileID = x.FileID,
FileName = x.FileName,
FilePath = x.FilePath
})
.Single();
if (oFilePath != null)
{
objONSiteBaseInfo.PreviewFile = requestUrl + "/" + oFilePath.FilePath.Replace("\\", "/");
}
}
return objONSiteBaseInfo;

5
EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_UpdService.cs

@ -629,7 +629,8 @@ namespace EasyBL.WEBAPP.ShowEasy
//x.SupplierID,
x.CancelPolicy,
x.OrderMemo,
x.ServiceNo
x.ServiceNo,
x.MinPrice
}).ExecuteCommand();
@ -1479,6 +1480,8 @@ namespace EasyBL.WEBAPP.ShowEasy
ServiceBaseInfoModel.ModifyDate = DateTime.Now;
ServiceBaseInfoModel.CreateUser = i_crm.USERID;
ServiceBaseInfoModel.ModifyUser = i_crm.USERID;
ServiceBaseInfoModel.PreviewFile = Guid.NewGuid().ToString();
ServiceBaseInfoModel.BannerFile = Guid.NewGuid().ToString();
}
if (lstServiceBaseInfo.Count() > 0)
{

12
EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs

@ -38,12 +38,18 @@ namespace Entity.ShowEasyDtos
public string Details { get; set; }
//取消政策
public string CancelPolicy { get; set; }
//最小金額
public int? MinPrice { get; set; }
//幣別
public string CurrencyID { get; set; }
//幣別名稱
public string CurrencyName { get; set; }
//public string SupplierID { get; set; }
//供應商名稱
public string SupplierName { get; set; }
//供應商Logo
public string SupplierLogo { get; set; }
//服務封面圖片
public string PreviewFile { get; set; }
//public string CurrencyID { get; set; }
//public DateTime? LaunchDateS { get; set; }

Loading…
Cancel
Save