| | |
| | | var updatepltRole = _context.HrSalaries.Where(c=>c.Id==dto.Id).SingleOrDefault(); |
| | | if(updatepltRole!=null) |
| | | { |
| | | //如果有未完成的工作交接,不能核准工资 |
| | | var admAskJiaojies = _context.AdmAskJiaojies.Where(x => x.Creater == updatepltRole.Userid && x.RecStatus == "A" && x.ShenpiStatus == "D").ToList(); |
| | | if(admAskJiaojies!=null && admAskJiaojies.Count > 0) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "有未完成的工作交接,不能核准工资"; |
| | | return resultEntity; |
| | | } |
| | | |
| | | //更新电话费用状态 |
| | | var sim = _context.SimCost.Where(c => c.bill_year == updatepltRole.Year && c.bill_month <= updatepltRole.Month && c.user_id == updatepltRole.Userid && c.status == "0").ToList(); |
| | | if(sim!=null) |
| | |
| | | DateTime st = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date; |
| | | DateTime et = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1); |
| | | int month = 0; |
| | | if (!string.IsNullOrEmpty(searchEntity.searchDate)) |
| | | if (!string.IsNullOrEmpty(searchEntity.searchDatestart)) |
| | | { |
| | | var times = searchEntity.searchDate.Split('|'); |
| | | if (times.Length == 2) |
| | | { |
| | | st = DateTime.Parse(times[0]); |
| | | et= DateTime.Parse(times[1]); |
| | | } |
| | | st = DateTime.Parse(searchEntity.searchDatestart + "-01"); |
| | | |
| | | } |
| | | if (!string.IsNullOrEmpty(searchEntity.searchDateend)) |
| | | { |
| | | et = DateTime.Parse(searchEntity.searchDateend + "-01"); |
| | | |
| | | } |
| | | var query = (from a in _context.HrSalaries where a.Year >= st.Year && a.Month >= st.Month && a.Year <= et.Year && a.Month <= et.Month select a); |
| | | |