处理客户属性字典值

dev
cjy 1 week ago
parent 34dee4e297
commit c170af43e3

@ -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;

@ -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<BusinessOrderContact>()
.Where(a => a.BusinessId == id && a.Deleted == false).ToList();
var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("isController")
var djyCustomerInfo = _clientInfoService.GetClientInfoWithContact("controller")
.GetAwaiter().GetResult().Data;

@ -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)
{

@ -116,7 +116,7 @@ namespace DS.WMS.Core.Op.Method
if (!String.IsNullOrEmpty(aiInfo.BookingParty))
{
var client = await tenantDb.Queryable<InfoClient>().Where(a => a.Description.Contains(aiInfo.BookingParty) && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>().Where(a => a.Description.Contains(aiInfo.Shipper) && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>().Where(a => a.Description.Contains(aiInfo.Consigner) && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>().Where(a => a.Description.Contains(aiInfo.NotifyParty) && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>().Where(a => a.Description.Contains(aiInfo.ShipAgency) && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>().Where(a => a.Description.Contains(aiInfo.ShipAgency) && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>().Where(a => a.Description.Contains(aiInfo.Station) && SqlFunc.Subqueryable<InfoClientAttribute>().Where(
b => b.ClientId == a.Id && b.Value == "isYard").Any()).FirstAsync();
b => b.ClientId == a.Id && b.Value == "yard").Any()).FirstAsync();
if (client.IsNotNull())
{

@ -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<InfoClientContact>().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,

@ -118,11 +118,11 @@ public interface IClientCommonService
/// </summary>
/// <returns></returns>
public Task<DataResult<ClientSelectInfoRes>> GetClientSelectInfoByCode(ClientSelectInfoReq req);
/// <summary>
/// 获取往来单位下拉集合列表
/// </summary>
/// <returns></returns>
public Task<DataResult<List<ClientSelectMultiRes>>> GetMultiClientList();
///// <summary>
///// 获取往来单位下拉集合列表
///// </summary>
///// <returns></returns>
//public Task<DataResult<List<ClientSelectMultiRes>>> GetMultiClientList();
/// <summary>
/// 提取汇率信息
/// </summary>

@ -244,9 +244,9 @@ public class ClientCommonService : IClientCommonService
exp = exp.And(c => SqlFunc.Subqueryable<InfoClientStakeholder>().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(x => userids.Contains(x.UserId.ToString()) && x.ClientId == c.Id).Any());
var queryData1 = tenantDb.Queryable<InfoClient>().ClearFilter<ISharedOrgId>().Where(c => c.Status == StatusEnum.Enable.ToEnumInt() && SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClientAttribute>().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<SeaExport>().First(x => x.Id == req.BusinessId);
var info = tenantDb.Queryable<SeaExport>().Filter(null,true).First(x => x.Id == req.BusinessId);
if (info.IsNull())
{
return DataResult<ClientSelectInfoRes>.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;
@ -662,385 +662,6 @@ public class ClientCommonService : IClientCommonService
#endregion
#region 获取往来单位下拉集合列表
/// <summary>
/// 获取往来单位下拉集合列表
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<ClientSelectMultiRes>>> GetMultiClientList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = new List<ClientSelectMultiRes>();
var parList = tenantDb.Queryable<InfoClientParam>()
.Where(x => x.Status == StatusEnum.Enable)
.Select<ClientParamRes>()
.ToList();
var carrier = await tenantDb.Queryable<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt()).Where(a => SqlFunc.Subqueryable<InfoClientAttribute>().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<List<ClientSelectMultiRes>>.Success(data));
}
#endregion
/// <summary>
/// 提取汇率信息

@ -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)
{

@ -245,17 +245,17 @@ public class ClientCommonController : ApiController
return res;
}
/// <summary>
/// 获取往来单位下拉集合列表
/// </summary>
/// <returns></returns>
[HttpGet, Obsolete]
[Route("GetMultiClientList")]
public async Task<DataResult<List<ClientSelectMultiRes>>> GetMultiClientList()
{
var res = await _invokeService.GetMultiClientList();
return res;
}
///// <summary>
///// 获取往来单位下拉集合列表
///// </summary>
///// <returns></returns>
//[HttpGet, Obsolete]
//[Route("GetMultiClientList")]
//public async Task<DataResult<List<ClientSelectMultiRes>>> GetMultiClientList()
//{
// var res = await _invokeService.GetMultiClientList();
// return res;
//}
/// <summary>
/// 提取汇率信息 先提取CodeConfig 参数ExchangeRateType(ETD\AccountDate\CreateTime) 再提取SysConfig配置最后默认取业务订单ETD

Loading…
Cancel
Save