Commit b1b41bcb by zhengxj

finish 修正控制台统计时间跨度 on 20190222 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17630 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent d156cf6f
......@@ -623,8 +623,8 @@ public class OrderServiceImpl implements IOrderService {
} else {
endTime = new Date();
}
criteria.andCreateTimeBetween(beginTime, endTime);
beginTime.setTime(beginTime.getTime()/1000*1000);
criteria.andCreateTimeGreaterThanOrEqualTo(beginTime).andCreateTimeLessThanOrEqualTo(endDate);
long businessAmount = orderDao.countByExample(orderExample);
bizAmount.add(businessAmount);
}
......@@ -662,7 +662,8 @@ public class OrderServiceImpl implements IOrderService {
} else {
endDate = new Date();
}
criteria.andCreateTimeBetween(beginDate, endDate);
beginDate.setTime(beginDate.getTime()/1000*1000);
criteria.andCreateTimeGreaterThanOrEqualTo(beginDate).andCreateTimeLessThanOrEqualTo(endDate);
long businessAmount = orderDao.countByExample(orderExample);
bizAmount.add(businessAmount);
}
......@@ -692,13 +693,17 @@ public class OrderServiceImpl implements IOrderService {
endDate = new Date();
if (i < currentDay) {
endDate.setDate(i);
endDate.setHours(23);
endDate.setMinutes(59);
endDate.setSeconds(59);
} else {
endDate = new Date();
}
criteria.andCreateTimeBetween(beginDate, endDate);
beginDate.setTime(beginDate.getTime()/1000*1000);
// endDate.setTime(endDate.getTime()/1000*1000);
criteria.andCreateTimeGreaterThanOrEqualTo(beginDate).andCreateTimeLessThanOrEqualTo(endDate);
// criteria.andCreateTimeBetween(beginDate, endDate);
long businessAmount = orderDao.countByExample(orderExample);
bizAmount.add(businessAmount);
}
......@@ -732,7 +737,7 @@ public class OrderServiceImpl implements IOrderService {
} else {
endDate = new Date();
}
criteria.andCreateTimeBetween(beginDate, endDate);
criteria.andCreateTimeGreaterThanOrEqualTo(beginDate).andCreateTimeLessThanOrEqualTo(endDate);
long businessAmount = orderDao.countByExample(orderExample);
bizAmount.add(businessAmount);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!