diff --git a/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs b/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs index 35fce21d..2ffc6029 100644 --- a/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs +++ b/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs @@ -212,10 +212,9 @@ namespace Myshipping.Application /// /// 舱单 /// - /// /// [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,12 +292,41 @@ namespace Myshipping.Application //货运动态 var bsl = new BookingStatusLog(); bsl.BookingId = order.BookingId; - bsl.Status = $"保存舱单"; + 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); - await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已发送" }); + 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 = "已作废" }); + } } }