From cf1c0eb4442e825ebdb628e0654613be7c0e0ca9 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Mon, 12 Jun 2023 11:01:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A6=96=E6=AC=A1=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=9C=AC=E4=BA=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index e276cfd6..405371a9 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -492,7 +492,7 @@ namespace Myshipping.Application { itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId); } - item.IsVGM=itgoods.Where(x => x.SystemCode == "YFVGM").FirstOrDefault()==null?null: itgoods.Where(x => x.SystemCode == "YFVGM").Select(x=>x.FinishTime).FirstOrDefault(); + item.IsVGM = itgoods.Where(x => x.SystemCode == "YFVGM").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFVGM").Select(x => x.FinishTime).FirstOrDefault(); item.IsCanDan = itgoods.Where(x => x.SystemCode == "YFCD").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFCD").Select(x => x.FinishTime).FirstOrDefault(); item.IsZZFX = itgoods.Where(x => x.SystemCode == "ZZFX").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "ZZFX").Select(x => x.FinishTime).FirstOrDefault(); item.GoodsStatusList = itgoods.Union(itconfig).OrderBy(x => x.Sort).ToList(); @@ -593,7 +593,7 @@ namespace Myshipping.Application var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID) .WhereIF(!input.ISDel, x => x.IsDeleted == false) .WhereIF(input.ISDel, x => x.IsDeleted == true) - .WhereIF(input.firstFlag, x => x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) + .WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && x.CreatedUserId == UserManager.UserId) //首次加载数据:ETD前后15天,且创建人是当前人 .Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!! .WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id)) .WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO)) @@ -6364,12 +6364,12 @@ namespace Myshipping.Application } //截单 - if(model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase)) + if (model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase)) { //如果是截单需最后推送货物状态 await SetGoodsStatus("JD", model.Id); } - + } From 2e2d3c8d203b4af46f8e353dfec87c650178b234 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 12 Jun 2023 14:04:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BA=A6=E5=8F=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/Para/ParaContractNoInfo.cs | 15 ++++++++++ .../Service/Para/Dto/ParaContractNoDto.cs | 17 +++++++++++ .../Service/Para/Dto/ParaDtoMapper.cs | 15 ++++++++-- .../Service/Para/Interface/IParaService.cs | 6 +++- .../Service/Para/ParaService.cs | 28 ++++++++++++++++++- 5 files changed, 76 insertions(+), 5 deletions(-) diff --git a/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs b/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs index 474b35e9..047f5598 100644 --- a/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs +++ b/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs @@ -30,5 +30,20 @@ namespace Myshipping.Application /// 合约号备注 /// public string CONTRACT_NOTE { get; set; } + + /// + /// 航线代码 + /// + public string LANE_CODE { get; set; } + + /// + /// 目的港代码 + /// + public string POD_CODE { get; set; } + + /// + /// 船公司代码 + /// + public string CARRIER_CODE { get; set; } } } diff --git a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs index f6296446..815cf32d 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs @@ -31,6 +31,23 @@ namespace Myshipping.Application /// /// 测试1 public string ContractNote { get; set; } + + /// + /// 航线代码 + /// + /// 测试1 + public string LaneCode { get; set; } + + /// + /// 目的港代码 + /// + /// 测试1 + public string PODCode { get; set; } + + /// + /// 船公司代码 + /// + public string CarrierCode { get; set;} } diff --git a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs index 354887af..0ef25336 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs @@ -75,7 +75,10 @@ namespace Myshipping.Application .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); + .Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE) + .Map(dest => dest.LaneCode, src => src.LANE_CODE) + .Map(dest => dest.PODCode, src => src.POD_CODE) + .Map(dest => dest.CarrierCode, src => src.CARRIER_CODE); config.ForType() .Map(dest => dest.Id, src => src.Id) @@ -87,14 +90,20 @@ namespace Myshipping.Application .Map(dest => dest.CreateTime, src => src.CreatedTime) .Map(dest => dest.UpdateUserId, src => src.UpdatedUserId) .Map(dest => dest.UpdateUserName, src => src.UpdatedUserName) - .Map(dest => dest.UpdateTime, src => src.UpdatedTime.HasValue ? src.UpdatedTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""); + .Map(dest => dest.UpdateTime, src => src.UpdatedTime.HasValue ? src.UpdatedTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "") + .Map(dest => dest.LaneCode, src => src.LANE_CODE) + .Map(dest => dest.PODCode, src => src.POD_CODE) + .Map(dest => dest.CarrierCode, src => src.CARRIER_CODE); config.ForType() .Map(dest => dest.Id, src => !string.IsNullOrWhiteSpace(src.Id) ? long.Parse(src.Id) : 0) .Map(dest => dest.CONTRACT_NO, src => src.ContractNo) .Map(dest => dest.CONTRACT_NAME, src => src.ContractName) - .Map(dest => dest.CONTRACT_NOTE, src => src.ContractNote); + .Map(dest => dest.CONTRACT_NOTE, src => src.ContractNote) + .Map(dest => dest.LANE_CODE, src => src.LaneCode) + .Map(dest => dest.POD_CODE, src => src.PODCode) + .Map(dest => dest.CARRIER_CODE, src => src.CarrierCode); } } } diff --git a/Myshipping.Application/Service/Para/Interface/IParaService.cs b/Myshipping.Application/Service/Para/Interface/IParaService.cs index 0383d7cc..412cce52 100644 --- a/Myshipping.Application/Service/Para/Interface/IParaService.cs +++ b/Myshipping.Application/Service/Para/Interface/IParaService.cs @@ -101,8 +101,12 @@ namespace Myshipping.Application /// /// 检索值 /// 默认最大行数 + /// 船公司代码 + /// 航线代码 + /// 目的港代码 /// 返回回执 - Task> QuerytParaContractNoInfo(string queryItem, int top = 10); + Task> QuerytParaContractNoInfo(string queryItem, int top = 10, + string carrier = "", string lane = "",string pod = ""); /// /// 作废约号参数 diff --git a/Myshipping.Application/Service/Para/ParaService.cs b/Myshipping.Application/Service/Para/ParaService.cs index 25d9e810..922fb8ca 100644 --- a/Myshipping.Application/Service/Para/ParaService.cs +++ b/Myshipping.Application/Service/Para/ParaService.cs @@ -609,6 +609,8 @@ namespace Myshipping.Application info.CONTRACT_NO = model.ContractNo?.Trim(); info.CONTRACT_NAME = model.ContractName?.Trim(); info.CONTRACT_NOTE = model.ContractNote?.Trim(); + info.LANE_CODE = model.LaneCode?.Trim(); + info.POD_CODE = model.PODCode?.Trim(); await _paraContractNoInfoRepository.AsUpdateable(info).IgnoreColumns(it => new { @@ -671,14 +673,19 @@ 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, + [FromQuery] string carrier = "", [FromQuery] string lane = "", [FromQuery] string pod = "") { List list = new List(); try { + var query = _paraContractNoInfoRepository.AsQueryable(); if (!string.IsNullOrWhiteSpace(queryItem)) @@ -690,6 +697,25 @@ namespace Myshipping.Application ); } + if (!string.IsNullOrWhiteSpace(carrier)) + { + query = query.Where(t => t.CARRIER_CODE.Equals(carrier)); + } + else + { + throw Oops.Bah($"检索约号失败,船公司不能为空"); + } + + if (!string.IsNullOrWhiteSpace(lane)) + { + query = query.Where(t => t.LANE_CODE.Contains(lane)); + } + + if (!string.IsNullOrWhiteSpace(pod)) + { + query = query.Where(t => t.POD_CODE.Contains(pod)); + } + query = query.OrderBy("CONTRACT_NO asc"); var currList = await query.Take(top).ToListAsync(); From 34c5c74b27328aa8c53f110c0b486870147bc95d Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 12 Jun 2023 16:22:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BA=A6=E5=8F=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/Para/ParaContractNoInfo.cs | 5 +++++ .../Service/Para/Dto/ParaContractNoDto.cs | 6 ++++++ .../Service/Para/Dto/ParaDtoMapper.cs | 3 +++ .../Service/Para/Interface/IParaService.cs | 3 ++- .../Service/Para/ParaService.cs | 17 ++++++++++++----- 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs b/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs index 047f5598..6df8726a 100644 --- a/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs +++ b/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs @@ -36,6 +36,11 @@ namespace Myshipping.Application /// public string LANE_CODE { get; set; } + /// + /// 航线中文 + /// + public string LANE_CNAME { get; set; } + /// /// 目的港代码 /// diff --git a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs index 815cf32d..8f41a5a2 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs @@ -38,6 +38,12 @@ namespace Myshipping.Application /// 测试1 public string LaneCode { get; set; } + /// + /// 航线中文 + /// + /// 测试1 + public string LaneCName { get; set; } + /// /// 目的港代码 /// diff --git a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs index 0ef25336..a48278a9 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs @@ -77,6 +77,7 @@ namespace Myshipping.Application .Map(dest => dest.ContractName, src => src.CONTRACT_NAME) .Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE) .Map(dest => dest.LaneCode, src => src.LANE_CODE) + .Map(dest => dest.LaneCName, src => src.LANE_CNAME) .Map(dest => dest.PODCode, src => src.POD_CODE) .Map(dest => dest.CarrierCode, src => src.CARRIER_CODE); @@ -92,6 +93,7 @@ namespace Myshipping.Application .Map(dest => dest.UpdateUserName, src => src.UpdatedUserName) .Map(dest => dest.UpdateTime, src => src.UpdatedTime.HasValue ? src.UpdatedTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "") .Map(dest => dest.LaneCode, src => src.LANE_CODE) + .Map(dest => dest.LaneCName, src => src.LANE_CNAME) .Map(dest => dest.PODCode, src => src.POD_CODE) .Map(dest => dest.CarrierCode, src => src.CARRIER_CODE); @@ -102,6 +104,7 @@ namespace Myshipping.Application .Map(dest => dest.CONTRACT_NAME, src => src.ContractName) .Map(dest => dest.CONTRACT_NOTE, src => src.ContractNote) .Map(dest => dest.LANE_CODE, src => src.LaneCode) + .Map(dest => dest.LANE_CNAME, src => src.LaneCName) .Map(dest => dest.POD_CODE, src => src.PODCode) .Map(dest => dest.CARRIER_CODE, src => src.CarrierCode); } diff --git a/Myshipping.Application/Service/Para/Interface/IParaService.cs b/Myshipping.Application/Service/Para/Interface/IParaService.cs index 412cce52..774c6091 100644 --- a/Myshipping.Application/Service/Para/Interface/IParaService.cs +++ b/Myshipping.Application/Service/Para/Interface/IParaService.cs @@ -103,10 +103,11 @@ namespace Myshipping.Application /// 默认最大行数 /// 船公司代码 /// 航线代码 + /// 航线中文 /// 目的港代码 /// 返回回执 Task> QuerytParaContractNoInfo(string queryItem, int top = 10, - string carrier = "", string lane = "",string pod = ""); + string carrier = "", string lane = "", string lanecname = "", string pod = ""); /// /// 作废约号参数 diff --git a/Myshipping.Application/Service/Para/ParaService.cs b/Myshipping.Application/Service/Para/ParaService.cs index 922fb8ca..9378cb58 100644 --- a/Myshipping.Application/Service/Para/ParaService.cs +++ b/Myshipping.Application/Service/Para/ParaService.cs @@ -610,6 +610,7 @@ namespace Myshipping.Application info.CONTRACT_NAME = model.ContractName?.Trim(); info.CONTRACT_NOTE = model.ContractNote?.Trim(); info.LANE_CODE = model.LaneCode?.Trim(); + info.LANE_CNAME = model.LaneCName?.Trim(); info.POD_CODE = model.PODCode?.Trim(); await _paraContractNoInfoRepository.AsUpdateable(info).IgnoreColumns(it => new @@ -675,11 +676,12 @@ namespace Myshipping.Application /// 默认最大行数 /// 船公司代码 /// 航线代码 + /// 航线中文 /// 目的港代码 /// 返回回执 [HttpGet("/Para/QuerytParaContractNoInfo")] public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10, - [FromQuery] string carrier = "", [FromQuery] string lane = "", [FromQuery] string pod = "") + [FromQuery] string carrier = "", [FromQuery] string lane = "", [FromQuery] string lanecname = "", [FromQuery] string pod = "") { List list = new List(); @@ -701,16 +703,21 @@ namespace Myshipping.Application { query = query.Where(t => t.CARRIER_CODE.Equals(carrier)); } - else - { - throw Oops.Bah($"检索约号失败,船公司不能为空"); - } + //else + //{ + // throw Oops.Bah($"检索约号失败,船公司不能为空"); + //} if (!string.IsNullOrWhiteSpace(lane)) { query = query.Where(t => t.LANE_CODE.Contains(lane)); } + if (!string.IsNullOrWhiteSpace(lanecname)) + { + query = query.Where(t => t.LANE_CNAME.Contains(lanecname)); + } + if (!string.IsNullOrWhiteSpace(pod)) { query = query.Where(t => t.POD_CODE.Contains(pod));