diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientSelectRes.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientSelectRes.cs
index 77913220..0b4fbcfe 100644
--- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientSelectRes.cs
+++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientSelectRes.cs
@@ -42,7 +42,10 @@ public class ClientSelectRes
/// 助记码
///
public string PinYinCode { get; set; }
-
+ ///
+ /// 往来单位默认联系人
+ ///
+ public ClientContactRes ClientContact { get; set; }
}
///
diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs
index 29d03a6a..69c9d735 100644
--- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs
+++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ControllerClientRes.cs
@@ -121,5 +121,10 @@ namespace DS.WMS.Core.Info.Dtos
/// Desc: 所属集团
///
public string PcorpName { get; set; }
+
+ ///
+ /// 往来单位默认联系人
+ ///
+ public ClientContactRes ClientContact { get; set; }
}
}
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 8234a76c..342c0089 100644
--- a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs
+++ b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs
@@ -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().Where(x => x.ClientId == it.Id && x.Status == StatusEnum.Enable && x.IsDefault == true)
+ .Select().First();
+ })
+ .Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync();
return await Task.FromResult(DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess));
}
///
@@ -360,7 +366,7 @@ public class ClientCommonService : IClientCommonService
var list = tenantDb.Queryable()
.InnerJoin((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().Where(x => x.ClientId == it.Id && x.Status == StatusEnum.Enable && x.IsDefault == true)
+ .Select().First();
+ }).ToList();
if (req.BusinessType == BusinessType.OceanShippingExport)
{