|
|
@ -40,6 +40,8 @@ public class TaskRecordDao { |
|
|
|
|
|
|
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(TaskRecordDao.class.getName()); |
|
|
|
private static Logger logger = LoggerFactory.getLogger(TaskRecordDao.class.getName()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 加载配置文件 |
|
|
|
* 加载配置文件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -134,7 +136,7 @@ public class TaskRecordDao { |
|
|
|
* @param filterMap |
|
|
|
* @param filterMap |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static int countTaskRecord(Map<String, String> filterMap){ |
|
|
|
public static int countTaskRecord(Map<String, String> filterMap, String table){ |
|
|
|
|
|
|
|
|
|
|
|
int count = 0; |
|
|
|
int count = 0; |
|
|
|
Connection conn = null; |
|
|
|
Connection conn = null; |
|
|
@ -143,7 +145,7 @@ public class TaskRecordDao { |
|
|
|
if(conn == null){ |
|
|
|
if(conn == null){ |
|
|
|
return count; |
|
|
|
return count; |
|
|
|
} |
|
|
|
} |
|
|
|
String sql = "select count(1) as count from eamp_hive_log_hd"; |
|
|
|
String sql = String.format("select count(1) as count from %s", table); |
|
|
|
sql += getWhereString(filterMap); |
|
|
|
sql += getWhereString(filterMap); |
|
|
|
PreparedStatement pstmt; |
|
|
|
PreparedStatement pstmt; |
|
|
|
pstmt = conn.prepareStatement(sql); |
|
|
|
pstmt = conn.prepareStatement(sql); |
|
|
@ -171,9 +173,9 @@ public class TaskRecordDao { |
|
|
|
* @param filterMap |
|
|
|
* @param filterMap |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static List<TaskRecord> queryAllTaskRecord(Map<String,String> filterMap ) { |
|
|
|
public static List<TaskRecord> queryAllTaskRecord(Map<String,String> filterMap , String table) { |
|
|
|
|
|
|
|
|
|
|
|
String sql = "select * from eamp_hive_log_hd "; |
|
|
|
String sql = String.format("select * from %s", table); |
|
|
|
sql += getWhereString(filterMap); |
|
|
|
sql += getWhereString(filterMap); |
|
|
|
|
|
|
|
|
|
|
|
int offset = Integer.parseInt(filterMap.get("offset")); |
|
|
|
int offset = Integer.parseInt(filterMap.get("offset")); |
|
|
|