|
|
@ -1036,201 +1036,237 @@ namespace djy.Service.Ams
|
|
|
|
Response req = new Response();
|
|
|
|
Response req = new Response();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
AMSReturnDto retdto = Json.JsonToObject<AMSReturnDto>(msg);
|
|
|
|
AMSReturnDto retdto = Json.JsonToObject<AMSReturnDto>(msg);
|
|
|
|
_LogsAdd("SaveReceipt", "post", $"AMS接口推送:{msg}");
|
|
|
|
_LogsAdd("SaveReceipt", "post", $"AMS接口推送:{msg}");
|
|
|
|
if (retdto != null)
|
|
|
|
if (retdto != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var masterid = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.GID == retdto.businessId).ToList().Select(x => x.PID).FirstOrDefault();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Transaction(() =>
|
|
|
|
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (retdto.status == "W2")
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
var masterid = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.GID == retdto.businessId).ToList().Select(x => x.PID).FirstOrDefault();
|
|
|
|
|
|
|
|
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.GID == retdto.businessId).ToOne();
|
|
|
|
if (house != null)
|
|
|
|
if (retdto.status == "W2")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
if (house != null)
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "海关接收成功";
|
|
|
|
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关接收成功";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "海关接收成功";
|
|
|
|
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关接收成功";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关接收成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (house.NewNotice == "修改发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (house.MateState.Contains("3Z"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "3Z,"+retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关接收成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (retdto.status == "1Y")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
if (house != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "船司匹配成功";
|
|
|
|
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "船司匹配成功";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "船司匹配成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (house.NewNotice == "修改发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (house.MateState.Contains("3Z"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "3Z," + retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (retdto.status == "3Z")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (house != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "ISF匹配成功";
|
|
|
|
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ISF匹配成功";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "ISF匹配成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "ISF匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (retdto.status == "W1")
|
|
|
|
else if (retdto.status == "1Y")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
if (house != null )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "船司匹配成功";
|
|
|
|
history.State = "海关拒绝";
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
history.Remark = "您的单据"+house.HBLNo+"于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "船司匹配成功";
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝";
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "船司匹配成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
if (house.NewNotice == "修改发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (retdto.status == "2Z")
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (retdto.status == "3Z")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (house != null )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
history.State = "ISF匹配成功";
|
|
|
|
history.State = "箱货信息不匹配";
|
|
|
|
history.Type = "匹配成功";
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
history.Remark = "您的单据"+house.HBLNo+"于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ISF匹配成功";
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "箱货信息不匹配";
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "ISF匹配成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "ISF匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
if (house.NewNotice == "修改发送成功")
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (retdto.status == "W1")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "海关拒绝";
|
|
|
|
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据"+house.HBLNo+"于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if (house.NewNotice == "修改发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
else if (retdto.status == "2Z")
|
|
|
|
}
|
|
|
|
{
|
|
|
|
else
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
{
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "箱货信息不匹配";
|
|
|
|
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo+ "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "箱货信息不匹配";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
if (house.NewNotice == "修改发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "匹配失败";
|
|
|
|
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "匹配失败";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
}
|
|
|
|
{
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AMS_MasterHistory history = new AMS_MasterHistory();
|
|
|
|
|
|
|
|
history.GID = Guid.NewGuid().ToString("N");
|
|
|
|
|
|
|
|
history.AM_ID = masterid;
|
|
|
|
|
|
|
|
history.SendTime = DateTime.Now;
|
|
|
|
|
|
|
|
history.State = "匹配失败";
|
|
|
|
|
|
|
|
history.Type = "匹配失败";
|
|
|
|
|
|
|
|
history.Operator = "系统管理员";
|
|
|
|
|
|
|
|
history.Remark = "您的单据" + house.HBLNo+ "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "匹配失败";
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (house.NewNotice == "删除发送成功")
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if (house.NewNotice == "修改发送成功")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if (house.NewNotice == "修改发送成功")
|
|
|
|
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1411,12 +1447,27 @@ namespace djy.Service.Ams
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeProvince>().ToList().Where(x=>x.Country==code).Select(x => new CommonCodeValue
|
|
|
|
if (!string.IsNullOrEmpty(code))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Code = x.Code,
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeProvince>().ToList().Where(x => x.Country == code).Select(x => new CommonCodeValue
|
|
|
|
Value = x.ENName,
|
|
|
|
{
|
|
|
|
}).Distinct().ToList();
|
|
|
|
Code = x.Code,
|
|
|
|
return List;
|
|
|
|
Value = x.ENName,
|
|
|
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
|
|
|
return List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeProvince>().ToList().Select(x => new CommonCodeValue
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
|
|
|
Value = x.ENName,
|
|
|
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
|
|
|
return List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|