TBoardStatisticController.java 18.8 KB
Newer Older
liqin's avatar
liqin committed
1
package cn.chnmuseum.party.web.controller;
yangtianyou's avatar
yangtianyou committed
2

liqin's avatar
liqin committed
3 4
import cn.chnmuseum.party.common.util.DateUtil;
import cn.chnmuseum.party.model.*;
5
import cn.chnmuseum.party.service.TAreaService;
liqin's avatar
liqin committed
6 7
import cn.chnmuseum.party.service.TBoardStatisticService;
import cn.chnmuseum.party.web.controller.base.BaseController;
8 9 10 11
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
12
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
yangtianyou's avatar
yangtianyou committed
13 14 15 16 17 18
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
19 20
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
21 22 23
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
yangtianyou's avatar
yangtianyou committed
24 25

import javax.annotation.Resource;
wzp's avatar
wzp committed
26 27
import java.text.ParseException;
import java.text.SimpleDateFormat;
wzp's avatar
wzp committed
28
import java.util.*;
29
import java.util.stream.Collectors;
yangtianyou's avatar
yangtianyou committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

/**
 * <pre>
 * 展板统计信息表 前端控制器
 * </pre>
 *
 * @author Danny Lee
 * @since 2021-03-25
 */
@Slf4j
@RestController
@RequestMapping("/tBoardStatistic")
@Api(tags = {"展板统计信息表操作接口"})
public class TBoardStatisticController extends BaseController {

    @Resource
    private TBoardStatisticService tBoardStatisticService;

48 49 50
    @Autowired
    TAreaService areaService;

51
    //    @ApiImplicitParams(value = {
yangtianyou's avatar
yangtianyou committed
52 53 54 55
//            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
//            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer")
//    })
    @PostMapping("/getBoardSurvey")
wzp's avatar
wzp committed
56
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:survey")
yangtianyou's avatar
yangtianyou committed
57 58
    @ApiOperation(value = "获取展板统计概况", notes = "获取展板统计概况")
    public Map<String, Object> getBoardSurvey(TBoardSurvey survey) {
wzp's avatar
wzp committed
59 60 61
        TUser user = null;
        try {
            user = getcurUser();
62
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
63 64
                survey.setOrganCode(user.getOrgCode());
            }
wzp's avatar
wzp committed
65 66 67
        } catch (Exception e) {
            survey.setOrganCode(null);
        }
wzp's avatar
wzp committed
68 69 70 71
        // 默认当月
        if (StringUtils.isEmpty(survey.getStatisticDate())) {
            survey.setStatisticDate(DateUtil.getCurrentDate("yyyyMM"));
        }
72 73 74
        //加上区域条件
        List<String> areaIds = findAllAreaIdByParentCode(survey.getAreaCode());
        survey.setAreaIds(areaIds);
yangtianyou's avatar
yangtianyou committed
75 76 77 78
        TBoardSurvey result = this.tBoardStatisticService.getBoardSurvey(survey);

        return getResult(result);
    }
yangtianyou's avatar
yangtianyou committed
79 80 81 82 83 84

    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer")
    })
    @PostMapping("/getBoardRankPageList")
wzp's avatar
wzp committed
85
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:rankPage")
yangtianyou's avatar
yangtianyou committed
86 87
    @ApiOperation(value = "获取展板播放排行", notes = "获取展板播放排行")
    public Map<String, Object> getBoardRankPageList(TBoardPlayRank rank) {
wzp's avatar
wzp committed
88 89 90
        TUser user = null;
        try {
            user = getcurUser();
91
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
92 93
                rank.setOrganCode(user.getOrgCode());
            }
wzp's avatar
wzp committed
94 95 96
        } catch (Exception e) {
            rank.setOrganCode(null);
        }
wzp's avatar
wzp committed
97 98 99
        // 默认当月
        if (StringUtils.isEmpty(rank.getPlayDate())) {
            rank.setPlayDate(DateUtil.getCurrentDate("yyyyMM"));
yangtianyou's avatar
yangtianyou committed
100
        }
101 102 103
        //加上区域条件
        List<String> areaIds = findAllAreaIdByParentCode(rank.getAreaCode());
        rank.setAreaIds(areaIds);
wzp's avatar
wzp committed
104
        Page<TBoardPlayRank> page = this.tBoardStatisticService.getBoardRankPageList(getPage(), rank);
yangtianyou's avatar
yangtianyou committed
105 106 107 108 109 110 111 112
        return getResult(page);
    }

    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer")
    })
    @PostMapping("/getBoardTrendPageList")
wzp's avatar
wzp committed
113
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:trendPage")
yangtianyou's avatar
yangtianyou committed
114
    @ApiOperation(value = "获取展板播放趋势", notes = "获取展板播放趋势")
115
    public Map<String, Object> getBoardTrendPageList(TBoardPlayTrend trend) throws ParseException {
wzp's avatar
wzp committed
116 117 118
        TUser user = null;
        try {
            user = getcurUser();
119
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
120 121
                trend.setOrganCode(user.getOrgCode());
            }
wzp's avatar
wzp committed
122 123 124
        } catch (Exception e) {
            trend.setOrganCode(null);
        }
yangtianyou's avatar
yangtianyou committed
125
        // 如果查询日志为空,则默认当月
126
        if (StringUtils.isEmpty(trend.getPlayDate())) {
yangtianyou's avatar
yangtianyou committed
127
            trend.setPlayDate(DateUtil.getCurrentDate("yyyyMM"));
yangtianyou's avatar
yangtianyou committed
128
        }
129 130 131
        //加上区域条件
        List<String> areaIds = findAllAreaIdByParentCode(trend.getAreaCode());
        trend.setAreaIds(areaIds);
yangtianyou's avatar
yangtianyou committed
132

nie'hong's avatar
nie'hong committed
133
        Page<TBoardPlayTrend> page = this.tBoardStatisticService.getBoardTrendPageList(getPage(), trend);
134

135
//        List<TBoardPlayTrend> records = this.tBoardStatisticService.getBoardTrendPageList(getPage(), trend);
yangtianyou's avatar
yangtianyou committed
136 137 138 139
        // 处理数据为展板趋势图
        Map map = new HashMap();
        List dateList = new ArrayList();
        List cntList = new ArrayList();
140
        //按照 播放数据统计大屏 中 展板点播趋势图要求返回本月每天的播放量需求 修改接口
141
        getDateList(trend.getPlayDate(), dateList, cntList);
142 143
        for (TBoardPlayTrend t : page.getRecords()) {
//        for (TBoardPlayTrend t : records) {
144 145 146
//            dateList.add(t.getPlayDate());
//            cntList.add(t.getPlayNumber());
            int index = dateList.indexOf(t.getPlayDate());
147 148
            if (index >= 0) {
                cntList.set(index, t.getPlayNumber());
149
            }
yangtianyou's avatar
yangtianyou committed
150
        }
151
//        page.getRecords().sort(Comparator.comparing(TBoardPlayTrend::getPlayNumber).reversed());
152 153
        map.put("dateList", dateList);
        map.put("cntList", cntList);
nie'hong's avatar
nie'hong committed
154
        map.put("page", page);
yangtianyou's avatar
yangtianyou committed
155
        return getResult(map);
yangtianyou's avatar
yangtianyou committed
156 157
    }

158
    /**
159 160
     * 按照 播放数据统计大屏 中 展板点播趋势图要求返回本月每天的播放量  新增方法
     *
161 162 163 164 165 166 167 168 169
     * @param dateFormat
     * @param dateList
     * @param cntList
     * @throws ParseException
     */
    private void getDateList(String dateFormat, List dateList, List cntList) throws ParseException {
        Date date;
        Date beginTime;
        Date endTime;
170
        Date nowDate = new Date();
171 172 173 174
        if (dateFormat.length() > 4) {
            date = new SimpleDateFormat("yyyyMM").parse(dateFormat);
            beginTime = cn.hutool.core.date.DateUtil.beginOfMonth(date);
            endTime = cn.hutool.core.date.DateUtil.endOfMonth(date);
175 176 177 178
            //  设置最后时间不能大于当前时间
            if (nowDate.after(beginTime) && nowDate.before(endTime)) {
                endTime = nowDate;
            }
179 180 181 182
        } else {
            date = new SimpleDateFormat("yyyy").parse(dateFormat);
            beginTime = cn.hutool.core.date.DateUtil.beginOfYear(date);
            endTime = cn.hutool.core.date.DateUtil.endOfYear(date);
183 184 185 186
            //  设置最后时间不能大于当前时间
            if (nowDate.after(beginTime) && nowDate.before(endTime)) {
                endTime = nowDate;
            }
187 188 189
        }
        //生成范围类的一系列日期
        List<DateTime> dateTimes = cn.hutool.core.date.DateUtil.rangeToList(beginTime, endTime, DateField.DAY_OF_MONTH);
190
        dateTimes.stream().forEach(dt -> {
191 192 193 194 195 196
            String yyyyMMdd = dt.toString("yyyyMMdd");
            dateList.add(yyyyMMdd);
            //默认初始值0
            cntList.add(0);
        });
    }
