jianghaiqing 2 years ago
commit 0ad7643a9a

@ -70,7 +70,6 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingLogDetail> _bookinglogdetail;
private readonly SqlSugarRepository<BookingRemark> _bookingremark;
private readonly SqlSugarRepository<BookingFile> _bookingfile;
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrint;
private readonly ILogger<BookingOrderService> _logger;
private readonly ISysCacheService _cache;
@ -89,20 +88,19 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingEDIExt> _bookingEDIExt;
private readonly SqlSugarRepository<DjyUserConfig> _repUserConfig;
private readonly IHttpContextAccessor _httpContextAccessor;
const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING";
const string CONST_MAPPING_MODULE_ROUTE = "BOOK_OR_CLOSING_RT";
private const string PrintRecentListTypeKey = "booking_print_recent_list";
public BookingOrderService(SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn, SqlSugarRepository<BookingCtnDetail> ctndetailrep,
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
SqlSugarRepository<BookingFile> bookingfile, SqlSugarRepository<DjyUserConfig> repUserConfig, SqlSugarRepository<BookingPrintTemplate> repPrint,
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig,
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
SqlSugarRepository<BookingFile> bookingfile, SqlSugarRepository<DjyUserConfig> repUserConfig, SqlSugarRepository<BookingPrintTemplate> repPrint,
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig,
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser,
SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill,
SqlSugarRepository<DjyUserMailAccount> repUserMail, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt,
IHttpContextAccessor httpContextAccessor)
SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill,
SqlSugarRepository<DjyUserMailAccount> repUserMail, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt,
IHttpContextAccessor httpContextAccessor)
{
this._logger = logger;
this._rep = rep;
@ -113,7 +111,6 @@ namespace Myshipping.Application
this._bookingremark = bookingremark;
this._bookingfile = bookingfile;
this._repPrint = repPrint;
this._cache = cache;
this._webAccountConfig = webAccountConfig;
this._repStatuslog = statuslog;
@ -987,7 +984,7 @@ namespace Myshipping.Application
bookingStatus.BookingId = item.BookingId;
bookingStatus.StaCode = "sta_zhuangchuan";
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_zhuangchuan").Select(x => x.Value).FirstOrDefault();
bookingStatus.StaTime = item.OpTime;
bookingStatus.StaTime = item.detail.Max(x=>x.OPTime);
bookingStatus.StaCate = "book_sta_cate_billtrace";
await _repBookingStatus.InsertAsync(bookingStatus);
}
@ -1026,9 +1023,6 @@ namespace Myshipping.Application
}
#endregion
#region 放舱(入货通知)
/// <summary>
@ -2092,8 +2086,6 @@ namespace Myshipping.Application
{
throw Oops.Bah(BookingErrorCode.BOOK128, jobjResp.GetStringValue("message"));
}
//货运动态
var bsl = new BookingStatusLog();
bsl.BookingId = bookingId;
@ -2102,12 +2094,9 @@ namespace Myshipping.Application
bsl.Category = "ship";
bsl.MBLNO = order.MBLNO;
await _repStatuslog.InsertAsync(bsl);
}
/// <summary>
/// 批量编辑vgm
/// </summary>
@ -2190,6 +2179,7 @@ namespace Myshipping.Application
}
#endregion
public async Task<string> InnerBookingOrClosingEDI(BookingOrClosingEDIOrderDto model)
{
string batchNo = IDGen.NextID().ToString();
@ -2488,6 +2478,8 @@ namespace Myshipping.Application
await _bookingfile.InsertAsync(bookFile);
}
#region 下载订舱、截单EDI
/// <summary>
/// 下载订舱、截单EDI
@ -3035,6 +3027,5 @@ namespace Myshipping.Application
}
#endregion
}
}

@ -303,7 +303,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
public async Task AddForwarder([FromBody] CodeForwarderDto dto)
{
var list = await _sysCacheService.GetAllCodeForwarder();
var count = list.Where(x => x.Code == dto.Code).Count();
var count = list.Where(x =>x.Code == dto.Code).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);

Loading…
Cancel
Save