From 32609928898a897f7407c240bcdc6dc4e6415f0f Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 10 八月 2021 15:30:19 +0800 Subject: [PATCH] 提交 --- zhengcaioa/Services/HrSalaryService.cs | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs index 766985b..f5dd65a 100644 --- a/zhengcaioa/Services/HrSalaryService.cs +++ b/zhengcaioa/Services/HrSalaryService.cs @@ -380,7 +380,7 @@ - if (searchEntity.totalrows == 0) + //if (searchEntity.totalrows == 0) searchEntity.totalrows = query.Count(); var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); @@ -410,14 +410,14 @@ // } // ); - //int year = 0; - //int month = 0; - //if (string.IsNullOrWhiteSpace(searchEntity.YearMonth)) - //{ - // DateTime yearMonth = DateTime.Now;//.Parse(searchEntity.YearMonth + "-01"); - // year = yearMonth.Year; - // month = yearMonth.Month; - //} + int year = 0; + int month = 0; + if (!string.IsNullOrWhiteSpace(searchEntity.YearMonth)) + { + DateTime yearMonth = DateTime.Parse(searchEntity.YearMonth + "-01"); + year = yearMonth.Year; + month = yearMonth.Month; + } var query = (from a in _context.HrSalaries//.Where(x => x.RecStatus == "A") // join b in listCode.Where(x => x.CodeTable == "hr_jibengongzi" && x.CodeField == "dianhuabutie") //on a.Dianhuabutie equals b.CodeSn @@ -438,7 +438,7 @@ && (string.IsNullOrWhiteSpace(searchEntity.Usernumber) || f.Usernumber == searchEntity.Usernumber.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || f.DeptId == searchEntity.DeptId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.UserName) || f.UserName.Contains(searchEntity.UserName.Trim())) - //&& (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || ( a.Year == year && a.Month == month )) + && (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || ( a.Year == year && a.Month == month )) select new HrSalaryDTO { Id = a.Id, @@ -512,7 +512,7 @@ - if (searchEntity.totalrows == 0) + //if (searchEntity.totalrows == 0) searchEntity.totalrows = query.Count(); var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); @@ -830,7 +830,7 @@ }).OrderByDescending(x => x.Modifytime).ToList(); - if (searchEntity.totalrows == 0) + //if (searchEntity.totalrows == 0) searchEntity.totalrows = list.Count(); var rolelist = list.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); -- Gitblit v1.9.1