|
|
@ -446,6 +446,43 @@ namespace Stone.WinBiz.JISAdmin |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#region 监控ASN报文是否成功生成
|
|
|
|
|
|
|
|
var strAsnUpLoadsql = "select top 1 * from t_ASN_UPLOAD where isCreate = 0 order by uid "; |
|
|
|
var dsAsnUpLoad = db.Exec_DataSet(strAsnUpLoadsql); |
|
|
|
if (dsAsnUpLoad.Tables[0].Rows.Count > 0) |
|
|
|
{ |
|
|
|
//获取 ASN报文上传的时间
|
|
|
|
var createTime = DateTime.Parse(dsAsnUpLoad.Tables[0].Rows[0]["CreateTime"].ToString()); |
|
|
|
var nowTime = DateTime.Now; |
|
|
|
TimeSpan timeSpan = nowTime - createTime; |
|
|
|
var min = timeSpan.TotalMinutes; |
|
|
|
//超出10分钟 报文未生成,则进行预警预警
|
|
|
|
if (min > 10) |
|
|
|
{ |
|
|
|
var strErrTypeCode = "08"; |
|
|
|
var strsql = "select top 1 * from t_ErrTypeLevel" + |
|
|
|
" where Code = '" + strErrTypeCode + "'" + |
|
|
|
" order by id desc"; |
|
|
|
var dsErrMail = db.Exec_DataSet(strsql); |
|
|
|
if (dsErrMail.Tables[0].Rows.Count > 0) |
|
|
|
{ |
|
|
|
//获取收件人
|
|
|
|
var mailTo = dsErrMail.Tables[0].Rows[0]["ToPerson"].ToString(); |
|
|
|
var errLvevl = dsErrMail.Tables[0].Rows[0]["ErrLevel"].ToString(); |
|
|
|
var errTypeDesc = dsErrMail.Tables[0].Rows[0]["ErrTypeDesc"].ToString(); |
|
|
|
//设置邮件标题
|
|
|
|
var title = ""; |
|
|
|
title = "服务器器ASN报文生成失败-错误级别-" + errLvevl + "-" + errTypeDesc; |
|
|
|
var strDetails = ""; |
|
|
|
var asnNum = dsAsnUpLoad.Tables[0].Rows[0]["AsnNum"].ToString(); |
|
|
|
strDetails = "ASN【" + asnNum + "】已超出10分钟未生成报文!"; |
|
|
|
F_Mail.Send(title, strDetails, mailTo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
Msg = strPartMsg; |
|
|
|
} |
|
|
|
|
|
|
|