| | |
| | | } |
| | | |
| | | @ApiOperation(value = "团长数据--列表导出") |
| | | @PostMapping(value = Constants.ADMIN_VIEW_PREFIX + "/distrib/export.json") |
| | | public void fileExport(@RequestBody DistribDataListDto distribDataListDto, HttpServletRequest request, HttpServletResponse response) { |
| | | @PostMapping(value = Constants.ADMIN_VIEW_PREFIX + "/distrib/distribDataExport.json") |
| | | public void distribDataExport(@RequestBody ExportDistribDataListDto distribDataListDto, HttpServletRequest request, HttpServletResponse response) { |
| | | List<List<String>> rows = new ArrayList<>(); |
| | | List<String> header=new ArrayList<>(); |
| | | //标题 |
| | | header=CollUtil.newArrayList( "团长名称", "手机号", "身份", "团员数量", "交易单数", "累计收益积分", "累计收益(元)", "累计订单重量(kg)","累计数量(家电)"); |
| | | rows.add(header); |
| | | Map<String, Object> stringObjectMap = distribService.distribDataList(distribDataListDto); |
| | | List<Map<String,Object>> storageModels=(List<Map<String,Object>>) stringObjectMap.get("data"); |
| | | if (CollUtil.isNotEmpty(storageModels)) { |
| | | for(Map<String,Object> m : storageModels){ |
| | | Map<String, Object> stringObjectMap = distribService.distribDataExport(distribDataListDto); |
| | | List<DistribDataListVo> distribDataListVos = (List<DistribDataListVo>) stringObjectMap.get("data"); |
| | | if (CollUtil.isNotEmpty(distribDataListVos)) { |
| | | for(DistribDataListVo m : distribDataListVos){ |
| | | List<String> list = new ArrayList<>(); |
| | | if(null!=m.get("delFlag")){ |
| | | if(m.get("delFlag").toString().equals("1")){ |
| | | m.put("name",m.get("name").toString()+"(已删除)"); |
| | | } |
| | | } |
| | | list.add(m.get("name").toString()); |
| | | list.add(m.get("storageuserphone").toString()); |
| | | list.add(m.get("storageName").toString()); |
| | | list.add(m.get("orderNum").toString()); |
| | | list.add(m.get("storageweight").toString()); |
| | | list.add(m.get("storagemoney").toString()); |
| | | list.add(m.get("recycleweight").toString()); |
| | | list.add(m.get("recyclemoney").toString()); |
| | | list.add(m.getNickname()); |
| | | list.add(m.getPhone()); |
| | | list.add("团长"); |
| | | list.add(m.getCnt().toString()); |
| | | list.add(m.getOrderCnt()); |
| | | list.add(m.getScore()); |
| | | list.add(m.getAmount()); |
| | | list.add(m.getKg()); |
| | | list.add(m.getJdsl()); |
| | | rows.add(list); |
| | | } |
| | | } |