From 0047bb0d2ba509f8a3cde4e06961edb19f9d1163 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 28 十月 2021 08:49:43 +0800
Subject: [PATCH] 提交
---
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/shititongji.cshtml | 155 +++++++++++++++++++
zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs | 165 ++++++++++++++++++++
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/tongjiIndex.cshtml | 148 ++++++++++++++++++
zhengcaioa/DTO/ExpertTestTopicDTO.cs | 2
4 files changed, 469 insertions(+), 1 deletions(-)
diff --git a/zhengcaioa/DTO/ExpertTestTopicDTO.cs b/zhengcaioa/DTO/ExpertTestTopicDTO.cs
index 89c134d..1f960c3 100644
--- a/zhengcaioa/DTO/ExpertTestTopicDTO.cs
+++ b/zhengcaioa/DTO/ExpertTestTopicDTO.cs
@@ -50,8 +50,8 @@
public string[] Flag { get; set; }
public string[] Fatiaomingxi { get; set; }
-
+ public decimal Shuliang { get; set; }
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs b/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
index 8bef88f..78ff070 100644
--- a/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
@@ -11,6 +11,7 @@
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
+using System.Text;
using System.Threading.Tasks;
using System.Transactions;
using zhengcaioa.IService;
@@ -876,6 +877,170 @@
return new JsonResult(resultEntity);
}
+ public IActionResult shititongji()
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
+ var expertTestTopicDTOs = new List<ExpertTestTopicDTO>();
+ var expertTestTopicDTOs1 = _expertTestTopicService.GetList();
+
+ var sysCodeDtls = _liaotianService.GetSYScode("expert_test_topic", "topictype");
+
+ var sysCodeDtls1 = _liaotianService.GetSYScode("expert_test_topic", "zhishitype");
+
+ foreach (var sysCodeDtl1 in sysCodeDtls1)
+ {
+ foreach (var sysCodeDtl in sysCodeDtls)
+ {
+ var shuliang = expertTestTopicDTOs1.Count(x => x.Zhishitype == sysCodeDtl1.CodeSn && x.Topictype == sysCodeDtl.CodeSn);
+
+ var expertTestTopicDTO = new ExpertTestTopicDTO();
+ expertTestTopicDTO.Shuliang = shuliang;
+ var sysCodeDtl2 = sysCodeDtls1.Where(x => x.CodeSn == sysCodeDtl1.CodeSn).FirstOrDefault();
+ if (sysCodeDtl2 != null)
+ {
+ expertTestTopicDTO.ZhishitypeName = sysCodeDtl2.Comments;
+ }
+ expertTestTopicDTO.Zhishitype = sysCodeDtl1.CodeSn;
+ expertTestTopicDTO.Topictype = sysCodeDtl.CodeSn;
+ expertTestTopicDTOs.Add(expertTestTopicDTO);
+
+ }
+ }
+
+
+ //ViewBag.topictype = sysCodeDtls;
+
+ //ViewBag.zhishitype = sysCodeDtls1;
+
+ //ViewBag.listExpertTestTopicDTO = expertTestTopicDTOs;
+
+
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.Append("<table style=\"width:50%;\">");
+ stringBuilder.Append(" <tr>");
+
+ stringBuilder.Append("<td style=\"width:25%;\"> 鐭ヨ瘑鐐�/棰樺瀷</td>");
+ foreach (var sysCodeDtl in sysCodeDtls)
+ {
+ stringBuilder.Append("<td style = \"width:25%;\" > " + sysCodeDtl.Comments + "</td >");
+ }
+
+ stringBuilder.Append(" </tr>");
+
+ int i = 0;
+
+
+ foreach(var ExpertTestTopicDTO in expertTestTopicDTOs)
+ {
+ if(i != 0 && i % 3 == 0)
+ {
+ stringBuilder.Append(" </tr>");
+ }
+
+ if(i == 0 || i % 3 == 0)
+ {
+ stringBuilder.Append("<tr>");
+ stringBuilder.Append(" <td>" + ExpertTestTopicDTO.ZhishitypeName + "</td>");
+ }
+
+
+
+
+ stringBuilder.Append("<td><a onclick=\"OpenWindow(' ','98%','100%', '/ExpertTestTopic/tongjiIndex?Topictype=" + ExpertTestTopicDTO.Topictype + "&Zhishitype=" + ExpertTestTopicDTO.Zhishitype + "')\" > " + ExpertTestTopicDTO.Shuliang +"</a></td>");
+
+ if (i == expertTestTopicDTOs.Count - 1)
+ {
+ stringBuilder.Append(" </tr>");
+ }
+
+
+
+
+ i++;
+ }
+
+
+
+
+
+
+ stringBuilder.Append("</table>");
+
+ ViewBag.htmlstring = stringBuilder.ToString(); ;
+
+ return View();
+ }
+
+
+
+ public IActionResult tongjiIndex(string Topictype="", string Zhishitype = "")
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
+ List<ActionEntity> actionlist = new List<ActionEntity>();
+ ActionEntity actionEntity = new ActionEntity();
+ actionEntity.OpenType = 0;
+ actionEntity.ActionUrl = "";
+ actionEntity.ActionFun = "Search";
+ actionEntity.PageIco = "fa fa-search";
+ actionEntity.ActionName = "鏌ヨ";
+ actionlist.Add(actionEntity);
+
+
+
+
+
+ //ActionEntity actionEntity1 = new ActionEntity();
+ //actionEntity1.OpenType = 0;
+ //actionEntity1.ActionUrl = "";
+ //actionEntity1.ActionFun = "Add";
+ //actionEntity1.PageIco = "fa fa-plus";
+ //actionEntity1.ActionName = "鏂板";
+ //actionlist.Add(actionEntity1);
+
+
+ //ActionEntity actionEntity2 = new ActionEntity();
+ //actionEntity2.OpenType = 0;
+ //actionEntity2.ActionUrl = "";
+ //actionEntity2.ActionFun = "Print";
+ //actionEntity2.PageIco = "fa fa-print";
+ //actionEntity2.ActionName = "鎵撳嵃";
+ //actionlist.Add(actionEntity2);
+
+
+ ViewData["ActionInfo"] = actionlist;
+
+ ViewBag.Topictype1 = Topictype;
+ ViewBag.Zhishitype1 = Zhishitype;
+
+
+ ViewBag.topictype = _liaotianService.GetSYScode("expert_test_topic", "topictype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+
+ ViewBag.zhishitype = _liaotianService.GetSYScode("expert_test_topic", "zhishitype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.zhongdian = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.jiexi_status = _liaotianService.GetSYScode("expert_test_topic", "jiexi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ ViewBag.shenpi_status = _liaotianService.GetSYScode("expert_test_topic", "shenpi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+ var areaDTOs = _areaService.GetList().Where(x => x.ParentId == "0 ").ToList();
+ foreach (var areaDTO in areaDTOs)
+ {
+ if (areaDTO.CodeId == "510000")
+ {
+ areaDTOs.Remove(areaDTO);
+ break;
+ }
+ }
+ var areaDTOsic = new AreaDTO();
+ areaDTOsic.CodeId = "510000";
+ areaDTOsic.Name = "鍥涘窛鐪�";
+ areaDTOsic.ParentId = "0 ";
+ areaDTOs.Insert(1, areaDTOsic);
+ ViewBag.Area = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); ;
+
+
+ return View();
+
+ }
}
}
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/shititongji.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/shititongji.cshtml
new file mode 100644
index 0000000..c1780f7
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/shititongji.cshtml
@@ -0,0 +1,155 @@
+锘緻using DTO;
+@{
+ ViewBag.Title = "ExpertTestTopic";
+ Layout = null;
+ //List<ExpertTestTopicDTO> ExpertTestTopicDTOs = ViewBag.listExpertTestTopicDTO as List<ExpertTestTopicDTO>; //闂绫诲瀷
+
+ //List<SysCodeDtl> topictype = ViewBag.topictype as List<SysCodeDtl>; //棰樼洰绫诲瀷
+ //List<SysCodeDtl> zhishitype = ViewBag.zhishitype as List<SysCodeDtl>; //鐭ヨ瘑鐐�
+
+ string htmlstring = ViewBag.htmlstring as string;
+}
+
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="Cache-Control" content="no-siteapp" />
+ <meta http-equiv="Cache-Control" content="no-cache">
+ <meta http-equiv="Expires" content="0">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="renderer" content="webkit">
+ <title>@SiteConfig.SiteName</title>
+ <meta name="keywords" content="@SiteConfig.Keywords">
+ <meta name="description" content="@SiteConfig.Description">
+ <meta name="author" content="@SiteConfig.Author">
+ <link rel="icon" type="image/x-icon" href="@SiteConfig.ShortcutIcon">
+ <!-- uc寮哄埗绔栧睆 -->
+ <meta name="screen-orientation" content="portrait">
+ <!-- QQ寮哄埗绔栧睆 -->
+ <meta name="x5-orientation" content="portrait">
+ <!-- UC寮哄埗鍏ㄥ睆 -->
+ <meta name="full-screen" content="yes">
+ <!-- QQ寮哄埗鍏ㄥ睆 -->
+ <meta name="x5-fullscreen" content="true">
+ <!--[if lt IE 9]>
+ <meta http-equiv="refresh" content="0;ie.html" />
+ <![endif]-->
+
+ <link href="~/css/bootstrap.min.css" rel="stylesheet">
+ <link href="~/css/font-awesome.min.css" rel="stylesheet">
+ <link href="~/css/animate.min.css" rel="stylesheet">
+
+ @*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
+ <link href="~/css/style.min.css" rel="stylesheet">
+ <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
+ @*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
+ @*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
+ <link href="~/css/style.min.css" rel="stylesheet">
+ <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
+ <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
+ <style type="text/css">
+ body {
+ text-align: center;
+ font-size: 16px;
+ }
+
+ table {
+ border-collapse: collapse;
+ border: none;
+ width: 900px;
+ margin-left: 15px;
+ text-align: left;
+ line-height:36px;
+ }
+
+ td {
+ border: solid #e5e5e5 1px;
+ }
+ </style>
+
+ <!-- jqgrid-->
+ @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
+ <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
+ <script src="~/js/bootstrap.min.js"></script>
+ @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
+
+ <!--瀹瑰櫒-->
+ @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
+ @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
+ @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
+ <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
+ @*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
+ <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
+ @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
+ @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
+ <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
+ <script src="~/js/plugins/webuploader/webuploader.min.js"></script>
+
+ <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
+ <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
+ @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
+ @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
+ <script src="~/js/TUJS.js"></script>
+</head>
+<body>
+
+
+ @Html.Raw(htmlstring);
+ @*<table>
+ <tr>
+ <td style="width:25%;"> 鐭ヨ瘑鐐�/棰樺瀷</td>
+ @foreach (var sysCodeDtl in topictype)
+ {
+ <td style="width:25%;"> @sysCodeDtl.Comments </td>
+ }
+
+
+
+
+ </tr>
+
+
+ @{
+ int i = 0;
+ }
+
+ @foreach (var ExpertTestTopicDTO in ExpertTestTopicDTOs)
+ {
+ @if (i != 0 && i % 3 == 0)
+ {
+ Html.Raw(" </tr>");
+ }
+
+ @if (i == 0 || i % 3 == 0)
+ {
+ Html.Raw("<tr>");
+ Html.Raw(" <td>" + ExpertTestTopicDTO.ZhishitypeName + "</td>");
+ }
+
+
+
+
+ <td> @Html.Raw(ExpertTestTopicDTO.Shuliang)</td>
+
+ @if (i == ExpertTestTopicDTOs.Count-1)
+ {
+ Html.Raw(" </tr>");
+ }
+
+
+
+
+ i++;
+ }
+
+ </table>*@
+
+</body>
+<script type="text/javascript">
+ //window.print();
+
+</script>
+</html>
diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/tongjiIndex.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/tongjiIndex.cshtml
new file mode 100644
index 0000000..302e227
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/tongjiIndex.cshtml
@@ -0,0 +1,148 @@
+锘緻{
+ ViewBag.Title = "ExpertTestTopic";
+ Layout = "~/Views/Shared/_Layout_Search.cshtml";
+}
+@section headerStyle{
+ <script type="text/javascript">
+
+ var topictype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.topictype))';
+ var zhishitype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.zhishitype))';
+ var zhongdian = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.zhongdian))';
+ var jiexi_status = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.jiexi_status))';
+ var shenpi_status = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shenpi_status))';
+ var Area = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Area))';
+ var Topictype = '@Html.Raw(ViewBag.Topictype1)';
+ var Zhishitype = '@Html.Raw(ViewBag.Zhishitype1)';
+
+ dataCol = [
+ { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
+ {
+ label: '棰樺瀷', name: 'TopictypeName', labtype: 'txt', hidden: false, width: 40
+ },
+
+ {
+ label: '鐭ヨ瘑鐐�', name: 'ZhishitypeName', labtype: 'txt', hidden: false, width: 40
+ },
+ { label: '鍖哄煙', name: 'AreaName', labtype: 'txt', hidden: false, width: 40 },
+ { label: '璇曢', name: 'Topic', labtype: 'txt', hidden: false, width: 300 },
+ { label: '绛旀', name: 'Anwsers', labtype: 'txt', hidden: false, width: 40 },
+ { label: '閲嶇偣鏍囨敞', name: 'ZhongdianName', labtype: 'txt', hidden: false, width: 40 },
+ { label: '瀹℃牳', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 40 },
+ { label: '绛旀瀵瑰簲鐨勬硶鏉�', name: 'Jiexi', labtype: 'txt', hidden: false, width: 300 },
+
+
+
+
+ ];
+ dataUrl = "/ExpertTestTopic/GetList?Topictype=" + Topictype + "&Zhishitype=" + Zhishitype;
+ searchCol = [
+ { label: '鍖哄煙', name: 'Area', labtype: 'combox', hidden: false, data: JSON.parse(Area), cwidth: '5%', cccwidth: '15%' },
+ { label: '棰樺瀷', name: 'Topictype', labtype: 'combox', hidden: false, data: JSON.parse(topictype), cwidth: '5%', cccwidth: '15%' },
+ { label: '鐭ヨ瘑鐐�', name: 'Zhishitype', labtype: 'combox', hidden: false, data: JSON.parse(zhishitype), cwidth: '5%', cccwidth: '15%' },
+ { label: '閲嶇偣鏍囨敞', name: 'Zhongdian', labtype: 'combox', hidden: false, data: JSON.parse(zhongdian), cwidth: '5%', cccwidth: '15%' },
+ { label: '瑙f瀽', name: 'JiexiStatus', labtype: 'combox', hidden: false, data: JSON.parse(jiexi_status), cwidth: '5%', cccwidth: '15%' },
+ { label: '瀹℃牳', name: 'ShenpiStatus', labtype: 'combox', hidden: false, data: JSON.parse(shenpi_status), cwidth: '5%', cccwidth: '15%' },
+
+ { label: '璇曢', name: 'Topic', labtype: 'txt', hidden: false },
+
+
+
+
+
+
+
+ ];
+
+
+
+
+ var _pagedel = function (id) {
+ if (confirm('鏄惁鍒犻櫎璁板綍')) {
+ $.ajax({
+ type: "GET",
+ url: "/ExpertTestTopic/Nullify?Id=" + id,
+ dataType: "json",
+ global: false,
+ data: '',
+ success: function (data) {
+
+
+ if (data.Result) {
+
+ layer.msg('鍒犻櫎鎴愬姛', { icon: 6 });
+ window._reloadPageData();
+ }
+ else {
+ // toastr.error("");
+ layer.msg('鍒犻櫎澶辫触', { icon: 5 });
+ }
+
+ },
+ error: function () {
+ if ($.isNumber(imgLoad)) {
+ layer.close(imgLoad);
+ }
+ //toastr.error("淇濆瓨澶辫触");
+
+ layer.msg('淇濆瓨澶辫触', { icon: 5 });
+ }
+ });
+ }
+
+
+ }
+ var _pageSearch = function () {
+ $("#jqGrid").jqGrid('setGridParam', {
+ url: '/ExpertTestTopic/GetList', postData: jsons, page: 1
+ }); //閲嶆柊杞藉叆
+ var jsons = GetSearchEnd();
+ if (jsons == false) {
+ msg.info("璇峰綍鍏ユ煡璇㈡潯浠�");
+ return false;
+ }
+ LoadGrid(jsons);
+ }
+
+ $(document).ready(function () {
+
+
+ $("#PBSTopictype").val(Topictype);
+ $("#PBSTopictype").trigger('chosen:updated');//鏇存柊閫夐」
+ $("#PBSZhishitype").val(Zhishitype);
+ $("#PBSZhishitype").trigger('chosen:updated');//鏇存柊閫夐」
+
+
+ });
+
+ var _afterSave = function (result) {
+ if (result) {
+ toastr.success("淇濆瓨鎴愬姛");
+ } else {
+ toastr.error("淇濆瓨澶辫触");
+ }
+ }
+
+ var _afterDel = function (result) {
+ if (result) {
+ toastr.success("鍒犻櫎鎴愬姛");
+ } else {
+ /**/
+ toastr.error("鍒犻櫎鎴愬姛");
+ /**/
+ }
+ }
+
+
+
+ </script>
+}
+
+@section footerScripts{
+ <script type="text/javascript">
+
+
+
+
+
+ </script>
+}
--
Gitblit v1.9.1