9 changed files with 83 additions and 9 deletions
@ -1 +1 @@ |
|||||
Subproject commit 5b077ffda98e46ce47e9c5540dabbc50f092968d |
Subproject commit 4bc760d91246751ea4d99ab2e382518f87389ed0 |
||||
@ -0,0 +1,46 @@ |
|||||
|
package com.elink.esua.epdc.vaccine.epidemic.service.impl; |
||||
|
|
||||
|
import cn.afterturn.easypoi.handler.inter.IExcelExportServer; |
||||
|
import cn.hutool.core.collection.CollUtil; |
||||
|
import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao; |
||||
|
import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordListDTO; |
||||
|
import com.elink.esua.epdc.vaccine.epidemic.excel.EpidecmicUserNewExcel; |
||||
|
import org.springframework.beans.BeanUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 人员信息数据导出 |
||||
|
* |
||||
|
* @author work@yujt.net.cn |
||||
|
* @date 2021/6/17 14:04 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class EpidemicUserInfoExportServer implements IExcelExportServer { |
||||
|
|
||||
|
@Autowired |
||||
|
private EpidemicUserInfoDao epidemicUserInfoDao; |
||||
|
|
||||
|
@Override |
||||
|
public List<Object> selectListForExcelExport(Object queryParams, int page) { |
||||
|
Map<String, Object> params = (Map<String, Object>) queryParams; |
||||
|
params.put("excelBigDataPageSize", 50000); |
||||
|
params.put("excelBigDataPageIndex", (page - 1) * 50000); |
||||
|
List<EpidemicRecordListDTO> recordList = epidemicUserInfoDao.getEpidemicUserRecordList(params); |
||||
|
List<Object> targetList = new ArrayList<>(); |
||||
|
if (CollUtil.isNotEmpty(recordList)) { |
||||
|
Object target; |
||||
|
for (int i = 0; i < recordList.size(); i++) { |
||||
|
target = new EpidecmicUserNewExcel(); |
||||
|
BeanUtils.copyProperties(recordList.get(i), target); |
||||
|
targetList.add(target); |
||||
|
} |
||||
|
} |
||||
|
return targetList; |
||||
|
} |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue