地铁二期项目正式开始

OtherPageController.cs 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using System.Web.UI;
  10. using YTSoft.BaseCallCenter.MVCWeb.Commons;
  11. namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
  12. {
  13. public class OtherPageController : BaseController
  14. {
  15. //
  16. // GET: /OtherPage/
  17. /// <summary>
  18. /// 微信页面
  19. /// </summary>
  20. /// <returns></returns>
  21. //public ActionResult WebChart(int pageType)
  22. //{
  23. // if (pageType == 1)
  24. // {
  25. // return Redirect("http://zzmetro-kf.sujie-china.com/customer/" + F_PId);
  26. // }
  27. // else
  28. // {
  29. // return Redirect("http://zzmetro-kf.sujie-china.com/customer_weibo/" + F_PId);
  30. // }
  31. //}
  32. /// <summary>
  33. /// 获取未读聊天消息个数
  34. /// </summary>
  35. /// <returns></returns>
  36. //public int GetWebChartCount(int pageType)
  37. // {
  38. // int messageCount = 0;
  39. // #region 调用接口插入用户信息
  40. // try
  41. // {
  42. // StringBuilder returnStr = new StringBuilder();
  43. // string wxAddUrl = "";
  44. // if (pageType == 1)
  45. // {
  46. // wxAddUrl = "http://zzmetro-kf.sujie-china.com/api/customer/unread/" + F_PId;
  47. // }
  48. // else
  49. // {
  50. // wxAddUrl = "http://zzmetro-kf.sujie-china.com/api/customer_weibo/unread/" + F_PId;
  51. // }
  52. // //if (pageType == 1)
  53. // //{
  54. // // wxAddUrl = "http://rexian.zzmetro.com/api/customer/unread/" + F_PId;
  55. // // //"http://zzmetro-kf.sujie-china.com/customer_weibo/" + F_PId
  56. // // //"http://rexian.zzmetro.com/
  57. // //}
  58. // //else
  59. // //{
  60. // // wxAddUrl = "http://rexian.zzmetro.com/api/customer_weibo/unread/" + F_PId;
  61. // //}
  62. // string addWxResult = HttpHelper.HttpGet(wxAddUrl);
  63. // ResponseResult ResultModel = JsonConvert.DeserializeObject<ResponseResult>(addWxResult);
  64. // messageCount = ResultModel.data;
  65. // }
  66. // catch (Exception ex)
  67. // {
  68. // }
  69. // #endregion
  70. // return messageCount;
  71. // }
  72. public ActionResult WebChart(int pageType)
  73. {
  74. if (pageType == 1)
  75. return (ActionResult)this.Redirect("http://rexian.zzmetro.com/customer/" + (object)this.F_PId);
  76. return (ActionResult)this.Redirect("http://rexian.zzmetro.com/customer_weibo/" + (object)this.F_PId);
  77. }
  78. public int GetWebChartCount(int pageType)
  79. {
  80. int num = 0;
  81. try
  82. {
  83. StringBuilder stringBuilder = new StringBuilder();
  84. num = JsonConvert.DeserializeObject<ResponseResult>(HttpHelper.HttpGet(pageType != 1 ? "http://rexian.zzmetro.com/api/customer_weibo/unread/" + (object)this.F_PId : "http://rexian.zzmetro.com/api/customer/unread/" + (object)this.F_PId)).data;
  85. }
  86. catch (Exception ex)
  87. {
  88. }
  89. return num;
  90. }
  91. /// <summary>
  92. ///获取待办工单
  93. /// </summary>
  94. /// <returns></returns>
  95. public int GetMyOrderCount()
  96. {
  97. //待办工单and F_WORKORDERTYPEID=1 and F_WORKORDERSTATEID=1 and F_WORKORDERID in (select F_INSTANCEID from T_Wo_WorkOrderHistory where F_WORKORDERSTATEID=0 and F_OPTUSERID={0})
  98. //string sql = " and F_WORKORDERTYPEID=1 and F_WORKORDERSTATEID=1 and F_CREATEBY=" + F_UserID;
  99. string sql = string.Format(" and F_WORKORDERTYPEID=1 and F_WORKORDERSTATEID=1 and F_WORKORDERID in (select F_INSTANCEID from T_Wo_WorkOrderHistory where F_WORKORDERSTATEID=0 and F_OPTUSERID={0})", F_UserID);
  100. DataTable dt = new DataTable();
  101. int recordCount = 0;
  102. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  103. dt = BLL.PagerBLL.GetListPager(
  104. "T_Wo_WorkOrderBase",
  105. "F_WORKORDERID",
  106. "*",
  107. sql,
  108. "ORDER BY F_CREATEDATE desc",
  109. 10,
  110. 1,
  111. true,
  112. out recordCount);
  113. return recordCount;
  114. }
  115. /// <summary>
  116. ///获取微博工单
  117. /// </summary>
  118. /// <returns></returns>
  119. public int GetMyOrderCountWb()
  120. {
  121. //微博工单
  122. string sql = " and F_WORKORDERSTATEID=0 and F_REPAIRMANID=4 and F_USERID=" + F_UserID;
  123. DataTable dt = new DataTable();
  124. int recordCount = 0;
  125. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  126. dt = BLL.PagerBLL.GetListPager(
  127. "T_Wo_WorkOrderBase",
  128. "F_WORKORDERID",
  129. "*",
  130. sql,
  131. "ORDER BY F_CREATEDATE desc",
  132. 10,
  133. 1,
  134. true,
  135. out recordCount);
  136. return recordCount;
  137. }
  138. /// <summary>
  139. ///获取补录工单
  140. /// </summary>
  141. /// <returns></returns>
  142. public int GetMyOrderNeedCount()
  143. {
  144. //工单类型:转单 工单状态:处理中 处理人员:当前用户id
  145. string sql = " and F_WORKORDERSTATEID=0 and F_USERID=" + F_UserID;
  146. DataTable dt = new DataTable();
  147. int recordCount = 0;
  148. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  149. dt = BLL.PagerBLL.GetListPager(
  150. "T_Wo_WorkOrderBase",
  151. "F_WORKORDERID",
  152. "*",
  153. sql,
  154. "ORDER BY F_CREATEDATE desc",
  155. 10,
  156. 1,
  157. true,
  158. out recordCount);
  159. return recordCount;
  160. }
  161. }
  162. }