|
|
@@ -54,30 +54,49 @@ public class AdminStatisticsServiceImpl implements AdminStatisticsService {
|
|
|
//获取当月的列表
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
Days days = new Days();
|
|
|
- List thisMonth = getThisMonth(days);
|
|
|
+ List<String> thisMonth = getThisMonth(days);
|
|
|
List<AdminUserCount> userList = adminMapper.thisMonthUser(days.firstDay,days.endDay, aid);
|
|
|
List<Integer> signList=new ArrayList<>();
|
|
|
List<Integer> privateList=new ArrayList<>();
|
|
|
List<Integer> channelList=new ArrayList<>();
|
|
|
List<Integer> userFollowList=new ArrayList<>();
|
|
|
List<Integer> orderList=new ArrayList<>();
|
|
|
- int signCount=0,privateCount=0,channelCount=0,followCount=0,orderCount=0;
|
|
|
- for (AdminUserCount e : userList) {
|
|
|
- signCount=signCount+e.getSignCount();
|
|
|
- int newSign=signCount;
|
|
|
- signList.add(newSign);
|
|
|
- privateCount=privateCount+e.getPrivateCount();
|
|
|
- int newPrivate=privateCount;
|
|
|
- privateList.add(newPrivate);
|
|
|
- channelCount=channelCount+e.getChannelCount();
|
|
|
- int newChannel=channelCount;
|
|
|
- channelList.add(newChannel);
|
|
|
- followCount=followCount+e.getFollowCount();
|
|
|
- int newFollow=followCount;
|
|
|
- channelList.add(newFollow);
|
|
|
- orderCount=orderCount+e.getOrderCount();
|
|
|
- int newOrder=orderCount;
|
|
|
- channelList.add(newOrder);
|
|
|
+ List<Integer> publicReleaseList=new ArrayList<>();
|
|
|
+ int signCount=0,privateCount=0,channelCount=0,followCount=0,orderCount=0,publicReleaseCount=0;
|
|
|
+ for (String dates : thisMonth) {
|
|
|
+ boolean flag=true;
|
|
|
+ for (AdminUserCount e : userList) {
|
|
|
+ String formatDate = DateUtils.formatDate(e.getDateTime(), AFTConstants.YYYYMMDD);
|
|
|
+ if (dates.equals(formatDate)){
|
|
|
+ signCount=signCount+e.getSignCount();
|
|
|
+ int newSign=signCount;
|
|
|
+ signList.add(newSign);
|
|
|
+ privateCount=privateCount+e.getPrivateCount();
|
|
|
+ int newPrivate=privateCount;
|
|
|
+ privateList.add(newPrivate);
|
|
|
+ channelCount=channelCount+e.getChannelCount();
|
|
|
+ int newChannel=channelCount;
|
|
|
+ channelList.add(newChannel);
|
|
|
+ followCount=followCount+e.getFollowCount();
|
|
|
+ int newFollow=followCount;
|
|
|
+ userFollowList.add(newFollow);
|
|
|
+ orderCount=orderCount+e.getOrderCount();
|
|
|
+ int newOrder=orderCount;
|
|
|
+ orderList.add(newOrder);
|
|
|
+ publicReleaseCount=publicReleaseCount+e.getPublicReleaseCount();
|
|
|
+ int newPublicRelease=publicReleaseCount;
|
|
|
+ publicReleaseList.add(newPublicRelease);
|
|
|
+ flag=false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag){
|
|
|
+ signList.add(signCount);
|
|
|
+ privateList.add(privateCount);
|
|
|
+ channelList.add(channelCount);
|
|
|
+ userFollowList.add(followCount);
|
|
|
+ orderList.add(orderCount);
|
|
|
+ publicReleaseList.add(publicReleaseCount);
|
|
|
+ }
|
|
|
}
|
|
|
map.put("dates",thisMonth);
|
|
|
map.put("signList",signList);
|
|
|
@@ -88,9 +107,7 @@ public class AdminStatisticsServiceImpl implements AdminStatisticsService {
|
|
|
//订单数
|
|
|
map.put("orderList",orderList);
|
|
|
//公出企业数
|
|
|
- List<Integer> publicReleaseList = adminMapper.thisMonthPublicRelease(thisMonth,days.firstDay, aid);
|
|
|
map.put("publicReleaseList",publicReleaseList);
|
|
|
-
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
@@ -101,7 +118,7 @@ public class AdminStatisticsServiceImpl implements AdminStatisticsService {
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
- public List getThisMonth(Days days) {
|
|
|
+ public List<String> getThisMonth(Days days) {
|
|
|
//获取当月的第一天
|
|
|
Date date=new Date();
|
|
|
|
|
|
@@ -117,6 +134,7 @@ public class AdminStatisticsServiceImpl implements AdminStatisticsService {
|
|
|
list.add(DateUtils.formatDate(newc.getTime(), AFTConstants.YYYYMMDD));
|
|
|
}else {
|
|
|
ca.add(Calendar.DAY_OF_MONTH,1);
|
|
|
+ ca.set(Calendar.HOUR_OF_DAY,0);
|
|
|
if (ca.getTimeInMillis()<date.getTime()){
|
|
|
Calendar newc=Calendar.getInstance();
|
|
|
newc.setTime(ca.getTime());
|