Commit e1a290b8 by zhengxj

finish 修正安装单总量统计 on 20190322 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18810 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 62bb7860
......@@ -912,12 +912,12 @@ public class OrderServiceImpl implements IOrderService {
for (int i = 0; i < currentHour; i++) {
SysOrderExample orderExample = new SysOrderExample();
Criteria criteria = orderExample.createCriteria();
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
if(isMer){
criteria.andMerchantIdEqualTo(userId);
}else{
criteria.andShopIdIn(dataRight);
}
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
}
Date beginTime = new Date();
beginTime.setHours(i);
beginTime.setMinutes(0);
......@@ -948,8 +948,7 @@ public class OrderServiceImpl implements IOrderService {
params.put("endTime", endTime);
break;
// 按照周计算
case "w":
case "w":
bizAmountResp.setType("w");
int currentDay = DateUtil.getCurrentDate().getDate();
// 本周第一天 日期
......@@ -961,12 +960,12 @@ public class OrderServiceImpl implements IOrderService {
for (int i = firstDayOfWeek; i < currentDay; i++) {
SysOrderExample orderExample = new SysOrderExample();
Criteria criteria = orderExample.createCriteria();
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
if(isMer){
criteria.andMerchantIdEqualTo(userId);
}else{
criteria.andShopIdIn(dataRight);
}
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
criteria.andShopIdIn(dataRight);
}
Date beginDate = new Date();
beginDate.setDate(i);
beginDate.setHours(0);
......@@ -994,12 +993,13 @@ public class OrderServiceImpl implements IOrderService {
for (int i = firstDayOfWeek; i < pastMonthLastDay; i++) {
SysOrderExample orderExample = new SysOrderExample();
Criteria criteria = orderExample.createCriteria();
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
if(isMer){
criteria.andMerchantIdEqualTo(userId);
}else{
criteria.andShopIdIn(dataRight);
}
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
Date beginDate = new Date();
beginDate.setDate(i);
beginDate.setHours(0);
......@@ -1069,9 +1069,9 @@ public class OrderServiceImpl implements IOrderService {
bizAmountResp.setType("m");
currentDay = DateUtil.getCurrentDate().getDate();
// 本月第一天 日期
Date firstDayOfMonth = DateUtil.getPastMonthFirstDay(0);
// Date firstDayOfMonth = DateUtil.getPastMonthFirstDay(0);
// 统计本月每天订单量
for (int i = firstDayOfMonth.getDate(); i < currentDay; i++) {
for (int i = 1; i < currentDay; i++) {
SysOrderExample orderExample = new SysOrderExample();
Criteria criteria = orderExample.createCriteria();
if(isMer){
......@@ -1120,7 +1120,7 @@ public class OrderServiceImpl implements IOrderService {
// 统计本月每天订单量
for (int i = 1; i < currentMonth; i++) {
SysOrderExample orderExample = new SysOrderExample();
Criteria criteria = orderExample.createCriteria();
Criteria criteria = orderExample.createCriteria();
if(isMer){
criteria.andMerchantIdEqualTo(userId);
}else{
......@@ -1129,6 +1129,7 @@ public class OrderServiceImpl implements IOrderService {
criteria.andActiveStatusNotEqualTo((byte) 9).andCanceledEqualTo((byte) 1);
beginDate = new Date();
beginDate.setMonth(i);
beginDate.setDate(1);
beginDate.setHours(0);
beginDate.setMinutes(0);
beginDate.setSeconds(0);
......@@ -1146,7 +1147,7 @@ public class OrderServiceImpl implements IOrderService {
bizAmount.add(businessAmount);
}
beginDate = DateUtil.getPastMonthFirstDay(currentMonth);
beginDate = DateUtil.getPastMonthFirstDay(currentMonth-1);
beginDate.setHours(0);
beginDate.setMinutes(0);
beginDate.setSeconds(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!