地铁二期项目正式开始

SystemManageController.cs 44KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
  1. using Newtonsoft.Json;
  2. using Newtonsoft.Json.Linq;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Web;
  10. using System.Web.Mvc;
  11. using YTSoft.BaseCallCenter.Model;
  12. using YTSoft.BaseCallCenter.MVCWeb.Commons;
  13. using YTSoft.BaseCallCenter.MVCWeb.Models;
  14. namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
  15. {
  16. public class SystemManageController : BaseController
  17. {
  18. #region 部门管理
  19. BLL.T_Sys_Department deptBLL = new BLL.T_Sys_Department();
  20. /// <summary>
  21. /// 部门列表
  22. /// </summary>
  23. /// <returns></returns>
  24. public ActionResult DepartmentList()
  25. {
  26. WorkOrderMyModel model = new WorkOrderMyModel();
  27. return View(model);
  28. }
  29. ///通过部门父级节点获取数据
  30. /// </summary>
  31. /// <param name="fid"></param>
  32. /// <returns></returns>
  33. public string GetDepartmentJsonModel(int parentId)
  34. {
  35. return Newtonsoft.Json.JsonConvert.SerializeObject(deptBLL.GetDepartmentJsonModel(parentId));
  36. }
  37. /// <summary>
  38. /// 部门编辑
  39. /// </summary>
  40. /// <param name="editType">类型1、新增 2、修改</param>
  41. /// /// <returns></returns>
  42. public ActionResult DepartmentEdit(int deptId, int editType)
  43. {
  44. Model.T_Sys_Department viewModel = new Model.T_Sys_Department();
  45. //当前对象实体
  46. if (editType == 1)
  47. {
  48. viewModel.F_ParentId = deptId;
  49. viewModel.F_Sort = 1;
  50. }
  51. else
  52. {
  53. Model.T_Sys_Department deptModel = deptBLL.GetModel(deptId);
  54. viewModel = deptModel;
  55. }
  56. return View(viewModel);
  57. }
  58. /// <summary>
  59. /// 保存编辑
  60. /// </summary>
  61. /// <param name="workOrderBaseModel"></param>
  62. /// <returns></returns>
  63. [AcceptVerbs(HttpVerbs.Post)]
  64. public bool SaveDeptData(T_Sys_Department deptModel)
  65. {
  66. if (deptModel.F_DeptId > 0)
  67. {
  68. return deptBLL.Update(deptModel);
  69. }
  70. else
  71. {
  72. return deptBLL.Add(deptModel) > 0;
  73. }
  74. }
  75. /// <summary>
  76. /// 删除部门
  77. /// </summary>
  78. /// <param name="workOrderBaseModel"></param>
  79. /// <returns></returns>
  80. [AcceptVerbs(HttpVerbs.Get)]
  81. public bool DeleteDeptData(int deptId)
  82. {
  83. return deptBLL.Delete(deptId);
  84. }
  85. /// <summary>
  86. /// 获取部门数据
  87. /// </summary>
  88. /// <param name="page">当前页码</param>
  89. /// <param name="limit">每页数据量</param>
  90. /// <returns></returns>
  91. [ActionName("DeptDate")]
  92. [HttpGet]
  93. public string DeptDate(DateTime? NowDateTime, int page, int limit, int? parentId)
  94. {
  95. //数据结果集
  96. ResponseData dataModel = new ResponseData();
  97. string sql = "";
  98. if (parentId != null)
  99. {
  100. sql += " and F_ParentId=" + parentId;
  101. }
  102. DataTable dt = new DataTable();
  103. int recordCount = 0;
  104. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  105. dt = BLL.PagerBLL.GetListPager(
  106. "T_Sys_Department",
  107. "F_DeptId",
  108. "*",
  109. sql,
  110. "ORDER BY F_Sort asc ",
  111. limit,
  112. page,
  113. true,
  114. out recordCount);
  115. dataModel.code = 0;
  116. dataModel.count = recordCount;
  117. dataModel.data = dt;
  118. return JsonConvert.SerializeObject(dataModel);
  119. }
  120. #endregion
  121. #region 角色管理
  122. BLL.T_Sys_RoleInfo roleBLL = new BLL.T_Sys_RoleInfo();
  123. public ActionResult RoleList()
  124. {
  125. WorkOrderMyModel model = new WorkOrderMyModel();
  126. return View(model);
  127. }
  128. /// <summary>
  129. /// 获取角色列表
  130. /// </summary>
  131. /// <param name="page">当前页码</param>
  132. /// <param name="limit">每页数据量</param>
  133. /// <returns></returns>
  134. [ActionName("RoleDate")]
  135. [HttpGet]
  136. public string RoleDate(DateTime? NowDateTime, int page, int limit)
  137. {
  138. //数据结果集
  139. ResponseData dataModel = new ResponseData();
  140. string sql = "";
  141. DataTable dt = new DataTable();
  142. int recordCount = 0;
  143. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  144. dt = BLL.PagerBLL.GetListPager(
  145. "T_Sys_RoleInfo",
  146. "F_RoleId",
  147. "*",
  148. sql,
  149. "ORDER BY F_RoleId",
  150. limit,
  151. page,
  152. true,
  153. out recordCount);
  154. dataModel.code = 0;
  155. dataModel.count = recordCount;
  156. dataModel.data = dt;
  157. return JsonConvert.SerializeObject(dataModel);
  158. }
  159. /// <summary>
  160. /// 编辑角色
  161. /// </summary>
  162. /// <returns></returns>
  163. public ActionResult RoleEdit(int? roleId)
  164. {
  165. Model.T_Sys_RoleInfo viewModel = new Model.T_Sys_RoleInfo();
  166. if (roleId != null && roleId > 0)
  167. {
  168. viewModel = roleBLL.GetModel(int.Parse(roleId.ToString()));
  169. }
  170. return View(viewModel);
  171. }
  172. /// <summary>
  173. /// 保存编辑
  174. /// </summary>
  175. /// <param name="workOrderBaseModel"></param>
  176. /// <returns></returns>
  177. [AcceptVerbs(HttpVerbs.Post)]
  178. public bool SaveRoleEdit(T_Sys_RoleInfo roleInfoModel)
  179. {
  180. if (roleInfoModel.F_RoleId > 0)
  181. {
  182. return roleBLL.Update(roleInfoModel);
  183. }
  184. else
  185. {
  186. return roleBLL.Add(roleInfoModel) > 0;
  187. }
  188. }
  189. /// <summary>
  190. /// 删除数据
  191. /// </summary>
  192. /// <param name="workOrderBaseModel"></param>
  193. /// <returns></returns>
  194. [AcceptVerbs(HttpVerbs.Get)]
  195. public bool DeleteRoleData(string roleId)
  196. {
  197. return roleBLL.DeleteList(roleId);
  198. }
  199. #endregion
  200. #region 获取菜单树
  201. public class DicSeaarchModel
  202. {
  203. public string RootCode
  204. {
  205. get;
  206. set;
  207. }
  208. }
  209. /// <summary>
  210. /// 初始化字典结构
  211. /// </summary>
  212. /// <param name="rootCode"></param>
  213. /// <returns></returns>
  214. public ActionResult MenuTree(string rootCode)
  215. {
  216. DicSeaarchModel model = new DicSeaarchModel();
  217. model.RootCode = rootCode;
  218. return View(model);
  219. }
  220. /// <summary>
  221. /// 获取字典数据
  222. /// </summary>
  223. /// <param name="rootCode"></param>
  224. /// <returns></returns>
  225. public string GetMenuTreeData(int roleId)
  226. {
  227. try
  228. {
  229. return "[" + Newtonsoft.Json.JsonConvert.SerializeObject(roleBLL.GetMenuTree(roleId)).Replace("Checked", "checked") + "]";
  230. }
  231. catch (Exception ex)
  232. {
  233. return "";
  234. }
  235. }
  236. /// <summary>
  237. ///授权
  238. /// </summary>
  239. /// <returns></returns>
  240. [AcceptVerbs(HttpVerbs.Get)]
  241. public bool AcceptList(int roleId, string MenuIdStr)
  242. {
  243. bool accRersult = false;
  244. if (roleBLL.AddRolesMenuList(roleId, MenuIdStr))
  245. {
  246. accRersult = true;
  247. }
  248. return accRersult;
  249. }
  250. #endregion
  251. #region 业务类型管理
  252. BLL.T_Wo_WorkOrderType dicTittleBLL = new BLL.T_Wo_WorkOrderType();
  253. public ActionResult BusinessTypeList()
  254. {
  255. WorkOrderMyModel model = new WorkOrderMyModel();
  256. return View(model);
  257. }
  258. ///通过dic编码获取dic值
  259. /// </summary>
  260. /// <param name="fid"></param>
  261. /// <returns></returns>
  262. public string GetDicTittleJson(int parentId)
  263. {
  264. return Newtonsoft.Json.JsonConvert.SerializeObject(dicTittleBLL.GetDicTittleJsonModel(parentId));
  265. }
  266. /// <summary>
  267. /// 获取业务类型数据
  268. /// </summary>
  269. /// <param name="page">当前页码</param>
  270. /// <param name="limit">每页数据量</param>
  271. /// <returns></returns>
  272. [ActionName("OrderTypeDate")]
  273. [HttpGet]
  274. public string OrderTypeDate(DateTime? NowDateTime, int page, int limit, int? parentId)
  275. {
  276. //数据结果集
  277. ResponseData dataModel = new ResponseData();
  278. string sql = "";
  279. if (parentId != null && parentId > 0)
  280. {
  281. sql += " and F_ParentId=" + parentId;
  282. }
  283. DataTable dt = new DataTable();
  284. int recordCount = 0;
  285. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  286. dt = BLL.PagerBLL.GetListPager(
  287. "T_Wo_WorkOrderType",
  288. "F_WorkOrderTypeId",
  289. "*",
  290. sql,
  291. "ORDER BY F_Sort asc ",
  292. limit,
  293. page,
  294. true,
  295. out recordCount);
  296. dataModel.code = 0;
  297. dataModel.count = recordCount;
  298. dataModel.data = dt;
  299. return JsonConvert.SerializeObject(dataModel);
  300. }
  301. /// <summary>
  302. /// 编辑业务类型
  303. /// </summary>
  304. /// <param name="F_WorkOrderTypeId">当前选中id</param>
  305. /// <param name="editType">类型1、新增 2、修改</param>
  306. /// <returns></returns>
  307. public ActionResult BussinessTypeEdit(int F_WorkOrderTypeId, int editType)
  308. {
  309. Model.T_Wo_WorkOrderType viewModel = new Model.T_Wo_WorkOrderType();
  310. //当前对象实体
  311. Model.T_Wo_WorkOrderType orderTypeModel = dicTittleBLL.GetModel(F_WorkOrderTypeId);
  312. if (editType == 1)
  313. {
  314. viewModel.F_ParentId = orderTypeModel.F_WorkOrderTypeId;
  315. viewModel.F_ParentName = orderTypeModel.F_ParentName;
  316. viewModel.F_Sort = 1;
  317. }
  318. else
  319. {
  320. viewModel = orderTypeModel;
  321. }
  322. return View(viewModel);
  323. }
  324. /// <summary>
  325. /// 保存编辑
  326. /// </summary>
  327. /// <param name="workOrderBaseModel"></param>
  328. /// <returns></returns>
  329. [AcceptVerbs(HttpVerbs.Post)]
  330. public bool SaveBussiTypeData(T_Wo_WorkOrderType WorkOrderTypeModel)
  331. {
  332. ////当前用户信息
  333. //workOrderBaseModel.F_USERID = F_UserID;//id
  334. //workOrderBaseModel.F_LINKMAN = F_UserCode;//工号
  335. //workOrderBaseModel.F_REPAIRMANNAME = "12";//姓名
  336. if (WorkOrderTypeModel.F_WorkOrderTypeId > 0)
  337. {
  338. return dicTittleBLL.Update(WorkOrderTypeModel) > 0;
  339. }
  340. else
  341. {
  342. return dicTittleBLL.Add(WorkOrderTypeModel) > 0;
  343. }
  344. }
  345. /// <summary>
  346. /// 删除数据
  347. /// </summary>
  348. /// <param name="workOrderBaseModel"></param>
  349. /// <returns></returns>
  350. [AcceptVerbs(HttpVerbs.Get)]
  351. public bool DeleteBussiTypeData(int WorkOrderTypeId)
  352. {
  353. return dicTittleBLL.Delete(WorkOrderTypeId);
  354. }
  355. #endregion
  356. #region 字典管理
  357. BLL.T_Sys_DictionaryValue dicValueBLL = new BLL.T_Sys_DictionaryValue();
  358. BLL.T_Sys_DictionaryBase dicBaseBLL = new BLL.T_Sys_DictionaryBase();
  359. /// <summary>
  360. /// 字典列表
  361. /// </summary>
  362. /// <returns></returns>
  363. public ActionResult DictionaryList()
  364. {
  365. WorkOrderMyModel model = new WorkOrderMyModel();
  366. return View(model);
  367. }
  368. ///通过字典获取数据
  369. /// </summary>
  370. /// <param name="fid"></param>
  371. /// <returns></returns>
  372. public string GetDictionaryJsonModel(int parentId)
  373. {
  374. return Newtonsoft.Json.JsonConvert.SerializeObject(dicBaseBLL.GetDictionaryJsonModel());
  375. }
  376. /// <summary>
  377. /// 获取字典值数据
  378. /// </summary>
  379. /// <param name="page">当前页码</param>
  380. /// <param name="limit">每页数据量</param>
  381. /// <returns></returns>
  382. [ActionName("DictionaryDate")]
  383. [HttpGet]
  384. public string DictionaryDate(DateTime? NowDateTime, int page, int limit, string dictionaryFlag)
  385. {
  386. //数据结果集
  387. ResponseData dataModel = new ResponseData();
  388. string sql = "";
  389. if (!string.IsNullOrEmpty(dictionaryFlag) && dictionaryFlag != "0")
  390. {
  391. sql += " and F_DictionaryFlag='" + dictionaryFlag + "'";
  392. }
  393. DataTable dt = new DataTable();
  394. int recordCount = 0;
  395. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  396. if (string.IsNullOrEmpty(dictionaryFlag) || dictionaryFlag != "0")
  397. {
  398. dt = BLL.PagerBLL.GetListPager(
  399. "T_Sys_DictionaryValue",
  400. "F_DictionaryValueId",
  401. "*",
  402. sql,
  403. "ORDER BY F_Sort asc ",
  404. limit,
  405. page,
  406. true,
  407. out recordCount);
  408. }
  409. else
  410. {
  411. dt = BLL.PagerBLL.GetListPager(
  412. "T_Sys_DictionaryBase",
  413. "F_DictionaryName",
  414. "*,F_DictionaryName as F_Name",
  415. sql,
  416. "ORDER BY F_Sort asc ",
  417. limit,
  418. page,
  419. true,
  420. out recordCount);
  421. }
  422. dataModel.code = 0;
  423. dataModel.count = recordCount;
  424. dataModel.data = dt;
  425. return JsonConvert.SerializeObject(dataModel);
  426. }
  427. /// <summary>
  428. /// 字典项编辑
  429. /// </summary>
  430. /// <param name="editType">类型1、新增 2、修改</param>
  431. /// /// <returns></returns>
  432. public ActionResult DictionaryBaseEdit(string dicCode, int editType)
  433. {
  434. Model.T_Sys_DictionaryBase viewModel = new Model.T_Sys_DictionaryBase();
  435. //当前对象实体
  436. if (editType == 1)
  437. {
  438. viewModel.F_Sort = 1;
  439. }
  440. else
  441. {
  442. Model.T_Sys_DictionaryBase dicBaseModel = dicBaseBLL.GetModel(dicCode);
  443. viewModel = dicBaseModel;
  444. }
  445. return View(viewModel);
  446. }
  447. /// <summary>
  448. /// 保存字典项编辑
  449. /// </summary>
  450. /// <param name="workOrderBaseModel"></param>
  451. /// <returns></returns>
  452. [AcceptVerbs(HttpVerbs.Post)]
  453. public bool SaveDictionaryBaseData(T_Sys_DictionaryBase dicBaseModel)
  454. {
  455. if (!string.IsNullOrEmpty(dicBaseModel.F_DictionaryFlagType))
  456. {
  457. return dicBaseBLL.Update(dicBaseModel);
  458. }
  459. else
  460. {
  461. return dicBaseBLL.Add(dicBaseModel);
  462. }
  463. }
  464. /// <summary>
  465. /// 删除字典项
  466. /// </summary>
  467. /// <param name="workOrderBaseModel"></param>
  468. /// <returns></returns>
  469. [AcceptVerbs(HttpVerbs.Get)]
  470. public bool DeleteBaseData(string baseCode)
  471. {
  472. return dicBaseBLL.Delete(baseCode);
  473. }
  474. /// <summary>
  475. /// 字典值编辑
  476. /// </summary>
  477. /// <param name="editType">类型1、新增 2、修改</param>
  478. /// /// <returns></returns>
  479. public ActionResult DictionaryValueEdit(int? valueId, string parentCode, int editType)
  480. {
  481. Model.T_Sys_DictionaryValue viewModel = new Model.T_Sys_DictionaryValue();
  482. //当前对象实体
  483. if (editType == 1)
  484. {
  485. viewModel.F_Sort = 1;
  486. viewModel.F_DictionaryFlag = parentCode;
  487. }
  488. else
  489. {
  490. Model.T_Sys_DictionaryValue dicValueModel = dicValueBLL.GetModel(int.Parse(valueId.ToString()));
  491. viewModel = dicValueModel;
  492. }
  493. return View(viewModel);
  494. }
  495. /// <summary>
  496. /// 保存字典值
  497. /// </summary>
  498. /// <param name="workOrderBaseModel"></param>
  499. /// <returns></returns>
  500. [AcceptVerbs(HttpVerbs.Post)]
  501. public bool SaveDictionaryValueData(T_Sys_DictionaryValue dicBaseModel)
  502. {
  503. if (dicBaseModel.F_DictionaryValueId > 0)
  504. {
  505. return dicValueBLL.Update(dicBaseModel);
  506. }
  507. else
  508. {
  509. return dicValueBLL.Add(dicBaseModel) > 0;
  510. }
  511. }
  512. /// <summary>
  513. /// 删除字典值
  514. /// </summary>
  515. /// <param name="workOrderBaseModel"></param>
  516. /// <returns></returns>
  517. [AcceptVerbs(HttpVerbs.Get)]
  518. public bool DeleteValueData(int id)
  519. {
  520. return dicValueBLL.Delete(id);
  521. }
  522. #endregion
  523. #region 菜单管理
  524. BLL.T_Sys_ModuleFunctions menuBLL = new BLL.T_Sys_ModuleFunctions();
  525. /// <summary>
  526. /// 部门列表
  527. /// </summary>
  528. /// <returns></returns>
  529. public ActionResult MenuList()
  530. {
  531. WorkOrderMyModel model = new WorkOrderMyModel();
  532. return View(model);
  533. }
  534. ///通过部门父级节点获取数据
  535. /// </summary>
  536. /// <param name="fid"></param>
  537. /// <returns></returns>
  538. public string GetMenuJsonModel(int parentId)
  539. {
  540. return Newtonsoft.Json.JsonConvert.SerializeObject(menuBLL.GetMenuJsonModel(parentId));
  541. }
  542. /// <summary>
  543. /// 获取部门数据
  544. /// </summary>
  545. /// <param name="page">当前页码</param>
  546. /// <param name="limit">每页数据量</param>
  547. /// <returns></returns>
  548. [ActionName("MenuDate")]
  549. [HttpGet]
  550. public string MenuDate(DateTime? NowDateTime, int page, int limit, int? parentId)
  551. {
  552. //数据结果集
  553. ResponseData dataModel = new ResponseData();
  554. string sql = "";
  555. if (parentId != null)
  556. {
  557. sql += " and F_ParentId=" + parentId;
  558. }
  559. DataTable dt = new DataTable();
  560. int recordCount = 0;
  561. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  562. dt = BLL.PagerBLL.GetListPager(
  563. "T_Sys_ModuleFunctions",
  564. "F_FunctionId",
  565. "* ,(CASE F_StateFlag WHEN 1 THEN '启用' WHEN 0 THEN '禁用' ELSE NULL END ) as F_StateFlagName",
  566. sql,
  567. "ORDER BY F_Sort asc ",
  568. limit,
  569. page,
  570. true,
  571. out recordCount);
  572. dataModel.code = 0;
  573. dataModel.count = recordCount;
  574. dataModel.data = dt;
  575. return JsonConvert.SerializeObject(dataModel);
  576. }
  577. /// <summary>
  578. /// 功能编辑
  579. /// </summary>
  580. /// <param name="editType">类型1、新增 2、修改</param>
  581. /// /// <returns></returns>
  582. public ActionResult MenuEdit(int menuId, int editType)
  583. {
  584. Model.T_Sys_ModuleFunctions viewModel = new Model.T_Sys_ModuleFunctions();
  585. //当前对象实体
  586. if (editType == 1)
  587. {
  588. viewModel.F_ParentId = menuId;
  589. viewModel.F_Sort = 1;
  590. }
  591. else
  592. {
  593. Model.T_Sys_ModuleFunctions deptModel = menuBLL.GetModel(menuId);
  594. viewModel = deptModel;
  595. }
  596. return View(viewModel);
  597. }
  598. /// <summary>
  599. /// 保存编辑
  600. /// </summary>
  601. /// <param name="workOrderBaseModel"></param>
  602. /// <returns></returns>
  603. [AcceptVerbs(HttpVerbs.Post)]
  604. public bool SaveMenuData(T_Sys_ModuleFunctions menuModel)
  605. {
  606. if (menuModel.F_FunctionId > 0)
  607. {
  608. return menuBLL.Update(menuModel);
  609. }
  610. else
  611. {
  612. return menuBLL.Add(menuModel) > 0;
  613. }
  614. }
  615. /// <summary>
  616. /// 删除功能
  617. /// </summary>
  618. /// <param name="workOrderBaseModel"></param>
  619. /// <returns></returns>
  620. [AcceptVerbs(HttpVerbs.Get)]
  621. public bool DeleteMenuData(int menuId)
  622. {
  623. return menuBLL.Delete(menuId);
  624. }
  625. #endregion
  626. #region 用户管理
  627. BLL.T_Sys_UserAccount userBLL = new BLL.T_Sys_UserAccount();
  628. /// <summary>
  629. /// 部门列表
  630. /// </summary>
  631. /// <returns></returns>
  632. public ActionResult UserList()
  633. {
  634. WorkOrderMyModel model = new WorkOrderMyModel();
  635. return View(model);
  636. }
  637. /// <summary>
  638. /// 用户编辑
  639. /// </summary>
  640. /// <param name="editType">类型1、新增 2、修改</param>
  641. /// /// <returns></returns>
  642. public ActionResult UserEdit(int? userId, int? deptId, int editType)
  643. {
  644. Model.T_Sys_UserAccount viewModel = new Model.T_Sys_UserAccount();
  645. //当前对象实体
  646. if (editType == 1)
  647. {
  648. viewModel.F_DeptId = int.Parse(deptId.ToString());
  649. }
  650. else
  651. {
  652. Model.T_Sys_UserAccount userModel = userBLL.GetModel(int.Parse(userId.ToString()));
  653. viewModel = userModel;
  654. }
  655. //获取部门列表
  656. viewModel.DepartmentList = deptBLL.GetModelList("F_ParentId=0");
  657. //获取角色列表
  658. viewModel.RoleInfoList = roleBLL.GetModelList("");
  659. return View(viewModel);
  660. }
  661. /// <summary>
  662. /// 保存编辑
  663. /// </summary>
  664. /// <param name="workOrderBaseModel"></param>
  665. /// <returns></returns>
  666. [AcceptVerbs(HttpVerbs.Post)]
  667. public bool SaveUserData(T_Sys_UserAccount userModel)
  668. {
  669. userModel.F_WorkNumber = userModel.F_UserCode;
  670. if (userModel.F_UserId > 0)
  671. {
  672. T_Sys_UserAccount oldUserModel = userBLL.GetModel(userModel.F_UserId);
  673. oldUserModel.F_WorkNumber = userModel.F_WorkNumber;
  674. oldUserModel.F_UserName = userModel.F_UserName;
  675. oldUserModel.F_UserCode = userModel.F_UserCode;
  676. oldUserModel.F_DeptId = userModel.F_DeptId;
  677. oldUserModel.F_RoleId = userModel.F_RoleId;
  678. oldUserModel.F_SexFlag = userModel.F_SexFlag;
  679. oldUserModel.F_Telephone = userModel.F_Telephone;
  680. oldUserModel.F_SeatFlag = userModel.F_SeatFlag;
  681. oldUserModel.F_SeatRight = userModel.F_SeatRight;
  682. oldUserModel.F_Password = userModel.F_Password;
  683. oldUserModel.F_Remark = userModel.F_Remark;
  684. return userBLL.Update(oldUserModel);
  685. }
  686. else
  687. {
  688. userModel.F_HJType = 0;
  689. userModel.F_GroupId = 1;
  690. if (userModel.F_SeatFlag)
  691. {
  692. #region 调用接口插入用户信息
  693. try
  694. {
  695. StringBuilder returnStr = new StringBuilder();
  696. string wxAddUrl = "http://zzmetro-kf.sujie-china.com/api/customer/insert";
  697. UserInfo model = new UserInfo();
  698. model.name = userModel.F_UserCode;
  699. object userInfo = JObject.Parse(JsonConvert.SerializeObject(model));
  700. string addWxResult = HttpHelper.HttpPost(wxAddUrl, userInfo);
  701. ResponseResult ResultModel = JsonConvert.DeserializeObject<ResponseResult>(addWxResult);
  702. userModel.F_PId = ResultModel.data;
  703. }
  704. catch (Exception ex)
  705. {
  706. }
  707. #endregion
  708. }
  709. return userBLL.Add(userModel) > 0;
  710. }
  711. }
  712. /// <summary>
  713. /// 删除用户
  714. /// </summary>
  715. /// <param name="workOrderBaseModel"></param>
  716. /// <returns></returns>
  717. [AcceptVerbs(HttpVerbs.Get)]
  718. public bool DeleteUserData(int userId)
  719. {
  720. return userBLL.Delete(userId);
  721. }
  722. /// <summary>
  723. /// 获取用户数据
  724. /// </summary>
  725. /// <param name="page">当前页码</param>
  726. /// <param name="limit">每页数据量</param>
  727. /// <returns></returns>
  728. [ActionName("UserDate")]
  729. [HttpGet]
  730. public string UserDate(DateTime? NowDateTime, int page, int limit, int? deptId)
  731. {
  732. //数据结果集
  733. ResponseData dataModel = new ResponseData();
  734. string sql = "";
  735. if (deptId != null && deptId > 0)
  736. {
  737. sql += " and F_DeptId=" + deptId;
  738. }
  739. DataTable dt = new DataTable();
  740. int recordCount = 0;
  741. Model.PageData<Model.T_Wo_WorkOrderBase> pageModel = new Model.PageData<Model.T_Wo_WorkOrderBase>();
  742. dt = BLL.PagerBLL.GetListPager(
  743. "T_Sys_UserAccount",
  744. "F_UserId",
  745. "*"
  746. + ",(select top 1 t.F_DeptName from T_Sys_Department t where t.F_DeptId=T_Sys_UserAccount.F_DeptId) as F_DeptName "
  747. + ",(select top 1 t.F_RoleName from T_Sys_RoleInfo t where t.F_RoleId=T_Sys_UserAccount.F_RoleId) as F_RoleName "
  748. + ",(CASE F_SeatFlag WHEN 1 THEN '使用' WHEN 0 THEN '不使用' ELSE NULL END ) as F_SeatFlagName"
  749. + ",(CASE F_SeatRight WHEN 1 THEN '班长坐席' WHEN 0 THEN '普通坐席' ELSE NULL END ) as F_SeatRightName"
  750. ,
  751. sql,
  752. "ORDER BY F_UserCode asc ",
  753. limit,
  754. page,
  755. true,
  756. out recordCount);
  757. dataModel.code = 0;
  758. dataModel.count = recordCount;
  759. dataModel.data = dt;
  760. return JsonConvert.SerializeObject(dataModel);
  761. }
  762. #endregion
  763. #region 修改密码
  764. /// <summary>
  765. ///用户修改个人密码
  766. /// </summary>
  767. /// <param name="id"></param>
  768. /// <returns></returns>
  769. public ActionResult UserPwdEdit()
  770. {
  771. Model.T_Sys_UserAccount model = new Model.T_Sys_UserAccount();
  772. if (F_UserID > 0)
  773. {
  774. model = userBLL.GetModel(F_UserID);
  775. }
  776. return View(model);
  777. }
  778. /// <summary>
  779. ///保存修改密码
  780. /// </summary>
  781. [AcceptVerbs(HttpVerbs.Post)]
  782. public string UpdateUserPwd(Model.T_Sys_UserAccount model)
  783. {
  784. string AddRersult = "false";
  785. if (model.F_UserId > 0)
  786. {
  787. Model.T_Sys_UserAccount newModel = userBLL.GetModel(model.F_UserId);
  788. if (newModel != null && newModel.F_Password == model.oldPwd)
  789. {
  790. newModel.F_Password = model.password;
  791. if (userBLL.Update(newModel))
  792. {
  793. AddRersult = "True";
  794. }
  795. }
  796. else
  797. {
  798. AddRersult = "旧密码不正确!";
  799. }
  800. }
  801. return AddRersult;
  802. }
  803. #endregion
  804. #region 基本信息
  805. /// <summary>
  806. /// 用户编辑
  807. /// </summary>
  808. /// <param name="editType">类型1、新增 2、修改</param>
  809. /// /// <returns></returns>
  810. public ActionResult UserView()
  811. {
  812. Model.T_Sys_UserAccount userModel = userBLL.GetModel(F_UserID);
  813. if (string.IsNullOrEmpty(userModel.F_HomePhone))
  814. {
  815. userModel.F_HomePhone = "/Content/images/face.jpg";
  816. }
  817. else
  818. {
  819. if (!System.IO.File.Exists(Server.MapPath(userModel.F_HomePhone)))
  820. {
  821. userModel.F_HomePhone = "/Content/images/face.jpg";
  822. }
  823. }
  824. return View(userModel);
  825. }
  826. #endregion
  827. #region 图片上传
  828. /// <summary>
  829. /// 图片上传
  830. /// </summary>
  831. /// <returns></returns>
  832. [AcceptVerbs(HttpVerbs.Post)]
  833. public ActionResult UploadFile()
  834. {
  835. try
  836. {
  837. if (Request.Files.Count > 0)
  838. {
  839. string uppath = string.Empty;
  840. string savepath = string.Empty;
  841. HttpPostedFileBase imgFile = Request.Files[0];
  842. if (imgFile != null)
  843. {
  844. //创建图片新的名称
  845. string nameImg = DateTime.Now.ToString("yyyyMMddHHmmssfff");
  846. //获得上传图片的路径
  847. string strPath = imgFile.FileName;
  848. //获得上传图片的类型(后缀名)
  849. string type = strPath.Substring(strPath.LastIndexOf(".") + 1).ToLower();
  850. //拼写数据库保存的相对路径字符串
  851. savepath = "/Content/HeadImg/images/";
  852. //拼写上传图片的路径
  853. uppath = Server.MapPath("~/Content/HeadImg/images/");
  854. if (!Directory.Exists(Path.GetDirectoryName(uppath)))
  855. {
  856. Directory.CreateDirectory(Path.GetDirectoryName(uppath));
  857. }
  858. uppath += nameImg + "." + type;
  859. savepath += nameImg + "." + type;
  860. //上传图片
  861. imgFile.SaveAs(uppath); //原图片路径
  862. }
  863. Model.T_Sys_UserAccount userModel = userBLL.GetModel(F_UserID);
  864. userModel.F_HomePhone = savepath;
  865. if (userBLL.Update(userModel))
  866. {
  867. return Json(new
  868. {
  869. code = 0,
  870. src = savepath,
  871. msg = "上传成功"
  872. });
  873. }
  874. else
  875. {
  876. return Json(new
  877. {
  878. code = 1,
  879. src = "",
  880. msg = "上传出错 请检查图片名称或图片内容"
  881. });
  882. }
  883. }
  884. else
  885. {
  886. return Json(new
  887. {
  888. code = 1,
  889. src = "",
  890. msg = "上传出错 请检查图片名称或图片内容"
  891. });
  892. }
  893. }
  894. catch (Exception ex)
  895. {
  896. return Json(new
  897. {
  898. code = 1,
  899. src = "",
  900. msg = "上传出错: " + ex.Message
  901. });
  902. }
  903. }
  904. #endregion
  905. #region 公告管理
  906. /// <summary>
  907. /// 公告管理
  908. /// </summary>
  909. /// <returns></returns>
  910. public ActionResult noticeManage()
  911. {
  912. Model.T_Msg_NoticeInfo noticeModel = new Model.T_Msg_NoticeInfo();
  913. return View(noticeModel);
  914. }
  915. public ActionResult test()
  916. {
  917. Model.T_Msg_NoticeInfo noticeModel = new Model.T_Msg_NoticeInfo();
  918. return View(noticeModel);
  919. }
  920. /// <summary>
  921. /// 获取公告数据
  922. /// </summary>
  923. /// <param name="page">当前页码</param>
  924. /// <param name="limit">每页数据量</param>
  925. /// <returns></returns>
  926. [ActionName("NoticeListDate")]
  927. [HttpGet]
  928. public string NoticeListDate(DateTime? NowDateTime, int page, int limit, int? parentId)
  929. {
  930. //数据结果集
  931. ResponseData dataModel = new ResponseData();
  932. string sql = "";
  933. if (parentId != null)
  934. {
  935. sql += " and F_ParentId=" + parentId;
  936. }
  937. DataTable dt = new DataTable();
  938. int recordCount = 0;
  939. Model.PageData<Model.T_Msg_NoticeInfo> pageModel = new Model.PageData<Model.T_Msg_NoticeInfo>();
  940. dt = BLL.PagerBLL.GetListPager(
  941. "T_Msg_NoticeInfo",
  942. "F_NoticeId",
  943. "*,CONVERT(varchar,F_CreateOn, 120 ) as F_CreateOnNew ",
  944. sql,
  945. "ORDER BY F_NoticeId desc ",
  946. limit,
  947. page,
  948. true,
  949. out recordCount);
  950. dataModel.code = 0;
  951. dataModel.count = recordCount;
  952. dataModel.data = dt;
  953. return JsonConvert.SerializeObject(dataModel);
  954. }
  955. BLL.T_Msg_NoticeInfo noticeBLL = new BLL.T_Msg_NoticeInfo();
  956. BLL.T_Msg_NoticeUsers noticeuserBLL = new BLL.T_Msg_NoticeUsers();
  957. BLL.T_Sys_UserAccount usersBLL = new BLL.T_Sys_UserAccount();
  958. /// <summary>
  959. /// 编辑公告
  960. /// </summary>
  961. /// <param name="editType">类型1、新增 2、修改</param>
  962. /// /// <returns></returns>
  963. public ActionResult NoticeEdit(int? noticeId, int editType)
  964. {
  965. Model.T_Msg_NoticeInfo viewModel = new Model.T_Msg_NoticeInfo();
  966. //当前对象实体
  967. if (editType == 1)
  968. {
  969. viewModel.F_NoticeId = int.Parse(noticeId.ToString());
  970. viewModel.UseList = userBLL.GetModelList("");
  971. }
  972. else
  973. {
  974. Model.T_Msg_NoticeInfo userModel = noticeBLL.GetModel(int.Parse(noticeId.ToString()));
  975. viewModel = userModel;
  976. viewModel.UseList = userBLL.GetModelList("F_DeptId=" + userModel.F_ReceiveInfo);
  977. }
  978. //获取部门列表
  979. viewModel.DepartmentList = deptBLL.GetModelList("F_ParentId=0");
  980. return View(viewModel);
  981. }
  982. /// <summary>
  983. /// 查看公告
  984. /// </summary>
  985. /// <param name="editType">类型1、新增 2、修改</param>
  986. /// /// <returns></returns>
  987. public ActionResult NoticeView(int? noticeId)
  988. {
  989. Model.T_Msg_NoticeInfo viewModel = new Model.T_Msg_NoticeInfo();
  990. viewModel.F_NoticeId = int.Parse(noticeId.ToString());
  991. viewModel.UseList = userBLL.GetModelList("");
  992. Model.T_Msg_NoticeInfo userModel = noticeBLL.GetModel(int.Parse(noticeId.ToString()));
  993. viewModel = userModel;
  994. viewModel.UseList = userBLL.GetModelList("F_DeptId=" + userModel.F_ReceiveInfo);
  995. //获取部门列表
  996. viewModel.DepartmentList = deptBLL.GetModelList("F_ParentId=0");
  997. return View(viewModel);
  998. }
  999. /// <summary>
  1000. /// 保存编辑公告
  1001. /// </summary>
  1002. /// <param name="workOrderBaseModel"></param>
  1003. /// <returns></returns>
  1004. [AcceptVerbs(HttpVerbs.Post)]
  1005. public bool SaveNoticeData(T_Msg_NoticeInfo noticeinfoModel)
  1006. {
  1007. bool result = false;
  1008. DataTable dt = new DataTable();
  1009. DataTable dtuser = new DataTable();
  1010. int noticeid = 0;
  1011. Model.T_Msg_NoticeUsers noticeuserModel = new Model.T_Msg_NoticeUsers();
  1012. DateTime? readdate =null;
  1013. try
  1014. {
  1015. //获取当前用户
  1016. noticeinfoModel.F_CreateBy = F_UserID;
  1017. noticeinfoModel.F_CreateName = HttpUtility.UrlDecode(F_UserName);
  1018. if (noticeinfoModel.F_NoticeId > 0)
  1019. {
  1020. noticeid = noticeinfoModel.F_NoticeId;
  1021. Model.T_Msg_NoticeInfo oldnoticeinfoModel = noticeBLL.GetModel(int.Parse(noticeid.ToString())); ;
  1022. dt = new YTSoft.BaseCallCenter.BLL.T_Msg_NoticeInfo().GetList("1=1 and F_NoticeId= " + noticeid).Tables[0];
  1023. if (dt.Rows.Count > 0)
  1024. {
  1025. dtuser = new YTSoft.BaseCallCenter.BLL.T_Sys_UserAccount().GetList("1=1 and F_DeptId= " + Convert.ToInt32(dt.Rows[0]["F_ReceiveInfo"].ToString())).Tables[0];
  1026. foreach (DataRow dr in dtuser.Rows)
  1027. {
  1028. noticeuserModel.F_UserId = Convert.ToInt32(dr["F_UserId"].ToString());
  1029. result = noticeuserBLL.Delete(noticeid, noticeuserModel.F_UserId);
  1030. }
  1031. }
  1032. readdate =Convert.ToDateTime( oldnoticeinfoModel.F_CreateOn);
  1033. oldnoticeinfoModel.F_Code = noticeinfoModel.F_Code;
  1034. oldnoticeinfoModel.F_Title = noticeinfoModel.F_Title;
  1035. oldnoticeinfoModel.F_Resume = noticeinfoModel.F_Resume;
  1036. oldnoticeinfoModel.F_Content = noticeinfoModel.F_Content;
  1037. oldnoticeinfoModel.F_ReceiveInfo = noticeinfoModel.F_ReceiveInfo;
  1038. oldnoticeinfoModel.F_DeviceId = noticeinfoModel.F_DeviceId;
  1039. oldnoticeinfoModel.F_State = 1;
  1040. result = noticeBLL.Update(oldnoticeinfoModel);
  1041. }
  1042. else
  1043. {
  1044. noticeid = 0;
  1045. noticeinfoModel.F_DeviceId = noticeinfoModel.F_UserId;
  1046. noticeinfoModel.F_State = 1;
  1047. noticeinfoModel.F_CreateOn = DateTime.Now;
  1048. readdate = noticeinfoModel.F_CreateOn;
  1049. noticeid = noticeBLL.Add(noticeinfoModel);
  1050. }
  1051. //指定方式发送公告
  1052. if (noticeinfoModel.F_DeviceId > 0)
  1053. {//指定人员发公告
  1054. noticeuserModel.F_NoticeId = noticeid;
  1055. noticeuserModel.F_UserId = Convert.ToInt32(noticeinfoModel.F_UserId);
  1056. noticeuserModel.F_UserName = noticeinfoModel.F_UserName;
  1057. if (readdate.ToString() != "")
  1058. { noticeuserModel.F_ReadDate = readdate; }
  1059. else
  1060. {
  1061. noticeuserModel.F_ReadDate = noticeinfoModel.F_CreateOn;
  1062. }
  1063. noticeuserModel.F_State = 0;
  1064. noticeuserModel.F_Type = 0;
  1065. result = noticeuserBLL.Add(noticeuserModel);
  1066. }
  1067. else
  1068. {//指定部门发公告
  1069. dt = new YTSoft.BaseCallCenter.BLL.T_Sys_UserAccount().GetList("1=1 and F_DeptId= " + noticeinfoModel.F_ReceiveInfo).Tables[0];
  1070. if (dt.Rows.Count > 0)
  1071. {
  1072. noticeuserModel.F_NoticeId = noticeid;
  1073. if (readdate.ToString()!="")
  1074. { noticeuserModel.F_ReadDate = readdate; }
  1075. else {
  1076. noticeuserModel.F_ReadDate = noticeinfoModel.F_CreateOn;
  1077. }
  1078. foreach (DataRow dr in dt.Rows)
  1079. {
  1080. noticeuserModel.F_UserId = Convert.ToInt32(dr["F_UserId"].ToString());
  1081. noticeuserModel.F_UserName = dr["F_UserName"].ToString();
  1082. noticeuserModel.F_State = 0;
  1083. noticeuserModel.F_Type = 0;
  1084. result = noticeuserBLL.Add(noticeuserModel);
  1085. }
  1086. }
  1087. }
  1088. }
  1089. catch (Exception) { }
  1090. finally
  1091. {
  1092. dt.Clear();
  1093. dt.Dispose();
  1094. }
  1095. return result;
  1096. }
  1097. /// <summary>
  1098. /// 删除公告
  1099. /// </summary>
  1100. /// <param name="workOrderBaseModel"></param>
  1101. /// <returns></returns>
  1102. [AcceptVerbs(HttpVerbs.Get)]
  1103. public bool DeleteNoticeData(int noticeId)
  1104. {
  1105. bool res = false;
  1106. DataTable dt = new DataTable();
  1107. DataTable dtuser = new DataTable();
  1108. Model.T_Msg_NoticeUsers noticeuserModel = new Model.T_Msg_NoticeUsers();
  1109. try
  1110. {
  1111. dt = noticeBLL.GetList("1=1 and F_NoticeId= " + noticeId).Tables[0];
  1112. if (dt.Rows.Count > 0)
  1113. {
  1114. res = noticeBLL.Delete(noticeId);
  1115. //指定部门发公告
  1116. dtuser = new YTSoft.BaseCallCenter.BLL.T_Sys_UserAccount().GetList("1=1 and F_DeptId= " + Convert.ToInt32( dt.Rows[0]["F_ReceiveInfo"].ToString()) ).Tables[0];
  1117. foreach (DataRow dr in dtuser.Rows)
  1118. {
  1119. noticeuserModel.F_UserId = Convert.ToInt32(dr["F_UserId"].ToString());
  1120. noticeuserBLL.Delete(noticeId, noticeuserModel.F_UserId);
  1121. }
  1122. }
  1123. }
  1124. catch (Exception) { }
  1125. finally {
  1126. dt.Clear();
  1127. dt.Dispose();
  1128. dtuser.Clear();
  1129. dtuser.Dispose();
  1130. }
  1131. return res;
  1132. }
  1133. /// <summary>
  1134. /// 未接根据recordid更新回访信息
  1135. /// </summary>
  1136. /// <param name="SetCallRecordHfInfo"></param>
  1137. /// <returns></returns>
  1138. [ActionName("SetNoticeState")]
  1139. [HttpGet]
  1140. public string SetNoticeState(string id, string timeno)
  1141. {
  1142. string res = "";
  1143. try
  1144. {
  1145. Model.T_Msg_NoticeInfo model = new Model.T_Msg_NoticeInfo();
  1146. model.F_State =1;
  1147. model.F_NoticeId = Convert.ToInt32(id);
  1148. bool bl = new BLL.T_Msg_NoticeInfo().UpdateNoticeState(model);
  1149. if (bl)
  1150. {
  1151. res = "success";
  1152. }
  1153. }
  1154. catch
  1155. { }
  1156. return res;
  1157. }
  1158. [ActionName("CookieData")]
  1159. [HttpGet]
  1160. public string CookieData() {
  1161. return F_UserID.ToString();
  1162. }
  1163. #endregion
  1164. }
  1165. #region 接口基本信息
  1166. /// <summary>
  1167. /// 用户信息
  1168. /// </summary>
  1169. public class UserInfo
  1170. {
  1171. public int id
  1172. {
  1173. get;
  1174. set;
  1175. }
  1176. public string name
  1177. {
  1178. get;
  1179. set;
  1180. }
  1181. }
  1182. /// <summary>
  1183. /// 返回结果信息
  1184. /// </summary>
  1185. public class ResponseResult
  1186. {
  1187. public int code
  1188. {
  1189. get;
  1190. set;
  1191. }
  1192. public int data
  1193. {
  1194. get;
  1195. set;
  1196. }
  1197. }
  1198. /// <summary>
  1199. /// 返回结果信息
  1200. /// </summary>
  1201. public class WXResponseResult
  1202. {
  1203. public int customer
  1204. {
  1205. get;
  1206. set;
  1207. }
  1208. public int service
  1209. {
  1210. get;
  1211. set;
  1212. }
  1213. public int total
  1214. {
  1215. get;
  1216. set;
  1217. }
  1218. }
  1219. #endregion
  1220. }