|
|
@ -16,12 +16,14 @@ namespace djy.Paas.Service
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var rs=new ReturnPagedResult<ClientLinkInfoDto>();
|
|
|
|
var rs=new ReturnPagedResult<ClientLinkInfoDto>();
|
|
|
|
|
|
|
|
|
|
|
|
var sql = DbBus.Get(DbList.djyolddb).Select<InfoClientContact, OPSEAECLIENT>().LeftJoin((link, com) => link.LINKID == com.GID);
|
|
|
|
//var sql = DbBus.Get(DbList.djyolddb).Select<InfoClientContact, OPSEAECLIENT>().LeftJoin((link, com) => link.LINKID == com.GID);
|
|
|
|
sql.WhereIf(Dto.CompGid.IsNotNull(), (link, com) => com.CompId == Dto.CompGid)
|
|
|
|
//sql.WhereIf(Dto.CompGid.IsNotNull(), (link, com) => com.CompId == Dto.CompGid)
|
|
|
|
.WhereIf(Dto.ClientName.IsNotNull(), (link, com) => com.SHORTNAME.Contains(Dto.ClientName))
|
|
|
|
//.WhereIf(Dto.ClientName.IsNotNull(), (link, com) => com.SHORTNAME.Contains(Dto.ClientName))
|
|
|
|
.WhereIf(Dto.ClientCodeName.IsNotNull(), (link, com) => com.CODENAME.Contains(Dto.ClientCodeName))
|
|
|
|
//.WhereIf(Dto.ClientCodeName.IsNotNull(), (link, com) => com.CODENAME.Contains(Dto.ClientCodeName))
|
|
|
|
.WhereIf(Dto.LinkName.IsNotNull(), (link, com) => link.SHOWNAME.Contains(Dto.LinkName));
|
|
|
|
//.WhereIf(Dto.LinkName.IsNotNull(), (link, com) => link.SHOWNAME.Contains(Dto.LinkName));
|
|
|
|
rs.Data = sql.Count(out var totalcount).Page(apiFrom.Page, apiFrom.Limit).ToList<ClientLinkInfoDto>((info,com)=>new ClientLinkInfoDto {CompGid=com.CompId,ClientName=com.SHORTNAME,ClientCodeName=com.CODENAME, LinkName=info.SHOWNAME,Email=info.EMAIL });
|
|
|
|
//rs.Data = sql.Count(out var totalcount).Page(apiFrom.Page, apiFrom.Limit).ToList<ClientLinkInfoDto>((info,com)=>new ClientLinkInfoDto {CompGid=com.CompId,ClientName=com.SHORTNAME,ClientCodeName=com.CODENAME, LinkName=info.SHOWNAME,Email=info.EMAIL });
|
|
|
|
|
|
|
|
var sql = DbBus.Get(DbList.djyolddb).Select<CompanyNew, UserBaseinfo>().LeftJoin((comp,user)=>comp.AdminUser==user.USERID);
|
|
|
|
|
|
|
|
rs.Data = sql.Count(out var totalcount).Page(apiFrom.Page, apiFrom.Limit).ToList<ClientLinkInfoDto>((comp, user) => new ClientLinkInfoDto { CompGid = comp.CompId, ClientName = comp.CompName, ClientCodeName = "", LinkName = comp.AdminShowName, Email = user.EMAIL1 });
|
|
|
|
rs.OK();
|
|
|
|
rs.OK();
|
|
|
|
return rs;
|
|
|
|
return rs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|