|
|
|
@ -126,7 +126,13 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
PinYinCode = a.ShortName + "(" + a.CodeName + ")",
|
|
|
|
|
//SaleOrgName = string.IsNullOrEmpty(a.SaleOrgId) ? "": orglist.Where(x=>x.Id == long.Parse(a.SaleOrgId)).FirstOrDefault().OrgName
|
|
|
|
|
}, true
|
|
|
|
|
).Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync();
|
|
|
|
|
)
|
|
|
|
|
.Mapper(it =>
|
|
|
|
|
{
|
|
|
|
|
it.ClientContact = tenantDb.Queryable<InfoClientContact>().Where(x => x.ClientId == it.Id && x.Status == StatusEnum.Enable && x.IsDefault == true)
|
|
|
|
|
.Select<ClientContactRes>().First();
|
|
|
|
|
})
|
|
|
|
|
.Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync();
|
|
|
|
|
return await Task.FromResult(DataResult<List<ControllerClientRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess));
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
@ -360,7 +366,7 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
var list = tenantDb.Queryable<InfoClient>()
|
|
|
|
|
.InnerJoin<InfoClientTag>((a, b) => a.Id == b.ClientId)
|
|
|
|
|
.Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt())
|
|
|
|
|
.WhereIF(code == "carrier", (a, b) => b.IsCarrier == true)
|
|
|
|
|
//.WhereIF(code == "carrier", (a, b) => b.IsCarrier == true)
|
|
|
|
|
.WhereIF(code == "yard", (a, b) => b.IsYard == true)
|
|
|
|
|
.WhereIF(code == "booking", (a, b) => b.IsBooking == true)
|
|
|
|
|
.WhereIF(code == "truck", (a, b) => b.IsTruck == true)
|
|
|
|
@ -389,7 +395,12 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
EnShortName = a.EnShortName,
|
|
|
|
|
BLContent = a.BLContent,
|
|
|
|
|
}
|
|
|
|
|
).ToList();
|
|
|
|
|
)
|
|
|
|
|
.Mapper(it =>
|
|
|
|
|
{
|
|
|
|
|
it.ClientContact = tenantDb.Queryable<InfoClientContact>().Where(x => x.ClientId == it.Id && x.Status == StatusEnum.Enable && x.IsDefault == true)
|
|
|
|
|
.Select<ClientContactRes>().First();
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
if (req.BusinessType == BusinessType.OceanShippingExport)
|
|
|
|
|
{
|
|
|
|
|