Commit 31923c82 by 朱莹

教师档案管理

parent 81280c6c
...@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; 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.TeacherFiles; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
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;
...@@ -108,4 +109,38 @@ public class TeacherFilesController extends BaseController ...@@ -108,4 +109,38 @@ public class TeacherFilesController extends BaseController
return toAjax(teacherFilesService.synchronous(id)); return toAjax(teacherFilesService.synchronous(id));
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案审核通过", businessType = BusinessType.UPDATE)
@PutMapping("/passThrough/{id}")
public AjaxResult passThrough(@PathVariable("id") Long id)
{
TeacherFiles teacherFiles = new TeacherFiles();
teacherFiles.setId(id);
teacherFiles.setState("5");
return toAjax(teacherFilesService.updateTeacherFiles(teacherFiles));
}
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案审核驳回", businessType = BusinessType.UPDATE)
@PutMapping("/reject/{id}")
public AjaxResult reject(@PathVariable("id") Long id)
{
TeacherFiles teacherFiles = new TeacherFiles();
teacherFiles.setId(id);
teacherFiles.setState("9");
return toAjax(teacherFilesService.updateTeacherFiles(teacherFiles));
}
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案提交", businessType = BusinessType.UPDATE)
@PutMapping("/submitTo/{id}")
public AjaxResult submitTo(@PathVariable("id") Long id)
{
TeacherFiles teacherFiles = new TeacherFiles();
teacherFiles.setId(id);
teacherFiles.setState("4");
return toAjax(teacherFilesService.updateTeacherFiles(teacherFiles));
}
} }
...@@ -87,45 +87,27 @@ public class TeacherFilesNoticeController extends BaseController ...@@ -87,45 +87,27 @@ public class TeacherFilesNoticeController extends BaseController
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案审核通过", businessType = BusinessType.UPDATE) @Log(title = "教师档案通知发布", businessType = BusinessType.UPDATE)
@PutMapping("/passThrough/{id}") @PutMapping("/release/{id}")
public AjaxResult passThrough(@PathVariable("id") String id) public AjaxResult release(@PathVariable("id") String id)
{
TeacherFilesNotice teacherFilesNotice = new TeacherFilesNotice();
teacherFilesNotice.setId(id);
teacherFilesNotice.setNoticeState("5");
return toAjax(teacherFilesNoticeService.updateTeacherFilesNotice(teacherFilesNotice));
}
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案审核驳回", businessType = BusinessType.UPDATE)
@PutMapping("/reject/{id}")
public AjaxResult reject(@PathVariable("id") String id)
{ {
TeacherFilesNotice teacherFilesNotice = new TeacherFilesNotice(); return toAjax(teacherFilesNoticeService.release(id));
teacherFilesNotice.setId(id);
teacherFilesNotice.setNoticeState("9");
return toAjax(teacherFilesNoticeService.updateTeacherFilesNotice(teacherFilesNotice));
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案提交", businessType = BusinessType.UPDATE) @Log(title = "教师档案通知撤回", businessType = BusinessType.UPDATE)
@PutMapping("/submitTo/{id}") @PutMapping("/withdraw/{id}")
public AjaxResult submitTo(@PathVariable("id") String id) public AjaxResult withdraw(@PathVariable("id") String id)
{ {
TeacherFilesNotice teacherFilesNotice = new TeacherFilesNotice(); return toAjax(teacherFilesNoticeService.withdraw(id));
teacherFilesNotice.setId(id);
teacherFilesNotice.setNoticeState("4");
return toAjax(teacherFilesNoticeService.updateTeacherFilesNotice(teacherFilesNotice));
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案通知发布", businessType = BusinessType.UPDATE) @Log(title = "教师档案通知完成", businessType = BusinessType.UPDATE)
@PutMapping("/release/{id}") @PutMapping("/complete/{id}")
public AjaxResult release(@PathVariable("id") String id) public AjaxResult complete(@PathVariable("id") String id)
{ {
return toAjax(teacherFilesNoticeService.release(id)); return toAjax(teacherFilesNoticeService.complete(id));
} }
/** /**
......
...@@ -4,6 +4,7 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles; ...@@ -4,6 +4,7 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
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;
/** /**
* 教师档案Mapper接口 * 教师档案Mapper接口
...@@ -47,6 +48,13 @@ public interface TeacherFilesMapper ...@@ -47,6 +48,13 @@ public interface TeacherFilesMapper
public int updateTeacherFilesState(String noticeId); public int updateTeacherFilesState(String noticeId);
public int updateTeacherFilesState1(String noticeId);
public int updateTeacherFilesState7(String noticeId);
public int updateTeacherFilesName(Map map);
/** /**
* 删除教师档案 * 删除教师档案
* *
...@@ -62,4 +70,7 @@ public interface TeacherFilesMapper ...@@ -62,4 +70,7 @@ public interface TeacherFilesMapper
* @return 结果 * @return 结果
*/ */
public int deleteTeacherFilesByIds(Long[] ids); public int deleteTeacherFilesByIds(Long[] ids);
public int deleteTeacherFilesByNoticeId(String noticeId);
} }
...@@ -201,7 +201,10 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService ...@@ -201,7 +201,10 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
teacherFilesNotice.setUpdateTime(DateUtils.getNowDate()); teacherFilesNotice.setUpdateTime(DateUtils.getNowDate());
teacherFilesNotice.setNoticeName(teacherFilesNotice.getNoticeYear()+"学年"+teacherFilesNotice.getNoticeSemester()+"教师档案填写"); teacherFilesNotice.setNoticeName(teacherFilesNotice.getNoticeYear()+"学年"+teacherFilesNotice.getNoticeSemester()+"教师档案填写");
int i = teacherFilesNoticeMapper.updateTeacherFilesNotice(teacherFilesNotice); int i = teacherFilesNoticeMapper.updateTeacherFilesNotice(teacherFilesNotice);
Map map = new HashMap();
map.put("noticeId",teacherFilesNotice.getId());
map.put("filesSemester",teacherFilesNotice.getNoticeYear()+"学年"+teacherFilesNotice.getNoticeSemester());
teacherFilesMapper.updateTeacherFilesName(map);
return i; return i;
} }
...@@ -210,11 +213,34 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService ...@@ -210,11 +213,34 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
TeacherFilesNotice teacherFilesNotice =new TeacherFilesNotice(); TeacherFilesNotice teacherFilesNotice =new TeacherFilesNotice();
teacherFilesNotice.setId(id); teacherFilesNotice.setId(id);
teacherFilesNotice.setUpdateTime(DateUtils.getNowDate()); teacherFilesNotice.setUpdateTime(DateUtils.getNowDate());
teacherFilesNotice.setNoticeState("2");
int i = teacherFilesMapper.updateTeacherFilesState(id); int i = teacherFilesMapper.updateTeacherFilesState(id);
teacherFilesNoticeMapper.updateTeacherFilesNotice(teacherFilesNotice); teacherFilesNoticeMapper.updateTeacherFilesNotice(teacherFilesNotice);
return i; return i;
} }
@Override
public int withdraw(String id) {
TeacherFilesNotice teacherFilesNotice =new TeacherFilesNotice();
teacherFilesNotice.setId(id);
teacherFilesNotice.setUpdateTime(DateUtils.getNowDate());
teacherFilesNotice.setNoticeState("1");
int i = teacherFilesMapper.updateTeacherFilesState1(id);
teacherFilesNoticeMapper.updateTeacherFilesNotice(teacherFilesNotice);
return i;
}
@Override
public int complete(String id) {
TeacherFilesNotice teacherFilesNotice =new TeacherFilesNotice();
teacherFilesNotice.setId(id);
teacherFilesNotice.setUpdateTime(DateUtils.getNowDate());
teacherFilesNotice.setNoticeState("7");
int i = teacherFilesMapper.updateTeacherFilesState7(id);
teacherFilesNoticeMapper.updateTeacherFilesNotice(teacherFilesNotice);
return i;
}
/** /**
* 批量删除教师档案通知 * 批量删除教师档案通知
* *
...@@ -237,7 +263,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService ...@@ -237,7 +263,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
public int deleteTeacherFilesNoticeById(String id) public int deleteTeacherFilesNoticeById(String id)
{ {
int i = teacherFilesNoticeMapper.deleteTeacherFilesNoticeById(id); int i = teacherFilesNoticeMapper.deleteTeacherFilesNoticeById(id);
teacherFilesMapper.deleteTeacherFilesByNoticeId(id);
return i; return i;
} }
} }
...@@ -47,6 +47,10 @@ public interface ITeacherFilesNoticeService ...@@ -47,6 +47,10 @@ public interface ITeacherFilesNoticeService
public int release(String id); public int release(String id);
public int withdraw(String id);
public int complete(String id);
/** /**
* 批量删除教师档案通知 * 批量删除教师档案通知
* *
......
...@@ -156,6 +156,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -156,6 +156,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update teacher_files set state = 1 where notice_id = #{noticeId} update teacher_files set state = 1 where notice_id = #{noticeId}
</update> </update>
<update id="updateTeacherFilesState7" parameterType="String">
update teacher_files set state = 7 where notice_id = #{noticeId}
</update>
<delete id="deleteTeacherFilesById" parameterType="Long"> <delete id="deleteTeacherFilesById" parameterType="Long">
delete from teacher_files where id = #{id} delete from teacher_files where id = #{id}
</delete> </delete>
......
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