/// <summary> /// 物理服务器 /// </summary> public ActionResult ListPhyDel() { var sReturnModel = new ReturnMessageModel(); #region 登录验证 if (!Utits.IsLogin) { sReturnModel.ErrorType = 3; sReturnModel.MessageContent = "登录状态已失效."; return(Json(sReturnModel)); } #endregion var idcode = RequestParameters.Pint("Idcode"); if (idcode != 1 && idcode != 0) { sReturnModel.ErrorType = 0; sReturnModel.MessageContent = "参数错误."; return(Json(sReturnModel)); } var ids = RequestParameters.Pstring("ids"); if (ids.Length < 1) { sReturnModel.ErrorType = 0; sReturnModel.MessageContent = "参数错误."; return(Json(sReturnModel)); } var tempArry = ids.Split(','); List <int> delIds = new List <int>(); foreach (var s in tempArry) { if (RegexValidate.IsInt(s)) { delIds.Add(int.Parse(s)); } } if (!delIds.Any()) { sReturnModel.ErrorType = 0; sReturnModel.MessageContent = "参数格式错误."; return(Json(sReturnModel)); } var cBll = new BLL_Service(); if (cBll.PhysicalDelete(delIds.ToArray(), idcode)) { sReturnModel.ErrorType = 1; sReturnModel.MessageContent = "操作成功."; } else { sReturnModel.ErrorType = 0; sReturnModel.MessageContent = "操作失败."; } return(Json(sReturnModel)); }
public string setCareContent(string bizContent, long timeStamp, string signature) { MessageLog.WriteLog(new LogParameterModel { ClassName = this.GetType().ToString(), MethodName = "setCareContent", MethodParameters = $"bizContent:{bizContent},timeStamp:{timeStamp},signature:{signature}", LogLevel = ELogLevel.Info, Message = "接收参数", PathPrefix = "/log/ws", LogExt = "txt" }); var result = new ResultModel(); var paramItem = CommonLib.JsonHelper.Deserialize <SetNursingDto>(bizContent); if (paramItem == null) { result.resultCode = 0; result.resultMessage = "操作失败:bizContent不合法."; return(result.ToJSON()); } var HgID = paramItem.userId; var customerBll = new CustomerBll(); var itemCustomer = customerBll.GetVijObjectById(paramItem.welfareCentreId, paramItem.bedNumber); if (itemCustomer == null) { result.resultCode = 0; result.resultMessage = "未获得信息."; return(result.ToJSON()); } var arrayNursingIds = paramItem.nursingIds.Split(','); var list = new List <tbNursingPer>(); tbNursingPer item; var nowTime = DateTime.Now; Guid NursingMessageID = Guid.NewGuid(); foreach (var nursingId in arrayNursingIds) { if (!RegexValidate.IsInt(nursingId)) { continue; } item = new tbNursingPer(); item.ID = Guid.NewGuid(); item.CustomerID = itemCustomer.ID; item.NursingRankTopID = Convert.ToInt32(nursingId); item.NursingRankID = Convert.ToInt32(nursingId); item.HgID = HgID; item.OperatorUserID = HgID; item.NursingMessageID = NursingMessageID; item.NursingTime = nowTime; item.OperateDate = nowTime; item.CreateDate = nowTime; item.IsValid = 1; item.Remark = "cr"; item.WelfareCentreID = paramItem.welfareCentreId; list.Add(item); } var listExt = new List <tbNursingPerExt>(); tbNursingPerExt itemExt; var listNursingExt = JsonHelper.DeserializeToIList <nursingExtModel>(paramItem.nursingExt); if (listNursingExt != null) { foreach (var itemInfo in listNursingExt) { itemExt = new tbNursingPerExt(); itemExt.ID = Guid.NewGuid(); itemExt.CustomerID = itemCustomer.ID; itemExt.NursingRankTopID = itemInfo.nursingId; itemExt.NursingRankID = itemInfo.nursingId; itemExt.extTitle = itemInfo.extTitle; itemExt.extContent = itemInfo.extContent; itemExt.HgID = HgID; itemExt.OperatorUserID = HgID; itemExt.NursingTime = nowTime; itemExt.NursingMessageID = NursingMessageID; itemExt.OperateDate = nowTime; itemExt.CreateDate = nowTime; itemExt.IsValid = 1; itemExt.Remark = "cr"; itemExt.WelfareCentreID = paramItem.welfareCentreId; listExt.Add(itemExt); } } var cBll = new NursingPerBll(); var isFlag = cBll.AddAll(paramItem.welfareCentreId, HgID, itemCustomer.ID, list, listExt); if (isFlag) { result.resultCode = 1; result.resultMessage = "操作成功."; } else { result.resultCode = 0; result.resultMessage = "操作失败."; } return(result.ToJSON()); }