|
|
|
@ -1727,8 +1727,16 @@ public class CollectModel {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Record> getTableDataByJobId(int job_id, String table_name) {
|
|
|
|
|
String sql = "select * from " + table_name + " where job_id = ?";
|
|
|
|
|
return Db.find(sql, job_id);
|
|
|
|
|
String sql = "select job_id from t_collect_job where parent_id=?";
|
|
|
|
|
List<Record> list = Db.find(sql, job_id);
|
|
|
|
|
String ids = job_id + ",";
|
|
|
|
|
for (Record record : list) {
|
|
|
|
|
ids += record.getStr("job_id") + ",";
|
|
|
|
|
}
|
|
|
|
|
if (ids.length() > 0) ids = ids.substring(0, ids.length() - 1);
|
|
|
|
|
|
|
|
|
|
sql = "select * from " + table_name + " where job_id in(" + ids + ")";
|
|
|
|
|
return Db.find(sql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|