public async Task <IHttpActionResult> Putsys_upload_file(int id, sys_upload_file sys_upload_file) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != sys_upload_file.file_id) { return(BadRequest()); } db.Entry(sys_upload_file).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!sys_upload_fileExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> Getsys_upload_file(int id) { sys_upload_file sys_upload_file = await db.sys_upload_file.FindAsync(id); if (sys_upload_file == null) { return(NotFound()); } return(Ok(sys_upload_file)); }
public async Task <IHttpActionResult> Postsys_upload_file(sys_upload_file sys_upload_file) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.sys_upload_file.Add(sys_upload_file); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = sys_upload_file.file_id }, sys_upload_file)); }
public ActionResult Grid1_Delete(JArray selectedRows, JArray Grid1_fields, string uuid, string type) { foreach (string rowId in selectedRows) { sys_upload_file file = db.sys_upload_file.Find(Convert.ToInt32(rowId)); //string path = Server.MapPath("~/pbs_data/" + file.rec_uuid + "/") + file.file_url; //System.IO.File.Delete(path); db.sys_upload_file.Remove(file); } db.SaveChanges(); UpdateGrid(Grid1_fields, uuid, type); return(UIHelper.Result()); }
public ActionResult btnEdit_Click([Bind(Include = "file_id,file_name,file_hint,file_type,rec_uuid")] sys_upload_file upFiles) { if (ModelState.IsValid) { upFiles.file_uploader = Global.loginInfo.user_id; db.sys_upload_file.Attach(upFiles); var stateEntity = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(upFiles); stateEntity.SetModifiedProperty("file_name"); stateEntity.SetModifiedProperty("file_hint"); stateEntity.SetModifiedProperty("file_type"); db.SaveChanges(); // 关闭本窗体(触发窗体的关闭事件) PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } //return RedirectToAction("Index",new Parameter("uuid",upFiles.rec_uuid)); return(UIHelper.Result()); }
public ActionResult btnCreate_Click([Bind(Include = "file_url,file_name,file_hint,file_type,rec_uuid")] sys_upload_file upFiles) { try { if (ModelState.IsValid) { var filePhoto = UIHelper.FileUpload("filePhoto"); if (upFiles.file_url == null) { filePhoto.MarkInvalid("请先上传图片!"); ShowNotify("请先上传图片!"); } else { string path1 = Server.MapPath("~/pbs_data/tmp/") + upFiles.file_url; string path2 = Server.MapPath("~/pbs_data/" + upFiles.rec_uuid + "/"); if (!Directory.Exists(path2)) { Directory.CreateDirectory(path2); } System.IO.File.Copy(path1, path2 + upFiles.file_url); upFiles.file_url = upFiles.file_url; upFiles.file_upload_time = DateTime.Now; upFiles.file_uploader = Global.loginInfo.user_id; filePhoto.Reset(); db.sys_upload_file.Add(upFiles); db.SaveChanges(); // 关闭本窗体(触发窗体的关闭事件) PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } } return(UIHelper.Result()); }catch (Exception e) { throw e; } }
// GET: UploadFiles/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } sys_upload_file sys_upload_file = db.sys_upload_file.Find(id); if (sys_upload_file == null) { return(HttpNotFound()); } var cookie = Request.Cookies[FormsAuthentication.FormsCookieName]; var ticket = FormsAuthentication.Decrypt(cookie.Value); Global.loginInfo = JsonConvert.DeserializeObject <Global.LoginInfo>(ticket.UserData); int unitId = Global.loginInfo.unit_id; int userId = Global.loginInfo.user_id; ViewBag.UserList = GetUserList(userId, unitId, Global.ALL_DATA, true); return(View(sys_upload_file)); }
public IHttpActionResult Postpbs_record2() { RecordDetailInfo rdi = new RecordDetailInfo(); try { HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"]; StreamReader reader = new StreamReader(context.Request.InputStream); String jsonBean = reader.ReadToEnd(); if (jsonBean == null) { rdi.code = 101; rdi.msg = "参数验证失败!"; return(Ok(rdi)); //return BadRequest(ModelState); } jsonBean = jsonBean.Replace("\\", ""); jsonBean = jsonBean.Substring(1, jsonBean.Length - 2); log.Debug("jsonbean2 = " + jsonBean); RecordAddRequest rar = new RecordAddRequest(); pbs_record record = new pbs_record(); rar = JsonConvert.DeserializeObject <RecordAddRequest>(jsonBean); rar.entity.create_time = DateTime.Now; rar.entity.record_state = 1001; if (rar.entity.kyjs_time == null) { rar.entity.kyjs_time = DateTime.Now; } db.pbs_record.Add(rar.entity); string path = HttpContext.Current.Server.MapPath("~/"); string desPath = path + "pbs_data\\" + rar.entity.uuid; if (!Directory.Exists(desPath)) { Directory.CreateDirectory(desPath); } for (int i = 0; i < rar.fileList.Count; i++) { sys_upload_file tmp = new sys_upload_file(); tmp = rar.fileList[i]; tmp.rec_uuid = rar.entity.uuid; db.sys_upload_file.Add(tmp); string path1 = path + "upload\\" + tmp.file_url; string path2 = desPath + "\\" + tmp.file_url; File.Move(path1, path2); } db.SaveChanges(); string recNo = "440305 " + DateTime.Now.Year.ToString() + " "; for (int i = 0; i < 5 - rar.entity.record_id.ToString().Length; i++) { recNo += "0"; } recNo += rar.entity.record_id.ToString(); rar.entity.record_no = recNo; db.pbs_record.Attach(rar.entity); var stateEntity = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(rar.entity); stateEntity.SetModifiedProperty("record_no"); db.SaveChanges(); rdi.recNo = recNo.Substring(recNo.Length - 5); rdi.code = 100; return(Ok(rdi)); } catch (Exception e) { rdi.code = 105; rdi.msg = "新增记录失败: " + e.Message; return(Ok(rdi)); } }
public IHttpActionResult Postpbs_record() { RecordDetailInfo rdi = new RecordDetailInfo(); try { HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"]; String jsonBean = context.Request.Form["jsonBean"]; if (jsonBean == null) { rdi.code = 101; rdi.msg = "参数验证失败!"; return(Ok(rdi)); //return BadRequest(ModelState); } log.Debug("jsonbean1 = " + jsonBean); RecordAddRequest rar = new RecordAddRequest(); pbs_record record = new pbs_record(); rar = JsonConvert.DeserializeObject <RecordAddRequest>(jsonBean); rar.entity.create_time = DateTime.Now; rar.entity.record_state = 1001; if (rar.entity.kyjs_time == null) { rar.entity.kyjs_time = DateTime.Now; } db.pbs_record.Add(rar.entity); string path = HttpContext.Current.Server.MapPath("~/"); string desPath = path + "pbs_data\\" + rar.entity.uuid; if (!Directory.Exists(desPath)) { Directory.CreateDirectory(desPath); } for (int i = 0; i < rar.fileList.Count; i++) { log.Debug("begin to move file. name = " + rar.fileList[i].file_name); sys_upload_file tmp = new sys_upload_file(); tmp = rar.fileList[i]; tmp.rec_uuid = rar.entity.uuid; db.sys_upload_file.Add(tmp); string path1 = path + "upload\\" + tmp.file_url; string path2 = desPath + "\\" + tmp.file_url; if (File.Exists(path1)) { File.Move(path1, path2); } else { log.Error("file is exist. name = " + path1); } } string qmPicPath = path + "upload\\" + rar.entity.uuid + ".png"; if (File.Exists(qmPicPath)) { sys_upload_file tmp = new sys_upload_file(); tmp.rec_uuid = rar.entity.uuid; tmp.file_type = 2005; tmp.file_name = rar.entity.uuid + ".png"; tmp.file_uploader = rar.entity.creater_id; tmp.file_url = rar.entity.uuid + ".png"; tmp.file_upload_time = DateTime.Now; tmp.file_hint = "见证人签名"; db.sys_upload_file.Add(tmp); string path2 = desPath + "\\" + tmp.file_url; File.Move(qmPicPath, path2); } string fwPicPath = path + "upload\\" + rar.entity.uuid + "_xct.jpeg"; if (File.Exists(fwPicPath)) { sys_upload_file tmp = new sys_upload_file(); tmp.rec_uuid = rar.entity.uuid; tmp.file_type = 2004; tmp.file_name = rar.entity.uuid + "_xct.jpeg"; tmp.file_uploader = rar.entity.creater_id; tmp.file_url = rar.entity.uuid + "_xct.jpeg"; tmp.file_upload_time = DateTime.Now; tmp.file_hint = "方位示意图"; db.sys_upload_file.Add(tmp); string path2 = desPath + "\\" + tmp.file_url; File.Move(fwPicPath, path2); } string pmPicPath = path + "upload\\" + rar.entity.uuid + "_pmt.jpeg"; if (File.Exists(pmPicPath)) { sys_upload_file tmp = new sys_upload_file(); tmp.rec_uuid = rar.entity.uuid; tmp.file_type = 2004; tmp.file_name = rar.entity.uuid + "_pmt.jpeg"; tmp.file_uploader = rar.entity.creater_id; tmp.file_url = rar.entity.uuid + "_pmt.jpeg"; tmp.file_upload_time = DateTime.Now; tmp.file_hint = "平面示意图"; db.sys_upload_file.Add(tmp); string path2 = desPath + "\\" + tmp.file_url; File.Move(pmPicPath, path2); } db.SaveChanges(); string recNo = "440300" + DateTime.Now.Year.ToString(); string unitNo = rar.entity.ky_unit.ToString().PadLeft(3, '0'); recNo += unitNo; recNo += "9"; DateTime toYear = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-01-01"); int num = db.pbs_record.Where(p => p.ky_unit == rar.entity.ky_unit && p.ky_date >= toYear).Count() + 1; recNo += num.ToString().PadLeft(5, '0'); rar.entity.record_no = recNo; db.pbs_record.Attach(rar.entity); var stateEntity = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(rar.entity); stateEntity.SetModifiedProperty("record_no"); db.SaveChanges(); rdi.recNo = recNo.Substring(recNo.Length - 5); rdi.code = 100; return(Ok(rdi)); } catch (Exception e) { rdi.code = 105; rdi.msg = "新增记录失败: " + e.Message; log.Error(e.Message + " -- " + e.InnerException.Message); return(Ok(rdi)); } }
public IHttpActionResult Putpbs_record2() { RecordDetailInfo rdi = new RecordDetailInfo(); try { HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"]; StreamReader reader = new StreamReader(context.Request.InputStream); String jsonBean = reader.ReadToEnd(); if (jsonBean == null) { rdi.code = 101; rdi.msg = "参数验证失败!"; return(Ok(rdi)); //return BadRequest(ModelState); } jsonBean = jsonBean.Replace("\\", ""); jsonBean = jsonBean.Substring(1, jsonBean.Length - 2); log.Debug("jsonbean2 = " + jsonBean); RecordAddRequest rar = new RecordAddRequest(); pbs_record record = new pbs_record(); rar = JsonConvert.DeserializeObject <RecordAddRequest>(jsonBean); rar.entity.record_state = 1001; db.pbs_record.Attach(rar.entity); var stateEntity = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(rar.entity); stateEntity.SetModifiedProperty("record_title"); stateEntity.SetModifiedProperty("record_ky_no"); stateEntity.SetModifiedProperty("record_jj_no"); stateEntity.SetModifiedProperty("record_aj_no"); stateEntity.SetModifiedProperty("bg_unit"); stateEntity.SetModifiedProperty("ky_unit"); stateEntity.SetModifiedProperty("ky_date"); stateEntity.SetModifiedProperty("af_time"); stateEntity.SetModifiedProperty("bj_time"); stateEntity.SetModifiedProperty("kyks_time"); stateEntity.SetModifiedProperty("kyjs_time"); stateEntity.SetModifiedProperty("xz"); stateEntity.SetModifiedProperty("fs_loc"); stateEntity.SetModifiedProperty("xc_loc"); stateEntity.SetModifiedProperty("xc_locpt"); stateEntity.SetModifiedProperty("weather_info"); stateEntity.SetModifiedProperty("trend_info"); stateEntity.SetModifiedProperty("temper_info"); stateEntity.SetModifiedProperty("humidity_info"); stateEntity.SetModifiedProperty("light_info"); stateEntity.SetModifiedProperty("bh_flag"); stateEntity.SetModifiedProperty("bhr"); stateEntity.SetModifiedProperty("bhr_name"); stateEntity.SetModifiedProperty("bhr_unit"); stateEntity.SetModifiedProperty("bhr_unit_name"); stateEntity.SetModifiedProperty("bhr_pos"); stateEntity.SetModifiedProperty("bh_function"); stateEntity.SetModifiedProperty("xc_info"); stateEntity.SetModifiedProperty("bd_reason"); stateEntity.SetModifiedProperty("jzr"); stateEntity.SetModifiedProperty("jzr_sex"); stateEntity.SetModifiedProperty("jzr_birth"); stateEntity.SetModifiedProperty("jzr_address"); stateEntity.SetModifiedProperty("zhr"); stateEntity.SetModifiedProperty("zhr_name"); stateEntity.SetModifiedProperty("zhr_unit"); stateEntity.SetModifiedProperty("zhr_unit_name"); stateEntity.SetModifiedProperty("zhr_pos"); stateEntity.SetModifiedProperty("blr"); stateEntity.SetModifiedProperty("blr_name"); stateEntity.SetModifiedProperty("ztr"); stateEntity.SetModifiedProperty("ztr_name"); stateEntity.SetModifiedProperty("zxr"); stateEntity.SetModifiedProperty("zxr_name"); stateEntity.SetModifiedProperty("lxr"); stateEntity.SetModifiedProperty("lxr_name"); stateEntity.SetModifiedProperty("lyr"); stateEntity.SetModifiedProperty("lyr_name"); stateEntity.SetModifiedProperty("xc_disp"); stateEntity.SetModifiedProperty("record_reason"); stateEntity.SetModifiedProperty("east"); stateEntity.SetModifiedProperty("west"); stateEntity.SetModifiedProperty("south"); stateEntity.SetModifiedProperty("north"); //db.pbs_record.Add(rar.entity); string path = HttpContext.Current.Server.MapPath("~/"); string desPath = path + "pbs_data\\" + rar.entity.uuid; if (!Directory.Exists(desPath)) { Directory.CreateDirectory(desPath); } for (int i = 0; i < rar.fileList.Count; i++) { sys_upload_file tmp = new sys_upload_file(); tmp = rar.fileList[i]; tmp.rec_uuid = rar.entity.uuid; db.sys_upload_file.Add(tmp); string path1 = path + "upload\\" + tmp.file_url; string path2 = desPath + "\\" + tmp.file_url; File.Move(path1, path2); } db.SaveChanges(); rdi.recNo = rar.entity.record_no; rdi.recNo = rdi.recNo.Substring(rdi.recNo.Length - 5); rdi.code = 100; return(Ok(rdi)); } catch (Exception e) { rdi.code = 104; rdi.msg = "更新记录失败: " + e.Message; return(Ok(rdi)); } }
public IHttpActionResult Putpbs_record() { RecordDetailInfo rdi = new RecordDetailInfo(); try { HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"]; String jsonBean = context.Request.Form["jsonBean"]; if (jsonBean == null) { rdi.code = 101; rdi.msg = "参数验证失败!"; return(Ok(rdi)); //return BadRequest(ModelState); } RecordAddRequest rar = new RecordAddRequest(); pbs_record record = new pbs_record(); rar = JsonConvert.DeserializeObject <RecordAddRequest>(jsonBean); rar.entity.record_state = 1001; db.pbs_record.Attach(rar.entity); var stateEntity = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(rar.entity); stateEntity.SetModifiedProperty("record_title"); stateEntity.SetModifiedProperty("record_ky_no"); stateEntity.SetModifiedProperty("record_jj_no"); stateEntity.SetModifiedProperty("record_aj_no"); stateEntity.SetModifiedProperty("bg_unit"); stateEntity.SetModifiedProperty("ky_unit"); stateEntity.SetModifiedProperty("ky_date"); stateEntity.SetModifiedProperty("af_time"); stateEntity.SetModifiedProperty("bj_time"); stateEntity.SetModifiedProperty("kyks_time"); stateEntity.SetModifiedProperty("kyjs_time"); stateEntity.SetModifiedProperty("xz"); stateEntity.SetModifiedProperty("fs_loc"); stateEntity.SetModifiedProperty("xc_loc"); stateEntity.SetModifiedProperty("xc_locpt"); stateEntity.SetModifiedProperty("weather_info"); stateEntity.SetModifiedProperty("trend_info"); stateEntity.SetModifiedProperty("temper_info"); stateEntity.SetModifiedProperty("humidity_info"); stateEntity.SetModifiedProperty("light_info"); stateEntity.SetModifiedProperty("bh_flag"); stateEntity.SetModifiedProperty("bhr"); stateEntity.SetModifiedProperty("bhr_name"); stateEntity.SetModifiedProperty("bhr_unit"); stateEntity.SetModifiedProperty("bhr_unit_name"); stateEntity.SetModifiedProperty("bhr_pos"); stateEntity.SetModifiedProperty("bh_function"); stateEntity.SetModifiedProperty("xc_info"); stateEntity.SetModifiedProperty("bd_reason"); stateEntity.SetModifiedProperty("jzr"); stateEntity.SetModifiedProperty("jzr_sex"); stateEntity.SetModifiedProperty("jzr_birth"); stateEntity.SetModifiedProperty("jzr_address"); stateEntity.SetModifiedProperty("zhr"); stateEntity.SetModifiedProperty("zhr_name"); stateEntity.SetModifiedProperty("zhr_unit"); stateEntity.SetModifiedProperty("zhr_unit_name"); stateEntity.SetModifiedProperty("zhr_pos"); stateEntity.SetModifiedProperty("blr"); stateEntity.SetModifiedProperty("blr_name"); stateEntity.SetModifiedProperty("ztr"); stateEntity.SetModifiedProperty("ztr_name"); stateEntity.SetModifiedProperty("zxr"); stateEntity.SetModifiedProperty("zxr_name"); stateEntity.SetModifiedProperty("lxr"); stateEntity.SetModifiedProperty("lxr_name"); stateEntity.SetModifiedProperty("lyr"); stateEntity.SetModifiedProperty("lyr_name"); stateEntity.SetModifiedProperty("xc_disp"); stateEntity.SetModifiedProperty("record_reason"); stateEntity.SetModifiedProperty("east"); stateEntity.SetModifiedProperty("west"); stateEntity.SetModifiedProperty("south"); stateEntity.SetModifiedProperty("north"); //db.pbs_record.Add(rar.entity); string path = HttpContext.Current.Server.MapPath("~/"); string desPath = path + "pbs_data\\" + rar.entity.uuid; if (!Directory.Exists(desPath)) { Directory.CreateDirectory(desPath); } for (int i = 0; i < rar.fileList.Count; i++) { sys_upload_file tmp = new sys_upload_file(); tmp = rar.fileList[i]; tmp.rec_uuid = rar.entity.uuid; db.sys_upload_file.Add(tmp); string path1 = path + "upload\\" + tmp.file_url; string path2 = desPath + "\\" + tmp.file_url; File.Move(path1, path2); } string qmPicPath = path + "upload\\" + rar.entity.uuid + ".png"; if (File.Exists(qmPicPath)) { sys_upload_file tmp = db.sys_upload_file.Where(p => p.file_name.Equals(rar.entity.uuid + ".png")).FirstOrDefault(); if (tmp == null) { tmp = new sys_upload_file(); tmp.rec_uuid = rar.entity.uuid; tmp.file_type = 2005; tmp.file_name = rar.entity.uuid + ".png"; tmp.file_uploader = rar.entity.creater_id; tmp.file_url = rar.entity.uuid + ".png"; tmp.file_upload_time = DateTime.Now; tmp.file_hint = "见证人签名"; db.sys_upload_file.Add(tmp); } else { tmp.file_uploader = rar.entity.creater_id; tmp.file_upload_time = DateTime.Now; db.sys_upload_file.Attach(tmp); var stateEntity2 = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(tmp); stateEntity2.SetModifiedProperty("file_uploader"); stateEntity2.SetModifiedProperty("file_upload_time"); } string path2 = desPath + "\\" + tmp.file_url; if (File.Exists(path2)) { File.Delete(path2); } File.Move(qmPicPath, path2); } string fwPicPath = path + "upload\\" + rar.entity.uuid + "_xct.jpeg"; if (File.Exists(fwPicPath)) { sys_upload_file tmp = db.sys_upload_file.Where(p => p.file_name.Equals(rar.entity.uuid + "_xct.jpeg")).FirstOrDefault(); if (tmp == null) { tmp = new sys_upload_file(); tmp.rec_uuid = rar.entity.uuid; tmp.file_type = 2004; tmp.file_name = rar.entity.uuid + "_xct.jpeg"; tmp.file_uploader = rar.entity.creater_id; tmp.file_url = rar.entity.uuid + "_xct.jpeg"; tmp.file_upload_time = DateTime.Now; tmp.file_hint = "方位示意图"; db.sys_upload_file.Add(tmp); } else { tmp.file_uploader = rar.entity.creater_id; tmp.file_upload_time = DateTime.Now; db.sys_upload_file.Attach(tmp); var stateEntity2 = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(tmp); stateEntity2.SetModifiedProperty("file_uploader"); stateEntity2.SetModifiedProperty("file_upload_time"); } string path2 = desPath + "\\" + tmp.file_url; if (File.Exists(path2)) { File.Delete(path2); } File.Move(fwPicPath, path2); } string pmPicPath = path + "upload\\" + rar.entity.uuid + "_pmt.jpeg"; if (File.Exists(pmPicPath)) { sys_upload_file tmp = db.sys_upload_file.Where(p => p.file_name.Equals(rar.entity.uuid + "_pmt.jpeg")).FirstOrDefault(); if (tmp == null) { tmp = new sys_upload_file(); tmp.rec_uuid = rar.entity.uuid; tmp.file_type = 2004; tmp.file_name = rar.entity.uuid + "_pmt.jpeg"; tmp.file_uploader = rar.entity.creater_id; tmp.file_url = rar.entity.uuid + "_pmt.jpeg"; tmp.file_upload_time = DateTime.Now; tmp.file_hint = "平面示意图"; db.sys_upload_file.Add(tmp); } else { tmp.file_uploader = rar.entity.creater_id; tmp.file_upload_time = DateTime.Now; db.sys_upload_file.Attach(tmp); var stateEntity2 = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.GetObjectStateEntry(tmp); stateEntity2.SetModifiedProperty("file_uploader"); stateEntity2.SetModifiedProperty("file_upload_time"); } string path2 = desPath + "\\" + tmp.file_url; if (File.Exists(path2)) { File.Delete(path2); } File.Move(pmPicPath, path2); } db.SaveChanges(); rdi.recNo = rar.entity.record_no; rdi.recNo = rdi.recNo.Substring(rdi.recNo.Length - 6); rdi.code = 100; return(Ok(rdi)); } catch (Exception e) { rdi.code = 104; rdi.msg = "更新记录失败: " + e.Message; log.Error(e.Message + " -- " + e.InnerException.Message); return(Ok(rdi)); } }