diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/MesCalPlanShiftController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/MesCalPlanShiftController.java index 4e0c905..48c0dae 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/MesCalPlanShiftController.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/MesCalPlanShiftController.java @@ -1,11 +1,8 @@ package cn.iocoder.yudao.module.mes.controller.admin.cal.plan; -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftPageReqVO; import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftRespVO; import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift.MesCalPlanShiftSaveReqVO; @@ -15,16 +12,13 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.io.IOException; import java.util.List; -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - MES 计划班次") @@ -86,18 +80,4 @@ public class MesCalPlanShiftController { return success(BeanUtils.toBean(list, MesCalPlanShiftRespVO.class)); } -// TODO @AI:是不是不要导出 - @GetMapping("/export-excel") - @Operation(summary = "导出计划班次 Excel") - @PreAuthorize("@ss.hasPermission('mes:cal-plan:export')") - @ApiAccessLog(operateType = EXPORT) - public void exportPlanShiftExcel(@Valid MesCalPlanShiftPageReqVO pageReqVO, - HttpServletResponse response) throws IOException { - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); - List list = planShiftService.getPlanShiftPage(pageReqVO).getList(); - // 导出 Excel - ExcelUtils.write(response, "计划班次.xls", "数据", MesCalPlanShiftRespVO.class, - BeanUtils.toBean(list, MesCalPlanShiftRespVO.class)); - } - } diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/vo/shift/MesCalPlanShiftRespVO.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/vo/shift/MesCalPlanShiftRespVO.java index 5be873a..29b6504 100644 --- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/vo/shift/MesCalPlanShiftRespVO.java +++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/plan/vo/shift/MesCalPlanShiftRespVO.java @@ -1,44 +1,33 @@ package cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.shift; -import cn.idev.excel.annotation.ExcelIgnoreUnannotated; -import cn.idev.excel.annotation.ExcelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; -// TODO @AI:是不是不要导出 @Schema(description = "管理后台 - MES 计划班次 Response VO") @Data -@ExcelIgnoreUnannotated public class MesCalPlanShiftRespVO { @Schema(description = "班次编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @ExcelProperty("班次编号") private Long id; @Schema(description = "排班计划编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty("排班计划编号") private Long planId; @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty("显示顺序") private Integer sort; @Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "白班") - @ExcelProperty("班次名称") private String name; @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00") - @ExcelProperty("开始时间") private String startTime; @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "17:00") - @ExcelProperty("结束时间") private String endTime; @Schema(description = "备注") - @ExcelProperty("备注") private String remark; @Schema(description = "预留字段1") @@ -54,7 +43,6 @@ public class MesCalPlanShiftRespVO { private Integer attribute4; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("创建时间") private LocalDateTime createTime; }