| | |
| | | private readonly IWfRunProcessService _wfRunProcessService; |
| | | private readonly IWfHistoryService _wfHistoryService; |
| | | private readonly IWfNeeddeelService _wfNeeddeelService; |
| | | private readonly IPltPageService _pltPageService; |
| | | [CheckLogin] |
| | | public SigninController(ILogger<SigninController> logger, IAdmSigninService signinService, ISysAttachmentService sysAttachmentService |
| | | , IAdmAttendanceRuleService attendanceRuleService, ILiaotianService liaotianService, IWfRunProcessService wfRunProcessService |
| | | , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService) |
| | | , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService |
| | | , IPltPageService pltPageService) |
| | | { |
| | | _logger = logger; |
| | | _signinService = signinService; |
| | |
| | | _wfRunProcessService = wfRunProcessService; |
| | | _wfHistoryService = wfHistoryService; |
| | | _wfNeeddeelService = wfNeeddeelService; |
| | | _pltPageService = pltPageService; |
| | | } |
| | | |
| | | #region 考勤签到打卡 |
| | |
| | | search.userId = curentuser.Id; |
| | | return JsonConvert.SerializeObject(_signinService.SearchByPaging(search)); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 我的考勤记录 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [CheckLogin] |
| | | public IActionResult SigninAll(string id) |
| | | { |
| | | JArray jar = new JArray(); |
| | | for (var i = 1; i <= 12; i++) |
| | | { |
| | | var jo = string.Format("\"code\":{0}, \"label\":\"{1}月\" ", i, i); |
| | | jar.Add(JObject.Parse("{" + jo + "}")); |
| | | |
| | | } |
| | | ViewBag.month = jar; |
| | | JArray Year = new JArray(); |
| | | for (var i = -1; i < 2; i++) |
| | | { |
| | | var jo = string.Format("\"code\":{0}, \"label\":\"{0}年\" ", DateTime.Now.Year + i); |
| | | Year.Add(JObject.Parse("{" + jo + "}")); |
| | | } |
| | | ViewBag.year = Year; |
| | | ViewBag.userid = id; |
| | | 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; |
| | | |
| | | return View(); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 取得考勤记录 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | |
| | | [CheckLogin] |
| | | public string GetSigninListAll(AdmSignInDTOSearch search) |
| | | { |
| | | //var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | //search.userId = curentuser.Id; |
| | | return JsonConvert.SerializeObject(_signinService.SearchByPaging(search)); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | #region 请假与销假 |
| | | public IActionResult AskLeave(string id="", string StratTimeName = "", string EndTimeName = "") |
| | | public IActionResult AskLeave(string id="", string StratTimeName = "", string EndTimeName = "") |
| | | { |
| | | |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | #region 考勤规则 |
| | | public IActionResult AttendanceRule() |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Signin/AttendanceRule/"); |
| | | var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList(); |
| | | ViewData["ActionInfo2"] = pageEntities2; |
| | | |
| | | AdmAttendanceRuleDTO admAttendanceRuleDTO = _attendanceRuleService.Get(""); |
| | | admAttendanceRuleDTO.admAttendanceRulesDtlDTOs = _attendanceRuleService.GetDtlList(""); |
| | | |