Commit 72a9b992 by Cat
parents bfa8cec8 72ae3d83
...@@ -113,14 +113,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -113,14 +113,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers( "/webSocket/**").anonymous() .antMatchers( "/webSocket/**").anonymous()
.antMatchers("/login", "/register", "/captchaImage").anonymous() .antMatchers("/login", "/register", "/captchaImage").anonymous()
.antMatchers("/wx/user/login","/wx/user/getRoleType/**").permitAll() .antMatchers("/wx/user/login","/wx/user/getRoleType/**").permitAll()
.antMatchers("/wx/teacherLeave/**").permitAll()
.antMatchers("/teacherFiles/notice/**").permitAll()
.antMatchers("/wx/level/expriment/**").permitAll()
.antMatchers("/dd/user/login").permitAll() .antMatchers("/dd/user/login").permitAll()
.antMatchers( "/common/**").permitAll() .antMatchers( "/common/**").permitAll()
.antMatchers( "/dd/school/**").permitAll() .antMatchers( "/dd/school/**").permitAll()
......
package yangtz.cs.liu.campus.controller.teacherFiles; package yangtz.cs.liu.campus.controller.teacherFiles;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
...@@ -15,7 +16,9 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice; ...@@ -15,7 +16,9 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService; import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 教师档案Controller * 教师档案Controller
...@@ -91,14 +94,15 @@ public class TeacherFilesController extends BaseController ...@@ -91,14 +94,15 @@ public class TeacherFilesController extends BaseController
/** /**
* *
* @param userId * @param
* @param * @param
* @return * @return
*/ */
@GetMapping("getTeachList/{userId}") @GetMapping("/getTeachList")
public TableDataInfo teachList(@PathVariable("userId") Long userId,TeacherFilesNotice teacherFilesNotice){ public TableDataInfo teachList(TeacherFiles teacherFiles){
startPage(); startPage();
List<TeacherFilesNotice> teacherFilesNotices = teacherFilesService.selctTeacherByUserId(userId,teacherFilesNotice); Map map = new HashMap();
List<TeacherFilesNotice> teacherFilesNotices = teacherFilesService.selctTeacherByUserId(teacherFiles);
return getDataTable(teacherFilesNotices); return getDataTable(teacherFilesNotices);
} }
......
...@@ -11,8 +11,11 @@ import org.springframework.security.access.prepost.PreAuthorize; ...@@ -11,8 +11,11 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNoticeTotal; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNoticeTotal;
import yangtz.cs.liu.campus.service.impl.teacherFiles.TeacherFilesExcelUtil;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesNoticeService; import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesNoticeService;
import javax.annotation.security.DenyAll;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
...@@ -29,10 +32,13 @@ public class TeacherFilesNoticeController extends BaseController ...@@ -29,10 +32,13 @@ public class TeacherFilesNoticeController extends BaseController
@Autowired @Autowired
private ITeacherFilesNoticeService teacherFilesNoticeService; private ITeacherFilesNoticeService teacherFilesNoticeService;
@Autowired
private TeacherFilesExcelUtil teacherFilesExcelUtil;
/** /**
* 查询教师档案通知列表 * 查询教师档案通知列表
*/ */
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:list')") // @PreAuthorize("@ss.hasPermi('teacherFiles:notice:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TeacherFilesNotice teacherFilesNotice) public TableDataInfo list(TeacherFilesNotice teacherFilesNotice)
{ {
...@@ -45,14 +51,11 @@ public class TeacherFilesNoticeController extends BaseController ...@@ -45,14 +51,11 @@ public class TeacherFilesNoticeController extends BaseController
/** /**
* 导出教师档案通知列表 * 导出教师档案通知列表
*/ */
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:export')") @GetMapping("/export")
@Log(title = "教室档案通知", businessType = BusinessType.EXPORT) @PermitAll
@PostMapping("/export")
public void export(HttpServletResponse response, TeacherFilesNotice teacherFilesNotice) public void export(HttpServletResponse response, TeacherFilesNotice teacherFilesNotice)
{ {
List<TeacherFilesNoticeTotal> list = teacherFilesNoticeService.selectTeacherFilesNoticeList(teacherFilesNotice); teacherFilesExcelUtil.getExcel(teacherFilesNotice.getId(),response);
ExcelUtil<TeacherFilesNoticeTotal> util = new ExcelUtil<TeacherFilesNoticeTotal>(TeacherFilesNoticeTotal.class);
util.exportExcel(response, list, "教室档案通知数据");
} }
/** /**
......
...@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.domain.teacherFiles; ...@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.domain.teacherFiles;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
...@@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; ...@@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi * @author ruoyi
* @date 2023-09-05 * @date 2023-09-05
*/ */
@Data
public class TeacherFiles extends BaseEntity public class TeacherFiles extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -104,238 +106,9 @@ public class TeacherFiles extends BaseEntity ...@@ -104,238 +106,9 @@ public class TeacherFiles extends BaseEntity
private Long gradeTeacherId; private Long gradeTeacherId;
public Long getGradeTeacherId() { private String userId;
return gradeTeacherId;
}
public void setGradeTeacherId(Long gradeTeacherId) { private String noticeName;
this.gradeTeacherId = gradeTeacherId;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setNoticeId(String noticeId)
{
this.noticeId = noticeId;
}
public String getNoticeId()
{
return noticeId;
}
public void setFilesSemester(String filesSemester)
{
this.filesSemester = filesSemester;
}
public String getFilesSemester()
{
return filesSemester;
}
public void setTeacherId(Long teacherId)
{
this.teacherId = teacherId;
}
public Long getTeacherId()
{
return teacherId;
}
public void setTeacherName(String teacherName)
{
this.teacherName = teacherName;
}
public String getTeacherName()
{
return teacherName;
}
public void setGradeId(Long gradeId)
{
this.gradeId = gradeId;
}
public Long getGradeId()
{
return gradeId;
}
public void setGradeName(String gradeName)
{
this.gradeName = gradeName;
}
public String getGradeName()
{
return gradeName;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
public String getIdCard()
{
return idCard;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setAge(Integer age)
{
this.age = age;
}
public Integer getAge()
{
return age;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setEducation(String education)
{
this.education = education;
}
public String getEducation()
{
return education;
}
public void setAppearance(String appearance)
{
this.appearance = appearance;
}
public String getAppearance()
{
return appearance;
}
public void setCourseName(String courseName)
{
this.courseName = courseName;
}
public String getCourseName()
{
return courseName;
}
public void setClassName(String className)
{
this.className = className;
}
public String getClassName()
{
return className;
}
public void setBzrClassName(String bzrClassName)
{
this.bzrClassName = bzrClassName;
}
public String getBzrClassName()
{
return bzrClassName;
}
public void setFbzrClassName(String fbzrClassName)
{
this.fbzrClassName = fbzrClassName;
}
public String getFbzrClassName()
{
return fbzrClassName;
}
public void setIsTeachingGroupLeader(String isTeachingGroupLeader)
{
this.isTeachingGroupLeader = isTeachingGroupLeader;
}
public String getIsTeachingGroupLeader()
{
return isTeachingGroupLeader;
}
public void setIsResearchGroupLeader(String isResearchGroupLeader)
{
this.isResearchGroupLeader = isResearchGroupLeader;
}
public String getIsResearchGroupLeader()
{
return isResearchGroupLeader;
}
public void setClassHour(Integer classHour)
{
this.classHour = classHour;
}
public Integer getClassHour()
{
return classHour;
}
public void setClassTeacherDetails(String classTeacherDetails)
{
this.classTeacherDetails = classTeacherDetails;
}
public String getClassTeacherDetails()
{
return classTeacherDetails;
}
public void setState(String state)
{
this.state = state;
}
public String getState()
{
return state;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("noticeId", getNoticeId())
.append("filesSemester", getFilesSemester())
.append("teacherId", getTeacherId())
.append("teacherName", getTeacherName())
.append("gradeId", getGradeId())
.append("gradeName", getGradeName())
.append("idCard", getIdCard())
.append("sex", getSex())
.append("age", getAge())
.append("title", getTitle())
.append("education", getEducation())
.append("appearance", getAppearance())
.append("courseName", getCourseName())
.append("className", getClassName())
.append("bzrClassName", getBzrClassName())
.append("fbzrClassName", getFbzrClassName())
.append("isTeachingGroupLeader", getIsTeachingGroupLeader())
.append("isResearchGroupLeader", getIsResearchGroupLeader())
.append("classHour", getClassHour())
.append("classTeacherDetails", getClassTeacherDetails())
.append("state", getState())
.toString();
}
} }
...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel; ...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 教师档案获奖情况对象 teacher_files_award * 教师档案获奖情况对象 teacher_files_award
...@@ -46,6 +48,16 @@ public class TeacherFilesAward extends BaseEntity ...@@ -46,6 +48,16 @@ public class TeacherFilesAward extends BaseEntity
@Excel(name = "发证机关") @Excel(name = "发证机关")
private String licenseIssuingAuthority; private String licenseIssuingAuthority;
private List<SchoolAccessory> accessories;
public List<SchoolAccessory> getAccessories() {
return accessories;
}
public void setAccessories(List<SchoolAccessory> accessories) {
this.accessories = accessories;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
......
...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel; ...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 教师档案课题编写情况对象 teacher_files_material * 教师档案课题编写情况对象 teacher_files_material
...@@ -38,6 +40,16 @@ public class TeacherFilesMaterial extends BaseEntity ...@@ -38,6 +40,16 @@ public class TeacherFilesMaterial extends BaseEntity
@Excel(name = "发表时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "发表时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date publishTime; private Date publishTime;
private List<SchoolAccessory> accessories;
public List<SchoolAccessory> getAccessories() {
return accessories;
}
public void setAccessories(List<SchoolAccessory> accessories) {
this.accessories = accessories;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
......
...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel; ...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 教师档案论文情况对象 teacher_files_thesis * 教师档案论文情况对象 teacher_files_thesis
...@@ -46,6 +48,16 @@ public class TeacherFilesThesis extends BaseEntity ...@@ -46,6 +48,16 @@ public class TeacherFilesThesis extends BaseEntity
@Excel(name = "发表时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "发表时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date publishTime; private Date publishTime;
private List<SchoolAccessory> schoolAccessoryList ;
public List<SchoolAccessory> getSchoolAccessoryList() {
return schoolAccessoryList;
}
public void setSchoolAccessoryList(List<SchoolAccessory> schoolAccessoryList) {
this.schoolAccessoryList = schoolAccessoryList;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
......
...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel; ...@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 教师档案培训情况对象 teacher_files_training * 教师档案培训情况对象 teacher_files_training
...@@ -42,6 +44,16 @@ public class TeacherFilesTraining extends BaseEntity ...@@ -42,6 +44,16 @@ public class TeacherFilesTraining extends BaseEntity
@Excel(name = "是否合格", readConverterExp = "1=合格,0不合格") @Excel(name = "是否合格", readConverterExp = "1=合格,0不合格")
private String isQualified; private String isQualified;
private List<SchoolAccessory> accessories;
public List<SchoolAccessory> getAccessories() {
return accessories;
}
public void setAccessories(List<SchoolAccessory> accessories) {
this.accessories = accessories;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
......
...@@ -9,6 +9,7 @@ import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo; ...@@ -9,6 +9,7 @@ import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo;
import yangtz.cs.liu.campus.vo.teacherFiles.SchoolGradeByClassVo; import yangtz.cs.liu.campus.vo.teacherFiles.SchoolGradeByClassVo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 教师档案通知Mapper接口 * 教师档案通知Mapper接口
...@@ -43,7 +44,7 @@ public interface TeacherFilesNoticeMapper ...@@ -43,7 +44,7 @@ public interface TeacherFilesNoticeMapper
public int insertTeacherFilesNotice(TeacherFilesNotice teacherFilesNotice); public int insertTeacherFilesNotice(TeacherFilesNotice teacherFilesNotice);
public List<TeacherFilesNotice> selctTeacherByUserId(@Param("userId") Long userId, @Param("teacherFiles") TeacherFilesNotice teacherFiles); public List<TeacherFilesNotice> selctTeacherByUserId(TeacherFiles teacherFiles);
/** /**
* 修改教师档案通知 * 修改教师档案通知
......
//package yangtz.cs.liu.campus.service.impl.teacherFiles; package yangtz.cs.liu.campus.service.impl.teacherFiles;
//
//import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.config.RuoYiConfig;
//import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.service.ISysDictDataService;
//import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.*;
//import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress;
//import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.usermodel.*;
//import org.apache.poi.xssf.usermodel.*; import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;
//import org.springframework.stereotype.Service; import yangtz.cs.liu.campus.domain.teacherFiles.*;
// import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService;
//import java.io.File;
//import java.io.FileOutputStream; import javax.servlet.http.HttpServletResponse;
//import java.text.ParseException; import java.io.File;
//import java.util.*; import java.io.IOException;
// import java.text.SimpleDateFormat;
//@Service import java.util.*;
//public class TeacherFilesExcelUtil {
// @Service
// @Autowired public class TeacherFilesExcelUtil {
// private RuoYiConfig ruoYiConfig;
// @Autowired
// private RuoYiConfig ruoYiConfig;
//// private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//// private SimpleDateFormat sdfS = new SimpleDateFormat("yyyy年MM月dd日"); @Autowired
//// private SimpleDateFormat sdfMS = new SimpleDateFormat("yyyy年MM月"); private ITeacherFilesService teacherFilesService;
//
// public AjaxResult getExcel(String noticeId) @Autowired
// throws Exception { private ISysDictDataService sysDictDataService;
// // 创建新的Excel 工作簿
// XSSFWorkbook workbook = new XSSFWorkbook();
// /** private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// * 主标题
// */ public void getExcel(String noticeId, HttpServletResponse response) {
// XSSFCellStyle mainTitle = workbook.createCellStyle(); TeacherFiles teacherFiles = new TeacherFiles();
// //垂直居中 teacherFiles.setNoticeId(noticeId);
// mainTitle.setVerticalAlignment(VerticalAlignment.CENTER); List<TeacherFiles> teacherFilesList = teacherFilesService.selectTeacherFilesList(teacherFiles);
// //水平居中
// mainTitle.setAlignment(HorizontalAlignment.CENTER); // 创建新的Excel 工作簿
// Font mainfont = workbook.createFont(); XSSFWorkbook workbook = new XSSFWorkbook();
// mainfont.setFontHeightInPoints((short) 28); /**
// mainTitle.setFont(mainfont); * 主标题
// */
// /** XSSFCellStyle mainTitle = workbook.createCellStyle();
// * 标题 //垂直居中
// */ mainTitle.setVerticalAlignment(VerticalAlignment.CENTER);
// XSSFCellStyle datetitle = workbook.createCellStyle(); //水平居中
// //垂直居中 mainTitle.setAlignment(HorizontalAlignment.CENTER);
// datetitle.setVerticalAlignment(VerticalAlignment.CENTER); Font mainfont = workbook.createFont();
// Font datefont = workbook.createFont(); mainfont.setFontHeightInPoints((short) 12);
// datefont.setFontHeightInPoints((short) 14); mainfont.setBold(true);
// datetitle.setFont(datefont); mainTitle.setFont(mainfont);
// mainTitle.setBorderBottom(BorderStyle.THIN); //下边框
// /** mainTitle.setBorderLeft(BorderStyle.THIN);//左边框
// * 标题 mainTitle.setBorderTop(BorderStyle.THIN);//上边框
// */ mainTitle.setBorderRight(BorderStyle.THIN);//右边框
// XSSFCellStyle title = workbook.createCellStyle();
// //垂直居中
// title.setVerticalAlignment(VerticalAlignment.CENTER); /**
// //水平居中 * 正文
// title.setAlignment(HorizontalAlignment.CENTER); */
// Font font0 = workbook.createFont(); XSSFCellStyle title = workbook.createCellStyle();
// font0.setFontHeightInPoints((short) 16); //垂直居中
// font0.setBold(true); title.setVerticalAlignment(VerticalAlignment.CENTER);
// title.setFont(font0); //水平居中
// title.setBorderBottom(BorderStyle.THIN); //下边框 title.setAlignment(HorizontalAlignment.CENTER);
// title.setBorderLeft(BorderStyle.THIN);//左边框 Font font0 = workbook.createFont();
// title.setBorderTop(BorderStyle.THIN);//上边框 font0.setFontHeightInPoints((short) 12);
// title.setBorderRight(BorderStyle.THIN);//右边框 title.setFont(font0);
// title.setBorderBottom(BorderStyle.THIN); //下边框
// /** title.setBorderLeft(BorderStyle.THIN);//左边框
// * 正常格 title.setBorderTop(BorderStyle.THIN);//上边框
// */ title.setBorderRight(BorderStyle.THIN);//右边框
// XSSFCellStyle cellStyle = workbook.createCellStyle();
// //垂直居中
// cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); for (int t = 0; t < teacherFilesList.size(); t++) {
// //水平居中 TeacherFilesVO files = teacherFilesService.selectTeacherFilesById(teacherFilesList.get(t).getId());
// cellStyle.setAlignment(HorizontalAlignment.CENTER); XSSFSheet sheet = workbook.createSheet();
// cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 workbook.setSheetName(t, files.getTeacherName()+t);
// cellStyle.setBorderLeft(BorderStyle.THIN);//左边框 /**
// cellStyle.setBorderTop(BorderStyle.THIN);//上边框 * 第一行
// cellStyle.setBorderRight(BorderStyle.THIN);//右边框 */
// cellStyle.setWrapText(true); XSSFRow row0 = sheet.createRow(0);
// Font font = workbook.createFont(); row0.setHeightInPoints(34);
// font.setFontHeightInPoints((short) 12); sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 5));
// cellStyle.setFont(font); XSSFCell cell0 = row0.createCell(0);
// cell0.setCellStyle(mainTitle);
// /** cell0.setCellValue("基本信息");
// * 黄背景格 XSSFCell cell05 = row0.createCell(5);
// */ cell05.setCellStyle(mainTitle);
// XSSFCellStyle yellowFont = workbook.createCellStyle();
// yellowFont.setWrapText(true); sheet.setColumnWidth(0, 34 * 140);
// yellowFont.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GOLD.getIndex()); sheet.setColumnWidth(1, 34 * 100);
// yellowFont.setFillPattern(FillPatternType.SOLID_FOREGROUND); sheet.setColumnWidth(2, 34 * 100);
// //垂直居中 sheet.setColumnWidth(3, 34 * 140);
// yellowFont.setVerticalAlignment(VerticalAlignment.CENTER); sheet.setColumnWidth(4, 34 * 100);
// //水平居中 sheet.setColumnWidth(5, 34 * 100);
// yellowFont.setAlignment(HorizontalAlignment.CENTER); /**
// yellowFont.setBorderBottom(BorderStyle.THIN); //下边框 * 第二行
// yellowFont.setBorderLeft(BorderStyle.THIN);//左边框 */
// yellowFont.setBorderTop(BorderStyle.THIN);//上边框 for(int i=1;i<=8;i++){
// yellowFont.setBorderRight(BorderStyle.THIN);//右边框 XSSFRow row2 = sheet.createRow(i);
// yellowFont.setFont(font); row2.setHeightInPoints(20);
// XSSFCell cell = row2.createCell(0);
// /** String cellValue1 = "";
// * 红字体格 switch (i){
// */ case 1:
// XSSFCellStyle redFont = workbook.createCellStyle(); cellValue1="学年学期";
// //垂直居中 break;
// redFont.setVerticalAlignment(VerticalAlignment.CENTER); case 2:
// //水平居中 cellValue1="姓名";
// redFont.setAlignment(HorizontalAlignment.CENTER); break;
// Font font1 = workbook.createFont(); case 3:
// font1.setColor(HSSFColor.HSSFColorPredefined.DARK_RED.getIndex()); cellValue1="年龄";
// font1.setFontHeightInPoints((short) 12); break;
// redFont.setFont(font1); case 4:
// redFont.setBorderBottom(BorderStyle.THIN); //下边框 cellValue1="学历";
// redFont.setBorderLeft(BorderStyle.THIN);//左边框 break;
// redFont.setBorderTop(BorderStyle.THIN);//上边框 case 5:
// redFont.setBorderRight(BorderStyle.THIN);//右边框 cellValue1="任教学科";
// break;
// List<Long> depaList = getDepaList(request.getDepartment()); case 6:
// /** cellValue1="任正班主任班级";
// * 时间集合 break;
// */ case 7:
// List<AttendanceDatePoi> dateDes = getDateDes(request.getStartTime(), request.getEndTime()); cellValue1="是否教学组长";
// break;
// for (int t = 0; t < dateDes.size(); t++) { case 8:
// cellValue1="设计课时量";
// Calendar calendar = Calendar.getInstance(); break;
// calendar.setTime(dateDes.get(t).getStartDate()); }
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); cell.setCellValue(cellValue1);
// int month = calendar.get(Calendar.MONTH); cell.setCellStyle(title);
// int year = calendar.get(Calendar.YEAR);
//
// XSSFSheet sheet = workbook.createSheet(); sheet.addMergedRegion(new CellRangeAddress(i, i, 1, 2));
// workbook.setSheetName(t, dateDes.get(t).getMonth()); XSSFCell cell1 = row2.createCell(1);
// /** String cellValue2 = "";
// * 第一行 switch (i){
// */ case 1:
// XSSFRow row0 = sheet.createRow(0); cellValue2=files.getFilesSemester();
// row0.setHeightInPoints(51); break;
// sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 4 + actualMaximum)); case 2:
// XSSFCell cell0 = row0.createCell(0); cellValue2=files.getTeacherName();
// cell0.setCellStyle(mainTitle); break;
// cell0.setCellValue("考勤表"); case 3:
// if(files.getAge()!=null){
// /** cellValue2=String.valueOf(files.getAge());
// * 第二行 }
// */
// XSSFRow row1 = sheet.createRow(1); break;
// sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 4)); case 4:
// XSSFCell cel1 = row1.createCell(0); cellValue2=files.getEducation();
// cel1.setCellStyle(datetitle); break;
// cel1.setCellValue(sdfS.format(dateDes.get(t).getStartDate()) + "-" + sdfS.format(dateDes.get(t).getEndDate())); case 5:
// cellValue2=files.getCourseName();
// XSSFCell cel22 = row1.createCell(actualMaximum - 11); break;
// cel22.setCellValue("√"); case 6:
// XSSFCell cel33 = row1.createCell(actualMaximum - 10); cellValue2=files.getBzrClassName();
// cel33.setCellValue("出勤"); break;
// XSSFCell cel2 = row1.createCell(actualMaximum - 9); case 7:
// cel2.setCellValue("●"); cellValue2=files.getIsTeachingGroupLeader();
// XSSFCell cel3 = row1.createCell(actualMaximum - 8); break;
// cel3.setCellValue("未签到"); case 8:
// XSSFCell cel4 = row1.createCell(actualMaximum - 7); if(files.getClassHour()!=null){
// cel4.setCellValue("□"); cellValue2=String.valueOf(files.getClassHour());
// XSSFCell cel5 = row1.createCell(actualMaximum - 6); }
// cel5.setCellValue("事假");
// XSSFCell cel6 = row1.createCell(actualMaximum - 5); break;
// cel6.setCellValue("☆"); }
// XSSFCell cel7 = row1.createCell(actualMaximum - 4); cell1.setCellValue(cellValue2);
// cel7.setCellValue("节假日"); cell1.setCellStyle(title);
// XSSFCell cel8 = row1.createCell(actualMaximum - 3);
// cel8.setCellValue("△"); XSSFCell cell3 = row2.createCell(2);
// XSSFCell cel9 = row1.createCell(actualMaximum - 2); cell3.setCellStyle(title);
// cel9.setCellValue("迟到");
// XSSFCell cel10 = row1.createCell(actualMaximum - 1);
// cel10.setCellValue("○"); XSSFCell cell2 = row2.createCell(3);
// XSSFCell cel11 = row1.createCell(actualMaximum); String cellValue3 = "";
// cel11.setCellValue("早退"); switch (i){
// XSSFCell cel12 = row1.createCell(actualMaximum + 1); case 1:
// cel12.setCellValue("×"); cellValue3="级部";
// XSSFCell cel13 = row1.createCell(actualMaximum + 2); break;
// cel13.setCellValue("旷工"); case 2:
// XSSFCell cel14 = row1.createCell(actualMaximum + 3); cellValue3="性别";
// cel14.setCellValue("#"); break;
// XSSFCell cel15 = row1.createCell(actualMaximum + 4); case 3:
// cel15.setCellValue("外勤"); cellValue3="职称";
// /** break;
// * 第三行 case 4:
// */ cellValue3="政治面貌";
// XSSFRow row2 = sheet.createRow(2); break;
// XSSFCell cell = row2.createCell(0); case 5:
// cell.setCellValue("序号"); cellValue3="任教班级";
// cell.setCellStyle(title); break;
// sheet.setColumnWidth(0, 34 * 45); case 6:
// cellValue3="任副班主任班级";
// break;
// XSSFCell cell1 = row2.createCell(1); case 7:
// cell1.setCellValue("姓名"); cellValue3="是否教研组长";
// cell1.setCellStyle(title); break;
// sheet.setColumnWidth(1, 34 * 65); case 8:
// cellValue3="班主任情况";
// XSSFCell cell2 = row2.createCell(2); break;
// cell2.setCellValue("科室名"); }
// cell2.setCellStyle(title); cell2.setCellValue(cellValue3);
// sheet.setColumnWidth(2, 34 * 75); cell2.setCellStyle(title);
//
// XSSFCell cell3 = row2.createCell(3); sheet.addMergedRegion(new CellRangeAddress(i, i, 4, 5));
// cell3.setCellValue("签到异常天数"); XSSFCell cell4 = row2.createCell(4);
// cell3.setCellStyle(title); String cellValue4 = "";
// sheet.setColumnWidth(3, 34 * 130); switch (i){
// case 1:
// XSSFCell cell4 = row2.createCell(4); cellValue4=files.getGradeName();
// cell4.setCellValue("事假"); break;
// cell4.setCellStyle(title); case 2:
// sheet.setColumnWidth(4, 34 * 45); if(files.getSex()!=null){
// if(files.getSex().equals("0")){
// for (int i = 1; i <= actualMaximum; i++) { cellValue4="男";
// XSSFCell cell5 = row2.createCell(4 + i); }else{
// cell5.setCellValue(i); cellValue4="女";
// cell5.setCellStyle(title); }
// sheet.setColumnWidth(4 + i, 34 * 34); }
// } break;
// case 3:
// /** cellValue4=files.getTitle();
// * 职工集合 break;
// */ case 4:
// int x = 3; cellValue4=files.getAppearance();
// int id = 1; break;
// for (Long depaid : depaList) { case 5:
// System.out.println("查询"+depaid); cellValue4=files.getClassName();
// List<XxdjEmployees> xxdjEmployeesList = employeesMapper.SelectByDepartment(String.valueOf(depaid)); break;
// System.out.println("职工集合查询"+xxdjEmployeesList); case 6:
// Dept dept = deptMapper.selectDeptById(depaid); cellValue4=files.getFbzrClassName();
// for (XxdjEmployees xxdjEmployees : xxdjEmployeesList) { break;
// XSSFRow xrow1 = sheet.createRow(x); case 7:
// XSSFRow xrow2 = sheet.createRow(x + 1); cellValue4=files.getIsResearchGroupLeader();
// XSSFRow xrow3 = sheet.createRow(x + 2); break;
// XSSFRow xrow4 = sheet.createRow(x + 3); case 8:
// //序号 cellValue4=files.getClassTeacherDetails();
// XSSFCell xcell0 = xrow1.createCell(0); break;
// XSSFCell x2cell0 = xrow2.createCell(0); }
// XSSFCell x3cell0 = xrow3.createCell(0); cell4.setCellValue(cellValue4);
// XSSFCell x4cell0 = xrow4.createCell(0); cell4.setCellStyle(title);
// xcell0.setCellStyle(cellStyle);
// x2cell0.setCellStyle(cellStyle);
// x3cell0.setCellStyle(cellStyle);
// x4cell0.setCellStyle(cellStyle); XSSFCell cell5 = row2.createCell(5);
// xcell0.setCellValue(id); cell5.setCellStyle(title);
// //姓名 }
// XSSFCell xcell1 = xrow1.createCell(1);
// XSSFCell x2cell1 = xrow2.createCell(1); int h =9;
// XSSFCell x3cell1 = xrow3.createCell(1);
// XSSFCell x4cell1 = xrow4.createCell(1); XSSFRow row9 = sheet.createRow(h);
// xcell1.setCellStyle(cellStyle); sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
// x2cell1.setCellStyle(cellStyle); row9.setHeightInPoints(34);
// x3cell1.setCellStyle(cellStyle); XSSFCell cell90 = row9.createCell(0);
// x4cell1.setCellStyle(cellStyle); cell90.setCellStyle(mainTitle);
// xcell1.setCellValue(xxdjEmployees.getName()); cell90.setCellValue("发表成就奖论文情况");
// //科室名 XSSFCell cell95 = row9.createCell(5);
// XSSFCell xcell2 = xrow1.createCell(2); cell95.setCellStyle(mainTitle);
// XSSFCell x2cell2 = xrow2.createCell(2); h++;
// XSSFCell x3cell2 = xrow3.createCell(2);
// XSSFCell x4cell2 = xrow4.createCell(2); XSSFRow row10 = sheet.createRow(h);
// xcell2.setCellStyle(cellStyle); sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
// x2cell2.setCellStyle(cellStyle); row10.setHeightInPoints(20);
// x3cell2.setCellStyle(cellStyle); XSSFCell cell100 = row10.createCell(0);
// x4cell2.setCellStyle(cellStyle); cell100.setCellStyle(title);
// xcell2.setCellValue(dept.getDeptName()); cell100.setCellValue("序号");
// //签到异常天数 XSSFCell cell101 = row10.createCell(1);
// XSSFCell xcell3 = xrow1.createCell(3); cell101.setCellStyle(title);
// XSSFCell x2cell3 = xrow2.createCell(3); cell101.setCellValue("论文名称");
// XSSFCell x3cell3 = xrow3.createCell(3); XSSFCell cell102 = row10.createCell(2);
// XSSFCell x4cell3 = xrow4.createCell(3); cell102.setCellStyle(title);
// xcell3.setCellStyle(cellStyle); XSSFCell cell103 = row10.createCell(3);
// x2cell3.setCellStyle(cellStyle); cell103.setCellStyle(title);
// x3cell3.setCellStyle(cellStyle); cell103.setCellValue("级别");
// x4cell3.setCellStyle(cellStyle); XSSFCell cell104 = row10.createCell(4);
// //事假 cell104.setCellStyle(title);
// XSSFCell xcell4 = xrow1.createCell(4); cell104.setCellValue("等级");
// XSSFCell x2cell4 = xrow2.createCell(4); XSSFCell cell105 = row10.createCell(5);
// XSSFCell x3cell4 = xrow3.createCell(4); cell105.setCellStyle(title);
// XSSFCell x4cell4 = xrow4.createCell(4); cell105.setCellValue("发表时间");
// xcell4.setCellStyle(redFont); h++;
// x2cell4.setCellStyle(redFont);
// x3cell4.setCellStyle(redFont); List<TeacherFilesThesis> thesisList = files.getThesisList();
// x4cell4.setCellStyle(redFont); int thesisxh=1;
// for(TeacherFilesThesis thesis : thesisList){
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 0, 0)); XSSFRow row11 = sheet.createRow(h);
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 1, 1)); sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 2, 2)); row11.setHeightInPoints(20);
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 3, 3)); XSSFCell cell110 = row11.createCell(0);
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 4, 4)); cell110.setCellStyle(title);
// cell110.setCellValue(thesisxh);
// String idcard = xxdjEmployees.getIdcard(); XSSFCell cell111 = row11.createCell(1);
// if (idcard != null && !"".equals(idcard)) { cell111.setCellStyle(title);
// Map map = new HashMap(); cell111.setCellValue(thesis.getThesisName());
// map.put("idCard", idcard); XSSFCell cell112 = row11.createCell(2);
// map.put("startDay", sdf.format(dateDes.get(t).getStartDate())); cell112.setCellStyle(title);
// map.put("endDay", sdf.format(dateDes.get(t).getEndDate())); XSSFCell cell113 = row11.createCell(3);
// List<XxdjAttendance> xxdjAttendances = attendanceMapper.selectMonth(map); cell113.setCellStyle(title);
// Map<String, XxdjAttendance> attendanceMap = new HashMap(); cell113.setCellValue(sysDictDataService.selectDictLabel("level",thesis.getLevel()));
// for (XxdjAttendance xxdjAttendance : xxdjAttendances) { XSSFCell cell114 = row11.createCell(4);
// attendanceMap.put(xxdjAttendance.getAttendanceDay(), xxdjAttendance); cell114.setCellStyle(title);
// } cell114.setCellValue(sysDictDataService.selectDictLabel("grade_type1",thesis.getGrade()));
// int leaveDate = 0; XSSFCell cell115 = row11.createCell(5);
// int errorDate = 0; cell115.setCellStyle(title);
// for (int i = 1; i <= actualMaximum; i++) { cell115.setCellValue(sdf.format(thesis.getPublishTime()));
// XSSFCell xcell5 = xrow1.createCell(4 + i); thesisxh++;
// XSSFCell x2cell5 = xrow2.createCell(4 + i); h++;
// XSSFCell x3cell5 = xrow3.createCell(4 + i); }
// XSSFCell x4cell5 = xrow4.createCell(4 + i); XSSFRow row12 = sheet.createRow(h);
// Calendar xcalendar = Calendar.getInstance(); sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
// xcalendar.set(year, month, i); row12.setHeightInPoints(34);
// int weekDay = xcalendar.get(Calendar.DAY_OF_WEEK); XSSFCell cell120 = row12.createCell(0);
// if (weekDay == 7 || weekDay == 1) { cell120.setCellStyle(mainTitle);
// xcell5.setCellStyle(yellowFont); cell120.setCellValue("课题、结题、专著、校本教材编写情况");
// x2cell5.setCellStyle(yellowFont); XSSFCell cell125 = row12.createCell(5);
// x3cell5.setCellStyle(yellowFont); cell125.setCellStyle(mainTitle);
// x4cell5.setCellStyle(yellowFont); h++;
// } else {
// xcell5.setCellStyle(cellStyle); XSSFRow row13 = sheet.createRow(h);
// x2cell5.setCellStyle(cellStyle); sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 3));
// x3cell5.setCellStyle(cellStyle); sheet.addMergedRegion(new CellRangeAddress(h, h, 4, 5));
// x4cell5.setCellStyle(cellStyle); row13.setHeightInPoints(20);
// } XSSFCell cell130 = row13.createCell(0);
// XxdjAttendance xxdjAttendance = attendanceMap.get(sdf.format(xcalendar.getTime())); cell130.setCellStyle(title);
// if (xxdjAttendance != null) { cell130.setCellValue("序号");
// xcell5.setCellValue(toFHstate(xxdjAttendance.getForenoonStart()) + toFHoutside(xxdjAttendance.getForenoonStartOutside())); XSSFCell cell131 = row13.createCell(1);
// x2cell5.setCellValue(toFHstate(xxdjAttendance.getForenoonEnd()) + toFHoutside(xxdjAttendance.getForenoonEndOutside())); cell131.setCellStyle(title);
// x3cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonStart()) + toFHoutside(xxdjAttendance.getAfternoonStartOutside())); cell131.setCellValue("名称");
// x4cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonEnd()) + toFHoutside(xxdjAttendance.getAfternoonEndOutside())); XSSFCell cell132 = row13.createCell(2);
// if ("1".equals(xxdjAttendance.getLeaveDate())) { cell132.setCellStyle(title);
// leaveDate++; XSSFCell cell133 = row13.createCell(3);
// } cell133.setCellStyle(title);
// if ("1".equals(xxdjAttendance.getErrorDate())) { XSSFCell cell134 = row13.createCell(4);
// errorDate++; cell134.setCellStyle(title);
// } cell134.setCellValue("发表时间");
// XSSFCell cell135 = row13.createCell(5);
// } cell135.setCellStyle(title);
// } h++;
// xcell3.setCellValue(errorDate);
// xcell4.setCellValue(leaveDate); List<TeacherFilesMaterial> materialList = files.getMaterialList();
// int materialxh=1;
// } for(TeacherFilesMaterial material : materialList){
// x = x + 4; XSSFRow row11 = sheet.createRow(h);
// id++; sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 3));
// } sheet.addMergedRegion(new CellRangeAddress(h, h, 4, 5));
// } row11.setHeightInPoints(20);
// } XSSFCell cell110 = row11.createCell(0);
// cell110.setCellStyle(title);
// FileOutputStream fos = new FileOutputStream(getAbsoluteFile("签到表.xlsx")); cell110.setCellValue(materialxh);
// // 把相应的Excel 工作簿存盘 XSSFCell cell111 = row11.createCell(1);
// workbook.write(fos); cell111.setCellStyle(title);
// fos.flush(); cell111.setCellValue(material.getName());
// // 操作结束,关闭文件 XSSFCell cell112 = row11.createCell(2);
// fos.close(); cell112.setCellStyle(title);
// return AjaxResult.success("签到表.xlsx"); XSSFCell cell113 = row11.createCell(3);
// } cell113.setCellStyle(title);
// XSSFCell cell114 = row11.createCell(4);
// /** cell114.setCellStyle(title);
// * 获取下载路径 cell114.setCellValue(sdf.format(material.getPublishTime()));
// * XSSFCell cell115 = row11.createCell(5);
// * @param filename 文件名称 cell115.setCellStyle(title);
// */ materialxh++;
// public String getAbsoluteFile(String filename) { h++;
// String downloadPath = ruoYiConfig.getDownloadPath() + filename; }
// File desc = new File(downloadPath); XSSFRow row14 = sheet.createRow(h);
// if (!desc.getParentFile().exists()) { sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
// desc.getParentFile().mkdirs(); row14.setHeightInPoints(34);
// } XSSFCell cell140 = row14.createCell(0);
// return downloadPath; cell140.setCellStyle(mainTitle);
// } cell140.setCellValue("培训情况");
// XSSFCell cell145 = row14.createCell(5);
// //(1.正常 2.迟到 3.早退 4.请假 5.未签到 6.节假日 7.旷工) cell145.setCellStyle(mainTitle);
// private String toFHstate(String state) { h++;
// if (state == null) {
// return "●"; XSSFRow row15 = sheet.createRow(h);
// } sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
// switch (state) { sheet.addMergedRegion(new CellRangeAddress(h, h, 3, 4));
// case "1": row15.setHeightInPoints(20);
// return "√"; XSSFCell cell150 = row15.createCell(0);
// case "2": cell150.setCellStyle(title);
// return "△"; cell150.setCellValue("序号");
// case "3": XSSFCell cell151 = row15.createCell(1);
// return "○"; cell151.setCellStyle(title);
// case "4": cell151.setCellValue("培训时间");
// return "□"; XSSFCell cell152 = row15.createCell(2);
// case "6": cell152.setCellStyle(title);
// return "☆"; XSSFCell cell153 = row15.createCell(3);
// case "7": cell153.setCellValue("培训名称");
// return "×"; cell153.setCellStyle(title);
// default: XSSFCell cell154 = row15.createCell(4);
// return "●"; cell154.setCellStyle(title);
// } XSSFCell cell155 = row15.createCell(5);
// } cell155.setCellValue("是否合格");
// cell155.setCellStyle(title);
// private String toFHoutside(String outside) { h++;
// if (outside == null) {
// return ""; List<TeacherFilesTraining> trainingList = files.getTrainingList();
// } int trainingxh=1;
// switch (outside) { for (TeacherFilesTraining training:trainingList){
// case "1": XSSFRow row11 = sheet.createRow(h);
// return "#"; sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
// default: sheet.addMergedRegion(new CellRangeAddress(h, h, 3, 4));
// return ""; row15.setHeightInPoints(20);
// } XSSFCell cell110 = row11.createCell(0);
// } cell110.setCellStyle(title);
// cell110.setCellValue(trainingxh);
// public List<AttendanceDatePoi> getDateDes(String startDate, String endDate) { XSSFCell cell111 = row11.createCell(1);
// List<AttendanceDatePoi> datePois = new ArrayList<>(); cell111.setCellStyle(title);
// try { cell111.setCellValue(sdf.format(training.getTrainingTime()));
// XSSFCell cell112 = row11.createCell(2);
// Date start = sdf.parse(startDate); cell112.setCellStyle(title);
// Date end = sdf.parse(endDate); XSSFCell cell113 = row11.createCell(3);
// Calendar startCalendar = Calendar.getInstance(); cell113.setCellValue(training.getTrainingName());
// startCalendar.setTime(start); cell113.setCellStyle(title);
// int startYear = startCalendar.get(Calendar.YEAR); XSSFCell cell114 = row11.createCell(4);
// int startMonth = startCalendar.get(Calendar.MONTH); cell114.setCellStyle(title);
// int startDay = startCalendar.get(Calendar.DAY_OF_MONTH); XSSFCell cell115 = row11.createCell(5);
// Calendar endCalendar = Calendar.getInstance(); cell115.setCellValue(sysDictDataService.selectDictLabel("is_qualified",training.getIsQualified()));
// endCalendar.setTime(end); cell115.setCellStyle(title);
// int endYear = endCalendar.get(Calendar.YEAR); trainingxh++;
// int endMonth = endCalendar.get(Calendar.MONTH); h++;
// int endDay = endCalendar.get(Calendar.DAY_OF_MONTH); }
// for (int year = startYear; year <= endYear; year++) {
//
// if (year != startYear) XSSFRow row16 = sheet.createRow(h);
// startMonth = 1; sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
// int maxMonth = 12; row16.setHeightInPoints(34);
// if (year == endYear) { XSSFCell cell160 = row16.createCell(0);
// maxMonth = endMonth; cell160.setCellStyle(mainTitle);
// } cell160.setCellValue("业务获奖情况");
// for (int month = startMonth; month <= maxMonth; month++) { XSSFCell cell165 = row16.createCell(5);
// Calendar calendar = Calendar.getInstance(); cell165.setCellStyle(mainTitle);
// calendar.set(Calendar.YEAR, year); h++;
// calendar.set(Calendar.MONTH, month);
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); XSSFRow row17 = sheet.createRow(h);
// AttendanceDatePoi datePoi = new AttendanceDatePoi(); sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
// if (month != startMonth) row15.setHeightInPoints(20);
// startDay = 1; XSSFCell cell170 = row17.createCell(0);
// if (month == endMonth && year == endYear) cell170.setCellStyle(title);
// actualMaximum = endDay; cell170.setCellValue("序号");
// datePoi.setMonth(sdfMS.format(calendar.getTime())); XSSFCell cell171 = row17.createCell(1);
// calendar.set(Calendar.DAY_OF_MONTH, startDay); cell171.setCellStyle(title);
// datePoi.setStartDate(calendar.getTime()); cell171.setCellValue("获奖名称");
// calendar.set(Calendar.DAY_OF_MONTH, actualMaximum); XSSFCell cell172 = row17.createCell(2);
// datePoi.setEndDate(calendar.getTime()); cell172.setCellStyle(title);
// datePois.add(datePoi); XSSFCell cell173 = row17.createCell(3);
// } cell173.setCellValue("获奖时间");
// } cell173.setCellStyle(title);
// } catch (ParseException e) { XSSFCell cell174 = row17.createCell(4);
// e.printStackTrace(); cell174.setCellValue("获奖等级");
// } cell174.setCellStyle(title);
// return datePois; XSSFCell cell175 = row17.createCell(5);
// } cell175.setCellValue("发证机关");
// cell175.setCellStyle(title);
// //获取 单位id集合 h++;
// public List<Long> getDepaList(Long department) {
// List<Long> depaList = new ArrayList<>(); List<TeacherFilesAward> awardList = files.getAwardList();
// List<Dept> depts = deptMapper.selectChildrenDeptById(department); int awardxh =1;
// if (depts == null || depts.size() == 0) { for (TeacherFilesAward award : awardList){
// depaList.add(department); XSSFRow row11 = sheet.createRow(h);
// } else { sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
// for (Dept dept : depts) { XSSFCell cell110 = row11.createCell(0);
// List<Long> todepaList = getDepaList(dept.getDeptId()); cell110.setCellStyle(title);
// depaList.addAll(todepaList); cell110.setCellValue(awardxh);
// } XSSFCell cell111 = row11.createCell(1);
// } cell111.setCellStyle(title);
// return depaList; cell111.setCellValue(award.getAwardName());
// } XSSFCell cell112 = row11.createCell(2);
//} cell112.setCellStyle(title);
XSSFCell cell113 = row11.createCell(3);
cell113.setCellValue(sdf.format(award.getAwardTime()));
cell113.setCellStyle(title);
XSSFCell cell114 = row11.createCell(4);
cell114.setCellValue(sysDictDataService.selectDictLabel("grade_type1",award.getGradeOfAward()));
cell114.setCellStyle(title);
XSSFCell cell115 = row11.createCell(5);
cell115.setCellValue(award.getLicenseIssuingAuthority());
cell115.setCellStyle(title);
awardxh++;
h++;
}
}
// 把相应的Excel 工作簿存盘
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
try {
workbook.write(response.getOutputStream());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
/**
* 获取下载路径
*
* @param filename 文件名称
*/
public String getAbsoluteFile(String filename) {
String downloadPath = ruoYiConfig.getDownloadPath() + filename;
File desc = new File(downloadPath);
if (!desc.getParentFile().exists()) {
desc.getParentFile().mkdirs();
}
return downloadPath;
}
}
package yangtz.cs.liu.campus.service.impl.teacherFiles; package yangtz.cs.liu.campus.service.impl.teacherFiles;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.domain.entity.SchoolTeacher; import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.TermRange; import com.ruoyi.common.utils.TermRange;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.award.Award; import yangtz.cs.liu.campus.domain.award.Award;
import yangtz.cs.liu.campus.domain.material.Material; import yangtz.cs.liu.campus.domain.material.Material;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass; import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
...@@ -13,6 +15,7 @@ import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor; ...@@ -13,6 +15,7 @@ import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor;
import yangtz.cs.liu.campus.domain.teacherFiles.*; import yangtz.cs.liu.campus.domain.teacherFiles.*;
import yangtz.cs.liu.campus.domain.thesis.Thesis; import yangtz.cs.liu.campus.domain.thesis.Thesis;
import yangtz.cs.liu.campus.domain.training.Training; import yangtz.cs.liu.campus.domain.training.Training;
import yangtz.cs.liu.campus.mapper.accessory.AccessoryMapper;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper; import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMentorMapper; import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMentorMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper; import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
...@@ -64,6 +67,10 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -64,6 +67,10 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Autowired @Autowired
private SchoolClassMentorMapper classMentorMapper; private SchoolClassMentorMapper classMentorMapper;
@Autowired
private AccessoryMapper accessoryMapper;
/** /**
* 查询教师档案 * 查询教师档案
* *
...@@ -73,11 +80,49 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -73,11 +80,49 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Override @Override
public TeacherFilesVO selectTeacherFilesById(Long id) public TeacherFilesVO selectTeacherFilesById(Long id)
{ {
TeacherFilesVO teacherFiles = teacherFilesMapper.selectTeacherFilesById(id); TeacherFilesVO teacherFiles = teacherFilesMapper.selectTeacherFilesById(id);
teacherFiles.setMaterialList(FmaterialMapper.selectTeacherFilesMaterialListByFilesId(id)); //教师档案课题编写情况
teacherFiles.setThesisList(FthesisMapper.selectTeacherFilesThesisListByFilesId(id)); List<TeacherFilesMaterial> teacherFilesMaterials = FmaterialMapper.selectTeacherFilesMaterialListByFilesId(id);
teacherFiles.setTrainingList(FtrainingMapper.selectTeacherFilesTrainingListByFilesId(id)); for (TeacherFilesMaterial date :teacherFilesMaterials){
teacherFiles.setAwardList(FawardMapper.selectTeacherFilesAwardListByFilesId(id)); LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"材料编写附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setAccessories(accessories);
}
teacherFiles.setMaterialList(teacherFilesMaterials);
//论文
List<TeacherFilesThesis> teacherFilesTheses = FthesisMapper.selectTeacherFilesThesisListByFilesId(id);
for (TeacherFilesThesis date : teacherFilesTheses){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"论文情况附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setSchoolAccessoryList(accessories);
}
teacherFiles.setThesisList(teacherFilesTheses);
//教师档案培训情况
List<TeacherFilesTraining> teacherFilesTrainings = FtrainingMapper.selectTeacherFilesTrainingListByFilesId(id);
for (TeacherFilesTraining date :teacherFilesTrainings){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"培训情况附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setAccessories(accessories);
}
teacherFiles.setTrainingList(teacherFilesTrainings);
//教师档案获奖情况
List<TeacherFilesAward> teacherFilesAwards = FawardMapper.selectTeacherFilesAwardListByFilesId(id);
for (TeacherFilesAward date :teacherFilesAwards){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"获奖情况附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setAccessories(accessories);
}
teacherFiles.setAwardList(teacherFilesAwards);
return teacherFiles; return teacherFiles;
} }
...@@ -114,9 +159,8 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -114,9 +159,8 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
} }
@Override public List<TeacherFilesNotice> selctTeacherByUserId(TeacherFiles teacherFiles) {
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles) { return teacherFilesNoticeMapper.selctTeacherByUserId(teacherFiles);
return teacherFilesNoticeMapper.selctTeacherByUserId(userId,teacherFiles);
} }
/** /**
......
...@@ -6,6 +6,7 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice; ...@@ -6,6 +6,7 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 教师档案Service接口 * 教师档案Service接口
...@@ -45,7 +46,6 @@ public interface ITeacherFilesService ...@@ -45,7 +46,6 @@ public interface ITeacherFilesService
* @return 教师档案集合 * @return 教师档案集合
*/ */
public int countYqr(TeacherFiles teacherFiles); public int countYqr(TeacherFiles teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles);
public List<TeacherFilesDeletRecord> getTeacherRocer(String tId); public List<TeacherFilesDeletRecord> getTeacherRocer(String tId);
/** /**
...@@ -54,6 +54,7 @@ public interface ITeacherFilesService ...@@ -54,6 +54,7 @@ public interface ITeacherFilesService
* @return * @return
*/ */
public Integer teacherAdd(Long[] ids); public Integer teacherAdd(Long[] ids);
public List<TeacherFilesNotice> selctTeacherByUserId(TeacherFiles teacherFiles);
/** /**
* 新增教师档案 * 新增教师档案
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
</if> </if>
and r.student_id = #{studentId} and d.dcwj_zt = '2' and d.del_flag = '0' and r.del_flag = '0' and r.student_id = #{studentId} and d.dcwj_zt = '2' and d.del_flag = '0' and r.del_flag = '0'
</where> </where>
order by d.create_time desc
</select> </select>
<select id="teacherGetDcwjList" resultType="yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj"> <select id="teacherGetDcwjList" resultType="yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj">
...@@ -95,6 +96,7 @@ ...@@ -95,6 +96,7 @@
</if> </if>
and r.teacher_id = #{teacherId} and d.dcwj_zt = '2' and d.del_flag = '0' and r.del_flag = '0' and r.teacher_id = #{teacherId} and d.dcwj_zt = '2' and d.del_flag = '0' and r.del_flag = '0'
</where> </where>
order by d.create_time desc
</select> </select>
<select id="queryList" resultType="yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo"> <select id="queryList" resultType="yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo">
......
...@@ -45,19 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -45,19 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selctTeacherByUserId" resultType="yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice">
SELECT fn.*,tf.state,tf.id as fId from teacher_files tf LEFT JOIN teacher_files_notice fn on fn.id= tf.notice_id WHERE tf.teacher_id = #{userId}
and fn.notice_state = 2
<if test="teacherFiles.noticeRange != null and teacherFiles.noticeRange != ''"> and fn.notice_range = #{teacherFiles.noticeRange}</if>
<if test="teacherFiles.noticeYear != null and teacherFiles.noticeYear != ''"> and fn.notice_year = #{teacherFiles.noticeYear}</if>
<if test="teacherFiles.noticeSemester != null and teacherFiles.noticeSemester != ''"> and fn.notice_semester = #{teacherFiles.noticeSemester}</if>
<if test="teacherFiles.noticeName != null and teacherFiles.noticeName != ''"> and fn.notice_name like concat('%', #{teacherFiles.noticeName}, '%')</if>
<if test="teacherFiles.noticeState != null and teacherFiles.noticeState != ''"> and fn.notice_state = #{teacherFiles.noticeState}</if>
<if test="teacherFiles.startTime != null "> and start_time = #{teacherFiles.startTime}</if>
<if test="teacherFiles.endTime != null "> and end_time = #{teacherFiles.endTime}</if>
</select>
<select id="selectTeacherFilesNoticeListByUser" parameterType="TeacherFilesNotice" resultType="TeacherFilesNoticeTotal"> <select id="selectTeacherFilesNoticeListByUser" parameterType="TeacherFilesNotice" resultType="TeacherFilesNoticeTotal">
<include refid="selectTeacherFilesNoticeTotalVo"/> <include refid="selectTeacherFilesNoticeTotalVo"/>
<where> <where>
...@@ -78,6 +65,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -78,6 +65,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selctTeacherByUserId" parameterType="TeacherFiles" resultType="yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice">
SELECT fn.*,tf.state,tf.id as fId from teacher_files tf LEFT JOIN teacher_files_notice fn on fn.id= tf.notice_id WHERE tf.teacher_id = #{userId}
and fn.notice_state = 2
<if test="noticeName != null "> and fn.notice_name LIKE concat('%', #{noticeName}, '%') </if>
</select>
<insert id="insertTeacherFilesNotice" parameterType="TeacherFilesNotice"> <insert id="insertTeacherFilesNotice" parameterType="TeacherFilesNotice">
insert into teacher_files_notice insert into teacher_files_notice
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment