From 89b8562ad1fb3943db3ffb922544afb3ce57e457 Mon Sep 17 00:00:00 2001
From: wangsheng <123456>
Date: 星期一, 07 三月 2022 17:06:28 +0800
Subject: [PATCH] 待审核增加通道筛选

---
 web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache |    0 
 web/web/Bin/Dao.dll                                            |    0 
 web/Common/obj/Debug/Common.csproj.AssemblyReference.cache     |    0 
 web/Model/obj/Debug/Model.pdb                                  |    0 
 web/web/GwAuditCache.ashx                                      |  237 +++++++++++++++++++++
 web/App_Code/obj/Debug/App_Code.dll                            |    0 
 web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt        |    1 
 web/Common/obj/Debug/Common.dll                                |    0 
 web/Dao/obj/Debug/Dao.dll                                      |    0 
 web/Model/obj/Debug/Model.dll                                  |    0 
 web/web/Bin/Common.dll                                         |    0 
 web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache           |    0 
 web/Lib/Model.dll                                              |    0 
 web/web/Bin/App_Code.pdb                                       |    0 
 web/UMCLib/obj/Debug/UMCLib.dll                                |    0 
 web/web/Bin/Dao.pdb                                            |    0 
 web/UMCLib/bin/Debug/UMCLib.pdb                                |    0 
 web/web/Bin/App_Code.dll                                       |    0 
 web/web/Bin/UMCLib.pdb                                         |    0 
 web/App_Code/bin/Debug/App_Code.pdb                            |    0 
 web/Common/obj/Debug/Common.pdb                                |    0 
 web/web/Bin/Common.pdb                                         |    0 
 web/Lib/Common.dll                                             |    0 
 web/App_Code/obj/Debug/App_Code.pdb                            |    0 
 web/UMCLib/obj/Debug/UMCLib.pdb                                |    0 
 web/Lib/Model.pdb                                              |    0 
 web/Dao/obj/Debug/Dao.pdb                                      |    0 
 web/Model/Model/GwClient.cs                                    |    1 
 web/Lib/Dao.dll                                                |    0 
 /dev/null                                                      |    0 
 web/Lib/Common.pdb                                             |    0 
 web/App_Code/bin/Debug/App_Code.dll                            |    0 
 web/web/Bin/Model.pdb                                          |    0 
 web/web/Bin/UMCLib.dll                                         |    0 
 web/web/GwAuditCache.aspx                                      |  271 ++++++++++++++++++++++++
 web/web/GwAuditCache.aspx.cs                                   |  133 ++++++++++++
 web/.vs/Web/v16/.suo                                           |    0 
 web/UMCLib/bin/Debug/UMCLib.dll                                |    0 
 web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache     |    0 
 web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt          |    2 
 web/Model/obj/Debug/Model.csproj.AssemblyReference.cache       |    0 
 web/web/Bin/Model.dll                                          |    0 
 web/Lib/Dao.pdb                                                |    0 
 43 files changed, 644 insertions(+), 1 deletions(-)

diff --git a/web/.vs/Web/v16/.suo b/web/.vs/Web/v16/.suo
index 9e50f7e..3f0c602 100644
--- a/web/.vs/Web/v16/.suo
+++ b/web/.vs/Web/v16/.suo
Binary files differ
diff --git a/web/App_Code/bin/Debug/App_Code.dll b/web/App_Code/bin/Debug/App_Code.dll
index a3d6183..eda7c89 100644
--- a/web/App_Code/bin/Debug/App_Code.dll
+++ b/web/App_Code/bin/Debug/App_Code.dll
Binary files differ
diff --git a/web/App_Code/bin/Debug/App_Code.pdb b/web/App_Code/bin/Debug/App_Code.pdb
index c2f5c6a..034ec23 100644
--- a/web/App_Code/bin/Debug/App_Code.pdb
+++ b/web/App_Code/bin/Debug/App_Code.pdb
Binary files differ
diff --git a/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache b/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
index eb600d0..c611a8a 100644
--- a/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
+++ b/web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/App_Code/obj/Debug/App_Code.dll b/web/App_Code/obj/Debug/App_Code.dll
index a3d6183..eda7c89 100644
--- a/web/App_Code/obj/Debug/App_Code.dll
+++ b/web/App_Code/obj/Debug/App_Code.dll
Binary files differ
diff --git a/web/App_Code/obj/Debug/App_Code.pdb b/web/App_Code/obj/Debug/App_Code.pdb
index c2f5c6a..034ec23 100644
--- a/web/App_Code/obj/Debug/App_Code.pdb
+++ b/web/App_Code/obj/Debug/App_Code.pdb
Binary files differ
diff --git a/web/Common/obj/Debug/Common.csproj.AssemblyReference.cache b/web/Common/obj/Debug/Common.csproj.AssemblyReference.cache
index f98c66b..cee16e8 100644
--- a/web/Common/obj/Debug/Common.csproj.AssemblyReference.cache
+++ b/web/Common/obj/Debug/Common.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/Common/obj/Debug/Common.dll b/web/Common/obj/Debug/Common.dll
index a1f24d4..b785cea 100644
--- a/web/Common/obj/Debug/Common.dll
+++ b/web/Common/obj/Debug/Common.dll
Binary files differ
diff --git a/web/Common/obj/Debug/Common.pdb b/web/Common/obj/Debug/Common.pdb
index 71e968c..43c0942 100644
--- a/web/Common/obj/Debug/Common.pdb
+++ b/web/Common/obj/Debug/Common.pdb
Binary files differ
diff --git a/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache b/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
index 2a3231d..bb77563 100644
--- a/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
+++ b/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/Dao/obj/Debug/Dao.dll b/web/Dao/obj/Debug/Dao.dll
index 494fccd..a42a558 100644
--- a/web/Dao/obj/Debug/Dao.dll
+++ b/web/Dao/obj/Debug/Dao.dll
Binary files differ
diff --git a/web/Dao/obj/Debug/Dao.pdb b/web/Dao/obj/Debug/Dao.pdb
index 839ea92..13e5cf3 100644
--- a/web/Dao/obj/Debug/Dao.pdb
+++ b/web/Dao/obj/Debug/Dao.pdb
Binary files differ
diff --git a/web/Dao/obj/Debug/build.force b/web/Dao/obj/Debug/build.force
deleted file mode 100644
index e69de29..0000000
--- a/web/Dao/obj/Debug/build.force
+++ /dev/null
diff --git a/web/Lib/Common.dll b/web/Lib/Common.dll
index a1f24d4..b785cea 100644
--- a/web/Lib/Common.dll
+++ b/web/Lib/Common.dll
Binary files differ
diff --git a/web/Lib/Common.pdb b/web/Lib/Common.pdb
index 71e968c..43c0942 100644
--- a/web/Lib/Common.pdb
+++ b/web/Lib/Common.pdb
Binary files differ
diff --git a/web/Lib/Dao.dll b/web/Lib/Dao.dll
index 494fccd..a42a558 100644
--- a/web/Lib/Dao.dll
+++ b/web/Lib/Dao.dll
Binary files differ
diff --git a/web/Lib/Dao.pdb b/web/Lib/Dao.pdb
index 839ea92..13e5cf3 100644
--- a/web/Lib/Dao.pdb
+++ b/web/Lib/Dao.pdb
Binary files differ
diff --git a/web/Lib/Model.dll b/web/Lib/Model.dll
index 354f3d0..b9889a8 100644
--- a/web/Lib/Model.dll
+++ b/web/Lib/Model.dll
Binary files differ
diff --git a/web/Lib/Model.pdb b/web/Lib/Model.pdb
index 073c468..9086dd7 100644
--- a/web/Lib/Model.pdb
+++ b/web/Lib/Model.pdb
Binary files differ
diff --git a/web/Model/Model/GwClient.cs b/web/Model/Model/GwClient.cs
index c286812..1032e55 100644
--- a/web/Model/Model/GwClient.cs
+++ b/web/Model/Model/GwClient.cs
@@ -11,6 +11,7 @@
     /// </summary>
     public class GwClient : ISessionObject
     {
+
         private List<string> _PermissionList = new List<string>();
         private string _clientId;
         private string _clientName;
diff --git a/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache b/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
index 2224a47..f804d2d 100644
--- a/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
+++ b/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/Model/obj/Debug/Model.csproj.CopyComplete b/web/Model/obj/Debug/Model.csproj.CopyComplete
deleted file mode 100644
index e69de29..0000000
--- a/web/Model/obj/Debug/Model.csproj.CopyComplete
+++ /dev/null
diff --git a/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt b/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt
index b76e98b..f701d54 100644
--- a/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt
+++ b/web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt
@@ -53,4 +53,4 @@
 D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.dll
 D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.pdb
 C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache
-D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.CopyComplete
+D:\Company\SMGW_NewWeb\web\Model\obj\Debug\Model.csproj.AssemblyReference.cache
diff --git a/web/Model/obj/Debug/Model.dll b/web/Model/obj/Debug/Model.dll
index 354f3d0..b9889a8 100644
--- a/web/Model/obj/Debug/Model.dll
+++ b/web/Model/obj/Debug/Model.dll
Binary files differ
diff --git a/web/Model/obj/Debug/Model.pdb b/web/Model/obj/Debug/Model.pdb
index 073c468..9086dd7 100644
--- a/web/Model/obj/Debug/Model.pdb
+++ b/web/Model/obj/Debug/Model.pdb
Binary files differ
diff --git a/web/UMCLib/bin/Debug/UMCLib.dll b/web/UMCLib/bin/Debug/UMCLib.dll
index 5fa8af4..f554b1b 100644
--- a/web/UMCLib/bin/Debug/UMCLib.dll
+++ b/web/UMCLib/bin/Debug/UMCLib.dll
Binary files differ
diff --git a/web/UMCLib/bin/Debug/UMCLib.pdb b/web/UMCLib/bin/Debug/UMCLib.pdb
index b36fb0d..23c8e1d 100644
--- a/web/UMCLib/bin/Debug/UMCLib.pdb
+++ b/web/UMCLib/bin/Debug/UMCLib.pdb
Binary files differ
diff --git a/web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache b/web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache
index 75f00ec..5e3e75e 100644
--- a/web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache
+++ b/web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache
Binary files differ
diff --git a/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt b/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt
index 1809220..855723c 100644
--- a/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt
+++ b/web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt
@@ -62,3 +62,4 @@
 D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.CopyComplete
 D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.dll
 D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.pdb
+D:\Company\SMGW_NewWeb\web\UMCLib\obj\Debug\UMCLib.csproj.AssemblyReference.cache
diff --git a/web/UMCLib/obj/Debug/UMCLib.dll b/web/UMCLib/obj/Debug/UMCLib.dll
index 5fa8af4..f554b1b 100644
--- a/web/UMCLib/obj/Debug/UMCLib.dll
+++ b/web/UMCLib/obj/Debug/UMCLib.dll
Binary files differ
diff --git a/web/UMCLib/obj/Debug/UMCLib.pdb b/web/UMCLib/obj/Debug/UMCLib.pdb
index b36fb0d..23c8e1d 100644
--- a/web/UMCLib/obj/Debug/UMCLib.pdb
+++ b/web/UMCLib/obj/Debug/UMCLib.pdb
Binary files differ
diff --git a/web/web/Bin/App_Code.dll b/web/web/Bin/App_Code.dll
index 4563dce..eda7c89 100644
--- a/web/web/Bin/App_Code.dll
+++ b/web/web/Bin/App_Code.dll
Binary files differ
diff --git a/web/web/Bin/App_Code.pdb b/web/web/Bin/App_Code.pdb
index 835d4e7..034ec23 100644
--- a/web/web/Bin/App_Code.pdb
+++ b/web/web/Bin/App_Code.pdb
Binary files differ
diff --git a/web/web/Bin/Common.dll b/web/web/Bin/Common.dll
index a1f24d4..b785cea 100644
--- a/web/web/Bin/Common.dll
+++ b/web/web/Bin/Common.dll
Binary files differ
diff --git a/web/web/Bin/Common.pdb b/web/web/Bin/Common.pdb
index 71e968c..43c0942 100644
--- a/web/web/Bin/Common.pdb
+++ b/web/web/Bin/Common.pdb
Binary files differ
diff --git a/web/web/Bin/Dao.dll b/web/web/Bin/Dao.dll
index 4769573..a42a558 100644
--- a/web/web/Bin/Dao.dll
+++ b/web/web/Bin/Dao.dll
Binary files differ
diff --git a/web/web/Bin/Dao.pdb b/web/web/Bin/Dao.pdb
index 15300ad..13e5cf3 100644
--- a/web/web/Bin/Dao.pdb
+++ b/web/web/Bin/Dao.pdb
Binary files differ
diff --git a/web/web/Bin/Model.dll b/web/web/Bin/Model.dll
index 2982995..b9889a8 100644
--- a/web/web/Bin/Model.dll
+++ b/web/web/Bin/Model.dll
Binary files differ
diff --git a/web/web/Bin/Model.pdb b/web/web/Bin/Model.pdb
index 9987a01..9086dd7 100644
--- a/web/web/Bin/Model.pdb
+++ b/web/web/Bin/Model.pdb
Binary files differ
diff --git a/web/web/Bin/UMCLib.dll b/web/web/Bin/UMCLib.dll
index c4dccfe..de922c5 100644
--- a/web/web/Bin/UMCLib.dll
+++ b/web/web/Bin/UMCLib.dll
Binary files differ
diff --git a/web/web/Bin/UMCLib.pdb b/web/web/Bin/UMCLib.pdb
index 015c9a8..23c8e1d 100644
--- a/web/web/Bin/UMCLib.pdb
+++ b/web/web/Bin/UMCLib.pdb
Binary files differ
diff --git a/web/web/GwAuditCache.ashx b/web/web/GwAuditCache.ashx
new file mode 100644
index 0000000..af115f6
--- /dev/null
+++ b/web/web/GwAuditCache.ashx
@@ -0,0 +1,237 @@
+锘�<%@ WebHandler Language="C#" Class="GwAuditCacheHandler" %>
+using Common;
+using Dao;
+using Model;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+
+public class GwAuditCacheHandler : PageHandler<SysUser>
+{
+    private GwSpDao _Dao = new GwSpDao();
+    public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context)
+    {
+        string @string = context.GetString("action");
+        switch (@string)
+        {
+            case "auditAll":
+                return this.AuditAll(context);
+            case "approveAll":
+                return this.ApproveAll(context);
+            case "saveAudit":
+                return this.SaveAudit(context);
+            case "loadDetail":
+                return this.loadDetail(context);
+            case "load":
+                return this.Load(context);
+            default:
+                throw new Exception("Invalid Action=" + @string);
+        }
+    }
+
+    private JsonPageResult loadDetail(PageContext<SysUser> context)
+    {
+        string @string = context.GetString("hashCode");
+        DateTime dateTime1 = context.GetDateTime("startTime");
+        DateTime dateTime2 = context.GetDateTime("endTime");
+        using (GwAuditCacheDao gwAuditCacheDao = new GwAuditCacheDao())
+            return new JsonPageResult(true, (object)gwAuditCacheDao.LoadDetail(dateTime1, dateTime2, @string));
+    }
+
+    private JsonPageResult Load(PageContext<SysUser> context)
+    {
+        DateTime dateTime1 = context.GetDateTime("StartTime");
+        DateTime dateTime2 = context.GetDateTime("EndTime");
+        int int1 = context.GetInt("auditingStatus");
+        string string1 = context.GetString("content");
+        string string2 = context.GetString("spids");
+        int recordCount = 0;
+        int int2 = context.GetInt("pageSize", 20);
+        int int3 = context.GetInt("pageIndex", 1);
+        string opname = context.GetString("opname");
+        using (GwAuditCacheDao gwAuditCacheDao = new GwAuditCacheDao())
+        {
+            StringBuilder stringBuilder = new StringBuilder();
+            DataTable dataTable = gwAuditCacheDao.LoadCache(dateTime1, dateTime2, int1, string1, string2, out recordCount, int2, int3, opname);
+            if (dataTable.Rows.Count > 0)
+            {
+                foreach (DataRow row in (InternalDataCollectionBase)dataTable.Rows)
+                {
+                    DataRowReader dataRowReader = new DataRowReader(row);
+                    stringBuilder.Append("<tr>");
+                    stringBuilder.AppendFormat("<td><input type=\"checkbox\" name=\"hashCode\" checked value=\"{0}\" /></td>", (object)dataRowReader.GetString("HASH_CODE"));
+                    stringBuilder.Append("<td>" + dataRowReader.GetString("SP_ID") + "</td>");
+                    stringBuilder.Append("<td>" + (object)dataRowReader.GetString("OP_NAME") + "</td>");
+                    stringBuilder.Append("<td>" + dataRowReader.GetString("MSG_CONTENT") + "</td>");
+                    stringBuilder.Append("<td>" + dataRowReader.GetString("KEYWORD") + "</td>");
+                    int int4 = dataRowReader.GetInt("CNT");
+                    if (int4 > 1)
+                        stringBuilder.Append("<td>" + (object)int4 + string.Format("  <a href=\"javascript:;\" class=\"btn btn-xs btn-primary action-load-detail\"  data-id=\"{0}\"> <i class=\"fa fa-plus\"></i></a></td>", (object)dataRowReader.GetString("HASH_CODE")));
+                    else
+                        stringBuilder.Append("<td>" + (object)int4 + "</td>");
+                    stringBuilder.Append("<td>");
+                    stringBuilder.AppendFormat("<a class=\"btn btn-primary btn-xs action-audit\" href=\"javascript:;\" data-id=\"{0}\" data-status=\"4\">鐩存帴閫氳繃</a> \r\n                                            <a class=\"action-audit btn btn-danger btn-xs\" href=\"javascript:;\" data-id=\"{0}\" data-status=\"5\">鐩存帴鎷掔粷</a> \r\n                                            <a class=\"action-audit btn btn-warning btn-xs\" href=\"javascript:;\" data-status=\"10\" data-id=\"{0}\">寰呴壌瀹�</a>", (object)dataRowReader.GetString("HASH_CODE"));
+                    stringBuilder.AppendFormat("</a>");
+                    stringBuilder.AppendFormat("</td>");
+                    stringBuilder.AppendFormat("</tr>");
+                }
+            }
+            else
+                stringBuilder.AppendFormat("<tr><td colspan=\"10\" style=\"padding-left:5px;\">鏆傛棤淇℃伅</td></tr>");
+            return new JsonPageResult(true, (object)new
+            {
+                Table = stringBuilder.ToString(),
+                TotalCount = recordCount
+            });
+        }
+    }
+
+    /// <summary>
+    /// 鎵瑰噯锛堝甫閫氶亾锛�
+    /// </summary>
+    /// <param name="context"></param>
+    /// <returns></returns>
+    private JsonPageResult ApproveAll(PageContext<SysUser> context)
+    {
+        AuditingStatus status = AuditingStatus.ManualApproved;
+        int @int = context.GetInt("opid");
+        if (@int == 0)
+            throw new ArgumentException("璇烽�夋嫨姝g‘鐨勯�氶亾锛�");
+        using (GwAuditCacheDao gwAuditCacheDao = new GwAuditCacheDao())
+        {
+            string[] strArray = JsonConvert.DeserializeObject<string[]>(context.GetString("hashCodes"));
+            IEnumerable<string> enumerable = Enumerable.Distinct<string>((IEnumerable<string>)strArray);
+            StringBuilder stringBuilder = new StringBuilder();
+            foreach (string hashCode in enumerable)
+            {
+                if (!gwAuditCacheDao.UpdateCacheStatus(hashCode, status, @int))
+                    stringBuilder.AppendFormat("鎵归噺瀹℃牳杩囩▼鍙戠敓閿欒锛寋0}锛氬鏍稿け璐ワ紒瀹℃牳鐘舵�侊細{1}.", (object)hashCode, (object)status);
+            }
+            stringBuilder.AppendLine();
+            stringBuilder.AppendFormat("鎵归噺" + (object)this.GetStatusText(status) + "瀹屾垚锛屽叡" + (object)strArray.Length + "涓唴瀹癸紒");
+            return new JsonPageResult(true, (object)stringBuilder.ToString());
+        }
+    }
+
+    private JsonPageResult SaveAudit(PageContext<SysUser> context)
+    {
+        AuditingStatus status = (AuditingStatus)context.GetInt("status");
+        string hashCode = context.GetString("hashCode");
+        using (GwAuditCacheDao gwAuditCacheDao = new GwAuditCacheDao())
+        {
+            GwSpPrePatternDao gwSpPrePatternDao = new GwSpPrePatternDao();
+            //================[瀹℃牳閫氳繃鍚庤嚜鍔ㄦ坊鍔犳ā鏉�.wzp.2021.6.4]===========================
+            //鍒ゆ柇鏄惁瀹℃牳閫氳繃
+            //if (status == AuditingStatus.ManualApproved)
+            //{
+            //    //閫氳繃hashcode璇诲彇鍐呭
+            //    Model.GwAuditCache gwAudit = gwAuditCacheDao.GetAuditCache(hashCode);
+            //    if (gwAudit != null || gwAudit.Content != "" || !string.IsNullOrEmpty(gwAudit.Content))
+            //    {
+            //        bool flag = false;
+            //        string _template = GenerateTemplate.Instance.GenerateTemplates(gwAudit.Content);
+            //        if (!string.IsNullOrEmpty(_template))
+            //        {
+            //            Dao.GwSpPrePattern pattern = new Dao.GwSpPrePattern();
+            //            pattern.PatternContent = _template;
+            //            pattern.SpID = gwAudit.SpID;
+            //            pattern.ClientID = gwAudit.ClientID;
+            //            pattern.OperateAccount = "system";
+            //            pattern.AuditStatus = 1;
+            //            pattern.AuditRemark = "鑷姩澶囨";
+            //            pattern.CreateTime = DateTime.Now;
+            //            pattern.AuditTime = DateTime.Now;
+            //            flag = gwSpPrePatternDao.AddAutoCheck(pattern);//鍏ュ簱
+            //        }
+            //        if (flag)
+            //        {
+            //            SpCTPatternInfo pattern = this._Dao.GetPattern(gwAudit.SpID);
+            //            this._Dao.UpdatePattern(pattern.SpID, pattern.Enabled, pattern.Pattern + "\r\n" + _template, context.OperatorID);
+            //        }
+
+            //    }
+            //}
+
+            //==============[end]====================
+
+            StringBuilder stringBuilder = new StringBuilder();
+            if (!gwAuditCacheDao.UpdateCacheStatus(hashCode, status))
+                throw new Exception("瀹℃牳杩囩▼鍙戠敓閿欒锛�" + hashCode);
+            return new JsonPageResult(true, (object)"鐭俊瀹℃牳瀹屾垚锛�");
+        }
+    }
+
+    /// <summary>
+    /// 鎵归噺鐘舵��
+    /// </summary>
+    /// <param name="context"></param>
+    /// <returns></returns>
+    private JsonPageResult AuditAll(PageContext<SysUser> context)
+    {
+        AuditingStatus status = (AuditingStatus)context.GetInt("status");
+        GwSpPrePatternDao gwSpPrePatternDao = new GwSpPrePatternDao();
+        using (GwAuditCacheDao gwAuditCacheDao = new GwAuditCacheDao())
+        {
+            string[] strArray = JsonConvert.DeserializeObject<string[]>(context.GetString("hashCodes"));
+            IEnumerable<string> enumerable = Enumerable.Distinct<string>((IEnumerable<string>)strArray);
+            StringBuilder stringBuilder = new StringBuilder();
+            foreach (string hashCode in enumerable)
+            {
+                //================[瀹℃牳閫氳繃鍚庤嚜鍔ㄦ坊鍔犳ā鏉�.wzp.2021.6.4]===========================
+                //鍒ゆ柇鏄惁瀹℃牳閫氳繃
+                //if (status == AuditingStatus.ManualApproved)
+                //{
+                //    //閫氳繃hashcode璇诲彇鍐呭
+                //    Model.GwAuditCache gwAudit = gwAuditCacheDao.GetAuditCache(hashCode);
+                //    if (gwAudit != null || gwAudit.Content != "" || !string.IsNullOrEmpty(gwAudit.Content))
+                //    {
+                //        bool flag = false;
+                //        string _template = GenerateTemplate.Instance.GenerateTemplates(gwAudit.Content);
+                //        if (!string.IsNullOrEmpty(_template))
+                //        {
+                //            Dao.GwSpPrePattern pattern =  new Dao.GwSpPrePattern();
+                //            pattern.PatternContent = _template;
+                //            pattern.SpID = gwAudit.SpID;
+                //            pattern.ClientID = gwAudit.ClientID;
+                //            pattern.OperateAccount = "system";
+                //            pattern.AuditStatus = 1;
+                //            pattern.AuditRemark = "鑷姩澶囨";
+                //            pattern.CreateTime = DateTime.Now;
+                //            pattern.AuditTime = DateTime.Now;
+                //            flag = gwSpPrePatternDao.AddAutoCheck(pattern);//鍏ュ簱
+                //        }
+                //        if (flag)
+                //        {
+                //            SpCTPatternInfo pattern = this._Dao.GetPattern(gwAudit.SpID);
+                //            this._Dao.UpdatePattern(pattern.SpID, pattern.Enabled, pattern.Pattern + "\r\n" + _template, context.OperatorID);
+                //        }
+
+                //    }
+                //}
+
+                //==============[end]====================
+
+                if (!gwAuditCacheDao.UpdateCacheStatus(hashCode, status))//鏇存柊鐘舵��
+                    stringBuilder.AppendFormat("鎵归噺瀹℃牳杩囩▼鍙戠敓閿欒锛寋0}锛氬鏍稿け璐ワ紒瀹℃牳鐘舵�侊細{1}.", (object)hashCode, (object)status);
+
+            }
+            stringBuilder.AppendLine();
+            stringBuilder.AppendFormat("鎵归噺" + (object)this.GetStatusText(status) + "瀹屾垚锛屽叡" + (object)strArray.Length + "涓唴瀹癸紒");
+            return new JsonPageResult(true, (object)stringBuilder.ToString());
+        }
+    }
+
+    private string GetStatusText(AuditingStatus status)
+    {
+        if (status == AuditingStatus.ManualApproved)
+            return "閫氳繃";
+        if (status == AuditingStatus.ManualRejected)
+            return "鎷掔粷";
+        if (status == AuditingStatus.Manual10)
+            return "寰呭鏍�";
+        return status.ToString();
+    }
+}
diff --git a/web/web/GwAuditCache.aspx b/web/web/GwAuditCache.aspx
new file mode 100644
index 0000000..b4c14df
--- /dev/null
+++ b/web/web/GwAuditCache.aspx
@@ -0,0 +1,271 @@
+锘�<%@ Page Language="C#"  masterpagefile="~/Main.master" AutoEventWireup="true" CodeFile="GwAuditCache.aspx.cs" Inherits="GwAuditCache" %>
+
+<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server">
+    <form name="cacheForm" method="post" action="gwAuditCache.ashx?action=load" id="cacheForm"
+    class="form-inline">
+    <div class="form-group">
+        <div class="input-group m-b">
+            <span class="input-group-addon">璐﹀彿</span>
+            <input type="text" name="spids" id="spids" value="<%=SelectedSpIDs%>" class="form-control" />
+        </div>
+    </div>
+    <div class="form-group">
+        <div class="input-group m-b">
+            <span class="input-group-addon">鐭俊鍐呭</span>
+            <input type="text" name="content" id="content" value="<%=Content%>" class="form-control " />
+        </div>
+    </div>
+        <div class="form-group">
+        <div class="input-group m-b">
+            <span class="input-group-addon">閫氶亾鍚嶇О</span>
+            <input type="text" name="content" id="opname" value="<%=Content%>" class="form-control " />
+        </div>
+    </div>
+    <div class="form-group">
+        <div class="input-group  m-b ">
+            <div class="input-daterange input-group" id="datepicker">
+                <span class="input-group-addon">鏃堕棿鑼冨洿&nbsp;<i class="fa fa-calendar"></i></span>
+                <input type="text" class="input-sm form-control" name="startTime" id="startTime"
+                    value="<%=StartTime.ToString("yyyy-MM-dd") %>" />
+                <span class="input-group-addon">鍒�</span> <span class="input-group-addon"><i class="fa fa-calendar">
+                </i></span>
+                <input type="text" class="input-sm form-control" name="endTime" id="endTime" value="<%=EndTime.ToString("yyyy-MM-dd") %>" />
+            </div>
+        </div>
+    </div>
+    <div class="form-group">
+        <div class="input-group m-b">
+            <input type="radio" class="icheck-me" name="auditingStatus" <%=(AuditingStatus==0 ? "checked":"")%>
+                value="0" /><label>寰呭鏍镐俊鎭�</label>
+            <input class="icheck-me" type="radio" <%=(AuditingStatus==10 ? "checked":"")%>  name="auditingStatus"
+                value="10" /><label>寰呬簩娆¢壌瀹氫俊鎭�</label>&nbsp;<input type="button" value="鍒锋柊" class="btn btn-primary   action-go" />
+        </div>
+    </div>
+    <div class="form-group">
+        <div class="input-group m-b">&nbsp
+            <input class="btn btn-success action-modal-approve" data-status="4" value="鎵归噺閫氳繃(鍙慨鏀归�氶亾)"
+                type="button" />&nbsp
+            <input class="btn btn-danger  action-audit-all" data-status="4" value="鐩存帴鎵归噺閫氳繃"
+                type="button" />&nbsp
+            <input class="btn btn-warning  action-audit-all" data-status="5" value="鐩存帴鎵归噺鎷掔粷"
+                type="button" />
+        </div>
+    </div>
+    </form>
+    <table class="table table-striped table-bordered table-hover" id="cacheTable">
+    <thead>
+        <tr class="header">
+            <th style="width: 20px">
+                <input type="checkbox" name='checkAll' id="checkAll" />
+            </th>
+            <th style="width: 50px">
+                璐﹀彿
+            </th>
+            <th>
+                閫氶亾
+            </th>
+            <th>
+                鍐呭
+            </th>
+            <th>
+                鍏抽敭瀛�
+            </th>
+            <th>
+                鏉℃暟
+            </th>
+            <th style="width: 200px">
+                鎿嶄綔
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+        </tbody>
+    </table>
+    <div id="pager"></div>
+    <div class="modal inmodal " id="opDialog" tabindex="-1" role="dialog" aria-hidden="true">
+        <div class="modal-dialog modal-sm">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <span class="title">閫夋嫨閫氶亾</span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a></div>
+                <div class="modal-body">
+                    <select class="form-control" name="opid" id="opid">
+                        <%=RenderOpOptions()%>
+                    </select>
+                </div>
+                <div class="modal-footer">
+                    <button class="btn-warning btn" data-dismiss="modal" aria-hidden="true">
+                        鍙栨秷</button>&nbsp;&nbsp;
+                    <button class="btn-primary btn action-approve-all">
+                        纭畾</button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+    <div class="modal inmodal " id="detailDialog" tabindex="-1" role="dialog" aria-hidden="true">
+        <div class="modal-dialog modal-lg">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <span class="title">璇︽儏</span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a></div>
+                <div class="modal-body">
+               
+                </div>
+                <div class="modal-footer">
+                    <button class="btn-warning btn" data-dismiss="modal" aria-hidden="true">
+                        鍏抽棴</button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script type="text/javascript" language="javascript">
+        $(document).ready(function () {
+            $("#checkAll").click(function () {
+                $("input[name='hashCode']").prop("checked", $(this).is(":checked"));
+            });
+
+            $("#pager").Pager({
+                pageSize: 100,
+                onChange: function (pageIndex, pageSize) {
+                    load();
+                }
+            });
+
+            function load() {
+                $.post("gwauditcache.ashx", {
+                    action: "load",
+                    startTime: $("#startTime").val(),
+                    endTime: $("#endTime").val(),
+                    auditingStatus: $("input:radio[name='auditingStatus']:checked").val(),
+                    content: $("#content").val(),
+                    spids: $("#spids").val(),
+                    pageSize: $("#pager").Pager("getPageSize"),
+                    pageIndex: $("#pager").Pager("getPageIndex"),
+                    opname: $("#opname").val()
+                }, function (r) {
+                    if (r.OK) {
+                        $("#cacheTable tbody").html(r.Message.Table);
+                        $("#pager").Pager("setTotalCount", r.Message.TotalCount);
+                    }
+                    else {
+                        mytek.alert(r.Message, r.OK);
+                    }
+                }, "json");
+            }
+
+            $(".input-daterange").datepicker({ keyboardNavigation: !1, forceParse: !1, autoclose: !0 });
+
+            $(".action-go").on("click", function () {
+                load();
+            });
+
+            $(document).on("click", ".action-audit", function () {
+                var me = $(this);
+                var id = me.data("id");
+                var status = me.data("status");
+
+                $.post("gwauditcache.ashx", { action: "saveAudit", hashCode: id, status: status },
+                function (result) {
+                    mytek.alert(result.Message, result.OK, function () {
+                        load();
+                    });
+                }, "json");
+            });
+
+            $(document).on("click", ".action-load-detail", function () {
+                var me = $(this);
+                var id = me.data("id");
+
+                $.post("gwauditcache.ashx", { action: "loadDetail", hashCode: id, startTime: $("#startTime").val(), endTime: $("#endTime").val() },
+                function (result) {
+                    if (!result.OK) {
+                        mytek.alert(result.Message);
+                    } else {
+                        var html = [];
+                        html.push("<table class='table table-striped table-bordered table-hover'>");
+                        html.push("<tr><th>鎵嬫満</th><th>SPID</th><th>OPID</th><th>鍐呭</th><th>鏃堕棿</th></tr>");
+                        $.each(result.Message, function () {
+                            html.push("<tr>");
+                            html.push("<td>" + this.MOBILE + "</td>");
+                            html.push("<td>" + this.SP_ID + "</td>");
+                            html.push("<td>" + this.OP_ID + "</td>");
+                            html.push("<td>" + this.MSG_CONTENT + "</td>");
+                            html.push("<td>" + this.AP_SUBMIT_TIME + "</td>");
+                            html.push("</tr>");
+                        });
+                        html.push("</table>");
+                        $("#detailDialog .modal-body").html(html.join(""));
+                        $("#detailDialog").modal("show");
+                    }
+                }, "json");
+            });
+
+
+            $(".action-approve-all").on("click", function () {
+                var me = $(this);
+                var hashCodes = [];
+                $("input[name=hashCode]").each(function () {
+                    if ($(this).is(":checked")) {
+                        hashCodes.push($(this).val());
+                    }
+                });
+
+                if (hashCodes.length == 0) {
+                    mytek.alert("灏氭湭閫夋嫨瑕佸鏍哥殑鐭俊");
+                    return;
+                }
+
+                var opid = $("#opDialog #opid").val();
+
+                $.post("gwauditcache.ashx", { action: "approveAll", hashCodes: $.toJSON(hashCodes), status: 4, opid: opid },
+                    function (result) {
+                        $("#opDialog").modal("hide");
+                        mytek.alert(result.Message, result.OK, function () {
+                            load();
+                        });
+                    }, "json");
+            });
+
+            $(".action-audit-all").on("click", function () {
+                var me = $(this);
+                var hashCodes = [];
+
+                $("input[name=hashCode]").each(function () {
+                    if ($(this).is(":checked")) {
+                        hashCodes.push($(this).val());
+                    }
+                });
+
+                if (hashCodes.length == 0) {
+                    mytek.alert("灏氭湭閫夋嫨瑕佸鏍哥殑鐭俊");
+                    return;
+                }
+
+                $.post("gwauditcache.ashx", { action: "auditAll", hashCodes: $.toJSON(hashCodes), status: me.data("status") },
+                    function (result) {
+                        mytek.alert(result.Message, result.OK, function () {
+                            load();
+                        });
+                    }, "json");
+            });
+
+            $(".action-modal-approve").on("click", function () {
+                var hashCodes = [];
+
+                $("input[name=hashCode]").each(function () {
+                    if ($(this).is(":checked")) {
+                        hashCodes.push($(this).val());
+                    }
+                });
+
+                if (hashCodes.length == 0) {
+                    mytek.alert("灏氭湭閫夋嫨瑕佸鏍哥殑鐭俊");
+                    return;
+                }
+
+                $("#opDialog").modal("show");
+            });
+        });
+    </script>
+</asp:Content>
diff --git a/web/web/GwAuditCache.aspx.cs b/web/web/GwAuditCache.aspx.cs
new file mode 100644
index 0000000..fd6193c
--- /dev/null
+++ b/web/web/GwAuditCache.aspx.cs
@@ -0,0 +1,133 @@
+锘�
+using Common;
+using Dao;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Web;
+using System.Web.Profile;
+using System.Web.SessionState;
+
+public partial class GwAuditCache : PageBase<SysUser>, IRequiresSessionState
+{
+    protected int PageSize = 200;
+    protected int RecordCount;
+    protected string PagerStr;
+
+
+
+    protected int PageIndex
+    {
+        get
+        {
+            return this.AppContext.GetInt("page", 1);
+        }
+    }
+
+    public int AuditingStatus
+    {
+        get
+        {
+            return this.AppContext.GetInt("AuditingStatus");
+        }
+    }
+
+    public string SelectedSpIDs
+    {
+        get
+        {
+            return this.AppContext.GetString("SpIDs");
+        }
+    }
+
+    public string Content
+    {
+        get
+        {
+            return this.AppContext.GetString("Content");
+        }
+    }
+
+    public DateTime StartTime
+    {
+        get
+        {
+            DateTime result;
+            if (!DateTime.TryParse(this.Request["StartTime"], out result))
+                return DateTime.Now.Date.AddDays(-1.0);
+            return result;
+        }
+    }
+
+    public DateTime EndTime
+    {
+        get
+        {
+            DateTime result;
+            if (!DateTime.TryParse(this.Request["EndTime"], out result))
+                return DateTime.Now.Date.AddDays(1.0);
+            return result;
+        }
+    }
+
+    protected void Page_Load(object sender, EventArgs e)
+    {
+        this.CheckRight("102", FailedOperation.HistoryGoBack);
+    }
+
+    private bool IsInSpIDs(List<string> spIDList, string p)
+    {
+        return spIDList.Contains(p);
+    }
+
+    protected string RenderOpOptions()
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        using (GwOpDao gwOpDao = new GwOpDao())
+        {
+            foreach (GwOp gwOp in gwOpDao.LoadInfoList())
+                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)gwOp.OpID, (object)gwOp.OpName);
+        }
+        return stringBuilder.ToString();
+    }
+
+    private static GwStrategy GetStrategy(Model.GwAuditCache Item)
+    {
+        return new GwStrategy();
+    }
+
+    private string FormatAuditingModeString(AuditingMode auditingMode)
+    {
+        switch (auditingMode)
+        {
+            case AuditingMode.Exempt:
+                return "鍏嶅妯″紡";
+            case AuditingMode.ManaualAudit:
+                return "鎵嬪姩瀹℃牳";
+            case AuditingMode.AutoAudit:
+                return "鑷姩瀹℃牳";
+            default:
+                return auditingMode.ToString();
+        }
+    }
+
+    public string getStrategyId(string strategyId)
+    {
+        GwStrategyDao gwStrategyDao = new GwStrategyDao();
+        string str1 = "";
+        int recordcount = 0;
+        List<GwStrategy> list = gwStrategyDao.LoadInfoList("", "", out recordcount, 9999, 1);
+        if (recordcount == 0)
+            return "<option value=''>鏆傛棤鍐呭绛栫暐閰嶇疆</option>";
+        string str2 = str1 + "<option value=\"\">鍏ㄩ儴绛栫暐</option>";
+        foreach (GwStrategy gwStrategy in list)
+        {
+            if (strategyId != null && strategyId == gwStrategy.StrategyId.ToString())
+                str2 = str2 + (object)"<option value=\"" + gwStrategy.StrategyId + "\" selected>" + gwStrategy.StrategyName + "</option>";
+            else
+                str2 = str2 + (object)"<option value=\"" + gwStrategy.StrategyId + "\">" + gwStrategy.StrategyName + "</option>";
+        }
+        return str2;
+    }
+}

--
Gitblit v1.9.1