yangtianyou's avatar
yangtianyou committed
197 198 199 200 201 202

    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer")
    })
    @PostMapping("/getBoardDistrictPageList")
wzp's avatar
wzp committed
203
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:districtPage")
yangtianyou's avatar
yangtianyou committed
204 205
    @ApiOperation(value = "获取地区展板播统计", notes = "获取地区展板播统计")
    public Map<String, Object> getBoardDistrictPageList(TDistrictBoardStatistic district) {
wzp's avatar
wzp committed
206 207 208
        TUser user = null;
        try {
            user = getcurUser();
209
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
210 211
                district.setOrganCode(user.getOrgCode());
            }
wzp's avatar
wzp committed
212 213 214
        } catch (Exception e) {
            district.setOrganCode(null);
        }
wzp's avatar
wzp committed
215 216 217
        // 默认当月
        if (StringUtils.isEmpty(district.getPlayDate())) {
            district.setPlayDate(DateUtil.getCurrentDate("yyyyMM"));
yangtianyou's avatar
yangtianyou committed
218
        }
219 220 221
        //加上区域条件
        List<String> areaIds = findAllAreaIdByParentCode(district.getAreaCode());
        district.setAreaIds(areaIds);
wzp's avatar
wzp committed
222
        Page<TDistrictBoardStatistic> page = this.tBoardStatisticService.getBoardDistrictPageList(getPage(), district);
yangtianyou's avatar
yangtianyou committed
223 224
        return getResult(page);
    }
yangtianyou's avatar
yangtianyou committed
225

226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
    /**
     * 根据父地区code查询查询所有子下级  返回包含本机id以及所有的子集id
     *
     * @param areaCode
     * @return
     */
    private List<String> findAllAreaIdByParentCode(String areaCode) {
        List<String> areaIds = new ArrayList<>();
        if (StringUtils.isBlank(areaCode)) {
            return areaIds;
        }
        LambdaQueryWrapper<TArea> wrapper = new QueryWrapper<TArea>().lambda()
                .eq(TArea::getCode, areaCode);
        TArea one = areaService.getOne(wrapper, false);
        if (one == null) {
            return areaIds;
        }
        List<String> parentAreaIds = new ArrayList<>();
        String valueOf = String.valueOf(one.getId());
        parentAreaIds.add(valueOf);
        //加上自己本身的id
        areaIds.add(valueOf);
        //循环调用数据库,但实际只会调用3到4次,区域级别无非三四级
        while (!CollectionUtils.isEmpty(parentAreaIds)) {
            wrapper.clear();
            wrapper.in(TArea::getParentId, parentAreaIds)
                    .select(TArea::getId, TArea::getParentId);
            List<TArea> list = areaService.list(wrapper);
            if (CollectionUtils.isEmpty(list)) {
                //为空跳出循环
                break;
            }
            List<String> ids = list.stream().map(l -> String.valueOf(l.getId())).collect(Collectors.toList());
            parentAreaIds = ids;
            areaIds.addAll(parentAreaIds);
        }
        return areaIds;
    }

yangtianyou's avatar
yangtianyou committed
265 266 267 268 269 270
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "organId", value = "统计机构", paramType = "query", dataType = "String")
    })
    @PostMapping("/getBoardProvincePlayTotalList")
wzp's avatar
wzp committed
271
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:provPlayList")
yangtianyou's avatar
yangtianyou committed
272 273
    @ApiOperation(value = "获取省级展板播放统计", notes = "获取省级展板播放统计")
    public Map<String, Object> getBoardProvincePlayTotalList(String organId) {
wzp's avatar
wzp committed
274
        String orgCode = null;
wzp's avatar
wzp committed
275 276
        try {
            TUser user = getcurUser();
277
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
278 279
                orgCode = user.getOrgCode();
            }
wzp's avatar
wzp committed
280 281 282
        } catch (Exception e) {
            orgCode = null;
        }
