Browse Source

[WHAT] 更新展覽狀態列表只列出有用到的狀態

Dev
berlin-tzen 2 years ago
parent
commit
6189c49c12
  1. 57
      EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs
  2. 7
      EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibitionService.cs

57
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<OTB_SYS_Arguments>()
.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 查詢展覽狀態)
/// <summary>
/// 展覽管理(Dictionary 查詢展覽狀態)
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
public Dictionary<string, StatusDTO> QueryShowStatusDic(string sLanguageID) {
Dictionary<string, StatusDTO> rsResult = new Dictionary<string, StatusDTO>();
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 查詢展覽週期選單)
/// <summary>
@ -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)

7
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<StatusDTO>();
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);
}

Loading…
Cancel
Save