|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package org.springblade.desk.jobTransfer.controller; |
|
|
|
|
|
|
|
|
|
import io.micrometer.core.instrument.binder.BaseUnits; |
|
|
|
|
import io.swagger.v3.oas.annotations.Parameters; |
|
|
|
|
import io.swagger.v3.oas.annotations.enums.ParameterIn; |
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema; |
|
|
|
|
@ -34,6 +35,7 @@ import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
import org.springblade.core.excel.util.ExcelUtil; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
@ -182,18 +184,26 @@ public class PostHandleController extends BladeController { |
|
|
|
|
/** |
|
|
|
|
* 导出数据 |
|
|
|
|
*/ |
|
|
|
|
@IsAdmin |
|
|
|
|
@GetMapping("/export-postHandle") |
|
|
|
|
@ApiOperationSupport(order = 11) |
|
|
|
|
@Operation(summary = "导出数据", description = "传入postHandle") |
|
|
|
|
public void exportPostHandle(@Parameter(hidden = true) @RequestParam Map<String, Object> postHandle, BladeUser bladeUser, HttpServletResponse response) { |
|
|
|
|
QueryWrapper<PostHandleEntity> queryWrapper = Condition.getQueryWrapper(postHandle, PostHandleEntity.class); |
|
|
|
|
public void exportPostHandle(PostHandleQuery postHandleQuery, Query query, HttpServletResponse response) { |
|
|
|
|
query.setSize(99999); |
|
|
|
|
IPage<PostHandleVO> pages = postHandleService.selectPostHandlePage(Condition.getPage(query), postHandleQuery); |
|
|
|
|
List<PostHandleVO> list = pages.getRecords(); |
|
|
|
|
// QueryWrapper<PostHandleEntity> queryWrapper = Condition.getQueryWrapper(postHandle, PostHandleEntity.class);
|
|
|
|
|
//if (!AuthUtil.isAdministrator()) {
|
|
|
|
|
// queryWrapper.lambda().eq(PostHandle::getTenantId, bladeUser.getTenantId());
|
|
|
|
|
//}
|
|
|
|
|
//queryWrapper.lambda().eq(PostHandleEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
|
|
|
|
List<PostHandleExcel> list = postHandleService.exportPostHandle(queryWrapper); |
|
|
|
|
ExcelUtil.export(response, "岗位处理数据" + DateUtil.time(), "岗位处理数据表", list, PostHandleExcel.class); |
|
|
|
|
// List<PostHandleExcel> list = postHandleService.exportPostHandle(queryWrapper);
|
|
|
|
|
List<PostHandleExcel> excels = new ArrayList<>(); |
|
|
|
|
for (PostHandleVO postHandleVO : list) { |
|
|
|
|
PostHandleExcel excel = new PostHandleExcel(); |
|
|
|
|
BeanUtils.copyProperties(postHandleVO, excel); |
|
|
|
|
excels.add(excel); |
|
|
|
|
} |
|
|
|
|
ExcelUtil.export(response, "岗位处理数据" + DateUtil.time(), "岗位处理数据表", excels, PostHandleExcel.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|