wangsheng
2022-03-07 89b8562ad1fb3943db3ffb922544afb3ce57e457
待审核增加通道筛选
3个文件已添加
39个文件已修改
2个文件已删除
645 ■■■■■ 已修改文件
web/.vs/Web/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
web/App_Code/bin/Debug/App_Code.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/App_Code/bin/Debug/App_Code.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
web/App_Code/obj/Debug/App_Code.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/App_Code/obj/Debug/App_Code.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Common/obj/Debug/Common.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
web/Common/obj/Debug/Common.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Common/obj/Debug/Common.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/Dao.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/Dao.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Dao/obj/Debug/build.force 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Common.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Common.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Dao.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Dao.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Lib/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/Model/GwClient.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.csproj.CopyComplete 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.csproj.FileListAbsolute.txt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/Model/obj/Debug/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/UMCLib/bin/Debug/UMCLib.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/UMCLib/bin/Debug/UMCLib.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
web/UMCLib/obj/Debug/UMCLib.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/UMCLib/obj/Debug/UMCLib.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/UMCLib/obj/Debug/UMCLib.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/App_Code.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/App_Code.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Common.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Common.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Dao.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Dao.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/UMCLib.dll 补丁 | 查看 | 原始文档 | blame | 历史
web/web/Bin/UMCLib.pdb 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwAuditCache.ashx 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwAuditCache.aspx 271 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/web/GwAuditCache.aspx.cs 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/.vs/Web/v16/.suo
Binary files differ
web/App_Code/bin/Debug/App_Code.dll
Binary files differ
web/App_Code/bin/Debug/App_Code.pdb
Binary files differ
web/App_Code/obj/Debug/App_Code.csproj.AssemblyReference.cache
Binary files differ
web/App_Code/obj/Debug/App_Code.dll
Binary files differ
web/App_Code/obj/Debug/App_Code.pdb
Binary files differ
web/Common/obj/Debug/Common.csproj.AssemblyReference.cache
Binary files differ
web/Common/obj/Debug/Common.dll
Binary files differ
web/Common/obj/Debug/Common.pdb
Binary files differ
web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache
Binary files differ
web/Dao/obj/Debug/Dao.dll
Binary files differ
web/Dao/obj/Debug/Dao.pdb
Binary files differ
web/Dao/obj/Debug/build.force
web/Lib/Common.dll
Binary files differ
web/Lib/Common.pdb
Binary files differ
web/Lib/Dao.dll
Binary files differ
web/Lib/Dao.pdb
Binary files differ
web/Lib/Model.dll
Binary files differ
web/Lib/Model.pdb
Binary files differ
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;
web/Model/obj/Debug/Model.csproj.AssemblyReference.cache
Binary files differ
web/Model/obj/Debug/Model.csproj.CopyComplete
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
web/Model/obj/Debug/Model.dll
Binary files differ
web/Model/obj/Debug/Model.pdb
Binary files differ
web/UMCLib/bin/Debug/UMCLib.dll
Binary files differ
web/UMCLib/bin/Debug/UMCLib.pdb
Binary files differ
web/UMCLib/obj/Debug/UMCLib.csproj.AssemblyReference.cache
Binary files differ
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
web/UMCLib/obj/Debug/UMCLib.dll
Binary files differ
web/UMCLib/obj/Debug/UMCLib.pdb
Binary files differ
web/web/Bin/App_Code.dll
Binary files differ
web/web/Bin/App_Code.pdb
Binary files differ
web/web/Bin/Common.dll
Binary files differ
web/web/Bin/Common.pdb
Binary files differ
web/web/Bin/Dao.dll
Binary files differ
web/web/Bin/Dao.pdb
Binary files differ
web/web/Bin/Model.dll
Binary files differ
web/web/Bin/Model.pdb
Binary files differ
web/web/Bin/UMCLib.dll
Binary files differ
web/web/Bin/UMCLib.pdb
Binary files differ
web/web/GwAuditCache.ashx
New file
@@ -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("请选择正确的通道!");
        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();
    }
}
web/web/GwAuditCache.aspx
New file
@@ -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>
web/web/GwAuditCache.aspx.cs
New file
@@ -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;
    }
}