|
|
|
@ -4,7 +4,6 @@ using System.Linq.Expressions; |
|
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
|
|
|
|
using SqlSugar; |
|
|
|
|
using Tiobon.Core.Common; |
|
|
|
|
using Tiobon.Core.Common.Caches; |
|
|
|
@ -127,7 +126,6 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ |
|
|
|
|
return Mapper.Map(data).ToANew<List<TEntityDto>>(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceFormResult> QueryForm(QueryForm body) |
|
|
|
|
{ |
|
|
|
|
var result = new ServiceFormResult(); |
|
|
|
@ -170,7 +168,6 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ |
|
|
|
|
|
|
|
|
|
result.result.DT_TableDataT1 = Db.Ado.SqlQuery<TEntityDto>(sql); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region JM_PageFormActionsT1 |
|
|
|
|
dynamic JM_PageFormActionsT1 = new ExpandoObject(); |
|
|
|
|
|
|
|
|
@ -266,8 +263,10 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region DT_PageMutiMsg |
|
|
|
|
var DT_PageMutiMsg = new List<DT_PageMutiMsg>(); |
|
|
|
|
sql = $@"SELECT Langkey field,
|
|
|
|
|
var DT_PageMutiMsg = await _caching.GetAsync<List<DT_PageMutiMsg>>("DT_PageMutiMsg"); |
|
|
|
|
if (DT_PageMutiMsg == null || (DT_PageMutiMsg != null && !DT_PageMutiMsg.Any())) |
|
|
|
|
{ |
|
|
|
|
sql = $@"SELECT Langkey field,
|
|
|
|
|
CASE {body.langId} |
|
|
|
|
WHEN 1 THEN isnull (Value01, LangValue) |
|
|
|
|
WHEN 2 THEN isnull (Value02, LangValue) |
|
|
|
@ -283,7 +282,10 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ |
|
|
|
|
FROM Ghrs_LangKey |
|
|
|
|
WHERE (LangKey LIKE 'GHR_Page%' OR LangKey LIKE 'GHR_Common%') |
|
|
|
|
AND IsEnable = 1";
|
|
|
|
|
DT_PageMutiMsg = Db.Ado.SqlQuery<DT_PageMutiMsg>(sql); |
|
|
|
|
DT_PageMutiMsg = Db.Ado.SqlQuery<DT_PageMutiMsg>(sql); |
|
|
|
|
if (DT_PageMutiMsg.Any()) |
|
|
|
|
await _caching.SetAsync("DT_PageMutiMsg", DT_PageMutiMsg, TimeSpan.FromHours(1)); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
result.result.JM_PageFormActionsT1 = JM_PageFormActionsT1; |
|
|
|
|