Browse Source

[WHAT] Bugfix [WHY] ShowEasy 後台開發 [HOW] 修正問題管理類別列表

Dev
berlin-tzen 2 years ago
parent
commit
ca2ab3ded3
  1. 55
      EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_QryService.cs
  2. 37
      EuroTran/EasyBL.WEBAPP/ShowEasy/SurveyMaintain_QryService.cs

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

@ -416,5 +416,60 @@ namespace EasyBL.WEBAPP.SYS
#endregion 類別管理(以ID查詢)
#region 類別管理(List 查詢所有子類別)
/// <summary>
/// 類別管理(List 查詢所有子類別)
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
public ResponseMessage QueryAllSubCategoryList(RequestMessage i_crm)
{
ResponseMessage rm = null;
string sMsg = null;
var db = SugarBase.GetIntance();
var sIsMainCategory = "N";
try
{
do
{
var sLanguageID = _fetchString(i_crm, @"LanguageID");
if (string.IsNullOrEmpty(sLanguageID))
{
sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE;
}
var saCategory = db.Queryable<SETB_SYS_Category>()
//搜尋條件
.Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N")
.Where(x => x.IsMainCategory == sIsMainCategory)
.Where(t1 => t1.LanguageID == sLanguageID)
.ToList();
rm = new SuccessResponseMessage(null, i_crm);
rm.DATA.Add(BLWording.REL, saCategory);
} while (false);
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(SurveyMaintain_QryService), "", "QueryCategoryList 問卷管理-類別查詢(List 查詢類別)", "", "", "");
}
finally
{
if (null != sMsg)
{
rm = new ErrorResponseMessage(sMsg, i_crm);
}
}
return rm;
}
#endregion 類別管理(List 查詢所有子類別)
}
}

37
EuroTran/EasyBL.WEBAPP/ShowEasy/SurveyMaintain_QryService.cs

@ -274,51 +274,24 @@ namespace EasyBL.WEBAPP.SYS
#endregion 問卷管理-問卷類別查詢(List 查詢類別)
#region 問卷管理-類別查詢(List 查詢類別)
#region 問卷管理(List 查詢所有子類別 Call CategoryMaintain_QryService QueryAllSubCategoryList
/// <summary>
/// 問卷管理-類別查詢(List 查詢類別)
/// 問卷管理(List 查詢所有子類別 Call CategoryMaintain_QryService QueryAllSubCategoryList
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
public ResponseMessage QueryCategoryList(RequestMessage i_crm)
{
ResponseMessage rm = null;
string sMsg = null;
var db = SugarBase.GetIntance();
var sIsMainCategory = "N";
CategoryMaintain_QryService cm_qry = new CategoryMaintain_QryService();
try
{
do
{
var saCategory = db.Queryable<SETB_SYS_Category>()
//搜尋條件
.Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N")
.Where(x => x.IsMainCategory == sIsMainCategory)
.ToList();
ResponseMessage rm = cm_qry.QueryAllSubCategoryList(i_crm);
rm = new SuccessResponseMessage(null, i_crm);
rm.DATA.Add(BLWording.REL, saCategory);
} while (false);
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(SurveyMaintain_QryService), "", "QueryCategoryList 問卷管理-類別查詢(List 查詢類別)", "", "", "");
}
finally
{
if (null != sMsg)
{
rm = new ErrorResponseMessage(sMsg, i_crm);
}
}
return rm;
}
#endregion 問卷管理-類別查詢(List 查詢類別)
#endregion 問卷管理(List 查詢所有子類別 Call CategoryMaintain_QryService QueryAllSubCategoryList)
#region 問卷管理-答案類別查詢(List 查詢類別)

Loading…
Cancel
Save