Browse Source

Merge remote-tracking branch 'origin/master' into ywx

tags/正式3.2.0
雍文秀 2 years ago
parent
commit
c592b95ff4

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/mapper/xz/XzMapper.java View File

48
 
48
 
49
     //根据课节id获取行政直播详情
49
     //根据课节id获取行政直播详情
50
     LXz getXzByXzkjid(@Param("kjid") Integer kjid);
50
     LXz getXzByXzkjid(@Param("kjid") Integer kjid);
51
+
52
+    //修改课程表操作步骤
53
+    void updateCurstepByXzid(@Param("curstep") Integer curstep,@Param("xzid") Integer xzid);
51
 }
54
 }

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/model/xz/LXz.java View File

41
     //是否删除1正常10已删除
41
     //是否删除1正常10已删除
42
     private Integer deleted;
42
     private Integer deleted;
43
 
43
 
44
+    //当前步骤:1基础信息2课程表3设置完成
45
+    private Integer curstep;
46
+
44
     //创建人
47
     //创建人
45
     private Integer createid;
48
     private Integer createid;
46
 
49
 

+ 5
- 0
slive/src/main/java/com/xhkjedu/slive/service/xz/XzService.java View File

92
             Integer timestamp = N_Utils.getSecondTimestamp();
92
             Integer timestamp = N_Utils.getSecondTimestamp();
93
             xz.setCreatetime(timestamp);
93
             xz.setCreatetime(timestamp);
94
             xz.setDeleted(1);
94
             xz.setDeleted(1);
95
+            xz.setCurstep(2);
95
             xzMapper.insertUseGeneratedKeys(xz);//保存行政直播信息
96
             xzMapper.insertUseGeneratedKeys(xz);//保存行政直播信息
96
             Integer xzid = xz.getId();
97
             Integer xzid = xz.getId();
97
             //保存对应的课节信息
98
             //保存对应的课节信息
243
                         }
244
                         }
244
                     }
245
                     }
245
                 }
246
                 }
247
+
248
+                //保存完课程表之后修改当前步骤
249
+                xzMapper.updateCurstepByXzid(3,xz.getXzid());
250
+
246
                 return new ResultVo(0, "保存行政直播课程表成功");
251
                 return new ResultVo(0, "保存行政直播课程表成功");
247
             }
252
             }
248
         } catch (Exception e) {
253
         } catch (Exception e) {

+ 5
- 0
slive/src/main/resources/mapper/xz/XzMapper.xml View File

93
     <select id="getXzByXzkjid" resultType="com.xhkjedu.slive.model.xz.LXz">
93
     <select id="getXzByXzkjid" resultType="com.xhkjedu.slive.model.xz.LXz">
94
         select x.* from l_xz x left join l_xz_kj k on x.xzid=k.xzid where kjid=#{kjid} group by xzid
94
         select x.* from l_xz x left join l_xz_kj k on x.xzid=k.xzid where kjid=#{kjid} group by xzid
95
     </select>
95
     </select>
96
+
97
+    <!--修改课程表操作步骤-->
98
+    <update id="updateCurstepByXzid">
99
+        update l_xz set curstep=#{curstep} where xzid=#{xzid}
100
+    </update>
96
 </mapper>
101
 </mapper>

+ 0
- 20
suser/src/main/java/com/xhkjedu/suser/controller/gradeclass/ClassStudentController.java View File

100
         }
100
         }
101
     }
101
     }
102
 
102
 
103
-    @PostMapping("/list_live")
104
-    public ResultVo listStudentForliveclass(@RequestBody TClassStudent tClassStudent) {
105
-        Integer classid = tClassStudent.getClassid();
106
-        N_Utils.validation(new Object[]{classid, "班级id", 1,tClassStudent.getSchoolid(),"学校id",1});
107
-        Integer page = tClassStudent.getPage();
108
-        Integer year = classStudentService.getSchoolyear(tClassStudent.getSchoolid());
109
-        tClassStudent.setYear(year);
110
-        if (N_Utils.isEmptyInteger(page)) {
111
-            List<ClassStudentVo> list = classStudentService.listStudentForliveclass(tClassStudent);
112
-            return new ResultVo(0,"获取列表成功",list);
113
-        } else {
114
-            Integer pageSize = tClassStudent.getPageSize();
115
-            N_Utils.validation(new Object[]{pageSize, "显示条数", 1});
116
-            PageHelper.startPage(page, pageSize);
117
-            List<ClassStudentVo> list = classStudentService.listStudentForliveclass(tClassStudent);
118
-            PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
119
-            return new ResultVo(0, "获取列表成功", pageResult);
120
-        }
121
-    }
122
-
123
     @PostMapping("/import_user")
