Commit a0bc813b184438ab33161c6ad46e7ea71e5baf3c

Authored by YunaiV
1 parent ee7cf516

fix(mes-cal): 删除计划班次导出功能,清理 Excel 注解

班次作为排班计划的子资源 tab,独立导出没有意义:
1. Controller 删除 exportPlanShiftExcel 方法及相关 import
2. RespVO 删除 @ExcelProperty / @ExcelIgnoreUnannotated 注解

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/MesCalPlanShiftController.java
1 package cn.iocoder.yudao.module.mes.controller.admin.cal.plan; 1 package cn.iocoder.yudao.module.mes.controller.admin.cal.plan;
2 2
3 -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;  
4 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
5 -import cn.iocoder.yudao.framework.common.pojo.PageParam;  
6 import cn.iocoder.yudao.framework.common.pojo.PageResult; 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
7 import cn.iocoder.yudao.framework.common.util.object.BeanUtils; 5 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
8 -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;  
9 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftPageReqVO; 6 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftPageReqVO;
10 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftRespVO; 7 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftRespVO;
11 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftSaveReqVO; 8 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftSaveReqVO;
@@ -15,16 +12,13 @@ import io.swagger.v3.oas.annotations.Operation; @@ -15,16 +12,13 @@ import io.swagger.v3.oas.annotations.Operation;
15 import io.swagger.v3.oas.annotations.Parameter; 12 import io.swagger.v3.oas.annotations.Parameter;
16 import io.swagger.v3.oas.annotations.tags.Tag; 13 import io.swagger.v3.oas.annotations.tags.Tag;
17 import jakarta.annotation.Resource; 14 import jakarta.annotation.Resource;
18 -import jakarta.servlet.http.HttpServletResponse;  
19 import jakarta.validation.Valid; 15 import jakarta.validation.Valid;
20 import org.springframework.security.access.prepost.PreAuthorize; 16 import org.springframework.security.access.prepost.PreAuthorize;
21 import org.springframework.validation.annotation.Validated; 17 import org.springframework.validation.annotation.Validated;
22 import org.springframework.web.bind.annotation.*; 18 import org.springframework.web.bind.annotation.*;
23 19
24 -import java.io.IOException;  
25 import java.util.List; 20 import java.util.List;
26 21
27 -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;  
28 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 22 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
29 23
30 @Tag(name = "管理后台 - MES 计划班次") 24 @Tag(name = "管理后台 - MES 计划班次")
@@ -86,18 +80,4 @@ public class MesCalPlanShiftController { @@ -86,18 +80,4 @@ public class MesCalPlanShiftController {
86 return success(BeanUtils.toBean(list, MesCalPlanShiftRespVO.class)); 80 return success(BeanUtils.toBean(list, MesCalPlanShiftRespVO.class));
87 } 81 }
88 82
89 -// TODO @AI:是不是不要导出  
90 - @GetMapping("/export-excel")  
91 - @Operation(summary = "导出计划班次 Excel")  
92 - @PreAuthorize("@ss.hasPermission('mes:cal-plan:export')")  
93 - @ApiAccessLog(operateType = EXPORT)  
94 - public void exportPlanShiftExcel(@Valid MesCalPlanShiftPageReqVO pageReqVO,  
95 - HttpServletResponse response) throws IOException {  
96 - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);  
97 - List<MesCalPlanShiftDO> list = planShiftService.getPlanShiftPage(pageReqVO).getList();  
98 - // 导出 Excel  
99 - ExcelUtils.write(response, "计划班次.xls", "数据", MesCalPlanShiftRespVO.class,  
100 - BeanUtils.toBean(list, MesCalPlanShiftRespVO.class));  
101 - }  
102 -  
103 } 83 }
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/vo/shift/MesCalPlanShiftRespVO.java
1 package cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift; 1 package cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift;
2 2
3 -import cn.idev.excel.annotation.ExcelIgnoreUnannotated;  
4 -import cn.idev.excel.annotation.ExcelProperty;  
5 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
6 import lombok.Data; 4 import lombok.Data;
7 5
8 import java.time.LocalDateTime; 6 import java.time.LocalDateTime;
9 7
10 -// TODO @AI:是不是不要导出  
11 @Schema(description = "管理后台 - MES 计划班次 Response VO") 8 @Schema(description = "管理后台 - MES 计划班次 Response VO")
12 @Data 9 @Data
13 -@ExcelIgnoreUnannotated  
14 public class MesCalPlanShiftRespVO { 10 public class MesCalPlanShiftRespVO {
15 11
16 @Schema(description = "班次编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") 12 @Schema(description = "班次编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
17 - @ExcelProperty("班次编号")  
18 private Long id; 13 private Long id;
19 14
20 @Schema(description = "排班计划编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") 15 @Schema(description = "排班计划编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
21 - @ExcelProperty("排班计划编号")  
22 private Long planId; 16 private Long planId;
23 17
24 @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") 18 @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
25 - @ExcelProperty("显示顺序")  
26 private Integer sort; 19 private Integer sort;
27 20
28 @Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "白班") 21 @Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "白班")
29 - @ExcelProperty("班次名称")  
30 private String name; 22 private String name;
31 23
32 @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00") 24 @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00")
33 - @ExcelProperty("开始时间")  
34 private String startTime; 25 private String startTime;
35 26
36 @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "17:00") 27 @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "17:00")
37 - @ExcelProperty("结束时间")  
38 private String endTime; 28 private String endTime;
39 29
40 @Schema(description = "备注") 30 @Schema(description = "备注")
41 - @ExcelProperty("备注")  
42 private String remark; 31 private String remark;
43 32
44 @Schema(description = "预留字段1") 33 @Schema(description = "预留字段1")
@@ -54,7 +43,6 @@ public class MesCalPlanShiftRespVO { @@ -54,7 +43,6 @@ public class MesCalPlanShiftRespVO {
54 private Integer attribute4; 43 private Integer attribute4;
55 44
56 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) 45 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
57 - @ExcelProperty("创建时间")  
58 private LocalDateTime createTime; 46 private LocalDateTime createTime;
59 47
60 } 48 }