283
        List list = this.tBoardStatisticService.getBoardProvincePlayTotalList(organId, orgCode);
yangtianyou's avatar
yangtianyou committed
284 285 286
        return getResult(list);
    }

wzp's avatar
wzp committed
287 288 289 290 291 292 293 294 295 296 297

    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "areaCode", value = "区域编码", paramType = "query", dataType = "String")
    })
    @PostMapping("/getBoardCityPlayTotalList")
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:provPlayList")
    @ApiOperation(value = "获取下级区域展板播放统计", notes = "获取下级展板播放统计")
    public Map<String, Object> getBoardCityPlayTotalList(String areaCode) {
        String orgCode = null;
        try {
            TUser user = getcurUser();
nie'hong's avatar
nie'hong committed
298
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
299 300 301 302 303
                orgCode = user.getOrgCode();
            }
        } catch (Exception e) {
            orgCode = null;
        }
nie'hong's avatar
nie'hong committed
304
        List list = this.tBoardStatisticService.getBoardCityPlayTotalList(areaCode, orgCode);
wzp's avatar
wzp committed
305 306 307
        return getResult(list);
    }

yangtianyou's avatar
yangtianyou committed
308 309 310 311 312 313
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "frequencyDate", value = "互动统计时间 年:yyyy 月:yyyyMM,默认当月", paramType = "query", dataType = "String")
    })
    @PostMapping("/getInteractionFrequencyPageList")
wzp's avatar
wzp committed
314
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:districtPage")
yangtianyou's avatar
yangtianyou committed
315
    @ApiOperation(value = "获取互动频次统计信息", notes = "获取互动频次统计信息")
nie'hong's avatar
nie'hong committed
316
    public Map<String, Object> getInteractionFrequencyPageList(String frequencyDate, String areaCode) {
wzp's avatar
wzp committed
317
        String orgCode = null;
wzp's avatar
wzp committed
318 319
        try {
            TUser user = getcurUser();
320
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
321 322
                orgCode = user.getOrgCode();
            }
wzp's avatar
wzp committed
323 324 325
        } catch (Exception e) {
            orgCode = null;
        }
326
        if (StringUtils.isEmpty(frequencyDate)) {
yangtianyou's avatar
yangtianyou committed
327 328
            frequencyDate = DateUtil.getCurrentDate("yyyyMM");
        }
329 330
        //加上区域条件
        List<String> areaIds = findAllAreaIdByParentCode(areaCode);
yangtianyou's avatar
yangtianyou committed
331

nie'hong's avatar
nie'hong committed
332
        Page page = this.tBoardStatisticService.getInteractionFrequency(getPage(), frequencyDate, orgCode, areaIds);
yangtianyou's avatar
yangtianyou committed
333 334 335 336
        //
        Map map = new HashMap();
        List organList = new ArrayList<>();
        List cntList = new ArrayList();
337
        for (Object o : page.getRecords()) {
yangtianyou's avatar
yangtianyou committed
338 339 340 341
            Map m = (HashMap) o;
            organList.add(m.get("organName"));
            cntList.add(m.get("frequencyCnt"));
        }
342 343 344
        map.put("organList", organList);
        map.put("cntList", cntList);
        map.put("page", page);
yangtianyou's avatar
yangtianyou committed
345 346
        return getResult(map);
    }
yangtianyou's avatar
yangtianyou committed
347

wzp's avatar
wzp committed
348 349

    /**
wzp's avatar
wzp committed
350
     * 以下两个接口是pc端专用
351
     *
wzp's avatar
wzp committed
352 353 354 355 356 357 358 359
     * @param trend
     * @return
     */
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer")
    })
    @PostMapping("/getBoardPageList")
wzp's avatar
wzp committed
360
//    @RequiresAuthentication  //@RequiresPermissions("t:board:statistic:Page")
wzp's avatar
wzp committed
361
    @ApiOperation(value = "获取展板播放趋势Pc", notes = "获取展板播放趋势Pc")
