|
|
|
@ -27,6 +27,9 @@ using DSWeb.Areas.MvcShipping.Helper;
|
|
|
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using DSWeb.MvcShipping.Models.MsOpSeaePre;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsInfoClient;
|
|
|
|
|
using DSWeb.Areas.MvcShipping.Models.Message.VGM;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
|
|
|
|
|
{
|
|
|
|
@ -1577,6 +1580,78 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
|
|
|
|
|
var filepath = "";
|
|
|
|
|
result = MsSeaeOrderDAL.SendMailWithFile(mailtitle, Body.ToString(), filepath, mailto, MailSendName);
|
|
|
|
|
}
|
|
|
|
|
if (headData.CARRIER == "CMA") {
|
|
|
|
|
|
|
|
|
|
var predata = MsOpSeaePreDAL.MsOpSeaePreDAL.GetData("ORDNO='"+headData.ORDNO+"'");
|
|
|
|
|
if (!string.IsNullOrEmpty(predata.ORDNO)) {
|
|
|
|
|
审核通过时发送邮件2(headData, predata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static DBResult 审核通过时发送邮件2(MsSeaeOrder headData, MsOpSeaePre PreData)
|
|
|
|
|
{
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
//向该业务的操作、该业务的录入人 发送邮件
|
|
|
|
|
//对操作OP而言,如果ORDEROP_EMAIL当中有邮箱 则优先向这个邮箱发送邮件
|
|
|
|
|
var mailtitle = "现舱售出:"+headData.MBLNO+"-"+headData.LANE;
|
|
|
|
|
|
|
|
|
|
var Body = new StringBuilder();
|
|
|
|
|
Body.Append("<html> <Body>");
|
|
|
|
|
Body.Append("<br />原现舱信息:<br />提单号:" + PreData.MBLNO);
|
|
|
|
|
Body.Append("<br />航线:" + PreData.LANE);
|
|
|
|
|
Body.Append("<br />运费协议号:" + PreData.CONTRACTNO);
|
|
|
|
|
Body.Append("<br />目的地:" + PreData.PORTDISCHARGE);
|
|
|
|
|
Body.Append("<br />船期:" + PreData.ETD);
|
|
|
|
|
Body.Append("<br />船名航次:" + PreData.VESSEL + " " + PreData.VOYNO);
|
|
|
|
|
Body.Append("<br />箱型箱量:" + PreData.CNTRTOTAL);
|
|
|
|
|
Body.Append("<br />订舱代理:" + PreData.FORWARDER);
|
|
|
|
|
Body.Append("<br />业务人:" + headData.SALE);
|
|
|
|
|
Body.Append("<br />委托单位:" + PreData.CUSTOMERNAME);
|
|
|
|
|
Body.Append("<br />");
|
|
|
|
|
|
|
|
|
|
Body.Append("<br />更改后信息:<br />提单号:" + headData.MBLNO);
|
|
|
|
|
Body.Append("<br />航线:" + headData.LANE);
|
|
|
|
|
Body.Append("<br />运费协议号:" + headData.CONTRACTNO);
|
|
|
|
|
Body.Append("<br />目的地:" + headData.DESTINATION);
|
|
|
|
|
Body.Append("<br />船期:" + headData.ETD);
|
|
|
|
|
Body.Append("<br />船名航次:" + headData.VESSEL+" "+headData.VOYNO);
|
|
|
|
|
Body.Append("<br />箱型箱量:" + headData.CNTRTOTAL);
|
|
|
|
|
Body.Append("<br />订舱代理:" + headData.FORWARDER);
|
|
|
|
|
Body.Append("<br />业务人:" + headData.SALE);
|
|
|
|
|
Body.Append("<br />委托单位:" + headData.CUSTOMERNAME);
|
|
|
|
|
Body.Append("</Body></html> ");
|
|
|
|
|
var mailto = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mailtoAdd(string mail)
|
|
|
|
|
{
|
|
|
|
|
if (mailto == "")
|
|
|
|
|
mailto = mail;
|
|
|
|
|
else
|
|
|
|
|
mailto = mailto + ";" + mail;
|
|
|
|
|
}
|
|
|
|
|
var carrier = MsInfoClientDAL.GetData("SHORTNAME='"+headData.CARRIER+"'");
|
|
|
|
|
if (!string.IsNullOrEmpty(carrier.EMAIL)) {
|
|
|
|
|
mailtoAdd(carrier.EMAIL);
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(carrier.MSN))
|
|
|
|
|
{
|
|
|
|
|
mailtoAdd(carrier.MSN);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mailto != "")
|
|
|
|
|
{
|
|
|
|
|
var j = 0;
|
|
|
|
|
var filepath = "";
|
|
|
|
|
result = MsSeaeOrderDAL.SendMailWithFile(mailtitle, Body.ToString(), filepath, mailto, "");
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|