Commit 485ed745 by Cat
parents 183cb522 c2538ae7
......@@ -71,15 +71,15 @@ public class SchoolOrganizationFcController extends BaseController
{
//先将file的前缀去掉
String file = schoolOrganizationFc.getFile();
if (file!=null){
String str ="";
String[] split = file.split(",");
for (int i = 0; i < split.length; i++) {
String substring = split[i].substring(8, split[i].length());
str = str+","+substring;
}
schoolOrganizationFc.setFile(str.substring(1, str.length()));
}
// if (file!=null){
// String str ="";
// String[] split = file.split(",");
// for (int i = 0; i < split.length; i++) {
// String substring = split[i].substring(8, split[i].length());
// str = str+","+substring;
// }
// schoolOrganizationFc.setFile(str.substring(1, str.length()));
// }
return toAjax(schoolOrganizationFcService.save(schoolOrganizationFc));
}
......
......@@ -38,26 +38,36 @@ 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)
public AjaxResult gradeList(TeacherFiles teacherFiles)
{
AjaxResult ajaxResult = new AjaxResult();
List<Long> gradeIds = teacherFilesService.getGradeId(teacherFiles.getGradeTeacherId());
if(gradeIds==null || gradeIds.size()==0){
TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setCode(500);
tableDataInfo.setMsg("该用户非级部主任");
return tableDataInfo;
// TableDataInfo tableDataInfo = new TableDataInfo();
// tableDataInfo.setCode(500);
// tableDataInfo.setMsg("该用户非级部主任");
ajaxResult.put("code",500);
ajaxResult.put("msg","该用户非级部主任");
return ajaxResult;
}
teacherFiles.setGradeId(gradeIds.get(0));
startPage();
List<TeacherFiles> list = teacherFilesService.selectTeacherFilesList(teacherFiles);
return getDataTable(list);
int yfb = teacherFilesService.countYfb(teacherFiles);
int yqr = teacherFilesService.countYqr(teacherFiles);
ajaxResult.put("code",200);
ajaxResult.put("msg","查询成功");
ajaxResult.put("rows",list);
ajaxResult.put("total",getDataTable(list).getTotal());
ajaxResult.put("yfb",yfb);
ajaxResult.put("yqr",yqr);
return ajaxResult;
}
/**
......
......@@ -31,6 +31,22 @@ public interface TeacherFilesMapper
public List<TeacherFiles> selectTeacherFilesList(TeacherFiles teacherFiles);
/**
* 统计已发布
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public int countYfb(TeacherFiles teacherFiles);
/**
* 统计已确认
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public int countYqr(TeacherFiles teacherFiles);
/**
* 新增教师档案
*
* @param teacherFiles 教师档案
......
......@@ -93,6 +93,26 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
return teacherFilesMapper.selectTeacherFilesList(teacherFiles);
}
/**
* 统计已发布
* @param teacherFiles 教师档案
* @return
*/
@Override
public int countYfb(TeacherFiles teacherFiles) {
return teacherFilesMapper.countYfb(teacherFiles);
}
/**
* 统计已确认
* @param teacherFiles 教师档案
* @return
*/
@Override
public int countYqr(TeacherFiles teacherFiles) {
return teacherFilesMapper.countYqr(teacherFiles);
}
@Override
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles) {
......
......@@ -30,6 +30,21 @@ public interface ITeacherFilesService
* @return 教师档案集合
*/
public List<TeacherFiles> selectTeacherFilesList(TeacherFiles teacherFiles);
/**
* 统计已发布
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public int countYfb(TeacherFiles teacherFiles);
/**
* 统计已确认
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public int countYqr(TeacherFiles teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles);
public List<TeacherFilesDeletRecord> getTeacherRocer(String tId);
......
......@@ -60,6 +60,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="countYfb" parameterType="TeacherFiles" resultType="Integer">
select count(id) from teacher_files
<where>
state = '2'
<if test="noticeId != null and noticeId != ''"> and notice_id = #{noticeId}</if>
<if test="filesSemester != null and filesSemester != ''"> and files_semester = #{filesSemester}</if>
<if test="teacherId != null "> and teacher_id = #{teacherId}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="gradeName != null and gradeName != ''"> and grade_name like concat('%', #{gradeName}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="age != null "> and age = #{age}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="education != null and education != ''"> and education = #{education}</if>
<if test="appearance != null and appearance != ''"> and appearance = #{appearance}</if>
<if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="bzrClassName != null and bzrClassName != ''"> and bzr_class_name like concat('%', #{bzrClassName}, '%')</if>
<if test="fbzrClassName != null and fbzrClassName != ''"> and fbzr_class_name like concat('%', #{fbzrClassName}, '%')</if>
<if test="isTeachingGroupLeader != null and isTeachingGroupLeader != ''"> and is_teaching_group_leader = #{isTeachingGroupLeader}</if>
<if test="isResearchGroupLeader != null and isResearchGroupLeader != ''"> and is_research_group_leader = #{isResearchGroupLeader}</if>
<if test="classHour != null "> and class_hour = #{classHour}</if>
<if test="classTeacherDetails != null and classTeacherDetails != ''"> and class_teacher_details = #{classTeacherDetails}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
</where>
</select>
<select id="countYqr" parameterType="TeacherFiles" resultType="Integer">
select count(id) from teacher_files
<where>
state = '5'
<if test="noticeId != null and noticeId != ''"> and notice_id = #{noticeId}</if>
<if test="filesSemester != null and filesSemester != ''"> and files_semester = #{filesSemester}</if>
<if test="teacherId != null "> and teacher_id = #{teacherId}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="gradeName != null and gradeName != ''"> and grade_name like concat('%', #{gradeName}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="age != null "> and age = #{age}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="education != null and education != ''"> and education = #{education}</if>
<if test="appearance != null and appearance != ''"> and appearance = #{appearance}</if>
<if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="bzrClassName != null and bzrClassName != ''"> and bzr_class_name like concat('%', #{bzrClassName}, '%')</if>
<if test="fbzrClassName != null and fbzrClassName != ''"> and fbzr_class_name like concat('%', #{fbzrClassName}, '%')</if>
<if test="isTeachingGroupLeader != null and isTeachingGroupLeader != ''"> and is_teaching_group_leader = #{isTeachingGroupLeader}</if>
<if test="isResearchGroupLeader != null and isResearchGroupLeader != ''"> and is_research_group_leader = #{isResearchGroupLeader}</if>
<if test="classHour != null "> and class_hour = #{classHour}</if>
<if test="classTeacherDetails != null and classTeacherDetails != ''"> and class_teacher_details = #{classTeacherDetails}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
</where>
</select>
<select id="selectTeacherFilesById" parameterType="Long" resultType="TeacherFilesVO">
<include refid="selectTeacherFilesVo"/>
where id = #{id}
......
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