public async Task <ActionResult <InfoResult <string> > > UpdateSalary(AcSalaryDtos acSalaryDtos)
        {
            var NewSalary = (await _IAcSalaryService.Search(u => u.Id == acSalaryDtos.Id)).FirstOrDefault();
            InfoResult <AcSalaryDtos> messa1geModel = new InfoResult <AcSalaryDtos>();

            if (NewSalary != null)
            {
                NewSalary.Createdate = acSalaryDtos.Createdate;
                NewSalary.Base       = acSalaryDtos.Base;
                NewSalary.Lunch      = acSalaryDtos.Lunch;
                NewSalary.Live       = acSalaryDtos.Live;
                NewSalary.Hardwork   = acSalaryDtos.Hardwork;
                NewSalary.Extra      = acSalaryDtos.Extra;
                NewSalary.Forfeit    = acSalaryDtos.Forfeit;
                NewSalary.Tax        = acSalaryDtos.Tax;
                NewSalary.Sum        = acSalaryDtos.Base + acSalaryDtos.Lunch + acSalaryDtos.Live + acSalaryDtos.Hardwork + acSalaryDtos.Extra + acSalaryDtos.Forfeit + acSalaryDtos.Tax;
                return(await _IAcSalaryService.Edit(NewSalary) > 0 ? new InfoResult <string>("修改成功!") : new InfoResult <string>("修改失败!"));
            }
            return(Ok(messa1geModel));
        }
        public async Task <ActionResult <InfoResult <AcSalaryDtos> > > AddSalary(AcSalaryDtos acSalaryDtos)
        {
            var NewSalary  = (await _IAcStaffService.Search(u => u.Id == acSalaryDtos.StaffId)).FirstOrDefault();
            var salaryList = await _IAcSalaryService.Search(t => true);

            int max = 0;

            foreach (var item in salaryList)
            {
                if (item.Id > max)
                {
                    max = item.Id;
                }
            }
            acSalaryDtos.Id             = max + 1;
            acSalaryDtos.Address        = NewSalary.Address;
            acSalaryDtos.DepartmentName = NewSalary.Department.Name;
            acSalaryDtos.Name           = NewSalary.Name;
            acSalaryDtos.sex            = NewSalary.Sex;
            acSalaryDtos.StaffId        = NewSalary.Id;
            acSalaryDtos.tel            = NewSalary.Tel;
            acSalaryDtos.Createdate     = DateTime.Now.ToString();
            acSalaryDtos.Createdate     = acSalaryDtos.Createdate.Substring(0, 10);
            acSalaryDtos.Sum            = acSalaryDtos.Base + acSalaryDtos.Lunch + acSalaryDtos.Live + acSalaryDtos.Hardwork + acSalaryDtos.Extra + acSalaryDtos.Forfeit + acSalaryDtos.Tax;
            InfoResult <AcSalaryDtos> messageModel = new InfoResult <AcSalaryDtos>();
            var data = await _IAcSalaryService.Add(_mapper.Map <AcSalary>(acSalaryDtos));

            if (data > 0)
            {
                messageModel.Msg = "添加成功!"; messageModel.Code = 200; messageModel.Success = true;
            }
            else
            {
                messageModel.Msg = "添加失败!"; messageModel.Code = 400; messageModel.Success = false;
            }
            return(Ok(messageModel));
        }