|
发表于 2018-10-15 15:28:54
|
显示全部楼层
String sql = "select a.*,b.aac002,b.aac003,b.aac008,b.aac016 from ac08 a LEFT JOIN ac01 b on a.aac001 = b.aac001 where a.acc160 like '1%' and bae035 is null and a.aab001='"
+ aab001 + "'";
if (StringUtil.isNotEmpty(aac002)) {
sql = sql + " and b.aac002 ='" + aac002 + "'";
}
if (StringUtil.isNotEmpty(aac003)) {
sql = sql + " and b.aac003 ='" + aac003 + "'";
}
if (StringUtil.isNotEmpty(aac008)) {
sql = sql + " and b.aac008 ='" + aac008 + "'";
}
if (StringUtil.isNotEmpty(aac016)) {
sql = sql + " and b.aac016 ='" + aac016 + "'";
}
ac08Service.findForJdbc(dataGrid, sql); |
|