Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.csZobrazit soubor
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.csZobrazit soubor
var baseDataName = this.BaseRepository().getDbConnection().Database;
var baseDataName1 = this.BaseRepository("CollegeMIS").getDbConnection().Database;
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"t.* ");
strSql.Append(" FROM PartyManage t");
strSql.Append(" WHERE 1=1 ");
strSql.Append($" select zb.F_DepartmentId as Department, COALESCE (aa.num, 0) num ,COALESCE (bb.number, 0) number from (select* from {baseDataName}.dbo.LR_Base_Department where f_companyid ='06890807-2106-4e6d-9f99-484527503be9') zb ");
strSql.Append($" left join(select F_DepartmentId,count(*) as num from {baseDataName}.dbo.LR_Base_User group by F_DepartmentId ) aa on aa.F_DepartmentId =zb.F_DepartmentId");
strSql.Append($" left join (select Department,count(*) as number from {baseDataName1}.dbo.PartyManage where 1=1 ");