103
     @PostMapping("/import_user")
124
     public ResultVo importUser(MultipartFile file,TClassStudent tClassStudent) {
104
     public ResultVo importUser(MultipartFile file,TClassStudent tClassStudent) {
125
         return classStudentService.importUser(file, tClassStudent);
105
         return classStudentService.importUser(file, tClassStudent);

+ 0
- 3
suser/src/main/java/com/xhkjedu/suser/mapper/gradeclass/ClassStudentMapper.java View File

49
 
49
 
50
     //获取学生所有提高班
50
     //获取学生所有提高班
51
     List<Integer> listTgClassid(Integer studentid);
51
     List<Integer> listTgClassid(Integer studentid);
52
-
53
-    //直播班中班级学生集合
54
-    List<ClassStudentVo> listStudentForliveclass(@Param("student") TClassStudent student);
55
 }
52
 }

+ 0
- 20
suser/src/main/java/com/xhkjedu/suser/service/gradeclass/ClassStudentService.java View File

236
         return classStudentMapper.findAll(student);
236
         return classStudentMapper.findAll(student);
237
     }
237
     }
238
 
238
 
239
-    public Integer getSchoolyear(Integer schoolid){
240
-        return schoolMapper.getYearById(schoolid);
241
-    }
242
-
243
-    //直播班中班级集合
244
-    public List<ClassStudentVo> listStudentForliveclass(TClassStudent student) {
245
-        setOrderField(student);
246
-        List<ClassStudentVo> rtnlst = classStudentMapper.listStudentForliveclass(student);
247
-        for (int i=0;i<rtnlst.size();i++){
248
-            ClassStudentVo cs = rtnlst.get(i);
249
-            String classname = cs.getClassname();
250
-            if (N_Utils.isNotEmpty(classname)) {
251
-                String[] gid_cname = classname.split("_");
252
-                cs.setGradeid(N_Utils.str2Int(gid_cname[0]));
253
-                cs.setClassname(gid_cname[1]);
254
-            }
255
-        }
256
-        return rtnlst;
257
-    }
258
-
259
     //班级学生导入
239
     //班级学生导入
260
     @Transactional(rollbackFor = Exception.class)
240
     @Transactional(rollbackFor = Exception.class)
261
     public ResultVo importUser(MultipartFile file, TClassStudent tClassStudent) {
241
     public ResultVo importUser(MultipartFile file, TClassStudent tClassStudent) {

+ 0
- 18
suser/src/main/resources/mapper/gradeclass/ClassStudentMapper.xml View File

117
         LEFT JOIN t_school s ON c.schoolid=s.schoolid
117
         LEFT JOIN t_school s ON c.schoolid=s.schoolid
118
         WHERE cs.studentid=#{studentid} AND c.year=s.year AND c.classtype=2
118
         WHERE cs.studentid=#{studentid} AND c.year=s.year AND c.classtype=2
119
     </select>
119
     </select>
120
-
121
-    <!--直播班中学生信息-->
122
-    <select id="listStudentForliveclass" resultType="com.xhkjedu.suser.vo.gradeclass.ClassStudentVo">
123
-        select distinct cs.csid,cs.classid,u.username studentname,u.studentno,u.usersex,u.userid studentid,u.loginname,cs.createtime
124
-        ,u.bindmac,u.mac,u.headpic,u.userphone,u.usertime,
125
-        (select concat(c2.gradeid,'_',c2.classname) from t_class_student cs2 left join t_class c2 on cs2.classid=c2.classid
126
-        where cs2.studentid=cs.studentid and c2.classtype=1 and c2.classstate=1 and c2.year=#{student.year} order by c2.classid desc limit 1)classname
127
-        from t_class_student cs left join t_user u on cs.studentid = u.userid
128
-        left join t_class c on cs.classid=c.classid
129
-        where cs.classid=#{student.classid}
130
-        <if test="student.studentname!=null and student.studentname!=''">
131
-            and (u.username like '%${student.studentname}%' or u.studentno like '%${student.studentname}%'
132
-            or u.loginname like '%${student.studentname}%' or u.userphone like '%${student.studentname}%')
133
-        </if>
134
-        <if test="student.fieldname!=null and student.fieldname!=''">
135
-            order by ${student.fieldname} ${student.fieldorder},cs.csid desc
136
-        </if>
137
-    </select>
138
 </mapper>
120
 </mapper>

Loading…
Cancel
Save