Commit bb9753ca by 叶立庆
2 parents 36c79029 ce7d256d
...@@ -214,10 +214,11 @@ public class LevelExamController { ...@@ -214,10 +214,11 @@ public class LevelExamController {
public RopResponse<String> levelExamExportAsync(LevelExamPageListRequest request) { public RopResponse<String> levelExamExportAsync(LevelExamPageListRequest request) {
try { try {
RpcPagination<LevelExamPageListRequestDTO> pagination = CommonUtil.getRpcPagination(LevelExamPageListRequestDTO.class); RpcPagination<LevelExamPageListRequestDTO> pagination = CommonUtil.getRpcPagination(LevelExamPageListRequestDTO.class);
pagination.setPageSize(Integer.parseInt(env.getProperty("export_limit_num", "10001"))); int exportLimitNum = Integer.parseInt(env.getProperty("export_limit_num", "10000"));
pagination.setPageSize(exportLimitNum + 1);
RpcResponse<RpcPagination<LevelExamPageListResponseDTO>> page = levelExamRemote.levelExamListPage(pagination); RpcResponse<RpcPagination<LevelExamPageListResponseDTO>> page = levelExamRemote.levelExamListPage(pagination);
if (page.getResult().getTotal() > 10000) { if (page.getResult().getTotal() > exportLimitNum) {
return RopResponse.error("导出数据超过10000行无法导出"); return RopResponse.error("导出数据超过" + exportLimitNum + "行无法导出");
} }
AtomicInteger idx = new AtomicInteger(1); AtomicInteger idx = new AtomicInteger(1);
List<LevelExamExportVO> exportVOList = page.getResult().getList().stream().map(p -> { List<LevelExamExportVO> exportVOList = page.getResult().getList().stream().map(p -> {
...@@ -240,10 +241,11 @@ public class LevelExamController { ...@@ -240,10 +241,11 @@ public class LevelExamController {
public RopResponse<String> levelExamPersonDataExportAsync(LevelExamPersonPageRequest request) { public RopResponse<String> levelExamPersonDataExportAsync(LevelExamPersonPageRequest request) {
try { try {
RpcPagination<LevelExamPersonDTO> pagination = CommonUtil.getRpcPagination(LevelExamPersonDTO.class); RpcPagination<LevelExamPersonDTO> pagination = CommonUtil.getRpcPagination(LevelExamPersonDTO.class);
pagination.setPageSize(Integer.parseInt(env.getProperty("export_limit_num", "10001"))); int exportLimitNum = Integer.parseInt(env.getProperty("export_limit_num", "10000"));
pagination.setPageSize(exportLimitNum + 1);
RpcResponse<RpcPagination<LevelExamPersonDTO>> page = levelExamRemote.levelExamDataPersonPage(pagination); RpcResponse<RpcPagination<LevelExamPersonDTO>> page = levelExamRemote.levelExamDataPersonPage(pagination);
if (page.getResult().getTotal() > 10000) { if (page.getResult().getTotal() > exportLimitNum) {
return RopResponse.error("导出数据超过10000行无法导出"); return RopResponse.error("导出数据超过" + exportLimitNum + "行无法导出");
} }
AtomicInteger idx = new AtomicInteger(1); AtomicInteger idx = new AtomicInteger(1);
List<LevelExamPersonDataExportVO> exportVOList = page.getResult().getList().stream().map(p -> { List<LevelExamPersonDataExportVO> exportVOList = page.getResult().getList().stream().map(p -> {
......
...@@ -92,10 +92,11 @@ public class TrainingPlanPersonController { ...@@ -92,10 +92,11 @@ public class TrainingPlanPersonController {
public RopResponse<String> trainingPlanPersonExportAsync(TrainingPlanPersonPageRequest request) { public RopResponse<String> trainingPlanPersonExportAsync(TrainingPlanPersonPageRequest request) {
try { try {
RpcPagination<TrainingPlanPersonPageDTO> pagination = CommonUtil.getRpcPagination(TrainingPlanPersonPageDTO.class); RpcPagination<TrainingPlanPersonPageDTO> pagination = CommonUtil.getRpcPagination(TrainingPlanPersonPageDTO.class);
pagination.setPageSize(Integer.parseInt(env.getProperty("export_limit_num", "10001"))); int exportLimitNum = Integer.parseInt(env.getProperty("export_limit_num", "10000"));
pagination.setPageSize(exportLimitNum + 1);
RpcResponse<RpcPagination<TrainingPlanPersonPageDTO>> page = learningCenterTrainingPlanPersonRemote.pageList(pagination); RpcResponse<RpcPagination<TrainingPlanPersonPageDTO>> page = learningCenterTrainingPlanPersonRemote.pageList(pagination);
if (page.getResult().getTotal() > 10000) { if (page.getResult().getTotal() > exportLimitNum) {
return RopResponse.error("导出数据超过10000行无法导出"); return RopResponse.error("导出数据超过" + exportLimitNum + "行无法导出");
} }
if (CollectionUtils.isEmpty(page.getResult().getList())) { if (CollectionUtils.isEmpty(page.getResult().getList())) {
return RopResponse.error("暂无数据,无法导出"); return RopResponse.error("暂无数据,无法导出");
......
...@@ -70,4 +70,8 @@ public class LevelExamPageListRequest extends CommonPageRequest { ...@@ -70,4 +70,8 @@ public class LevelExamPageListRequest extends CommonPageRequest {
@ApiModelProperty(notes = "是否只查询未关联培训计划的考试: true-是, false-否,不传默认查全部") @ApiModelProperty(notes = "是否只查询未关联培训计划的考试: true-是, false-否,不传默认查全部")
private Boolean notRelatedPlan; private Boolean notRelatedPlan;
/** 培训计划ID */
@ApiModelProperty(notes = "培训计划ID")
private Integer planId;
} }
...@@ -34,7 +34,7 @@ public class TrainingPlanPersonPageRequest extends CommonPageRequest { ...@@ -34,7 +34,7 @@ public class TrainingPlanPersonPageRequest extends CommonPageRequest {
/** 人员状态(下拉单选,来自列表字段) */ /** 人员状态(下拉单选,来自列表字段) */
@ApiModelProperty(notes = "人员状态(下拉单选)") @ApiModelProperty(notes = "人员状态(下拉单选)")
private String personStatus; private Integer personStatus;
/** 开单权限(0:已锁定, 1:已解锁,下拉单选) */ /** 开单权限(0:已锁定, 1:已解锁,下拉单选) */
@ApiModelProperty(notes = "开单权限(0:已锁定, 1:已解锁)") @ApiModelProperty(notes = "开单权限(0:已锁定, 1:已解锁)")
......
...@@ -11,8 +11,6 @@ import java.math.BigDecimal; ...@@ -11,8 +11,6 @@ import java.math.BigDecimal;
@Data @Data
public class CourseDetailExportVo implements Serializable { public class CourseDetailExportVo implements Serializable {
@ExcelProperty(value = "员工id")
private String userId;
@ExcelProperty(value = "员工") @ExcelProperty(value = "员工")
private String userName; private String userName;
......
...@@ -24,9 +24,6 @@ public class LevelExamExportVO { ...@@ -24,9 +24,6 @@ public class LevelExamExportVO {
@ExcelProperty(value = "序号") @ExcelProperty(value = "序号")
private Integer index; private Integer index;
@ExcelProperty("北森考试ID")
private String beisenExamId;
@ExcelProperty("考试名称") @ExcelProperty("考试名称")
private String beisenExamName; private String beisenExamName;
......
...@@ -45,7 +45,7 @@ public class TrainingPlanPersonPageResponse implements Serializable { ...@@ -45,7 +45,7 @@ public class TrainingPlanPersonPageResponse implements Serializable {
/** 人员状态 */ /** 人员状态 */
@ApiModelProperty(notes = "人员状态") @ApiModelProperty(notes = "人员状态")
private String personStatus; private Integer personStatus;
/** 入职日期(支持排序) */ /** 入职日期(支持排序) */
@ApiModelProperty(notes = "入职日期(支持排序)") @ApiModelProperty(notes = "入职日期(支持排序)")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!