This commit is contained in:
jackchenyang 2024-05-17 23:21:21 +08:00
parent fe82692030
commit 6187cd3f47
9 changed files with 365 additions and 224 deletions

View File

@ -162,7 +162,7 @@
</site>
<site name="WebApi" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:3862:localhost" />

Binary file not shown.

View File

@ -161,7 +161,6 @@
<Compile Include="PublicInfo\FileControl\FileControl_DomesticStandardsService.cs" />
<Compile Include="PublicInfo\FileControl\FileControl_ForeignStandardsService.cs" />
<Compile Include="PublicInfo\WPQ\WPQListService.cs" />
<Compile Include="SendEmailService.cs" />
<Compile Include="SessionName.cs" />
<Compile Include="SoftRegeditService.cs" />
<Compile Include="SQLHelper.cs" />

View File

@ -46,77 +46,92 @@ namespace FineUIPro.Web.common
mailFrom = ps.EmailYx;
}
MailMessage email = new MailMessage();
//MailAddress emailFrom = new MailAddress(mailFrom);
//MailMessage email = new MailMessage();
////MailAddress emailFrom = new MailAddress(mailFrom);
//发件人
email.From = new MailAddress(mailFrom, ps.EmailYx);//发件人地址
////发件人
//email.From = new MailAddress(mailFrom, ps.EmailYx);//发件人地址
//收件人
if (mailTo != null && mailTo.Length > 0)
{
foreach (string send in mailTo)
{
if (!String.IsNullOrEmpty(send))
{
email.To.Add(send);
}
}
}
////收件人
//if (mailTo != null && mailTo.Length > 0)
//{
// foreach (string send in mailTo)
// {
// if (!String.IsNullOrEmpty(send))
// {
// email.To.Add(send);
// }
// }
//}
//加抄送
if (mailCC != null && mailCC.Length > 0)
{
////加抄送
//if (mailCC != null && mailCC.Length > 0)
//{
foreach (string cc in mailCC)
{
if (!String.IsNullOrEmpty(cc))
{
email.CC.Add(cc);
}
}
}
// foreach (string cc in mailCC)
// {
// if (!String.IsNullOrEmpty(cc))
// {
// email.CC.Add(cc);
// }
// }
//}
//主题
email.Subject = mailSubject;
//内容
email.Body = mailBody;
//附件
if (!string.IsNullOrEmpty(mailAttch))
{
string[] attachments = mailAttch.Split(';');
foreach (string file in attachments)
{
System.Net.Mail.Attachment attach = new System.Net.Mail.Attachment(file, System.Net.Mime.MediaTypeNames.Application.Octet);
//为附件添加发送时间
System.Net.Mime.ContentDisposition disposition = attach.ContentDisposition;
disposition.CreationDate = System.IO.File.GetCreationTime(file);
disposition.ModificationDate = System.IO.File.GetLastWriteTime(file);
disposition.ReadDate = System.IO.File.GetLastAccessTime(file);
//添加附件
email.Attachments.Add(attach);
}
}
////主题
//email.Subject = mailSubject;
////内容
//email.Body = mailBody;
////附件
//if (!string.IsNullOrEmpty(mailAttch))
//{
// string[] attachments = mailAttch.Split(';');
// foreach (string file in attachments)
// {
// System.Net.Mail.Attachment attach = new System.Net.Mail.Attachment(file, System.Net.Mime.MediaTypeNames.Application.Octet);
// //为附件添加发送时间
// System.Net.Mime.ContentDisposition disposition = attach.ContentDisposition;
// disposition.CreationDate = System.IO.File.GetCreationTime(file);
// disposition.ModificationDate = System.IO.File.GetLastWriteTime(file);
// disposition.ReadDate = System.IO.File.GetLastAccessTime(file);
// //添加附件
// email.Attachments.Add(attach);
// }
//}
//优先级
email.Priority = (mailPriority == "High") ? System.Net.Mail.MailPriority.High : System.Net.Mail.MailPriority.Normal;
//内容编码、格式
email.BodyEncoding = System.Text.Encoding.UTF8;
email.IsBodyHtml = true;
//email.Priority = (mailPriority == "High") ? System.Net.Mail.MailPriority.High : System.Net.Mail.MailPriority.Normal;
////内容编码、格式
//email.BodyEncoding = System.Text.Encoding.UTF8;
//email.IsBodyHtml = true;
//SMTP服务器
System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(ps.EmailFwq);
client.UseDefaultCredentials = true;
//验证Credentials 凭证)
client.Credentials = new System.Net.NetworkCredential(mailFrom, ps.EmailPass);
//处理待发的电子邮件的方法 (Delivery 发送,传输)
client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
//System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(ps.EmailFwq);
//client.EnableSsl = false;
//client.UseDefaultCredentials = true;
////验证Credentials 凭证)
//client.Credentials = new System.Net.NetworkCredential(mailFrom, ps.EmailPass);
////处理待发的电子邮件的方法 (Delivery 发送,传输)
//client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();
try
{
mail.From = ps.EmailYx;
mail.To = string.Join(",", mailTo);
mail.Subject = mailSubject;
mail.BodyFormat = System.Web.Mail.MailFormat.Html;
mail.Body =mailBody;
mail.Cc = string.Join(",", mailCC);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", ps.EmailYx);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", ps.EmailPass);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport",ps.EmailDk);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
System.Web.Mail.SmtpMail.SmtpServer = ps.EmailFwq;
System.Web.Mail.SmtpMail.Send(mail);
BLL.ErrLogInfo.WriteLog("开始发送邮件");
//发送邮件
client.Send(email);
//client.Send(email);
BLL.ErrLogInfo.WriteLog("发送中...");
if (mailTo != null && mailTo.Length > 0)
{
foreach (string send in mailTo)
@ -140,6 +155,7 @@ namespace FineUIPro.Web.common
}
catch (Exception ex)
{
BLL.ErrLogInfo.WriteLog(ex, "发送邮件失败");
if (mailTo != null && mailTo.Length > 0)
{
List<Email_SendLog> ss = new List<Email_SendLog>();
@ -155,6 +171,7 @@ namespace FineUIPro.Web.common
newSendEmail.EmailName = send;
newSendEmail.EmailStatus = "发送失败";
newSendEmail.CreateTime = DateTime.Now;
newSendEmail.ErrorMsg = ex.Message;
newSendEmail.CreateName = "sys";
BLL.Email_Send.Email_SendLogService.AddEmail_SendLog(newSendEmail);
}

View File

@ -1,92 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace BLL
{
public class SendEmailService
{
/// <summary>
///
/// </summary>
/// <param name="sender">发件人</param>
/// <param name="receiver">收件人</param>
/// <param name="title">标题</param>
/// <param name="content">内容</param>
/// <param name="FulPath">附件地址</param>
/// <param name="passWord">密码</param>
/// <returns></returns>
public static bool SendEmail(string sender, string receiver, string title, string content, string FulPath, string passWord)
{
bool IsSend = true;
MailMessage mailObject = new MailMessage();
string fromAddress = sender; //发件人
MailAddress mayAddress = new MailAddress(fromAddress);
mailObject.SubjectEncoding = System.Text.Encoding.UTF8;
mailObject.BodyEncoding = System.Text.Encoding.UTF8;
//设置邮件的收件人
string address = "";
string[] mailNames = (receiver + ";").Split(';');
foreach (string name in mailNames)
{
if (name != string.Empty)
{
if (name.IndexOf('<') > 0)
{
address = name.Substring(name.IndexOf('<') + 1).Replace('>', ' ');
}
else
{
address = name.Substring(name.IndexOf('<') + 1).Replace('>', ' ');
}
mailObject.To.Add(new MailAddress(address));//收件人
}
}
mailObject.From = mayAddress;
mailObject.Subject = title;// "标题";
mailObject.Body = content;//"内容";
mailObject.IsBodyHtml = false;
//设置邮件的附件将在客户端选择的附件先上传到服务器保存一个然后加入到mail中
//设置邮件的附件将在客户端选择的附件先上传到服务器保存一个然后加入到mail中
if (!String.IsNullOrEmpty(FulPath))
{
mailObject.Attachments.Add(new Attachment(FulPath));
mailObject.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;
}
SmtpClient client;
client = new SmtpClient("smtp." + fromAddress.Substring(fromAddress.LastIndexOf("@") + 1));
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
client.Timeout = 60000;
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(fromAddress, passWord);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
try
{
client.Send(mailObject);
return IsSend;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog(ex);
return !IsSend;
}
}
}
}

View File

@ -149,7 +149,7 @@ namespace FineUIPro.Web.Email_Send
bool f = MailHelper.SendNetMail(pop, mailFrom, mailTo, mailSubject, mailBody, mailAttch, mailCode, mailPriority, mailCC, out resultMessage);
if (f == true)
{
ShowNotify("Send Successfully!", MessageBoxIcon.Success);
ShowNotify("发送成功!", MessageBoxIcon.Success);
}
else
{

View File

@ -9,7 +9,7 @@
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="HJGLDBConnectionString" connectionString="Data Source=.\sql2016;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=1111;"/>
<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=Sh@nghai9;"/>
<!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB;Integrated Security=True"
providerName="System.Data.SqlClient" />-->
</connectionStrings>

View File

@ -13428,6 +13428,8 @@ namespace Model
private string _CreateName;
private string _ErrorMsg;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -13448,6 +13450,8 @@ namespace Model
partial void OnCreateTimeChanged();
partial void OnCreateNameChanging(string value);
partial void OnCreateNameChanged();
partial void OnErrorMsgChanging(string value);
partial void OnErrorMsgChanged();
#endregion
public Email_SendLog()
@ -13615,6 +13619,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ErrorMsg", DbType="NText", UpdateCheck=UpdateCheck.Never)]
public string ErrorMsg
{
get
{
return this._ErrorMsg;
}
set
{
if ((this._ErrorMsg != value))
{
this.OnErrorMsgChanging(value);
this.SendPropertyChanging();
this._ErrorMsg = value;
this.SendPropertyChanged("ErrorMsg");
this.OnErrorMsgChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -22456,12 +22480,12 @@ namespace Model
private string _DetectionStandard;
private string _Tabler;
private string _Remark;
private System.Nullable<System.DateTime> _CreatedTime;
private string _Tabler;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -22480,12 +22504,12 @@ namespace Model
partial void OnUnitIdChanged();
partial void OnDetectionStandardChanging(string value);
partial void OnDetectionStandardChanged();
partial void OnTablerChanging(string value);
partial void OnTablerChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnCreatedTimeChanging(System.Nullable<System.DateTime> value);
partial void OnCreatedTimeChanged();
partial void OnTablerChanging(string value);
partial void OnTablerChanged();
#endregion
public PMI_Delegation()
@ -22553,7 +22577,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
@ -22633,26 +22657,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tabler", DbType="NVarChar(50)")]
public string Tabler
{
get
{
return this._Tabler;
}
set
{
if ((this._Tabler != value))
{
this.OnTablerChanging(value);
this.SendPropertyChanging();
this._Tabler = value;
this.SendPropertyChanged("Tabler");
this.OnTablerChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(255)")]
public string Remark
{
@ -22693,6 +22697,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tabler", DbType="NVarChar(50)")]
public string Tabler
{
get
{
return this._Tabler;
}
set
{
if ((this._Tabler != value))
{
this.OnTablerChanging(value);
this.SendPropertyChanging();
this._Tabler = value;
this.SendPropertyChanged("Tabler");
this.OnTablerChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -22732,10 +22756,10 @@ namespace Model
private int _Status;
private System.Nullable<System.DateTime> _CheckTime;
private string _ReportNo;
private System.Nullable<System.DateTime> _CheckTime;
private System.Nullable<System.DateTime> _ReportTime;
#region
@ -22754,10 +22778,10 @@ namespace Model
partial void OnAcceptanceChanged();
partial void OnStatusChanging(int value);
partial void OnStatusChanged();
partial void OnCheckTimeChanging(System.Nullable<System.DateTime> value);
partial void OnCheckTimeChanged();
partial void OnReportNoChanging(string value);
partial void OnReportNoChanged();
partial void OnCheckTimeChanging(System.Nullable<System.DateTime> value);
partial void OnCheckTimeChanged();
partial void OnReportTimeChanging(System.Nullable<System.DateTime> value);
partial void OnReportTimeChanged();
#endregion
@ -22867,7 +22891,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="Int NOT NULL")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="status", Storage="_Status", DbType="Int NOT NULL")]
public int Status
{
get
@ -22887,26 +22911,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="checkTime", Storage="_CheckTime", DbType="DateTime")]
public System.Nullable<System.DateTime> CheckTime
{
get
{
return this._CheckTime;
}
set
{
if ((this._CheckTime != value))
{
this.OnCheckTimeChanging(value);
this.SendPropertyChanging();
this._CheckTime = value;
this.SendPropertyChanged("CheckTime");
this.OnCheckTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="reportNo", Storage="_ReportNo", DbType="NVarChar(50)")]
public string ReportNo
{
@ -22927,6 +22931,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="checkTime", Storage="_CheckTime", DbType="DateTime")]
public System.Nullable<System.DateTime> CheckTime
{
get
{
return this._CheckTime;
}
set
{
if ((this._CheckTime != value))
{
this.OnCheckTimeChanging(value);
this.SendPropertyChanging();
this._CheckTime = value;
this.SendPropertyChanged("CheckTime");
this.OnCheckTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="reportTime", Storage="_ReportTime", DbType="DateTime")]
public System.Nullable<System.DateTime> ReportTime
{
@ -38567,6 +38591,8 @@ namespace Model
private string _ProjectId;
private System.Nullable<bool> _IsPMI;
private string _PipelineCode;
private string _PipelineId;
@ -38697,6 +38723,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="isPMI", Storage="_IsPMI", DbType="Bit")]
public System.Nullable<bool> IsPMI
{
get
{
return this._IsPMI;
}
set
{
if ((this._IsPMI != value))
{
this._IsPMI = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
public string PipelineCode
{
@ -40705,8 +40747,6 @@ namespace Model
private string _PipingClassCode;
private string _PIPClassCode;
private string _WeldingDate;
private System.Nullable<bool> _IsCancel;
@ -41815,22 +41855,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PIPClassCode", DbType="NVarChar(50)")]
public string PIPClassCode
{
get
{
return this._PIPClassCode;
}
set
{
if ((this._PIPClassCode != value))
{
this._PIPClassCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDate", DbType="VarChar(100)")]
public string WeldingDate
{
@ -46227,7 +46251,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WelderIds", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WelderIds", DbType="VarChar(1000)")]
public string WelderIds
{
get

View File

@ -0,0 +1,193 @@
USE [HJGLDB_ZJBSF]
GO
/****** Object: Table [dbo].[Email_Params] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_Params](
[ID] [varchar](50) NOT NULL,
[MailClassName] [varchar](100) NULL,
[MailClassID] [varchar](50) NOT NULL,
[CreateName] [varchar](100) NOT NULL,
[CreateTime] [datetime] NOT NULL,
[UpdateName] [nchar](10) NULL,
[UpdateTime] [datetime] NULL,
CONSTRAINT [PK_Email_Params] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_Pop] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_Pop](
[EmailID] [varchar](50) NOT NULL,
[EmailFwq] [varchar](50) NULL,
[EmailDk] [varchar](50) NULL,
[EmailYx] [varchar](50) NULL,
[EmailUsername] [varchar](50) NULL,
[EmailPass] [varchar](50) NULL,
[CreateTime] [varchar](50) NULL,
[CreateName] [varchar](50) NULL,
[UpdateTime] [varchar](50) NULL,
[UpdateName] [varchar](50) NULL,
CONSTRAINT [PK_Email_Pop] PRIMARY KEY CLUSTERED
(
[EmailID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_SendLog] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_SendLog](
[EmailId] [varchar](50) NOT NULL,
[EmailTile] [varchar](255) NULL,
[EmailContent] [text] NULL,
[EmailURL] [varchar](50) NULL,
[EmailName] [varchar](50) NULL,
[EmailStatus] [varchar](10) NULL,
[CreateTime] [datetime] NULL,
[CreateName] [varchar](50) NULL,
CONSTRAINT [PK_Email_Send] PRIMARY KEY CLUSTERED
(
[EmailId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_SendTemplate] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_SendTemplate](
[EmailId] [varchar](50) NOT NULL,
[EmailParamsID] [varchar](50) NOT NULL,
[EailTiaoJian] [varchar](500) NULL,
[EmailUserYN] [int] NULL,
[EmailTitle] [varchar](500) NULL,
[EmailContext] [text] NULL,
[CreateName] [varchar](500) NULL,
[CreateTime] [datetime] NULL,
[UpdateName] [varchar](500) NULL,
[UpdateTime] [datetime] NULL,
[EmailDesc] [varchar](500) NULL,
CONSTRAINT [PK_Email_SendTemplate] PRIMARY KEY CLUSTERED
(
[EmailId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_ToPeople] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_ToPeople](
[EmID] [varchar](50) NOT NULL,
[EmtempID] [varchar](50) NOT NULL,
[EmuserID] [varchar](50) NULL,
[EmuserName] [varchar](50) NULL,
[EmuaerEmailAddress] [varchar](100) NULL,
[EMPeopleType] [varchar](5) NULL,
CONSTRAINT [PK_Email_ToPeople] PRIMARY KEY CLUSTERED
(
[EmID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[Email_Params] ([ID], [MailClassName], [MailClassID], [CreateName], [CreateTime], [UpdateName], [UpdateTime]) VALUES (N'1a800170-48e2-4b41-a2af-20258aa74907', N'监理审核', N'监理', N'管理员', CAST(N'2024-05-16T14:53:01.747' AS DateTime), N'管理员 ', CAST(N'2024-05-16T17:05:42.987' AS DateTime))
GO
INSERT [dbo].[Email_Params] ([ID], [MailClassName], [MailClassID], [CreateName], [CreateTime], [UpdateName], [UpdateTime]) VALUES (N'859e5eaf-6a9e-46a8-8eb1-f3ba61f3be79', N'管理公司审核', N'管理公司', N'管理员', CAST(N'2024-05-14T17:39:53.640' AS DateTime), N'管理员 ', CAST(N'2024-05-16T17:05:48.370' AS DateTime))
GO
INSERT [dbo].[Email_Pop] ([EmailID], [EmailFwq], [EmailDk], [EmailYx], [EmailUsername], [EmailPass], [CreateTime], [CreateName], [UpdateTime], [UpdateName]) VALUES (N'7EC5E991-B7A0-495A-90ED-2BE15370C959', N'smtp.163.com', N'25', N'Scs13965090560@163.com', N'scs', N'CLXGLMKBGQBEXSSW', N'2024-5-16 14:46:25', N'管理员', NULL, NULL)
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'3cfa3bbf-e73a-494b-bb60-f682b52dad84', N'监理—点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2105</span>条点口记录待审核!</p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:32:14.573' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'3f61427f-2b6f-42cb-8028-27726807f8e8', N'测试再发送一个邮件', N'这是一个邮件内容,请查收!', N'408299694@qq.com', N'408299694@qq.com', N'发送成功', CAST(N'2024-05-16T14:51:03.117' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'632f4c12-08c6-4f19-88a1-5ed760486ae0', N'测试发邮件', N'这个是一个测试的发送邮件内容。。。。', N'874821510@qq.com', N'874821510@qq.com', N'发送失败', CAST(N'2024-05-16T14:45:45.350' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'6488713b-86f4-4dc2-989c-32152fe53727', N'管理公司—点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2176</span>条点口记录待审核!</p><p><br style="text-wrap: wrap;"/></p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:32:16.627' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'709cb7de-0564-4ab9-84e6-0b0b2f6732d8', N'测试再发送一个邮件', N'这是一个邮件内容,请查收!', N'874821510@qq.com', N'874821510@qq.com', N'发送成功', CAST(N'2024-05-16T14:51:03.113' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'9857506c-83a4-4b79-b09a-d6e061376f17', N'点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2176</span>条点口记录待审核!</p><p><br style="text-wrap: wrap;"/></p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:26:32.310' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'd349818c-9434-4ff9-ab73-c868c81de870', N'点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2105</span>条点口记录待审核!</p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:26:10.880' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'd8740146-2ce5-4582-baa0-45063e967f02', N'测试发邮件', N'这个是一个测试的发送邮件内容。。。。', N'874821510@qq.com', N'874821510@qq.com', N'发送成功', CAST(N'2024-05-16T14:46:31.487' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendTemplate] ([EmailId], [EmailParamsID], [EailTiaoJian], [EmailUserYN], [EmailTitle], [EmailContext], [CreateName], [CreateTime], [UpdateName], [UpdateTime], [EmailDesc]) VALUES (N'1a605eaf-6e0a-49d2-a0db-9e1238b65e8a', N'监理', N'点口未审核的焊口', 1, N'监理点口审核', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">{{totalCount}}</span>条点口记录待审核!</p><p><br/></p>', N'管理员', CAST(N'2024-05-16T17:04:30.020' AS DateTime), N'管理员', CAST(N'2024-05-17T14:16:54.980' AS DateTime), NULL)
GO
INSERT [dbo].[Email_SendTemplate] ([EmailId], [EmailParamsID], [EailTiaoJian], [EmailUserYN], [EmailTitle], [EmailContext], [CreateName], [CreateTime], [UpdateName], [UpdateTime], [EmailDesc]) VALUES (N'ad5201c3-0398-4316-a880-0a285e0f06fa', N'管理公司', N'点口未审核的焊口', 1, N'管理公司点口审核', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">{{totalCount}}</span>条点口记录待审核!</p><p><br style="text-wrap: wrap;"/></p><p><br/></p>', N'管理员', CAST(N'2024-05-16T14:54:15.743' AS DateTime), N'管理员', CAST(N'2024-05-17T14:16:58.267' AS DateTime), NULL)
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'33e99721-b831-46f5-83b6-039be6a89050', N'1a605eaf-6e0a-49d2-a0db-9e1238b65e8a', N'29188391-731e-4645-ad09-c99c2a9fc6ce', N'李庆华', N'jackchenyang@sina.cn', N'0')
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'6144c9f6-6e91-4e88-ae3a-fe9f99bc78af', N'ad5201c3-0398-4316-a880-0a285e0f06fa', N'29188391-731e-4645-ad09-c99c2a9fc6ce', N'李庆华', N'jackchenyang@sina.cn', N'0')
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'd78fa8fb-b675-4264-8040-8a0cf3d9649d', N'1a605eaf-6e0a-49d2-a0db-9e1238b65e8a', N'18485804-501b-4123-9e9a-1afb3c53aed0', N'陈阳', N'874821510@qq.com', N'1')
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'ff5fefa1-2ab8-4643-b3f7-b38fd049597a', N'ad5201c3-0398-4316-a880-0a285e0f06fa', N'18485804-501b-4123-9e9a-1afb3c53aed0', N'陈阳', N'874821510@qq.com', N'1')
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_Email_Params] Script Date: 2024-5-17 15:35:13 ******/
ALTER TABLE [dbo].[Email_Params] ADD CONSTRAINT [IX_Email_Params] UNIQUE NONCLUSTERED
(
[MailClassID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_Email_SendTemplate] Script Date: 2024-5-17 15:35:13 ******/
ALTER TABLE [dbo].[Email_SendTemplate] ADD CONSTRAINT [IX_Email_SendTemplate] UNIQUE NONCLUSTERED
(
[EmailParamsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Email_Params] ADD CONSTRAINT [DF_Email_Params_CreateName] DEFAULT ('sys') FOR [CreateName]
GO
ALTER TABLE [dbo].[Email_Params] ADD CONSTRAINT [DF_Email_Params_CreateTime] DEFAULT (getdate()) FOR [CreateTime]
GO
ALTER TABLE [dbo].[Email_ToPeople] ADD CONSTRAINT [DF_Email_ToPeople_EMPeopleType] DEFAULT ((0)) FOR [EMPeopleType]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_Params', @level2type=N'COLUMN',@level2name=N'MailClassName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_Params', @level2type=N'COLUMN',@level2name=N'MailClassID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参数MailClassID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailParamsID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容条件说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EailTiaoJian'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailTitle'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件具体内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailContext'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailDesc'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送人类型 0-发送人 1-抄送人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_ToPeople', @level2type=N'COLUMN',@level2name=N'EMPeopleType'
GO
--- 插入菜单
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'97143EDB-6A32-4BBA-9F49-E33E87912BC8', N'发送邮件', N'Send Email', N'Email_Send/Email_Send_Edit.aspx', 10, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'9E9DD8E3-D91B-4FD4-B922-2F5CC23D2745', N'邮件配置', N'Send Email Pop', N'Email_Send/Email_Pop_Edit.aspx', 20, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'发送邮件', N'Send Email', N'', 60, N'0', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'F19A6438-C757-4BC2-ADC2-72AAF02089E5', N'邮件类型', N'Mail Parameters', N'Email_Send/Email_Params_List.aspx', 60, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'06EB7C08-6F6E-433B-91A7-579BFC435A0C', N'邮件模板设置', N'Send Email Template', N'Email_Send/Email_SendTemplate_List.aspx', 40, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'5941BE0C-C262-48C7-899F-F0BE5A779926', N'发送邮件日志', N'Send Email Log', N'Email_Send/Email_SendLog_List.aspx', 30, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
SELECT * FROM dbo.Sys_Menu WHERE MenuName LIKE '%邮件%'