optimize
wet 2 years ago
parent b958882030
commit d45865251b

@ -212,10 +212,9 @@ namespace Myshipping.Application
/// <summary>
/// 舱单
/// </summary>
/// <param name="Ids"></param>
/// <returns></returns>
[HttpPost("/BookingOrderSeaeEdi/CustEDI")]
public async Task CustEDI(string Ids)
public async Task CustEDI(string Ids,string type)
{
var arr = Ids.Split(",");
@ -276,7 +275,7 @@ namespace Myshipping.Application
ac = "emf",
uid = UserManager.DjyUserId,
skey = key.Password,
optype = "3",
optype = type,
data = strPostObj
};
_logger.LogInformation($"调用舱单接口 {dicUrl.Value} 传递数据:{strPostObj}");
@ -293,13 +292,42 @@ namespace Myshipping.Application
//货运动态
var bsl = new BookingStatusLog();
bsl.BookingId = order.BookingId;
if (type=="3") {
bsl.Status = $"保存舱单";
}
if (type == "0")
{
bsl.Status = $"直发舱单";
}
if (type == "1")
{
bsl.Status = $"修改舱单";
}
if (type == "4")
{
bsl.Status = $"作废舱单";
}
bsl.OpTime = DateTime.Now;
bsl.Category = "ship";
bsl.MBLNO = order.MBLNO;
await _repStatuslog.InsertAsync(bsl);
if (type == "3")
{
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已发送" });
}
if (type == "0")
{
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已直发" });
}
if (type == "2")
{
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已删除" });
}
if (type == "4")
{
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已作废" });
}
}
}
}

Loading…
Cancel
Save