diff --git a/Myshipping.Application/EDI/Dtos/MsOpSeaeEDIBaseModel.cs b/Myshipping.Application/EDI/Dtos/MsOpSeaeEDIBaseModel.cs index a4048e51..17b6de9a 100644 --- a/Myshipping.Application/EDI/Dtos/MsOpSeaeEDIBaseModel.cs +++ b/Myshipping.Application/EDI/Dtos/MsOpSeaeEDIBaseModel.cs @@ -585,5 +585,10 @@ namespace Myshipping.Application /// 运输条款EDI代码 M /// public string SERVICEEDICODE { get; set; } + + /// + /// 商品代码 + /// + public string GOODSCODE { get; set; } } } diff --git a/Myshipping.Application/EDI/PILEdiHelper.cs b/Myshipping.Application/EDI/PILEdiHelper.cs index 548bf5de..1c622edf 100644 --- a/Myshipping.Application/EDI/PILEdiHelper.cs +++ b/Myshipping.Application/EDI/PILEdiHelper.cs @@ -673,7 +673,8 @@ namespace Myshipping.Application.EDI.PIL var estr = ""; if (InttrEdi.filetype == "E") { - estr = "ESI"; + //2023-03-28 确认需要把截单报文的文件名去掉ESI英文 + //estr = "ESI"; } else { @@ -1479,7 +1480,9 @@ namespace Myshipping.Application.EDI.PIL tempstr += GetSpaceStr((ctn.CBM * 1000).ToString("0.###"), 10, "0");//11 //Cargo Nett Measurement//C//9(7)v999//61 //70 //Mandatory, except for Empties tempstr += GetSpaceStr(bill.GOODSNAME, 48);//12 //Commodity Name//O//X(48)//71 //118 // //tempstr += GetSpaceStr(GetGOODEDICode(bill.GOODSNAME), 4);//13 //webcsm Commodity Code//O//X(4)//119 //122 //webCSM Standard Commodity Code - tempstr += GetSpaceStr("", 4);//13 //webcsm Commodity Code//O//X(4)//119 //122 //webCSM Standard Commodity Code + //2023-03-27 跟韩工确认这里加入商品代码 + //tempstr += GetSpaceStr("", 4);//13 //webcsm Commodity Code//O//X(4)//119 //122 //webCSM Standard Commodity Code + tempstr += GetSpaceStr(bill.GOODSCODE, 4);//13 //webcsm Commodity Code//O//X(4)//119 //122 //webCSM Standard Commodity Code tempstr += GetSpaceStr(ctn.CTNALLCODE, 4);//14 //webcsm Package Code//M//X(4)//123 //126 //eg 20GP, 40GP etc. tempstr += "KGM";//15 //UOM Weight//M//X(3)//127 //129 //Default to METRIC = KGM tempstr += "MTQ";//16 //UOM Measurement//M//X(3)//130 //132 //Default to METRIC = MTQ diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 78b94667..4c9b87b0 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2353,7 +2353,7 @@ namespace Myshipping.Application - fileName = $"{order.MBLNO}_{DateTime.Now.Ticks}";//名称 + fileName = $"{order.MBLNO}_{DateTime.Now.Ticks}{fileType}";//名称 var opt = App.GetOptions().Path; var serverpath = Path.Combine(App.WebHostEnvironment.WebRootPath, opt);//服务器路径 if (!Directory.Exists(serverpath)) @@ -2633,11 +2633,19 @@ namespace Myshipping.Application var fileFullName = Path.Combine(fileFullPath, fn); if (File.Exists(fileFullName)) { - var readMem = new ReadOnlyMemory(File.ReadAllBytes(fileFullName)); - _httpContextAccessor.HttpContext.Response.BodyWriter.WriteAsync(readMem); + _logger.LogInformation($"预览pdf文件:{fileFullName}"); + + var sysConfig = _cache.GetAllSysConfig().Result; + var viewUrl = sysConfig.FirstOrDefault(x => x.Code == "booking_print_view_pdf_url"); + + //var readMem = new ReadOnlyMemory(File.ReadAllBytes(fileFullName)); + //_httpContextAccessor.HttpContext.Response.BodyWriter.WriteAsync(readMem); + _httpContextAccessor.HttpContext.Response.StatusCode = 302; + _httpContextAccessor.HttpContext.Response.Headers["Location"] = $"{viewUrl.Value}{fn}"; } else { + _logger.LogInformation($"未找到预览pdf文件:{fileFullName}"); _httpContextAccessor.HttpContext.Response.StatusCode = 404; } } diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs b/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs index e4cd175e..af7e9ead 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BookingEDIMapper.cs @@ -67,7 +67,8 @@ namespace Myshipping.Application .Map(dest => dest.PLACEDELIVERYID, src => src.PLACEDELIVERYID) .Map(dest => dest.PLACEDELIVERY, src => src.PLACEDELIVERY) .Map(dest => dest.CARRIER, src => src.CARRIER) - .Map(dest => dest.CARRIERID, src => src.CARRIERID); + .Map(dest => dest.CARRIERID, src => src.CARRIERID) + .Map(dest => dest.GOODSCODE, src => src.GOODSCODE); config.ForType() diff --git a/Myshipping.Core/Service/Log/Dto/OpLogInput.cs b/Myshipping.Core/Service/Log/Dto/OpLogInput.cs index d485a1c8..13002352 100644 --- a/Myshipping.Core/Service/Log/Dto/OpLogInput.cs +++ b/Myshipping.Core/Service/Log/Dto/OpLogInput.cs @@ -8,7 +8,7 @@ namespace Myshipping.Core.Service; public class OpLogInput : PageInputBase { /// - /// 名称 + /// 操作人名称 /// public string Name { get; set; } @@ -83,7 +83,7 @@ public class OpLogInput : PageInputBase public DateTime OpTime { get; set; } /// - /// 操作人 + /// 操作人账号 /// public string Account { get; set; } } diff --git a/Myshipping.Core/Service/Log/SysOpLogService.cs b/Myshipping.Core/Service/Log/SysOpLogService.cs index c329640b..4a6047ae 100644 --- a/Myshipping.Core/Service/Log/SysOpLogService.cs +++ b/Myshipping.Core/Service/Log/SysOpLogService.cs @@ -34,6 +34,9 @@ public class SysOpLogService : ISysOpLogService, IDynamicApiController, ITransie { var opLogs = await _sysOpLogRep.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Name.Contains(input.Account.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Ip), u => u.Name.Contains(input.Ip.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Url), u => u.Name.Contains(input.Url.Trim())) .WhereIF(Enum.IsDefined(typeof(YesOrNot),input.Success), u => u.Success == input.Success) .WhereIF(!string.IsNullOrWhiteSpace(input.SearchBeginTime), u => u.OpTime >= DateTime.Parse(input.SearchBeginTime.Trim()) && u.OpTime <= DateTime.Parse(input.SearchEndTime.Trim())) .OrderBy(u => u.Id, OrderByType.Desc)