From df8ab066a52a7f7d60e1fc2bf97b149204f6b7b6 Mon Sep 17 00:00:00 2001 From: revisit Date: Tue, 26 May 2026 15:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=88=AA=E6=AC=A1=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=89=80=E6=9C=89=E8=88=AA=E6=AC=A1=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/classes/.gitignore | 2 ++ .../dsds/control/search/SearchControl.class | Bin 8707 -> 8895 bytes .../dsds/control/search/SearchControl.java | 13 ++++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/build/classes/.gitignore b/build/classes/.gitignore index 8fe2033..d36383e 100644 --- a/build/classes/.gitignore +++ b/build/classes/.gitignore @@ -1 +1,3 @@ +/app.properties /cn/ +/jdbc.properties diff --git a/build/classes/cn/tsy/cas/idsse/dsds/control/search/SearchControl.class b/build/classes/cn/tsy/cas/idsse/dsds/control/search/SearchControl.class index 6c14a818579b5b7f25fb7a51b581b00be12edb94..a50678cc5551e45b620522cc9e6a572cde31fdef 100644 GIT binary patch delta 1094 zcmZvaXG~L37>3`E7Fydfdg}6f~$^1@rS56 z@dp?+F%n~9;=nji)VLRld*VVIxKIR95IsFKh7faepYwj>J?G0kckQIplf$ldRi6T2 zBT^xNkj!iW$p+h)4Djn#F6Q;XFILgd9f5{RpTMsthdu+)~t`Drz}KDrf1A1 zIjk=Ta<|7-xG1|I*Olk#X?w-aO2g?jYm;Wu8s6V1o#gz+o*1L)JL@o7lx>7WmJ>dRjWcPfy=sanje^wpMVQE135>T3LMzd&^NHMa!xq=wA-KtdZ5# zI02++_MlQ4;m@0Vd0*wEuc92K-Gfpo#a}dZn`-`*a;34oef(nlzBI`uiizd$8&ChM zjg%(!HlFbp*^=n^G~EfL&5A#asY4Tn$-3j17Ko!rKOk$WagO)tjM{SOe9?Jd^#5l5 zhbUm+tiWK_5FO{uK|b6lzzP(i6h+v|qh0Wz5{qyMi&29mID=x;q6Ckz6!ln!CM-uQ zceGL8`6l-wS>a r{4_@_Uj)Ajwg`3~(|thCt$S|TDms4%{uKOx4nC@ekJ*VX{^{kv#3Kue delta 913 zcmZ9JSx8h-7{~wL%;b!d;mn=IS#)L;#3hItdlGyw>?H_#iGqQq$*X0HSx%)EOj-6; z4;~0Cu*WDQh>0xA1+>jp%e2L8FD=`%)uQj7@j>Nsf9H3;bHC-@+qrmeiKX{nTL*w* zOc zC4(M_TqQ`4L`aFyW6`eo=!qCo3h0@z*j9L75bP9)RH^|r5{-l_)IddLF69MGcqQs> z3+PS!v~4-js4zQP=$&YF_~^YDV15+i4uAS*f@4a0w6>}&P?SSCoc~qKcNWliTy-uZ z@i)y%KSio5-|(B@6CD;`JmjiQN^XP^DFBs^8OG zJWyyphC|B2$+%66YbO^HC%crw=^5>bxT+M*%;1lz)mowyPtWKC(zS!2QZh58OG^=B z{(PZ&ywois9uLn9J?zXnex33_UaSh0?3>YmDl}pXj$$iXP>ohZ(SvR1!*&c~2S!nY z@2Dj`>d1nfn3EzB!=l4QtqCXVafw$C&+83=s&N@tcz>1eW{%$C_-)BM zlKqkclJ_MaN)Aa5OFor+F8NaOwd9E8+m&(|ll&n0NixwU(O_!nsYSoYC%;LK@DBpa MJm3%f!XLQ*1EXZw;Q#;t diff --git a/src/main/java/cn/tsy/cas/idsse/dsds/control/search/SearchControl.java b/src/main/java/cn/tsy/cas/idsse/dsds/control/search/SearchControl.java index 2297123..9d5a934 100644 --- a/src/main/java/cn/tsy/cas/idsse/dsds/control/search/SearchControl.java +++ b/src/main/java/cn/tsy/cas/idsse/dsds/control/search/SearchControl.java @@ -105,20 +105,27 @@ public class SearchControl extends HmeAjaxControl { where += " and equipment_type ='" + param.getEquipment_type() + "' "; 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)); }