public async Task <ObjectResultModule> CreateYaeherPatientDoctor([FromBody] YaeherPatientDoctor input) { if (!Commons.CheckSecret(input.Secret)) { this.ObjectResultModule.StatusCode = 422; this.ObjectResultModule.Message = "Wrong Secret"; this.ObjectResultModule.Object = ""; return(this.ObjectResultModule); } var userid = _IabpSession.UserId > 0 ? (int)_IabpSession.UserId : 0; var create = new YaeherPatientDoctor() { UserID = input.UserID, DoctorName = input.DoctorName, DoctorID = input.DoctorID, DoctorJSON = input.DoctorJSON, CreatedBy = userid, CreatedOn = DateTime.Now }; var res = await _PatientDoctorService.CreateYaeherPatientDoctor(create); if (res.Id > 0) { this.ObjectResultModule.StatusCode = 200; this.ObjectResultModule.Message = "sucess"; this.ObjectResultModule.Object = res; } else { this.ObjectResultModule.Object = ""; this.ObjectResultModule.StatusCode = 400; this.ObjectResultModule.Message = "error!"; } #region 操作日志 var CreateYaeherOperList = new YaeherOperList() { OperExplain = "CreateYaeherPatientDoctor", OperContent = JsonHelper.ToJson(input), OperType = "CreateYaeherPatientDoctor", CreatedBy = userid, CreatedOn = DateTime.Now }; var resultLog = await _yaeherOperListService.CreateYaeherOperList(CreateYaeherOperList); #endregion return(this.ObjectResultModule); }