查询航次显示所有航次信息
This commit is contained in:
parent
d343170a09
commit
df8ab066a5
|
|
@ -1 +1,3 @@
|
|||
/app.properties
|
||||
/cn/
|
||||
/jdbc.properties
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -106,19 +106,26 @@ public class SearchControl extends HmeAjaxControl {
|
|||
if (HmeStringHelper.hasValue(param.getData_type()))
|
||||
where += " and data_type ='" + param.getData_type() + "' ";
|
||||
|
||||
boolean dataset_search = false;
|
||||
|
||||
if (HmeStringHelper.hasValue(search_value)) {
|
||||
if ("航次名称".equals(search_type)) {
|
||||
where += " and t.voyage_name like concat('%','" + search_value + "','%') ";
|
||||
} else if ("平台类型".equals(search_type)) {
|
||||
where += " and (platform_type like concat('%','" + search_value + "','%') or platform_alias like concat('%','" + search_value + "','%')) ";
|
||||
dataset_search = true;
|
||||
} else if ("平台名称".equals(search_type)) {
|
||||
where += " and platform_name like concat('%','" + search_value + "','%') ";
|
||||
dataset_search = true;
|
||||
} else if ("设备类型".equals(search_type)) {
|
||||
where += " and (equipment_type like concat('%','" + search_value + "','%') or equipment_alias like concat('%','" + search_value + "','%')) ";
|
||||
dataset_search = true;
|
||||
} else if ("数据集名称".equals(search_type)) {
|
||||
where += " and (dataset_name like concat('%','" + search_value + "','%')) ";
|
||||
dataset_search = true;
|
||||
} else if ("数据样品类型".equals(search_type)) {
|
||||
where += " and (data_type like concat('%','" + search_value + "','%') or data_alias like concat('%','" + search_value + "','%')) ";
|
||||
dataset_search = true;
|
||||
} else if ("航次首席".equals(search_type)) {
|
||||
where += " and voyage_officer like concat('%','" + search_value + "','%') ";
|
||||
}
|
||||
|
|
@ -130,7 +137,11 @@ public class SearchControl extends HmeAjaxControl {
|
|||
return new HmeAjax(this.mVoyage.pageBySql(group, start, limit, sql));
|
||||
} else {
|
||||
// 航次
|
||||
String sql = "select t.* from voyage_reg t where tsy_id in (" + "select distinct t.voyage_id from sample_dataset t,voyage_reg y where y.tsy_id=t.voyage_id " + " " + where + ") order by t.create_time desc";
|
||||
|
||||
String sql = "select t.* from voyage_reg t where 1=1" + where +" order by t.create_time desc";
|
||||
if(dataset_search)
|
||||
sql = "select t.* from voyage_reg t where tsy_id in (" + "select distinct t.voyage_id from sample_dataset t,voyage_reg y where y.tsy_id=t.voyage_id " + " " + where + ") order by t.create_time desc";
|
||||
|
||||
return new HmeAjax(this.mVoyage.pageBySql(group, start, limit, sql));
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue