初始化
This commit is contained in:
70
BLWWS_BLL/AliyunSMSHelper.cs
Normal file
70
BLWWS_BLL/AliyunSMSHelper.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Aliyun.Acs.Core;
|
||||
using Aliyun.Acs.Core.Profile;
|
||||
using Aliyun.Acs.Core.Exceptions;
|
||||
using Aliyun.Acs.Dysmsapi.Model.V20170525;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public static class AliyunSMSHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 发送验证码
|
||||
/// </summary>
|
||||
/// <param name="recNum">接收号码,多个号码可以逗号分隔</param>
|
||||
/// <param name="code">验证码</param>
|
||||
public static void SendVerifySMS(string recNum, string code)
|
||||
{
|
||||
SendSMS(recNum, "{'code':'" + code + "'}");
|
||||
}
|
||||
/// <summary>
|
||||
/// 发送验证码
|
||||
/// </summary>
|
||||
/// <param name="recNum">接收号码,多个号码可以逗号分隔</param>
|
||||
/// <param name="paramString">短信模板中的变量;数字需要转换为字符串;个人用户每个变量长度必须小于15个字符。</param>
|
||||
/// <returns></returns>
|
||||
private static void SendSMS(string recNum, string paramString)
|
||||
{
|
||||
IClientProfile profile = DefaultProfile.GetProfile("cn-hangzhou", "LTAICuIny2zJSSjm", "uguZzmshKPtT0fW87E8sP1TXe7Kwc9");
|
||||
//IAcsClient client = new DefaultAcsClient(profile);
|
||||
//SingleSendSmsRequest request = new SingleSendSmsRequest();
|
||||
DefaultProfile.AddEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");//短信API产品名称,短信API产品域名
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
SendSmsRequest request = new SendSmsRequest();
|
||||
try
|
||||
{
|
||||
//request.SignName = "小威提示";//"管理控制台中配置的短信签名(状态必须是验证通过)"
|
||||
//request.TemplateCode = "SMS_95095011";//"管理控制台中配置的审核通过的短信模板的模板CODE(状态必须是验证通过)"
|
||||
//request.RecNum = recNum;
|
||||
//request.ParamString = paramString;
|
||||
//SingleSendSmsResponse httpResponse = client.GetAcsResponse(request);
|
||||
|
||||
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为20个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
|
||||
request.PhoneNumbers = recNum;
|
||||
//必填:短信签名-可在短信控制台中找到
|
||||
request.SignName = "小威提示";
|
||||
//必填:短信模板-可在短信控制台中找到
|
||||
request.TemplateCode = "SMS_95095011";
|
||||
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
|
||||
request.TemplateParam = paramString;// "{\"customer\":\"123\"}";
|
||||
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
|
||||
//request.OutId = "21212121211";
|
||||
//请求失败这里会抛ClientException异常
|
||||
//SendSmsResponse sendSmsResponse =
|
||||
acsClient.GetAcsResponse(request);
|
||||
//LogHelper.WriteLog(sendSmsResponse.Message);
|
||||
}
|
||||
catch (ServerException e)
|
||||
{
|
||||
LogHelper.WriteLog(e.ToString());
|
||||
}
|
||||
catch (ClientException e)
|
||||
{
|
||||
LogHelper.WriteLog(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1228
BLWWS_BLL/BLL.cs
Normal file
1228
BLWWS_BLL/BLL.cs
Normal file
File diff suppressed because it is too large
Load Diff
115
BLWWS_BLL/BLWWS_BLL.csproj
Normal file
115
BLWWS_BLL/BLWWS_BLL.csproj
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{CF2AB5DE-C3AF-4388-B6C4-EFA14BAF3316}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BLWWS_BLL</RootNamespace>
|
||||
<AssemblyName>BLWWS_BLL</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="aliyun-net-sdk-core">
|
||||
<HintPath>..\dll\aliyun-net-sdk-core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="aliyun-net-sdk-dysmsapi">
|
||||
<HintPath>..\dll\aliyun-net-sdk-dysmsapi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Common.Logging.3.3.1\lib\net40\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging.Core, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CSRedisCore, Version=3.8.806.0, Culture=neutral, PublicKeyToken=9aa6a3079358d437, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CSRedisCore.3.8.806\lib\net40\CSRedisCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.7.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.7.9\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.6.0.0\lib\net35\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Quartz, Version=2.6.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Quartz.2.6.2\lib\net40\Quartz.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp">
|
||||
<HintPath>..\BLWWS\RestSharp\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SqlSugar, Version=4.9.9.11, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\sqlSugar.4.9.9.11\lib\SqlSugar.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AliyunSMSHelper.cs" />
|
||||
<Compile Include="CSRedisCacheHelper.cs" />
|
||||
<Compile Include="EntityData.cs" />
|
||||
<Compile Include="ExtraData.cs" />
|
||||
<Compile Include="GlobalCache.cs" />
|
||||
<Compile Include="HttpJob.cs" />
|
||||
<Compile Include="LogHelper.cs" />
|
||||
<Compile Include="LogHelperForService.cs" />
|
||||
<Compile Include="PmsInterface.cs" />
|
||||
<Compile Include="pmsLog.cs" />
|
||||
<Compile Include="SqlHelper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SqlSugarBase.cs" />
|
||||
<Compile Include="Tools.cs" />
|
||||
<Compile Include="BLL.cs" />
|
||||
<Compile Include="Uploadinfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="job_scheduling_data_2_0.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
121
BLWWS_BLL/GlobalCache.cs
Normal file
121
BLWWS_BLL/GlobalCache.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using BLWWS_BLL.Job;
|
||||
using NLog;
|
||||
using Quartz;
|
||||
using Quartz.Impl;
|
||||
using LogManager = NLog.LogManager;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public class GlobalCache
|
||||
{
|
||||
public static ISchedulerFactory sf = null;
|
||||
public static IScheduler sched = null;
|
||||
|
||||
public static ConcurrentQueue<string> GlobalCacheData = new ConcurrentQueue<string>();
|
||||
|
||||
public static System.Timers.Timer timer;
|
||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
public static void Init()
|
||||
{
|
||||
_logger.Error("初始化");
|
||||
if (timer == null)
|
||||
{
|
||||
timer = new System.Timers.Timer();
|
||||
timer.Interval = 500;
|
||||
timer.Elapsed -= Timer_Elapsed;
|
||||
timer.Elapsed += Timer_Elapsed;
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GlobalCache.GlobalCacheData.TryDequeue(out string data))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(data))
|
||||
{
|
||||
string strResult = Tools.PostWebRequest(data, "");//调用人脸机接口
|
||||
_logger.Error("人脸 后台:" + strResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error("人脸 后台异常:" + ex.Message);
|
||||
}
|
||||
}
|
||||
public static void Add(string jobData)
|
||||
{
|
||||
|
||||
if (timer == null)
|
||||
{
|
||||
timer = new System.Timers.Timer();
|
||||
timer.Interval = 500;
|
||||
timer.Elapsed -= Timer_Elapsed;
|
||||
timer.Elapsed += Timer_Elapsed;
|
||||
timer.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
_logger.Error("后台来了任务");
|
||||
GlobalCacheData.Enqueue(jobData);
|
||||
//if (sf == null)
|
||||
//{
|
||||
// Init();
|
||||
//}
|
||||
//DateTimeOffset runTime = DateTimeOffset.UtcNow.AddSeconds(2);
|
||||
|
||||
//string JobName = "Job" + System.Guid.NewGuid().ToString("N");
|
||||
//string TriggerName = "Trigger" + System.Guid.NewGuid().ToString("N");
|
||||
//IJobDetail job = JobBuilder.Create<HttpJob>()
|
||||
// .WithIdentity(JobName, "group1")
|
||||
// .UsingJobData("JobData", jobData)
|
||||
// .Build();
|
||||
|
||||
//// Trigger the job to run on the next round minute
|
||||
//ITrigger trigger = TriggerBuilder.Create()
|
||||
// .WithIdentity(TriggerName, "group1")
|
||||
// .StartAt(runTime)
|
||||
// .Build();
|
||||
|
||||
//GlobalCache.sched.ScheduleJob(job, trigger);
|
||||
}
|
||||
public static void TaskAdd(string jobData)
|
||||
{
|
||||
if (sched != null)
|
||||
{
|
||||
DateTimeOffset runTime = DateTimeOffset.UtcNow.AddSeconds(2);
|
||||
|
||||
string JobName = "Job" + System.Guid.NewGuid().ToString("N");
|
||||
string TriggerName = "Trigger" + System.Guid.NewGuid().ToString("N");
|
||||
IJobDetail job = JobBuilder.Create<HttpJob>()
|
||||
.WithIdentity(JobName, "group1")
|
||||
.UsingJobData("JobData", jobData)
|
||||
.Build();
|
||||
|
||||
// Trigger the job to run on the next round minute
|
||||
ITrigger trigger = TriggerBuilder.Create()
|
||||
.WithIdentity(TriggerName, "group1")
|
||||
.StartAt(runTime)
|
||||
.Build();
|
||||
|
||||
GlobalCache.sched.ScheduleJob(job, trigger);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLog("初始化");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
BLWWS_BLL/HttpJob.cs
Normal file
30
BLWWS_BLL/HttpJob.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using BLWWS_BLL;
|
||||
using Quartz;
|
||||
|
||||
namespace BLWWS_BLL.Job
|
||||
{
|
||||
public class HttpJob : IJob
|
||||
{
|
||||
public void Execute(IJobExecutionContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var mmm = context.JobDetail.JobDataMap;
|
||||
var nnn = mmm.GetString("JobData");
|
||||
|
||||
//string str = Tools.PostWebRequest(nnn, "");//调用人脸机接口
|
||||
//LogHelper.WriteLog("后台人脸机的结果:" + str);
|
||||
LogHelper.WriteLog("执行任务"+nnn);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//LogHelper.WriteLog("后台人脸机异常:" + ex.Message);
|
||||
LogHelper.WriteLog("后台异常:" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
132
BLWWS_BLL/LogHelper.cs
Normal file
132
BLWWS_BLL/LogHelper.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志辅助类
|
||||
/// </summary>
|
||||
public static class LogHelper
|
||||
{
|
||||
public static string ExePath = HttpContext.Current.Request.PhysicalApplicationPath;
|
||||
/// <summary>
|
||||
/// 日志写入到批定的文件路径下
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
public static void WriteLog(string msg, string path = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = ExePath;
|
||||
}
|
||||
path = path + "\\logs\\" + DateTime.Now.ToString("yyyyMMdd") + ".log";
|
||||
msg = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":\t" +
|
||||
HttpContext.Current.Request.UserHostAddress + ":" + msg + Environment.NewLine;
|
||||
WriteLog(path, msg, true);
|
||||
}
|
||||
public static void WriteLogNew(string msg, string path = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = ExePath;
|
||||
}
|
||||
path = path + "\\logs\\" + DateTime.Now.ToString("yyyyMMdd") + ".log";
|
||||
msg = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":\t" + msg + Environment.NewLine;
|
||||
WriteLog(path, msg, true);
|
||||
}
|
||||
/// <summary>
|
||||
/// 把数据写入指定的文件里
|
||||
/// </summary>
|
||||
/// <param name="path">文件路径(包括文件名称)</param>
|
||||
/// <param name="msg">写入内容</param>
|
||||
/// <param name="append">是否追加</param>
|
||||
public static void WriteLog(string path, string msg, bool append)
|
||||
{
|
||||
string folder = Path.GetDirectoryName(path);
|
||||
if (!Directory.Exists(folder))
|
||||
{
|
||||
Directory.CreateDirectory(folder);
|
||||
}
|
||||
StreamWriter sw = null;
|
||||
try
|
||||
{
|
||||
sw = new StreamWriter(path, append, Encoding.Unicode);
|
||||
sw.WriteLine(msg);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (sw != null)
|
||||
{
|
||||
sw.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 把数据写入指定的文件里
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="msg"></param>
|
||||
public static void WriteLog(string path, byte[] msg)
|
||||
{
|
||||
string folder = Path.GetDirectoryName(path);
|
||||
if (!Directory.Exists(folder))
|
||||
{
|
||||
Directory.CreateDirectory(folder);
|
||||
}
|
||||
FileStream fs = null;
|
||||
try
|
||||
{
|
||||
fs = new FileStream(path, FileMode.Append, FileAccess.Write);
|
||||
fs.Write(msg, 0, msg.Length);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (fs != null)
|
||||
{
|
||||
fs.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 读取文件内容
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string ReadLog(string path)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
StreamReader sr = null;
|
||||
try
|
||||
{
|
||||
sr = new StreamReader(path);
|
||||
return sr.ReadToEnd();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (sr != null)
|
||||
{
|
||||
sr.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
54
BLWWS_BLL/LogHelperForService.cs
Normal file
54
BLWWS_BLL/LogHelperForService.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public static class LogHelperForService
|
||||
{
|
||||
private static string ExePath = Application.StartupPath;
|
||||
/// <summary>
|
||||
/// 日志写入到批定的文件路径下
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
public static void WriteLog(string msg)
|
||||
{
|
||||
string path = ExePath + "\\logs\\" + DateTime.Now.ToString("yyyyMMdd") + ".log";
|
||||
msg = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":\t " + msg + Environment.NewLine;
|
||||
WriteLog(path, msg, true);
|
||||
}
|
||||
/// <summary>
|
||||
/// 把数据写入指定的文件里
|
||||
/// </summary>
|
||||
/// <param name="path">文件路径(包括文件名称)</param>
|
||||
/// <param name="msg">写入内容</param>
|
||||
/// <param name="append">是否追加</param>
|
||||
public static void WriteLog(string path, string msg, bool append)
|
||||
{
|
||||
string folder = Path.GetDirectoryName(path);
|
||||
if (!Directory.Exists(folder))
|
||||
{
|
||||
Directory.CreateDirectory(folder);
|
||||
}
|
||||
StreamWriter sw = null;
|
||||
try
|
||||
{
|
||||
sw = new StreamWriter(path, append, Encoding.Unicode);
|
||||
sw.WriteLine(msg);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (sw != null)
|
||||
{
|
||||
sw.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
BLWWS_BLL/PmsInterface.cs
Normal file
20
BLWWS_BLL/PmsInterface.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public class PmsInterface
|
||||
{
|
||||
public int pmsId { get; set; }
|
||||
public System.DateTime DateTime { get; set; }
|
||||
public string pmsContent { get; set; }
|
||||
public int hotelid { get; set; }
|
||||
public Nullable<int> room { get; set; }
|
||||
public string faceSN { get; set; }
|
||||
public Nullable<int> issueresult { get; set; }
|
||||
public Nullable<int> pmstype { get; set; }
|
||||
public string messageid { get; set; }
|
||||
}
|
||||
}
|
||||
36
BLWWS_BLL/Properties/AssemblyInfo.cs
Normal file
36
BLWWS_BLL/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过以下
|
||||
// 特性集控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("BLWWS_BLL")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("BLWWS_BLL")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
||||
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("20d6c689-5d18-49a0-9f86-58f8584bc7ef")]
|
||||
|
||||
// 程序集的版本信息由下面四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 内部版本号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
4232
BLWWS_BLL/SqlHelper.cs
Normal file
4232
BLWWS_BLL/SqlHelper.cs
Normal file
File diff suppressed because it is too large
Load Diff
32
BLWWS_BLL/SqlSugarBase.cs
Normal file
32
BLWWS_BLL/SqlSugarBase.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public static class SqlSugarBase
|
||||
{
|
||||
public static SqlSugarClient GesmartDb()
|
||||
{
|
||||
SqlSugarClient Db = new SqlSugarClient(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Database=Face;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;port=3307;",
|
||||
DbType = SqlSugar.DbType.MySql,
|
||||
InitKeyType = InitKeyType.Attribute,//从特性读取主键和自增列信息
|
||||
IsAutoCloseConnection = true,//开启自动释放模式和EF原理一样我就不多解释了
|
||||
});
|
||||
//用来打印Sql方便调式
|
||||
Db.Aop.OnLogExecuting = (sql, pars) =>
|
||||
{
|
||||
Db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value));
|
||||
Debug.WriteLine(sql);
|
||||
};
|
||||
return Db;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
160
BLWWS_BLL/Tools.cs
Normal file
160
BLWWS_BLL/Tools.cs
Normal file
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using RestSharp;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public static class Tools
|
||||
{
|
||||
/// <summary>
|
||||
/// 验证指定的号码是否是手机号码
|
||||
/// </summary>
|
||||
/// <param name="number"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsMobileNumber(string number)
|
||||
{
|
||||
return System.Text.RegularExpressions.Regex.IsMatch(number, @"1[0-9]{10}");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取验证码
|
||||
/// </summary>
|
||||
/// <param name="length">验证码长度</param>
|
||||
/// <returns></returns>
|
||||
public static string CreateValidateCode(int length)
|
||||
{
|
||||
int[] randMembers = new int[length];
|
||||
int[] validateNums = new int[length];
|
||||
System.Text.StringBuilder validateNumberStr = new System.Text.StringBuilder();
|
||||
//生成起始序列值
|
||||
int seekSeek = unchecked((int)DateTime.Now.Ticks);
|
||||
Random seekRand = new Random(seekSeek);
|
||||
int beginSeek = (int)seekRand.Next(0, Int32.MaxValue - length * 10000);
|
||||
int[] seeks = new int[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
beginSeek += 10000;
|
||||
seeks[i] = beginSeek;
|
||||
}
|
||||
//生成随机数字
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
Random rand = new Random(seeks[i]);
|
||||
int pownum = 1 * (int)Math.Pow(10, length);
|
||||
randMembers[i] = rand.Next(pownum, Int32.MaxValue);
|
||||
}
|
||||
//抽取随机数字
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
string numStr = randMembers[i].ToString();
|
||||
int numLength = numStr.Length;
|
||||
Random rand = new Random();
|
||||
int numPosition = rand.Next(0, numLength - 1);
|
||||
validateNums[i] = Int32.Parse(numStr.Substring(numPosition, 1));
|
||||
}
|
||||
//生成验证码
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
validateNumberStr.Append(validateNums[i].ToString());
|
||||
}
|
||||
return validateNumberStr.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// post数据接口
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="postData"></param>
|
||||
/// <param name="method">post和put,默认post</param>
|
||||
/// <returns></returns>
|
||||
public static string PostWebRequest(string url, string postData)
|
||||
{
|
||||
string result = string.Empty;
|
||||
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
|
||||
req.ContentType = "application/json";
|
||||
req.Method = "POST";
|
||||
//req.Timeout = 10000;//设置请求超时时间,单位为毫秒
|
||||
byte[] data = Encoding.UTF8.GetBytes(postData);
|
||||
req.ContentLength = data.Length;
|
||||
using (Stream reqStream = req.GetRequestStream())
|
||||
{
|
||||
reqStream.Write(data, 0, data.Length);
|
||||
}
|
||||
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
|
||||
using (Stream stream = resp.GetResponseStream())
|
||||
{
|
||||
using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
|
||||
{
|
||||
result = reader.ReadToEnd();//获取响应内容
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static string PostWebRequestNew(string url, string postData)
|
||||
{
|
||||
string content = "";
|
||||
try
|
||||
{
|
||||
var client1 = new RestClient(url);
|
||||
var request1 = new RestRequest("", Method.POST);
|
||||
request1.AddJsonBody(postData);
|
||||
var Response = client1.Execute(request1).Content;
|
||||
content = Response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLog(ex.Message);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
public static string ByteToString(byte[] bytesData)
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
foreach (byte r in bytesData)
|
||||
{
|
||||
result.Append(r.ToString("X2") + " ");
|
||||
}
|
||||
return result.ToString().Trim();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 16进制 字符串 转换成 字节 数组
|
||||
/// </summary>
|
||||
/// <param name="hexString"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] HEXString2ByteArray(string hexString)
|
||||
{
|
||||
char[] hexCharacters = hexString.ToCharArray();
|
||||
byte[] byteArray = new byte[hexCharacters.Length / 2];
|
||||
|
||||
for (int i = 0; i < byteArray.Length; i++)
|
||||
{
|
||||
string hexVal = string.Concat(hexCharacters[i * 2], hexCharacters[i * 2 + 1]);
|
||||
byteArray[i] = Convert.ToByte(hexVal, 16);
|
||||
}
|
||||
return byteArray;
|
||||
|
||||
}
|
||||
|
||||
public static long GetCurrentTimeStamp(DateTime dt)
|
||||
{
|
||||
TimeSpan ts = dt - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
|
||||
long current_timestamp = Convert.ToInt64(ts.TotalSeconds);
|
||||
return current_timestamp;
|
||||
}
|
||||
public static DateTime GetCurrentDateTime(long timestampMilliseconds)
|
||||
{
|
||||
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local);
|
||||
DateTime utcTime = epoch.AddSeconds(timestampMilliseconds);
|
||||
return utcTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
BLWWS_BLL/Uploadinfo.cs
Normal file
28
BLWWS_BLL/Uploadinfo.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public class Uploadinfo
|
||||
{
|
||||
|
||||
public string key { get; set; }
|
||||
public string code { get; set; }
|
||||
public long checkInID { get; set; }
|
||||
public int idType { get; set; }
|
||||
public string idCard { get; set; }
|
||||
|
||||
|
||||
public int sex { get; set; }
|
||||
public string name { get; set; }
|
||||
|
||||
public string birthday { get; set; }
|
||||
|
||||
public string photoUrl { get; set; }
|
||||
public string photo { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
21
BLWWS_BLL/app.config
Normal file
21
BLWWS_BLL/app.config
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<remove invariant="MySql.Data.MySqlClient" />
|
||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.7.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.7.9.0" newVersion="6.7.9.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
364
BLWWS_BLL/job_scheduling_data_2_0.xsd
Normal file
364
BLWWS_BLL/job_scheduling_data_2_0.xsd
Normal file
@@ -0,0 +1,364 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
|
||||
targetNamespace="http://quartznet.sourceforge.net/JobSchedulingData"
|
||||
elementFormDefault="qualified"
|
||||
version="2.0">
|
||||
|
||||
<xs:element name="job-scheduling-data">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Root level node</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence maxOccurs="unbounded">
|
||||
<xs:element name="pre-processing-commands" type="pre-processing-commandsType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Commands to be executed before scheduling the jobs and triggers in this file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="processing-directives" type="processing-directivesType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Directives to be followed while scheduling the jobs and triggers in this file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="schedule" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence maxOccurs="unbounded">
|
||||
<xs:element name="job" type="job-detailType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="trigger" type="triggerType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Version of the XML Schema instance</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="pre-processing-commandsType">
|
||||
<xs:sequence maxOccurs="unbounded">
|
||||
<xs:element name="delete-jobs-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete all jobs, if any, in the identified group. "*" can be used to identify all groups. Will also result in deleting all triggers related to the jobs.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="delete-triggers-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete all triggers, if any, in the identified group. "*" can be used to identify all groups. Will also result in deletion of related jobs that are non-durable.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="delete-job" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete the identified job if it exists (will also result in deleting all triggers related to it).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="delete-trigger" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delete the identified trigger if it exists (will also result in deletion of related jobs that are non-durable).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="processing-directivesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="overwrite-existing-data" type="xs:boolean" minOccurs="0" default="true">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Whether the existing scheduling data (with same identifiers) will be overwritten. If false, and ignore-duplicates is not false, and jobs or triggers with the same names already exist as those in the file, an error will occur.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ignore-duplicates" type="xs:boolean" minOccurs="0" default="false">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If true (and overwrite-existing-data is false) then any job/triggers encountered in this file that have names that already exist in the scheduler will be ignored, and no error will be produced.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="schedule-trigger-relative-to-replaced-trigger" type="xs:boolean" minOccurs="0" default="false">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If true trigger's start time is calculated based on earlier run time instead of fixed value. Trigger's start time must be undefined for this to work.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="job-detailType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a JobDetail</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="description" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="job-type" type="xs:string" />
|
||||
<xs:sequence minOccurs="0">
|
||||
<xs:element name="durable" type="xs:boolean" />
|
||||
<xs:element name="recover" type="xs:boolean" />
|
||||
</xs:sequence>
|
||||
<xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="job-data-mapType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a JobDataMap</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="entry" type="entryType" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="entryType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a JobDataMap entry</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="key" type="xs:string" />
|
||||
<xs:element name="value" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="triggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a Trigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:choice>
|
||||
<xs:element name="simple" type="simpleTriggerType" />
|
||||
<xs:element name="cron" type="cronTriggerType" />
|
||||
<xs:element name="calendar-interval" type="calendarIntervalTriggerType" />
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="abstractTriggerType" abstract="true">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Common Trigger definitions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="group" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="description" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="job-name" type="xs:string" />
|
||||
<xs:element name="job-group" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="priority" type="xs:nonNegativeInteger" minOccurs="0" />
|
||||
<xs:element name="calendar-name" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
|
||||
<xs:sequence minOccurs="0">
|
||||
<xs:choice>
|
||||
<xs:element name="start-time" type="xs:dateTime" />
|
||||
<xs:element name="start-time-seconds-in-future" type="xs:nonNegativeInteger" />
|
||||
</xs:choice>
|
||||
<xs:element name="end-time" type="xs:dateTime" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="simpleTriggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a SimpleTrigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="abstractTriggerType">
|
||||
<xs:sequence>
|
||||
<xs:element name="misfire-instruction" type="simple-trigger-misfire-instructionType" minOccurs="0" />
|
||||
<xs:sequence minOccurs="0">
|
||||
<xs:element name="repeat-count" type="repeat-countType" />
|
||||
<xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
|
||||
</xs:sequence>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="cronTriggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a CronTrigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="abstractTriggerType">
|
||||
<xs:sequence>
|
||||
<xs:element name="misfire-instruction" type="cron-trigger-misfire-instructionType" minOccurs="0" />
|
||||
<xs:element name="cron-expression" type="cron-expressionType" />
|
||||
<xs:element name="time-zone" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="calendarIntervalTriggerType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Define a DateIntervalTrigger</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="abstractTriggerType">
|
||||
<xs:sequence>
|
||||
<xs:element name="misfire-instruction" type="date-interval-trigger-misfire-instructionType" minOccurs="0" />
|
||||
<xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
|
||||
<xs:element name="repeat-interval-unit" type="interval-unitType" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="cron-expressionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Cron expression (see JavaDoc for examples)
|
||||
|
||||
Special thanks to Chris Thatcher (thatcher@butterfly.net) for the regular expression!
|
||||
|
||||
Regular expressions are not my strong point but I believe this is complete,
|
||||
with the caveat that order for expressions like 3-0 is not legal but will pass,
|
||||
and month and day names must be capitalized.
|
||||
If you want to examine the correctness look for the [\s] to denote the
|
||||
seperation of individual regular expressions. This is how I break them up visually
|
||||
to examine them:
|
||||
|
||||
SECONDS:
|
||||
(
|
||||
((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
|
||||
| (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
) [\s]
|
||||
MINUTES:
|
||||
(
|
||||
((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
|
||||
| (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
) [\s]
|
||||
HOURS:
|
||||
(
|
||||
((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)
|
||||
| (([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
) [\s]
|
||||
DAY OF MONTH:
|
||||
(
|
||||
((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)
|
||||
| (([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)
|
||||
| (L(-[0-9])?)
|
||||
| (L(-[1-2][0-9])?)
|
||||
| (L(-[3][0-1])?)
|
||||
| (LW)
|
||||
| ([1-9]W)
|
||||
| ([1-3][0-9]W)
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
)[\s]
|
||||
MONTH:
|
||||
(
|
||||
((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)
|
||||
| (([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))
|
||||
| (((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)
|
||||
| ((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
)[\s]
|
||||
DAY OF WEEK:
|
||||
(
|
||||
(([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)
|
||||
| ([1-7]/([1-7]))
|
||||
| (((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)
|
||||
| ((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)
|
||||
| (([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))(L|LW)?)
|
||||
| (([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)
|
||||
| ([\?])
|
||||
| ([\*])
|
||||
)
|
||||
YEAR (OPTIONAL):
|
||||
(
|
||||
[\s]?
|
||||
([\*])?
|
||||
| ((19[7-9][0-9])|(20[0-9][0-9]))?
|
||||
| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?
|
||||
| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?
|
||||
)
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern
|
||||
value="(((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)|(([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))|([\?])|([\*]))[\s](((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)|(([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)|(L(-[0-9])?)|(L(-[1-2][0-9])?)|(L(-[3][0-1])?)|(LW)|([1-9]W)|([1-3][0-9]W)|([\?])|([\*]))[\s](((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)|(([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))|(((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)|((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))|([\?])|([\*]))[\s]((([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)|([1-7]/([1-7]))|(((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)|((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)|(([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))?(L|LW)?)|(([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)|([\?])|([\*]))([\s]?(([\*])?|(19[7-9][0-9])|(20[0-9][0-9]))?| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?)" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="repeat-countType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Number of times to repeat the Trigger (-1 for indefinite)</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="-1" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<xs:simpleType name="simple-trigger-misfire-instructionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Simple Trigger Misfire Instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="SmartPolicy" />
|
||||
<xs:pattern value="RescheduleNextWithExistingCount" />
|
||||
<xs:pattern value="RescheduleNextWithRemainingCount" />
|
||||
<xs:pattern value="RescheduleNowWithExistingRepeatCount" />
|
||||
<xs:pattern value="RescheduleNowWithRemainingRepeatCount" />
|
||||
<xs:pattern value="FireNow" />
|
||||
<xs:pattern value="IgnoreMisfirePolicy" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="cron-trigger-misfire-instructionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Cron Trigger Misfire Instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="SmartPolicy" />
|
||||
<xs:pattern value="DoNothing" />
|
||||
<xs:pattern value="FireOnceNow" />
|
||||
<xs:pattern value="IgnoreMisfirePolicy" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="date-interval-trigger-misfire-instructionType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Date Interval Trigger Misfire Instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="SmartPolicy" />
|
||||
<xs:pattern value="DoNothing" />
|
||||
<xs:pattern value="FireOnceNow" />
|
||||
<xs:pattern value="IgnoreMisfirePolicy" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="interval-unitType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Interval Units</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="Day" />
|
||||
<xs:pattern value="Hour" />
|
||||
<xs:pattern value="Minute" />
|
||||
<xs:pattern value="Month" />
|
||||
<xs:pattern value="Second" />
|
||||
<xs:pattern value="Week" />
|
||||
<xs:pattern value="Year" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
12
BLWWS_BLL/packages.config
Normal file
12
BLWWS_BLL/packages.config
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Common.Logging" version="3.3.1" targetFramework="net40" />
|
||||
<package id="Common.Logging.Core" version="3.3.1" targetFramework="net40" />
|
||||
<package id="CSRedisCore" version="3.8.806" targetFramework="net40" />
|
||||
<package id="MySql.Data" version="6.7.9" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net40" />
|
||||
<package id="NLog" version="6.0.0" targetFramework="net40" />
|
||||
<package id="Quartz" version="2.6.2" targetFramework="net40" />
|
||||
<package id="sqlSugar" version="4.9.9.11" targetFramework="net40" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net40" />
|
||||
</packages>
|
||||
22
BLWWS_BLL/pmsLog.cs
Normal file
22
BLWWS_BLL/pmsLog.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLWWS_BLL
|
||||
{
|
||||
public class pmsLog
|
||||
{
|
||||
public int id { get; set; }
|
||||
public int pmsid { get; set; }
|
||||
public Nullable<int> step { get; set; }
|
||||
public Nullable<int> app { get; set; }
|
||||
public Nullable<System.DateTime> Creationtime { get; set; }
|
||||
public string message { get; set; }
|
||||
public string Data { get; set; }
|
||||
public string HotelCode { get; set; }
|
||||
public string roomid { get; set; }
|
||||
public string Ip { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user