You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
2.4 KiB

namespace CounsellorBL.BLStructure.SYS
{
using Newtonsoft.Json.Linq;
using OT.COM.ArsenalDB;
using OT.COM.SignalerMessage;
using SoldierData.EnterprizeV4;
using System;
using OT.COM.LogisticsUtil;
using CounsellorBL.Helper;
using Newtonsoft.Json;
public class ADIntegrationLogService : SingleDataTableTemplate<tb_sys_adintegrationlog>
{
public override string MainTable => typeof(tb_sys_adintegrationlog).Name;
public ADIntegrationLogService()
{
dgReadCommandGenerator = readCommandGenerator;
}
protected string readCommandGenerator(CRequestMessage i_crmInput, JArray i_jaData, tb_sys_session i_sSessionUser, out Command o_c,
[System.Runtime.CompilerServices.CallerLineNumber] int i_nCodeLine = 0,
[System.Runtime.CompilerServices.CallerMemberName] string i_sMemberName = "",
[System.Runtime.CompilerServices.CallerFilePath] string i_sSourcePath = "")
{
Command cRes = null;
string sMsg;
try
{
do
{
sMsg = ScheduleRange.ParseLogStartEnd(tb_sys_adintegrationlog.CN_CREATE_DATE, i_jaData, out ScheduleRange sr);
if (sMsg != null)
{
break;
}
QueryJsonElementCollection lBlocks = new QueryJsonElementCollection();
QueryJsonElement qjeA = lBlocks.GetInst<tb_sys_adintegrationlog>();
qjeA.displaycols = EntityBase.GetAllColumnName(typeof(tb_sys_adintegrationlog));
qjeA.wherecols = WhereNode.GenNode<tb_sys_adintegrationlog>(f => f.create_date >= sr.Start && f.create_date < sr.End);
lBlocks.Add(qjeA);
sMsg = MakeSelectJoinByBlocks(lBlocks, out cRes);
}
while (false);
}
catch (Exception ex)
{
LogHelper.DBLog(Util.GetLastExceptionMsg(ex), i_nCodeLine, i_sMemberName, i_sSourcePath);
sMsg = $"{nameof(readCommandGenerator)} unknwon exception. i_crmInput={JsonConvert.SerializeObject(i_crmInput)}. Call from {i_sMemberName} {i_sSourcePath}({i_nCodeLine}).";
#if DEBUG
System.Diagnostics.Debug.WriteLine(sMsg);
#endif
}
o_c = cRes;
return sMsg;
}
}
}