|
|
@@ -216,7 +216,7 @@ public class databoard extends Controller {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
if (begindate != "") {
|
|
|
- where.append(" and DATE_FORMAT(t1.checkdate, '%Y-%m-%d') >='").append(begindate).append("' ");
|
|
|
+ where.append(" and t1.checkdate >='").append(begindate).append("' 00:00:00");
|
|
|
Date date = sdf.parse(begindate);
|
|
|
//创建Calendar实例
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
@@ -224,10 +224,10 @@ public class databoard extends Controller {
|
|
|
cal.setTime(date);
|
|
|
//在当前时间基础上减一年
|
|
|
cal.add(Calendar.YEAR, -1);
|
|
|
- whereLastYear.append(" and DATE_FORMAT(t1.checkdate, '%Y-%m-%d') >='").append(sdf.format(cal.getTime())).append("' ");
|
|
|
+ whereLastYear.append(" and t1.checkdate >='").append(sdf.format(cal.getTime())).append("' 00:00:00");
|
|
|
}
|
|
|
if (enddate != "") {
|
|
|
- where.append(" and DATE_FORMAT(t1.checkdate, '%Y-%m-%d') <='").append(enddate).append("' ");
|
|
|
+ where.append(" and t1.checkdate <='").append(enddate).append("' 23:59:59");
|
|
|
Date date = sdf.parse(enddate);
|
|
|
//创建Calendar实例
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
@@ -235,7 +235,7 @@ public class databoard extends Controller {
|
|
|
cal.setTime(date);
|
|
|
//在当前时间基础上减一年
|
|
|
cal.add(Calendar.YEAR, -1);
|
|
|
- whereLastYear.append(" and DATE_FORMAT(t1.checkdate, '%Y-%m-%d') <='").append(sdf.format(cal.getTime())).append("' ");
|
|
|
+ whereLastYear.append(" and t1.checkdate <='").append(sdf.format(cal.getTime())).append("' 23:59:59");
|
|
|
}
|
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|