Commit c2538ae7 by xuwenhao

返回教师档案已发布,已确认数量

parent 34770ed2
......@@ -27,7 +27,7 @@ import java.util.List;
/**
* 社团风采Controller
*
*
* @author liul
* @date 2023-09-06
*/
......@@ -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;
}
/**
......
......@@ -8,15 +8,15 @@ import java.util.Map;
/**
* 教师档案Mapper接口
*
*
* @author ruoyi
* @date 2023-09-06
*/
public interface TeacherFilesMapper
public interface TeacherFilesMapper
{
/**
* 查询教师档案
*
*
* @param id 教师档案主键
* @return 教师档案
*/
......@@ -24,15 +24,31 @@ public interface TeacherFilesMapper
/**
* 查询教师档案列表
*
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public List<TeacherFiles> selectTeacherFilesList(TeacherFiles teacherFiles);
/**
* 统计已发布
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public int countYfb(TeacherFiles teacherFiles);
/**
* 统计已确认
*
* @param teacherFiles 教师档案
* @return 教师档案集合
*/
public int countYqr(TeacherFiles teacherFiles);
/**
* 新增教师档案
*
*
* @param teacherFiles 教师档案
* @return 结果
*/
......@@ -40,7 +56,7 @@ public interface TeacherFilesMapper
/**
* 修改教师档案
*
*
* @param teacherFiles 教师档案
* @return 结果
*/
......@@ -57,7 +73,7 @@ public interface TeacherFilesMapper
/**
* 删除教师档案
*
*
* @param id 教师档案主键
* @return 结果
*/
......@@ -65,7 +81,7 @@ public interface TeacherFilesMapper
/**
* 批量删除教师档案
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
......
......@@ -27,7 +27,7 @@ import java.util.*;
/**
* 教师档案Service业务层处理
*
*
* @author ruoyi
* @date 2023-09-06
*/
......@@ -66,7 +66,7 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
private SchoolClassMentorMapper classMentorMapper;
/**
* 查询教师档案
*
*
* @param id 教师档案主键
* @return 教师档案
*/
......@@ -83,7 +83,7 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
/**
* 查询教师档案列表
*
*
* @param teacherFiles 教师档案
* @return 教师档案
*/
......@@ -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) {
......@@ -101,7 +121,7 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
/**
* 新增教师档案
*
*
* @param teacherFiles 教师档案
* @return 结果
*/
......@@ -113,7 +133,7 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
/**
* 修改教师档案
*
*
* @param teacherFiles 教师档案
* @return 结果
*/
......@@ -125,7 +145,7 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
/**
* 批量删除教师档案
*
*
* @param ids 需要删除的教师档案主键
* @return 结果
*/
......@@ -221,7 +241,7 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
/**
* 删除教师档案信息
*
*
* @param id 教师档案主键
* @return 结果
*/
......
......@@ -9,15 +9,15 @@ import java.util.List;
/**
* 教师档案Service接口
*
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ITeacherFilesService
public interface ITeacherFilesService
{
/**
* 查询教师档案
*
*
* @param id 教师档案主键
* @return 教师档案
*/
......@@ -25,11 +25,26 @@ public interface ITeacherFilesService
/**
* 查询教师档案列表
*
*
* @param teacherFiles 教师档案
* @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);
......@@ -42,7 +57,7 @@ public interface ITeacherFilesService
/**
* 新增教师档案
*
*
* @param teacherFiles 教师档案
* @return 结果
*/
......@@ -50,7 +65,7 @@ public interface ITeacherFilesService
/**
* 修改教师档案
*
*
* @param teacherFiles 教师档案
* @return 结果
*/
......@@ -58,7 +73,7 @@ public interface ITeacherFilesService
/**
* 批量删除教师档案
*
*
* @param ids 需要删除的教师档案主键集合
* @return 结果
*/
......@@ -66,7 +81,7 @@ public interface ITeacherFilesService
/**
* 删除教师档案信息
*
*
* @param id 教师档案主键
* @return 结果
*/
......
......@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.teacherFiles.TeacherFilesMapper">
<resultMap type="TeacherFiles" id="TeacherFilesResult">
<result property="id" column="id" />
<result property="noticeId" column="notice_id" />
......@@ -35,7 +35,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTeacherFilesList" parameterType="TeacherFiles" resultMap="TeacherFilesResult">
<include refid="selectTeacherFilesVo"/>
<where>
<where>
<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="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>
......@@ -59,12 +87,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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}
</select>
<insert id="insertTeacherFiles" parameterType="TeacherFiles" useGeneratedKeys="true" keyProperty="id">
insert into teacher_files
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -170,7 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTeacherFilesByIds" parameterType="String">
delete from teacher_files where id in
delete from teacher_files where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
......@@ -179,4 +235,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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
</mapper>
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