|
|
|
@ -269,6 +269,11 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
var recordInfo = model.Adapt<BookingDeliveryRecord>();
|
|
|
|
|
var recordCtnList = model.ctns.Adapt<List<BookingDeliveryRecordCtn>>();
|
|
|
|
|
|
|
|
|
|
var ctnCodeMappingList = _cache.GetAllMappingCtn().GetAwaiter().GetResult().ToList();
|
|
|
|
|
|
|
|
|
|
if (ctnCodeMappingList.Count > 0)
|
|
|
|
|
ctnCodeMappingList = ctnCodeMappingList.Where(x => x.CarrierCode == "MSK" && x.Module == "BOOK_OR_CLOSING").ToList();
|
|
|
|
|
|
|
|
|
|
MSKAPIBookingDto bookingDto = new MSKAPIBookingDto
|
|
|
|
|
{
|
|
|
|
|
userKey = App.Configuration["MSKAPIDjyUserKey"],
|
|
|
|
@ -382,13 +387,18 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
{
|
|
|
|
|
model.ctns.ForEach(ctn =>
|
|
|
|
|
{
|
|
|
|
|
var ctnMapping = ctnCodeMappingList.FirstOrDefault(t => t.Code.Equals(ctn.ctnCode));
|
|
|
|
|
|
|
|
|
|
if(ctnMapping == null)
|
|
|
|
|
throw Oops.Oh("未配置发送订舱请求接口地址,请联系管理员");
|
|
|
|
|
|
|
|
|
|
MSKAPIBookingEquipmentAndHaulage haulage = new MSKAPIBookingEquipmentAndHaulage
|
|
|
|
|
{
|
|
|
|
|
equipmentDetails = new MSKAPIBookingEquipmentAndHaulageItem(),
|
|
|
|
|
stuffingDetails = new List<MSKAPIBookingStuffingdetails>()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
haulage.equipmentDetails.ISOEquipmentCode = ctn.ctnCode;
|
|
|
|
|
haulage.equipmentDetails.ISOEquipmentCode = ctnMapping.MapCode;
|
|
|
|
|
haulage.equipmentDetails.equipmentQuantity = ctn.ctnNum;
|
|
|
|
|
|
|
|
|
|
haulage.stuffingDetails.Add(new MSKAPIBookingStuffingdetails
|
|
|
|
@ -446,7 +456,7 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
entity.STATUS = "SUCC";
|
|
|
|
|
entity.STATUS = "FAILURE";
|
|
|
|
|
entity.NOTES = resultInfo.msg.Length > 500 ? resultInfo.msg.Substring(0, 500) : resultInfo.msg;
|
|
|
|
|
|
|
|
|
|
await _bookingDeliveryRecordRep.AsUpdateable(entity).UpdateColumns(x => new
|
|
|
|
@ -935,7 +945,7 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceOwnerCompanyPartyCode), t => t.PRICE_OWNER_COMPANY_PARTYCODE.Contains(QuerySearch.PriceOwnerCompanyPartyCode))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PlaceReceiptCity), t => t.PLACERECEIPT_CITY.Contains(QuerySearch.PlaceReceiptCity) || t.PLACERECEIPT_UNLOC_CODE.Contains(QuerySearch.PlaceReceiptCity))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PlaceDeliveryCity), t => t.PLACEDELIVERY_CITY.Contains(QuerySearch.PlaceDeliveryCity) || t.PLACEDELIVERY_UNLOC_CODE.Contains(QuerySearch.PlaceDeliveryCity))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " asc " : " desc "))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1002,7 +1012,9 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
ctnStat = string.Join(",", model.ctns.GroupBy(a => a.ctnCode)
|
|
|
|
|
.Select(a => $"{a.Key}*{a.ToList().Sum(b => b.ctnNum.HasValue ? b.ctnNum.Value : 0)}").ToArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model.id.HasValue && model.id.Value > 0)
|
|
|
|
|
{
|
|
|
|
|
BookingDeliveryRecord entity = model.Adapt<BookingDeliveryRecord>();
|
|
|
|
|