Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
118b24bb
Commit
118b24bb
authored
Oct 31, 2023
by
朱莹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教师档案管理
parent
e40141d4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
548 additions
and
9 deletions
+548
-9
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesController.java
+18
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesNoticeController.java
+4
-3
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/teacherFiles/TeacherFiles.java
+10
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/teacherFiles/TeacherFilesNotice.java
+2
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/teacherFiles/TeacherFilesMapper.java
+2
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesExcelUtil.java
+473
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesNoticeServiceImpl.java
+7
-4
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesServiceImpl.java
+5
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/teacherFiles/ITeacherFilesNoticeService.java
+2
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/service/teacherFiles/ITeacherFilesService.java
+2
-0
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesMapper.xml
+5
-0
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesNoticeMapper.xml
+18
-1
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesController.java
View file @
118b24bb
...
@@ -37,6 +37,24 @@ public class TeacherFilesController extends BaseController
...
@@ -37,6 +37,24 @@ public class TeacherFilesController extends BaseController
public
TableDataInfo
list
(
TeacherFiles
teacherFiles
)
public
TableDataInfo
list
(
TeacherFiles
teacherFiles
)
{
{
startPage
();
startPage
();
List
<
TeacherFiles
>
list
=
teacherFilesService
.
selectTeacherFilesList
(
teacherFiles
);
return
getDataTable
(
list
);
}
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:files:list')"
)
@GetMapping
(
"/gradeList"
)
public
TableDataInfo
gradeList
(
TeacherFiles
teacherFiles
)
{
List
<
Long
>
gradeIds
=
teacherFilesService
.
getGradeId
(
teacherFiles
.
getGradeTeacherId
());
if
(
gradeIds
==
null
||
gradeIds
.
size
()==
0
){
TableDataInfo
tableDataInfo
=
new
TableDataInfo
();
tableDataInfo
.
setCode
(
500
);
tableDataInfo
.
setMsg
(
"该用户非级部主任"
);
return
tableDataInfo
;
}
teacherFiles
.
setGradeId
(
gradeIds
.
get
(
0
));
startPage
();
List
<
TeacherFiles
>
list
=
teacherFilesService
.
selectTeacherFilesList
(
teacherFiles
);
List
<
TeacherFiles
>
list
=
teacherFilesService
.
selectTeacherFilesList
(
teacherFiles
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesNoticeController.java
View file @
118b24bb
...
@@ -41,6 +41,7 @@ public class TeacherFilesNoticeController extends BaseController
...
@@ -41,6 +41,7 @@ public class TeacherFilesNoticeController extends BaseController
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
* 导出教师档案通知列表
* 导出教师档案通知列表
*/
*/
...
@@ -115,10 +116,10 @@ public class TeacherFilesNoticeController extends BaseController
...
@@ -115,10 +116,10 @@ public class TeacherFilesNoticeController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:remove')"
)
@Log
(
title
=
"教师档案通知"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"教师档案通知"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id
s
}"
)
public
AjaxResult
remove
(
@PathVariable
(
"id
"
)
String
id
)
public
AjaxResult
remove
(
@PathVariable
(
"id
s"
)
String
[]
ids
)
{
{
return
toAjax
(
teacherFilesNoticeService
.
deleteTeacherFilesNoticeById
(
id
));
return
toAjax
(
teacherFilesNoticeService
.
deleteTeacherFilesNoticeById
(
id
s
));
}
}
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/teacherFiles/TeacherFiles.java
View file @
118b24bb
...
@@ -102,6 +102,16 @@ public class TeacherFiles extends BaseEntity
...
@@ -102,6 +102,16 @@ public class TeacherFiles extends BaseEntity
@Excel
(
name
=
"状态 (1未发布 2已发布 3已填写 4已提交 5已确认 9驳回)"
)
@Excel
(
name
=
"状态 (1未发布 2已发布 3已填写 4已提交 5已确认 9驳回)"
)
private
String
state
;
private
String
state
;
private
Long
gradeTeacherId
;
public
Long
getGradeTeacherId
()
{
return
gradeTeacherId
;
}
public
void
setGradeTeacherId
(
Long
gradeTeacherId
)
{
this
.
gradeTeacherId
=
gradeTeacherId
;
}
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/teacherFiles/TeacherFilesNotice.java
View file @
118b24bb
...
@@ -60,5 +60,7 @@ public class TeacherFilesNotice extends BaseEntity
...
@@ -60,5 +60,7 @@ public class TeacherFilesNotice extends BaseEntity
*/
*/
private
String
state
;
private
String
state
;
private
String
teacherId
;
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/teacherFiles/TeacherFilesMapper.java
View file @
118b24bb
...
@@ -73,4 +73,6 @@ public interface TeacherFilesMapper
...
@@ -73,4 +73,6 @@ public interface TeacherFilesMapper
public
int
deleteTeacherFilesByNoticeId
(
String
noticeId
);
public
int
deleteTeacherFilesByNoticeId
(
String
noticeId
);
public
List
<
Long
>
getGradeId
(
Long
teacherId
);
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesExcelUtil.java
0 → 100644
View file @
118b24bb
//package yangtz.cs.liu.campus.service.impl.teacherFiles;
//
//import com.ruoyi.common.config.RuoYiConfig;
//import com.ruoyi.common.core.domain.AjaxResult;
//import org.apache.poi.hssf.util.HSSFColor;
//import org.apache.poi.ss.usermodel.*;
//import org.apache.poi.ss.util.CellRangeAddress;
//import org.apache.poi.xssf.usermodel.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.io.File;
//import java.io.FileOutputStream;
//import java.text.ParseException;
//import java.util.*;
//
//@Service
//public class TeacherFilesExcelUtil {
//
// @Autowired
// private RuoYiConfig ruoYiConfig;
//
//
//// private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//// private SimpleDateFormat sdfS = new SimpleDateFormat("yyyy年MM月dd日");
//// private SimpleDateFormat sdfMS = new SimpleDateFormat("yyyy年MM月");
//
// public AjaxResult getExcel(String noticeId)
// throws Exception {
// // 创建新的Excel 工作簿
// XSSFWorkbook workbook = new XSSFWorkbook();
// /**
// * 主标题
// */
// XSSFCellStyle mainTitle = workbook.createCellStyle();
// //垂直居中
// mainTitle.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// mainTitle.setAlignment(HorizontalAlignment.CENTER);
// Font mainfont = workbook.createFont();
// mainfont.setFontHeightInPoints((short) 28);
// mainTitle.setFont(mainfont);
//
// /**
// * 标题
// */
// XSSFCellStyle datetitle = workbook.createCellStyle();
// //垂直居中
// datetitle.setVerticalAlignment(VerticalAlignment.CENTER);
// Font datefont = workbook.createFont();
// datefont.setFontHeightInPoints((short) 14);
// datetitle.setFont(datefont);
//
// /**
// * 标题
// */
// XSSFCellStyle title = workbook.createCellStyle();
// //垂直居中
// title.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// title.setAlignment(HorizontalAlignment.CENTER);
// Font font0 = workbook.createFont();
// font0.setFontHeightInPoints((short) 16);
// font0.setBold(true);
// 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);
// //水平居中
// cellStyle.setAlignment(HorizontalAlignment.CENTER);
// cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
// cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
// cellStyle.setBorderTop(BorderStyle.THIN);//上边框
// cellStyle.setBorderRight(BorderStyle.THIN);//右边框
// cellStyle.setWrapText(true);
// Font font = workbook.createFont();
// font.setFontHeightInPoints((short) 12);
// cellStyle.setFont(font);
//
// /**
// * 黄背景格
// */
// XSSFCellStyle yellowFont = workbook.createCellStyle();
// yellowFont.setWrapText(true);
// yellowFont.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GOLD.getIndex());
// yellowFont.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// //垂直居中
// yellowFont.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// yellowFont.setAlignment(HorizontalAlignment.CENTER);
// yellowFont.setBorderBottom(BorderStyle.THIN); //下边框
// yellowFont.setBorderLeft(BorderStyle.THIN);//左边框
// yellowFont.setBorderTop(BorderStyle.THIN);//上边框
// yellowFont.setBorderRight(BorderStyle.THIN);//右边框
// yellowFont.setFont(font);
//
// /**
// * 红字体格
// */
// XSSFCellStyle redFont = workbook.createCellStyle();
// //垂直居中
// redFont.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// redFont.setAlignment(HorizontalAlignment.CENTER);
// Font font1 = workbook.createFont();
// font1.setColor(HSSFColor.HSSFColorPredefined.DARK_RED.getIndex());
// font1.setFontHeightInPoints((short) 12);
// redFont.setFont(font1);
// redFont.setBorderBottom(BorderStyle.THIN); //下边框
// redFont.setBorderLeft(BorderStyle.THIN);//左边框
// redFont.setBorderTop(BorderStyle.THIN);//上边框
// redFont.setBorderRight(BorderStyle.THIN);//右边框
//
// List<Long> depaList = getDepaList(request.getDepartment());
// /**
// * 时间集合
// */
// List<AttendanceDatePoi> dateDes = getDateDes(request.getStartTime(), request.getEndTime());
//
// for (int t = 0; t < dateDes.size(); t++) {
//
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(dateDes.get(t).getStartDate());
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
// int month = calendar.get(Calendar.MONTH);
// int year = calendar.get(Calendar.YEAR);
//
// XSSFSheet sheet = workbook.createSheet();
// workbook.setSheetName(t, dateDes.get(t).getMonth());
// /**
// * 第一行
// */
// XSSFRow row0 = sheet.createRow(0);
// row0.setHeightInPoints(51);
// sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 4 + actualMaximum));
// XSSFCell cell0 = row0.createCell(0);
// cell0.setCellStyle(mainTitle);
// cell0.setCellValue("考勤表");
//
// /**
// * 第二行
// */
// XSSFRow row1 = sheet.createRow(1);
// sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 4));
// XSSFCell cel1 = row1.createCell(0);
// cel1.setCellStyle(datetitle);
// cel1.setCellValue(sdfS.format(dateDes.get(t).getStartDate()) + "-" + sdfS.format(dateDes.get(t).getEndDate()));
//
// XSSFCell cel22 = row1.createCell(actualMaximum - 11);
// cel22.setCellValue("√");
// XSSFCell cel33 = row1.createCell(actualMaximum - 10);
// cel33.setCellValue("出勤");
// XSSFCell cel2 = row1.createCell(actualMaximum - 9);
// cel2.setCellValue("●");
// XSSFCell cel3 = row1.createCell(actualMaximum - 8);
// cel3.setCellValue("未签到");
// XSSFCell cel4 = row1.createCell(actualMaximum - 7);
// cel4.setCellValue("□");
// XSSFCell cel5 = row1.createCell(actualMaximum - 6);
// cel5.setCellValue("事假");
// XSSFCell cel6 = row1.createCell(actualMaximum - 5);
// cel6.setCellValue("☆");
// XSSFCell cel7 = row1.createCell(actualMaximum - 4);
// cel7.setCellValue("节假日");
// XSSFCell cel8 = row1.createCell(actualMaximum - 3);
// cel8.setCellValue("△");
// XSSFCell cel9 = row1.createCell(actualMaximum - 2);
// cel9.setCellValue("迟到");
// XSSFCell cel10 = row1.createCell(actualMaximum - 1);
// cel10.setCellValue("○");
// XSSFCell cel11 = row1.createCell(actualMaximum);
// cel11.setCellValue("早退");
// XSSFCell cel12 = row1.createCell(actualMaximum + 1);
// cel12.setCellValue("×");
// XSSFCell cel13 = row1.createCell(actualMaximum + 2);
// cel13.setCellValue("旷工");
// XSSFCell cel14 = row1.createCell(actualMaximum + 3);
// cel14.setCellValue("#");
// XSSFCell cel15 = row1.createCell(actualMaximum + 4);
// cel15.setCellValue("外勤");
// /**
// * 第三行
// */
// XSSFRow row2 = sheet.createRow(2);
// XSSFCell cell = row2.createCell(0);
// cell.setCellValue("序号");
// cell.setCellStyle(title);
// sheet.setColumnWidth(0, 34 * 45);
//
//
// XSSFCell cell1 = row2.createCell(1);
// cell1.setCellValue("姓名");
// cell1.setCellStyle(title);
// sheet.setColumnWidth(1, 34 * 65);
//
// XSSFCell cell2 = row2.createCell(2);
// cell2.setCellValue("科室名");
// cell2.setCellStyle(title);
// sheet.setColumnWidth(2, 34 * 75);
//
// XSSFCell cell3 = row2.createCell(3);
// cell3.setCellValue("签到异常天数");
// cell3.setCellStyle(title);
// sheet.setColumnWidth(3, 34 * 130);
//
// XSSFCell cell4 = row2.createCell(4);
// cell4.setCellValue("事假");
// cell4.setCellStyle(title);
// sheet.setColumnWidth(4, 34 * 45);
//
// for (int i = 1; i <= actualMaximum; i++) {
// XSSFCell cell5 = row2.createCell(4 + i);
// cell5.setCellValue(i);
// cell5.setCellStyle(title);
// sheet.setColumnWidth(4 + i, 34 * 34);
// }
//
// /**
// * 职工集合
// */
// int x = 3;
// int id = 1;
// for (Long depaid : depaList) {
// System.out.println("查询"+depaid);
// List<XxdjEmployees> xxdjEmployeesList = employeesMapper.SelectByDepartment(String.valueOf(depaid));
// System.out.println("职工集合查询"+xxdjEmployeesList);
// Dept dept = deptMapper.selectDeptById(depaid);
// for (XxdjEmployees xxdjEmployees : xxdjEmployeesList) {
// XSSFRow xrow1 = sheet.createRow(x);
// XSSFRow xrow2 = sheet.createRow(x + 1);
// XSSFRow xrow3 = sheet.createRow(x + 2);
// XSSFRow xrow4 = sheet.createRow(x + 3);
// //序号
// XSSFCell xcell0 = xrow1.createCell(0);
// XSSFCell x2cell0 = xrow2.createCell(0);
// XSSFCell x3cell0 = xrow3.createCell(0);
// XSSFCell x4cell0 = xrow4.createCell(0);
// xcell0.setCellStyle(cellStyle);
// x2cell0.setCellStyle(cellStyle);
// x3cell0.setCellStyle(cellStyle);
// x4cell0.setCellStyle(cellStyle);
// xcell0.setCellValue(id);
// //姓名
// XSSFCell xcell1 = xrow1.createCell(1);
// XSSFCell x2cell1 = xrow2.createCell(1);
// XSSFCell x3cell1 = xrow3.createCell(1);
// XSSFCell x4cell1 = xrow4.createCell(1);
// xcell1.setCellStyle(cellStyle);
// x2cell1.setCellStyle(cellStyle);
// x3cell1.setCellStyle(cellStyle);
// x4cell1.setCellStyle(cellStyle);
// xcell1.setCellValue(xxdjEmployees.getName());
// //科室名
// XSSFCell xcell2 = xrow1.createCell(2);
// XSSFCell x2cell2 = xrow2.createCell(2);
// XSSFCell x3cell2 = xrow3.createCell(2);
// XSSFCell x4cell2 = xrow4.createCell(2);
// xcell2.setCellStyle(cellStyle);
// x2cell2.setCellStyle(cellStyle);
// x3cell2.setCellStyle(cellStyle);
// x4cell2.setCellStyle(cellStyle);
// xcell2.setCellValue(dept.getDeptName());
// //签到异常天数
// XSSFCell xcell3 = xrow1.createCell(3);
// XSSFCell x2cell3 = xrow2.createCell(3);
// XSSFCell x3cell3 = xrow3.createCell(3);
// XSSFCell x4cell3 = xrow4.createCell(3);
// xcell3.setCellStyle(cellStyle);
// x2cell3.setCellStyle(cellStyle);
// x3cell3.setCellStyle(cellStyle);
// x4cell3.setCellStyle(cellStyle);
// //事假
// XSSFCell xcell4 = xrow1.createCell(4);
// XSSFCell x2cell4 = xrow2.createCell(4);
// XSSFCell x3cell4 = xrow3.createCell(4);
// XSSFCell x4cell4 = xrow4.createCell(4);
// xcell4.setCellStyle(redFont);
// x2cell4.setCellStyle(redFont);
// x3cell4.setCellStyle(redFont);
// x4cell4.setCellStyle(redFont);
//
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 0, 0));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 1, 1));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 2, 2));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 3, 3));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 4, 4));
//
// String idcard = xxdjEmployees.getIdcard();
// if (idcard != null && !"".equals(idcard)) {
// Map map = new HashMap();
// map.put("idCard", idcard);
// map.put("startDay", sdf.format(dateDes.get(t).getStartDate()));
// map.put("endDay", sdf.format(dateDes.get(t).getEndDate()));
// List<XxdjAttendance> xxdjAttendances = attendanceMapper.selectMonth(map);
// Map<String, XxdjAttendance> attendanceMap = new HashMap();
// for (XxdjAttendance xxdjAttendance : xxdjAttendances) {
// attendanceMap.put(xxdjAttendance.getAttendanceDay(), xxdjAttendance);
// }
// int leaveDate = 0;
// int errorDate = 0;
// for (int i = 1; i <= actualMaximum; i++) {
// XSSFCell xcell5 = xrow1.createCell(4 + i);
// XSSFCell x2cell5 = xrow2.createCell(4 + i);
// XSSFCell x3cell5 = xrow3.createCell(4 + i);
// XSSFCell x4cell5 = xrow4.createCell(4 + i);
// Calendar xcalendar = Calendar.getInstance();
// xcalendar.set(year, month, i);
// int weekDay = xcalendar.get(Calendar.DAY_OF_WEEK);
// if (weekDay == 7 || weekDay == 1) {
// xcell5.setCellStyle(yellowFont);
// x2cell5.setCellStyle(yellowFont);
// x3cell5.setCellStyle(yellowFont);
// x4cell5.setCellStyle(yellowFont);
// } else {
// xcell5.setCellStyle(cellStyle);
// x2cell5.setCellStyle(cellStyle);
// x3cell5.setCellStyle(cellStyle);
// x4cell5.setCellStyle(cellStyle);
// }
// XxdjAttendance xxdjAttendance = attendanceMap.get(sdf.format(xcalendar.getTime()));
// if (xxdjAttendance != null) {
// xcell5.setCellValue(toFHstate(xxdjAttendance.getForenoonStart()) + toFHoutside(xxdjAttendance.getForenoonStartOutside()));
// x2cell5.setCellValue(toFHstate(xxdjAttendance.getForenoonEnd()) + toFHoutside(xxdjAttendance.getForenoonEndOutside()));
// x3cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonStart()) + toFHoutside(xxdjAttendance.getAfternoonStartOutside()));
// x4cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonEnd()) + toFHoutside(xxdjAttendance.getAfternoonEndOutside()));
// if ("1".equals(xxdjAttendance.getLeaveDate())) {
// leaveDate++;
// }
// if ("1".equals(xxdjAttendance.getErrorDate())) {
// errorDate++;
// }
//
// }
// }
// xcell3.setCellValue(errorDate);
// xcell4.setCellValue(leaveDate);
//
// }
// x = x + 4;
// id++;
// }
// }
// }
//
// FileOutputStream fos = new FileOutputStream(getAbsoluteFile("签到表.xlsx"));
// // 把相应的Excel 工作簿存盘
// workbook.write(fos);
// fos.flush();
// // 操作结束,关闭文件
// fos.close();
// return AjaxResult.success("签到表.xlsx");
// }
//
// /**
// * 获取下载路径
// *
// * @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;
// }
//
// //(1.正常 2.迟到 3.早退 4.请假 5.未签到 6.节假日 7.旷工)
// private String toFHstate(String state) {
// if (state == null) {
// return "●";
// }
// switch (state) {
// case "1":
// return "√";
// case "2":
// return "△";
// case "3":
// return "○";
// case "4":
// return "□";
// case "6":
// return "☆";
// case "7":
// return "×";
// default:
// return "●";
// }
// }
//
// private String toFHoutside(String outside) {
// if (outside == null) {
// return "";
// }
// switch (outside) {
// case "1":
// return "#";
// default:
// return "";
// }
// }
//
// public List<AttendanceDatePoi> getDateDes(String startDate, String endDate) {
// List<AttendanceDatePoi> datePois = new ArrayList<>();
// try {
//
// Date start = sdf.parse(startDate);
// Date end = sdf.parse(endDate);
// Calendar startCalendar = Calendar.getInstance();
// startCalendar.setTime(start);
// int startYear = startCalendar.get(Calendar.YEAR);
// int startMonth = startCalendar.get(Calendar.MONTH);
// int startDay = startCalendar.get(Calendar.DAY_OF_MONTH);
// Calendar endCalendar = Calendar.getInstance();
// endCalendar.setTime(end);
// int endYear = endCalendar.get(Calendar.YEAR);
// int endMonth = endCalendar.get(Calendar.MONTH);
// int endDay = endCalendar.get(Calendar.DAY_OF_MONTH);
// for (int year = startYear; year <= endYear; year++) {
//
// if (year != startYear)
// startMonth = 1;
// int maxMonth = 12;
// if (year == endYear) {
// maxMonth = endMonth;
// }
// for (int month = startMonth; month <= maxMonth; month++) {
// Calendar calendar = Calendar.getInstance();
// calendar.set(Calendar.YEAR, year);
// calendar.set(Calendar.MONTH, month);
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
// AttendanceDatePoi datePoi = new AttendanceDatePoi();
// if (month != startMonth)
// startDay = 1;
// if (month == endMonth && year == endYear)
// actualMaximum = endDay;
// datePoi.setMonth(sdfMS.format(calendar.getTime()));
// calendar.set(Calendar.DAY_OF_MONTH, startDay);
// datePoi.setStartDate(calendar.getTime());
// calendar.set(Calendar.DAY_OF_MONTH, actualMaximum);
// datePoi.setEndDate(calendar.getTime());
// datePois.add(datePoi);
// }
// }
// } catch (ParseException e) {
// e.printStackTrace();
// }
// return datePois;
// }
//
// //获取 单位id集合
// public List<Long> getDepaList(Long department) {
// List<Long> depaList = new ArrayList<>();
// List<Dept> depts = deptMapper.selectChildrenDeptById(department);
// if (depts == null || depts.size() == 0) {
// depaList.add(department);
// } else {
// for (Dept dept : depts) {
// List<Long> todepaList = getDepaList(dept.getDeptId());
// depaList.addAll(todepaList);
// }
// }
// return depaList;
// }
//}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesNoticeServiceImpl.java
View file @
118b24bb
...
@@ -94,6 +94,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
...
@@ -94,6 +94,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
return
teacherFilesNoticeMapper
.
selectTeacherFilesNoticeList
(
teacherFilesNotice
);
return
teacherFilesNoticeMapper
.
selectTeacherFilesNoticeList
(
teacherFilesNotice
);
}
}
/**
/**
* 新增教师档案通知
* 新增教师档案通知
*
*
...
@@ -355,14 +356,16 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
...
@@ -355,14 +356,16 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
/**
/**
* 删除教师档案通知信息
* 删除教师档案通知信息
*
*
* @param id 教室档案通知主键
* @param id
s
教室档案通知主键
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
deleteTeacherFilesNoticeById
(
String
id
)
public
int
deleteTeacherFilesNoticeById
(
String
[]
ids
)
{
{
int
i
=
teacherFilesNoticeMapper
.
deleteTeacherFilesNoticeById
(
id
);
int
i
=
teacherFilesNoticeMapper
.
deleteTeacherFilesNoticeByIds
(
ids
);
teacherFilesMapper
.
deleteTeacherFilesByNoticeId
(
id
);
for
(
String
id
:
ids
){
teacherFilesMapper
.
deleteTeacherFilesByNoticeId
(
id
);
}
return
i
;
return
i
;
}
}
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesServiceImpl.java
View file @
118b24bb
...
@@ -180,4 +180,9 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
...
@@ -180,4 +180,9 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
}
}
return
1
;
return
1
;
}
}
@Override
public
List
<
Long
>
getGradeId
(
Long
teacherId
)
{
return
teacherFilesMapper
.
getGradeId
(
teacherId
);
}
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/teacherFiles/ITeacherFilesNoticeService.java
View file @
118b24bb
...
@@ -29,6 +29,7 @@ public interface ITeacherFilesNoticeService
...
@@ -29,6 +29,7 @@ public interface ITeacherFilesNoticeService
*/
*/
public
List
<
TeacherFilesNoticeTotal
>
selectTeacherFilesNoticeList
(
TeacherFilesNotice
teacherFilesNotice
);
public
List
<
TeacherFilesNoticeTotal
>
selectTeacherFilesNoticeList
(
TeacherFilesNotice
teacherFilesNotice
);
/**
/**
* 新增教室档案通知
* 新增教室档案通知
*
*
...
@@ -65,5 +66,5 @@ public interface ITeacherFilesNoticeService
...
@@ -65,5 +66,5 @@ public interface ITeacherFilesNoticeService
* @param id 教室档案通知主键
* @param id 教室档案通知主键
* @return 结果
* @return 结果
*/
*/
public
int
deleteTeacherFilesNoticeById
(
String
id
);
public
int
deleteTeacherFilesNoticeById
(
String
[]
id
);
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/teacherFiles/ITeacherFilesService.java
View file @
118b24bb
...
@@ -65,4 +65,6 @@ public interface ITeacherFilesService
...
@@ -65,4 +65,6 @@ public interface ITeacherFilesService
public
int
synchronous
(
Long
id
);
public
int
synchronous
(
Long
id
);
public
List
<
Long
>
getGradeId
(
Long
TeacherId
);
}
}
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesMapper.xml
View file @
118b24bb
...
@@ -175,4 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -175,4 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
#{id}
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"getGradeId"
parameterType=
"Long"
resultType=
"Long"
>
SELECT grade_id FROM `school_grade_mentor` where teacher_id = #{teacherId} GROUP BY grade_id
</select>
</mapper>
</mapper>
\ No newline at end of file
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesNoticeMapper.xml
View file @
118b24bb
...
@@ -43,7 +43,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -43,7 +43,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"endTime != null "
>
and end_time = #{endTime}
</if>
<if
test=
"endTime != null "
>
and end_time = #{endTime}
</if>
</where>
</where>
</select>
</select>
<select
id=
"selectTeacherFilesNoticeListByUser"
parameterType=
"TeacherFilesNotice"
resultType=
"TeacherFilesNoticeTotal"
>
<include
refid=
"selectTeacherFilesNoticeTotalVo"
/>
<where>
<if
test=
"noticeRange != null and noticeRange != ''"
>
and notice_range = #{noticeRange}
</if>
<if
test=
"noticeYear != null and noticeYear != ''"
>
and notice_year = #{noticeYear}
</if>
<if
test=
"noticeSemester != null and noticeSemester != ''"
>
and notice_semester = #{noticeSemester}
</if>
<if
test=
"noticeName != null and noticeName != ''"
>
and notice_name like concat('%', #{noticeName}, '%')
</if>
<if
test=
"noticeState != null and noticeState != ''"
>
and notice_state = #{noticeState}
</if>
<if
test=
"startTime != null "
>
and start_time = #{startTime}
</if>
<if
test=
"endTime != null "
>
and end_time = #{endTime}
</if>
<if
test=
"teacherId != null and teacherId != '' "
>
and id in (SELECT notice_id FROM `teacher_files` where teacher_id =#{teacherId})
</if>
and notice_state != 1
</where>
</select>
<select
id=
"selectTeacherFilesNoticeById"
parameterType=
"String"
resultMap=
"TeacherFilesNoticeResult"
>
<select
id=
"selectTeacherFilesNoticeById"
parameterType=
"String"
resultMap=
"TeacherFilesNoticeResult"
>
<include
refid=
"selectTeacherFilesNoticeVo"
/>
<include
refid=
"selectTeacherFilesNoticeVo"
/>
where id = #{id}
where id = #{id}
...
@@ -120,4 +135,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -120,4 +135,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTeacherByClass"
parameterType=
"Long"
resultType=
"SchoolGradeByClassVo"
>
<select
id=
"selectTeacherByClass"
parameterType=
"Long"
resultType=
"SchoolGradeByClassVo"
>
select teacher_id,course_name from school_class_mentor where class_id = #{classId} and del_flag = '0'
select teacher_id,course_name from school_class_mentor where class_id = #{classId} and del_flag = '0'
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment