parent
896ba81d60
commit
f2a53a6e33
8 changed files with 248 additions and 75 deletions
@ -0,0 +1,100 @@ |
||||
package com.teaching.backend.model.dto.chapter; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Data; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* ClassName: ChapterExcelDto |
||||
* Package: com.teaching.backend.model.dto.chapter |
||||
* Description: |
||||
* |
||||
* @Author 姜钧瀚 |
||||
* @Create 2024/8/10 13:44 |
||||
* @Version 1.0 |
||||
*/ |
||||
@Data |
||||
@NoArgsConstructor |
||||
@AllArgsConstructor |
||||
public class ChapterExcelDTO implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
|
||||
|
||||
@ApiModelProperty(value = "创建日期") |
||||
@JsonFormat(pattern = "yyyy/M/d HH:mm:ss") |
||||
private LocalDateTime createTime; |
||||
|
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
|
||||
@ApiModelProperty(value = "更新日期") |
||||
@JsonFormat(pattern = "yyyy/M/d HH-mm-ss") |
||||
private LocalDateTime updateTime; |
||||
|
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
|
||||
@ApiModelProperty(value = "序号") |
||||
private Double orderNum; |
||||
|
||||
@ApiModelProperty(value = "章节名称") |
||||
private String name; |
||||
|
||||
@ApiModelProperty(value = "简介") |
||||
private String content; |
||||
|
||||
@ApiModelProperty(value = "父章节") |
||||
private Long pid; |
||||
|
||||
@ApiModelProperty(value = "课程id") |
||||
private String courseId; |
||||
|
||||
@ApiModelProperty(value = "课程目标") |
||||
private String courseObjectivesId; |
||||
|
||||
@ApiModelProperty(value = "总学时") |
||||
private double totalClassHours; |
||||
|
||||
@ApiModelProperty(value = "要求") |
||||
private String requirement; |
||||
|
||||
@TableField(exist = false) |
||||
@ApiModelProperty(value = "是否是节") |
||||
private boolean isSection; |
||||
|
||||
|
||||
@TableField(exist = false) |
||||
@ApiModelProperty(value = "章内序号") |
||||
private Integer internalOrder; |
||||
|
||||
@ApiModelProperty(value = "线上学时") |
||||
private String onlineClassHours; |
||||
|
||||
@ApiModelProperty(value = "周次") |
||||
private String zc; |
||||
|
||||
|
||||
@ApiModelProperty(value = "内部序号显示") |
||||
private String numshow; |
||||
|
||||
@ApiModelProperty(value = "excel上级序号") |
||||
@TableField(exist = false) |
||||
private Long ParentExcelId; |
||||
|
||||
@ApiModelProperty(value = "excel序号") |
||||
@TableField(exist = false) |
||||
private Long ExcelId; |
||||
|
||||
public void setIsSection(boolean b) { |
||||
this.isSection=b; |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
package com.teaching.backend.utils.Chapter; |
||||
|
||||
import org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler; |
||||
import org.apache.poi.xssf.usermodel.XSSFComment; |
||||
|
||||
/** |
||||
* ClassName: Sheet |
||||
* Package: com.teaching.backend.utils.Chapter |
||||
* Description: |
||||
* |
||||
* @Author 姜钧瀚 |
||||
* @Create 2024/8/11 18:04 |
||||
* @Version 1.0 |
||||
*/ |
||||
public class SheetPreScanner implements XSSFSheetXMLHandler.SheetContentsHandler { |
||||
private int rowCount = 0; |
||||
|
||||
@Override |
||||
public void startRow(int rowNum) { |
||||
rowCount++; |
||||
} |
||||
|
||||
@Override |
||||
public void endRow(int rowNum) { |
||||
} |
||||
|
||||
@Override |
||||
public void cell(String cellReference, String formattedValue, XSSFComment comment) { |
||||
} |
||||
|
||||
public int getRowCount() { |
||||
return rowCount; |
||||
} |
||||
} |
Loading…
Reference in new issue