From 8e5d569d8362b0bc25b45a8003f8be6be65a8104 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 15 十二月 2021 14:31:58 +0800 Subject: [PATCH] 提交 --- zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs index 04308d5..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,7 +682,7 @@ //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); searchEntity.CodeTable = "t_complaint_items"; searchEntity.CodeField = "law"; - searchEntity.Sort = "CodeSn"; + searchEntity.Sort1 = "CodeSn"; ResultDataEntity<SysCodeDtlEntity> resultDataEntity = _sysCodeService.SearchSysCodeDtlPaging(searchEntity); @@ -690,9 +692,16 @@ foreach(var sysCodeDtlEntity in resultDataEntity.DataList) { var sysCodeDtl = sysCodeDtls.Where(x => x.CodeSn == sysCodeDtlEntity.Comments).FirstOrDefault(); - sysCodeDtlEntity.CommentsName = sysCodeDtl.Comments; + 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); } @@ -714,7 +723,7 @@ 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