ソースを参照

Merge branch 'master' of http://49.234.186.218:9000/root/ieplus

# Conflicts:
#	back-ui/src/views/dz/teacher/index.vue
#	ie-system/src/main/resources/mapper/dz/DzTeacherMapper.xml
jinxia.mo 1 ヶ月 前
コミット
2d9309b1ce

+ 12 - 1
back-ui/src/views/dz/teacher/index.vue

@@ -169,6 +169,9 @@
               <el-form-item label="教师姓名" prop="name">
                   <el-input v-model="formTeacherClass.name" placeholder="请输入教师姓名" disabled/>
               </el-form-item>
+              <el-form-item label="学校校区" prop="name">
+                  <el-input v-model="formTeacherClass.schoolName" placeholder="请输入教师姓名" disabled/>
+              </el-form-item>
               <el-form-item label="关联班级" prop="classIds">
                   <el-select v-model="formTeacherClass.classIds" multiple placeholder="请选择班级" style="width: 100%">
                       <el-option
@@ -196,6 +199,7 @@ import { listAllSchool } from "@/api/dz/school"
 import {listCampus} from "@/api/dz/campus"
 import { listAllClass } from "@/api/dz/classes"
 import { batchBindTeacherClass,listAllTeacherClass } from "@/api/dz/teacherclass"
+import {getCampusSchoolList} from "@/api/dz/cards.js";
 
 const { proxy } = getCurrentInstance()
 
@@ -218,6 +222,7 @@ const data = reactive({
   form: {},
   formTeacherClass: {
       teacherId: null,
+      schoolName: null,
       name: null,
       classIds: []
   },
@@ -253,7 +258,10 @@ function getList() {
 
 /** 查询校区列表 */
 function getSchoolList() {
-  listAllSchool().then(response => {
+  getCampusSchoolList({
+    pageNum: 1,
+    pageSize: 9999,
+  }).then(response => {
     schoolOptions.value = response.data || []
   })
 }
@@ -264,6 +272,7 @@ function getCampusList() {
   })
 }
 
+
 // function getClassListBySchool() {
 //     listAll().then(response => {
 //         classOptions.value = response.data || []
@@ -299,6 +308,7 @@ function cancelTeacherClass() {
 function resetTeacherClass() {
     formTeacherClass.value = {
         teacherId: null,
+        schoolName: null,
         classIds: [],
         name: null
     }
@@ -395,6 +405,7 @@ function handleUpdateTeacherClass(row) {
         // 然后设置数据
         formTeacherClass.value.teacherId = row.teacherId
         formTeacherClass.value.name = row.name
+        formTeacherClass.value.schoolName = row.schoolName
 
         listAllTeacherClass(submitData).then(response => {
             formTeacherClass.value.classIds = (response.data || []).map(item => item.classId)

+ 3 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzSchoolController.java

@@ -103,6 +103,9 @@ public class DzSchoolController extends BaseController
     @GetMapping("/getCampusSchoolList")
     public AjaxResult getCampusSchoolList(DzSchool dzSchool)
     {
+        if(null == dzSchool.getCampus() && !UserTypeEnum.isSys(SecurityUtils.getLoginUser().getUser().getUserType())) {
+            dzSchool.setCampus(true);
+        }
         List<DzSchool> list = dzSchoolService.selectDzSchoolList(dzSchool);
         return AjaxResult.success(list);
     }

+ 5 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzTeacherController.java

@@ -3,7 +3,9 @@ package com.ruoyi.web.controller.dz;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.dz.service.IDzTeacherClassService;
+import com.ruoyi.enums.UserTypeEnum;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -45,6 +47,9 @@ public class DzTeacherController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(DzTeacher dzTeacher)
     {
+        if(!UserTypeEnum.isSys(SecurityUtils.getLoginUser().getUser().getUserType())){
+            dzTeacher.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
+        }
         startPage();
         List<DzTeacher> list = dzTeacherService.selectDzTeacherList(dzTeacher);
         return getDataTable(list);

+ 2 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontSyVocationalController.java

@@ -49,6 +49,7 @@ public class FrontSyVocationalController extends BaseController {
 
     @GetMapping("getVocationalPosts")
     @ApiOperation("04 获取就业岗位")
+    @Anonymous
     public AjaxResult getVocationalPosts(@RequestParam(required = true) String code) {
         List<SyVocationalPost> vocationalPost = vocationalPostService.selectSyVocationalPostByVocationalCode(code);
         return AjaxResult.success(vocationalPost);
@@ -56,6 +57,7 @@ public class FrontSyVocationalController extends BaseController {
 
     @GetMapping("getVocationalOverview")
     @ApiOperation("03 获取职业概况")
+    @Anonymous
     public AjaxResult getVocationalOverview(@RequestParam String code) {
         SyVocationalOverview vocationalOverview = vocationalOverviewService.selectSyVocationalOverviewByCode(code);
         JSONArray marjorList = new JSONArray();

+ 0 - 2
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontUniversitiesController.java

@@ -60,7 +60,6 @@ public class FrontUniversitiesController extends BaseController {
 
     @GetMapping("filters")
     @ApiOperation("00 院校列表数据筛选项")
-    @Anonymous
     public AjaxResult filters() {
         String entranceType = ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title());
         JSONObject data = new JSONObject(true);
@@ -118,7 +117,6 @@ public class FrontUniversitiesController extends BaseController {
 
     @GetMapping("list")
     @ApiOperation("01 院校列表")
-    @Anonymous
     public TableDataInfo list(UniversitiesCondDTO cond, @ApiParam(value = "页数", example = "1") @RequestParam Integer pageNum,
                               @ApiParam(value = "页大小", example = "15") @RequestParam Integer pageSize) {
         String location = VistorContextHolder.getLocation();

+ 5 - 6
ie-system/src/main/resources/mapper/dz/DzTeacherMapper.xml

@@ -26,17 +26,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectDzTeacherList" parameterType="DzTeacher" resultMap="DzTeacherResult">
         <include refid="selectDzTeacherVo"/>
         <where>
-            <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="schoolId != null "> and school_id = #{schoolId}</if>
-            <if test="campusId != null "> and campus_id = #{campusId}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="userId != null "> and t1.user_id = #{userId}</if>
+            <if test="deptId != null "> and t1.dept_id = #{deptId}</if>
+            <if test="schoolId != null "> and t1.school_id = #{schoolId}</if>
+            <if test="name != null  and name != ''"> and t1.name like concat('%', #{name}, '%')</if>
         </where>
     </select>
 
     <select id="selectDzTeacherByTeacherId" parameterType="Long" resultMap="DzTeacherResult">
         <include refid="selectDzTeacherVo"/>
-        where teacher_id = #{teacherId}
+        where t1.teacher_id = #{teacherId}
     </select>
 
     <insert id="insertDzTeacher" parameterType="DzTeacher" useGeneratedKeys="true" keyProperty="teacherId">