| | |
| | | |
| | | public PltUser login(string user_sn, string password) |
| | | { |
| | | var user = _context.PltUsers.Where(x => (x.UserSn == user_sn || x.Phone == user_sn ) && x.Password == password && x.RecStatus == "A").FirstOrDefault(); |
| | | var user = _context.PltUsers.Where(x => (x.UserSn == user_sn || x.Phone == user_sn ) && x.Password == password && x.RecStatus == "A" && x.Zhiwustatus == "A" ).FirstOrDefault(); |
| | | |
| | | return user; |
| | | } |
| | |
| | | updatepltUser.jintiesalary = pltUser.jintiesalary; |
| | | updatepltUser.geshuiqizheng = pltUser.geshuiqizheng; |
| | | updatepltUser.Yaoqingma = pltUser.Yaoqingma; |
| | | updatepltUser.HetongDateEnd = pltUser.HetongDateEnd; |
| | | } |
| | | |
| | | _context.SaveChanges(); |
| | |
| | | BasicPrice = a.BasicPrice, |
| | | ShiyongPrice = a.ShiyongPrice, |
| | | ShiyongPriceName = a.ShiyongPrice.HasValue ? a.ShiyongPrice.Value.ToString("F2") : "", |
| | | HetongDateEnd = a.HetongDateEnd, |
| | | HetongDateEndName = a.HetongDateEnd.HasValue ? a.HetongDateEnd.Value.ToString("yyyy-MM-dd") : "", |
| | | |
| | | ShebaodateName = a.Shebaodate.HasValue ? a.Shebaodate.Value.ToString("yyyy-MM-dd") : "", |
| | | |
| | |
| | | var list = _mapper.Map<List<PltUserDTO>>(listUser.ToList()); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | public ResultEntity savePltUserFenpeiDate(DateTime? FenpeiDate,string userId) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | |
| | | try { |
| | | |
| | | var updatepltUser = _context.PltUsers.Find(userId); |
| | | |
| | | updatepltUser.FenpeiDate = FenpeiDate; |
| | | |
| | | _context.SaveChanges(); |
| | | resultEntity.ReturnID = userId; |
| | | resultEntity.Result = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "保存失败,请联系管理员"; |
| | | |
| | | } |
| | | return resultEntity; |
| | | } |
| | | |
| | | |
| | | public ResultEntity saveCustomerYwjl(CustomerYwjl DTO) |
| | | { |
| | | |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | try |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | DTO.Id = Guid.NewGuid().ToString(); |
| | | |
| | | _context.CustomerYwjls.Add(DTO); |
| | | |
| | | |
| | | _context.SaveChanges(); |
| | | resultEntity.ReturnID = DTO.Id; |
| | | resultEntity.Result = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "保存失败,请联系管理员"; |
| | | |
| | | } |
| | | return resultEntity; |
| | | } |
| | | |
| | | |
| | | public List<CustomerYwjl> GetListCustomerYwjl(string CustomerId) |
| | | { |
| | | var listUser = _context.CustomerYwjls.Where(u => u.UserId == CustomerId).OrderByDescending(x=>x.Createtime).ToList(); |
| | | return listUser; |
| | | } |
| | | } |
| | | } |
| | | |