委托单位和订舱口之后自动带出默认联系人

usertest
cjy 3 months ago
parent 385fbdd1b9
commit 12412d4021

@ -42,7 +42,10 @@ public class ClientSelectRes
/// 助记码
/// </summary>
public string PinYinCode { get; set; }
/// <summary>
/// 往来单位默认联系人
/// </summary>
public ClientContactRes ClientContact { get; set; }
}
/// <summary>

@ -121,5 +121,10 @@ namespace DS.WMS.Core.Info.Dtos
/// Desc: 所属集团
/// </summary>
public string PcorpName { get; set; }
/// <summary>
/// 往来单位默认联系人
/// </summary>
public ClientContactRes ClientContact { get; set; }
}
}

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

Loading…
Cancel
Save