You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ys.Core.Common;
using djy.Model;
using djy.Paas.IService;
using djy.Paas.Model;
namespace djy.Paas.Service
{
public class ClientLinkInfoService : ServBase, IClientLinkInfoService
{
public ReturnPagedResult<ClientLinkInfoDto> GetList(ClientLinkInfoDto Dto, ApiFromDto apiFrom)
{
var rs=new ReturnPagedResult<ClientLinkInfoDto>();
//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)
//.WhereIf(Dto.ClientName.IsNotNull(), (link, com) => com.SHORTNAME.Contains(Dto.ClientName))
//.WhereIf(Dto.ClientCodeName.IsNotNull(), (link, com) => com.CODENAME.Contains(Dto.ClientCodeName))
//.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 });
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();
return rs;
}
}
}