修改班级园历部分功能
This commit is contained in:
		| @@ -50,9 +50,22 @@ public class BySchoolcalendarClassController extends BaseController | ||||
|     { | ||||
|         startPage(); | ||||
|         List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass); | ||||
|         System.out.println("---------------------分页"+list); | ||||
|         return getDataTable(list); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 不分页查询园历管理(班级)列表 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')") | ||||
|     @GetMapping("/listAll") | ||||
|     public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass) | ||||
|     { | ||||
|         List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass); | ||||
|         System.out.println("---------------------没有分页"+listAll); | ||||
|         return getDataTable(listAll); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 导出园历管理(班级)列表 | ||||
|      */ | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| package com.ruoyi.project.benyi.domain; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonFormat; | ||||
| import com.ruoyi.project.system.domain.ByClass; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel; | ||||
| @@ -53,6 +54,8 @@ public class BySchoolcalendarClass extends BaseEntity | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||||
|     private Date createtime; | ||||
|  | ||||
|     private ByClass byClass; | ||||
|  | ||||
|  | ||||
|  | ||||
|     public void setId(Long id)  | ||||
| @@ -142,6 +145,7 @@ public class BySchoolcalendarClass extends BaseEntity | ||||
|             .append("activitytime", getActivitytime()) | ||||
|             .append("createuserid", getCreateuserid()) | ||||
|             .append("createtime", getCreatetime()) | ||||
|             .append("byClass", getByClass()) | ||||
|             .toString(); | ||||
|     } | ||||
|  | ||||
| @@ -152,4 +156,12 @@ public class BySchoolcalendarClass extends BaseEntity | ||||
|     public void setCreatetime(Date createtime) { | ||||
|         this.createtime = createtime; | ||||
|     } | ||||
|  | ||||
|     public ByClass getByClass() { | ||||
|         return byClass; | ||||
|     } | ||||
|  | ||||
|     public void setByClass(ByClass byClass) { | ||||
|         this.byClass = byClass; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -95,13 +95,18 @@ public class SchoolCommon { | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 判断当前用户是否拥有班级 | ||||
|      **/ | ||||
|     public String getClassId() { | ||||
|         SysUser sysUser = getUser(); | ||||
|         ByClass byClass = new ByClass(); | ||||
|         byClass.setZbjs(sysUser.getUserId()); | ||||
|         byClass.setPbjs(sysUser.getUserId()); | ||||
|         byClass.setZljs(sysUser.getUserId()); | ||||
|         //新的返回byclass1返回整条数据 | ||||
|         ByClass byClass1 = byClassService.selectByClassByUserId(byClass); | ||||
|         System.out.println("--------------------"+ byClass1); | ||||
|         if(byClass1 != null) { | ||||
|             return byClass1.getBjbh(); | ||||
|         } else { | ||||
|   | ||||
| @@ -58,6 +58,7 @@ public class ByTeacherJbxxController extends BaseController | ||||
|     public TableDataInfo list2(ByTeacherJbxx byTeacherJbxx) | ||||
|     { | ||||
|         List<ByTeacherJbxx> list2 = byTeacherJbxxService.selectByTeacherJbxxList(byTeacherJbxx); | ||||
|         System.out.println("-------------------"+list2); | ||||
|         return getDataTable(list2); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -14,23 +14,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|         <result property="activitytime"    column="activitytime"    /> | ||||
|         <result property="createuserid"    column="createuserid"    /> | ||||
|         <result property="createtime"    column="createtime"    /> | ||||
|         <association property="byClass"    column="bjbh" javaType="ByClass" resultMap="ByClassResult" /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <resultMap type="ByClass" id="ByClassResult"> | ||||
|         <result property="bjbh" column="bjbh"/> | ||||
|         <result property="deptId" column="dept_id"/> | ||||
|         <result property="bjtype" column="bjtype"/> | ||||
|         <result property="bhxh" column="bhxh"/> | ||||
|         <result property="xn" column="xn"/> | ||||
|         <result property="bjmc" column="bjmc"/> | ||||
|         <result property="bjrych" column="bjrych"/> | ||||
|         <result property="jbny" column="jbny"/> | ||||
|         <result property="zbjs" column="zbjs"/> | ||||
|         <result property="zbjsxm" column="zbjsxm"/> | ||||
|         <result property="pbjs" column="pbjs"/> | ||||
|         <result property="pbjsxm" column="pbjsxm"/> | ||||
|         <result property="zljs" column="zljs"/> | ||||
|         <result property="zljsxm" column="zljsxm"/> | ||||
|         <result property="isdel" column="isdel"/> | ||||
|         <result property="createtime" column="createtime"/> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectBySchoolcalendarClassVo"> | ||||
|         select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime from by_schoolcalendar_class | ||||
|         select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime | ||||
|         from by_schoolcalendar_class | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult"> | ||||
|         <include refid="selectBySchoolcalendarClassVo"/> | ||||
|         <where>   | ||||
|             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if> | ||||
|             <if test="type != null  and type != ''"> and type = #{type}</if> | ||||
|             <if test="classid != null  and classid != ''"> and classid = #{classid}</if> | ||||
|             <if test="xnxq != null  and xnxq != ''"> and xnxq = #{xnxq}</if> | ||||
|             <if test="deptid != null "> and deptId = #{deptid}</if> | ||||
|             <if test="activitytime != null "> and activitytime = #{activitytime}</if> | ||||
|             <if test="createuserid != null "> and createuserid = #{createuserid}</if> | ||||
|             <if test="createtime != null "> and createtime = #{createtime}</if> | ||||
|         select sc.id, sc.name, sc.type, sc.classid, sc.xnxq, sc.deptId, sc.activitytime, sc.createuserid, sc.createtime, | ||||
|         c.bjbh, c.bjmc | ||||
|         from by_schoolcalendar_class sc | ||||
|         left join by_class c on sc.classid = c.bjbh | ||||
|         <where> | ||||
|             sc.classid = c.bjbh | ||||
|             <if test="name != null  and name != ''"> and sc.name like concat('%', #{name}, '%')</if> | ||||
|             <if test="type != null  and type != ''"> and sc.type = #{type}</if> | ||||
|             <if test="classid != null  and classid != ''"> and sc.classid = #{classid}</if> | ||||
|             <if test="xnxq != null  and xnxq != ''"> and sc.xnxq = #{xnxq}</if> | ||||
|             <if test="deptid != null "> and sc.deptId = #{deptid}</if> | ||||
|             <if test="activitytime != null "> and sc.activitytime = #{activitytime}</if> | ||||
|             <if test="createuserid != null "> and sc.createuserid = #{createuserid}</if> | ||||
|             <if test="createtime != null "> and sc.createtime = #{createtime}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|   | ||||
| @@ -63,9 +63,9 @@ | ||||
|     <select id="selectByClassByUserId" parameterType="ByClass" resultMap="ByClassResult"> | ||||
|         <include refid="selectByClassVo"/> | ||||
|         <where> | ||||
|             <if test="zbjs != null ">and zbjs = #{zbjs}</if> | ||||
|             <if test="pbjs != null ">and pbjs = #{pbjs}</if> | ||||
|             <if test="zljs != null ">and zljs = #{zljs}</if> | ||||
|             <if test="zbjs != null ">or zbjs = #{zbjs}</if> | ||||
|             <if test="pbjs != null ">or pbjs = #{pbjs}</if> | ||||
|             <if test="zljs != null ">or zljs = #{zljs}</if> | ||||
|         </where> | ||||
|         <!-- 数据范围过滤 --> | ||||
|         ${dataScope} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user