| | |
| | | string OP = ""; |
| | | if (opname != "") |
| | | { OP = $"and op.OP_NAME='{opname}'"; } |
| | | //string str = string.Format("SELECT op.op_name,ca.SP_ID,ca.OP_ID,ca.MSG_CONTENT,ca.KEYWORD,ca.HASH_CODE,COUNT(*) CNT " + |
| | | // "FROM GW_AUDIT_CACHE ca left join gw_op op on ca.op_id=op.op_id WHERE " + |
| | | // " {0} ca.AP_SUBMIT_TIME BETWEEN :START_TIME AND :END_TIME AND (ca.MSG_CONTENT LIKE :CONTENT OR :CONTENT='%%')" + |
| | | // " AND ca.AUDITING_STATUS=:AUDITING_STATUS {1} \r\n " + |
| | | // " GROUP BY ca.SP_ID,ca.OP_ID,ca.MSG_CONTENT,ca.KEYWORD,ca.HASH_CODE,op.op_name", this.GenerateOpIDsString(spids), OP); |
| | | //最新 |
| | | string str = string.Format("SELECT op.op_name,ca.SP_ID,ca.OP_ID,ca.MSG_CONTENT,ca.KEYWORD,ca.HASH_CODE,COUNT(*) CNT " + |
| | | "FROM GW_AUDIT_CACHE ca left join gw_op op on ca.op_id=op.op_id WHERE " + |
| | | " ca.SP_ID IN '{0}' and ca.AP_SUBMIT_TIME BETWEEN :START_TIME AND :END_TIME AND (ca.MSG_CONTENT LIKE :CONTENT OR :CONTENT='%%')" + |
| | | |
| | | string spidStr = ""; |
| | | if (!string.IsNullOrEmpty(spids)) |
| | | { |
| | | spidStr = " and ca.SP_ID ='"+spids+"'"; |
| | | } |
| | | |
| | | |
| | | string str = string.Format("SELECT op.op_name,ca.SP_ID,ca.client_id,ca.OP_ID,ca.MSG_CONTENT,ca.KEYWORD,ca.HASH_CODE,COUNT(*) CNT " + |
| | | "FROM GW_AUDIT_CACHE ca left join gw_op op on ca.op_id=op.op_id WHERE 1=1 " + |
| | | " {0} and ca.AP_SUBMIT_TIME BETWEEN :START_TIME AND :END_TIME AND (ca.MSG_CONTENT LIKE :CONTENT OR :CONTENT='%%')" + |
| | | " AND ca.AUDITING_STATUS=:AUDITING_STATUS {1} \r\n " + |
| | | " GROUP BY ca.SP_ID,ca.OP_ID,ca.MSG_CONTENT,ca.KEYWORD,ca.HASH_CODE,op.op_name",spids, OP); |
| | | " GROUP BY ca.SP_ID,ca.client_id,ca.OP_ID,ca.MSG_CONTENT,ca.KEYWORD,ca.HASH_CODE,op.op_name", spidStr, OP); |
| | | |
| | | List<GwAuditCache> list = new List<GwAuditCache>(); |
| | | OracleParameter[] parameterArray = new OracleParameter[] { new OracleParameter(":START_TIME", begin), new OracleParameter(":END_TIME", end), new OracleParameter(":CONTENT", "%" + content + "%"), new OracleParameter(":AUDITING_STATUS", status) }; |
| | |
| | | OracleParameter[] parameterArray = new OracleParameter[] { new OracleParameter(":AUDITING_STATUS", (int)status), new OracleParameter(":HASH_CODE", hashCode) }; |
| | | return (OracleHelper.ExecuteSql(str, OracleHelper.Connection, parameterArray) > 0); |
| | | } |
| | | |
| | | //更新内容 |
| | | public bool UpdateCacheContent(string hashCode, string content) |
| | | { |
| | | string str = "UPDATE GW_AUDIT_CACHE SET AP_SUBMIT_TIME=SYSDATE,MSG_CONTENT=:MSG_CONTENT WHERE HASH_CODE=:HASH_CODE"; |
| | | OracleParameter[] parameterArray = new OracleParameter[] { new OracleParameter(":MSG_CONTENT", content), new OracleParameter(":HASH_CODE", hashCode) }; |
| | | return (OracleHelper.ExecuteSql(str, OracleHelper.Connection, parameterArray) > 0); |
| | | } |
| | | |
| | | |
| | | |
| | | public bool UpdateCacheStatus(string hashCode, AuditingStatus status, int opID) |
| | | { |
| | |
| | | <LastUsedPlatform>Any CPU</LastUsedPlatform> |
| | | <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> |
| | | <PublishProvider>FileSystem</PublishProvider> |
| | | <PublishUrl>bin\Release\Publish</PublishUrl> |
| | | <PublishUrl>C:\SMGW_Web</PublishUrl> |
| | | <WebPublishMethod>FileSystem</WebPublishMethod> |
| | | <SiteUrlToLaunchAfterPublish /> |
| | | <PrecompileBeforePublish>True</PrecompileBeforePublish> |
| | |
| | | return this.loadDetail(context); |
| | | case "load": |
| | | return this.Load(context); |
| | | case "editContent": |
| | | return this.EditContent(context); |
| | | default: |
| | | throw new Exception("Invalid Action=" + @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"); |
| | | DateTime startTime = context.GetDateTime("StartTime"); |
| | | DateTime endTime = context.GetDateTime("EndTime"); |
| | | int auditingStatus = context.GetInt("auditingStatus"); |
| | | string content = context.GetString("content"); |
| | | string spids = context.GetString("spids"); |
| | | int recordCount = 0; |
| | | int int2 = context.GetInt("pageSize", 20); |
| | | int int3 = context.GetInt("pageIndex", 1); |
| | | int pageSize = context.GetInt("pageSize", 20); |
| | | int pageIndex = 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); |
| | | DataTable dataTable = gwAuditCacheDao.LoadCache(startTime, endTime, auditingStatus, content, spids, out recordCount, pageSize, pageIndex, opname); |
| | | if (dataTable.Rows.Count > 0) |
| | | { |
| | | foreach (DataRow row in (InternalDataCollectionBase)dataTable.Rows) |
| | |
| | | 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>" + dataRowReader.GetString("CLIENT_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>"); |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //内容编辑 |
| | | public JsonPageResult EditContent(PageContext<SysUser> context) |
| | | { |
| | | string sms = context.GetString("newSms"); |
| | | if (string.IsNullOrEmpty(sms)) |
| | | { |
| | | 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.UpdateCacheContent(hashCode, sms)) |
| | | stringBuilder.AppendFormat("修改内容过程发生错误,{0}:修改失败!", hashCode); |
| | | } |
| | | stringBuilder.AppendLine(); |
| | | stringBuilder.AppendFormat("内容调整完成,共" + (object)strArray.Length + "个内容!"); |
| | | return new JsonPageResult(true, (object)stringBuilder.ToString()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 批准(带通道) |
| | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | |
| | | |
| | | |
| | | <div class="table-responsive"> |
| | | <input class="btn btn-success action-modal-approve" data-status="4" value="批量通过(可修改通道)" |
| | | type="button" />  |
| | |
| | | type="button" />  |
| | | <input class="btn btn-warning action-audit-all" data-status="5" value="直接批量拒绝" |
| | | type="button" /> |
| | | <table class="table table-striped table-bordered table-hover" id="cacheTable"> |
| | | <input class="btn btn-primary action-edit-content" data-status="999" value="修改内容" |
| | | type="button" /> |
| | | |
| | | <table class="table table-striped table-bordered table-hover" id="cacheTable" style="margin:10px 0 0 0;"> |
| | | <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> |
| | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div id="pager"> |
| | | <div id="pager" style="margin:10px 0 0 0;"> |
| | | </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> |
| | | |
| | | |
| | | <%--内容修改--%> |
| | | <div class="modal inmodal " id="editContentDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <div class="modal-dialog modal-sm"> |
| | | <div class="modal-content" style="width:450px;"> |
| | | <div class="modal-header"> |
| | | <span class="title">修改内容</span><a class="close" data-dismiss="modal" aria-hidden="true">×</a></div> |
| | | <div class="modal-body"> |
| | | <div style="display:flex;align-items:center;flex-direction:column;justify-content:center;"> |
| | | <div>原内容:<textarea style="width:400px;height:200px" readonly id="oldContent"></textarea></div> |
| | | |
| | | <div style="margin:30px 0 0 0;"><span style="color:red;font-weight:bold;">修改后的内容:</span><textarea style="width:400px;height:200px" id="newContent"></textarea></div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn-warning btn" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn-primary btn action-edit-submit"> |
| | | 确定</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"> |
| | |
| | | |
| | | $("#opDialog").modal("show"); |
| | | }); |
| | | |
| | | |
| | | //修改内容 |
| | | $(".action-edit-content").on("click", function () { |
| | | var hashCodes = []; |
| | | |
| | | $("input[name=hashCode]").each(function () { |
| | | if ($(this).is(":checked")) { |
| | | hashCodes.push($(this).val()); |
| | | } |
| | | }); |
| | | |
| | | $("input[type='checkbox']").each(function () { //遍历checkbox的选择状态 |
| | | if ($(this).prop("checked")) { //如果值为checked表明选中了 |
| | | hashCodes.push($(this).val()); |
| | | |
| | | // console.log("选中该行的IEMI:"+$(this).closest('tr').find('td').eq(7).text()); |
| | | var delei = $(this).closest('tr').find('td').eq(4).text();//获取eq为7的那一列数据(就是第7列) |
| | | console.log("选中该行的列值:" + typeof delei + '--' + delei); |
| | | |
| | | $("#oldContent").val(delei); |
| | | $("#newContent").val(delei); |
| | | |
| | | } |
| | | }); |
| | | |
| | | if (hashCodes.length == 0) { |
| | | mytek.alert("尚未选择要修改的内容"); |
| | | return; |
| | | } |
| | | |
| | | $("#editContentDialog").modal("show"); |
| | | }); |
| | | |
| | | |
| | | //提交修改内容 |
| | | $(".action-edit-submit").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; |
| | | } |
| | | |
| | | let newSms = $("#newContent").val(); |
| | | |
| | | |
| | | $.post("gwauditcache.ashx", { action: "editContent", hashCodes: $.toJSON(hashCodes), newSms: newSms }, |
| | | function (result) { |
| | | $("#editContentDialog").modal("hide"); |
| | | mytek.alert(result.Message, result.OK, function () { |
| | | load(); |
| | | }); |
| | | }, "json"); |
| | | }); |
| | | |
| | | }); |
| | | </script> |
| | | </asp:Content> |