Commit 2ebeff8a by 翁国栋 Committed by 284718418@qq.com

导出保单

parent b1ad7b73
......@@ -13,6 +13,7 @@ import cn.timer.api.dao.insure.InsureUserMapper;
import cn.timer.api.dto.insure.InsureDto;
import cn.timer.api.dto.insure.InsureUserDto;
import cn.timer.api.dto.insure.PolicyDto;
import cn.timer.api.utils.ExcelUtils;
import cn.timer.api.utils.Page;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
......@@ -22,6 +23,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.google.common.collect.Maps;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
......@@ -91,4 +93,23 @@ public class InsureUserController{
return ResultUtil.data(userList);
}
@PostMapping(value = "/exportUserList")
@ApiOperation(value = "导出列表", httpMethod = "GET", notes = "导出列表")
public void exportUserList(@RequestParam("policyId") String policyId,
@RequestParam("status") String status,
@RequestParam("name") String name,
@RequestParam("policyDateStart") String policyDateStart,
@RequestParam("planId") String planId,
@RequestParam("categoryId") String categoryId){
PolicyDto policyDto = new PolicyDto();
policyDto.setId(Integer.parseInt(policyId));
policyDto.setStatus(status);
policyDto.setName(name);
policyDto.setPolicyDateStart(policyDateStart);
policyDto.setPlanId(planId);
policyDto.setCategoryId(categoryId);
List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto);
String[] rowName = new String[]{"ID", "name", "ID_type", "ID_number", "Scheme_name", "Date_start", "Branch", "Tricycle_frame_number", "benefit_occupation_category"};
/*XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);*/
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment