/// <summary> /// 修改团队状态 /// </summary> /// <param name="tourStatus">团队状态</param> /// <param name="tourId">计调编号</param> private void UpdateTourStatus(EyouSoft.Model.EnumType.TourStructure.TourStatus tourStatus, string tourId) { BTour btour = new BTour(); EyouSoft.Model.TourStructure.MTourStatusChange mtourstatuschange = new EyouSoft.Model.TourStructure.MTourStatusChange(); mtourstatuschange.TourId = tourId; mtourstatuschange.DeptId = SiteUserInfo.DeptId; mtourstatuschange.Operator = SiteUserInfo.Name; mtourstatuschange.OperatorId = SiteUserInfo.UserId; mtourstatuschange.IssueTime = System.DateTime.Now; mtourstatuschange.TourStatus = tourStatus; mtourstatuschange.CompanyId = SiteUserInfo.CompanyId; if (btour.UpdateTourStatus(mtourstatuschange)) { mark = "1"; } else { mark = "2"; } Response.Redirect("/m/baozhang.aspx?sl=" + Utils.GetQueryStringValue("sl") + "&source=1&tourId=" + tourId + "&tourType=" + Utils.GetQueryStringValue("tourType") + "&mark=" + mark); }
/// <summary> /// 改变团队状态 /// </summary> /// <param name="tourStatus">计划状态</param> /// <param name="tourId">团队编号</param> private void UpdateTourStatus(EyouSoft.Model.EnumType.TourStructure.TourStatus tourStatus, string tourId) { var info = new MTourStatusChange(); info.TourId = tourId; /*团队编号*/ info.CompanyId = CurrentUserCompanyID; /*系统公司编号*/ info.DeptId = SiteUserInfo.DeptId; /*操作人部门Id*/ info.Operator = SiteUserInfo.Name; /*操作人*/ info.OperatorId = SiteUserInfo.UserId; /*操作人ID*/ info.IssueTime = System.DateTime.Now; /*操作时间*/ info.TourStatus = tourStatus; /*团队状态*/ /*以下参数仅封团操作才有效*/ info.TourSettlement = Utils.GetDecimal(Utils.GetQueryStringValue(TourSettlement.UniqueID)); /*团队订单结算金额*/ info.TourPay = Utils.GetDecimal(Utils.GetQueryStringValue(TourPay.UniqueID)); /*团队总支出*/ info.TourProfit = Utils.GetDecimal(Utils.GetQueryStringValue(TourProfit.UniqueID)); /*团队利润*/ info.DisOrderProfit = Utils.GetDecimal(Utils.GetQueryStringValue(DisOrderProfit.UniqueID)); /*团队订单分配利润*/ info.DisTourProfit = Utils.GetDecimal(Utils.GetQueryStringValue(DisTourProfit.UniqueID)); /*团队分配利润*/ info.TourIncome = Utils.GetDecimal(Utils.GetQueryStringValue(TourIncome.UniqueID)); /*团队订单合同确认金额合计*/ info.TourOtherIncome = Utils.GetDecimal(Utils.GetQueryStringValue(TourOtherIncome.UniqueID)); /*团队其他收入*/ bool retBool = new BTour().UpdateTourStatus(info); if (retBool) { AjaxResponse(UtilsCommons.AjaxReturnJson("1", "提交成功!")); } else { if (info.OutputCode == -98) { RCWE(UtilsCommons.AjaxReturnJson("-1", "操作失败:有导游现收款,报销未完成的计划不能核算结束!")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "提交失败!")); } } }
/// <summary> /// 改变团队状态 /// </summary> /// <param name="tourStatus">计划状态</param> /// <param name="tourId">团队编号</param> private void UpdateTourStatus(EyouSoft.Model.EnumType.TourStructure.TourStatus tourStatus, string tourId) { var info = new MTourStatusChange { TourId = tourId, /*团队编号*/ CompanyId = CurrentUserCompanyID, /*系统公司编号*/ DeptId = SiteUserInfo.DeptId, /*操作人部门Id*/ Operator = SiteUserInfo.Name, /*操作人*/ OperatorId = SiteUserInfo.UserId, /*操作人ID*/ IssueTime = System.DateTime.Now, /*操作时间*/ TourStatus = tourStatus /*团队状态*/ }; bool bllRetCode = new BTour().UpdateTourStatus(info); if (bllRetCode) { RCWE(UtilsCommons.AjaxReturnJson("1", "提交成功")); } else if (info.OutputCode == -99) { RCWE(UtilsCommons.AjaxReturnJson("-1", "存在未报账的订单信息,请先进行订单报账后再提交报账。")); } else if (info.OutputCode == -97) { RCWE(UtilsCommons.AjaxReturnJson("-1", "存在导游收入-导游实收未保存的信息,请先保存导游实收信息再提交报账。")); } else if (info.OutputCode == -96) { RCWE(UtilsCommons.AjaxReturnJson("-1", "该计划下存在未处理(或已留位、或留位过期、或资金超限、或垫付申请中、或垫付申请未通过)的订单,请先处理好订单后再提交报账。")); } else { RCWE(UtilsCommons.AjaxReturnJson("-1", "提交失败!")); } }