| | |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.cockpitManage.TeamConstruction; |
| | | import com.ycl.service.cockpitManage.ITeamConstructionService; |
| | | import com.ycl.utils.EasyExcelUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestParam(name = "status", required = false) Integer status, |
| | | HttpServletResponse response) { |
| | | Integer isDelete = 0; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx"); |
| | | EasyExcel |
| | | .write(response.getOutputStream(), TeamConstruction.class) |
| | | .sheet("数据") |
| | | .doWrite(iTeamConstructionService |
| | | String sheetName = "数据"; |
| | | EasyExcelUtils.export(response, sheetName, TeamConstruction.class, iTeamConstructionService |
| | | .page(new Page<TeamConstruction>().setSize(size).setCurrent(current), new LambdaQueryWrapper<TeamConstruction>() |
| | | .like(StringUtils.isNotBlank(departName), TeamConstruction::getName, departName) |
| | | .eq(status != null, TeamConstruction::getStatus, status) |
| | | .eq(TeamConstruction::getIsDelete, isDelete)) |
| | | .getRecords()); |
| | | |
| | | } |
| | | |
| | | |