/// <summary>
        /// 同步排班(新增或修改)
        /// </summary>
        /// <param name="sync"></param>
        /// <returns></returns>
        public async Task <OutputBase> AddOrUpdate(AddShiftSync sync)
        {
            var shift = await _repository.Get(sync.DialysisShiftId, sync.HospitalId);

            if (shift == null)
            {
                _repository.Add(Mapper.Map <AddShiftSync, Shift>(sync));
            }
            else
            {
                Mapper.Map(sync, shift);
            }

            return(_unitWork.Commit() ? OutputBase.Success("保存成功") : OutputBase.Fail("保存失败"));
        }
 public async Task <OutputBase> SyncShift([FromBody] AddShiftSync sync)
 {
     return(await _shiftService.AddOrUpdate(sync));
 }