Commit d405cb23 by wang_jiaxing

查询加入时间范围

parent de33f9b6
......@@ -95,7 +95,12 @@ public class GjServiceImpl implements GjService {
"FROM people_trail01 where _type= " +
"'jdc' and " +
"HPHM = '" + xyrParam.getCphm() + "' ";
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND JLRKSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND JLRKSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by JLRKSJ desc";
Map<String, Object> map = EsUtils.newQueryEs(request, sql);
......@@ -154,6 +159,12 @@ public class GjServiceImpl implements GjService {
"people_trail01 where _type= " +
"'mhjcgall' and " +
"ZJHM = '" +xyrParam.getZjhm() +"' ";
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND KSSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND KSSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by KSSJ desc";
Map<String, Object> map = EsUtils.newQueryEs(request, sql);
......@@ -211,6 +222,12 @@ public class GjServiceImpl implements GjService {
"people_trail01 where GJLX= 'hc'" +
" and " +
"ZJHM = '" +xyrParam.getZjhm() +"' ";
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND KSSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND KSSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by KSSJ desc";
Map<String, Object> map = EsUtils.newQueryEs(request, sql);
......@@ -271,7 +288,12 @@ public class GjServiceImpl implements GjService {
"people_trail01 where (_type= 'lg' or GJLX='lg' )" +
" and " +
"ZJHM = '" +xyrParam.getZjhm() +"' ";
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND KSSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND KSSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by KSSJ desc";
Map<String, Object> map = EsUtils.newQueryEs(request, sql);
......@@ -475,7 +497,12 @@ public class GjServiceImpl implements GjService {
"FROM " +
"people_trail01 where _type= 'jdc' and " +
"ZJHM = '" + xyrParam.getZjhm() + "' ";
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND JLRKSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND JLRKSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by JLRKSJ desc";
Map<String, Object> map = EsUtils.newQueryEs(request, sql);
......@@ -839,6 +866,12 @@ public class GjServiceImpl implements GjService {
"people_type01 where _type= " +
"'bs_sqjw_czfw' and" +
" ZJHM = '" + xyrParam.getZjhm() + "' ";
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND DJSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND DJSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by DJSJ desc";
Map<String, Object> map = EsUtils.newQueryEs(request, sql);
......@@ -1060,6 +1093,12 @@ public class GjServiceImpl implements GjService {
}
sql+= " )" ;
}
if (StringUtils.isNotBlank(xyrParam.getKssj())) {
sql += "AND KSSJ > '" + StrToEsDate(xyrParam.getKssj()) + "' ";
}
if (StringUtils.isNotBlank(xyrParam.getJssj())) {
sql += "AND KSSJ < '" + StrToEsDate(xyrParam.getJssj()) + "' ";
}
sql += " limit " + xyrParam.getPage() + "," + xyrParam.getLimit() + " " +
"order by KSSJ desc";
System.out.println("sql:"+sql);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment