username@email.com
2021-07-27 072169e3c5446f94e2cf4e570e5c7952bb5b15b9
zhengcaioa/Services/ProjectService.cs
@@ -333,7 +333,26 @@
                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (b.[defen]-a.[drhx_defen])  <= " + aaaa + " ) ");
                }
            }
            if (!string.IsNullOrWhiteSpace(searchEntity.Baojiachaxiaoyu))
            {
                decimal aaaa = 0;
                decimal.TryParse(searchEntity.Baojiachaxiaoyu, out aaaa);
                if (aaaa > 0)
                {
                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (convert(numeric(10,2),b.[price] )-convert(numeric(10,2),a.[drhx_price] ))  <= " + aaaa + " ) ");
                }
            }
            if (!string.IsNullOrWhiteSpace(searchEntity.Fenchadayu))
            {
                decimal aaaa = 0;
                decimal.TryParse(searchEntity.Fenchadayu, out aaaa);
                if (aaaa > 0)
                {
                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (b.[defen]-a.[drhx_defen])  >= " + aaaa + " ) ");
                }
            }
            if (!string.IsNullOrWhiteSpace(searchEntity.Shuliang))
            {
@@ -519,7 +538,7 @@
            
            
            if (searchEntity.totalrows == 0)
            //if (searchEntity.totalrows == 0)
                searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            list = _mapper.Map<List<ProjectDTO>>(lianlist);
@@ -617,5 +636,16 @@
            CacheHelperNetCore.CacheInsert("Projects", list);
            return list;
        }
        public List<ProjectDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax)
        {
            var listPosition = _context.Projects.Where(r => r.RecStatus == "A" && r.Creater == userid && r.Createtime >= datemin && r.Createtime < datemax).ToList();
            var list = _mapper.Map<List<ProjectDTO>>(listPosition);
            return list;
        }
    }
}