Browse Source

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

month-red-love 1 tháng trước cách đây
mục cha
commit
ad7603e375

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

@@ -136,12 +136,13 @@ public class FrontUniversitiesController extends BaseController {
             cond.setFilterRank(null);
             cond.setOrderBy(StringUtils.isNotBlank(cond.getOrderBy()) ? cond.getOrderBy() : "code");
         }
-        cond.setEnrollLocation(location);
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        cond.setEnrollLocation(user.getLocation());
         startPage();
         List<BBusiWishUniversities> arr;
-        SysUser user = SecurityUtils.getLoginUser().getUser();
         Integer planYear = voluntaryService.getPlanYear(user);
         if(Constant.EXAM_TYPE_ZG.equals(user.getExamType())) {
+            //职高对口
             arr = universitiesService.selectMajorWishUniversitiesListSimpleByMap2(cond.toCondMap(planYear, user.getExamType().title(), user.getSelectSubject(), user.getLocation())); // TODO MF
         } else {
             arr = universitiesService.selectMajorWishUniversitiesListSimpleByMap(cond.toCondMap(planYear, Constant.EXAM_TYPE_PG, null, user.getLocation()));

+ 7 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/learn/LearnTeacherController.java

@@ -96,6 +96,13 @@ public class LearnTeacherController extends BaseController {
         return AjaxResult.success(learnTeacherService.getClasses(getUserId()));
     }
 
+    @GetMapping("/students")
+    @ApiOperation("学生列表")
+    public AjaxResult students(@ApiParam("批次ID") Long batchId)
+    {
+        return AjaxResult.success(learnTeacherService.getStudents(batchId, getUserId()));
+    }
+
     @GetMapping("/universities")
     @ApiOperation("院校列表")
     public AjaxResult universities(@ApiParam("批次ID") Long batchId)

+ 3 - 0
ie-admin/src/main/java/com/ruoyi/web/service/CommService.java

@@ -53,6 +53,9 @@ public class CommService {
     }
 
     public void requireVip() {
+        if (true){
+            return;
+        }
         SysUser user = SecurityUtils.getLoginUser().getUser();
         if (!UserRegStatus.Student.equals(user.getRegStatus())) {
             throw new CustomException("没有权限,请开通VIP", 405);

+ 4 - 0
ie-admin/src/main/java/com/ruoyi/web/service/LearnTeacherService.java

@@ -62,6 +62,10 @@ public class LearnTeacherService {
         return dzClassesMapper.selectClassesForTeacher(teacherId);
     }
 
+    public List<LearnStudent> getStudents(Long batchId, Long classId) {
+        return learnStudentMapper.selectClassStudents(batchId, new Long[] {classId});
+    }
+
     public List<BBusiWishUniversities> selectUniversityList(Long teacherId, Long batchId) {
         return busiWishUniversitiesMapper.selectUniversityListForTeacher(teacherId, batchId);
     }

+ 51 - 0
ie-system/src/main/java/com/ruoyi/learn/domain/LearnStudent.java

@@ -30,10 +30,21 @@ public class LearnStudent extends BaseEntity
     @Excel(name = "院校id")
     private Long universityId;
 
+    @Excel(name = "定向键")
+    private String directKey;
+
+    @Excel(name = "专业组")
+    private String majorGroup;
+
     /** 计划专业id */
     @Excel(name = "计划专业id")
     private Long majorPlanId;
 
+
+    private String studentName;
+    private String paperId;
+    private Integer status;
+
     public Long getStudentId() {
         return studentId;
     }
@@ -50,6 +61,14 @@ public class LearnStudent extends BaseEntity
         this.classId = classId;
     }
 
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
     public Long getCampusId() {
         return campusId;
     }
@@ -66,6 +85,22 @@ public class LearnStudent extends BaseEntity
         this.universityId = universityId;
     }
 
+    public String getDirectKey() {
+        return directKey;
+    }
+
+    public void setDirectKey(String directKey) {
+        this.directKey = directKey;
+    }
+
+    public String getMajorGroup() {
+        return majorGroup;
+    }
+
+    public void setMajorGroup(String majorGroup) {
+        this.majorGroup = majorGroup;
+    }
+
     public Long getMajorPlanId() {
         return majorPlanId;
     }
@@ -73,4 +108,20 @@ public class LearnStudent extends BaseEntity
     public void setMajorPlanId(Long majorPlanId) {
         this.majorPlanId = majorPlanId;
     }
+
+    public String getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(String paperId) {
+        this.paperId = paperId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
 }

+ 3 - 0
ie-system/src/main/java/com/ruoyi/learn/mapper/LearnStudentMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.learn.domain.LearnStudent;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 学生Mapper接口
@@ -15,6 +16,8 @@ public interface LearnStudentMapper
 {
     public List<LearnStudent> selectLearnStudentsByMap(Map cond);
 
+    public List<LearnStudent> selectClassStudents(@Param("batchId") Long batchId, @Param("classIds") Long[] classIds);
+
     /**
      * 查询学生
      * 

+ 1 - 1
ie-system/src/main/java/com/ruoyi/syzy/service/impl/BBusiWishUniversitiesServiceImpl.java

@@ -158,7 +158,7 @@ public class BBusiWishUniversitiesServiceImpl implements IBBusiWishUniversitiesS
         String examTypeData = ConstantUtil.getExamTypeData(u.getExamType().title());
         cond.put("year", year);
         cond.put("collegeCode", code);
-        cond.put("examineeType", u.getExamType());
+        cond.put("examineeType", u.getExamType().title());
         cond.put("examType", examTypeData);
         cond.put("examMajor", u.getSelectSubject()); // TODO MF
         List<BBusiWishUniversitiesProfession> professionList = universitiesProfessionMapper.selectEnrollPlanProfessionByCode(cond);

+ 18 - 2
ie-system/src/main/resources/mapper/learn/LearnStudentMapper.xml

@@ -9,12 +9,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="classId"    column="class_id"    />
         <result property="campusId"    column="campus_id"    />
         <result property="universityId"    column="university_id"    />
+        <result property="directKey"    column="direct_key"    />
         <result property="majorGroup"    column="major_group"    />
         <result property="majorPlanId"    column="major_plan_id"    />
     </resultMap>
 
     <sql id="selectLearnStudentVo">
-        select student_id, class_id, campus_id, university_id, major_group,major_plan_id from learn_student
+        select student_id, class_id, campus_id, university_id,direct_key, major_group,major_plan_id from learn_student
     </sql>
 
     <select id="selectLearnStudentList" parameterType="LearnStudent" resultMap="LearnStudentResult">
@@ -37,7 +38,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planIds != null  and planIds.size() > 0"> AND ls.`major_plan_id` IN <foreach item="id" collection="planIds" open="(" separator="," close=")">#{id}</foreach></if>
         </where>
     </select>
-    
+
+    <select id="selectClassStudents" resultMap="LearnStudentResult">
+        SELECT ls.*, u.nick_name studentName , tp.`paper_id` paperId, ts.`status`
+        FROM `learn_student` ls
+        JOIN `sys_user` u ON ls.`student_id` = u.`user_id`
+        LEFT JOIN `learn_test_paper` tp ON tp.`batch_id` = #{batchId} AND tp.`direct_key` = ls.`direct_key`
+        LEFT JOIN `learn_test_student` ts ON ts.`batch_id` = #{batchId} AND ls.`student_id` = ts.`student_id`
+        where ts.`id` IS NULL AND ls.`class_id` IN <foreach item="id" collection="classIds" open="(" separator="," close=")">#{id}</foreach>
+    </select>
+
+
+
+
     <select id="selectLearnStudentByStudentId" parameterType="Long" resultMap="LearnStudentResult">
         <include refid="selectLearnStudentVo"/>
         where student_id = #{studentId}
@@ -50,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="classId != null">class_id,</if>
             <if test="campusId != null">campus_id,</if>
             <if test="universityId != null">university_id,</if>
+            <if test="directKey != null">direct_key,</if>
             <if test="majorGroup != null">major_group,</if>
             <if test="majorPlanId != null">major_plan_id,</if>
          </trim>
@@ -58,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="classId != null">#{classId},</if>
             <if test="campusId != null">#{campusId},</if>
             <if test="universityId != null">#{universityId},</if>
+            <if test="directKey != null">#{directKey},</if>
             <if test="majorGroup != null">#{majorGroup},</if>
             <if test="majorPlanId != null">#{majorPlanId},</if>
          </trim>
@@ -69,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="classId != null">class_id = #{classId},</if>
             <if test="campusId != null">campus_id = #{campusId},</if>
             <if test="universityId != null">university_id = #{universityId},</if>
+            <if test="directKey != null">direct_key = #{directKey},</if>
             <if test="majorGroup != null">major_group = #{majorGroup},</if>
             <if test="majorPlanId != null">major_plan_id = #{majorPlanId},</if>
         </trim>

+ 1 - 0
ie-system/src/main/resources/mapper/syzy/BBusiWishUniversitiesMapper.xml

@@ -156,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
       <if test="featureses!= null"> and <foreach item="o" collection="featureses" open="(" separator=" OR " close=")">u.features like concat('%', #{o}, '%')</foreach></if>
       <if test="bxTypes!= null"> and <foreach item="o" collection="bxTypes" open="(" separator=" OR " close=")">u.bxType like concat('%', #{o}, '%')</foreach></if>
       <if test="enrollLocations!= null"> and <foreach item="o" collection="enrollLocations" open="(" separator=" OR " close=")">u.enrollLocation like concat('%', #{o}, '%')</foreach></if>
+      <if test="locations!= null"> and <foreach item="o" collection="locations" open="(" separator=" OR " close=")">u.location like concat('%', #{o}, '%')</foreach></if>
       <if test="stars!= null"> and <foreach item="o" collection="stars" open="(" separator=" OR " close=")">u.star like concat('%', #{o}, '%')</foreach></if>
       <if test="filterRank!= null and filterRank"> and u.star &gt; 0 </if>
       <if test="codes!= null">