| | |
| | | |
| | | |
| | | public Map<String, Object> distribDataList(DistribDataListDto distribDataListDto) { |
| | | if(StrUtil.isNotEmpty(distribDataListDto.getQueryCol())){ |
| | | String decode = StringUtils.encode(distribDataListDto.getQueryCol()); |
| | | distribDataListDto.setName(decode); |
| | | distribDataListDto.setPhone(distribDataListDto.getQueryCol()); |
| | | } |
| | | PageHelper.startPage(distribDataListDto.getPage(), distribDataListDto.getLimit()); |
| | | List<DistribDataListVo> distribDataListVos = accountMapper.distribDataList(distribDataListDto); |
| | | if(CollUtil.isNotEmpty(distribDataListVos)){ |
| | | for(DistribDataListVo distribDataListVo : distribDataListVos){ |
| | | if(ObjectUtil.isNotEmpty(distribDataListVo)){ |
| | | String nickname = distribDataListVo.getNickname(); |
| | | String decode = StringUtils.decode(nickname); |
| | | distribDataListVo.setNickname(decode); |
| | | String id = distribDataListVo.getId(); |
| | | String kg = accountMapper.selectOrderByHeadUserId(id); |
| | | distribDataListVo.setKg(kg); |
| | |
| | | public DistribDataInfoVo distribDataInfo(DistribDataInfoDto distribDataInfoDto) { |
| | | return accountMapper.selectDistribDataInfoVo(); |
| | | } |
| | | |
| | | public Map<String, Object> distribDataExport(ExportDistribDataListDto distribDataListDto) { |
| | | if(StrUtil.isNotEmpty(distribDataListDto.getQueryCol())){ |
| | | String decode = StringUtils.encode(distribDataListDto.getQueryCol()); |
| | | distribDataListDto.setName(decode); |
| | | distribDataListDto.setPhone(distribDataListDto.getQueryCol()); |
| | | } |
| | | List<DistribDataListVo> distribDataListVos = accountMapper.distribDataExport(distribDataListDto); |
| | | if(CollUtil.isNotEmpty(distribDataListVos)){ |
| | | for(DistribDataListVo distribDataListVo : distribDataListVos){ |
| | | if(ObjectUtil.isNotEmpty(distribDataListVo)){ |
| | | String nickname = distribDataListVo.getNickname(); |
| | | String decode = StringUtils.decode(nickname); |
| | | distribDataListVo.setNickname(decode); |
| | | String id = distribDataListVo.getId(); |
| | | String kg = accountMapper.selectOrderByHeadUserId(id); |
| | | distribDataListVo.setKg(kg); |
| | | String jdsl = accountMapper.selectJDSLByHeadUserId(id); |
| | | distribDataListVo.setJdsl(jdsl); |
| | | } |
| | | } |
| | | } |
| | | PageInfo<DistribDataListVo> pageInfo = new PageInfo<>(distribDataListVos); |
| | | Map<String, Object> data = new HashMap<>(); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | data.put("data", distribDataListVos); |
| | | data.put("count", count); |
| | | data.put("code", 0); |
| | | return data; |
| | | } |
| | | |
| | | } |