public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string telFrom = string.Empty; string telTo = string.Empty; string result = string.Empty; decimal houseID = 0; i_InternetPhone iip = new i_InternetPhone(); if (context.Request.QueryString["aTyp"] != null && context.Request.QueryString["aTyp"].ToString() == "del") { h_HouseTelList hh = h_HouseTelList.FindByKey(context.Request.QueryString["LSH"]); hh.DelEmployeeID = Employee.Current.EmployeeID; hh.DelType = true; hh.Update(); h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = hh.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "电话删除"; hfo.Insert(); // 电话修改记录 string oldTel = hh.Tel2; TelChange tc = new TelChange(); tc.AddEmployeeID = Employee.Current.EmployeeID; tc.HouseID = hh.HouseID; tc.NewTel = ""; tc.OldTel = oldTel.TelDecrypt((Int32)hh.HouseID, 0); tc.Insert(); context.Response.Write("del"); return; } //房源电话拨打 else if (context.Request.QueryString["LSH"] != null) { int ii = i_InternetTel.FindCount(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" }); if (ii > 0) { iip.RecrodType = 1; h_HouseTelList hh = h_HouseTelList.FindByKey(context.Request.QueryString["LSH"]); houseID = hh.HouseID; telTo = hh.Tel2.TelDecrypt((Int32)hh.HouseID, TelDecPoint.PC_HouseForm_TelPhone); if (context.Request.QueryString["mytel"] != null) { telFrom = context.Request.QueryString["mytel"].ToString(); } else { telFrom = i_InternetTel.Find("EmployeeID=" + Employee.Current.EmployeeID + " and IsDel=0").MyTel; } } else { context.Response.Write("1," + Employee.Current.EmployeeID.ToString()); return; } } //装修拨打买家电话 else if (context.Request.QueryString["bTel"] != null) { int ii = i_InternetTel.FindCount(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" }); if (ii > 0) { iip.RecrodType = 5; telTo = context.Request.QueryString["bTel"]; houseID = Convert.ToDecimal(context.Request.QueryString["HouseID"]); if (context.Request.QueryString["mytel"] != null) { telFrom = context.Request.QueryString["mytel"].ToString(); } else { telFrom = i_InternetTel.Find("EmployeeID=" + Employee.Current.EmployeeID + " and IsDel=0").MyTel; } } else { context.Response.Write("1," + Employee.Current.EmployeeID.ToString()); return; } } //员工通讯录拨打 else if (context.Request.QueryString["EmpTelFrom"] != null && context.Request.QueryString["EmpTelTo"] != null) { iip.RecrodType = 4; telFrom = context.Request.QueryString["EmpTelFrom"]; telTo = context.Request.QueryString["EmpTelTo"]; houseID = 0; } iip.employeeID = Employee.Current.EmployeeID; iip.houseID = houseID; iip.dateCreated = DateTime.Now.ToString(); iip.fromTel = telFrom; iip.toTel = telTo; iip.recordUrlDel = 2; iip.orgID = Convert.ToInt32(Employee.Current.OrgID); iip.isPcCallTel = 1; iip.createTime = DateTime.Now; iip.Source = 0; iip.CallSystem = 0; iip.Insert(); InterPhoneCall ip = new InterPhoneCall(); InterPhoneCall.CallBackMsg cbm = new InterPhoneCall.CallBackMsg(); //是否大众员工 if (Employee.Current.MyTopOrgA.OrgID == 1062) { cbm = ip.Call_Mobile(telFrom, telTo, iip.phoneID.ToString(), 1); } else { cbm = ip.Call_Mobile(telFrom, telTo, iip.phoneID.ToString()); } iip.callSid = cbm.taskId; iip.Update(); result = cbm.errcode; if (result == "0") { context.Response.Write("连接成功!连接手机号:" + telFrom); } else { context.Response.Write("连接失败!请联系人事-检查是否绑定隐号!"); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; if (context.Request.QueryString["aTyp"] != null && context.Request.QueryString["aTyp"].ToString() == "del") { h_HouseTelList hh = h_HouseTelList.FindByKey(context.Request.QueryString["LSH"]); hh.DelEmployeeID = Employee.Current.EmployeeID; hh.DelType = true; hh.Update(); h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = hh.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "电话删除"; hfo.Insert(); // 电话修改记录 string oldTel = hh.Tel2; TelChange tc = new TelChange(); tc.AddEmployeeID = Employee.Current.EmployeeID; tc.HouseID = hh.HouseID; tc.NewTel = ""; tc.OldTel = oldTel.TelDecrypt((Int32)hh.HouseID, 0); tc.Insert(); context.Response.Write("del"); } else if (context.Request.QueryString["LSH"] != null) { h_HouseTelList hh = h_HouseTelList.FindByKey(context.Request.QueryString["LSH"]); string result = ""; int ii = i_InternetTel.FindCount(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" }); if (ii > 0) { string tel = ""; //隐号拔打 string houseTel = hh.Tel2.TelDecrypt((Int32)hh.HouseID, TelDecPoint.PC_HouseForm_TelPhone); if (context.Request.QueryString["mytel"] != null) { tel = context.Request.QueryString["mytel"].ToString(); i_InternetPhone iip = new i_InternetPhone(); iip.employeeID = Employee.Current.EmployeeID; iip.houseID = hh.HouseID; iip.dateCreated = DateTime.Now.ToString(); iip.fromTel = tel; iip.toTel = houseTel; iip.recordUrlDel = 2; iip.orgID = Convert.ToInt32(Employee.Current.OrgID); iip.isPcCallTel = 1; iip.createTime = DateTime.Now; iip.Source = 2; iip.CallSystem = 0; iip.RecrodType = 1; iip.Insert(); Common.InterPhoneCall ip = new Common.InterPhoneCall(); Common.InterPhoneCall.CallBackMsg cbm = new Common.InterPhoneCall.CallBackMsg(); s_SysParam model = s_SysParam.Find(Share_Personinfo._.ID, 1279); string sqlnum = @"select COUNT(*)AS Num from i_InternetPhone where createTime > DATEADD(minute, -15, GETDATE()) and datediff(dd, createTime, GETDATE())= 0 and employeeID =" + Employee.Current.EmployeeID + @" and houseID =" + hh.HouseID + @" and callSid !=''"; int CallNum = int.Parse(EntityUtils.DBUtility.DbHelperSQL.Query(sqlnum).Tables[0].Rows[0][0].ToString()); if (CallNum >= int.Parse(model.Value) && int.Parse(model.Value) > 0) { result = "1"; } else { cbm = ip.Call(tel, houseTel, iip.phoneID.ToString()); iip.callSid = cbm.taskId; iip.Update(); result = cbm.errcode; } } else { tel = i_InternetTel.Find("EmployeeID=" + Employee.Current.EmployeeID + " and IsDel=0").MyTel; i_InternetPhone iip = new i_InternetPhone(); iip.employeeID = Employee.Current.EmployeeID; iip.houseID = hh.HouseID; iip.dateCreated = DateTime.Now.ToString(); iip.fromTel = tel; iip.toTel = houseTel; iip.recordUrlDel = 2; iip.orgID = Convert.ToInt32(Employee.Current.OrgID); iip.isPcCallTel = 1; iip.createTime = DateTime.Now; iip.Source = 2; iip.CallSystem = 0; iip.RecrodType = 1; iip.Insert(); Common.InterPhoneCall ip = new Common.InterPhoneCall(); Common.InterPhoneCall.CallBackMsg cbm = new Common.InterPhoneCall.CallBackMsg(); s_SysParam model = s_SysParam.Find(Share_Personinfo._.ID, 1279); string sqlnum = @"select COUNT(*)AS Num from i_InternetPhone where createTime > DATEADD(minute, -15, GETDATE()) and datediff(dd, createTime, GETDATE())= 0 and employeeID =" + Employee.Current.EmployeeID + "and houseID =" + hh.HouseID + "AND callSid !=''"; int CallNum = int.Parse(HouseMIS.EntityUtils.DBUtility.DbHelperSQL.Query(sqlnum).Tables[0].Rows[0][0].ToString()); if (CallNum >= int.Parse(model.Value) && int.Parse(model.Value) > 0) { result = "1"; } else { cbm = ip.Call(tel, houseTel, iip.phoneID.ToString()); iip.callSid = cbm.taskId; iip.Update(); result = cbm.errcode; } } if (result == "0") { context.Response.Write("连接成功!连接手机号:" + tel); } else if (result == "1") { string timesql = @"select top 1 datediff(SECOND , DATEADD(minute, -15, GETDATE()),createTime)time from i_InternetPhone where datediff(dd, createTime, GETDATE())= 0 and employeeID=" + Employee.Current.EmployeeID + "and callSid !='' and createTime > DATEADD(minute, -15, GETDATE()) and houseID=" + hh.HouseID; int time = int.Parse(EntityUtils.DBUtility.DbHelperSQL.Query(timesql).Tables[0].Rows[0][0].ToString()); TimeSpan ts = new TimeSpan(0, 0, time); string times; if (ts.Minutes > 0) { times = ts.Minutes + "分钟" + ts.Seconds + "秒"; } else { times = ts.Seconds + "秒"; } context.Response.Write("您拨打的太频繁了!</br>请稍作休息!请" + times + "后再试!"); } else { context.Response.Write("连接失败!请联系管理员"); } } else { context.Response.Write("1," + Employee.Current.EmployeeID.ToString()); } } else if (context.Request.QueryString["EmpTelFrom"] != null && context.Request.QueryString["EmpTelTo"] != null) { string result = string.Empty; string telFrom = context.Request.QueryString["EmpTelFrom"]; string telTo = context.Request.QueryString["EmpTelTo"]; i_InternetPhone iip = new i_InternetPhone(); iip.employeeID = Employee.Current.EmployeeID; iip.houseID = 0; iip.dateCreated = DateTime.Now.ToString(); iip.fromTel = telFrom; iip.toTel = telTo; iip.recordUrlDel = 2; iip.orgID = Convert.ToInt32(Employee.Current.OrgID); iip.isPcCallTel = 1; iip.createTime = DateTime.Now; iip.Source = 2; iip.CallSystem = 0; iip.RecrodType = 4; iip.Insert(); Common.InterPhoneCall ip = new Common.InterPhoneCall(); Common.InterPhoneCall.CallBackMsg cbm = new Common.InterPhoneCall.CallBackMsg(); s_SysParam model = s_SysParam.Find(Share_Personinfo._.ID, 1279); string sqlnum = @"select COUNT(*)AS Num from i_InternetPhone where createTime > DATEADD(minute, -15, GETDATE()) and datediff(dd, createTime, GETDATE())= 0 and employeeID =" + Employee.Current.EmployeeID + "and houseID =0 and callSid !=''"; int CallNum = int.Parse(HouseMIS.EntityUtils.DBUtility.DbHelperSQL.Query(sqlnum).Tables[0].Rows[0][0].ToString()); if (CallNum >= int.Parse(model.Value) && int.Parse(model.Value) > 0) { result = "1"; } else { cbm = ip.Call(telFrom, telTo, iip.phoneID.ToString()); iip.callSid = cbm.taskId; iip.Update(); result = cbm.errcode; } if (result == "0") { context.Response.Write("连接成功!连接手机号:" + telFrom); } else if (result == "1") { string timesql = @"select top 1 datediff(SECOND , DATEADD(minute, -15, GETDATE()),createTime)time from i_InternetPhone where datediff(dd, createTime, GETDATE())= 0 and employeeID=" + Employee.Current.EmployeeID + "and callSid !='' and createTime > DATEADD(minute, -15, GETDATE()) and houseID=0"; int time = int.Parse(HouseMIS.EntityUtils.DBUtility.DbHelperSQL.Query(timesql).Tables[0].Rows[0][0].ToString()); TimeSpan ts = new TimeSpan(0, 0, time); string times; if (ts.Minutes > 0) { times = ts.Minutes + "分钟" + ts.Seconds + "秒"; } else { times = ts.Seconds + "秒"; } context.Response.Write("您拨打的太频繁了!</br>请稍作休息!请" + times + "后再试!"); } else { context.Response.Write("连接失败!请联系管理员"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.HTFpagerForm.ID += House.HouseID; #region 1.显示 [查看电话] 按钮 if (!IsShowTel) //如果不显示电话 { //判断调电权限 //if (H_houseinfor.NeedTelPower(Convert.ToDecimal(Request["HouseID"]), Convert.ToInt32(Employee.Current.EmployeeID))) //{ // LokTelButa.Visible = IsCanShowTel; //} //if (LokTelButa.Visible == true) //{ // LokTelButa.Attributes.Add("onclick", "return LookTelClick('" + House.HouseID + "')"); //} } else { //LokTelButa.Visible = false; #region 插入调电记录 if (CheckRolePermission("不隐号") || IsCanShowTel) { h_SeeTelLog hs = new h_SeeTelLog(); hs.EmployeeID = Employee.Current.EmployeeID; hs.HouseID = Convert.ToDecimal(HouseID.Value); hs.IsPower = H_houseinfor.NeedTelPower(House.HouseID, Employee.Current.EmployeeID.ToString().ToInt32()); hs.Insert(); } #endregion 插入调电记录 //显示室号 room.Value = House.Build_room; } cbTel.DataSource = i_InternetTel.FindAll(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" }); cbTel.DataTextField = "MyTel"; cbTel.DataValueField = "MyTel"; cbTel.DataBind(); #endregion 1.显示 [查看电话] 按钮 } if (Request.Form["LSH"] != null && Request.Form["LSH"] != "") { #region 编辑电话 h_HouseTelList hh = h_HouseTelList.Find("LSH", Request.Form["LSH"]); hh.EmployeeID = Employee.Current.EmployeeID; if (Request.Form["HouseID"] != "0") { hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]); } else { hh.HouseID = 0; hh.GU_ID = Request.Form["GU_ID"].ToString(); } hh.landlord_name = Request.Form["frmName"].ToString(); hh.Tel1 = H_houseinfor.TelDispose(Request.Form["Tel"]); string oldTel = hh.Tel2; hh.Tel2 = Request.Form["Tel"].TelEncrypt(); hh.TelType = Request.Form["TelType"].ToString(); hh.Update(); #region 插入跟进 h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = hh.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "电话修改"; hfo.Insert(); #endregion 插入跟进 #region 电话修改记录 TelChange tc = new TelChange(); tc.AddEmployeeID = Employee.Current.EmployeeID; tc.HouseID = hh.HouseID; tc.NewTel = Request.Form["Tel"]; tc.OldTel = oldTel.TelDecrypt((Int32)hh.HouseID, 0); tc.Insert(); LSH.Value = ""; #endregion 电话修改记录 #endregion 编辑电话 } else if (Request.Form["frmName"] != null && Request.Form["frmName"] != "") { #region 添加电话 h_HouseTelList hh = new h_HouseTelList(); hh.EmployeeID = Employee.Current.EmployeeID; if (Request.Form["HouseID"] != "0") { hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]); } else { hh.HouseID = 0; hh.GU_ID = Request.Form["GU_ID"].ToString(); } hh.landlord_name = Request.Form["frmName"].ToString(); hh.Tel1 = H_houseinfor.TelDispose(Request.Form["Tel"]); hh.Tel2 = Request.Form["Tel"].TelEncrypt(); hh.TelType = Request.Form["TelType"].ToString(); hh.Insert(); if (hh.HouseID > 0) { h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = hh.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "添加新电话,编号:" + hh.LSH; hfo.Insert(); } #endregion 添加电话 Response.Write("<script>alertMsg.correct(\"操作成功请点调电拨打电话!\");</script>"); } if (!CheckRolePermission("不隐号")) { //if (!CheckRolePermission("添加电话", Convert.ToDecimal(House.OwnerEmployeeID))) //hTelAdd.Visible = false; } else { if (CheckRolePermission("不隐号")) { h_SeeTelLog hs = new h_SeeTelLog(); hs.EmployeeID = Employee.Current.EmployeeID; hs.HouseID = Convert.ToDecimal(HouseID.Value); hs.IsPower = false; hs.Insert(); } } }
protected override void OnOtherSaveForm(object sender, EntityFormEventArgs e) { //验证数据合法性 if (Entity.NewPrice == 0 || Entity.NewPrice_Sum == 0) { ShowMsg(AlertType.error, "跟进实价或总价不能为0!"); return; } //经纪人必须上传录音 if (Current.RoleNames.Contains("经纪人") && (Request.Form["rb1"] == null || Request.Form["rb1"] == "")) { ShowMsg(AlertType.error, "请选择压价录音!"); return; } h_PriceFollowUp.Meta.BeginTrans(); try { //改房源实价和平均价格 decimal NewPrice = Entity.NewPrice; decimal NewPrice_Sum = Entity.NewPrice_Sum; if (NewPrice > Entity.House.Sum_price) { NewPrice_Sum = NewPrice; } //写一条房源跟进 h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = Entity.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "压价跟进[实价]:" + Entity.House.Min_price + "→" + NewPrice + ",[总价]:" + Entity.House.Sum_price + "→" + NewPrice_Sum; hfo.exe_Date = DateTime.Now; hfo.Insert(); Entity.OldPrice = Entity.House.Min_price; Entity.OldPrice_Sum = Entity.House.Sum_price; //decimal AddIntegral = Math.Abs(Math.Round(((Entity.NewPrice - Entity.OldPrice) * 10000 / 1000), 0)); //保存 Entity.EmployeeID = hfo.EmployeeID; Entity.AddDate = hfo.exe_Date; //Entity.Integral = AddIntegral.ToInt32().Value; Entity.Integral = 0; Entity.State = 0; if (Current.RoleNames.Contains("经纪人")) { //获取此房源历史最低价格,如果新实价比历史最低价降低3%,则更改价格维护人 decimal minNewPrice = DbHelperSQL.GetSingle(string.Format(@"select isnull(min(NewPrice),0) from h_PriceFollowUp where HouseID ={0}", Entity.HouseID)).ToDecimal().Value; if ((minNewPrice - NewPrice) >= (minNewPrice * 0.03.ToDecimal())) { Entity.State = 1; //增加排序积分 s_SysParam ss = s_SysParam.FindByParamCode("housePrice"); //获取分隔符的值,第一个为分值,第二是否有 有效期,第三为有效期值 string[] ssValue = ss.Value.Split('|'); e_Integral ei = new e_Integral(); ei.employeeID = Convert.ToInt32(Current.EmployeeID); ei.Type = (int)integral_Type.房源与经纪人; ei.tableName = "h_houseinfor"; ei.coloumnName = "HouseID"; ei.keyID = Convert.ToInt32(Entity.HouseID); ei.integralParam = "housePrice"; ei.integralValue = ssValue[0].ToInt32(); ei.integralDay = ssValue[1] == "1" ? ssValue[2].ToInt32() : 0; ei.exe_Date = DateTime.Now; ei.Insert(); } } if (Request.Form["rb1"] != null && Request.Form["rb1"] != "") { Entity.RecFilePath = Request.Form["rb1"].ToString(); } //单价 int Ohter2ID = Convert.ToInt32(Entity.NewPrice_Sum * 10000 / Entity.House.Build_area); string sql = string.Format(@"update h_houseinfor set Min_price={0},Ohter2ID={1},Sum_price={2} where HouseID={3}", NewPrice, Ohter2ID, NewPrice_Sum, Entity.HouseID); h_PriceFollowUp.Meta.Execute(sql); Entity.Save(); h_PriceFollowUp.Meta.Commit(); //判断是否修改价格维护人,需要推送给原价格维护人 if (Entity.State == 1) { sql = string.Format(@"SELECT TOP 1 employeeid FROM h_pricefollowup WHERE state = 1 AND employeeid != {0} AND houseid = {1} ORDER BY adddate DESC ", Entity.EmployeeID, Entity.HouseID); object empID = DbHelperSQL.GetSingle(sql); //判断此房源是否有前一个价格维护人 if (empID != null) { string msg = "房源编号:【" + Entity.House.Shi_id + "】的价格维护人修改为【" + Current.Em_name + "】"; h_PriceComplaint hpc = new h_PriceComplaint(); hpc.h_PriceFollowUpID = Entity.ID; hpc.houseID = Entity.HouseID.ToInt32().Value; hpc.createTime = DateTime.Now; hpc.Context = msg; hpc.priceEditEmpID = Entity.EmployeeID.ToInt32().Value; hpc.priceEmpID = empID.ToInt32().Value; hpc.Insert(); Common.MsgPush.PushMsg(msg, new string[] { Entity.EmployeeID.ToString() }, (int)Common.msgType.价格维护); } } } catch { h_PriceFollowUp.Meta.Rollback(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myffrmddlAudit.Items.Clear(); myffrmddlAudit.Items.Add(""); myffrmddlAudit.Items.Add(new ListItem("未审核", "0")); myffrmddlAudit.Items.Add(new ListItem("已审核", "1")); myffrmddlAudit.SelectedIndex = 1; } z_bottom = "<li><a class=\"iconL\" href=\"House/FollowAuditList.aspx?doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>审核</span></a></li>"; if (CheckRolePermission("删除")) { z_del = "<li><a class=\"delete\" href=\"House/FollowAuditList.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除</span></a></li>"; } if (Request.QueryString["doType"] != null) { //审核状态 if (Request.QueryString["doType"].ToString() == "upDateHouse") { if (!string.IsNullOrEmpty(Request["ids"])) { string sql = string.Format("select * from h_FollowAudit where FollowAuditID in({0})", Request["ids"]); List <h_FollowAudit> list_h_FollowAudit = h_FollowAudit.FindAll(sql); foreach (h_FollowAudit hfa in list_h_FollowAudit) { //房源跟进中增加修改状态 if (DbHelperSQL.ExecuteSql("exec dbo.h_update_HouseState " + hfa.StateID + ", " + hfa.HouseID + ", " + hfa.EmployeeID) > 0) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hfa.HouseID)); //判断房源原先的状态(非委托中)改为委托中,并且当前日期已经大于房源的更新时间超过15天(不包括15天) if (hh.StateID != 2 && hfa.StateID == 2 && (DateTime.Now - hh.Update_date).TotalDays > 15) { //需要重新获取实体,因为在存储过程中,已经更新过 hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hfa.HouseID)); Employee emp = Employee.FindByEmployeeID(hfa.EmployeeID); //增加跟进记录 h_FollowUp hsf = new h_FollowUp(); hsf.EmployeeID = hfa.EmployeeID; hsf.HouseID = hfa.HouseID; hsf.FollowUpText = hfa.FollowText; hsf.exe_Date = hfa.CreateTime; hsf.Insert(); //更新该房源的首录人,用于统计员工新增房源工作量 hh.OwnerEmployeeID = Convert.ToInt32(emp.EmployeeID); hh.OperatorID = Convert.ToInt32(emp.EmployeeID); hh.OrgID = Convert.ToInt32(emp.OrgID); hh.Exe_date = hfa.CreateTime; } hh.Update_date = hfa.CreateTime; hh.Update(); hfa.AuditEmpID = Current.EmployeeID.ToString().ToInt32(); hfa.AuditTime = DateTime.Now; hfa.Update(); } } } } else if (Request.QueryString["doType"].ToString() == "del") { if (!string.IsNullOrEmpty(Request["ids"])) { DbHelperSQL.ExecuteSql("delete from h_FollowAudit where FollowAuditID in(" + Request["ids"] + ")"); } } #region 刷新当前页[抓取当页导航数字onclick事件] string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });"; JSDo_UserCallBack_Success(JavaScript, "操作成功"); #endregion 刷新当前页[抓取当页导航数字onclick事件] } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myffrmHandlingResults.Items.Clear(); myffrmHandlingResults.Items.Add(new ListItem("全部", "2")); myffrmHandlingResults.Items.Add(new ListItem("未审核", "0")); myffrmHandlingResults.Items.Add(new ListItem("已审核", "1")); if (!GetMySearchControlValue("HandlingResults").IsNullOrWhiteSpace()) { myffrmHandlingResults.SelectedValue = GetMySearchControlValue("HandlingResults"); } else { myffrmHandlingResults.SelectedIndex = 1; } myffrmstate.Items.Clear(); myffrmstate.Items.Add(new ListItem("全部", "2")); myffrmstate.Items.Add(new ListItem("确认", "0")); myffrmstate.Items.Add(new ListItem("投诉", "1")); if (!GetMySearchControlValue("state").IsNullOrWhiteSpace()) { myffrmstate.SelectedValue = GetMySearchControlValue("state"); } else { myffrmstate.SelectedIndex = 2; } } z_bottom = "<li><a class=\"iconL\" href=\"House/HousePriceComplaint.aspx?Type=1&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报通过</span></a></li>"; z_bottom += "<li><a class=\"iconL\" href=\"House/HousePriceComplaint.aspx?Type=0&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报不通过</span></a></li>"; if (CheckRolePermission("删除")) { z_del = "<li><a class=\"delete\" href=\"House/HousePriceComplaint.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除</span></a></li>"; } if (Request.QueryString["doType"] != null) { //投诉通过状态 if (Request.QueryString["doType"].ToString() == "upDateHouse") { if (!string.IsNullOrEmpty(Request["ids"])) { string sql = string.Format("select * from h_PriceComplaint where ID in({0})", Request["ids"]); List <h_PriceComplaint> list_h_PriceComplaint = h_PriceComplaint.FindAll(sql); foreach (h_PriceComplaint hpc in list_h_PriceComplaint) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hpc.houseID)); if (Request.QueryString["Type"].ToString() == "1") { //原始价格维护人 Employee ee = Employee.FindByEmployeeID(hpc.priceEmpID); //增加房源跟进 h_FollowUp hsf = new h_FollowUp(); hsf.EmployeeID = hpc.priceEmpID; hsf.HouseID = hpc.houseID; hsf.FollowUpText = "房源价格维护人:" + ee.Em_name + "→" + hpc.EmployeeName; hsf.Insert(); h_PriceFollowUp hpf = h_PriceFollowUp.FindByKey(hpc.h_PriceFollowUpID); if (hpf != null) { hpf.State = 1; hpf.Update(); } sql = string.Format(@"update h_houseinfor set update_date='{0}' where HouseID={1}", hpc.createTime, hpc.houseID); DbHelperSQL.ExecuteSql(sql); Common.MsgPush.PushMsg("房源价格维护:" + hh.Shi_id + " 的投诉——审核通过!", new string[] { hpc.priceEditEmpID.ToString() }, (int)Common.msgType.价格维护); } else if (Request.QueryString["Type"].ToString() == "0") { h_PriceFollowUp hpf = h_PriceFollowUp.FindByKey(hpc.h_PriceFollowUpID); if (hpf != null) { hpf.State = 0; hpc.Update(); } Common.MsgPush.PushMsg("房源价格维护:" + hh.Shi_id + " 的投诉——审核未通过!", new string[] { hpc.priceEditEmpID.ToString() }, (int)Common.msgType.价格维护); } hpc.HandlingResults = Request.QueryString["Type"].ToString() == "1" ? true : false; hpc.HandlingEmpID = Convert.ToInt32(Current.EmployeeID); hpc.HandlingTime = DateTime.Now; hpc.Update(); } } } else if (Request.QueryString["doType"].ToString() == "del") { if (!string.IsNullOrEmpty(Request["ids"])) { DbHelperSQL.ExecuteSql("delete from h_PriceComplaint where ID in(" + Request["ids"] + ")"); } } #region 刷新当前页[抓取当页导航数字onclick事件] string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });"; JSDo_UserCallBack_Success(JavaScript, "操作成功"); #endregion } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myffrmHandlingResults.Items.Clear(); myffrmHandlingResults.Items.Add(new ListItem("全部", "2")); myffrmHandlingResults.Items.Add(new ListItem("未审核", "0")); myffrmHandlingResults.Items.Add(new ListItem("已审核", "1")); if (!GetMySearchControlValue("HandlingResults").IsNullOrWhiteSpace()) { myffrmHandlingResults.SelectedValue = GetMySearchControlValue("HandlingResults"); } else { myffrmHandlingResults.SelectedIndex = 1; } myffrmstate.Items.Clear(); myffrmstate.Items.Add(new ListItem("全部", "2")); myffrmstate.Items.Add(new ListItem("确认", "0")); myffrmstate.Items.Add(new ListItem("投诉", "1")); if (!GetMySearchControlValue("state").IsNullOrWhiteSpace()) { myffrmstate.SelectedValue = GetMySearchControlValue("state"); } else { myffrmstate.SelectedIndex = 2; } } z_bottom = "<li><a class=\"iconL\" href=\"House/FollowComplaintList.aspx?Type=1&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报通过</span></a></li>"; z_bottom += "<li><a class=\"iconL\" href=\"House/FollowComplaintList.aspx?Type=0&doType=upDateHouse&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要操作吗?\"><span>举报不通过</span></a></li>"; if (CheckRolePermission("删除")) { z_del = "<li><a class=\"delete\" href=\"House/FollowComplaintList.aspx?doType=del&NavTabId=" + NavTabId + "&selectPage=" + (gv.PageIndex + 1).ToString() + "&doAjax=true&FollowAuditID={FollowAuditID}\" rel=\"ids\" target=\"selectedTodo\" title=\"确定要删除吗?\"><span>删除</span></a></li>"; } if (Request.QueryString["doType"] != null) { //投诉通过状态 if (Request.QueryString["doType"].ToString() == "upDateHouse") { if (!string.IsNullOrEmpty(Request["ids"])) { string sql = string.Format("select * from h_ComplaintList where ID in({0})", Request["ids"]); List <h_ComplaintList> list_h_ComplaintList = h_ComplaintList.FindAll(sql); foreach (h_ComplaintList hfa in list_h_ComplaintList) { H_houseinfor hh = H_houseinfor.FindByHouseID(Convert.ToDecimal(hfa.HouseID)); if (Request.QueryString["Type"].ToString() == "1") { //房源跟进中增加修改状态 HouseMIS.EntityUtils.Employee ee = HouseMIS.EntityUtils.Employee.FindByEmployeeID(hfa.Slemployee); //判断房源状态是否本来状态,如果不是的话还原,并且首录入改为举报人 if (hh.StateID != hfa.HouseOldType) { //增加专管员跟进记录 h_FollowUp hsf = new h_FollowUp(); hsf.EmployeeID = hfa.Operator; hsf.HouseID = hfa.HouseID; hsf.FollowUpText = "审核状态:" + h_State.FindByStateID(decimal.Parse(hfa.HouseNewType.ToString())).Name + "→" + h_State.FindByStateID(decimal.Parse(hfa.HouseOldType.ToString())).Name; hsf.Insert(); string uphouse = "update H_houseinfor set StateID=" + hfa.HouseOldType + ",OwnerEmployeeID=" + hfa.Slemployee + ", OrgID=" + ee.OrgID + " where HouseID=" + hfa.HouseID; DbHelperSQL.ExecuteSql(uphouse); } //审核通过扣除征信分数 HouseMIS.EntityUtils.Employee ee1 = HouseMIS.EntityUtils.Employee.FindByEmployeeID(hfa.Operator); EntityUtils.EmpIntegral Empint = new EntityUtils.EmpIntegral(); Empint.EmployeeID = ee1.EmployeeID; Empint.OrgID = ee1.OrgID; Empint.Type = "其他"; Empint.Integral = int.Parse(myffrmzcfs.SelectedValue); Empint.Cause = "投诉审核通过扣除征信分"; Empint.Exe_Date = DateTime.Now; Empint.OperID = 2; Empint.Insert(); hfa.IntegralID = Empint.ID; Common.MsgPush.PushMsg("房源:" + hh.Shi_id + " 的投诉——审核通过!", new string[] { hfa.Slemployee.ToString() }, (int)Common.msgType.房源状态投诉); } else if (Request.QueryString["Type"].ToString() == "0") { Common.MsgPush.PushMsg("房源:" + hh.Shi_id + " 的投诉——审核未通过!", new string[] { hfa.Slemployee.ToString() }, (int)Common.msgType.房源状态投诉); } hfa.HandlingResults = int.Parse(Request.QueryString["Type"]); hfa.HandlingEmp = Current.EmployeeID.ToString().ToInt32(); hfa.HandlingTime = DateTime.Now; hfa.Update(); } } } else if (Request.QueryString["doType"].ToString() == "del") { if (!string.IsNullOrEmpty(Request["ids"])) { DbHelperSQL.ExecuteSql("delete from h_ComplaintList where ID in(" + Request["ids"] + ")"); } } #region 刷新当前页[抓取当页导航数字onclick事件] string JavaScript = " dwzPageBreak({ targetType: \"navTab\", rel: \"\", data: { pageNum: " + Request["selectPage"] + "} });"; JSDo_UserCallBack_Success(JavaScript, "操作成功"); #endregion } }
protected override void OnSaving(object sender, EntityFormEventArgs e) { //非委托中房源无法保存 //if (Entity.houseStateID != 2) //{ // ShowMsg(AlertType.correct, "非委托中房源无法保存!"); // return; //} if (Request.Form["rb1"] != null) { Log log1 = new Log(); log1.Action = "上传开盘录音"; log1.Category = "上传开盘录音"; log1.IP = HttpContext.Current.Request.UserHostAddress; log1.OccurTime = DateTime.Now; log1.UserID = Convert.ToInt32(Employee.Current.EmployeeID); log1.UserName = Employee.Current.Em_name; log1.Remark = string.Format("房源录音ID={0},房源ID={1},房源编号={2}", Request.Form["rb1"], Entity.houseID, H_houseinfor.FindByHouseID(Entity.houseID).Shi_id); log1.Insert(); Entity.phoneID = Request.Form["rb1"].ToInt32(); if (!Entity.employeeID.HasValue) { Entity.employeeID = (int)Current.EmployeeID; } if (!Entity.exe_Date.HasValue) { Entity.exe_Date = DateTime.Now; } } if (Request.Form["txtRemark"] != null) { //审核意见 Entity.Remark = Request.Form["txtRemark"]; //审核日期 Entity.audit_Date = DateTime.Now; //审核人 Entity.employee_auditID = Convert.ToInt32(Current.EmployeeID); //审核状态 Entity.state_ZBCheck = Request.QueryString["StateID"].ToInt32(); string FollowUpText = "总部认证:"; FollowUpText += lblState.Text; FollowUpText += "->" + Enum.GetName(typeof(CheckState), Request.QueryString["StateID"].ToInt32()); if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.合格) { H_houseinfor hh = H_houseinfor.FindByHouseID(Entity.houseID); //房源首录人和申请认证不一致,申请认证人员改为房源首录人 if (Entity.employeeID.HasValue && hh.OwnerEmployeeID != Entity.employeeID.Value) { Employee ee = Employee.FindByEmployeeID(Entity.employeeID.Value); FollowUpText += ",首录人:" + hh.OwnerEmployeeName + "->" + ee.Em_name; } } else if (Request.QueryString["StateID"].ToInt32() == (int)CheckState.虚位以待) { H_houseinfor hh = H_houseinfor.FindByHouseID(Entity.houseID); FollowUpText += ",首录人:" + hh.OwnerEmployeeName + "->无"; } h_FollowUp hf = new h_FollowUp(); hf.HouseID = Entity.houseID; hf.FollowUpText = FollowUpText; hf.EmployeeID = Current.EmployeeID; hf.Insert(); if (Request.QueryString["isefw"] == "1") { DbHelperSQL.ExecuteSql("insert into api_Addhouse(erp_userid, w_userid, houseid, type) values('" + Employee.Current.EmployeeID + "', '', '" + Entity.houseID + "', 'efw')"); } } base.OnSaving(sender, e); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //if (CHardInfo != null) // H_houseinfor.Meta.Query("insert into ERP_Log([Value],[Key],EmployeeID,IP,DianNao,Pages) values(" + House.HouseID + ",'HouseTelList'," + Employee.Current.EmployeeID + ",'" + TFrameWork.Web.WebHelper.UserHost + "','" + CHardInfo.Macs + "','HouseTelForm')"); //else // H_houseinfor.Meta.Query("insert into ERP_Log([Value],[Key],EmployeeID,IP,Pages) values(" + House.HouseID + ",'HouseTelList'," + Employee.Current.EmployeeID + ",'" + TFrameWork.Web.WebHelper.UserHost + "','HouseTelForm')"); this.HTFpagerForm.ID += House.HouseID; #region 1.显示 [查看电话] 按钮 if (!IsShowTel) //如果不显示电话 { //判断调电权限 if (H_houseinfor.NeedTelPower(Convert.ToDecimal(Request["HouseID"]), Convert.ToInt32(Employee.Current.EmployeeID))) { LokTelButa.Visible = IsCanShowTel; } if (LokTelButa.Visible == true) { LokTelButa.Attributes.Add("onclick", "return LookTelClick('" + House.HouseID + "')"); } } else { //当日查看电话次数 int seeTelNum = Convert.ToInt32(EntityUtils.DBUtility.DbHelperSQL.GetSingle(string.Format(@"SELECT Count(1) FROM h_seetellog WHERE employeeid = {0} AND exe_date >= '{1}' AND exe_date <= '{1} 23:59:59' AND shebei = 1 ", Current.EmployeeID, DateTime.Now.ToString("yyyy-MM-dd")))); //角色最大查看电话次数 int seeTelNumMax = Current.Roles.Select(x => x.Telnumber.Value).Max(); if (seeTelNum > seeTelNumMax) { AlertMsg_Warn("已超过当日次数,无法查看,查看次数:" + seeTelNum + "/" + seeTelNumMax); IsShowTel = false; } else { LokTelButa.Visible = false; #region 插入调电记录 h_SeeTelLog hs = new h_SeeTelLog(); hs.EmployeeID = Employee.Current.EmployeeID; hs.HouseID = Convert.ToDecimal(HouseID.Value); hs.IsPower = H_houseinfor.NeedTelPower(House.HouseID, Employee.Current.EmployeeID.ToString().ToInt32()); hs.Insert(); #endregion 插入调电记录 AlertMsg_Success("查看次数:" + seeTelNum + "/" + seeTelNumMax); } //显示室号 room.Value = House.Build_room; } cbTel.DataSource = i_InternetTel.FindAll(new string[] { "EmployeeID", "IsDel" }, new string[] { Employee.Current.EmployeeID.ToString(), "0" }); cbTel.DataTextField = "MyTel"; cbTel.DataValueField = "MyTel"; cbTel.DataBind(); #endregion 1.显示 [查看电话] 按钮 } if (Request.Form["LSH"] != null && Request.Form["LSH"] != "") { #region 编辑电话 h_HouseTelList hh = h_HouseTelList.Find("LSH", Request.Form["LSH"]); hh.EmployeeID = Employee.Current.EmployeeID; if (Request.Form["HouseID"] != "0") { hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]); } else { hh.HouseID = 0; hh.GU_ID = Request.Form["GU_ID"].ToString(); } hh.landlord_name = Request.Form["frmName"].ToString(); hh.Tel1 = H_houseinfor.TelDispose(Request.Form["Tel"]); string oldTel = hh.Tel2; hh.Tel2 = Request.Form["Tel"].TelEncrypt(); hh.TelType = Request.Form["TelType"].ToString(); hh.Update(); #region 插入跟进 h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = hh.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "电话修改"; hfo.Insert(); #endregion 插入跟进 #region 电话修改记录 TelChange tc = new TelChange(); tc.AddEmployeeID = Employee.Current.EmployeeID; tc.HouseID = hh.HouseID; tc.NewTel = Request.Form["Tel"]; tc.OldTel = oldTel.TelDecrypt((Int32)hh.HouseID, 0); tc.Insert(); LSH.Value = ""; #endregion 电话修改记录 #endregion 编辑电话 } else if (Request.Form["frmName"] != null && Request.Form["frmName"] != "") { #region 添加电话 h_HouseTelList hh = new h_HouseTelList(); hh.EmployeeID = Employee.Current.EmployeeID; if (Request.Form["HouseID"] != "0") { hh.HouseID = Convert.ToDecimal(Request.Form["HouseID"]); } else { hh.HouseID = 0; hh.GU_ID = Request.Form["GU_ID"].ToString(); } hh.landlord_name = Request.Form["frmName"].ToString(); hh.Tel1 = H_houseinfor.TelDispose(Request.Form["Tel"]); hh.Tel2 = Request.Form["Tel"].TelEncrypt(); hh.TelType = Request.Form["TelType"].ToString(); hh.Insert(); if (hh.HouseID > 0) { h_FollowUp hfo = new h_FollowUp(); hfo.HouseID = hh.HouseID; hfo.EmployeeID = Employee.Current.EmployeeID; hfo.FollowUpText = "添加新电话,编号:" + hh.LSH; hfo.Insert(); } #endregion 添加电话 Response.Write("<script>alertMsg.correct(\"操作成功请点调电拨打电话!\");</script>"); } if (!CheckRolePermission("不隐号")) { if (!CheckRolePermission("添加电话", Convert.ToDecimal(House.OwnerEmployeeID))) { hTelAdd.Visible = false; } } else { if (CheckRolePermission("不隐号")) { h_SeeTelLog hs = new h_SeeTelLog(); hs.EmployeeID = Employee.Current.EmployeeID; hs.HouseID = Convert.ToDecimal(HouseID.Value); hs.IsPower = false; hs.Insert(); } //OldTel = "原始号码:" + House.Landlord_tel2.TelDecrypt((Int32)hs.HouseID, TelDecPoint.PC_HouseForm_TelPhone) + "</span>"; } }