From 1a377b23dc06ea31d0c0a368072ff1b52a4e6a40 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 10 八月 2021 16:10:44 +0800 Subject: [PATCH] tijiao --- zhengcaioa/Services/HrSalaryService.cs | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs index 7c06702..b20d382 100644 --- a/zhengcaioa/Services/HrSalaryService.cs +++ b/zhengcaioa/Services/HrSalaryService.cs @@ -350,7 +350,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(); @@ -415,7 +415,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())) - && ( (a.Year == year && a.Month == month)) + && (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || ( a.Year == year && a.Month == month )) select new HrSalaryDTO { Id = a.Id, @@ -488,7 +488,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(); if(rolelist!=null && rolelist.Count>0) @@ -696,7 +696,9 @@ temp.reason = model.reason; temp.amount = model.amount; temp.basis = model.basis; - temp.sub_time = DateTime.Now; + temp.shenpi_status = model.shenpi_status; + + } else { @@ -727,12 +729,20 @@ /// <param name="id"></param> /// <param name="user"></param> /// <returns></returns> - public HrSalaryAppeal GetAppeal(string id,string user) + public HrSalaryAppeal GetAppeal(string id = "", string user = "", string salaryId = "") { HrSalaryAppeal hd = new HrSalaryAppeal(); try { - hd = _context.HrSalaryAppeal.Where(e => e.salary_id == id && e.sub_user == user).SingleOrDefault(); + if (!string.IsNullOrEmpty(salaryId)) + { + hd = _context.HrSalaryAppeal.Where(e => e.salary_id == salaryId && e.sub_user == user && e.status == "A").FirstOrDefault(); + } + else + { + hd = _context.HrSalaryAppeal.Where(e => e.id == id && e.status == "A").FirstOrDefault(); + } + } catch (Exception er) { @@ -850,7 +860,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(); if (rolelist != null && rolelist.Count > 0) -- Gitblit v1.9.1