From 9d99af79c65d7ea0df7ce2a4860ba9b606231857 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 15 十二月 2021 11:09:00 +0800 Subject: [PATCH] 提交 --- zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs index 0473139..ec2426d 100644 --- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs @@ -669,6 +669,8 @@ actionEntity1.ActionName = "鏂板"; actionlist.Add(actionEntity1); ViewData["ActionInfo"] = actionlist; + ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); return View(); } @@ -680,8 +682,28 @@ //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); searchEntity.CodeTable = "t_complaint_items"; searchEntity.CodeField = "law"; - searchEntity.Sort = "CodeSn"; - return new JsonResult(_sysCodeService.SearchSysCodeDtlPaging(searchEntity)); + searchEntity.Sort1 = "CodeSn"; + + ResultDataEntity<SysCodeDtlEntity> resultDataEntity = _sysCodeService.SearchSysCodeDtlPaging(searchEntity); + + + var sysCodeDtls = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv"); + + foreach(var sysCodeDtlEntity in resultDataEntity.DataList) + { + var sysCodeDtl = sysCodeDtls.Where(x => x.CodeSn == sysCodeDtlEntity.Comments).FirstOrDefault(); + if (sysCodeDtl != null) + sysCodeDtlEntity.CommentsName = sysCodeDtl.Comments; + } + sysCodeDtls = _liaotianService.GetSYScode("t_challenge_items", "question"); + foreach (var sysCodeDtlEntity in resultDataEntity.DataList) + { + var sysCodeDtl = sysCodeDtls.Where(x => x.CodeSn == sysCodeDtlEntity.Classify1).FirstOrDefault(); + if(sysCodeDtl!=null) + sysCodeDtlEntity.Classify1Name = sysCodeDtl.Comments; + } + + return new JsonResult(resultDataEntity); } @@ -700,8 +722,8 @@ ViewData.Model = sysCodeDtlEntity; - - + ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv"); + ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question"); return View(); } -- Gitblit v1.9.1