/// <summary> /// 审核债权 /// </summary> /// <param name="data"></param> /// <returns></returns> public bool AduitApplayClaims(RQAduitApplay data) { BaseResultDto <string> result = new BaseResultDto <string>(); try { RQProcParam proc = new RQProcParam(); proc.ProcName = "Proc_UpdateSystemBorrowerChecked"; proc.DicParam.Add("ApplyID", data.ApplyID); proc.DicParam.Add("ClaimsID", data.ClaimsID); proc.DicParam.Add("ApproverUserName", data.ApproverUserName); proc.DicParam.Add("Succeed", data.Succeed); proc.DicParam.Add("OperatorUserId", data.OperatorUserId); proc.DicParam.Add("OperatorContent", data.OperatorContent); proc.DicParam.Add("IP", data.IP); if (helper.ExecByProc(proc) > 0) { result.ErrorMsg = "成功"; result.ErrorCode = 1; result.IsSeccess = true; } else { result.ErrorMsg = "失败"; result.ErrorCode = 0; } } catch (Exception ex) { result.ErrorMsg = ex.Message; result.ErrorCode = -1; } return(result.IsSeccess); }
public JsonResult AddUpdateClaims(SystemClaims systemClaims, int clickType) { JsonResult result = null; try { Type type = systemClaims.GetType(); PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.GetProperty); foreach (var item in properties) { if (item.PropertyType == typeof(string) && item.GetValue(systemClaims, null) == null) { item.SetValue(systemClaims, "", null); } } //操作数据之前 对的补齐和正确性的验证 //审核通过之类的该状态的调用存储过程 暂时未处理 //...... if (clickType == 1)//审核未通过 { systemClaims.IsApproved = false; systemClaims.ApproverUserName = this.UserInfo.RealName; systemClaims.ApproverTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } else if (clickType == 2)//审核通过 { systemClaims.IsApproved = true; systemClaims.ApproverUserName = this.UserInfo.RealName; systemClaims.ApproverTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } systemClaims.DetailsImages1 = HttpUtility.UrlDecode(systemClaims.DetailsImages1); systemClaims.DetailsImages2 = HttpUtility.UrlDecode(systemClaims.DetailsImages2); systemClaims.DetailsImages3 = HttpUtility.UrlDecode(systemClaims.DetailsImages3); systemClaims.DetailsImages4 = HttpUtility.UrlDecode(systemClaims.DetailsImages4); systemClaims.DetailsImages5 = HttpUtility.UrlDecode(systemClaims.DetailsImages5); DataFornat dataformat = new DataFornat(); systemClaims.TitleImagePath = dataformat.ReplaceDomain(systemClaims.TitleImagePath, AppConfigHelper.MainSiteUrl); systemClaims.DetailsImages1 = dataformat.ReplaceImageSrc(systemClaims.DetailsImages1, AppConfigHelper.MainSiteUrl); systemClaims.DetailsImages2 = dataformat.ReplaceImageSrc(systemClaims.DetailsImages2, AppConfigHelper.MainSiteUrl); systemClaims.DetailsImages3 = dataformat.ReplaceImageSrc(systemClaims.DetailsImages3, AppConfigHelper.MainSiteUrl); systemClaims.DetailsImages4 = dataformat.ReplaceImageSrc(systemClaims.DetailsImages4, AppConfigHelper.MainSiteUrl); systemClaims.DetailsImages5 = dataformat.ReplaceImageSrc(systemClaims.DetailsImages5, AppConfigHelper.MainSiteUrl); string strIcons = HttpUtility.UrlDecode(systemClaims.Icons); List <IconModel> IconModelList = new List <IconModel>(); string[] strArr = strIcons.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries); foreach (var item in strArr) { IconModel model = new IconModel(); string[] strItem = item.Split('^'); if (strItem.Length >= 3) { model.IconType = strItem[0]; model.Title = strItem[1]; model.Description = strItem[2]; model.StyleName = strItem[3]; } if (strItem.Length >= 4) { model.AtrrCode = strItem[4]; } IconModelList.Add(model); } systemClaims.Icons = IconModelList.ToJsonString <List <IconModel> >(); //添加或者修改 BaseResultDto <string> resultDto = new BaseResultDto <string>(); string message = string.Empty; if (systemClaims.ID > 0) { #region 修改 RQUpdate <SystemClaims> model = new RQUpdate <SystemClaims>(); model.Tag = systemClaims; bool rs = false; if (clickType == 0 || clickType == 2)//修改资料 { //更新修改的字段数据 model.UpdateFileds.AddRange(new string[] { "Title", "TitleImagePath", "LoanAmount", "APR", "LoanPeriod", "SingleAmount", "GuaranteeWay", "RepaymentWat", "InvestmentEndTime", "EarningsStartTime", "PawnSpec", "Icons", "DetailsImages1", "DetailsImages2", "DetailsImages3", "DetailsImages4", "DetailsImages5" }); rs = HttpHelper.CreatHelper().DoPostObject <bool>(string.Format("{0}Claims/UpdatePartal", this.WebApiUrl), model); } if (clickType == 2 && rs) { //更新审核字段数据 RQAduitApplay aduitApplay = new RQAduitApplay(); aduitApplay.ApplyID = systemClaims.ClaimsApplayID; aduitApplay.ClaimsID = systemClaims.ID; aduitApplay.ApproverUserName = systemClaims.ApproverUserName; aduitApplay.OperatorUserId = this.UserInfo.ID; aduitApplay.Succeed = systemClaims.IsApproved; aduitApplay.IP = this.RequestIP; aduitApplay.OperatorContent = (clickType == 1 ? "审核未通过" : "审核通过"); rs = HttpHelper.CreatHelper().DoPostObject <bool>(string.Format("{0}ClaimsApplay/AduitApplayClaims", this.WebApiUrl), aduitApplay); } //修改 if (rs) { resultDto.ErrorCode = 1; resultDto.ErrorMsg = "成功"; } else { resultDto.ErrorMsg = "失败"; } #endregion } else { systemClaims.PublishTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); systemClaims.Publisher = this.UserInfo.RealName; int rs = HttpHelper.CreatHelper().DoPostObject <int>(string.Format("{0}Claims/Add", this.WebApiUrl), systemClaims); //添加 if (rs > 0) { resultDto.ErrorCode = 1; resultDto.ErrorMsg = "成功"; } else { resultDto.ErrorMsg = "失败"; } } result = Json(new { status = resultDto.ErrorCode, message = resultDto.ErrorMsg }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }