From 345d85a35464533df6b5a1f3a9c04d2a975bf1d8 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Fri, 6 Jan 2023 09:59:40 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingPrintTemplateService.cs | 1 + .../Dto/BookingPrintTemplateInput.cs | 4 +++ Myshipping.Core/Myshipping.Core.xml | 2 +- .../DjyTenantConfig/DjyTenantConfigService.cs | 2 +- .../DjyVesselInfo/DjyVesselInfoService.cs | 32 +++++++++---------- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index 94fe132f..40a70c7e 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -63,6 +63,7 @@ namespace Myshipping.Application .WhereIF(!string.IsNullOrWhiteSpace(input.DisplayName), u => u.DisplayName.Contains(input.DisplayName.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.CateCode), u => u.CateCode.Contains(input.CateCode.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.CateName), u => u.CateName.Contains(input.CateName.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Type), u => u.Type==input.Type) .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 bb0be0b9..cc27188c 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrintTemplateInput.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrintTemplateInput.cs @@ -147,6 +147,10 @@ namespace Myshipping.Application /// 分类名称 /// public virtual string CateName { get; set; } + /// + /// 类型:FastReport、Excel模板等 + /// + public virtual string Type { get; set; } } diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index 0af807b4..aaaebc52 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -10307,7 +10307,7 @@ - 公司默认值 + 租户配置 diff --git a/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs b/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs index 62c4347c..13a5b17d 100644 --- a/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs +++ b/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs @@ -11,7 +11,7 @@ using Myshipping.Core.Entity; namespace Myshipping.Core.Service { /// - /// 公司默认值 + /// 租户配置 /// [ApiDescriptionSettings(Name = "DjyTenantConfig", Order = 1)] public class DjyTenantConfigService : IDjyTenantConfigService, IDynamicApiController, ITransient diff --git a/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs b/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs index 280ae343..e2feaca3 100644 --- a/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs +++ b/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs @@ -36,7 +36,7 @@ namespace Myshipping.Core.Service public async Task GetListPage([FromQuery] string KeyWord) { - return await _rep.AsQueryable().Filter(null, true).Where(x=>x.TenantId==UserManager.TENANT_ID). + return await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID). WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.Contains(KeyWord) || x.CARRIER.Contains(KeyWord) || x.Voyno.Contains(KeyWord) || x.PortLoading.Contains(KeyWord) || x.PortTransit.Contains(KeyWord) || x.PortDischarge.Contains(KeyWord) || x.VoynoInside.Contains(KeyWord) @@ -91,13 +91,13 @@ namespace Myshipping.Core.Service /// /// [HttpGet("/DjyVesselInfoService/GetList")] - public async Task GetList([FromQuery] string CarrierID, string KeyWord = "") + public async Task GetList([FromQuery] string CarrierID, string KeyWord = "") { //获取船名 List list = await _sysCacheService.GetAllCodeVessel(); - var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.Contains(KeyWord)). - Where(x=> x.CARRIERID == CarrierID && x.ETD > DateTime.Now.AddDays(-7)&&x.TenantId==UserManager.TENANT_ID). + var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.StartsWith(KeyWord)). + Where(x => x.CARRIERID == CarrierID && x.ETD > DateTime.Now.AddDays(-7) && x.TenantId == UserManager.TENANT_ID). Select(x => new { Voyno = x.Voyno, @@ -108,22 +108,22 @@ namespace Myshipping.Core.Service }).Take(20). ToListAsync(); - if (tlist.Count() == 0) + var ves = tlist.Select(x => x.Vessel).ToList(); + var all = list.WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Name.StartsWith(KeyWord)). + Select(x => new { - return list.WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Name.Contains(KeyWord)).Select(x => new - { - Voyno = "", - VoynoInside = "", - Vessel = x.Name, - ETD = "", - ATD = "", - }).Take(20).ToList(); - } - else + Voyno = "", + VoynoInside = "", + Vessel = x.Name, + ETD = "", + ATD = "", + }).Take(20).ToList(); + foreach (var item in ves) { - return tlist; + all.RemoveAll(x => x.Vessel.StartsWith(item)); } + return tlist.Union(all); } } } From df5ba79d8422afa0c2ba5b358d6ac7839bf891af Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Fri, 6 Jan 2023 11:06:59 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=85=AC=E5=85=B1=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Myshipping.Application.xml | 5 +++++ .../Service/CommonDB/CommonDBService.cs | 21 ------------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index ceaea011..7a2f7ccd 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -9783,6 +9783,11 @@ 分类名称 + + + 类型:FastReport、Excel模板等 + + 订舱模板服务 diff --git a/Myshipping.Core/Service/CommonDB/CommonDBService.cs b/Myshipping.Core/Service/CommonDB/CommonDBService.cs index b0e57439..e855a889 100644 --- a/Myshipping.Core/Service/CommonDB/CommonDBService.cs +++ b/Myshipping.Core/Service/CommonDB/CommonDBService.cs @@ -114,10 +114,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie var list = await _sysCacheService.GetAllCodeCarrier(); var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); - if (queryList.Count() > 20) - { - return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList(); - } return queryList.OrderBy(x => x.Sort).ToList(); } @@ -384,12 +380,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie public async Task YardList([FromQuery] NameQueryDto input) { List list = await _sysCacheService.GetAllCodeYard(); - var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); - if (queryList.Count() > 20) - { - return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList(); - } return queryList.OrderBy(x => x.Sort).ToList(); } /// @@ -722,10 +713,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); - if (queryList.Count() > 20) - { - return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList(); - } return queryList.OrderBy(x=>x.Sort).ToList(); } /// @@ -938,10 +925,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderByDescending(x=>x.CreateTime); - if (queryList.Count() > 20) - { - return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList(); - } return queryList.OrderBy(x => x.Sort).ToList(); } @@ -1169,10 +1152,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); - if (queryList.Count() > 20) - { - return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList(); - } return queryList.OrderBy(x => x.Sort).ToList(); } From aa2d7f86fefbd4073f75d6a0bf3cd285206b59db Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 6 Jan 2023 11:48:10 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=AE=A2=E8=88=B1=E4=B8=BB=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=93=81=E5=90=8D=E4=BB=A3=E7=A0=81=E3=80=81?= =?UTF-8?q?=E5=93=81=E5=90=8D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/Entity/BookingOrder.cs | 12 +++++ .../Myshipping.Application.xml | 54 +++++++++++++++++++ .../TaskManagePlat/Dtos/LaraPaperCalcInfo.cs | 34 ++++++++++++ .../Interface/ITaskManageService.cs | 8 +++ .../TaskManagePlat/TaskManageService.cs | 36 +++++++++++++ 5 files changed, 144 insertions(+) create mode 100644 Myshipping.Application/Service/TaskManagePlat/Dtos/LaraPaperCalcInfo.cs diff --git a/Myshipping.Application/Entity/BookingOrder.cs b/Myshipping.Application/Entity/BookingOrder.cs index 09b07616..f3644a52 100644 --- a/Myshipping.Application/Entity/BookingOrder.cs +++ b/Myshipping.Application/Entity/BookingOrder.cs @@ -743,6 +743,18 @@ namespace Myshipping.Application.Entity /// [Description("付款方")] public string FREIGHTPAYER { get; set; } + + /// + /// 品名代码 + /// + [Description("品名代码")] + public string GOODSCODE { get; set; } + + /// + /// 品名 + /// + [Description("品名")] + public string GOODSNAME { get; set; } /// /// 租户名称 /// diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index ceaea011..3758c834 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -3327,6 +3327,16 @@ 付款方 + + + 品名代码 + + + + + 品名 + + 租户名称 @@ -9783,6 +9793,11 @@ 分类名称 + + + 类型:FastReport、Excel模板等 + + 订舱模板服务 @@ -11801,6 +11816,31 @@ + + + 提单纸计算 + + + + + 顺序号 + + + + + 主单号 + + + + + DRAFT页数 + + + + + 提单用纸数 + + 我的任务查询 @@ -12723,6 +12763,13 @@ 任务主键数组 返回结果 + + + 提单纸页数计算 + + 任务主键数组 + 返回结果 + 任务管理 @@ -12818,5 +12865,12 @@ 任务主键数组 返回结果 + + + 提单纸页数计算 + + 任务主键数组 + 返回结果 + diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/LaraPaperCalcInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/LaraPaperCalcInfo.cs new file mode 100644 index 00000000..9a70087b --- /dev/null +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/LaraPaperCalcInfo.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application +{ + /// + /// 提单纸计算 + /// + public class LaraPaperCalcInfo + { + /// + /// 顺序号 + /// + public int Indx { get; set; } + + /// + /// 主单号 + /// + public string MBLNo { get; set; } + + /// + /// DRAFT页数 + /// + public int DraftNum { get; set; } + + /// + /// 提单用纸数 + /// + public int PaperNum { get; set; } + } +} diff --git a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs index feb5d743..66aa4739 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs @@ -70,5 +70,13 @@ namespace Myshipping.Application /// 返回结果 Task PendingTask(string[] PKIds); + + /// + /// 提单纸页数计算 + /// + /// 任务主键数组 + /// 返回结果 + Task> LaraPaperCalc(string[] PKIds); + } } diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 747089bd..feaf9761 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -1098,6 +1098,42 @@ namespace Myshipping.Application return result; } #endregion + + + /// + /// 提单纸页数计算 + /// + /// 任务主键数组 + /// 返回结果 + public async Task> LaraPaperCalc(string[] PKIds) + { + List list = new List(); + + string batchNo = IDGen.NextID().ToString(); + + _logger.LogInformation("批次={no} ids={ids} 提单纸页数计算开始", batchNo, string.Join(",", PKIds)); + + try + { + //_taskBaseInfoRepository.AsQueryable().LeftJoin(_taskFileInfoRepository.AsQueryable(),) + + //var taskList = _taskBaseInfoRepository.AsQueryable().Where(t => PKIds.Contains(t.PK_ID)).ToList(); + + //_logger.LogInformation("批次={no} 获取任务完成,Num={Num}", batchNo, taskList.Count); + + //taskList.ForEach(async tsk => { + + // await InnerManualTask(batchNo, tsk, TaskOperTypeEnum.PENDING_TASK); + //}); + } + catch (Exception ex) + { + throw Oops.Bah($"完成任务异常,{0}", ex.Message); + } + + return list; + + } } } From c09f750dd02a9ede8102008ae3cdc9fb4506ff94 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 6 Jan 2023 11:51:05 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=AE=A2=E8=88=B1DTO=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=93=81=E5=90=8D=E4=BB=A3=E7=A0=81=E3=80=81=E5=93=81?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/Myshipping.Application.xml | 10 ++++++++++ .../Service/BookingOrder/Dto/BookingOrderDto.cs | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 3758c834..8cecc27c 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -8493,6 +8493,16 @@ EDI扩展信息 + + + 品名代码 + + + + + 品名 + + 订舱主表输入参数 diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BookingOrderDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/BookingOrderDto.cs index d0fee63b..d0bf30c6 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BookingOrderDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BookingOrderDto.cs @@ -612,5 +612,15 @@ namespace Myshipping.Application /// EDI扩展信息 /// public BookingEDIExtDto BookingEDIExt { get; set; } + + /// + /// 品名代码 + /// + public string GOODSCODE { get; set; } + + /// + /// 品名 + /// + public string GOODSNAME { get; set; } } } From c451aa52aafeeac71d0c8133f5c2ae18cb23c54f Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 6 Jan 2023 12:47:16 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BA=A6=E5=8F=B7?= =?UTF-8?q?=E3=80=81=E5=93=81=E5=90=8D=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Myshipping.Application.xml | 36 +++++++------- .../Service/Para/Dto/ParaContractNoDto.cs | 4 ++ .../Service/Para/Dto/ParaDtoMapper.cs | 21 ++++++++ .../Service/Para/Dto/ParaGoodsCategoryDto.cs | 3 ++ .../Service/Para/Dto/ParaGoodsDto.cs | 4 ++ .../Service/Para/Interface/IParaService.cs | 12 ++--- .../Service/Para/ParaService.cs | 48 +++++++++---------- 7 files changed, 80 insertions(+), 48 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 8cecc27c..c6045b1f 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -9987,32 +9987,32 @@ 测试1 - + 创建时间 - + 更新时间 - + 创建者Id - + 创建者名称 - + 修改者Id - + 修改者名称 @@ -10032,32 +10032,32 @@ 品名分类名称 - + 创建时间 - + 更新时间 - + 创建者Id - + 创建者名称 - + 修改者Id - + 修改者名称 @@ -10104,32 +10104,32 @@ 红酒 - + 创建时间 - + 更新时间 - + 创建者Id - + 创建者名称 - + 修改者Id - + 修改者名称 diff --git a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs index 6ba7a685..6532cb27 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs @@ -31,7 +31,11 @@ namespace Myshipping.Application /// /// 测试1 public string ContractNote { get; set; } + } + + public class ParaContractNoShowDto: ParaContractNoDto + { /// /// 创建时间 /// diff --git a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs index e0dd2320..5b00dffd 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs @@ -14,6 +14,16 @@ namespace Myshipping.Application public void Register(TypeAdapterConfig config) { config.ForType() + .Map(dest => dest.Id, src => src.Id) + .Map(dest => dest.GoodsCode, src => src.GOODS_CODE) + .Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN) + .Map(dest => dest.GoodsNameEN, src => src.GOODS_NAME_EN) + .Map(dest => dest.GoodsDesp, src => src.GOODS_DESP) + .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) + .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME); + + + config.ForType() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.GoodsCode, src => src.GOODS_CODE) .Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN) @@ -39,6 +49,11 @@ namespace Myshipping.Application config.ForType() + .Map(dest => dest.Id, src => src.Id) + .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) + .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME); + + config.ForType() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME) @@ -57,6 +72,12 @@ namespace Myshipping.Application config.ForType() + .Map(dest => dest.Id, src => src.Id) + .Map(dest => dest.ContractNo, src => src.CONTRACT_NO) + .Map(dest => dest.ContractName, src => src.CONTRACT_NAME) + .Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE); + + config.ForType() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ContractNo, src => src.CONTRACT_NO) .Map(dest => dest.ContractName, src => src.CONTRACT_NAME) diff --git a/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs b/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs index 911318d7..205fbab4 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs @@ -23,7 +23,10 @@ namespace Myshipping.Application /// 品名分类名称 /// public string GoodsCategoryName { get; set; } + } + public class ParaGoodsCategoryShowDto: ParaGoodsCategoryDto + { /// /// 创建时间 /// diff --git a/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs b/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs index d4488546..0468523d 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs @@ -51,7 +51,11 @@ namespace Myshipping.Application /// /// 红酒 public string GoodsCategoryName { get; set; } + } + + public class ParaGoodsShowDto: ParaGoodsDto + { /// /// 创建时间 /// diff --git a/Myshipping.Application/Service/Para/Interface/IParaService.cs b/Myshipping.Application/Service/Para/Interface/IParaService.cs index 98357c8f..aced3e8e 100644 --- a/Myshipping.Application/Service/Para/Interface/IParaService.cs +++ b/Myshipping.Application/Service/Para/Interface/IParaService.cs @@ -27,7 +27,7 @@ namespace Myshipping.Application /// /// 品名主键 /// 返回回执 - Task GetParaGoodsInfo(long Id); + Task GetParaGoodsInfo(long Id); /// /// 检索品名参数 @@ -35,7 +35,7 @@ namespace Myshipping.Application /// 检索值 /// 默认最大行数 /// 返回回执 - Task> QueryParaGoodsInfo(string queryItem, int top = 10); + Task> QueryParaGoodsInfo(string queryItem, int top = 10); /// /// 品名参数台账查询 @@ -56,7 +56,7 @@ namespace Myshipping.Application /// /// 品名分类主键 /// 返回回执 - Task GetParaGoodsCategoryInfo(long Id); + Task GetParaGoodsCategoryInfo(long Id); /// /// 检索品名分类参数 @@ -64,7 +64,7 @@ namespace Myshipping.Application /// 检索值 /// 默认最大行数 /// 返回回执 - Task> QueryParaGoodsCategoryInfo(string queryItem, int top = 10); + Task> QueryParaGoodsCategoryInfo(string queryItem, int top = 10); /// /// 作废品名分类参数 @@ -93,7 +93,7 @@ namespace Myshipping.Application /// /// 约号主键 /// 返回回执 - Task GetParaContractNoInfo(long Id); + Task GetParaContractNoInfo(long Id); /// /// 检索约号参数 @@ -101,7 +101,7 @@ namespace Myshipping.Application /// 检索值 /// 默认最大行数 /// 返回回执 - Task> QuerytParaContractNoInfo(string queryItem, int top = 10); + Task> QuerytParaContractNoInfo(string queryItem, int top = 10); /// /// 作废约号参数 diff --git a/Myshipping.Application/Service/Para/ParaService.cs b/Myshipping.Application/Service/Para/ParaService.cs index 2a4af5bf..c52ac215 100644 --- a/Myshipping.Application/Service/Para/ParaService.cs +++ b/Myshipping.Application/Service/Para/ParaService.cs @@ -170,9 +170,9 @@ namespace Myshipping.Application /// 品名主键 /// 返回回执 [HttpGet("/Para/GetParaGoodsInfo")] - public async Task GetParaGoodsInfo([FromQuery]long Id) + public async Task GetParaGoodsInfo([FromQuery]long Id) { - ParaGoodsDto model = null; + ParaGoodsShowDto model = null; try { @@ -182,7 +182,7 @@ namespace Myshipping.Application throw Oops.Oh($"获取品名参数失败"); - model = info.Adapt(); + model = info.Adapt(); } catch (Exception ex) @@ -200,9 +200,9 @@ namespace Myshipping.Application /// 默认最大行数 /// 返回回执 [HttpGet("/Para/QueryParaGoodsInfo")] - public async Task> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10) + public async Task> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10) { - List list = new List(); + List list = new List(); try { @@ -224,7 +224,7 @@ namespace Myshipping.Application var goodsList = await query.Take(top).ToListAsync(); if (goodsList.Count > 0) - list = goodsList.Select(t => t.Adapt()).ToList(); + list = goodsList.Select(t => t.Adapt()).ToList(); } catch (Exception ex) @@ -281,7 +281,7 @@ namespace Myshipping.Application //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) - entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); + entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); var entities = await _paraGoodsInfoRepository.AsQueryable().Filter(null, true) .WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCode), t => t.GOODS_CODE.Contains(QuerySearch.GoodsCode.Trim(), StringComparison.OrdinalIgnoreCase)) @@ -303,7 +303,7 @@ namespace Myshipping.Application PageSize = entities.PageSize, TotalPage = entities.TotalPages, TotalRows = entities.TotalCount, - Rows = entities.Items.Select(t => t.Adapt()).ToList() + Rows = entities.Items.Select(t => t.Adapt()).ToList() }; } @@ -376,9 +376,9 @@ namespace Myshipping.Application /// 品名分类主键 /// 返回回执 [HttpGet("/Para/GetParaGoodsCategoryInfo")] - public async Task GetParaGoodsCategoryInfo(long Id) + public async Task GetParaGoodsCategoryInfo(long Id) { - ParaGoodsCategoryDto model = null; + ParaGoodsCategoryShowDto model = null; try { @@ -388,7 +388,7 @@ namespace Myshipping.Application throw Oops.Oh($"获取品名分类参数失败"); - model = info.Adapt(); + model = info.Adapt(); } catch (Exception ex) @@ -406,9 +406,9 @@ namespace Myshipping.Application /// 默认最大行数 /// 返回回执 [HttpGet("/Para/QueryParaGoodsCategoryInfo")] - public async Task> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10) + public async Task> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10) { - List list = new List(); + List list = new List(); try { @@ -427,7 +427,7 @@ namespace Myshipping.Application var currList = await query.Take(top).ToListAsync(); if (currList.Count > 0) - list = currList.Select(t => t.Adapt()).ToList(); + list = currList.Select(t => t.Adapt()).ToList(); } catch (Exception ex) @@ -549,7 +549,7 @@ namespace Myshipping.Application //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) - entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); + entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); var entities = await _paraGoodsCategoryInfoRepository.AsQueryable().Filter(null, true) .WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCategory), t => t.GOODS_CATEGORY.Contains(QuerySearch.GoodsCategory.Trim(), StringComparison.OrdinalIgnoreCase)) @@ -568,7 +568,7 @@ namespace Myshipping.Application PageSize = entities.PageSize, TotalPage = entities.TotalPages, TotalRows = entities.TotalCount, - Rows = entities.Items.Select(t => t.Adapt()).ToList() + Rows = entities.Items.Select(t => t.Adapt()).ToList() }; } #endregion @@ -633,9 +633,9 @@ namespace Myshipping.Application /// 约号主键 /// 返回回执 [HttpGet("/Para/GetParaContractNoInfo")] - public async Task GetParaContractNoInfo(long Id) + public async Task GetParaContractNoInfo(long Id) { - ParaContractNoDto model = null; + ParaContractNoShowDto model = null; try { @@ -645,7 +645,7 @@ namespace Myshipping.Application throw Oops.Oh($"获取约号参数失败"); - model = info.Adapt(); + model = info.Adapt(); } catch (Exception ex) @@ -665,9 +665,9 @@ namespace Myshipping.Application /// 默认最大行数 /// 返回回执 [HttpGet("/Para/QuerytParaContractNoInfo")] - public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10) + public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10) { - List list = new List(); + List list = new List(); try { @@ -687,7 +687,7 @@ namespace Myshipping.Application var currList = await query.Take(top).ToListAsync(); if (currList.Count > 0) - list = currList.Select(t => t.Adapt()).ToList(); + list = currList.Select(t => t.Adapt()).ToList(); } catch (Exception ex) @@ -803,7 +803,7 @@ namespace Myshipping.Application //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) - entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); + entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); var entities = await _paraContractNoInfoRepository.AsQueryable().Filter(null, true) .WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractNo), t => t.CONTRACT_NO.Contains(QuerySearch.ContractNo.Trim(), StringComparison.OrdinalIgnoreCase)) @@ -823,7 +823,7 @@ namespace Myshipping.Application PageSize = entities.PageSize, TotalPage = entities.TotalPages, TotalRows = entities.TotalCount, - Rows = entities.Items.Select(t => t.Adapt()).ToList() + Rows = entities.Items.Select(t => t.Adapt()).ToList() }; } #endregion From 9bf0eb98ebbe1a0436c41af07ea0d1c075ed110e Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 6 Jan 2023 13:40:24 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9EDI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 9085b636..57a8447c 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -61,6 +61,7 @@ using Microsoft.IdentityModel.Tokens; using Myshipping.Application.EDI.ESL; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; +using NPOI.SS.Formula.Functions; namespace Myshipping.Application { @@ -2639,12 +2640,12 @@ namespace Myshipping.Application //集装箱型 var ediCtnList = _cache.GetAllMappingCtn().GetAwaiter().GetResult() .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) - && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); + && !string.IsNullOrWhiteSpace(t.CarrierCode) && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); //包装 var ediPkgsList = _cache.GetAllMappingPackage().GetAwaiter().GetResult() .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) - && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); + && !string.IsNullOrWhiteSpace(t.CarrierCode) && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); //包装基础数据 var basePkgsList = _cache.GetAllCodePackage().GetAwaiter().GetResult(); @@ -2662,7 +2663,7 @@ namespace Myshipping.Application var ftpSet = _cache.GetAllEdiSetting().GetAwaiter().GetResult() .FirstOrDefault(a => a.EDICODE.Equals(ediRouteEnum.ToString(), StringComparison.OrdinalIgnoreCase) - && a.TenantId == order.TenantId && a.CARRIERID.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)); + && a.TenantId == order.TenantId && !string.IsNullOrWhiteSpace(a.CARRIERID) && a.CARRIERID.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)); if (ftpSet == null) throw Oops.Bah($"获取EDICODE={ediRouteEnum.ToString()}的EDI参数设置失败"); @@ -2986,7 +2987,7 @@ namespace Myshipping.Application var fileInfo = new FileInfo(filePath); - Log.Information($"准备请求发送ftp:{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{filePath}"); + _logger.LogInformation($"准备请求发送ftp:{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{filePath}"); string strJoin = System.IO.File.ReadAllText(filePath);