From c170af43e3d93fb0cc88219595ce0589492bdf78 Mon Sep 17 00:00:00 2001 From: cjy Date: Thu, 14 Nov 2024 10:20:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AE=A2=E6=88=B7=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=AD=97=E5=85=B8=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Fee/Method/FeeCustTemplateService.cs | 4 +- .../Method/BookingSlot/BookingSlotService.cs | 4 +- .../Op/Method/Cargoo/CargooService.cs | 2 +- .../Op/Method/SeaExportAIService.cs | 14 +- .../DS.WMS.Core/Op/Method/SeaExportService.cs | 6 +- .../Sys/Interface/IClientCommonService.cs | 10 +- .../Sys/Method/ClientCommonService.cs | 401 +----------------- .../TaskPlat/Method/TaskManageBCService.cs | 2 +- .../Controllers/ClientCommonController.cs | 22 +- 9 files changed, 43 insertions(+), 422 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeCustTemplateService.cs b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeCustTemplateService.cs index 279a32a9..cfbd39b9 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeCustTemplateService.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeCustTemplateService.cs @@ -276,7 +276,7 @@ namespace DS.WMS.Core.Fee.Method if (fee.CustomerId == 0) { - switch (fee.CustomerType) + switch (fee.CustomerType.ToLower()) { case "controller": fee.CustomerId = order.CustomerId; @@ -323,7 +323,7 @@ namespace DS.WMS.Core.Fee.Method fee.CustomerName = order.WareHouse; break; - case "shipperCn": + case "shippercn": fee.CustomerId = order.ShipperCnId.GetValueOrDefault(); fee.CustomerName = order.ShipperCn; break; diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs index ef29a6c6..cee7fe11 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs @@ -2388,7 +2388,7 @@ namespace DS.WMS.Core.Op.Method if (model.CustomerContactList != null && model.CustomerContactList.Count > 0) { //取委托客户下面所有的联系人列表 - var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("isController").GetAwaiter().GetResult().Data; + var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("controller").GetAwaiter().GetResult().Data; if (djyCustomerInfo == null) { @@ -2724,7 +2724,7 @@ namespace DS.WMS.Core.Op.Method var bookingContactList = tenantDb.Queryable() .Where(a => a.BusinessId == id && a.Deleted == false).ToList(); - var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("isController") + var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("controller") .GetAwaiter().GetResult().Data; diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/Cargoo/CargooService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/Cargoo/CargooService.cs index 62387384..765d4628 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/Cargoo/CargooService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/Cargoo/CargooService.cs @@ -501,7 +501,7 @@ namespace DS.WMS.Core.Op.Method }); //取委托客户下面所有的联系人列表 - var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("isController").GetAwaiter().GetResult().Data; + var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("controller").GetAwaiter().GetResult().Data; if (djyCustomerInfo == null) { diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportAIService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportAIService.cs index b82297f3..90acfe91 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportAIService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportAIService.cs @@ -116,7 +116,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.BookingParty)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.BookingParty) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isController").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "controller").Any()).FirstAsync(); if (client.IsNotNull()) { @@ -133,7 +133,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.Shipper)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.Shipper) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isShipper").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "shipper").Any()).FirstAsync(); if (client.IsNotNull()) { @@ -149,7 +149,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.Consigner)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.Consigner) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isConsigner").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "consigner").Any()).FirstAsync(); if (client.IsNotNull()) { @@ -165,7 +165,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.NotifyParty)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.NotifyParty) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isNotifyParty").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "notifyParty").Any()).FirstAsync(); if (client.IsNotNull()) { @@ -323,7 +323,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.ShipAgency)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.ShipAgency) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isShipAgency").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "shipgency").Any()).FirstAsync(); if (client.IsNotNull()) { @@ -339,7 +339,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.FreightForwarder)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.ShipAgency) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isBooking").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "booking").Any()).FirstAsync(); if (client.IsNotNull()) { @@ -356,7 +356,7 @@ namespace DS.WMS.Core.Op.Method if (!String.IsNullOrEmpty(aiInfo.Station)) { var client = await tenantDb.Queryable().Where(a => a.Description.Contains(aiInfo.Station) && SqlFunc.Subqueryable().Where( - b => b.ClientId == a.Id && b.Value == "isYard").Any()).FirstAsync(); + b => b.ClientId == a.Id && b.Value == "yard").Any()).FirstAsync(); if (client.IsNotNull()) { diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs index 5ef4c562..027ccb28 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -1016,7 +1016,7 @@ public partial class SeaExportService : ISeaExportService } if (seaExport.ShipperCnId != 0) { - var delShipperCns = contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "shippercn" && x.CustomerId != seaExport.ShipperCnId).ToList(); + var delShipperCns = contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "shipperCn" && x.CustomerId != seaExport.ShipperCnId).ToList(); if (delShipperCns.Count > 0) { delList.AddRange(delShipperCns); @@ -1024,14 +1024,14 @@ public partial class SeaExportService : ISeaExportService var defaultContact = sqlSugarScope.Queryable().Where(x => x.ClientId == seaExport.ShipperCnId && x.IsDefault == true).First(); if (defaultContact.IsNotNull()) { - if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "shippercn" && x.CustomerId == seaExport.ShipperCnId).Any()) + if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "shipperCn" && x.CustomerId == seaExport.ShipperCnId).Any()) { addList.Add(new BusinessOrderContact() { BusinessId = seaExport.Id, CustomerId = (long)seaExport.ShipperCnId, CustomerName = seaExport.ShipperCn, - CustomerType = "shippercn", + CustomerType = "shipperCn", CustomerTypeName = "国内发货人", Name = defaultContact.Name, Mobile = defaultContact.Mobile, diff --git a/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs index 8111800f..4c162bf8 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs @@ -118,11 +118,11 @@ public interface IClientCommonService /// /// public Task> GetClientSelectInfoByCode(ClientSelectInfoReq req); - /// - /// 获取往来单位下拉集合列表 - /// - /// - public Task>> GetMultiClientList(); + ///// + ///// 获取往来单位下拉集合列表 + ///// + ///// + //public Task>> GetMultiClientList(); /// /// 提取汇率信息 /// diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs index e23d1b88..fd943556 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs @@ -244,9 +244,9 @@ public class ClientCommonService : IClientCommonService exp = exp.And(c => SqlFunc.Subqueryable().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(x => userids.Contains(x.UserId.ToString()) && x.ClientId == c.Id).Any()); var queryData1 = tenantDb.Queryable().ClearFilter().Where(c => c.Status == StatusEnum.Enable.ToEnumInt() && SqlFunc.Subqueryable().Where( - b => b.ClientId == c.Id && b.Value == "isController").Any()).Where(exp.ToExpression()); + b => b.ClientId == c.Id && b.Value == "controller").Any()).Where(exp.ToExpression()); var queryData2 = queryData.Where(c=> SqlFunc.Subqueryable().Where( - b => b.ClientId == c.Id && b.Value == "isController").Any()).Where(conditions); + b => b.ClientId == c.Id && b.Value == "controller").Any()).Where(conditions); var queryData0 = tenantDb.UnionAll(queryData1, queryData2); var data = await queryData0 .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()) //&& c.CreateBy == long.Parse(user.UserId) && c.StartDate <= DateTime.Now && c.EndDate >= DateTime.Now @@ -524,7 +524,7 @@ public class ClientCommonService : IClientCommonService var code = req.Code.ToLower(); if (req.BusinessType == BusinessType.OceanShippingExport) { - var info = tenantDb.Queryable().First(x => x.Id == req.BusinessId); + var info = tenantDb.Queryable().Filter(null,true).First(x => x.Id == req.BusinessId); if (info.IsNull()) { return DataResult.Failed("业务信息不存在!"); @@ -614,15 +614,15 @@ public class ClientCommonService : IClientCommonService data.ClientId = seaExport.AgentId; data.ClientName = seaExport.Agent; break; - case "warehouse": + case "wareHouse": data.ClientId = seaExport.WareHouseId; data.ClientName = seaExport.WareHouse; break; - case "agentcn": + case "agentn": break; case "express": break; - case "airlines": + case "airLines": break; case "wharf": break; @@ -638,17 +638,17 @@ public class ClientCommonService : IClientCommonService data.ClientId = (long)seaExport.ShipperId; data.ClientName = seaExport.Shipper; break; - case "shippercn": + case "shipperCn": data.ClientId = (long)seaExport.ShipperCnId; data.ClientName = seaExport.ShipperCn; break; - case "notifyparty": + case "notifyParty": data.ClientId = (long)seaExport.NotifyPartyId; data.ClientName = seaExport.NotifyParty; break; - case "tradingagency": + case "tradingAgency": break; - case "shipagency": + case "shipAgency": data.ClientId = seaExport.ShipAgencyId; data.ClientName = seaExport.ShipAgency; break; @@ -661,386 +661,7 @@ public class ClientCommonService : IClientCommonService } #endregion - - #region 获取往来单位下拉集合列表 - /// - /// 获取往来单位下拉集合列表 - /// - /// - public async Task>> GetMultiClientList() - { - var tenantDb = saasService.GetBizDbScopeById(user.TenantId); - - var data = new List(); - var parList = tenantDb.Queryable() - .Where(x => x.Status == StatusEnum.Enable) - .Select() - .ToList(); - - var carrier = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isCarrier").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("carrier", carrier)); - - var yard = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isYard").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("yard", yard)); - - var booking = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isBooking").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("booking", booking)); - - var truck = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isTruck").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("truck", truck)); - - var controller = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isController").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("controller", controller)); - - var custom = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isCustom").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("custom", custom)); - - var agent = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isAgent").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("agent", agent)); - - var agentcn = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isAgentCn").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("agentcn", agentcn)); - - var express = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isExpress").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("express", express)); - - var airlines = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isAirLines").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("airlines", airlines)); - - var shipper = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isShipper").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("shipper", shipper)); - - var shippercn = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isShipperCn").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("shippercn", shippercn)); - - var notifyparty = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isNotifyParty").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("notifyparty", notifyparty)); - - - var warehouse = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isWareHouse").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("warehouse", warehouse)); - - - var wharf = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isWharf").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("wharf", wharf)); - - var insurer = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isInsurer").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("insurer", insurer)); - - var leasing = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isLeasing").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("leasing", leasing)); - - var tradingagency = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isTradingAgency").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("tradingagency", tradingagency)); - - var shipagency = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isShipAgency").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - data.Add(new ClientSelectMultiRes("shipagency", shipagency)); - - var enterprise = await tenantDb.Queryable() - .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable().Where(s => s.ClientId == a.Id && s.Value == "isEnterprise").Any()) - .Select(a => new ClientSelectRes - { - Id = a.Id, - CodeName = a.CodeName, - ShortName = a.ShortName, - EnShortName = a.EnShortName, - BLContent = a.BLContent, - Description = a.Description, - }) - .Mapper(it => - { - it.ClientParams = parList.Where(x => x.CustomerId == it.Id).ToList(); - }) - .ToListAsync(); - - return await Task.FromResult(DataResult>.Success(data)); - } - #endregion + /// /// 提取汇率信息 diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs index c821001f..6ff9dd91 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageBCService.cs @@ -608,7 +608,7 @@ namespace DS.WMS.Core.TaskPlat.Method if (model.CustomerContactList != null && model.CustomerContactList.Count > 0) { //取委托客户下面所有的联系人列表 - var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("isController").GetAwaiter().GetResult().Data; + var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("controller").GetAwaiter().GetResult().Data; if (djyCustomerInfo == null) { diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs index 54b73ee1..3c19508e 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs @@ -245,17 +245,17 @@ public class ClientCommonController : ApiController return res; } - /// - /// 获取往来单位下拉集合列表 - /// - /// - [HttpGet, Obsolete] - [Route("GetMultiClientList")] - public async Task>> GetMultiClientList() - { - var res = await _invokeService.GetMultiClientList(); - return res; - } + ///// + ///// 获取往来单位下拉集合列表 + ///// + ///// + //[HttpGet, Obsolete] + //[Route("GetMultiClientList")] + //public async Task>> GetMultiClientList() + //{ + // var res = await _invokeService.GetMultiClientList(); + // return res; + //} /// /// 提取汇率信息 先提取CodeConfig 参数ExchangeRateType(ETD\AccountDate\CreateTime) 再提取SysConfig配置,最后默认取业务订单ETD