From 83c4efe25b7b5ee027a34987f8ee508a379c1d47 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 10 九月 2021 15:38:12 +0800 Subject: [PATCH] 工资修改 --- zhengcaioa/Services/ProjectService.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs index ca6e783..0c22304 100644 --- a/zhengcaioa/Services/ProjectService.cs +++ b/zhengcaioa/Services/ProjectService.cs @@ -372,6 +372,32 @@ sql.Append(" ) "); } } + if (!string.IsNullOrWhiteSpace(searchEntity.Chuanbiaofenxi)) + { + if (searchEntity.Chuanbiaofenxi == "01") + { + sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and (b.[defen]-a.[drhx_defen]) >= 10 ) "); + sql.Append(" and exists ( select * from( select ( isnull((select COUNT(*) ProjectIdshuliang from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] group by b.ProjectId) ,0)+ "); + + sql.Append(" isnull( (select COUNT(*) ProjectIdshuliang from [Projectreason] b where a.[Id]=b.[ProjectId] group by b.ProjectId),0)+ "); + sql.Append(" isnull( (select COUNT(*) ProjectIdshuliang from [Projectyouxiao] b where a.[Id]=b.[ProjectId] group by b.ProjectId),0)+ "); + sql.Append(" isnull( ( select COUNT(*) ProjectIdshuliang from [Project] b where a.[Id]=b.[Id] and b.drhx is not null ),0)+ "); + sql.Append(" isnull( (select COUNT(*) ProjectIdshuliang from [Project] b where a.[Id]=b.[Id] and b.dshx is not null ),0) "); + sql.Append(" ) as sum_count ) a where a.sum_count <= 5 "); + sql.Append(" ) "); + } + else if (searchEntity.Chuanbiaofenxi == "02") + { + sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and (b.[defen]-a.[drhx_defen]) >= 20 ) "); + + + } + else if (searchEntity.Chuanbiaofenxi == "03") + { + sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and (b.[defen]-a.[drhx_defen]) >= 10 ) "); + } + + } if (!string.IsNullOrWhiteSpace(searchEntity.Reasonname)) @@ -429,6 +455,17 @@ if (!string.IsNullOrWhiteSpace(searchEntity.StartTimestar)) { sql.Append(" and a.start_time <='" + StartTimestarend.AddDays(1).ToString("yyyy-MM-dd") + "'"); + + } + + if (!string.IsNullOrWhiteSpace(searchEntity.KaibiaoTimeStar)) + { + sql.Append(" and a.start_time >='" + searchEntity.KaibiaoTimeStar + "'"); + + } + if (!string.IsNullOrWhiteSpace(searchEntity.KaibiaoTimeEnd)) + { + sql.Append(" and a.start_time <='" + searchEntity.KaibiaoTimeEnd + "'"); } @@ -544,6 +581,20 @@ searchEntity.totalrows = query.Count(); var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); list = _mapper.Map<List<ProjectDTO>>(lianlist); + + var cgfs = GetCgfs(); + foreach(var projectDTO in list) + { + var cgf = cgfs.Where(x=>x.Id == projectDTO.Cgfs).FirstOrDefault(); + if (cgf != null) + { + projectDTO.CgfsName = cgf.Name; + } + + } + + + data.LoadData(searchEntity, list); return data; } -- Gitblit v1.9.1