Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

2062 rindas
97 KiB

  1. using Learun.Application.Base.SystemModule;
  2. using Learun.Application.OA;
  3. using Learun.Application.Organization;
  4. using Learun.Application.TwoDevelopment.EducationalAdministration;
  5. using Learun.Application.TwoDevelopment.Permission;
  6. using Learun.Application.WorkFlow;
  7. using Learun.Util;
  8. using Learun.Util.Operat;
  9. using System;
  10. using System.Collections.Generic;
  11. using System.Configuration;
  12. using System.Linq;
  13. using System.Web;
  14. using System.Web.Mvc;
  15. using Learun.Cache.Base;
  16. using Learun.Cache.Factory;
  17. using Newtonsoft.Json;
  18. using Learun.Application.TwoDevelopment.LR_Desktop;
  19. using Learun.Application.TwoDevelopment.PersonnelManagement;
  20. namespace Learun.Application.Web.Controllers
  21. {
  22. [HandlerLogin(FilterMode.Ignore)]
  23. public class SSOSystemController : MvcControllerBase
  24. {
  25. private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL();
  26. Perm_UserPermissionIBLL permUserPermissionIbll = new Perm_UserPermissionBLL();
  27. private ModuleIBLL moduleIBLL = new ModuleBLL();
  28. private SYS_ReceiveMessageIBLL sYS_ReceiveMessageIBLL = new SYS_ReceiveMessageBLL();
  29. private UserIBLL userBll = new UserBLL();
  30. private WfTaskIBLL wfTaskIBLL = new WfTaskBLL();
  31. private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL();
  32. private NoticeIBLL newsIBLL = new NoticeBLL();
  33. private Perm_FunctionTypeIBLL perm_FunctionTypeIBLL = new Perm_FunctionTypeBLL();
  34. private DataItemIBLL dataItemIBLL = new DataItemBLL();
  35. private WfSchemeIBLL wfSchemeIBLL = new WfSchemeBLL();
  36. AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL();
  37. private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL();
  38. private Perm_FunctionVisitIBLL functionVisitIbll = new Perm_FunctionVisitBLL();
  39. private ICache redisCache = CacheFactory.CaChe();
  40. private SSO_Drag_DesktopManageIBLL sSO_Drag_DesktopManageIBLL = new SSO_Drag_DesktopManageBLL();
  41. private SYS_SendMessageIBLL sYS_SendMessageIBLL = new SYS_SendMessageBLL();
  42. private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
  43. private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
  44. private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
  45. private ClassroomInfoIBLL classroomInfoIBLL = new ClassroomInfoBLL();
  46. private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL();
  47. private SSO_Drag_CardSortManageIBLL sSO_Drag_CardSortManageIBLL = new SSO_Drag_CardSortManageBLL();
  48. private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL();
  49. private CdLessonSortIBLL cdLessonSortIBLL = new CdLessonSortBLL();
  50. private CdLessonTypeIBLL cdLessonTypeIBLL = new CdLessonTypeBLL();
  51. private BCdCultureDegreeIBLL bCdCultureDegreeIBLL = new BCdCultureDegreeBLL();
  52. private StuScoreNotPassIBLL stuScoreNotPassIBLL = new StuScoreNotPassBLL();
  53. private Sys_QRCodeInLoginIBLL sys_QRCodeInLoginIBLL = new Sys_QRCodeInLoginBLL();
  54. private TeachSwitchIBLL teachSwitchIBLL = new TeachSwitchBLL();
  55. private StuSaverecordIBLL stuSaverecordIBLL = new StuSaverecordBLL();
  56. private StuConsumptionIBLL stuConsumptionIBLL = new StuConsumptionBLL();
  57. #region 统一身份认证2.0
  58. /// <summary>
  59. /// 获取统一认证用户信息
  60. /// </summary>
  61. /// <returns></returns>
  62. public ActionResult authorize()
  63. {
  64. string appid = Request.QueryString["appid"];
  65. string secret = Request.QueryString["secret"];
  66. string appkey = Request.QueryString["appkey"];
  67. if (string.IsNullOrEmpty(appid))
  68. {
  69. return Fail("参数:appid 不能为空");
  70. }
  71. if (string.IsNullOrEmpty(secret))
  72. {
  73. return Fail("参数:secret 不能为空");
  74. }
  75. if (string.IsNullOrEmpty(appkey))
  76. {
  77. return Fail("参数:appkey 不能为空");
  78. }
  79. var application = perm_FunctionIBLL.GetPerm_FunctionEntity(appid);
  80. if (application != null)
  81. {
  82. if (Util.DESEncrypt.Decrypt(application.FSecret,
  83. ConfigurationManager.AppSettings["SSOPublicSecret"]).Equals(secret))
  84. {
  85. try
  86. {
  87. var code = DESEncrypt.Decrypt(appkey, "bjqjsso");
  88. if (!string.IsNullOrEmpty(redisCache.Read<string>(code)))
  89. {
  90. return Success(new { useraccount = redisCache.Read<string>(code) });
  91. }
  92. else
  93. {
  94. return Fail("appkey已过期");
  95. }
  96. }
  97. catch (Exception e)
  98. {
  99. return Fail("appkey错误");
  100. }
  101. }
  102. else
  103. {
  104. return Fail("secret错误");
  105. }
  106. }
  107. else
  108. return Fail("未授权的appid");
  109. }
  110. #endregion
  111. public ActionResult Index()
  112. {
  113. //判断登录状态码
  114. string account = "";
  115. if (!Request.Headers["account"].IsEmpty())
  116. {
  117. account = Request.Headers["account"].ToString();
  118. }
  119. OperatorHelper helper = new OperatorHelper();
  120. var result = helper.IsOnLine(account);
  121. if (result.stateCode != 1)
  122. {
  123. return Redirect("NoLogin");
  124. }
  125. //登录用户
  126. var userInfo = LoginUserInfo.Get();
  127. ViewBag.UserId = userInfo.userId;
  128. //桌面管理表、卡片块排序管理表增加默认数据
  129. sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "one");
  130. //获取桌面、卡片块排序列表
  131. ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderByDescending(x => x.DefaultFlag).ThenBy(x => x.Sort).ThenBy(x => x.CreateDate);
  132. ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList);
  133. //分页查询条件设置
  134. Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
  135. //邮件-收件箱
  136. var maildata = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
  137. var maildataAll = sYS_ReceiveMessageIBLL.GetList("{\"userId\":\"" + userInfo.userId + "\"}");
  138. ViewBag.LanMail = maildata;
  139. ViewBag.LanMailStr = JsonConvert.SerializeObject(ViewBag.LanMail);
  140. ViewBag.LanMailUnReadCount = maildataAll.Count(m => m.READFLAG == 0);
  141. //邮件-已发送
  142. paginationobj.sidx = "SENDTIME desc";
  143. var mailsenddata = sYS_SendMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
  144. var mailsenddataAll = sYS_SendMessageIBLL.GetList2("{\"userId\":\"" + userInfo.userId + "\"}");
  145. ViewBag.LanMailSend = mailsenddata;
  146. ViewBag.LanMailSendStr = JsonConvert.SerializeObject(ViewBag.LanMailSend);
  147. //来往邮件数量
  148. ViewBag.LanMailTotalNum = maildataAll.Count() + mailsenddataAll.Count();
  149. //公文
  150. paginationobj.sidx = "SendTime";
  151. ViewBag.ReceiveFileList = sys_ReceiveFileIBLL.GetPageList(paginationobj, "{\"ReceiverId\":\"" + userInfo.userId + "\"}");
  152. ViewBag.ReceiveFileListStr = JsonConvert.SerializeObject(ViewBag.ReceiveFileList);
  153. //公告
  154. List<NewsEntity> outnewslist = new List<NewsEntity>();
  155. var newsList = newsIBLL.GetList("", userInfo.userId);
  156. foreach (var newsitemEntity in newsList)
  157. {
  158. if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
  159. {
  160. if (!string.IsNullOrEmpty(userInfo.postIds))
  161. {
  162. if (userInfo.postIds.Contains(","))
  163. {
  164. foreach (var postid in userInfo.postIds.Split(','))
  165. {
  166. if (newsitemEntity.F_SendPostId.Contains(postid))
  167. {
  168. outnewslist.Add(newsitemEntity);
  169. break;
  170. }
  171. }
  172. }
  173. else
  174. {
  175. if (newsitemEntity.F_SendPostId.Contains(userInfo.postIds))
  176. {
  177. outnewslist.Add(newsitemEntity);
  178. }
  179. }
  180. }
  181. }
  182. else
  183. {
  184. if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
  185. {
  186. if (newsitemEntity.F_SendDeptId.Contains(userInfo.departmentId))
  187. {
  188. outnewslist.Add(newsitemEntity);
  189. }
  190. }
  191. else
  192. {
  193. outnewslist.Add(newsitemEntity);
  194. }
  195. }
  196. }
  197. ViewBag.NewsList = outnewslist.Take(5);
  198. ViewBag.NewsListStr = JsonConvert.SerializeObject(ViewBag.NewsList);
  199. //宣传报道
  200. var newsListOfxuanchuan = outnewslist.Where(x => x.F_CategoryId == "15").Take(4);
  201. foreach (var item in newsListOfxuanchuan)
  202. {
  203. if (!string.IsNullOrEmpty(item.F_NewsImage))
  204. {
  205. var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath;
  206. if (!string.IsNullOrEmpty(imagePath))
  207. {
  208. item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource"));
  209. }
  210. else
  211. {
  212. item.F_NewsImage = "/Content/images/DragSSO/noLogin.png";
  213. }
  214. }
  215. }
  216. ViewBag.NewsListOfxuanchuan = newsListOfxuanchuan;
  217. ViewBag.NewsListOfxuanchuanStr = JsonConvert.SerializeObject(ViewBag.NewsListOfxuanchuan);
  218. //智慧教育
  219. ViewBag.NewsListOfzhihui = outnewslist.Where(x => x.F_CategoryId == "16").Take(6);
  220. ViewBag.NewsListOfzhihuiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhihui);
  221. //专题推荐
  222. var newsListOfzhuanti = outnewslist.Where(x => x.F_CategoryId == "17").Take(7);
  223. foreach (var item in newsListOfzhuanti)
  224. {
  225. if (!string.IsNullOrEmpty(item.F_NewsImage))
  226. {
  227. var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath;
  228. if (!string.IsNullOrEmpty(imagePath))
  229. {
  230. item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource"));
  231. }
  232. else
  233. {
  234. item.F_NewsImage = "/Content/images/DragSSO/noLogin.png";
  235. }
  236. }
  237. }
  238. ViewBag.NewsListOfzhuanti = newsListOfzhuanti;
  239. ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti);
  240. //办公事项-待办任务
  241. paginationobj.sidx = "F_CreateDate";
  242. paginationobj.rows = 4;
  243. var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}");
  244. ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}");
  245. ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList);
  246. ViewBag.TaskTotalNum = taskListAll.Count();
  247. //办公事项-已办任务
  248. var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}");
  249. ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}");
  250. ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList);
  251. ViewBag.FinishTaskTotalNum = finishTaskListAll.Count();
  252. //办公事项-我发起的
  253. var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}");
  254. ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}");
  255. ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList);
  256. ViewBag.MyListTotalNum = myListAll.Count();
  257. //常用服务
  258. List<ModuleEntity> modulelist = new List<ModuleEntity>();
  259. List<string> offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList();
  260. var moduledata = moduleIBLL.GetModuleList().Where(m => m.F_EnabledMark == 1 && m.F_DeleteMark == 0 && !string.IsNullOrEmpty(m.F_UrlAddress) && m.F_IsMenu == 1 && m.F_Target == "iframe" && !string.IsNullOrEmpty(m.F_ParentId));
  261. foreach (var oitem in offenused)
  262. {
  263. ModuleEntity fod = moduledata.FirstOrDefault(m => m.F_FullName == oitem);
  264. if (fod != null)
  265. {
  266. //找父级
  267. if (fod.F_ParentId == "0")
  268. {
  269. fod.ParentName = fod.F_FullName;
  270. fod.F_ParentId = fod.F_ModuleId;
  271. }
  272. else
  273. {
  274. var parent1 = moduleIBLL.GetModuleEntity(fod.F_ParentId);
  275. if (parent1 != null)
  276. {
  277. if (parent1.F_ParentId == "0")
  278. {
  279. fod.ParentName = parent1.F_FullName;
  280. fod.F_ParentId = parent1.F_ModuleId;
  281. }
  282. else
  283. {
  284. //下一级
  285. var parent2 = moduleIBLL.GetModuleEntity(parent1.F_ParentId);
  286. if (parent2 != null)
  287. {
  288. if (parent2.F_ParentId == "0")
  289. {
  290. fod.ParentName = parent2.F_FullName;
  291. fod.F_ParentId = parent2.F_ModuleId;
  292. }
  293. else
  294. {
  295. //下一级
  296. var parent3 = moduleIBLL.GetModuleEntity(parent2.F_ParentId);
  297. if (parent3 != null)
  298. {
  299. if (parent3.F_ParentId == "0")
  300. {
  301. fod.ParentName = parent3.F_FullName;
  302. fod.F_ParentId = parent3.F_ModuleId;
  303. }
  304. else
  305. {
  306. //下一级
  307. var parent4 = moduleIBLL.GetModuleEntity(parent3.F_ParentId);
  308. if (parent4 != null)
  309. {
  310. if (parent4.F_ParentId == "0")
  311. {
  312. fod.ParentName = parent4.F_FullName;
  313. fod.F_ParentId = parent4.F_ModuleId;
  314. }
  315. }
  316. }
  317. }
  318. }
  319. }
  320. }
  321. }
  322. }
  323. modulelist.Add(fod);
  324. }
  325. }
  326. ViewBag.OffenusedAll = modulelist;
  327. var mm = modulelist.GroupBy(x => x.F_ParentId).Select(x => new ModuleEntity()
  328. {
  329. F_ParentId = x.Key,
  330. ParentName = x.FirstOrDefault().ParentName,
  331. ChildrenList = x.Select(y => new ModuleEntity()
  332. {
  333. F_ModuleId = y.F_ModuleId,
  334. F_FullName = y.F_FullName
  335. }).ToList()
  336. }).ToList();
  337. ViewBag.OffenusedGroup = mm;
  338. ViewBag.OffenusedGroupStr = JsonConvert.SerializeObject(ViewBag.OffenusedGroup);
  339. //查找服务
  340. List<ModuleEntity> searchmodulelist = new List<ModuleEntity>();
  341. foreach (var item in moduledata)
  342. {
  343. if (moduleIBLL.GetColumnList(item.F_ModuleId).Any())
  344. {
  345. item.FirstLetter = Str.PinYin(item.F_FullName).Substring(0, 1);
  346. searchmodulelist.Add(item);
  347. }
  348. }
  349. ViewBag.SearchModule = searchmodulelist;
  350. //校园总览
  351. //专业
  352. var countinfos = cdMajorIBLL.GetCountInfos();
  353. ViewBag.MajorTotalNum = countinfos.Rows[0]["zy_nums"];
  354. //班级
  355. //var classInfoData = classInfoIBLL.GetAllClass();
  356. ViewBag.ClassInfoTotalNum = countinfos.Rows[0]["bj_nums"];
  357. //学生
  358. //var stuInfoData = stuInfoBasicIBLL.GetAllList();
  359. ViewBag.StuInfoTotalNum = countinfos.Rows[0]["stu_nums"];
  360. //教师
  361. //var teacherData = empInfoIBLL.GetAllList();
  362. ViewBag.TeacherTotalNum = countinfos.Rows[0]["tea_nums"];
  363. //教室
  364. //var classRoomData = classroomInfoIBLL.GetAllList();
  365. ViewBag.ClassRoomTotalNum = countinfos.Rows[0]["js_nums"];
  366. //课程
  367. //var lessonData = lessonInfoIBLL.GetAllList();
  368. ViewBag.LessonTotalNum = countinfos.Rows[0]["kc_nums"];
  369. //专业总览
  370. //专业学生
  371. var majorstu=cdMajorIBLL.Getmajorstu().ToJson();
  372. //var stuByMajor = stuInfoData.GroupBy(x => x.MajorNo).Select(x => new
  373. //{
  374. // value = x.Select(y => y.StuId).Count(),
  375. // name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
  376. //});
  377. //ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
  378. ViewBag.StuByMajorStr = majorstu;
  379. //流程
  380. var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
  381. var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  382. var allCount = 0;
  383. foreach (var flow in flowType)
  384. {
  385. var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
  386. flow.FlowCount = count;
  387. allCount += count;
  388. }
  389. ViewBag.AllCount = allCount;
  390. ViewBag.FlowType = flowType;
  391. ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
  392. //校园一卡通余额
  393. ViewBag.StuSaveRecordTotalNum = 0;
  394. //var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
  395. //if (stuSaveRecordList.Any())
  396. //{
  397. // ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE;
  398. //}
  399. //红湖付款码余额
  400. ViewBag.StuConsumptionTotalNum = 0;
  401. //var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account);
  402. //if (stuConsumptionList.Any())
  403. //{
  404. // ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum();
  405. //}
  406. //常用链接
  407. var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId);
  408. var ff = userfunctionlist.GroupBy(x => x.FTName).Select(x => new Perm_FunctionEntity()
  409. {
  410. FTName = x.Key,
  411. PFunctionList = x.Select(y => new Perm_FunctionEntity()
  412. {
  413. FId = y.FId,
  414. FTId = y.FTId,
  415. FName = y.FName,
  416. UPId = DESEncrypt.Encrypt(y.FId, ConfigurationManager.AppSettings["SSOPublicSecret"]),//sysid
  417. UserId = DESEncrypt.Encrypt(userInfo.userId, ConfigurationManager.AppSettings["SSOPublicSecret"])//openid
  418. }).Take(8).ToList()
  419. });
  420. ViewBag.FunctionList = ff;
  421. ViewBag.FunctionListStr = JsonConvert.SerializeObject(ViewBag.FunctionList);
  422. return View("DragModelOne");
  423. }
  424. //public ActionResult NoLogin()
  425. //{
  426. // var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
  427. // var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  428. // var allCount = 0;
  429. // foreach (var flow in flowType)
  430. // {
  431. // var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
  432. // flow.FlowCount = count;
  433. // allCount += count;
  434. // }
  435. // ViewBag.AllCount = allCount;
  436. // ViewBag.FlowType = flowType;
  437. // ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
  438. // return View();
  439. //}
  440. private UserService userService = new UserService();
  441. public ActionResult ResetPWD(string password)
  442. {
  443. password = Md5Helper.Encrypt(password, 32);
  444. userService.RevisePassword("System", password);
  445. return Success("修改成功");
  446. }
  447. [HandlerLogin(FilterMode.Enforce)]
  448. public ActionResult Work()
  449. {
  450. ViewBag.FlowType = dataItemIBLL.GetDetailList("FlowSort", "");
  451. ViewBag.FlowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  452. return View();
  453. }
  454. //[HandlerLogin(FilterMode.Enforce)]
  455. public ActionResult workTwo()
  456. {
  457. var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
  458. var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  459. var allCount = 0;
  460. foreach (var flow in flowType)
  461. {
  462. var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
  463. flow.FlowCount = count;
  464. allCount += count;
  465. }
  466. ViewBag.AllCount = allCount;
  467. ViewBag.FlowType = flowType;
  468. ViewBag.FlowList = flowList;
  469. return View();
  470. }
  471. [HandlerLogin(FilterMode.Enforce)]
  472. public ActionResult UserService()
  473. {
  474. ViewBag.FlowType = dataItemIBLL.GetDetailList("FlowSort", "");
  475. ViewBag.FlowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  476. return View();
  477. }
  478. [HandlerLogin(FilterMode.Enforce)]
  479. public ActionResult NewsList()
  480. {
  481. var userinfo = LoginUserInfo.Get();
  482. int page = 1;
  483. if (!string.IsNullOrEmpty(Request.QueryString["page"]))
  484. {
  485. page = Convert.ToInt32(Request.QueryString["page"]);
  486. }
  487. //公告
  488. Pagination paginationobj = new Pagination() { rows = 10, page = page, sidx = "F_CreateDate", sord = "desc" };
  489. paginationobj.rows = 100;
  490. var newsList = newsIBLL.GetList("", userinfo.userId);
  491. //用户可以看到的通知公告
  492. var newsListSelf = new List<NewsEntity>();
  493. foreach (var newsitemEntity in newsList)
  494. {
  495. if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
  496. {
  497. if (!string.IsNullOrEmpty(userinfo.postIds))
  498. {
  499. if (userinfo.postIds.Contains(","))
  500. {
  501. foreach (var postid in userinfo.postIds.Split(','))
  502. {
  503. if (newsitemEntity.F_SendPostId.Contains(postid))
  504. {
  505. newsListSelf.Add(newsitemEntity);
  506. break;
  507. }
  508. }
  509. }
  510. else
  511. {
  512. if (newsitemEntity.F_SendPostId.Contains(userinfo.postIds))
  513. {
  514. newsListSelf.Add(newsitemEntity);
  515. }
  516. }
  517. }
  518. }
  519. else
  520. {
  521. if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
  522. {
  523. if (newsitemEntity.F_SendDeptId.Contains(userinfo.departmentId))
  524. {
  525. newsListSelf.Add(newsitemEntity);
  526. }
  527. }
  528. else
  529. {
  530. newsListSelf.Add(newsitemEntity);
  531. }
  532. }
  533. }
  534. foreach (var ufitem in newsListSelf)
  535. {
  536. if (!string.IsNullOrEmpty(ufitem.F_NewsImage))
  537. {
  538. if (annexesFileIBLL.GetEntityByFolderId(ufitem.F_NewsImage) != null)
  539. {
  540. var imagePath = annexesFileIBLL.GetEntityByFolderId(ufitem.F_NewsImage).F_FilePath;
  541. if (!string.IsNullOrEmpty(imagePath))
  542. {
  543. ufitem.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource") - 1);
  544. }
  545. else
  546. {
  547. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  548. }
  549. }
  550. else
  551. {
  552. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  553. }
  554. }
  555. else
  556. {
  557. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  558. }
  559. }
  560. ViewBag.NewsList = newsListSelf;
  561. return View(paginationobj);
  562. }
  563. [HandlerLogin(FilterMode.Enforce)]
  564. public ActionResult newsTwo()
  565. {
  566. var userinfo = LoginUserInfo.Get();
  567. int page = 1;
  568. if (!string.IsNullOrEmpty(Request.QueryString["page"]))
  569. {
  570. page = Convert.ToInt32(Request.QueryString["page"]);
  571. }
  572. //公告
  573. Pagination paginationobj = new Pagination() { rows = 10, page = page, sidx = "F_CreateDate", sord = "desc" };
  574. var newsList = newsIBLL.GetList("", userinfo.userId);
  575. //用户可以看到的通知公告
  576. var newsListSelf = new List<NewsEntity>();
  577. foreach (var newsitemEntity in newsList)
  578. {
  579. if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
  580. {
  581. if (!string.IsNullOrEmpty(userinfo.postIds))
  582. {
  583. if (userinfo.postIds.Contains(","))
  584. {
  585. foreach (var postid in userinfo.postIds.Split(','))
  586. {
  587. if (newsitemEntity.F_SendPostId.Contains(postid))
  588. {
  589. newsListSelf.Add(newsitemEntity);
  590. break;
  591. }
  592. }
  593. }
  594. else
  595. {
  596. if (newsitemEntity.F_SendPostId.Contains(userinfo.postIds))
  597. {
  598. newsListSelf.Add(newsitemEntity);
  599. }
  600. }
  601. }
  602. }
  603. else
  604. {
  605. if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
  606. {
  607. if (newsitemEntity.F_SendDeptId.Contains(userinfo.departmentId))
  608. {
  609. newsListSelf.Add(newsitemEntity);
  610. }
  611. }
  612. else
  613. {
  614. newsListSelf.Add(newsitemEntity);
  615. }
  616. }
  617. }
  618. foreach (var ufitem in newsListSelf)
  619. {
  620. if (!string.IsNullOrEmpty(ufitem.F_NewsImage))
  621. {
  622. if (annexesFileIBLL.GetEntityByFolderId(ufitem.F_NewsImage) != null)
  623. {
  624. var imagePath = annexesFileIBLL.GetEntityByFolderId(ufitem.F_NewsImage).F_FilePath;
  625. if (!string.IsNullOrEmpty(imagePath))
  626. {
  627. ufitem.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource") - 1);
  628. }
  629. else
  630. {
  631. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  632. }
  633. }
  634. else
  635. {
  636. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  637. }
  638. }
  639. else
  640. {
  641. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  642. }
  643. }
  644. //公告
  645. ViewBag.NewsList = newsListSelf;
  646. //内部邮件
  647. paginationobj.sidx = "readflag asc,SENDTIME desc ";
  648. ViewBag.LanMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}");
  649. //办公事项
  650. paginationobj.sidx = "F_CreateDate";
  651. //ViewBag.TaskList = wfTaskIBLL.GetActiveList(userinfo, paginationobj, "{}");
  652. ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userinfo, paginationobj, "{}");
  653. //学校公文
  654. paginationobj.sidx = "SendTime";
  655. ViewBag.ReceiveFileList = sys_ReceiveFileIBLL.GetPageList(paginationobj, "{\"ReceiverId\":\"" + userinfo.userId + "\"}");
  656. return View();
  657. }
  658. public PartialViewResult LanMail()
  659. {
  660. var userinfo = LoginUserInfo.Get();
  661. int page = 1;
  662. if (!string.IsNullOrEmpty(Request.QueryString["page"]))
  663. {
  664. page = Convert.ToInt32(Request.QueryString["page"]);
  665. }
  666. Pagination paginationobj = new Pagination() { rows = 10, page = page, sidx = "readflag asc,SENDTIME desc", sord = "desc" };
  667. ViewBag.LanMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}");
  668. return PartialView(paginationobj);
  669. }
  670. public PartialViewResult TaskList()
  671. {
  672. var userinfo = LoginUserInfo.Get();
  673. int page = 1;
  674. if (!string.IsNullOrEmpty(Request.QueryString["page"]))
  675. {
  676. page = Convert.ToInt32(Request.QueryString["page"]);
  677. }
  678. Pagination paginationobj = new Pagination() { rows = 10, page = page, sidx = "F_CreateDate", sord = "desc" };
  679. ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userinfo, paginationobj, "{}");
  680. //ViewBag.TaskList = wfTaskIBLL.GetActiveList(userinfo, paginationobj, "{}");
  681. return PartialView(paginationobj);
  682. }
  683. public PartialViewResult ReceiveFileList()
  684. {
  685. var userinfo = LoginUserInfo.Get();
  686. int page = 1;
  687. if (!string.IsNullOrEmpty(Request.QueryString["page"]))
  688. {
  689. page = Convert.ToInt32(Request.QueryString["page"]);
  690. }
  691. Pagination paginationobj = new Pagination() { rows = 10, page = page, sidx = "SendTime", sord = "desc" };
  692. ViewBag.ReceiveFileList = sys_ReceiveFileIBLL.GetPageList(paginationobj, "{\"ReceiverId\":\"" + userinfo.userId + "\"}");
  693. return PartialView(paginationobj);
  694. }
  695. public PartialViewResult NewList()
  696. {
  697. var userinfo = LoginUserInfo.Get();
  698. int page = 1;
  699. if (!string.IsNullOrEmpty(Request.QueryString["page"]))
  700. {
  701. page = Convert.ToInt32(Request.QueryString["page"]);
  702. }
  703. //公告
  704. Pagination paginationobj = new Pagination() { rows = 10, page = page, sidx = "F_CreateDate", sord = "desc" };
  705. var newsList = newsIBLL.GetList("", userinfo.userId);
  706. //用户可以看到的通知公告
  707. var newsListSelf = new List<NewsEntity>();
  708. foreach (var newsitemEntity in newsList)
  709. {
  710. if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
  711. {
  712. if (!string.IsNullOrEmpty(userinfo.postIds))
  713. {
  714. if (userinfo.postIds.Contains(","))
  715. {
  716. foreach (var postid in userinfo.postIds.Split(','))
  717. {
  718. if (newsitemEntity.F_SendPostId.Contains(postid))
  719. {
  720. newsListSelf.Add(newsitemEntity);
  721. break;
  722. }
  723. }
  724. }
  725. else
  726. {
  727. if (newsitemEntity.F_SendPostId.Contains(userinfo.postIds))
  728. {
  729. newsListSelf.Add(newsitemEntity);
  730. }
  731. }
  732. }
  733. }
  734. else
  735. {
  736. if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
  737. {
  738. if (newsitemEntity.F_SendDeptId.Contains(userinfo.departmentId))
  739. {
  740. newsListSelf.Add(newsitemEntity);
  741. }
  742. }
  743. else
  744. {
  745. newsListSelf.Add(newsitemEntity);
  746. }
  747. }
  748. }
  749. foreach (var ufitem in newsListSelf)
  750. {
  751. if (!string.IsNullOrEmpty(ufitem.F_NewsImage))
  752. {
  753. if (annexesFileIBLL.GetEntityByFolderId(ufitem.F_NewsImage) != null)
  754. {
  755. var imagePath = annexesFileIBLL.GetEntityByFolderId(ufitem.F_NewsImage).F_FilePath;
  756. if (!string.IsNullOrEmpty(imagePath))
  757. {
  758. ufitem.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource") - 1);
  759. }
  760. else
  761. {
  762. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  763. }
  764. }
  765. else
  766. {
  767. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  768. }
  769. }
  770. else
  771. {
  772. ufitem.F_NewsImage = "/Resource/NewsDefault.jpg";
  773. }
  774. }
  775. //公告
  776. ViewBag.NewsList = newsListSelf;
  777. return PartialView(paginationobj);
  778. }
  779. [HandlerLogin(FilterMode.Enforce)]
  780. public ActionResult NewsDetail()
  781. {
  782. return View();
  783. }
  784. public ActionResult Check()
  785. {
  786. try
  787. {
  788. string redi = Request.QueryString["redi"];
  789. if (!string.IsNullOrEmpty(redi))
  790. {
  791. string publickey = ConfigurationManager.AppSettings["SSOPublicSecret"];
  792. string uid = Request.QueryString["u"];
  793. string pwd = Request.QueryString["p"];
  794. string logintime = Request.QueryString["t"];
  795. string n = Request.QueryString["n"];
  796. string mail = Request.QueryString["mail"];
  797. string sendfile = Request.QueryString["sendfile"];
  798. string task = Request.QueryString["task"];
  799. string gotomain = Request.QueryString["gotomain"];
  800. string nk = Request.QueryString["nk"];
  801. string jx = Request.QueryString["jx"];
  802. string zl = Request.QueryString["zl"];
  803. if (!string.IsNullOrEmpty(uid) && !string.IsNullOrEmpty(logintime))
  804. {
  805. decimal decodelogintime = Convert.ToDecimal(DESEncrypt.Decrypt(logintime, publickey));
  806. decimal datetimenow = Convert.ToDecimal(DateTime.Now.ToString("yyyyMMddHHmmss"));
  807. if (datetimenow - 300 <= decodelogintime && datetimenow + 300 >= decodelogintime)
  808. {
  809. string username = DESEncrypt.Decrypt(uid, publickey);
  810. string password = DESEncrypt.Decrypt(pwd, publickey);
  811. UserEntity userEntity = userBll.CheckLogin(username, Md5Helper.Encrypt(password, 32));
  812. LogEntity logEntity = new LogEntity();
  813. logEntity.F_CategoryId = 1;
  814. logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString();
  815. logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login);
  816. logEntity.F_OperateAccount = username + "(" + userEntity.F_RealName + ")";
  817. logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : username;
  818. logEntity.F_Module = Config.GetValue("SoftName");
  819. logEntity.F_Description = "PC端";
  820. if (!userEntity.LoginOk)//登录失败
  821. {
  822. //写入日志
  823. logEntity.F_ExecuteResult = 0;
  824. logEntity.F_ExecuteResultJson = "sso登录失败:" + userEntity.LoginMsg;
  825. logEntity.WriteLog();
  826. return Fail(userEntity.LoginMsg);
  827. }
  828. else
  829. {
  830. OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息
  831. //写入日志
  832. logEntity.F_ExecuteResult = 1;
  833. logEntity.F_ExecuteResultJson = "sso登录成功";
  834. logEntity.WriteLog();
  835. var DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"];
  836. var Returnurl = "http://" + Request.Url.Host + ":" + Request.Url.Port;
  837. if (!string.IsNullOrEmpty(n))
  838. {
  839. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=6252983c-52f5-402c-991b-ad19a9cb1f94&keyValue=" + n));
  840. }
  841. else if (!string.IsNullOrEmpty(mail))
  842. {
  843. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=252878d7-d807-497f-b01e-839bb1b869c6"));
  844. }
  845. else if (!string.IsNullOrEmpty(sendfile))
  846. {
  847. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=19637c39-624d-4be6-b680-04250f8df71f"));
  848. }
  849. else if (!string.IsNullOrEmpty(task))
  850. {
  851. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf"));
  852. }
  853. else if (!string.IsNullOrEmpty(gotomain))
  854. {
  855. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index"));
  856. }
  857. else if (!string.IsNullOrEmpty(nk))
  858. {
  859. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=07ceccd0-cf74-42ec-9b7d-3b36af0be451"));
  860. }
  861. else if (!string.IsNullOrEmpty(jx))
  862. {
  863. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=5f2e3e9b-b0da-421a-b370-671dcae4fc17"));
  864. }
  865. else if (!string.IsNullOrEmpty(zl))
  866. {
  867. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + HttpUtility.UrlEncode(Returnurl + "/Home/Index?autoopen=8dfd9f38-8cab-49ff-b4d1-8b899b1ecbca"));
  868. }
  869. else
  870. {
  871. return Redirect(DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index");
  872. }
  873. }
  874. }
  875. else
  876. {
  877. return Fail("时间戳验证失败");
  878. }
  879. }
  880. else
  881. {
  882. return Fail("参数错误");
  883. }
  884. }
  885. else
  886. {
  887. return View();
  888. }
  889. }
  890. catch (Exception e)
  891. {
  892. return Fail("参数错误");
  893. }
  894. }
  895. public ActionResult FirstLogin(Perm_FunctionEntity up)
  896. {
  897. string publickey = ConfigurationManager.AppSettings["SSOPublicSecret"];
  898. if (up != null && !string.IsNullOrEmpty(up.UPId))
  899. {
  900. perm_FunctionIBLL.SaveEntityByUPId(up.UPId, up);
  901. return Redirect("/SSOSystem/GoTo?sysid=" + DESEncrypt.Encrypt(up.FId, publickey) + "&openid=" + DESEncrypt.Encrypt(up.UserId, publickey));
  902. }
  903. string sysid = Request.QueryString["sysid"];
  904. string strsysid = DESEncrypt.Decrypt(sysid, publickey);
  905. string openid = Request.QueryString["openid"];
  906. string userid = DESEncrypt.Decrypt(openid, publickey);
  907. var uplist = permUserPermissionIbll.GetPerm_UserPermissionEntityByFIdAndUid(strsysid, userid);
  908. if (uplist == null)
  909. {
  910. return Fail("用户未授权。");
  911. }
  912. var perfun = perm_FunctionIBLL.GetPerm_FunctionEntityByUPId(uplist.UPId);
  913. return View(perfun);
  914. }
  915. public ActionResult GoTo()
  916. {
  917. try
  918. {
  919. string redi = Request.QueryString["redi"];
  920. if (!string.IsNullOrEmpty(redi))
  921. {
  922. string publickey = ConfigurationManager.AppSettings["SSOPublicSecret"];
  923. string sysid = Request.QueryString["sysid"];
  924. string strsysid = DESEncrypt.Decrypt(sysid, publickey);
  925. string openid = Request.QueryString["openid"];
  926. string userid = DESEncrypt.Decrypt(openid, publickey);
  927. var uplist = permUserPermissionIbll.GetPerm_UserPermissionEntityByFIdAndUid(strsysid, userid);
  928. Perm_FunctionVisitEntity functionVisitEntity = new Perm_FunctionVisitEntity();
  929. functionVisitEntity.Create();
  930. functionVisitEntity.Fid = strsysid;
  931. functionVisitEntity.PDate = DateTime.Now;
  932. functionVisitEntity.PUId = userid;
  933. var userinfo = userBll.GetEntityByUserId(userid);
  934. functionVisitEntity.PUName = userinfo.F_RealName;
  935. if (uplist == null)
  936. {
  937. functionVisitEntity.PIsLoginSuccess = false;
  938. functionVisitEntity.PContent = "用户未授权";
  939. functionVisitIbll.SaveEntity(null, functionVisitEntity);
  940. return Fail("用户未授权。");
  941. }
  942. var perfun = perm_FunctionIBLL.GetPerm_FunctionEntityByUPId(uplist.UPId);
  943. string secretkey = DESEncrypt.Decrypt(perfun.FSecret, publickey);
  944. if (perfun.FIsManagePage == true)
  945. {
  946. if (!string.IsNullOrEmpty(perfun.FInterfaceUrl))
  947. {
  948. if (!string.IsNullOrEmpty(perfun.UPUserName) && !string.IsNullOrEmpty(perfun.UPPass))
  949. {
  950. functionVisitEntity.PIsLoginSuccess = true;
  951. functionVisitEntity.PContent = "成功转到统一认证网站:" + perfun.FUrl;
  952. functionVisitIbll.SaveEntity(null, functionVisitEntity);
  953. return Redirect(perfun.FInterfaceUrl + "?u=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(perfun.UPUserName, secretkey), publickey) + "&p=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(perfun.UPPass, secretkey), publickey) + "&t=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(DateTime.Now.ToString("yyyyMMddHHmmss"), secretkey), publickey) + "&ip=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(GetIP(), secretkey), publickey));
  954. }
  955. else
  956. {
  957. functionVisitEntity.PIsLoginSuccess = false;
  958. functionVisitEntity.PContent = "用户未配置转到用户名密码配置页面";
  959. functionVisitIbll.SaveEntity(null, functionVisitEntity);
  960. //用户未配置转到用户名密码配置页面
  961. return Redirect("/SSOSystem/FirstLogin?sysid=" + sysid + "&openid=" + openid);
  962. }
  963. }
  964. else
  965. {
  966. functionVisitEntity.PIsLoginSuccess = false;
  967. functionVisitEntity.PContent = "未配置登录接口地址";
  968. functionVisitIbll.SaveEntity(null, functionVisitEntity);
  969. return Fail("未配置登录接口地址。");
  970. }
  971. }
  972. else
  973. {
  974. if (!string.IsNullOrEmpty(perfun.FUrl))
  975. {
  976. functionVisitEntity.PIsLoginSuccess = true;
  977. functionVisitEntity.PContent = "成功转到统一认证网站:" + perfun.FUrl;
  978. functionVisitIbll.SaveEntity(null, functionVisitEntity);
  979. return Redirect(perfun.FUrl);
  980. }
  981. else
  982. {
  983. functionVisitEntity.PIsLoginSuccess = false;
  984. functionVisitEntity.PContent = "未配置地址";
  985. functionVisitIbll.SaveEntity(null, functionVisitEntity);
  986. return Fail("未配置地址。");
  987. }
  988. }
  989. }
  990. else
  991. {
  992. return View();
  993. }
  994. }
  995. catch (Exception e)
  996. {
  997. return Fail("参数错误。");
  998. }
  999. }
  1000. /// <summary>
  1001. /// 获取IP
  1002. /// </summary>
  1003. /// <returns></returns>
  1004. private string GetIP()
  1005. {
  1006. string ip = string.Empty;
  1007. if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"]))
  1008. ip = Convert.ToString(System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
  1009. if (string.IsNullOrEmpty(ip))
  1010. ip = Convert.ToString(System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]);
  1011. return ip;
  1012. }
  1013. /// <summary>
  1014. /// 网上办事大厅拖拽版-未登录页面
  1015. /// </summary>
  1016. /// <returns></returns>
  1017. public ActionResult NoLogin()
  1018. {
  1019. //获取错误次数
  1020. ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum();
  1021. //获取高职版跳转地址
  1022. ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"];
  1023. ViewBag.Returnurl = "http://" + Request.Url.Host + ":" + Request.Url.Port;
  1024. //获取登录页二维码配置信息
  1025. ViewBag.HasQRCode = false;
  1026. var qrcodelist = sys_QRCodeInLoginIBLL.GetList().ToList().Where(x => x.EnabledMark == 1).OrderByDescending(x => x.CreateTime);
  1027. if (qrcodelist.Any())
  1028. {
  1029. ViewBag.HasQRCode = true;
  1030. ViewBag.QRCodeUrl = qrcodelist.FirstOrDefault().QRCodeUrl;
  1031. ViewBag.QRCodeText = qrcodelist.FirstOrDefault().Title;
  1032. }
  1033. //微信快捷登录
  1034. var result4 = teachSwitchIBLL.FindFirst("wxloginforpc");
  1035. ViewBag.WeixinLoginSwitch = result4;
  1036. return View("DragNoLogin");
  1037. }
  1038. /// <summary>
  1039. /// 网上办事大厅拖拽版-未登录页面-微信登录
  1040. /// </summary>
  1041. /// <returns></returns>
  1042. public ActionResult DragNoWxLogin()
  1043. {
  1044. string QQOpenId = Request.QueryString["QQOpenId"];
  1045. string WeixinOpenId = Request.QueryString["WeixinOpenId"];
  1046. ViewBag.WeixinOpenId = WeixinOpenId;
  1047. ViewBag.QQOpenId = QQOpenId;
  1048. //获取错误次数
  1049. ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum();
  1050. //获取高职版跳转地址
  1051. ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"];
  1052. ViewBag.Returnurl = "http://" + Request.Url.Host + ":" + Request.Url.Port;
  1053. //获取登录页二维码配置信息
  1054. ViewBag.HasQRCode = false;
  1055. var qrcodelist = sys_QRCodeInLoginIBLL.GetList().ToList().Where(x => x.EnabledMark == 1).OrderByDescending(x => x.CreateTime);
  1056. if (qrcodelist.Any())
  1057. {
  1058. ViewBag.HasQRCode = true;
  1059. ViewBag.QRCodeUrl = qrcodelist.FirstOrDefault().QRCodeUrl;
  1060. ViewBag.QRCodeText = qrcodelist.FirstOrDefault().Title;
  1061. }
  1062. return View();
  1063. }
  1064. /// <summary>
  1065. /// 网上办事大厅拖拽版-办事大厅模式
  1066. /// </summary>
  1067. /// <returns></returns>
  1068. public ActionResult DragModelOne()
  1069. {
  1070. //判断登录状态码
  1071. string account = "";
  1072. if (!Request.Headers["account"].IsEmpty())
  1073. {
  1074. account = Request.Headers["account"].ToString();
  1075. }
  1076. OperatorHelper helper = new OperatorHelper();
  1077. var result = helper.IsOnLine(account);
  1078. if (result.stateCode != 1)
  1079. {
  1080. return Redirect("NoLogin");
  1081. }
  1082. //登录用户
  1083. var userInfo = LoginUserInfo.Get();
  1084. ViewBag.UserId = userInfo.userId;
  1085. //桌面管理表、卡片块排序管理表增加默认数据
  1086. sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "one");
  1087. //获取桌面、卡片块排序列表
  1088. ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "one").OrderByDescending(x => x.DefaultFlag).ThenBy(x => x.Sort).ThenBy(x => x.CreateDate);
  1089. ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList);
  1090. //分页查询条件设置
  1091. Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
  1092. //邮件-收件箱
  1093. var maildata = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
  1094. var maildataAll = sYS_ReceiveMessageIBLL.GetList("{\"userId\":\"" + userInfo.userId + "\"}");
  1095. ViewBag.LanMail = maildata;
  1096. ViewBag.LanMailStr = JsonConvert.SerializeObject(ViewBag.LanMail);
  1097. ViewBag.LanMailUnReadCount = maildataAll.Count(m => m.READFLAG == 0);
  1098. //邮件-已发送
  1099. paginationobj.sidx = "SENDTIME desc";
  1100. var mailsenddata = sYS_SendMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
  1101. var mailsenddataAll = sYS_SendMessageIBLL.GetList2("{\"userId\":\"" + userInfo.userId + "\"}");
  1102. ViewBag.LanMailSend = mailsenddata;
  1103. ViewBag.LanMailSendStr = JsonConvert.SerializeObject(ViewBag.LanMailSend);
  1104. //来往邮件数量
  1105. ViewBag.LanMailTotalNum = maildataAll.Count() + mailsenddataAll.Count();
  1106. //公文
  1107. paginationobj.sidx = "SendTime";
  1108. ViewBag.ReceiveFileList = sys_ReceiveFileIBLL.GetPageList(paginationobj, "{\"ReceiverId\":\"" + userInfo.userId + "\"}");
  1109. ViewBag.ReceiveFileListStr = JsonConvert.SerializeObject(ViewBag.ReceiveFileList);
  1110. //公告
  1111. List<NewsEntity> outnewslist = new List<NewsEntity>();
  1112. var newsList = newsIBLL.GetList("", userInfo.userId);
  1113. foreach (var newsitemEntity in newsList)
  1114. {
  1115. if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
  1116. {
  1117. if (!string.IsNullOrEmpty(userInfo.postIds))
  1118. {
  1119. if (userInfo.postIds.Contains(","))
  1120. {
  1121. foreach (var postid in userInfo.postIds.Split(','))
  1122. {
  1123. if (newsitemEntity.F_SendPostId.Contains(postid))
  1124. {
  1125. outnewslist.Add(newsitemEntity);
  1126. break;
  1127. }
  1128. }
  1129. }
  1130. else
  1131. {
  1132. if (newsitemEntity.F_SendPostId.Contains(userInfo.postIds))
  1133. {
  1134. outnewslist.Add(newsitemEntity);
  1135. }
  1136. }
  1137. }
  1138. }
  1139. else
  1140. {
  1141. if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
  1142. {
  1143. if (newsitemEntity.F_SendDeptId.Contains(userInfo.departmentId))
  1144. {
  1145. outnewslist.Add(newsitemEntity);
  1146. }
  1147. }
  1148. else
  1149. {
  1150. outnewslist.Add(newsitemEntity);
  1151. }
  1152. }
  1153. }
  1154. ViewBag.NewsList = outnewslist.Take(5);
  1155. ViewBag.NewsListStr = JsonConvert.SerializeObject(ViewBag.NewsList);
  1156. //宣传报道
  1157. var newsListOfxuanchuan = outnewslist.Where(x => x.F_CategoryId == "15").Take(4);
  1158. foreach (var item in newsListOfxuanchuan)
  1159. {
  1160. if (!string.IsNullOrEmpty(item.F_NewsImage))
  1161. {
  1162. var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath;
  1163. if (!string.IsNullOrEmpty(imagePath))
  1164. {
  1165. item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource"));
  1166. }
  1167. else
  1168. {
  1169. item.F_NewsImage = "/Content/images/DragSSO/noLogin.png";
  1170. }
  1171. }
  1172. }
  1173. ViewBag.NewsListOfxuanchuan = newsListOfxuanchuan;
  1174. ViewBag.NewsListOfxuanchuanStr = JsonConvert.SerializeObject(ViewBag.NewsListOfxuanchuan);
  1175. //智慧教育
  1176. ViewBag.NewsListOfzhihui = outnewslist.Where(x => x.F_CategoryId == "16").Take(6);
  1177. ViewBag.NewsListOfzhihuiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhihui);
  1178. //专题推荐
  1179. var newsListOfzhuanti = outnewslist.Where(x => x.F_CategoryId == "17").Take(7);
  1180. foreach (var item in newsListOfzhuanti)
  1181. {
  1182. if (!string.IsNullOrEmpty(item.F_NewsImage))
  1183. {
  1184. var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath;
  1185. if (!string.IsNullOrEmpty(imagePath))
  1186. {
  1187. item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource"));
  1188. }
  1189. else
  1190. {
  1191. item.F_NewsImage = "/Content/images/DragSSO/noLogin.png";
  1192. }
  1193. }
  1194. }
  1195. ViewBag.NewsListOfzhuanti = newsListOfzhuanti;
  1196. ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti);
  1197. //办公事项-待办任务
  1198. paginationobj.sidx = "F_CreateDate";
  1199. paginationobj.rows = 4;
  1200. var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}");
  1201. ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}");
  1202. ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList);
  1203. ViewBag.TaskTotalNum = taskListAll.Count();
  1204. //办公事项-已办任务
  1205. var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}");
  1206. ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}");
  1207. ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList);
  1208. ViewBag.FinishTaskTotalNum = finishTaskListAll.Count();
  1209. //办公事项-我发起的
  1210. var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}");
  1211. ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}");
  1212. ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList);
  1213. ViewBag.MyListTotalNum = myListAll.Count();
  1214. //常用服务
  1215. List<ModuleEntity> modulelist = new List<ModuleEntity>();
  1216. List<string> offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList();
  1217. var moduledata = moduleIBLL.GetModuleList().Where(m => m.F_EnabledMark == 1 && m.F_DeleteMark == 0 && !string.IsNullOrEmpty(m.F_UrlAddress) && m.F_IsMenu == 1 && m.F_Target == "iframe" && !string.IsNullOrEmpty(m.F_ParentId));
  1218. foreach (var oitem in offenused)
  1219. {
  1220. ModuleEntity fod = moduledata.FirstOrDefault(m => m.F_FullName == oitem);
  1221. if (fod != null)
  1222. {
  1223. //找父级
  1224. if (fod.F_ParentId == "0")
  1225. {
  1226. fod.ParentName = fod.F_FullName;
  1227. fod.F_ParentId = fod.F_ModuleId;
  1228. }
  1229. else
  1230. {
  1231. var parent1 = moduleIBLL.GetModuleEntity(fod.F_ParentId);
  1232. if (parent1 != null)
  1233. {
  1234. if (parent1.F_ParentId == "0")
  1235. {
  1236. fod.ParentName = parent1.F_FullName;
  1237. fod.F_ParentId = parent1.F_ModuleId;
  1238. }
  1239. else
  1240. {
  1241. //下一级
  1242. var parent2 = moduleIBLL.GetModuleEntity(parent1.F_ParentId);
  1243. if (parent2 != null)
  1244. {
  1245. if (parent2.F_ParentId == "0")
  1246. {
  1247. fod.ParentName = parent2.F_FullName;
  1248. fod.F_ParentId = parent2.F_ModuleId;
  1249. }
  1250. else
  1251. {
  1252. //下一级
  1253. var parent3 = moduleIBLL.GetModuleEntity(parent2.F_ParentId);
  1254. if (parent3 != null)
  1255. {
  1256. if (parent3.F_ParentId == "0")
  1257. {
  1258. fod.ParentName = parent3.F_FullName;
  1259. fod.F_ParentId = parent3.F_ModuleId;
  1260. }
  1261. else
  1262. {
  1263. //下一级
  1264. var parent4 = moduleIBLL.GetModuleEntity(parent3.F_ParentId);
  1265. if (parent4 != null)
  1266. {
  1267. if (parent4.F_ParentId == "0")
  1268. {
  1269. fod.ParentName = parent4.F_FullName;
  1270. fod.F_ParentId = parent4.F_ModuleId;
  1271. }
  1272. }
  1273. }
  1274. }
  1275. }
  1276. }
  1277. }
  1278. }
  1279. }
  1280. modulelist.Add(fod);
  1281. }
  1282. }
  1283. ViewBag.OffenusedAll = modulelist;
  1284. var mm = modulelist.GroupBy(x => x.F_ParentId).Select(x => new ModuleEntity()
  1285. {
  1286. F_ParentId = x.Key,
  1287. ParentName = x.FirstOrDefault().ParentName,
  1288. ChildrenList = x.Select(y => new ModuleEntity()
  1289. {
  1290. F_ModuleId = y.F_ModuleId,
  1291. F_FullName = y.F_FullName
  1292. }).ToList()
  1293. }).ToList();
  1294. ViewBag.OffenusedGroup = mm;
  1295. ViewBag.OffenusedGroupStr = JsonConvert.SerializeObject(ViewBag.OffenusedGroup);
  1296. //查找服务
  1297. List<ModuleEntity> searchmodulelist = new List<ModuleEntity>();
  1298. foreach (var item in moduledata)
  1299. {
  1300. if (moduleIBLL.GetColumnList(item.F_ModuleId).Any())
  1301. {
  1302. item.FirstLetter = Str.PinYin(item.F_FullName).Substring(0, 1);
  1303. searchmodulelist.Add(item);
  1304. }
  1305. }
  1306. ViewBag.SearchModule = searchmodulelist;
  1307. //校园总览
  1308. //专业
  1309. var countinfos = cdMajorIBLL.GetCountInfos();
  1310. ViewBag.MajorTotalNum = countinfos.Rows[0]["zy_nums"];
  1311. //班级
  1312. //var classInfoData = classInfoIBLL.GetAllClass();
  1313. ViewBag.ClassInfoTotalNum = countinfos.Rows[0]["bj_nums"];
  1314. //学生
  1315. //var stuInfoData = stuInfoBasicIBLL.GetAllList();
  1316. ViewBag.StuInfoTotalNum = countinfos.Rows[0]["stu_nums"];
  1317. //教师
  1318. //var teacherData = empInfoIBLL.GetAllList();
  1319. ViewBag.TeacherTotalNum = countinfos.Rows[0]["tea_nums"];
  1320. //教室
  1321. //var classRoomData = classroomInfoIBLL.GetAllList();
  1322. ViewBag.ClassRoomTotalNum = countinfos.Rows[0]["js_nums"];
  1323. //课程
  1324. //var lessonData = lessonInfoIBLL.GetAllList();
  1325. ViewBag.LessonTotalNum = countinfos.Rows[0]["kc_nums"];
  1326. //专业总览
  1327. //专业学生
  1328. var majorstu = cdMajorIBLL.Getmajorstu().ToJson();
  1329. //var stuByMajor = stuInfoData.GroupBy(x => x.MajorNo).Select(x => new
  1330. //{
  1331. // value = x.Select(y => y.StuId).Count(),
  1332. // name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
  1333. //});
  1334. //ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
  1335. ViewBag.StuByMajorStr = majorstu;
  1336. //流程
  1337. var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
  1338. var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  1339. var allCount = 0;
  1340. foreach (var flow in flowType)
  1341. {
  1342. var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
  1343. flow.FlowCount = count;
  1344. allCount += count;
  1345. }
  1346. ViewBag.AllCount = allCount;
  1347. ViewBag.FlowType = flowType;
  1348. ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
  1349. //校园一卡通余额
  1350. ViewBag.StuSaveRecordTotalNum = 0;
  1351. //var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
  1352. //if (stuSaveRecordList.Any())
  1353. //{
  1354. // ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE;
  1355. //}
  1356. //红湖付款码余额
  1357. ViewBag.StuConsumptionTotalNum = 0;
  1358. //var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account);
  1359. //if (stuConsumptionList.Any())
  1360. //{
  1361. // ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum();
  1362. //}
  1363. //常用链接
  1364. var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId);
  1365. var ff = userfunctionlist.GroupBy(x => x.FTName).Select(x => new Perm_FunctionEntity()
  1366. {
  1367. FTName = x.Key,
  1368. PFunctionList = x.Select(y => new Perm_FunctionEntity()
  1369. {
  1370. FId = y.FId,
  1371. FTId = y.FTId,
  1372. FName = y.FName,
  1373. UPId = DESEncrypt.Encrypt(y.FId, ConfigurationManager.AppSettings["SSOPublicSecret"]),//sysid
  1374. UserId = DESEncrypt.Encrypt(userInfo.userId, ConfigurationManager.AppSettings["SSOPublicSecret"])//openid
  1375. }).Take(8).ToList()
  1376. });
  1377. ViewBag.FunctionList = ff;
  1378. ViewBag.FunctionListStr = JsonConvert.SerializeObject(ViewBag.FunctionList);
  1379. return View();
  1380. }
  1381. /// <summary>
  1382. /// 网上办事大厅拖拽版-效率优先模式
  1383. /// </summary>
  1384. /// <returns></returns>
  1385. public ActionResult DragModelTwo()
  1386. {
  1387. //判断登录状态码
  1388. string account = "";
  1389. if (!Request.Headers["account"].IsEmpty())
  1390. {
  1391. account = Request.Headers["account"].ToString();
  1392. }
  1393. OperatorHelper helper = new OperatorHelper();
  1394. var result = helper.IsOnLine(account);
  1395. if (result.stateCode != 1)
  1396. {
  1397. return Redirect("NoLogin");
  1398. }
  1399. //登录用户
  1400. var userInfo = LoginUserInfo.Get();
  1401. ViewBag.UserId = userInfo.userId;
  1402. //桌面管理表、卡片块排序管理表增加默认数据
  1403. sSO_Drag_DesktopManageIBLL.AddDefaultData(userInfo.userId, "two");
  1404. //获取桌面、卡片块排序列表
  1405. ViewBag.DesktopList = sSO_Drag_DesktopManageIBLL.GetListByModelCode(userInfo.userId, "two").OrderByDescending(x => x.DefaultFlag).ThenBy(x => x.Sort).ThenBy(x => x.CreateDate);
  1406. ViewBag.DesktopListStr = JsonConvert.SerializeObject(ViewBag.DesktopList);
  1407. //分页查询条件设置
  1408. Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
  1409. //邮件-收件箱
  1410. var maildata = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
  1411. var maildataAll = sYS_ReceiveMessageIBLL.GetList("{\"userId\":\"" + userInfo.userId + "\"}");
  1412. ViewBag.LanMail = maildata;
  1413. ViewBag.LanMailStr = JsonConvert.SerializeObject(ViewBag.LanMail);
  1414. ViewBag.LanMailUnReadCount = maildataAll.Count(m => m.READFLAG == 0);
  1415. //邮件-已发送
  1416. paginationobj.sidx = "SENDTIME desc";
  1417. var mailsenddata = sYS_SendMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userInfo.userId + "\"}");
  1418. var mailsenddataAll = sYS_SendMessageIBLL.GetList2("{\"userId\":\"" + userInfo.userId + "\"}");
  1419. ViewBag.LanMailSend = mailsenddata;
  1420. ViewBag.LanMailSendStr = JsonConvert.SerializeObject(ViewBag.LanMailSend);
  1421. //来往邮件数量
  1422. ViewBag.LanMailTotalNum = maildataAll.Count() + mailsenddataAll.Count();
  1423. //公文
  1424. paginationobj.sidx = "SendTime";
  1425. ViewBag.ReceiveFileList = sys_ReceiveFileIBLL.GetPageList(paginationobj, "{\"ReceiverId\":\"" + userInfo.userId + "\"}");
  1426. ViewBag.ReceiveFileListStr = JsonConvert.SerializeObject(ViewBag.ReceiveFileList);
  1427. //公告
  1428. List<NewsEntity> outnewslist = new List<NewsEntity>();
  1429. var newsList = newsIBLL.GetList("", userInfo.userId);
  1430. foreach (var newsitemEntity in newsList)
  1431. {
  1432. if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId))
  1433. {
  1434. if (!string.IsNullOrEmpty(userInfo.postIds))
  1435. {
  1436. if (userInfo.postIds.Contains(","))
  1437. {
  1438. foreach (var postid in userInfo.postIds.Split(','))
  1439. {
  1440. if (newsitemEntity.F_SendPostId.Contains(postid))
  1441. {
  1442. outnewslist.Add(newsitemEntity);
  1443. break;
  1444. }
  1445. }
  1446. }
  1447. else
  1448. {
  1449. if (newsitemEntity.F_SendPostId.Contains(userInfo.postIds))
  1450. {
  1451. outnewslist.Add(newsitemEntity);
  1452. }
  1453. }
  1454. }
  1455. }
  1456. else
  1457. {
  1458. if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
  1459. {
  1460. if (newsitemEntity.F_SendDeptId.Contains(userInfo.departmentId))
  1461. {
  1462. outnewslist.Add(newsitemEntity);
  1463. }
  1464. }
  1465. else
  1466. {
  1467. outnewslist.Add(newsitemEntity);
  1468. }
  1469. }
  1470. }
  1471. ViewBag.NewsList = outnewslist.Take(5);
  1472. ViewBag.NewsListStr = JsonConvert.SerializeObject(ViewBag.NewsList);
  1473. //宣传报道
  1474. var newsListOfxuanchuan = outnewslist.Where(x => x.F_CategoryId == "15").Take(4);
  1475. foreach (var item in newsListOfxuanchuan)
  1476. {
  1477. if (!string.IsNullOrEmpty(item.F_NewsImage))
  1478. {
  1479. var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath;
  1480. if (!string.IsNullOrEmpty(imagePath))
  1481. {
  1482. item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource"));
  1483. }
  1484. else
  1485. {
  1486. item.F_NewsImage = "/Content/images/DragSSO/noLogin.png";
  1487. }
  1488. }
  1489. }
  1490. ViewBag.NewsListOfxuanchuan = newsListOfxuanchuan;
  1491. ViewBag.NewsListOfxuanchuanStr = JsonConvert.SerializeObject(ViewBag.NewsListOfxuanchuan);
  1492. //智慧教育
  1493. ViewBag.NewsListOfzhihui = outnewslist.Where(x => x.F_CategoryId == "16").Take(6);
  1494. ViewBag.NewsListOfzhihuiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhihui);
  1495. //专题推荐
  1496. var newsListOfzhuanti = outnewslist.Where(x => x.F_CategoryId == "17").Take(7);
  1497. foreach (var item in newsListOfzhuanti)
  1498. {
  1499. if (!string.IsNullOrEmpty(item.F_NewsImage))
  1500. {
  1501. var imagePath = annexesFileIBLL.GetEntityByFolderId(item.F_NewsImage)?.F_FilePath;
  1502. if (!string.IsNullOrEmpty(imagePath))
  1503. {
  1504. item.F_NewsImage = imagePath.Substring(imagePath.IndexOf("Resource"));
  1505. }
  1506. else
  1507. {
  1508. item.F_NewsImage = "/Content/images/DragSSO/noLogin.png";
  1509. }
  1510. }
  1511. }
  1512. ViewBag.NewsListOfzhuanti = newsListOfzhuanti;
  1513. ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti);
  1514. //办公事项-待办任务
  1515. paginationobj.sidx = "F_CreateDate";
  1516. paginationobj.rows = 4;
  1517. var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}");
  1518. ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}");
  1519. ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList);
  1520. ViewBag.TaskTotalNum = taskListAll.Count();
  1521. //办公事项-已办任务
  1522. var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}");
  1523. ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}");
  1524. ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList);
  1525. ViewBag.FinishTaskTotalNum = finishTaskListAll.Count();
  1526. //办公事项-我发起的
  1527. var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}");
  1528. ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}");
  1529. ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList);
  1530. ViewBag.MyListTotalNum = myListAll.Count();
  1531. //常用服务
  1532. List<ModuleEntity> modulelist = new List<ModuleEntity>();
  1533. List<string> offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList();
  1534. var moduledata = moduleIBLL.GetModuleList().Where(m => m.F_EnabledMark == 1 && m.F_DeleteMark == 0 && !string.IsNullOrEmpty(m.F_UrlAddress) && m.F_IsMenu == 1 && m.F_Target == "iframe" && !string.IsNullOrEmpty(m.F_ParentId));
  1535. foreach (var oitem in offenused)
  1536. {
  1537. ModuleEntity fod = moduledata.FirstOrDefault(m => m.F_FullName == oitem);
  1538. if (fod != null)
  1539. {
  1540. //找父级
  1541. if (fod.F_ParentId == "0")
  1542. {
  1543. fod.ParentName = fod.F_FullName;
  1544. fod.F_ParentId = fod.F_ModuleId;
  1545. }
  1546. else
  1547. {
  1548. var parent1 = moduleIBLL.GetModuleEntity(fod.F_ParentId);
  1549. if (parent1 != null)
  1550. {
  1551. if (parent1.F_ParentId == "0")
  1552. {
  1553. fod.ParentName = parent1.F_FullName;
  1554. fod.F_ParentId = parent1.F_ModuleId;
  1555. }
  1556. else
  1557. {
  1558. //下一级
  1559. var parent2 = moduleIBLL.GetModuleEntity(parent1.F_ParentId);
  1560. if (parent2 != null)
  1561. {
  1562. if (parent2.F_ParentId == "0")
  1563. {
  1564. fod.ParentName = parent2.F_FullName;
  1565. fod.F_ParentId = parent2.F_ModuleId;
  1566. }
  1567. else
  1568. {
  1569. //下一级
  1570. var parent3 = moduleIBLL.GetModuleEntity(parent2.F_ParentId);
  1571. if (parent3 != null)
  1572. {
  1573. if (parent3.F_ParentId == "0")
  1574. {
  1575. fod.ParentName = parent3.F_FullName;
  1576. fod.F_ParentId = parent3.F_ModuleId;
  1577. }
  1578. else
  1579. {
  1580. //下一级
  1581. var parent4 = moduleIBLL.GetModuleEntity(parent3.F_ParentId);
  1582. if (parent4 != null)
  1583. {
  1584. if (parent4.F_ParentId == "0")
  1585. {
  1586. fod.ParentName = parent4.F_FullName;
  1587. fod.F_ParentId = parent4.F_ModuleId;
  1588. }
  1589. }
  1590. }
  1591. }
  1592. }
  1593. }
  1594. }
  1595. }
  1596. }
  1597. modulelist.Add(fod);
  1598. }
  1599. }
  1600. ViewBag.OffenusedAll = modulelist;
  1601. var mm = modulelist.GroupBy(x => x.F_ParentId).Select(x => new ModuleEntity()
  1602. {
  1603. F_ParentId = x.Key,
  1604. ParentName = x.FirstOrDefault().ParentName,
  1605. ChildrenList = x.Select(y => new ModuleEntity()
  1606. {
  1607. F_ModuleId = y.F_ModuleId,
  1608. F_FullName = y.F_FullName
  1609. }).ToList()
  1610. }).ToList();
  1611. ViewBag.OffenusedGroup = mm;
  1612. ViewBag.OffenusedGroupStr = JsonConvert.SerializeObject(ViewBag.OffenusedGroup);
  1613. //todo:
  1614. //删begin
  1615. ViewBag.OffenusedJiao = modulelist.Where(x => x.F_FullName.Contains("教"));
  1616. ViewBag.OffenusedGuan = modulelist.Where(x => x.F_FullName.Contains("管理"));
  1617. ViewBag.Offenused = modulelist.Except(modulelist.Where(x => x.F_FullName.Contains("教") || x.F_FullName.Contains("管理"))).Take(6);
  1618. ViewBag.OffenusedJiaoStr = JsonConvert.SerializeObject(ViewBag.OffenusedJiao);
  1619. ViewBag.OffenusedGuanStr = JsonConvert.SerializeObject(ViewBag.OffenusedGuan);
  1620. ViewBag.OffenusedStr = JsonConvert.SerializeObject(ViewBag.Offenused);
  1621. //删end
  1622. //查找服务
  1623. List<ModuleEntity> searchmodulelist = new List<ModuleEntity>();
  1624. foreach (var item in moduledata)
  1625. {
  1626. if (moduleIBLL.GetColumnList(item.F_ModuleId).Any())
  1627. {
  1628. item.FirstLetter = Str.PinYin(item.F_FullName).Substring(0, 1);
  1629. searchmodulelist.Add(item);
  1630. }
  1631. }
  1632. ViewBag.SearchModule = searchmodulelist;
  1633. //校园总览
  1634. //专业
  1635. var countinfos = cdMajorIBLL.GetCountInfos();
  1636. ViewBag.MajorTotalNum = countinfos.Rows[0]["zy_nums"];
  1637. //班级
  1638. //var classInfoData = classInfoIBLL.GetAllClass();
  1639. ViewBag.ClassInfoTotalNum = countinfos.Rows[0]["bj_nums"];
  1640. //学生
  1641. //var stuInfoData = stuInfoBasicIBLL.GetAllList();
  1642. ViewBag.StuInfoTotalNum = countinfos.Rows[0]["stu_nums"];
  1643. //教师
  1644. //var teacherData = empInfoIBLL.GetAllList();
  1645. ViewBag.TeacherTotalNum = countinfos.Rows[0]["tea_nums"];
  1646. //教室
  1647. //var classRoomData = classroomInfoIBLL.GetAllList();
  1648. ViewBag.ClassRoomTotalNum = countinfos.Rows[0]["js_nums"];
  1649. //课程
  1650. //var lessonData = lessonInfoIBLL.GetAllList();
  1651. ViewBag.LessonTotalNum = countinfos.Rows[0]["kc_nums"];
  1652. //专业总览
  1653. //专业学生
  1654. var majorstu = cdMajorIBLL.Getmajorstu().ToJson();
  1655. //var stuByMajor = stuInfoData.GroupBy(x => x.MajorNo).Select(x => new
  1656. //{
  1657. // value = x.Select(y => y.StuId).Count(),
  1658. // name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
  1659. //});
  1660. //ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
  1661. ViewBag.StuByMajorStr = majorstu;
  1662. //流程
  1663. var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
  1664. var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  1665. var allCount = 0;
  1666. foreach (var flow in flowType)
  1667. {
  1668. var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
  1669. flow.FlowCount = count;
  1670. allCount += count;
  1671. }
  1672. ViewBag.AllCount = allCount;
  1673. ViewBag.FlowType = flowType;
  1674. ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
  1675. //校园一卡通余额
  1676. ViewBag.StuSaveRecordTotalNum = 0;
  1677. //var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
  1678. //if (stuSaveRecordList.Any())
  1679. //{
  1680. // ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE;
  1681. //}
  1682. //红湖付款码余额
  1683. ViewBag.StuConsumptionTotalNum = 0;
  1684. //var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account);
  1685. //if (stuConsumptionList.Any())
  1686. //{
  1687. // ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum();
  1688. //}
  1689. //常用链接
  1690. var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId);
  1691. var ff = userfunctionlist.GroupBy(x => x.FTName).Select(x => new Perm_FunctionEntity()
  1692. {
  1693. FTName = x.Key,
  1694. PFunctionList = x.Select(y => new Perm_FunctionEntity()
  1695. {
  1696. FId = y.FId,
  1697. FTId = y.FTId,
  1698. FName = y.FName,
  1699. UPId = DESEncrypt.Encrypt(y.FId, ConfigurationManager.AppSettings["SSOPublicSecret"]),//sysid
  1700. UserId = DESEncrypt.Encrypt(userInfo.userId, ConfigurationManager.AppSettings["SSOPublicSecret"])//openid
  1701. }).Take(8).ToList()
  1702. });
  1703. ViewBag.FunctionList = ff;
  1704. ViewBag.FunctionListStr = JsonConvert.SerializeObject(ViewBag.FunctionList);
  1705. return View();
  1706. }
  1707. /// <summary>
  1708. /// 网上办事大厅拖拽版-管理驾驶舱模式
  1709. /// </summary>
  1710. /// <returns></returns>
  1711. public ActionResult DragModelThree()
  1712. {
  1713. //判断登录状态码
  1714. string account = "";
  1715. if (!Request.Headers["account"].IsEmpty())
  1716. {
  1717. account = Request.Headers["account"].ToString();
  1718. }
  1719. OperatorHelper helper = new OperatorHelper();
  1720. var result = helper.IsOnLine(account);
  1721. if (result.stateCode != 1)
  1722. {
  1723. return Redirect("NoLogin");
  1724. }
  1725. //登录用户
  1726. var userInfo = LoginUserInfo.Get();
  1727. ViewBag.UserId = userInfo.userId;
  1728. //校园总览
  1729. //专业
  1730. var countinfos = cdMajorIBLL.GetCountInfos();
  1731. ViewBag.MajorTotalNum = countinfos.Rows[0]["zy_nums"];
  1732. //班级
  1733. //var classInfoData = classInfoIBLL.GetAllClass();
  1734. ViewBag.ClassInfoTotalNum = countinfos.Rows[0]["bj_nums"];
  1735. //学生
  1736. //var stuInfoData = stuInfoBasicIBLL.GetAllList();
  1737. ViewBag.StuInfoTotalNum = countinfos.Rows[0]["stu_nums"];
  1738. //教师
  1739. //var teacherData = empInfoIBLL.GetAllList();
  1740. ViewBag.TeacherTotalNum = countinfos.Rows[0]["tea_nums"];
  1741. //教室
  1742. //var classRoomData = classroomInfoIBLL.GetAllList();
  1743. ViewBag.ClassRoomTotalNum = countinfos.Rows[0]["js_nums"];
  1744. //课程
  1745. //var lessonData = lessonInfoIBLL.GetAllList();
  1746. ViewBag.LessonTotalNum = countinfos.Rows[0]["kc_nums"];
  1747. //专业总览
  1748. //专业学生
  1749. var majorstu = cdMajorIBLL.Getmajorstu().ToJson();
  1750. //var stuByMajor = stuInfoData.GroupBy(x => x.MajorNo).Select(x => new
  1751. //{
  1752. // value = x.Select(y => y.StuId).Count(),
  1753. // name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
  1754. //});
  1755. //ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
  1756. ViewBag.StuByMajorStr = majorstu;
  1757. //流程
  1758. var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
  1759. var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
  1760. var allCount = 0;
  1761. foreach (var flow in flowType)
  1762. {
  1763. var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
  1764. flow.FlowCount = count;
  1765. allCount += count;
  1766. }
  1767. ViewBag.AllCount = allCount;
  1768. ViewBag.FlowType = flowType;
  1769. ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
  1770. //课程总览
  1771. var lessonInfoData = lessonInfoIBLL.GetAllList();
  1772. //ViewBag.LessonTotalNum = lessonInfoData.Count();
  1773. //ViewBag.OpenLessonTotalNum = lessonInfoData.Where(x => x.CheckMark == true).Count();
  1774. ViewBag.OpenLessonTotalNum = ViewBag.LessonTotalNum;
  1775. //课程分类下的课程
  1776. var lessonBySort = lessonInfoData.GroupBy(x => x.LessonSortNo).Select(x => new
  1777. {
  1778. value = x.Select(y => y.LessonId).Count(),
  1779. name = cdLessonSortIBLL.GetCdLessonSortEntityByNo(x.Key)?.LessonSortName
  1780. });
  1781. ViewBag.LessonBySortStr = JsonConvert.SerializeObject(lessonBySort);
  1782. //课程类型下的课程
  1783. var lessonByType = lessonInfoData.GroupBy(x => x.LessonTypeId).Select(x => new
  1784. {
  1785. value = x.Select(y => y.LessonId).Count(),
  1786. name = cdLessonTypeIBLL.GetCdLessonTypeEntity(x.Key)?.LessonTypeName
  1787. });
  1788. ViewBag.LessonByTypeStr = JsonConvert.SerializeObject(lessonByType);
  1789. //教师总览
  1790. //教师学历比例
  1791. var teacherData = empInfoIBLL.GetAllList();
  1792. var teacherByHighestRecord = teacherData.Where(x => !string.IsNullOrEmpty(x.HighestRecord)).GroupBy(x => x.HighestRecord).Select(x => new
  1793. {
  1794. value = x.Select(y => y.EmpId).Count(),
  1795. name = bCdCultureDegreeIBLL.GetEntity(x.Key)?.CultureDegree
  1796. }).OrderByDescending(x => x.value);
  1797. ViewBag.TeacherByHighestRecordStr = JsonConvert.SerializeObject(teacherByHighestRecord);
  1798. //教师年龄比例
  1799. var empInfoAgeRate = empInfoIBLL.GetEmpInfoAgeRate();
  1800. var teacherByAge = new List<object>() {
  1801. new { value = empInfoAgeRate.age1, name = "60岁以上" },
  1802. new { value = empInfoAgeRate.age2, name = "50~60岁" },
  1803. new { value = empInfoAgeRate.age3, name = "40~50岁" },
  1804. new { value = empInfoAgeRate.age4, name = "30~40岁" },
  1805. new { value = empInfoAgeRate.age5, name = "20~30岁" },
  1806. };
  1807. ViewBag.TeacherByAgeStr = JsonConvert.SerializeObject(teacherByAge);
  1808. //学生总览
  1809. //学生成绩预警
  1810. var stuScoreData = stuScoreNotPassIBLL.GetList("{}").Where(x => x.Score == 0).Select(x => new { x.StuNo, x.MajorNo }).Distinct();
  1811. ViewBag.StuScoreWarnTotalNum = stuScoreData.Count();
  1812. var stuScoreByMajor = stuScoreData.GroupBy(x => x.MajorNo).Select(x => new
  1813. {
  1814. value = x.Select(y => y.StuNo).Count(),
  1815. name = cdMajorIBLL.GetCdMajorEntityByMajorNo(x.Key)?.MajorName
  1816. });
  1817. ViewBag.StuScoreByMajorStr = JsonConvert.SerializeObject(stuScoreByMajor);
  1818. //常用服务
  1819. List<ModuleEntity> modulelist = new List<ModuleEntity>();
  1820. List<string> offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList();
  1821. var moduledata = moduleIBLL.GetModuleList().Where(m => m.F_EnabledMark == 1 && m.F_DeleteMark == 0 && !string.IsNullOrEmpty(m.F_UrlAddress) && m.F_IsMenu == 1 && m.F_Target == "iframe" && !string.IsNullOrEmpty(m.F_ParentId));
  1822. foreach (var oitem in offenused)
  1823. {
  1824. ModuleEntity fod = moduledata.FirstOrDefault(m => m.F_FullName == oitem);
  1825. if (fod != null)
  1826. {
  1827. //找父级
  1828. if (fod.F_ParentId == "0")
  1829. {
  1830. fod.ParentName = fod.F_FullName;
  1831. fod.F_ParentId = fod.F_ModuleId;
  1832. }
  1833. else
  1834. {
  1835. var parent1 = moduleIBLL.GetModuleEntity(fod.F_ParentId);
  1836. if (parent1 != null)
  1837. {
  1838. if (parent1.F_ParentId == "0")
  1839. {
  1840. fod.ParentName = parent1.F_FullName;
  1841. fod.F_ParentId = parent1.F_ModuleId;
  1842. }
  1843. else
  1844. {
  1845. //下一级
  1846. var parent2 = moduleIBLL.GetModuleEntity(parent1.F_ParentId);
  1847. if (parent2 != null)
  1848. {
  1849. if (parent2.F_ParentId == "0")
  1850. {
  1851. fod.ParentName = parent2.F_FullName;
  1852. fod.F_ParentId = parent2.F_ModuleId;
  1853. }
  1854. else
  1855. {
  1856. //下一级
  1857. var parent3 = moduleIBLL.GetModuleEntity(parent2.F_ParentId);
  1858. if (parent3 != null)
  1859. {
  1860. if (parent3.F_ParentId == "0")
  1861. {
  1862. fod.ParentName = parent3.F_FullName;
  1863. fod.F_ParentId = parent3.F_ModuleId;
  1864. }
  1865. else
  1866. {
  1867. //下一级
  1868. var parent4 = moduleIBLL.GetModuleEntity(parent3.F_ParentId);
  1869. if (parent4 != null)
  1870. {
  1871. if (parent4.F_ParentId == "0")
  1872. {
  1873. fod.ParentName = parent4.F_FullName;
  1874. fod.F_ParentId = parent4.F_ModuleId;
  1875. }
  1876. }
  1877. }
  1878. }
  1879. }
  1880. }
  1881. }
  1882. }
  1883. }
  1884. modulelist.Add(fod);
  1885. }
  1886. }
  1887. ViewBag.OffenusedAll = modulelist;
  1888. //查找服务
  1889. List<ModuleEntity> searchmodulelist = new List<ModuleEntity>();
  1890. foreach (var item in moduledata)
  1891. {
  1892. if (moduleIBLL.GetColumnList(item.F_ModuleId).Any())
  1893. {
  1894. item.FirstLetter = Str.PinYin(item.F_FullName).Substring(0, 1);
  1895. searchmodulelist.Add(item);
  1896. }
  1897. }
  1898. ViewBag.SearchModule = searchmodulelist;
  1899. return View();
  1900. }
  1901. /// <summary>
  1902. /// 网上办事大厅拖拽版-保存卡片块排序
  1903. /// </summary>
  1904. /// <returns></returns>
  1905. public ActionResult SaveCardSort(string userId, string modelCode, string desktopId, string cardSort)
  1906. {
  1907. sSO_Drag_CardSortManageIBLL.SaveCardSort(userId, modelCode, desktopId, cardSort);
  1908. return Success("操作成功");
  1909. }
  1910. /// <summary>
  1911. /// 网上办事大厅拖拽版-新增桌面
  1912. /// </summary>
  1913. /// <returns></returns>
  1914. public ActionResult AddDesktop(string userId, string modelCode, string desktopName, string desktopCode)
  1915. {
  1916. sSO_Drag_DesktopManageIBLL.AddDesktop(userId, modelCode, desktopName, desktopCode);
  1917. var data = sSO_Drag_DesktopManageIBLL.GetEntityByDesktopCode(userId, modelCode, desktopCode);
  1918. return Success("操作成功", data);
  1919. }
  1920. /// <summary>
  1921. /// 网上办事大厅拖拽版-删除桌面
  1922. /// </summary>
  1923. /// <returns></returns>
  1924. public ActionResult DeleteDesktop(string desktopId)
  1925. {
  1926. sSO_Drag_DesktopManageIBLL.DeleteEntity(desktopId);
  1927. return Success("操作成功");
  1928. }
  1929. /// <summary>
  1930. /// 网上办事大厅拖拽版-修改桌面
  1931. /// </summary>
  1932. /// <returns></returns>
  1933. public ActionResult ModifyDesktop(string desktopId, string desktopName)
  1934. {
  1935. var entity = new SSO_Drag_DesktopManageEntity()
  1936. {
  1937. DesktopName = desktopName
  1938. };
  1939. sSO_Drag_DesktopManageIBLL.SaveEntity(desktopId, entity);
  1940. return Success("操作成功");
  1941. }
  1942. /// <summary>
  1943. /// 网上办事大厅拖拽版-默认桌面恢复默认设置
  1944. /// </summary>
  1945. /// <returns></returns>
  1946. public ActionResult RestoreDefaultDesktop(string desktopId)
  1947. {
  1948. sSO_Drag_DesktopManageIBLL.RestoreDefaultDesktop(desktopId);
  1949. return Success("操作成功");
  1950. }
  1951. [HandlerLogin(FilterMode.Enforce)]
  1952. public ActionResult GetYKTPayed()
  1953. {
  1954. var yktpayed=cdMajorIBLL.GetYKTPayed(LoginUserInfo.Get().account);
  1955. if (yktpayed!=null&& yktpayed.Rows.Count>0)
  1956. {
  1957. return Success(new
  1958. {
  1959. YKTPayed = (yktpayed.Rows[0][0].ToDecimal()/100).ToDecimal(2)
  1960. });
  1961. }
  1962. else
  1963. {
  1964. return Success(new {
  1965. YKTPayed=0
  1966. });
  1967. }
  1968. }
  1969. [HandlerLogin(FilterMode.Enforce)]
  1970. public ActionResult GetYKTBalance()
  1971. {
  1972. var yktpayed = cdMajorIBLL.GetYKTBalance(LoginUserInfo.Get().account);
  1973. if (yktpayed != null && yktpayed.Rows.Count > 0)
  1974. {
  1975. return Success(new
  1976. {
  1977. YKTPayed = (yktpayed.Rows[0][0].ToDecimal()/100).ToDecimal(2)
  1978. });
  1979. }
  1980. else
  1981. {
  1982. return Success(new
  1983. {
  1984. YKTPayed = 0
  1985. });
  1986. }
  1987. }
  1988. }
  1989. }