| | |
| | | List<WfHistoryDTO> GetList(string RunProcessId ="" ); |
| | | |
| | | List<WfHistoryDTO> GetListshenpi(string RunProcessId); |
| | | |
| | | ResultDataEntity<WfHistoryDTO> SearchByPagingGuanLi(WfHistoryDTOSearch searchEntity); |
| | | } |
| | | } |
| | |
| | | |
| | | return listRole; |
| | | } |
| | | |
| | | |
| | | |
| | | public ResultDataEntity<WfHistoryDTO> SearchByPagingGuanLi(WfHistoryDTOSearch searchEntity) |
| | | { |
| | | |
| | | |
| | | |
| | | ResultDataEntity<WfHistoryDTO> data = new ResultDataEntity<WfHistoryDTO>(); |
| | | List<WfHistoryDTO> list = new List<WfHistoryDTO>(); |
| | | |
| | | |
| | | |
| | | |
| | | var listCode = (from a in _context.SysCodeDtls |
| | | join b in _context.SysCodes |
| | | on a.CodeId equals b.Id |
| | | where a.RecStatus == "A" |
| | | && b.RecStatus == "A" |
| | | select new CodeDataEntity() |
| | | { |
| | | CodeId = b.Id, |
| | | CodeTable = b.CodeTable, |
| | | CodeField = b.CodeField, |
| | | CodeSn = a.CodeSn, |
| | | Comments = a.Comments, |
| | | Contents = a.Contents, |
| | | RecStatus = a.RecStatus, |
| | | Sort = a.Sort |
| | | } |
| | | ); |
| | | DateTime Applytimestart = DateTime.Now; |
| | | DateTime Applytimeend = DateTime.Now; |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.Applytime)) |
| | | { |
| | | string[] Applytimes = searchEntity.Applytime.Split("|"); |
| | | DateTime.TryParse(Applytimes[0], out Applytimestart); |
| | | DateTime.TryParse(Applytimes[1], out Applytimeend); |
| | | Applytimeend = Applytimeend.AddDays(1); |
| | | } |
| | | |
| | | ///WfHistories |
| | | var query = (from k in _context.WfRunProcesses |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | join a in _context.WfHistories |
| | | on k.Id equals a.RunProcessId |
| | | |
| | | join e in listCode.Where(x => x.CodeTable == "wf_run_process" && x.CodeField == "shenpi_status") |
| | | on k.ShenpiStatus equals e.CodeSn |
| | | into esssss |
| | | from eee in esssss.DefaultIfEmpty() |
| | | |
| | | // join f in listCode.Where(x => x.CodeTable == "wf_needdeel" && x.CodeField == "needdeel_type") |
| | | //on a.NeeddeelType equals f.CodeSn |
| | | //into fsssss |
| | | // from fff in fsssss.DefaultIfEmpty() |
| | | |
| | | join d in _context.WfApplytypes |
| | | on k.Applytiye equals d.Applyno |
| | | |
| | | join b in _context.PltUsers |
| | | on k.Creater equals b.Id |
| | | |
| | | |
| | | join c in _context.HrDepts |
| | | on b.DeptId equals c.Id |
| | | |
| | | |
| | | where k.RecStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applytime) || (k.Applytime >= Applytimestart && k.Applytime <= Applytimeend)) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || b.DeptId == searchEntity.DeptId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.ApplyUserName) || b.UserName.Contains(searchEntity.ApplyUserName.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applytiye) || k.Applytiye == searchEntity.Applytiye.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.ShenpiStatus) || k.ShenpiStatus == searchEntity.ShenpiStatus.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.RunProcessId) || k.Id == searchEntity.RunProcessId.Trim()) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || k.Applyno == searchEntity.Applyno.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Creater) || k.Creater == searchEntity.Creater.Trim()) |
| | | |
| | | select new WfHistoryDTO |
| | | { |
| | | Id = k.Id, |
| | | |
| | | |
| | | ApplytimeName = k.Applytime.Value.ToString("yyyy-MM-dd"), |
| | | Applyno = k.Applyno, |
| | | CreaterName = b.UserName, |
| | | DeptName = c.DeptName, |
| | | Applytiye = d.Applytiye, |
| | | Content = k.Content, |
| | | ShenpiStatusName = eee.Comments, |
| | | |
| | | Deelurl = a.Deelurl, |
| | | Creater = k.Creater, |
| | | Createtime = k.Createtime, |
| | | Step = k.Step, |
| | | RecStatus = k.RecStatus, |
| | | Modifier = k.Modifier, |
| | | Modifytime = k.Modifytime, |
| | | |
| | | } |
| | | ).Distinct().ToList().OrderByDescending(x => x.Applyno); |
| | | |
| | | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.LoadData(searchEntity, lianlist); |
| | | return data; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | model.RecStatus = "D"; |
| | | model.Modifier = userid; |
| | | model.Modifytime = DateTime.Now; |
| | | switch (model.Applytiye) |
| | | |
| | | { |
| | | case "01": |
| | | var model01 = _context.AdmAskLeaves.Find(model.DanjuId); |
| | | model01.RecStatus = "D"; |
| | | model01.Modifier = userid; |
| | | model01.Modifytime = DateTime.Now; |
| | | break; |
| | | case "02": |
| | | var model02 = _context.AdmAskLeaveOffs.Find(model.DanjuId); |
| | | model02.RecStatus = "D"; |
| | | model02.Modifier = userid; |
| | | model02.Modifytime = DateTime.Now; |
| | | break; |
| | | case "03": |
| | | var model03 = _context.HrSalaryAppeal.Find(model.DanjuId); |
| | | model03.status = "D"; |
| | | break; |
| | | case "04": |
| | | var model04 = _context.AdmAskcosts.Find(model.DanjuId); |
| | | model04.RecStatus = "D"; |
| | | model04.Modifier = userid; |
| | | model04.Modifytime = DateTime.Now; |
| | | break; |
| | | case "05": |
| | | var model05 = _context.AdmAskGoods.Find(model.DanjuId); |
| | | model05.RecStatus = "D"; |
| | | model05.Modifier = userid; |
| | | model05.Modifytime = DateTime.Now; |
| | | break; |
| | | case "06": |
| | | var model06 = _context.AdmAskCars.Find(model.DanjuId); |
| | | model06.RecStatus = "D"; |
| | | model06.Modifier = userid; |
| | | model06.Modifytime = DateTime.Now; |
| | | break; |
| | | case "07": |
| | | var model07 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model07.RecStatus = "D"; |
| | | model07.Modifier = userid; |
| | | model07.Modifytime = DateTime.Now; |
| | | break; |
| | | case "08": |
| | | var model08 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model08.RecStatus = "D"; |
| | | model08.Modifier = userid; |
| | | model08.Modifytime = DateTime.Now; |
| | | break; |
| | | case "09": |
| | | var model09 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model09.RecStatus = "D"; |
| | | model09.Modifier = userid; |
| | | model09.Modifytime = DateTime.Now; |
| | | break; |
| | | case "10": |
| | | var model10 = _context.AdmAskovertimes.Find(model.DanjuId); |
| | | model10.RecStatus = "D"; |
| | | model10.Modifier = userid; |
| | | model10.Modifytime = DateTime.Now; |
| | | break; |
| | | case "11": |
| | | var model11 = _context.AdmAskMarketingCosts.Find(model.DanjuId); |
| | | model11.RecStatus = "D"; |
| | | model11.Modifier = userid; |
| | | model11.Modifytime = DateTime.Now; |
| | | break; |
| | | case "12": |
| | | var model12 = _context.AdmAskYouHuis.Find(model.DanjuId); |
| | | model12.RecStatus = "D"; |
| | | model12.Modifier = userid; |
| | | model12.Modifytime = DateTime.Now; |
| | | break; |
| | | case "13": |
| | | var model13 = _context.AdmAskBaiFangs.Find(model.DanjuId); |
| | | model13.RecStatus = "D"; |
| | | model13.Modifier = userid; |
| | | model13.Modifytime = DateTime.Now; |
| | | break; |
| | | case "20": |
| | | var model20 = _context.AdmCustomerWithdrawals.Find(model.DanjuId); |
| | | model20.RecStatus = "D"; |
| | | model20.Modifier = userid; |
| | | model20.Modifytime = DateTime.Now; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | |
| | | return new JsonResult(_wfRunProcessService.SearchByPaging(search)); |
| | | } |
| | | |
| | | |
| | | |
| | | public IActionResult IndexGuanLi() |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | 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.Applytiye = _wfApplytypeService.GetList().Select(x => new { code = x.Applyno, label = x.Applytiye }).ToList(); |
| | | |
| | | |
| | | |
| | | return View(); |
| | | } |
| | | |
| | | public IActionResult GetListGuanLi(WfHistoryDTOSearch search) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | //search.Creater = curentuser.Id; |
| | | //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); |
| | | return new JsonResult(_wfHistoryService.SearchByPagingGuanLi(search)); |
| | | } |
| | | |
| | | |
| | | public IActionResult Del(string id) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | |
| | | |
| | | resultEntity = _wfRunProcessService.ModifyStatus(id, curentuser.Id); |
| | | |
| | | |
| | | return new JsonResult(resultEntity); |
| | | } |
| | | } |
| | | } |
| | |
| | | //查询是否有不称职的工作考评 |
| | | var admEvaluateDTOs = _admEvaluateService.GetListsalary(userList[i].Id, dateminkaoqin, datemaxkaoqin).Where(x=>x.EvaluateValue == "03").ToList(); |
| | | //当月出勤率 |
| | | decimal chuqinlv = Math.Round((admAttendanceDTO.Shijichuqin- admEvaluateDTOs.Count) / admAttendanceDTO.Yingchuqin,4); |
| | | decimal chuqinlv = Math.Round(admAttendanceDTO.Shijichuqin / admAttendanceDTO.Yingchuqin,4); |
| | | |
| | | //查询当前员工职务的基本工资配置 |
| | | |
| | |
| | | var Shebaogeren = hrJibengongzi.Shebaogeren.HasValue ? hrJibengongzi.Shebaogeren.Value : 0; |
| | | decimal yingnashuie = 0; |
| | | hrSalaryDTO.Queqin = 0; |
| | | hrSalaryDTO.Fakuan = 0; |
| | | hrSalaryDTO.Gongzuobutie = 0; |
| | | hrSalaryDTO.Jiabangongzi = 0; |
| | | decimal shiyongqichuqintianshu = 0; |
| | | decimal shiyongqichuqinlv = 0; |
| | | |
| | | |
| | | |
| | | |
| | | decimal BasicPrice = 0; |
| | | if (!decimal.TryParse(userList[i].BasicPrice, out BasicPrice)) |
| | | { |
| | | _logger.LogInformation(userList[i].UserName + ": 员工没有维护工资"); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | |
| | | if (userList[i].ShiyongDate.HasValue && userList[i].ShiyongDateEnd.HasValue && dateminkaoqin>= userList[i].ShiyongDate.Value && dateminkaoqin <= userList[i].ShiyongDateEnd.Value) |
| | | { |
| | | if (!userList[i].ShiyongPrice.HasValue) |
| | |
| | | _logger.LogInformation(userList[i].UserName + ": 员工处于试用期,但是试用期工资为空"); |
| | | continue; |
| | | } |
| | | //查询是否有不称职的工作考评 |
| | | var admEvaluateDTOsshiyongqi = _admEvaluateService.GetListsalary(userList[i].Id, dateminkaoqin, userList[i].ShiyongDateEnd.Value.AddDays(1)).Where(x => x.EvaluateValue == "03").ToList(); |
| | | |
| | | |
| | | //试用期的出勤率 |
| | | shiyongqichuqinlv = chuqinlv; |
| | | if(userList[i].ShiyongDateEnd.Value< datemaxkaoqin.AddDays(-1)) |
| | |
| | | } |
| | | } |
| | | |
| | | //查询是否有不称职的工作考评 |
| | | var admEvaluateDTOsshiyongqi = _admEvaluateService.GetListsalary(userList[i].Id, dateminkaoqin, userList[i].ShiyongDateEnd.Value.AddDays(1)).Where(x => x.EvaluateValue == "03").ToList(); |
| | | |
| | | |
| | | |
| | | shiyongqichuqinlv = Math.Round((shiyongqichuqintianshu- admEvaluateDTOsshiyongqi.Count) / admAttendanceDTO.Yingchuqin, 4); |
| | | shiyongqichuqinlv = Math.Round(shiyongqichuqintianshu / admAttendanceDTO.Yingchuqin, 4); |
| | | |
| | | //工作评价不合格罚款 |
| | | hrSalaryDTO.Fakuan += Math.Round(userList[i].ShiyongPrice.Value * admEvaluateDTOsshiyongqi.Count / admAttendanceDTO.Yingchuqin + BasicPrice * (admEvaluateDTOs.Count - admEvaluateDTOsshiyongqi.Count) / admAttendanceDTO.Yingchuqin, 2); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | hrSalaryDTO.Jiabangongzi += Math.Round((admAttendanceDTO.Jiaban / jiabangongzibiaozhun) * userList[i].ShiyongPrice.Value, 2); |
| | | |
| | | //工作评价不合格罚款 |
| | | hrSalaryDTO.Fakuan += Math.Round(userList[i].ShiyongPrice.Value * admEvaluateDTOs.Count / admAttendanceDTO.Yingchuqin, 2); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | hrSalaryDTO.Gongzuobutie += Math.Round( (userList[i].ShiyongPrice.Value - hrJibengongzi.Baomifei.Value- hrJibengongzi.Jibengongzi.Value ) * shiyongqichuqinlv, 2); |
| | | |
| | | |
| | | |
| | | |
| | | //yingnashuie = userList[i].ShiyongPrice.Value - Shebaogeren - geshuiqizheng; |
| | | |
| | |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | //工作评价罚款 |
| | | hrSalaryDTO.Fakuan += Math.Round(BasicPrice * admEvaluateDTOs.Count/ admAttendanceDTO.Yingchuqin , 2); |
| | | } |
| | | |
| | | |
| | | if(true) |
| | | { |
| | | decimal BasicPrice = 0; |
| | | if(!decimal.TryParse(userList[i].BasicPrice,out BasicPrice)) |
| | | { |
| | | _logger.LogInformation(userList[i].UserName + ": 员工没有维护工资"); |
| | | continue; |
| | | } |
| | | //转正后的出勤率 |
| | | decimal zhuanzhengchuqinlv = chuqinlv- shiyongqichuqinlv; |
| | | if (userList[i].ShiyongDate.HasValue && userList[i].ShiyongDateEnd.HasValue && userList[i].ShiyongDateEnd.Value >= dateminkaoqin && userList[i].ShiyongDateEnd.Value <= datemaxkaoqin.AddDays(-1)) |
| | |
| | | |
| | | |
| | | |
| | | hrSalaryDTO.Fakuan = 0; |
| | | //工作安排罚款 |
| | | List<AdmMemoBookDTO> admMemoBookDTOs = _DailyManageService.GetRemindsalary(userList[i].Id, dateminkaoqin, datemaxkaoqin,"2"); |
| | | if (admMemoBookDTOs.Count > 0) |
| New file |
| | |
| | | @{ |
| | | ViewBag.Title = "WorkFlowTask"; |
| | | Layout = "~/Views/Shared/_Layout_Search.cshtml"; |
| | | } |
| | | |
| | | <link href="~/css/jquery-confirm.css" rel="stylesheet"> |
| | | <script src="~/js/jquery-confirm.js" type="text/javascript"></script> |
| | | |
| | | @section headerStyle{ |
| | | <script type="text/javascript"> |
| | | var Applytiye = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Applytiye))'; |
| | | |
| | | |
| | | |
| | | loseherght = 60; |
| | | dataCol = [ |
| | | { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, |
| | | { label: '申请时间', name: 'ApplytimeName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { |
| | | label: '申请单号', name: 'Applyno', labtype: 'txt', hidden: false, width: 100 |
| | | }, |
| | | |
| | | { label: '部门', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '申请人', name: 'CreaterName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '请示名称', name: 'Content', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '步骤', name: 'Step', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '批复状态', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { |
| | | label: '查看', name: 'Remark', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return "<a onclick=\"OpenWindow('查看','100%','100%', '" + rowObject.Deelurl + "')\" >查看</a> "; |
| | | } |
| | | }, |
| | | |
| | | { |
| | | label: '删除', name: 'Remark111', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return "<a onclick=\"shanchu('" + rowObject.Id + "')\" >删除</a> "; |
| | | } |
| | | }, |
| | | |
| | | ]; |
| | | dataUrl = "/WorkFlowTask/GetListGuanLi"; |
| | | searchCol = [ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | { label: '申请时间', name: 'Applytime', labtype: 'datearea', hidden: false }, |
| | | { label: '申请单号', name: 'Applyno', labtype: 'txt', hidden: false }, |
| | | { label: '申请人', name: 'ApplyUserName', labtype: 'txt', hidden: false }, |
| | | { label: '申请流程', name: 'Applytiye', labtype: 'combox', hidden: false, data: JSON.parse(Applytiye)/*, cwidth: '5%', cccwidth: '8%' */}, |
| | | |
| | | ]; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var _afterSave = function (result) { |
| | | if (result) { |
| | | toastr.success("保存成功"); |
| | | } else { |
| | | toastr.error("保存失败"); |
| | | } |
| | | } |
| | | |
| | | var _afterDel = function (result) { |
| | | if (result) { |
| | | toastr.success("删除成功"); |
| | | } else { |
| | | /**/ |
| | | toastr.error("删除成功"); |
| | | /**/ |
| | | } |
| | | } |
| | | </script> |
| | | } |
| | | |
| | | @section footerScripts{ |
| | | <script type="text/javascript"> |
| | | |
| | | |
| | | |
| | | var shanchu = function (Id) { |
| | | |
| | | $.confirm({ |
| | | title: '删除流程操作确认', |
| | | content: '此操作将删除当前流程,确认要继续吗?', |
| | | type: 'green', |
| | | icon: 'glyphicon glyphicon-question-sign', |
| | | buttons: { |
| | | ok: { |
| | | text: '确认', |
| | | btnClass: 'btn-primary', |
| | | action: function () { |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/WorkFlowTask/Del?id=" + Id, |
| | | dataType: "json", |
| | | global: false, |
| | | success: function (data) { |
| | | |
| | | if (data.Result) { |
| | | jQuery('#jqGrid').jqGrid().trigger('reloadGrid'); |
| | | |
| | | toastr.success("删除成功"); |
| | | } |
| | | else { |
| | | toastr.error(data.Message); |
| | | } |
| | | }, |
| | | error: function () { |
| | | toastr.error("删除失败"); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | cancel: { |
| | | text: '取消', |
| | | btnClass: 'btn-primary' |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | //window._reloadPageData(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | } |
| | |
| | | "SetCaseOrder": "/api/ZCBackgRound/SetCaseOrder", |
| | | "GetYGPromoteCode": "/api/ZCBackgRound/GetYGPromoteCode", |
| | | "GetYGYaoQingYonghu": "/api/ZCBackgRound/GetYGYaoQingYonghu", |
| | | "yaoqingma": "http://51zhengcai.com/regist?id=" |
| | | "yaoqingma": "https://applet.51zhengcai.com:8088/code/" |
| | | |
| | | } |
| | |
| | | "SetCaseOrder": "/api/ZCBackgRound/SetCaseOrder", |
| | | "GetYGPromoteCode": "/api/ZCBackgRound/GetYGPromoteCode", |
| | | "GetYGYaoQingYonghu": "/api/ZCBackgRound/GetYGYaoQingYonghu", |
| | | "yaoqingma": "http://51zhengcai.com/regist?id=" |
| | | "yaoqingma": "https://applet.51zhengcai.com:8088/code/" |
| | | } |