diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs index 74f95db..b7c65de 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs @@ -444,6 +444,8 @@ namespace EasyBL.WEBAPP.SYS public ResponseMessage QueryShowStatusList(RequestMessage i_crm) { + ArgumentMaintain_QryService am_qry = new ArgumentMaintain_QryService(); + ResponseMessage rm = null; string sMsg = null; var db = SugarBase.GetIntance(); @@ -457,11 +459,14 @@ namespace EasyBL.WEBAPP.SYS var sArgumentClassID = "ShowStatus"; - saShowStatus = db.Queryable() - .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N") - .Where(t1 => t1.ArgumentClassID == sArgumentClassID) - .ToList(); + var sLanguageID = _fetchString(i_crm, @"LanguageID"); + if (string.IsNullOrEmpty(sLanguageID)) { + sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE; + } + + saShowStatus = am_qry.FindAllByIDsAsDictionary(sLanguageID, i_crm.ORIGID, sArgumentClassID).Values.ToList(); + rm = new SuccessResponseMessage(null, i_crm); rm.DATA.Add(BLWording.REL, saShowStatus); } while (false); @@ -485,6 +490,46 @@ namespace EasyBL.WEBAPP.SYS #endregion 展覽管理(List 查詢展覽狀態) + #region 展覽管理(Dictionary 查詢展覽狀態) + + /// + /// 展覽管理(Dictionary 查詢展覽狀態) + /// + /// + /// + public Dictionary QueryShowStatusDic(string sLanguageID) { + + Dictionary rsResult = new Dictionary(); + + if (string.IsNullOrEmpty(sLanguageID)) { + sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE; + } + + ArgumentMaintain_QryService am_qry = new ArgumentMaintain_QryService(); + var StatusDic = am_qry.FindAllByIDsAsDictionary(sLanguageID, "", "ShowStatus"); + + var rsExhibitionStatusList = QueryAllDetailExhibitionAsDictionary(sLanguageID).Values.ToList().Where(w => !string.IsNullOrEmpty(w.Status)).Select(s => s.Status); + + foreach (var sStatus in rsExhibitionStatusList) { + + if (StatusDic.ContainsKey(sStatus)) { + + StatusDTO rsStatus = new StatusDTO(); + rsStatus.Key = sStatus; + rsStatus.Value = StatusDic[sStatus].ArgumentValue; + + rsResult[sStatus] = rsStatus; + + } + + } + + return rsResult; + + } + + #endregion 展覽管理(Dictionary 查詢展覽狀態) + #region 展覽管理(List 查詢展覽週期選單) /// @@ -495,6 +540,8 @@ namespace EasyBL.WEBAPP.SYS public ResponseMessage QueryFrequencyList(RequestMessage i_crm) { + ArgumentMaintain_QryService am_qry = new ArgumentMaintain_QryService(); + ResponseMessage rm = null; string sMsg = null; var db = SugarBase.GetIntance(); @@ -710,8 +757,6 @@ namespace EasyBL.WEBAPP.SYS sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE; } - System.Diagnostics.Debug.WriteLine("sLanguageID" + ": "+sLanguageID); - var rsExhibitionList = FindAllByIDsAsDictionary(sLanguageID).Values.ToList(); if (MainCategoryIDs.Count > 0) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibitionService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibitionService.cs index b4fb110..e242e49 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibitionService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibitionService.cs @@ -44,15 +44,12 @@ namespace EasyBL.WEBAPP.SYS } ExhibMaintain_QryService em_qry = new ExhibMaintain_QryService(); - var rsResult = em_qry.QueryShowStatusList(i_crm); - var rsStatusList = new List(); - - rsStatusList = StatusEntityToDTO(rsResult.DATA[BLWording.REL]); + var rsResult = em_qry.QueryShowStatusDic(sLanguageID).Values.ToList(); //返回token信息 srm = new SuccessResponseMessage(null, null); - srm.DATA.Add(BLWording.REL, rsStatusList); + srm.DATA.Add(BLWording.REL, rsResult); } while (false); }