| | |
| | | { |
| | | 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); |
| | | { 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='%%')" + |
| | | " 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); |
| | | |
| | | 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) }; |
| | | recordCount = Convert.ToInt32(OracleHelper.ExecuteScalar(OracleHelper.ToCountSql(str), OracleHelper.Connection, parameterArray)); |