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 1 package cn.iocoder.yudao.module.mes.controller.admin.cal.plan;
2 2  
3   -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
4 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
5   -import cn.iocoder.yudao.framework.common.pojo.PageParam;
6 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
7 5 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
8   -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
9 6 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftPageReqVO;
10 7 import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftRespVO;
11 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 12 import io.swagger.v3.oas.annotations.Parameter;
16 13 import io.swagger.v3.oas.annotations.tags.Tag;
17 14 import jakarta.annotation.Resource;
18   -import jakarta.servlet.http.HttpServletResponse;
19 15 import jakarta.validation.Valid;
20 16 import org.springframework.security.access.prepost.PreAuthorize;
21 17 import org.springframework.validation.annotation.Validated;
22 18 import org.springframework.web.bind.annotation.*;
23 19  
24   -import java.io.IOException;
25 20 import java.util.List;
26 21  
27   -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
28 22 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
29 23  
30 24 @Tag(name = "管理后台 - MES 计划班次")
... ... @@ -86,18 +80,4 @@ public class MesCalPlanShiftController {
86 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 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 3 import io.swagger.v3.oas.annotations.media.Schema;
6 4 import lombok.Data;
7 5  
8 6 import java.time.LocalDateTime;
9 7  
10   -// TODO @AI:是不是不要导出
11 8 @Schema(description = "管理后台 - MES 计划班次 Response VO")
12 9 @Data
13   -@ExcelIgnoreUnannotated
14 10 public class MesCalPlanShiftRespVO {
15 11  
16 12 @Schema(description = "班次编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
17   - @ExcelProperty("班次编号")
18 13 private Long id;
19 14  
20 15 @Schema(description = "排班计划编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
21   - @ExcelProperty("排班计划编号")
22 16 private Long planId;
23 17  
24 18 @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
25   - @ExcelProperty("显示顺序")
26 19 private Integer sort;
27 20  
28 21 @Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "白班")
29   - @ExcelProperty("班次名称")
30 22 private String name;
31 23  
32 24 @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00")
33   - @ExcelProperty("开始时间")
34 25 private String startTime;
35 26  
36 27 @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "17:00")
37   - @ExcelProperty("结束时间")
38 28 private String endTime;
39 29  
40 30 @Schema(description = "备注")
41   - @ExcelProperty("备注")
42 31 private String remark;
43 32  
44 33 @Schema(description = "预留字段1")
... ... @@ -54,7 +43,6 @@ public class MesCalPlanShiftRespVO {
54 43 private Integer attribute4;
55 44  
56 45 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
57   - @ExcelProperty("创建时间")
58 46 private LocalDateTime createTime;
59 47  
60 48 }
... ...