Нет описания

CallInScreenController.cs 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. using CallCenter.Utility;
  2. using CallCenterApi.Common;
  3. using CallCenterApi.Interface.Controllers.Base;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Data;
  7. using System.Linq;
  8. using System.Web;
  9. using System.Web.Mvc;
  10. namespace CallCenterApi.Interface.Controllers.tel
  11. {
  12. public class CallInScreenController : BaseController
  13. {
  14. /// <summary>
  15. /// 添加黑名单
  16. /// </summary>
  17. /// <returns></returns>
  18. public ActionResult AddBlack()
  19. {
  20. ActionResult res = NoToken("未知错误,请重新登录");
  21. if (Request.IsAuthenticated)
  22. {
  23. int userId = CurrentUser.UserData.F_UserId;
  24. if (userId != 0)
  25. {
  26. Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
  27. if (ua != null)
  28. {
  29. string tel = HttpUtility.UrlDecode(RequestString.GetFormString("tel"));
  30. string callid = HttpUtility.UrlDecode(RequestString.GetFormString("callid"));
  31. int n = RequestString.GetInt("num", 0);
  32. int type = RequestString.GetInt("type", 0);
  33. Model.T_Call_Blacklist dModel = new BLL.T_Call_Blacklist().GetModelList(" F_TelPhone='" + tel + "' ").FirstOrDefault();
  34. var date = DateTime.Now;
  35. var enddate = date;
  36. switch (type)
  37. {
  38. case 1: enddate = enddate.AddDays(n); break;
  39. case 2: enddate = enddate.AddHours(n); break;
  40. case 3: enddate = enddate.AddMinutes(n); break;
  41. case 4: enddate = DateTime.MaxValue; break;
  42. }
  43. if (dModel == null)
  44. {
  45. dModel = new Model.T_Call_Blacklist();
  46. dModel.F_CallId = callid;
  47. dModel.F_TelPhone = tel.Trim();
  48. dModel.F_SetTime = date;
  49. dModel.F_RemoveTime = enddate;
  50. dModel.F_InterceptNum = 1;
  51. dModel.F_UserId = ua.F_UserId;
  52. int b = new BLL.T_Call_Blacklist().Add(dModel);
  53. if (b > 0)
  54. {
  55. res = Success("添加成功", enddate.ToString("yyyy-MM-dd HH:mm:ss"));
  56. }
  57. else
  58. {
  59. res = Error("添加失败");
  60. }
  61. }
  62. else
  63. {
  64. dModel.F_RemoveTime = enddate;
  65. if (new BLL.T_Call_Blacklist().Update(dModel))
  66. {
  67. res = Success("修改成功", enddate.ToString("yyyy-MM-dd HH:mm:ss"));
  68. }
  69. else
  70. {
  71. res = Error("修改失败");
  72. }
  73. }
  74. }
  75. }
  76. }
  77. return res;
  78. }
  79. /// <summary>
  80. /// 取消黑名单
  81. /// </summary>
  82. /// <returns></returns>
  83. public ActionResult DelBlack()
  84. {
  85. ActionResult res = NoToken("未知错误,请重新登录");
  86. if (Request.IsAuthenticated)
  87. {
  88. string tel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
  89. Model.T_Call_Blacklist dModel = new BLL.T_Call_Blacklist().GetModelList(" F_TelPhone='" + tel + "' ").FirstOrDefault();
  90. if (dModel != null)
  91. {
  92. bool bl = new BLL.T_Call_Blacklist().Delete(dModel.F_BlackId);
  93. if (bl)
  94. {
  95. res = Success("取消成功");
  96. }
  97. }
  98. }
  99. return res;
  100. }
  101. /// <summary>
  102. /// 根据来电号码获取客户信息
  103. /// </summary>
  104. /// <returns></returns>
  105. public ActionResult GetCustomerByTel()
  106. {
  107. ActionResult res = NoToken("未知错误,请重新登录");
  108. if (Request.IsAuthenticated)
  109. {
  110. DataTable dt = new DataTable();
  111. string tel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
  112. BLL.T_Cus_CustomerBase bll = new BLL.T_Cus_CustomerBase();
  113. dt = bll.GetList(" F_Telephone like '%" + tel + "%' or F_Mobile like '%" + tel + "%' ").Tables[0];
  114. res = Success("客户信息加载成功", dt);
  115. }
  116. return res;
  117. }
  118. /// <summary>
  119. /// 根据来电号码获取最近的callid
  120. /// </summary>
  121. /// <returns></returns>
  122. public ActionResult GetCallIdByPhone()
  123. {
  124. ActionResult res = NoToken("未知错误,请重新登录");
  125. if (Request.IsAuthenticated)
  126. {
  127. DataTable dt = new DataTable();
  128. string tel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
  129. Model.T_Call_CallRecords model = new BLL.T_Call_CallRecords().GetModelByTelphone(tel);
  130. res = Success("加载成功", model);
  131. }
  132. return res;
  133. }
  134. /// <summary>
  135. /// 根据callid获取最近的通话记录
  136. /// </summary>
  137. /// <returns></returns>
  138. public ActionResult GetTelRecordByCallid()
  139. {
  140. ActionResult res = NoToken("未知错误,请重新登录");
  141. if (Request.IsAuthenticated)
  142. {
  143. DataTable dt = new DataTable();
  144. string callid = HttpUtility.UrlDecode(RequestString.GetQueryString("callid"));
  145. Model.T_Call_CallRecords model = new BLL.T_Call_CallRecords().GetModelByCallId(callid);
  146. res = Success("通话记录加载成功", model);
  147. }
  148. return res;
  149. }
  150. /// <summary>
  151. /// 来电归属地查询
  152. /// </summary>
  153. /// <returns></returns>
  154. public ActionResult GetPhoneLocation()
  155. {
  156. ActionResult res = NoToken("未知错误,请重新登录");
  157. if (Request.IsAuthenticated)
  158. {
  159. string location = "未知";
  160. string tel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
  161. if (tel.Trim().Length == 11 && tel.Substring(0, 1) != "0")
  162. {
  163. BLL.T_Sys_MobileData mobile_Bll = new BLL.T_Sys_MobileData();
  164. Model.T_Sys_MobileData mobileModel = mobile_Bll.GetModelList(" F_MobileNum='" + tel.Substring(0, 7) + "' ").FirstOrDefault();
  165. if (mobileModel != null)
  166. {
  167. location = mobileModel.F_CityDes + mobileModel.F_CardDes;
  168. }
  169. }
  170. else
  171. {
  172. BLL.T_Sys_TelTitleData numbBll = new BLL.T_Sys_TelTitleData();
  173. List<Model.T_Sys_TelTitleData> mobileModel = numbBll.GetModelList(" 1=1 and F_KeyPhoneNum='" + tel.Substring(0, 4) + "'");
  174. if (mobileModel == null || mobileModel.Count <= 0)
  175. {
  176. mobileModel = numbBll.GetModelList(" 1=1 and F_KeyPhoneNum='" + tel.Substring(0, 3) + "'");
  177. }
  178. if (mobileModel.Count > 0)
  179. {
  180. location = mobileModel[0].F_TitleName;
  181. }
  182. }
  183. res = Success("归属地加载成功", location);
  184. }
  185. return res;
  186. }
  187. /// <summary>
  188. /// 历史记录列表
  189. /// </summary>
  190. /// <returns></returns>
  191. public ActionResult GetOldList()
  192. {
  193. ActionResult res = NoToken("未知错误,请重新登录");
  194. if (Request.IsAuthenticated)
  195. {
  196. string sql = "";
  197. string sqlcount = "";
  198. DataTable dt = new DataTable();
  199. string strtel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
  200. string strcalltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
  201. string strstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
  202. string strendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
  203. string strpageindex = RequestString.GetQueryString("page");
  204. int pageindex = 1;
  205. string strpagesize = RequestString.GetQueryString("pagesize");
  206. int pagesize = 10;
  207. if (strcalltype.Trim() != "" && strcalltype != "undefined")
  208. {
  209. sql += " and CallType=" + strcalltype + " ";
  210. }
  211. if (strtel.Trim() != "" && strtel != "undefined")
  212. {
  213. sql += " and CallNumber= '" + strtel.Trim() + "' ";
  214. sqlcount += " and CallNumber= '" + strtel.Trim() + "' ";
  215. }
  216. //else
  217. //{
  218. // sql += " and 1=0 ";
  219. //}
  220. if (strstarttime.Trim() != "" && strstarttime != "undefined")
  221. {
  222. sql += " and datediff(day,BeginTime,'" + strstarttime + "')<=0 ";
  223. sqlcount += " and datediff(day,BeginTime,'" + strstarttime + "')<=0 ";
  224. }
  225. if (strendtime.Trim() != "" && strendtime != "undefined")
  226. {
  227. sql += " and datediff(day,BeginTime,'" + strendtime + "')>=0 ";
  228. sqlcount += " and datediff(day,BeginTime,'" + strendtime + "')>=0 ";
  229. }
  230. if (strpageindex.Trim() != "")
  231. {
  232. pageindex = Convert.ToInt32(strpageindex);
  233. }
  234. if (strpagesize.Trim() != "")
  235. {
  236. pagesize = Convert.ToInt32(strpagesize);
  237. }
  238. int recordCount = 0;
  239. dt = BLL.PagerBLL.GetListPager(
  240. "T_Call_CallRecords",
  241. "CallRecordsId",
  242. "*",
  243. sql,
  244. "ORDER BY CallRecordsId desc",
  245. pagesize,
  246. pageindex,
  247. true,
  248. out recordCount);
  249. var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
  250. foreach (DataRow dr in dt.Rows)
  251. {
  252. string path = dr["FilePath"] != null ? dr["FilePath"].ToString() : "";
  253. if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
  254. {
  255. var ym = config.F_ParamValue;
  256. if (ym.Substring(ym.Length - 1) == "/")
  257. {
  258. ym = ym.Substring(0, ym.Length - 1);
  259. }
  260. dr["FilePath"] = ym + path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
  261. }
  262. }
  263. int hrcount = new BLL.T_Call_CallRecords().GetRecordCount(" calltype=0 " + sqlcount);
  264. int hccount = new BLL.T_Call_CallRecords().GetRecordCount(" calltype=1 " + sqlcount);
  265. var obj = new
  266. {
  267. state = "success",
  268. message = "成功",
  269. rows = dt,
  270. total = recordCount,
  271. hrcount = hrcount,
  272. hccount = hccount,
  273. };
  274. res = Content(obj.ToJson());
  275. }
  276. return res;
  277. }
  278. /// <summary>
  279. /// 获取最新知识库
  280. /// </summary>
  281. /// <returns></returns>
  282. public ActionResult GetZSKList()
  283. {
  284. ActionResult res = NoToken("未知错误,请重新登录");
  285. if (Request.IsAuthenticated)
  286. {
  287. DataTable dt = new DataTable();
  288. string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));
  289. string keywords = HttpUtility.UrlDecode(RequestString.GetQueryString("keywords"));
  290. string sql = " F_DeleteFlag=0";
  291. if (pid.Trim() != "")
  292. {
  293. sql += " and F_CategoryId=" + pid.Trim();
  294. }
  295. if (keywords.Trim() != "")
  296. {
  297. sql += " and (F_Content like '%" + keywords.Trim() + "%' or F_Title like '%"
  298. + keywords.Trim() + "%' or F_KeyWords like '%" + keywords.Trim() + "%')";
  299. }
  300. dt = new BLL.T_RepositoryInformation().GetList(8, sql, " F_RepositoryId desc").Tables[0];
  301. res = Success("加载成功", dt);
  302. }
  303. return res;
  304. }
  305. /// <summary>
  306. /// 振铃事件
  307. /// </summary>
  308. /// <returns></returns>
  309. public ActionResult UpdateZL()
  310. {
  311. ActionResult res = NoToken("未知错误,请重新登录");
  312. if (Request.IsAuthenticated)
  313. {
  314. int userId = CurrentUser.UserData.F_UserId;
  315. if (userId != 0)
  316. {
  317. Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
  318. if (ua != null)
  319. {
  320. Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
  321. model.CallId = RequestString.GetFormString("callid");
  322. model.UserId = ua.F_UserId;
  323. model.UserCode = ua.F_UserCode;
  324. model.UserName = ua.F_UserName;
  325. //model.ExtNumber = ua.F_WorkNumber;
  326. model.ExtNumber = CurrentUser.UserData.F_ExtensionNumber;
  327. model.DealType = 5;
  328. bool bl = new BLL.T_Call_CallRecords().UpdateCallInRingTelRecord(model);
  329. if (bl)
  330. {
  331. res = Success("更新振铃状态成功");
  332. }
  333. else
  334. {
  335. res = Error("更新振铃状态失败");
  336. }
  337. }
  338. }
  339. }
  340. return res;
  341. }
  342. /// <summary>
  343. /// 摘机事件
  344. /// </summary>
  345. /// <returns></returns>
  346. public ActionResult UpdateZJ()
  347. {
  348. ActionResult res = NoToken("未知错误,请重新登录");
  349. if (Request.IsAuthenticated)
  350. {
  351. Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
  352. model.CallId = RequestString.GetFormString("callid");
  353. model.CallState = 1;
  354. model.DealType = 6;
  355. bool bl = new BLL.T_Call_CallRecords().UpdateCallInAnswerTelRecord(model);
  356. if (bl)
  357. {
  358. Model.T_Call_CallRecords vmodel = new BLL.T_Call_CallRecords().GetModelByCallId(model.CallId);
  359. string type = vmodel.OperateType.ToString();
  360. if (type == "7")
  361. {
  362. new BLL.T_Call_TaskTelNum().UpdateYJ(Convert.ToInt32(vmodel.OperateObject.ToString()), 1);
  363. }
  364. res = Success("更新摘机状态成功");
  365. }
  366. else
  367. {
  368. res = Error("更新摘机状态失败");
  369. }
  370. }
  371. return res;
  372. }
  373. /// <summary>
  374. /// 挂机事件
  375. /// </summary>
  376. /// <returns></returns>
  377. public ActionResult UpdateGJ()
  378. {
  379. ActionResult res = NoToken("未知错误,请重新登录");
  380. if (Request.IsAuthenticated)
  381. {
  382. string strid = RequestString.GetFormString("callid");
  383. bool bl = new BLL.T_Call_CallRecords().UpdateCallInHookTelRecord(strid);
  384. if (bl)
  385. {
  386. res = Success("更新挂机状态成功");
  387. }
  388. else
  389. {
  390. res = Success("更新挂机状态失败");
  391. }
  392. }
  393. return res;
  394. }
  395. /// <summary>
  396. /// 录音事件
  397. /// </summary>
  398. /// <returns></returns>
  399. public ActionResult UpdateLY()
  400. {
  401. ActionResult res = NoToken("未知错误,请重新登录");
  402. if (Request.IsAuthenticated)
  403. {
  404. Model.T_Call_CallRecords model = new Model.T_Call_CallRecords();
  405. model.CallId = RequestString.GetFormString("callid");
  406. model.CallState = 1;
  407. model.DealType = 6;
  408. model.FilePath = RequestString.GetFormString("path");
  409. bool bl = new BLL.T_Call_CallRecords().UpdateCallInPathTelRecord(model);
  410. if (bl)
  411. {
  412. Model.T_Call_CallRecords vmodel = new BLL.T_Call_CallRecords().GetModelByCallId(model.CallId);
  413. string type = vmodel.OperateType.ToString();
  414. if (type == "7")
  415. {
  416. new BLL.T_Call_TaskTelNum().UpdateYJ(Convert.ToInt32(vmodel.OperateObject.ToString()), 1);
  417. }
  418. res = Success("更新挂机状态成功");
  419. }
  420. else
  421. {
  422. res = Success("更新挂机状态失败");
  423. }
  424. }
  425. return res;
  426. }
  427. /// <summary>
  428. /// 创建工单
  429. /// </summary>
  430. /// <returns></returns>
  431. public ActionResult AddWorkOrder()
  432. {
  433. ActionResult res = NoToken("未知错误,请重新登录");
  434. if (Request.IsAuthenticated)
  435. {
  436. int userId = CurrentUser.UserData.F_UserId;
  437. if (userId != 0)
  438. {
  439. Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
  440. if (ua != null)
  441. {
  442. //姓名
  443. string callCustomer = RequestString.GetFormString("callCustomer");
  444. //电话
  445. string tel = RequestString.GetFormString("tel");
  446. //来电单位
  447. string lddep = RequestString.GetFormString("lddep");
  448. //反馈单位
  449. string fkdep = RequestString.GetFormString("fkdep");
  450. //工单来源
  451. int gdly = RequestString.GetInt("gdlx", 0);
  452. //工单类型
  453. int gdlx = RequestString.GetInt("gdlx", 0);
  454. //工单状态
  455. int gdzt = RequestString.GetInt("gdzt", 0);
  456. //反馈内容
  457. string fkcont = RequestString.GetFormString("fkcont");
  458. //快递信息
  459. string sendmsg = RequestString.GetFormString("sendmsg");
  460. //备注1
  461. string note1 = RequestString.GetFormString("note1");
  462. //备注2
  463. string note2 = RequestString.GetFormString("note2");
  464. //备注3
  465. string note3 = RequestString.GetFormString("note3");
  466. //callID
  467. string callid = HttpUtility.UrlDecode(RequestString.GetFormString("callid"));
  468. Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
  469. model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmssms");//工单编号
  470. model.Customer = callCustomer;
  471. model.CustomerTel = tel;
  472. //工单来源
  473. model.Type = gdly;
  474. //工单类型
  475. model.TypeClass = gdlx;
  476. //反馈内容
  477. model.Detail = fkcont;
  478. //快递信息
  479. model.Files = sendmsg;
  480. //备注一
  481. model.County = note1;
  482. //备注二
  483. model.Province = note2;
  484. //备注三
  485. model.City = note3;
  486. //默认为待指派
  487. model.State = 0;
  488. model.IsDel = 0;
  489. model.IsReturn = 0;
  490. model.IsReturnBak = 0;
  491. model.ResponDept = 0;
  492. model.Answer = "";
  493. model.IsTimeOut = 0;
  494. model.IsUserSend = 0;
  495. model.IsAdminSend = 0;
  496. Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(gdlx);
  497. if (to != null)
  498. {
  499. model.LimitTime = to.MainTime;
  500. }
  501. model.CreateUser = ua.F_UserCode;
  502. model.CreateTime = DateTime.Now;
  503. //if (clbm != 0 || clid != 0)
  504. //{
  505. // Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
  506. // item.WorkOrderID = model.WorkOrderID;
  507. // item.ToDept = clbm;
  508. // item.Type = 1;
  509. // if (clid != 0)
  510. // {
  511. // Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
  512. // if (clus != null)
  513. // {
  514. // item.ToUser = clus.F_UserCode;
  515. // }
  516. // }
  517. // else
  518. // {
  519. // string users = string.Empty;
  520. // var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
  521. // foreach (var l in list)
  522. // {
  523. // if (string.IsNullOrEmpty(users))
  524. // {
  525. // users = l.F_UserCode;
  526. // }
  527. // else
  528. // {
  529. // users = users + "," + l.F_UserCode;
  530. // }
  531. // }
  532. // item.ToUser = users;
  533. // }
  534. // if (to != null)
  535. // {
  536. // item.LimitTime = to.ItemTime;
  537. // }
  538. // item.Detail = answer;
  539. // item.IsLast = 0;
  540. // item.State = 0;
  541. // item.IsStart = 0;
  542. // item.IsTimeOut = 0;
  543. // item.IsDel = 0;
  544. // item.CreateUser = ua.F_UserCode;
  545. // item.CreateTime = DateTime.Now;
  546. // long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
  547. // if (itemid > 0)
  548. // {
  549. // model.State = 1;//已指派
  550. // model.AppointTime = DateTime.Now;
  551. // #region 消息表
  552. // foreach (string ur in item.ToUser.Split(','))
  553. // {
  554. // Model.T_Msg_List msg = new Model.T_Msg_List();
  555. // msg.Type = 1;
  556. // msg.ToUser = ur;
  557. // msg.ToID = Int32.Parse(itemid.ToString());
  558. // msg.Detail = ua.F_UserName + "给你指派了工单,单号:" + model.WorkOrderID;
  559. // msg.State = 0;
  560. // msg.IsDel = 0;
  561. // msg.CreateUser = ua.F_UserCode;
  562. // msg.CreateDate = DateTime.Now;
  563. // new BLL.T_Msg_List().Add(msg);
  564. // }
  565. // #endregion
  566. // }
  567. //}
  568. if (new BLL.T_Wo_WorkOrder().Add(model) > 0)
  569. {
  570. if (!string.IsNullOrEmpty(callid))
  571. {
  572. var rec = new BLL.T_Call_CallRecords().GetModelByCallId(callid);
  573. if (rec != null)
  574. {
  575. rec.IsExitWorkOrder = true;
  576. new BLL.T_Call_CallRecords().Update(rec);
  577. }
  578. }
  579. res = Success("新增成功!");
  580. }
  581. else
  582. {
  583. res = Error("新增失败!");
  584. }
  585. #region no use
  586. //Model.T_Wo_WorkOrderBase model = new Model.T_Wo_WorkOrderBase();
  587. //model.F_CODE = DateTime.Now.ToString("yyyyMMddHHmmssms");//工单编号
  588. //model.F_WORKORDERTYPEID = type;
  589. //model.F_WORKORDERSTATEID = 0;
  590. //model.F_WORKORDERNAME = "";
  591. //model.F_WORKORDERFROM = "";
  592. //model.F_WORKORDERLEVELID = 0;
  593. //model.F_ADSLACCOUNT = callid;
  594. ////model.F_USERID = ua.F_UserId;
  595. ////model.F_USERNAME = ua.F_UserName;
  596. ////model.F_USERPHONE = ua.F_WorkNumber;
  597. //model.F_TypeName = "";
  598. //model.F_STARTTIME = DateTime.Now;
  599. //model.F_RETURNVISITFLAG = 0;
  600. //model.F_LINKMANTELEPHONE = tsdh;
  601. //model.F_LINKMAN = tskh;
  602. //model.F_DELETEFLAG = 0;
  603. //model.F_CUSTOMERTELEPHONE = tsdh;
  604. //model.F_CUSTOMERNAME = tskh;
  605. //model.F_CUSTOMERID = 0;//待实现
  606. //model.F_CREATEDATE = DateTime.Now;
  607. //model.F_CREATEBY = ua.F_UserId;
  608. //model.F_CONTENT = cont;
  609. //model.F_REPAIRMANNAME = tskh;
  610. //model.F_REPAIRMANPHONE = tsdh;
  611. //if (new BLL.T_Wo_WorkOrderBase().Add(model) > 0)
  612. //{
  613. // res = Success("新增成功!");
  614. //}
  615. //else
  616. //{
  617. // res = Error("新增失败!");
  618. //}
  619. #endregion
  620. }
  621. }
  622. }
  623. return res;
  624. }
  625. }
  626. }