Commit 118b24bb by 朱莹

教师档案管理

parent e40141d4
......@@ -37,6 +37,24 @@ public class TeacherFilesController extends BaseController
public TableDataInfo list(TeacherFiles teacherFiles)
{
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);
return getDataTable(list);
}
......
......@@ -41,6 +41,7 @@ public class TeacherFilesNoticeController extends BaseController
return getDataTable(list);
}
/**
* 导出教师档案通知列表
*/
......@@ -115,10 +116,10 @@ public class TeacherFilesNoticeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:remove')")
@Log(title = "教师档案通知", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable("id") String id)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable("ids") String[] ids)
{
return toAjax(teacherFilesNoticeService.deleteTeacherFilesNoticeById(id));
return toAjax(teacherFilesNoticeService.deleteTeacherFilesNoticeById(ids));
}
}
......@@ -102,6 +102,16 @@ public class TeacherFiles extends BaseEntity
@Excel(name = "状态 (1未发布 2已发布 3已填写 4已提交 5已确认 9驳回)" )
private String state;
private Long gradeTeacherId;
public Long getGradeTeacherId() {
return gradeTeacherId;
}
public void setGradeTeacherId(Long gradeTeacherId) {
this.gradeTeacherId = gradeTeacherId;
}
public void setId(Long id)
{
this.id = id;
......
......@@ -60,5 +60,7 @@ public class TeacherFilesNotice extends BaseEntity
*/
private String state;
private String teacherId;
}
......@@ -73,4 +73,6 @@ public interface TeacherFilesMapper
public int deleteTeacherFilesByNoticeId(String noticeId);
public List<Long> getGradeId(Long teacherId);
}
......@@ -94,6 +94,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
return teacherFilesNoticeMapper.selectTeacherFilesNoticeList(teacherFilesNotice);
}
/**
* 新增教师档案通知
*
......@@ -355,14 +356,16 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
/**
* 删除教师档案通知信息
*
* @param id 教室档案通知主键
* @param ids 教室档案通知主键
* @return 结果
*/
@Override
public int deleteTeacherFilesNoticeById(String id)
public int deleteTeacherFilesNoticeById(String[] ids)
{
int i = teacherFilesNoticeMapper.deleteTeacherFilesNoticeById(id);
teacherFilesMapper.deleteTeacherFilesByNoticeId(id);
int i = teacherFilesNoticeMapper.deleteTeacherFilesNoticeByIds(ids);
for(String id :ids){
teacherFilesMapper.deleteTeacherFilesByNoticeId(id);
}
return i;
}
}
......@@ -180,4 +180,9 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
}
return 1;
}
@Override
public List<Long> getGradeId(Long teacherId) {
return teacherFilesMapper.getGradeId(teacherId);
}
}
......@@ -29,6 +29,7 @@ public interface ITeacherFilesNoticeService
*/
public List<TeacherFilesNoticeTotal> selectTeacherFilesNoticeList(TeacherFilesNotice teacherFilesNotice);
/**
* 新增教室档案通知
*
......@@ -65,5 +66,5 @@ public interface ITeacherFilesNoticeService
* @param id 教室档案通知主键
* @return 结果
*/
public int deleteTeacherFilesNoticeById(String id);
public int deleteTeacherFilesNoticeById(String[] id);
}
......@@ -65,4 +65,6 @@ public interface ITeacherFilesService
public int synchronous(Long id);
public List<Long> getGradeId(Long TeacherId);
}
......@@ -175,4 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</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>
\ No newline at end of file
......@@ -43,7 +43,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null "> and end_time = #{endTime}</if>
</where>
</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">
<include refid="selectTeacherFilesNoticeVo"/>
where id = #{id}
......@@ -120,4 +135,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
</mapper>
\ No newline at end of file
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