username@email.com
2021-11-25 402f9568e48e6e1a9d29d37dcda46737047425d5
zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs
@@ -69,7 +69,11 @@
        /// <returns></returns>
        public IActionResult GetList(HrSalaryDTOSearch search)
        {
            _hrSalaryService.AutoCheck();
            //_hrSalaryService.AutoCheck();
            if (!string.IsNullOrEmpty(search.YearMonth222))
            {
                search.YearMonth = search.YearMonth222;
            }
            return new JsonResult(_hrSalaryService.SearchSalaryByPaging(search));
        }
@@ -86,6 +90,26 @@
            {
                dto = _hrSalaryService.Get(id);
            }
            if(!dto.Jiangjin.HasValue)
            {
                dto.Jiangjin = 0;
            }
            if (!dto.Bufagongzi.HasValue)
            {
                dto.Bufagongzi = 0;
            }
            if (!dto.Peichang.HasValue)
            {
                dto.Peichang = 0;
            }
            if (!dto.Jiucuo.HasValue || dto.Jiucuo.Value == 0)
            {
                dto.Jiucuo = 0;
            }
            //if (!dto.Yufagongziheji.HasValue)
            //{
            //    dto.Yufagongziheji = 0;
            //}
            ViewData.Model = dto;
            return View();
        }
@@ -172,8 +196,8 @@
                var  salaryDTO  = _hrSalaryService.Get(salaryId);
                    dto = new HrSalaryAppeal();
                    dto.salary_id = salaryId;
                    dto.Year = salaryDTO.Year;
                    dto.Month = salaryDTO.Month;
                    dto.year = salaryDTO.Year;
                    dto.month = salaryDTO.Month;
                dto.createrName = curentuser.UserName;
                dto.tittle = "工资申诉(" + curentuser.UserName + ")";
            }
@@ -188,7 +212,7 @@
                else
                {
                    dangqianbuzhou = wfRunProcessDTO.Step;
                    //查询历史意见
                    //查询审批进度
                    lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
                    if (wfRunProcessDTO.Step != "提交")
                    {
@@ -240,12 +264,20 @@
                    data.shenpi_status = "D";
                    data.status = "A";
                    resultEntity = _hrSalaryService.CheckAppea(data);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                   
                //发起流程相关
                resultEntity = _wfRunProcessService.WfSalaryAppeal(data.id, data.Step, data.Tongguojujue, curentuser.Id, data.Content, data.tittle, "v1");
                if (!resultEntity.Result)
                {
                    return new JsonResult(resultEntity);
                }
                scope.Complete();
            }
            return new JsonResult(resultEntity);
@@ -268,8 +300,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-dd");
            ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd");
            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();
        }
@@ -282,11 +314,77 @@
        public IActionResult GetSearchList(HrSalaryDTOSearch search)
        {
            //自动确认
            _hrSalaryService.AutoCheck();
            //_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));
        }
        #endregion
        #region 工资查询
        public IActionResult SearchIndexRenshi(string UserId)
        {
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            ViewData["ActionInfo"] = actionlist;
            //ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList();
            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;
            return View();
        }
        /// <summary>
        /// 列表内容
        /// </summary>
        /// <param name="search"></param>
        /// <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))
            {
                search.searchDatestart = DateTime.Now.ToString("yyyy-MM");
            }
            if (!string.IsNullOrEmpty(search.searchDateend))
            {
                search.searchDate = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM");
            }
            return new JsonResult(_hrSalaryService.SearchByPagingFinish(search));
        }
        #endregion
    }
}