wzp's avatar
wzp committed
362
//    @MethodLog(operModule = OperModule.TEND, operType = OperType.SELECT)
wzp's avatar
wzp committed
363
    public Map<String, Object> getBoardPageList(TBoardPlayTrend trend) throws ParseException {
wzp's avatar
wzp committed
364 365 366
        TUser user = null;
        try {
            user = getcurUser();
367
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
368 369
                trend.setOrganCode(user.getOrgCode());
            }
wzp's avatar
wzp committed
370 371 372
        } catch (Exception e) {
            trend.setOrganCode(null);
        }
wzp's avatar
wzp committed
373
        // 如果查询日志为空,则默认当月
374 375
        if (StringUtils.isEmpty(trend.getBeginDate())) {
            trend.setBeginDate(DateUtil.getCurrentDate("yyyy") + "01");
wzp's avatar
wzp committed
376
            trend.setEndDate(DateUtil.getCurrentDate("yyyyMM"));
wzp's avatar
wzp committed
377
        }
378
        Page<TBoardPlayTrend> page = this.tBoardStatisticService.getBoardPageList(getPage(), trend);
wzp's avatar
wzp committed
379 380 381 382
        // 处理数据为展板趋势图
        Map map = new HashMap();
        List dateList = new ArrayList();
        List cntList = new ArrayList();
wzp's avatar
wzp committed
383

wzp's avatar
wzp committed
384 385 386 387
        for (TBoardPlayTrend t : page.getRecords()) {
            dateList.add(t.getPlayDate());
            cntList.add(t.getPlayNumber());
        }
wzp's avatar
wzp committed
388
        List<TBoardPlayTrend> list = page.getRecords();
389 390
        list.sort(Comparator.comparing(TBoardPlayTrend::getPlayNumber, Comparator.reverseOrder()).thenComparing(TBoardPlayTrend::getPlayDate, Comparator.reverseOrder()));
        if (list.size() >= 10) {
wzp's avatar
wzp committed
391 392
            list = list.subList(0, 10);
        }
wzp's avatar
wzp committed
393
        page.setRecords(list);
394 395 396
        map.put("dateList", dateList);
        map.put("cntList", cntList);
        map.put("page", page);
wzp's avatar
wzp committed
397 398 399 400 401 402 403 404 405 406
        return getResult(map);
    }


    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
            @ApiImplicitParam(name = "frequencyDate", value = "互动统计时间 年:yyyy 月:yyyyMM,默认当月", paramType = "query", dataType = "String")
    })
    @PostMapping("/getInteractionPageList")
wzp's avatar
wzp committed
407
//    @RequiresAuthentication  //@RequiresPermissions("t:interaction:statistic:districtPage")
wzp's avatar
wzp committed
408
    @ApiOperation(value = "获取互动频次统计信息pc", notes = "获取互动频次统计信息pc")
wzp's avatar
wzp committed
409
//    @MethodLog(operModule = OperModule.INTERACTION, operType = OperType.SELECT)
wzp's avatar
wzp committed
410
    public Map<String, Object> getInteractionPageList(String frequencyDate) {
wzp's avatar
wzp committed
411
        String orgCode = null;
wzp's avatar
wzp committed
412 413
        try {
            TUser user = getcurUser();
414
            if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
wzp's avatar
wzp committed
415 416
                orgCode = user.getOrgCode();
            }
wzp's avatar
wzp committed
417 418 419
        } catch (Exception e) {
            orgCode = null;
        }
420
        if (StringUtils.isEmpty(frequencyDate)) {
wzp's avatar
wzp committed
421 422 423
            frequencyDate = DateUtil.getCurrentDate("yyyyMM");
        }

424
        Page page = this.tBoardStatisticService.getInteractionFrequency(getPage(), frequencyDate, orgCode);
wzp's avatar
wzp committed
425 426 427 428
        //
        Map map = new HashMap();
        List organList = new ArrayList<>();
        List cntList = new ArrayList();
429
        for (Object o : page.getRecords()) {
wzp's avatar
wzp committed
430 431 432 433
            Map m = (HashMap) o;
            organList.add(m.get("organName"));
            cntList.add(m.get("frequencyCnt"));
        }
434 435 436
        map.put("organList", organList);
        map.put("cntList", cntList);
        map.put("page", page);
wzp's avatar
wzp committed
437 438
        return getResult(map);
    }
yangtianyou's avatar
yangtianyou committed
439 440
}