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/zhengcaioa/Controllers/HR/SalaryCheckController.cs | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs index aac96ad..2e21181 100644 --- a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs @@ -70,6 +70,10 @@ public IActionResult GetList(HrSalaryDTOSearch search) { //_hrSalaryService.AutoCheck(); + if (!string.IsNullOrEmpty(search.YearMonth222)) + { + search.YearMonth = search.YearMonth222; + } return new JsonResult(_hrSalaryService.SearchSalaryByPaging(search)); } @@ -98,7 +102,7 @@ { dto.Peichang = 0; } - if (!dto.Jiucuo.HasValue) + if (!dto.Jiucuo.HasValue || dto.Jiucuo.Value == 0) { dto.Jiucuo = 0; } @@ -292,8 +296,8 @@ ViewData["ActionInfo"] = actionlist; ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); - ViewBag.stime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.ToString("yyyy-MM"); - ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); + ViewBag.stime = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.ToString("yyyy-MM"); + ViewBag.etime = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); return View(); } @@ -307,6 +311,14 @@ { //鑷姩纭 //_hrSalaryService.AutoCheck(); + if (!string.IsNullOrEmpty(search.searchDatestart222)) + { + search.searchDatestart = search.searchDatestart222; + } + if (!string.IsNullOrEmpty(search.searchDateend222)) + { + search.searchDateend = search.searchDateend222; + } return new JsonResult(_hrSalaryService.SearchByPagingFinish(search)); } @@ -330,8 +342,8 @@ ViewData["ActionInfo"] = actionlist; //ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); - ViewBag.stime =DateTime.Now.ToString("yyyy-MM"); - ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); + ViewBag.stime =DateTime.Now.AddMonths(-1).ToString("yyyy-MM"); + ViewBag.etime = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); ViewBag.UserId = UserId; @@ -345,15 +357,23 @@ /// <returns></returns> public IActionResult GetSearchListRenshi(HrSalaryDTOSearch search) { + if (!string.IsNullOrEmpty(search.searchDatestart222)) + { + search.searchDatestart = search.searchDatestart222; + } + if (!string.IsNullOrEmpty(search.searchDateend222)) + { + search.searchDateend = search.searchDateend222; + } //鑷姩纭 //_hrSalaryService.AutoCheck(); - if (string.IsNullOrEmpty(search.searchDatestart)) + if (!string.IsNullOrEmpty(search.searchDatestart)) { search.searchDatestart = DateTime.Now.ToString("yyyy-MM"); } - if (string.IsNullOrEmpty(search.searchDateend)) + if (!string.IsNullOrEmpty(search.searchDateend)) { search.searchDate = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); } -- Gitblit v1.9.1