diff --git a/.gitignore b/.gitignore index 552c5da..4505591 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /build /tmp /out-tsc +/src/main/webapp/WEB-INF/lib # Only exists if Bazel was run /bazel-out diff --git a/build/classes/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.class b/build/classes/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.class index b13617f..c9ce015 100644 Binary files a/build/classes/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.class and b/build/classes/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.class differ diff --git a/src/main/java/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.java b/src/main/java/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.java index 7e1a1ab..48292dc 100644 --- a/src/main/java/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.java +++ b/src/main/java/cn/tsy/idsse/dsds/control/search/DSDSSearchControl.java @@ -29,39 +29,39 @@ public class DSDSSearchControl extends AjaxControl { @RequestMapping("page.htm") public Ajax page(Integer group, Integer limit, Integer start, String search_type, String order, String type, String return_type, String search_value, Integer[] ids) { - // String where = "select t.tsy_id from sample_dataset t,voyage y where y.tsy_id=t.voyage_id"; - String where = ""; + // String where += "select t.tsy_id from sample_dataset t,voyage y where y.tsy_id=t.voyage_id"; + String where += ""; if ("航次名称".equals(search_type)) { if (ids == null || ids.length < 1) { - where = " and t.voyage_name like concat('%','" + search_value + "','%') "; + where += " and t.voyage_name like concat('%','" + search_value + "','%') "; } else { - where = " and voyage_id in(" + CollectionHelper.join(ids, ",") + ") "; + where += " and voyage_id in(" + CollectionHelper.join(ids, ",") + ") "; } } else if ("平台类型".equals(search_type)) { if (ids == null || ids.length < 1) { - where = " and (platform_type like concat('%','" + search_value + "','%') or platform_alias like concat('%','" + search_value + "','%')) "; + where += " and (platform_type like concat('%','" + search_value + "','%') or platform_alias like concat('%','" + search_value + "','%')) "; } else { - where = " and platform_id in(" + CollectionHelper.join(ids, ",") + ") "; + where += " and platform_id in(" + CollectionHelper.join(ids, ",") + ") "; } } else if ("平台名称".equals(search_type)) { - where = " and platform_name like concat('%','" + search_value + "','%') "; + where += " and platform_name like concat('%','" + search_value + "','%') "; } else if ("设备类型".equals(search_type)) { if (ids == null || ids.length < 1) { - where = " and (equipment_type like concat('%','" + search_value + "','%') or equipment_alias like concat('%','" + search_value + "','%')) "; + where += " and (equipment_type like concat('%','" + search_value + "','%') or equipment_alias like concat('%','" + search_value + "','%')) "; } else { - where = " and equipment_id in(" + CollectionHelper.join(ids, ",") + ") "; + where += " and equipment_id in(" + CollectionHelper.join(ids, ",") + ") "; } } else if ("数据集名称".equals(search_type)) { - where = " and (dataset_name like concat('%','" + search_value + "','%')) "; + where += " and (dataset_name like concat('%','" + search_value + "','%')) "; } else if ("数据样品类型".equals(search_type)) { if (ids == null || ids.length < 1) { - where = " and (data_type like concat('%','" + search_value + "','%') or data_alias like concat('%','" + search_value + "','%')) "; + where += " and (data_type like concat('%','" + search_value + "','%') or data_alias like concat('%','" + search_value + "','%')) "; } else { - where = " and data_id in(" + CollectionHelper.join(ids, ",") + ") "; + where += " and data_id in(" + CollectionHelper.join(ids, ",") + ") "; } } else if ("航次首席".equals(search_type)) { - where = " and voyage_officer like concat('%'," + search_value + ",'%') "; + where += " and voyage_officer like concat('%'," + search_value + ",'%') "; } if ("数据样品集".equals(return_type)) { @@ -94,29 +94,29 @@ public class DSDSSearchControl extends AjaxControl { String where = ""; if (StringHelper.hasValue(param.getVoyage_name())) - where = " and t.voyage_name ='" + param.getVoyage_name() + "' "; + where += " and t.voyage_name ='" + param.getVoyage_name() + "' "; if (StringHelper.hasValue(param.getPlatform_type())) - where = " and platform_type ='" + param.getPlatform_type() + "' "; + where += " and platform_type ='" + param.getPlatform_type() + "' "; if (StringHelper.hasValue(param.getEquipment_type())) - where = " and equipment_type ='" + param.getEquipment_type() + "' "; + where += " and equipment_type ='" + param.getEquipment_type() + "' "; if (StringHelper.hasValue(param.getData_type())) - where = " and data_type ='" + param.getData_type() + "' "; + where += " and data_type ='" + param.getData_type() + "' "; if (StringHelper.hasValue(search_value)) { if ("航次名称".equals(search_type)) { - where = " and t.voyage_name like concat('%','" + search_value + "','%') "; + 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 + "','%')) "; + where += " and (platform_type like concat('%','" + search_value + "','%') or platform_alias like concat('%','" + search_value + "','%')) "; } else if ("平台名称".equals(search_type)) { - where = " and platform_name like concat('%','" + search_value + "','%') "; + where += " and platform_name like concat('%','" + search_value + "','%') "; } else if ("设备类型".equals(search_type)) { - where = " and (equipment_type like concat('%','" + search_value + "','%') or equipment_alias like concat('%','" + search_value + "','%')) "; + where += " and (equipment_type like concat('%','" + search_value + "','%') or equipment_alias like concat('%','" + search_value + "','%')) "; } else if ("数据集名称".equals(search_type)) { - where = " and (dataset_name like concat('%','" + search_value + "','%')) "; + where += " and (dataset_name like concat('%','" + search_value + "','%')) "; } else if ("数据样品类型".equals(search_type)) { - where = " and (data_type like concat('%','" + search_value + "','%') or data_alias like concat('%','" + search_value + "','%')) "; + where += " and (data_type like concat('%','" + search_value + "','%') or data_alias like concat('%','" + search_value + "','%')) "; } else if ("航次首席".equals(search_type)) { - where = " and voyage_officer like concat('%','" + search_value + "','%') "; + where += " and voyage_officer like concat('%','" + search_value + "','%') "; } }