public string GetInfoById() { return(base.ExecuteActionJsonResult("获取医生分组信息", () => { AI_DoctorGroup entity = EntityOperate <AI_DoctorGroup> .GetEntityById(Request["DOCTORGROUPID"], "DOCTORGROUPID"); return new WebApi_Result() { data = entity }; })); }
public string SaveInfo() { return(base.ExecuteActionJsonResult("医生分组保存", () => { AI_DoctorGroup entity = base.GetPageData <AI_DoctorGroup>(0); entity.DoctorGroupId = string.IsNullOrWhiteSpace(entity.DoctorGroupId) ? null : entity.DoctorGroupId; entity.UpdateTime = DateTime.Now; entity.Updater = UserTokenManager.GetUserToken(Request["token"]).UserId; entity.OrganID = UserTokenManager.GetUserToken(Request["token"]).ORGANID; doctorGroupService.SaveInfo(entity); return new WebApi_Result(); })); }
/// <summary> /// 保存医生分组数据 /// </summary> /// <param name="entity">医生分组实体</param> public void SaveInfo(AI_DoctorGroup entity) { if (!string.IsNullOrWhiteSpace(entity.DoctorGroupId) && entity.DoctorGroupId != "null") { entity.UpdateM("DoctorGroupId"); } else { entity.CreateTime = entity.UpdateTime; entity.Creator = entity.Creator; entity.DoctorGroupId = GetPrimaryId(); entity.SaveModelM(); } }