| | |
| | | |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.NamesToubiao)) |
| | | { |
| | | sql.Append(" and ( exists (select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and b.[names] like '%" + searchEntity.NamesToubiao + "%') "); |
| | | |
| | | sql.Append(" or exists (select c.[ProjectId] from [Projectreason] c where a.[Id]=c.[ProjectId] and c.[reasonname] like '%" + searchEntity.NamesToubiao + "%') "); |
| | | |
| | | sql.Append(" or exists (select d.[ProjectId] from [Projectyouxiao] d where a.[Id]=d.[ProjectId] and d.[namesyouxiao] like '%" + searchEntity.NamesToubiao + "%') "); |
| | | |
| | | sql.Append(" or a.[drhx] like '%" + searchEntity.NamesToubiao + "%' "); |
| | | |
| | | sql.Append(" or a.[dshx] like '%" + searchEntity.NamesToubiao + "%' "); |
| | | |
| | | sql.Append(" )"); |
| | | |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.Fencha)) |
| | | { |
| | | decimal aaaa = 0; |
| | |
| | | |
| | | |
| | | |
| | | var query = _context.Projects |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.NamesToubiao)) |
| | | { |
| | | var sqlsss = sql.ToString(); |
| | | sql.Append(" and ( exists (select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and b.[names] like '%" + searchEntity.NamesToubiao + "%') "); |
| | | |
| | | sql.Append(" or exists (select c.[ProjectId] from [Projectreason] c where a.[Id]=c.[ProjectId] and c.[reasonname] like '%" + searchEntity.NamesToubiao + "%') "); |
| | | |
| | | sql.Append(" or exists (select d.[ProjectId] from [Projectyouxiao] d where a.[Id]=d.[ProjectId] and d.[namesyouxiao] like '%" + searchEntity.NamesToubiao + "%') "); |
| | | sql.Append(" )"); |
| | | sql.Append(" union "+ sqlsss + " and ( a.[drhx] like '%" + searchEntity.NamesToubiao + "%' "); |
| | | |
| | | sql.Append(" or a.[dshx] like '%" + searchEntity.NamesToubiao + "%' "); |
| | | sql.Append(" )"); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var query = _context.Projects |
| | | .FromSqlRaw(sql.ToString()); |
| | | |
| | | |