From a40e6c20a3c539bfb0efb9b2bce0746cdedd6c83 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Wed, 28 Dec 2022 15:57:30 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=94=BE=E8=88=B1=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5=20=E5=AE=A2=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=8A=A0=E6=8F=90=E5=8D=95=E4=BF=A1=E6=81=AF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20=E6=89=93=E5=8D=B0=E6=9C=8D=E5=8A=A1=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=94=BE=E8=88=B1=E4=BF=A1=E6=81=AF=E7=AD=89=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/BookingLetteryard.cs | 17 +++++++ .../Myshipping.Application.xml | 50 +++++++++++++++---- .../BookingOrder/BookingOrderService.cs | 26 ++++++---- .../BookingOrder/Dto/BookingLetteryardDto.cs | 17 +++++++ Myshipping.Core/Entity/DJY/DjyCustomer.cs | 4 ++ .../DjyCustomer/Dto/DjyCustomerInput.cs | 4 ++ .../Controllers/ReportController.cs | 13 ++++- Myshipping.Report/Myshipping.Report.csproj | 9 ++++ 8 files changed, 118 insertions(+), 22 deletions(-) diff --git a/Myshipping.Application/Entity/BookingLetteryard.cs b/Myshipping.Application/Entity/BookingLetteryard.cs index 615cd72f..79e32639 100644 --- a/Myshipping.Application/Entity/BookingLetteryard.cs +++ b/Myshipping.Application/Entity/BookingLetteryard.cs @@ -63,5 +63,22 @@ namespace Myshipping.Application.Entity /// 备注 /// public string Remark { get; set; } + + /// + /// 场站代码 + /// + public string YARDID { get; set; } + /// + /// 场站 + /// + public string YARD { get; set; } + /// + /// 场站联系人 + /// + public string YARDCONTRACT { get; set; } + /// + /// 场站联系人电话 + /// + public string YARDCONTRACTTEL { get; set; } } } \ No newline at end of file diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 819e3b6d..bcd52a70 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -2465,6 +2465,26 @@ 备注 + + + 场站代码 + + + + + 场站 + + + + + 场站联系人 + + + + + 场站联系人电话 + + 舱单日志 @@ -7148,6 +7168,26 @@ 备注 + + + 场站代码 + + + + + 场站 + + + + + 场站联系人 + + + + + 场站联系人电话 + + 入货通知新增输入参数 @@ -9320,16 +9360,6 @@ 主键 - - - 模板内容 - - - - - 备注 - - 订舱模板获取(删除)输入参数 diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index cd00b976..ddc324dd 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -284,13 +284,13 @@ namespace Myshipping.Application .WhereIF(!string.IsNullOrWhiteSpace(input.LANECODE), u => u.LANECODE == input.LANECODE) .WhereIF(!string.IsNullOrWhiteSpace(input.LANENAME), u => u.LANENAME.Contains(input.LANENAME)) .WhereIF(!string.IsNullOrWhiteSpace(input.FREIGHTPAYER), u => u.FREIGHTPAYER.Contains(input.FREIGHTPAYER)) - .WhereIF(userlist!=null&&userlist.Count()>0, u => userlist.Contains((long)u.CreatedUserId)) + .WhereIF(userlist != null && userlist.Count() > 0, u => userlist.Contains((long)u.CreatedUserId)) .OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)) .ToPagedListAsync(input.PageNo, input.PageSize); var list = entities.Adapt>(); - + foreach (var item in list.Items) { @@ -298,11 +298,12 @@ namespace Myshipping.Application if (sta != null) { item.bookstatus = sta; } var st = await _bookingremark.AsQueryable().Where(x => x.PId == item.Id).ToListAsync(); if (st != null) { item.bookremark = st; } - if (!string.IsNullOrWhiteSpace( item.ETD)) { + if (!string.IsNullOrWhiteSpace(item.ETD)) + { item.ETD = Convert.ToDateTime(item.ETD).ToString("yyyy-MM-dd"); } } - + return list; } @@ -945,7 +946,7 @@ namespace Myshipping.Application bookingStatusLog.BookingId = Convert.ToInt64(item.BusinessId); bookingStatusLog.Category = "ship"; bookingStatusLog.CreatedTime = DateTime.Now; - if (string.IsNullOrWhiteSpace( item.YardCode) && !string.IsNullOrWhiteSpace( item.CARRIERID )) + if (string.IsNullOrWhiteSpace(item.YardCode) && !string.IsNullOrWhiteSpace(item.CARRIERID)) { bookingStatusLog.Status = "订阅目的港"; } @@ -1160,7 +1161,10 @@ namespace Myshipping.Application FromName = user.Name, FromTel = user.Tel, FromMail = user.Email, - + YARDID = order.YARDID, + YARD = order.YARD, + YARDCONTRACT = order.YARDCONTRACT, + YARDCONTRACTTEL = order.YARDCONTRACTTEL, }; } @@ -1633,7 +1637,7 @@ namespace Myshipping.Application { //当前公司所有已配置的模板 var allList = await _repPrintTemplate.AsQueryable() - .Filter(null, true).InnerJoin((d,t)=>d.Id==t.PrintTemplateId&&t.SysUserId==UserManager.UserId) + .Filter(null, true).InnerJoin((d, t) => d.Id == t.PrintTemplateId && t.SysUserId == UserManager.UserId) .Where(d => d.TenantId == UserManager.TENANT_ID) .Select(d => new { @@ -2465,7 +2469,7 @@ namespace Myshipping.Application var curBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(order.KINDPKGS, StringComparison.OrdinalIgnoreCase)); - if(curBasePkgs == null) + if (curBasePkgs == null) throw Oops.Bah($"包装{order.KINDPKGS}的基础数据代码未找到"); var ediPkgs = ediPkgsList.FirstOrDefault(x => x.Code.Equals(curBasePkgs.Code, StringComparison.OrdinalIgnoreCase)); @@ -2767,7 +2771,7 @@ namespace Myshipping.Application //} throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); } - + var currRlt = PILEdiHelper.CreateEdiPIL(ediModel); #endregion @@ -2838,7 +2842,7 @@ namespace Myshipping.Application if (!string.IsNullOrWhiteSpace(strCheck)) { throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); - } + } CommonWebApiResult currRlt = new CommonWebApiResult(); @@ -2871,7 +2875,7 @@ namespace Myshipping.Application throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); } - + CommonWebApiResult currRlt = YTEdiHelper.CreateEdiYT(ediModel); #endregion diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs index c7319c26..3b40b503 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs @@ -74,6 +74,23 @@ namespace Myshipping.Application /// public virtual string Remark { get; set; } + /// + /// 场站代码 + /// + public string YARDID { get; set; } + /// + /// 场站 + /// + public string YARD { get; set; } + /// + /// 场站联系人 + /// + public string YARDCONTRACT { get; set; } + /// + /// 场站联系人电话 + /// + public string YARDCONTRACTTEL { get; set; } + } /// diff --git a/Myshipping.Core/Entity/DJY/DjyCustomer.cs b/Myshipping.Core/Entity/DJY/DjyCustomer.cs index cf4787ca..6680aada 100644 --- a/Myshipping.Core/Entity/DJY/DjyCustomer.cs +++ b/Myshipping.Core/Entity/DJY/DjyCustomer.cs @@ -132,5 +132,9 @@ namespace Myshipping.Core.Entity /// 客服 /// public string CUSTSERVICE { get; set; } + /// + /// 提单信息 + /// + public string TIDANINFO { get; set; } } } \ No newline at end of file diff --git a/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs b/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs index 13f8fa3a..b46ac4bd 100644 --- a/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs +++ b/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs @@ -157,6 +157,10 @@ namespace Myshipping.Core.Service /// 客服 /// public string CUSTSERVICE { get; set; } + /// + /// 提单信息 + /// + public string TIDANINFO { get; set; } public List Contacts { get; set; } diff --git a/Myshipping.Report/Controllers/ReportController.cs b/Myshipping.Report/Controllers/ReportController.cs index 075b48c9..0d165e53 100644 --- a/Myshipping.Report/Controllers/ReportController.cs +++ b/Myshipping.Report/Controllers/ReportController.cs @@ -12,6 +12,7 @@ using System.Web.Mvc; using Myshipping.Report.DB; using Myshipping.Application.Entity; using System.Text; +using Myshipping.Core.Entity; namespace Myshipping.Report.Controllers { @@ -171,10 +172,20 @@ namespace Myshipping.Report.Controllers log.Debug($"准备获取订舱数据:{bookingId}"); var order = sqlSugarClient.Queryable().First(x => x.Id == bookingId); var ctns = sqlSugarClient.Queryable().Where(x => x.BILLID == bookingId).ToList(); + var letterYard = sqlSugarClient.Queryable().First(x => x.BookingId == bookingId); + + DjyCustomer customer = null; + if (!string.IsNullOrEmpty(order.AGENTID)) //根据国外代理,获取客户的提单信息 + { + customer = sqlSugarClient.Queryable().First(x => x.CodeName == order.AGENTID && x.TenantId == order.TenantId); + } + var strObj = JsonConvert.SerializeObject(new { order = order, - ctns = ctns + ctns = ctns, + letterYard, + agentCustomer = customer, }); log.Debug($"订舱数据:{strObj}"); diff --git a/Myshipping.Report/Myshipping.Report.csproj b/Myshipping.Report/Myshipping.Report.csproj index b1d68c6c..e6ccca88 100644 --- a/Myshipping.Report/Myshipping.Report.csproj +++ b/Myshipping.Report/Myshipping.Report.csproj @@ -175,9 +175,18 @@ DB\BookingCtnDetail.cs + + DB\BookingLetteryard.cs + DB\BookingOrder.cs + + DB\DjyCustomer.cs + + + DB\DjyCustomerContact.cs + From ae3383436d7d5ade219698e799bb59593ac1130a Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Wed, 28 Dec 2022 16:29:23 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=AE=A2=E8=88=B1=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=BB=E5=88=86=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Myshipping.Application.xml | 35 +++++++++++++++++++ .../BookingPrintTemplateService.cs | 2 ++ Myshipping.Core/Myshipping.Core.xml | 10 ++++++ 3 files changed, 47 insertions(+) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index bcd52a70..97f62608 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -11233,6 +11233,41 @@ 称重方式 + + + 用户任务统计展示 + + + + + 级别分层(1-异常/个人/公共 2-待处理/已完成/已取消/已挂起 3-按照任务类型展示) + + + + + 排序值 + + + + + 展示代码 + + + + + 展示名称 + + + + + 记录条数 + + + + + 执行KEY + + diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index 694554d2..5545b7f1 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -116,6 +116,8 @@ namespace Myshipping.Application TypeName = input.TypeName, TenantId = input.TenantId, TenantName = input.TenantName, + IsMain = input.IsMain, + IsSub = input.IsSub, }; await _rep.InsertAsync(newFile); using (var stream = File.Create(fileAbsPath)) diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index 3f6d8753..f0a471fa 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -1744,6 +1744,11 @@ 客服 + + + 提单信息 + + @@ -9646,6 +9651,11 @@ 客服 + + + 提单信息 + + 订舱客户新增输入参数 From 7f0ddf5c1e94396ded726ced0347968f5cb7a053 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Thu, 29 Dec 2022 09:15:00 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=BB=E5=88=86=E5=8D=95=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingPrintTemplate/BookingPrintTemplateService.cs | 2 ++ .../Dto/BookingPrintTemplateInput.cs | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index 5545b7f1..52c8667a 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -56,6 +56,8 @@ namespace Myshipping.Application .WhereIF(!string.IsNullOrWhiteSpace(input.TypeName), u => u.TypeName.Contains(input.TypeName.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.FileName), u => u.FileName.Contains(input.FileName.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.FileName.Contains(input.TenantName.Trim())) + .WhereIF(input.IsMain.HasValue, u => u.IsMain == input.IsMain) + .WhereIF(input.IsSub.HasValue, u => u.IsSub == input.IsSub) .ToPagedListAsync(input.PageNo, input.PageSize); return entities.XnPagedResult(); } diff --git a/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrintTemplateInput.cs b/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrintTemplateInput.cs index 31712bd6..8d755ffb 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrintTemplateInput.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrintTemplateInput.cs @@ -94,5 +94,14 @@ namespace Myshipping.Application /// public string TenantName { get; set; } + /// + /// 主单 + /// + public bool? IsMain { get; set; } + /// + /// 分单 + /// + public bool? IsSub { get; set; } + } } From 07406909185676938960ceea24c43032e5d7cc78 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Thu, 29 Dec 2022 09:28:32 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/Myshipping.Application.xml | 10 ++++++++++ .../BookingPrintTemplateService.cs | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 97f62608..d1dc31a9 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -9245,6 +9245,16 @@ 租户名称 + + + 主单 + + + + + 分单 + + 订舱打印模板输出参数 diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index 52c8667a..c2311c3b 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -51,11 +51,10 @@ namespace Myshipping.Application [HttpGet("/BookingPrintTemplate/page")] public async Task Page([FromQuery] QueryBookingPrintTemplateInput input) { - _rep.Context.QueryFilter.Clear(); - var entities = await _rep.AsQueryable() + var entities = await _rep.AsQueryable().Filter(null, true) .WhereIF(!string.IsNullOrWhiteSpace(input.TypeName), u => u.TypeName.Contains(input.TypeName.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.FileName), u => u.FileName.Contains(input.FileName.Trim())) - .WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.FileName.Contains(input.TenantName.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.TenantName.Contains(input.TenantName.Trim())) .WhereIF(input.IsMain.HasValue, u => u.IsMain == input.IsMain) .WhereIF(input.IsSub.HasValue, u => u.IsSub == input.IsSub) .ToPagedListAsync(input.PageNo, input.PageSize); From ce27afea8cf2c64ad8934b03fb563971e2dd1abd Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Thu, 29 Dec 2022 11:09:13 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E4=B8=8D=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingPrintTemplateService.cs | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index c2311c3b..b3cc5b7d 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -137,20 +137,6 @@ namespace Myshipping.Application [HttpPost("/BookingPrintTemplate/edit")] public async Task Update(IFormFile file, [FromForm] UpdateBookingPrintTemplateInput input) { - //未上传打印模板文件 - if (file == null || file.Length == 0) - { - throw Oops.Bah(BookingErrorCode.BOOK113); - } - - var opt = App.GetOptions(); - var originalFilename = file.FileName; // 文件原始名称 - var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀 - if (!opt.fileType.Contains(fileSuffix)) - { - throw Oops.Bah(BookingErrorCode.BOOK114); - } - var cc = _rep.AsQueryable().Filter(null, true).Count(c => c.TenantId == input.TenantId && c.TypeCode == input.TypeCode && c.Id != input.Id); if (cc > 0) { @@ -165,33 +151,44 @@ namespace Myshipping.Application entity = input.Adapt(entity); - var dirAbs = string.Empty; - if (string.IsNullOrEmpty(opt.basePath)) - { - dirAbs = Path.Combine(App.WebHostEnvironment.WebRootPath, opt.relativePath); - } - else + if (file != null) { - dirAbs = Path.Combine(opt.basePath, opt.relativePath); - } + var opt = App.GetOptions(); + var originalFilename = file.FileName; // 文件原始名称 + var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀 + if (!opt.fileType.Contains(fileSuffix)) + { + throw Oops.Bah(BookingErrorCode.BOOK114); + } - if (!Directory.Exists(dirAbs)) - Directory.CreateDirectory(dirAbs); + var dirAbs = string.Empty; + if (string.IsNullOrEmpty(opt.basePath)) + { + dirAbs = Path.Combine(App.WebHostEnvironment.WebRootPath, opt.relativePath); + } + else + { + dirAbs = Path.Combine(opt.basePath, opt.relativePath); + } + if (!Directory.Exists(dirAbs)) + Directory.CreateDirectory(dirAbs); + // 先存库获取Id + var fileSaveName = $"{entity.Id}{fileSuffix}".ToLower(); + var fileRelaPath = Path.Combine(opt.relativePath, fileSaveName).ToLower(); + var fileAbsPath = Path.Combine(dirAbs, fileSaveName).ToLower(); - // 先存库获取Id - var fileSaveName = $"{entity.Id}{fileSuffix}".ToLower(); - var fileRelaPath = Path.Combine(opt.relativePath, fileSaveName).ToLower(); - var fileAbsPath = Path.Combine(dirAbs, fileSaveName).ToLower(); + entity.FileName = originalFilename; + entity.FilePath = fileRelaPath; - entity.FileName = originalFilename; - entity.FilePath = fileRelaPath; - await _rep.UpdateAsync(entity); - using (var stream = File.Create(fileAbsPath)) - { - await file.CopyToAsync(stream); + using (var stream = File.Create(fileAbsPath)) + { + await file.CopyToAsync(stream); + } } + + await _rep.UpdateAsync(entity); } ///