|
|
@@ -162,10 +162,9 @@ public class WxUserStatisticsController extends BaseController { |
|
|
}while (curTime.before(endTime) || curTime.equals(endTime)); |
|
|
}while (curTime.before(endTime) || curTime.equals(endTime)); |
|
|
|
|
|
|
|
|
for (UserCountVo ucv:wxCountList) { |
|
|
for (UserCountVo ucv:wxCountList) { |
|
|
if(ucv.getIncCount() == null){ |
|
|
|
|
|
ucv.setTotalCount(0l); |
|
|
|
|
|
|
|
|
if(ucv.getIncCount() != null){ |
|
|
|
|
|
startTotal += ucv.getIncCount(); |
|
|
} |
|
|
} |
|
|
startTotal += ucv.getIncCount(); |
|
|
|
|
|
ucv.setTotalCount(startTotal); |
|
|
ucv.setTotalCount(startTotal); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -273,10 +272,8 @@ public class WxUserStatisticsController extends BaseController { |
|
|
memCounts.stream().filter(md -> md.getReportTime().equals(sdf.format(ct))).findFirst(); |
|
|
memCounts.stream().filter(md -> md.getReportTime().equals(sdf.format(ct))).findFirst(); |
|
|
if (opMemUserCountVo.isPresent()) { |
|
|
if (opMemUserCountVo.isPresent()) { |
|
|
memUc.setIncCount(opMemUserCountVo.get().getIncCount()); |
|
|
memUc.setIncCount(opMemUserCountVo.get().getIncCount()); |
|
|
memUc.setTotalCount(opMemUserCountVo.get().getTotalCount()); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
memUc.setIncCount(0L); |
|
|
memUc.setIncCount(0L); |
|
|
memUc.setTotalCount(0L); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
memCountList.add(memUc); |
|
|
memCountList.add(memUc); |
|
|
@@ -290,20 +287,14 @@ public class WxUserStatisticsController extends BaseController { |
|
|
|
|
|
|
|
|
}while (curTime.before(endTime) || curTime.equals(endTime)); |
|
|
}while (curTime.before(endTime) || curTime.equals(endTime)); |
|
|
|
|
|
|
|
|
if (memCountList.size() > 0 |
|
|
|
|
|
&& memCountList.get(0).getTotalCount() != null |
|
|
|
|
|
&& memCountList.get(0).getTotalCount() == 0) { |
|
|
|
|
|
|
|
|
if (memCountList.size() > 0) { |
|
|
WxCUserBasicInfoDto pdto = new WxCUserBasicInfoDto(); |
|
|
WxCUserBasicInfoDto pdto = new WxCUserBasicInfoDto(); |
|
|
pdto.updateTenantInfo(tenantEntity); |
|
|
pdto.updateTenantInfo(tenantEntity); |
|
|
pdto.setEndTime(startTime); |
|
|
pdto.setEndTime(startTime); |
|
|
memCountList.get(0).setTotalCount(wxCUserBasicInfoService.findCount(pdto)); |
|
|
memCountList.get(0).setTotalCount(wxCUserBasicInfoService.findCount(pdto)); |
|
|
} |
|
|
} |
|
|
for (int i = 1; i < memCountList.size(); i++){ |
|
|
for (int i = 1; i < memCountList.size(); i++){ |
|
|
if ( memCountList.get(i).getTotalCount() != null && |
|
|
|
|
|
memCountList.get(i-1).getTotalCount() != null && |
|
|
|
|
|
memCountList.get(i).getTotalCount() < memCountList.get(i-1).getTotalCount()){ |
|
|
|
|
|
memCountList.get(i).setTotalCount(memCountList.get(i-1).getTotalCount()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
memCountList.get(i).setTotalCount(memCountList.get(i-1).getTotalCount()+memCountList.get(i).getIncCount()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return new ResultData(memCountList); |
|
|
return new ResultData(memCountList); |
|
|
|