| | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<SysShopInfo> shops = null; |
| | | if (statisticsParam.getShopId() != null) { |
| | | shops = Arrays.asList(shopInfoDao.selectById(statisticsParam.getShopId())); |
| | | shops = Arrays.asList(shopInfoDao.selectById(user.getShopId())); |
| | | } else { |
| | | if (DataAuthUtil.hasAllShopAuth()) { |
| | | shops = shopInfoDao.selectShopInfo(user.getCompanyId()); |
| | |
| | | Map<Object, Object> data = new HashMap<>(); |
| | | data.put("legendData", legendData); |
| | | data.put("series", series); |
| | | data.put("xAxis", StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam)); |
| | | String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam); |
| | | data.put("xAxis", Arrays.copyOf(xData, xData.length - 1)); |
| | | result.setMapInfo(data); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | |
| | | //定义数据主体 |
| | | String[] legendData = new String[1]; |
| | | |
| | | int i = 0; |
| | | |
| | | //按门店统计数据 |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | |
| | |
| | | Map<Object, Object> data = new HashMap<>(); |
| | | data.put("legendData", legendData); |
| | | data.put("series", series); |
| | | data.put("xAxis", StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam)); |
| | | String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam); |
| | | data.put("xAxis", Arrays.copyOf(xData, xData.length - 1)); |
| | | result.setMapInfo(data); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |