Compare commits

..

61 Commits

Author SHA1 Message Date
liguoxu
2607f3ba10 事务测试恢复 2025-09-23 15:18:04 +08:00
liguoxu
4542d67983 事务测试 2025-09-22 19:29:25 +08:00
王卓煜
ce96b76c78 组织数据和员工数据导出 2025-09-01 14:34:36 +08:00
王卓煜
1369b5295d 修复考试成绩窗口查询不支持模糊查询 2025-09-01 11:17:00 +08:00
王卓煜
507aeadccf 修复问答管理的标题查询与实际不符 2025-08-21 14:19:56 +08:00
王卓煜
238dd6b7eb 修复新建文章,上传图片报错 2025-08-11 17:17:50 +08:00
王卓煜
7b5ff86209 修复问答管理的标题查询与实际不符 2025-08-11 16:04:28 +08:00
王卓煜
4136783586 修复新建在线课程窗口中,编辑作业报错 2025-07-30 14:40:54 +08:00
joshen
5f946906be Merge remote-tracking branch 'yx/250710-bugfix-gj' into test 2025-07-10 16:51:05 +08:00
Caojr
b234c6f571 测试日志 2025-07-10 16:50:04 +08:00
joshen
ea02f4920b Merge remote-tracking branch 'yx/master-0623-lyc' into test 2025-07-04 14:19:24 +08:00
王卓煜
7ad6da6f53 修复学员端,“文章”列表页,进入文章详情。对文章发表评论后,评论数量没有即时更新;对评论进行回复后,回复的数量没有在评论的数量统计即时更新,并且修复删除评论,评论数量不对 2025-07-04 13:37:28 +08:00
王卓煜
2a1c04ccb5 修复学员端,“文章”列表页,进入文章详情。对文章发表评论后,评论数量没有即时更新;对评论进行回复后,回复的数量没有在评论的数量统计即时更新 2025-07-04 13:31:28 +08:00
670788339
bba3cde615 Merge branch 'master-0623-lyc' into test 2025-06-23 10:46:32 +08:00
670788339
171ddfb89c studyIndex添加讲师头像 2025-06-23 10:04:23 +08:00
joshen
f227af6da6 Merge remote-tracking branch 'yx/master-20250429-lyc' into test 2025-04-29 16:00:13 +08:00
joshen
0d69078cd0 Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-21 15:27:44 +08:00
joshen
3b26209308 Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-21 14:00:24 +08:00
joshen
1a88a7442f Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-21 13:48:13 +08:00
joshen
65bd8d9110 Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-21 11:55:01 +08:00
joshen
549448aa69 Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 11:16:15 +08:00
joshen
a91238000d Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 11:05:56 +08:00
joshen
9dcdf31372 Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 10:55:27 +08:00
joshen
d723d9e74b Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 10:41:25 +08:00
joshen
13ee490bff Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 10:22:36 +08:00
joshen
77e2ca0b0b Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 10:08:43 +08:00
joshen
03c12f7bc9 Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 09:50:46 +08:00
joshen
e28e4523ab Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 09:18:08 +08:00
joshen
c8512a86df Merge remote-tracking branch 'yx/master-20250414-lyc' into test 2025-04-18 09:02:52 +08:00
joshen
2e7b2ab085 Merge remote-tracking branch 'yx/master-20250414-lyc' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseTask.java
2025-04-14 16:11:48 +08:00
joshen
6fa5d8bb0d Merge remote-tracking branch 'yx/master-20250414-lyc' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseTask.java
2025-04-14 15:49:13 +08:00
joshen
14376b21b4 Merge branch '250408-bugfix-shl' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/module/course/service/ICourseService.java
2025-04-09 09:52:14 +08:00
joshen
29221d8f25 Merge remote-tracking branch 'yx/master-20250403-lyc' into test 2025-04-03 09:42:19 +08:00
joshen
672487e29d Merge branch '250331-bugfix-shl-newmaster' into test 2025-04-01 13:53:22 +08:00
joshen
b7834eadf9 Merge branch '250331-bugfix-shl-newmaster' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseESApi.java
2025-04-01 13:37:24 +08:00
joshen
14bd304374 Merge branch '250331-bugfix-shl' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/module/course/entity/CourseTeacher.java
#	servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java
2025-04-01 10:25:53 +08:00
joshen
447a65ee6f Merge branch '250331-bugfix-shl' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java
2025-04-01 09:17:04 +08:00
joshen
d88b285729 Merge remote-tracking branch 'yx/master-20250227-lyc' into test 2025-03-29 13:00:12 +08:00
670788339
d3e84feb48 日志 2025-03-29 12:58:43 +08:00
joshen
318ba14fd3 Merge remote-tracking branch 'yx/master-20250227-lyc' into test 2025-03-29 12:23:11 +08:00
joshen
5ad578454e Merge remote-tracking branch 'yx/master-20250227-lyc' into test 2025-03-29 11:03:17 +08:00
joshen
052f673fc8 Merge remote-tracking branch 'yx/250324-casebugfix-zsh' into test 2025-03-25 08:48:55 +08:00
joshen
451156265e Merge remote-tracking branch 'yx/250324-casebugfix-zsh' into test 2025-03-25 08:41:12 +08:00
joshen
ff299b7697 Merge remote-tracking branch 'yx/250324-casebugfix-zsh' into test 2025-03-24 18:14:22 +08:00
joshen
66e4187be2 Merge remote-tracking branch 'yx/250324-casebugfix-zsh' into test 2025-03-24 17:53:08 +08:00
joshen
436f7647ce Merge remote-tracking branch 'yx/250324-casebugfix-zsh' into test 2025-03-24 17:49:26 +08:00
joshen
5c9237cb79 Merge branch '250324-bugfix-shl' into test 2025-03-24 10:14:45 +08:00
joshen
889f634c5e Merge branch '250321-bugfix-gx' into test
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/module/course/entity/CourseTeacher.java
#	servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java
2025-03-21 16:08:15 +08:00
gengxin
978e1a7bf2 分析数据 img 是否为空 2025-03-21 15:26:41 +08:00
joshen
5fe9019d87 Merge branch 'master-20250227-lyc' into test 2025-03-19 13:20:33 +08:00
joshen
be8c4464dc Merge branch 'master-20250227-lyc' into test 2025-03-19 13:09:42 +08:00
joshen
c7f1a1e810 Merge branch 'master-20250227-lyc' into test 2025-03-19 11:59:14 +08:00
joshen
87350c74f9 Merge remote-tracking branch 'yx/master-20250318-lyc' into test 2025-03-18 11:51:26 +08:00
joshen
67f55c51b8 Merge branch 'master-20250227-lyc' into test 2025-03-13 10:04:24 +08:00
joshen
645c58e8c4 Merge branch 'master-20250227-lyc' into test 2025-03-10 16:05:19 +08:00
joshen
dd6e64d6ac Merge branch 'master-20250227-lyc' into test 2025-03-10 14:42:39 +08:00
joshen
754d41e087 Merge remote-tracking branch '121/test' into test 2025-03-10 14:26:08 +08:00
joshen
fedf8ec527 Merge branch 'master-20250227-lyc' of https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers into test 2025-03-10 14:25:19 +08:00
670788339
e2ac6a5b96 日志 2025-03-10 13:45:34 +08:00
670788339
66320dab97 Merge branch 'master-20250227-lyc' into test 2025-03-10 09:30:05 +08:00
hui
5312d9f5f4 boe_new库该boe库--生产切不可合并这个提交!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2025-01-18 16:09:37 +08:00
16 changed files with 55 additions and 128 deletions

View File

@@ -45,7 +45,10 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.ForkJoinPool;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -404,20 +407,4 @@ public class ThirdApi {
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
log.info("-------delOnLineById = " + resp);
}
//获取字典信息
public List<Dict> getDictItems(CommonSearchVo searcher) {
try {
List<Dict> dictList = dictRemoteClient.getList(searcher);
if(!Objects.isNull(dictList) && dictList.size() > 0){
// List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
return dictList;
}else {
return null;
}
} catch (Exception e) {
log.error("-------获取字典信息 = " + e.getMessage());
}
return null;
}
}

View File

@@ -2,14 +2,11 @@
import java.io.OutputStream;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.boe.feign.api.infrastructure.entity.CommonSearchVo;
import com.boe.feign.api.infrastructure.entity.Dict;
import com.xboe.api.ThirdApi;
import com.xboe.module.course.dto.*;
import org.apache.commons.lang3.StringUtils;
@@ -172,48 +169,19 @@ public class CourseManageApi extends ApiBaseController{
List<CourseSection> sectionlist=sectionService.getByCourseId(id);
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(id);
List<CourseCrowd> crowds=courseService.findCrowdByCourseId(id);
CommonSearchVo searcher = new CommonSearchVo();
searcher.setPid(637L);
searcher.setType(1);
List<Dict> dictList = thirdApi.getDictItems(searcher);
boolean isPermission = false;
if(dictList != null && dictList.size() > 0){
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
isPermission = dicts.contains(course.getOrgId());
rs.put("dicts",dicts);
}
log.error("-------是否仅内网查看 = " + isPermission);
//
rs.put("course",course);
rs.put("contents",cclist);
rs.put("sections",sectionlist);
rs.put("teachers",teachers);
rs.put("crowds",crowds);
rs.put("isPermission",isPermission);
return success(rs);
}
@GetMapping("/getDictIds")
public JsonResponse<Map<String,Object>> getDictIds(Long pid,Integer type){
CommonSearchVo searcher = new CommonSearchVo();
if(pid==null || type ==null){
return badRequest("参数错误");
}
Map<String,Object> rs=new HashMap<String,Object>();
searcher.setPid(pid);
searcher.setType(type);
List<Dict> dictList = thirdApi.getDictItems(searcher);
rs.put("dicts",null);
if(dictList != null && dictList.size() > 0){
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
rs.put("dicts",dicts);
}
return success(rs);
}
/**
* 管理员审核列表教师的审核不在这里此审核也应该移动CourseAuditApi中去
* @param pager

View File

@@ -33,10 +33,7 @@ public class Course extends BaseEntity {
/**所有的设备*/
public static int DEVICE_ALL=3;
/**仅内网*/
public static int DEVICE_INTERNAL=4;
/**未提交,草稿*/
public static final int STATUS_NONE=1;

View File

@@ -57,4 +57,8 @@ public class CourseTeacher extends IdBaseEntity {
@Transient
private Integer teacherType;
/**讲师头像*/
@Transient
private String photo;
}

View File

@@ -105,8 +105,11 @@ public class CourseContentServiceImpl implements ICourseContentService {
if(homework!=null) {
homework.setCourseId(cc.getCourseId());
homework.setContentId(cc.getId());
homework=homeworkDao.saveOrUpdate(homework);
log.info("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
homework.setSysVersion(homeworkDao.getVersion(homework.getId()));
homeworkDao.saveOrUpdate(homework);
log.info("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
log.info("ccccccccccccccccccccccccccccccccccccccccccccccccccc");
}
}

View File

@@ -183,8 +183,6 @@ public class CourseServiceImpl implements ICourseService {
filters.add(FieldFilters.in("device", Course.DEVICE_MOBILE, Course.DEVICE_ALL));
} else if (dto.getDevice() == Course.DEVICE_ALL) {
filters.add(FieldFilters.eq("device", Course.DEVICE_ALL));
}else if (dto.getDevice() == Course.DEVICE_INTERNAL) {
filters.add(FieldFilters.eq("device", Course.DEVICE_INTERNAL));
}
}
@@ -493,7 +491,7 @@ public class CourseServiceImpl implements ICourseService {
String sql = "SELECT DISTINCT\n" +
"rt.course_id\n" +
"FROM\n" +
"boe_new.student s INNER JOIN boe_new.router_task rt on s.pid=rt.router_id inner join boe_course c on c.id=rt.course_id\n" +
"boe.student s INNER JOIN boe.router_task rt on s.pid=rt.router_id inner join boe_course c on c.id=rt.course_id\n" +
"\n" +
"WHERE\n" +
"\n" +
@@ -516,7 +514,7 @@ public class CourseServiceImpl implements ICourseService {
String sql = "SELECT DISTINCT\n" +
"pt.course_id\n" +
"FROM\n" +
"boe_new.student s INNER JOIN boe_new.project_task pt on s.pid=pt.project_id inner join boe_course c on c.id=pt.course_id\n" +
"boe.student s INNER JOIN boe.project_task pt on s.pid=pt.project_id inner join boe_course c on c.id=pt.course_id\n" +
"\n" +
"WHERE\n" +
"\n" +
@@ -573,8 +571,8 @@ public class CourseServiceImpl implements ICourseService {
String sql = "SELECT DISTINCT\n" +
"\tc.id \n" +
"FROM\n" +
"\tboe_new.student s\n" +
"\tINNER JOIN boe_new.grow_task gt ON s.pid = gt.grow_id\n" +
"\tboe.student s\n" +
"\tINNER JOIN boe.grow_task gt ON s.pid = gt.grow_id\n" +
"\tINNER JOIN boe_course c ON gt.course_id = c.id \n" +
"WHERE\n" +
"\ts.type = 14 \n" +

View File

@@ -165,7 +165,7 @@ public class AloneExamServiceImpl implements IAloneExamService{
query.addFilter(FieldFilters.eq("aid",aea.getAid()));
}
if(StringUtils.isNotBlank(aea.getName())) {
query.addFilter(FieldFilters.eq("name",aea.getName()));
query.addFilter(FieldFilters.like("name",aea.getName()));
}
}
return dao.findPage(query.builder());

View File

@@ -75,6 +75,7 @@ public class CommentsServiceImpl implements ICommentsService{
c.setPraises(0);
c.setFavorites(0);
dao.save(c);
callback.increase(BoedxResourceType.toEnum(c.getObjType()),c.getObjId(), BoedxHitsField.Comments);
if(c.getParentRead()!=null && c.getParentRead()) {
dao.updateMultiFieldById(c.getParentId(),
UpdateBuilder.create("replys","replys+1",FieldUpdateType.EXPRESSION),
@@ -87,9 +88,11 @@ public class CommentsServiceImpl implements ICommentsService{
@Override
public void deleteReply(String id,String parentId) {
Comments comment=dao.get(id);
dao.deleteById(id);
dao.updateMultiFieldById(parentId, UpdateBuilder.create("replys","replys-1",FieldUpdateType.EXPRESSION));
//需要同时回调处理,修改对应的内容的评论数量
callback.reduce(BoedxResourceType.toEnum(comment.getObjType()),comment.getObjId(),BoedxHitsField.Comments);
}
@Override

View File

@@ -1,6 +1,5 @@
package com.xboe.module.popup.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xboe.core.SysConstant;
import com.xboe.core.orm.IdEntity;
import lombok.Data;
@@ -25,14 +24,12 @@ public class Popup extends IdEntity {
* 开始时间
* */
@Column(name = "start_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime;
/**
* 结束时间
* */
@Column(name = "end_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;

View File

@@ -86,7 +86,7 @@ public class QuestionServiceImpl implements IQuestionService {
// filters.add(FieldFilters.or(FieldFilters.like("title", questionDto.getKeyword()), FieldFilters.like("content", questionDto.getKeyword())));
List<IFieldFilter> iFieldFilters = new ArrayList<>();
iFieldFilters.add(FieldFilters.like("title", questionDto.getKeyword()));
iFieldFilters.add(FieldFilters.like("content", questionDto.getKeyword()));
iFieldFilters.add(FieldFilters.like("title", questionDto.getKeyword()));
iFieldFilters.add(FieldFilters.like("sysCreateBy", questionDto.getKeyword()));
filters.add(FieldFilters.or(iFieldFilters));
}

View File

@@ -10,8 +10,6 @@ import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.nacos.shaded.com.google.common.util.concurrent.RateLimiter;
import com.boe.feign.api.infrastructure.entity.CommonSearchVo;
import com.boe.feign.api.infrastructure.entity.Dict;
import com.xboe.api.ThirdApi;
import com.xboe.constants.CacheName;
import com.xboe.module.course.vo.TeacherVo;
@@ -214,6 +212,7 @@ public class StudyCourseApi extends ApiBaseController{
ct.setRemark(t.getDescription());
ct.setSupplier(t.getSupplier());
ct.setTeacherType(t.getTeacherType());
ct.setPhoto(t.getPhoto());
}
if(redisTemplate.opsForValue().get(ct.getTeacherId())==null){
List<String>list=new ArrayList<>();
@@ -235,30 +234,7 @@ public class StudyCourseApi extends ApiBaseController{
rs.put("contents",cclist);
rs.put("sections",sectionlist);
rs.put("teachers",teachers);
// 未选择仅内网时isPermission = false不用区分内外网
boolean isPermission = false;
if(course.getDevice() ==4){
CommonSearchVo searcher = new CommonSearchVo();
searcher.setPid(637L);
searcher.setType(1);
List<Dict> dictList = thirdApi.getDictItems(searcher);
if(dictList != null && dictList.size() > 0){
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
// 选择仅内网 并且字典中配置了此课程资源归属,那么只能内网观看 返回 truw
isPermission = dicts.contains(course.getOrgId());
}
}
rs.put("isPermission",isPermission);
CommonSearchVo warn = new CommonSearchVo();
warn.setCode("course_warn");
warn.setType(1);
List<Dict> warns = thirdApi.getDictItems(warn);
if(warns != null && warns.size() > 0){
rs.put("warn",warns.get(0).getValue());
rs.put("warnTitle",warns.get(0).getName());
}
//检查是否已报名
StudyCourse sc=service.findByCourseIdAndAid(cid, aid);
if(pass==true && sc==null) {
@@ -428,6 +404,8 @@ public class StudyCourseApi extends ApiBaseController{
studyService.saveStudyInfo(sci,token);
//学习记录成功后处理
studyService.appendStudyDuration(sci.getStudyId(),sci.getStudyItemId(),sci.getContentId(),sci.getDuration());
log.info("在线课学习记录 sci.getStudyId() = "+ sci.getStudyId() + " , sci.getCourseId() = " + sci.getCourseId() );
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(sci.getStudyId() ,sci.getCourseId(), token);
log.info("在线课学习记录"+allUserList);
//System.out.println("在线课学习记录"+allUserList);

View File

@@ -1,7 +1,9 @@
package com.xboe.school.study.api;
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -10,6 +12,13 @@ import cn.hutool.core.collection.CollectionUtil;
import com.xboe.module.course.entity.Course;
import com.xboe.module.course.service.ICourseService;
import org.apache.commons.compress.utils.Lists;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson2.JSON;
import com.xboe.core.orm.FieldFilters;
import com.xboe.core.orm.QueryBuilder;
import com.xboe.module.course.dao.CourseDao;
import com.xboe.module.course.dto.RankingDto;
import com.xboe.module.course.entity.Course;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

View File

@@ -137,11 +137,15 @@ public class StudyCourseTask {
String courseContentId = parts[5];
String studyItemId = parts[7];
// 7. 获取存储的时间点(示例逻辑)
String redisValue = redisTemplate.opsForValue().get(redisKey);
// redisValue = 60&20&2025-07-22T16:51:40
log.info("-定时任务 saveStudyCourseItemLastTime ---redisValue = " + redisValue);
if (redisValue == null) continue;
String[] partValues = redisValue.split("&");
// studyVideoTtime=60
int studyVideoTtime = Integer.parseInt(partValues[0]);
// appendtime=20
int appendtime = Integer.parseInt(partValues[1]);
LocalDateTime timestamp = null;
if (partValues.length >= 2){

View File

@@ -10,7 +10,6 @@ import com.xboe.module.course.entity.CourseExam;
import com.xboe.school.study.dao.StudyCourseDao;
import com.xboe.school.study.dao.StudyCourseItemDao;
import com.xboe.school.study.dao.StudyExamDao;
import com.xboe.school.study.entity.StudyCourse;
import com.xboe.school.study.entity.StudyCourseItem;
import com.xboe.school.study.entity.StudyExam;
import com.xboe.school.study.service.IStudyExamService;
@@ -171,32 +170,15 @@ public class StudyExamServiceImpl implements IStudyExamService{
}
builder.addGroupBy("studyId");
List<StudyExam> list1 = dao.findList(builder.builder());
if(list1 != null && list1.size() > 0){
log.info("----------StudyExam--QueryBuilder list1.size = " + list1.size() + ",0 = " + list1.get(0));
for(StudyExam item : list1){
log.info("--------------StudyExam---CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
int totalContent = courseContentDao.getCount(item.getCourseId());
log.info("--------StudyExam--准备判断进度-------totalContent = " + totalContent);
scDao.finishCheck1(item.getStudyId(),item.getCourseId(),totalContent);
log.info("--------StudyExam--判断进度完毕----------------------");
}
}else{
QueryBuilder builder1 = QueryBuilder.from(StudyCourse.class);
if (StringUtils.isEmpty(courseId)){
return;
}
builder1.addFilter(FieldFilters.eq("courseId", courseId));
List<StudyCourse> list2 = scDao.findList(builder1.builder());
log.info("------------StudyCourse list2.size = " + list2.size() + ",0 = " + list2.get(0));
for(StudyCourse item : list2){
log.info("-------------StudyCourse----CourseId = " + item.getCourseId() + " , StudyId = " + item.getId() + " , StudentId = " + item.getAid());
int totalContent = courseContentDao.getCount(item.getCourseId());
log.info("--------StudyCourse--准备判断进度-------totalContent = " + totalContent);
scDao.finishCheck1(item.getId(),item.getCourseId(),totalContent);
log.info("--------StudyCourse--判断进度完毕----------------------");
}
}
log.info("------------QueryBuilder list1.size = " + list1.size() + ",0 = " + list1.get(0));
for(StudyExam item : list1){
log.info("-----------------CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
int totalContent = courseContentDao.getCount(item.getCourseId());
log.info("----------准备判断进度-------totalContent = " + totalContent);
scDao.finishCheck1(item.getStudyId(),item.getCourseId(),totalContent);
log.info("----------判断进度完毕----------------------");
}
} catch (Exception exception) {
exception.printStackTrace();
log.info("------异常----------------------" +exception.getMessage());

View File

@@ -282,12 +282,11 @@ public class StudyServiceImpl implements IStudyService{
return pageList;
}
}
String sql = "select a.id, a.course_id, a.course_name, a.aname, " +
"IFNULL(b.finish_time, '0') as finish_time, IFNULL(b.progress, 0) as progress, IFNULL(b.status, 1) as status,b.score " +
"IFNULL(b.finish_time, '0') as finish_time, IFNULL(b.progress, 0) as progress, IFNULL(b.status, 1) as status " +
"from (select id, course_id, course_name, aname, 0, 1 from boe_study_course where course_id = '" + courseId + "' and aname like '%"+name+"%') a " +
"left join " +
"(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status,MAX(item.score) score " +
"(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status " +
"from boe_study_course bsc left join boe_study_course_item item on item.course_id = bsc.course_id and item.study_id = bsc.id " +
"where bsc.course_id = '" + courseId + "' and item.content_id = '" + contentId + "' and item.aname like '%"+name+"%' group by bsc.id) b " +
"on a.course_id = b.course_id and a.id = b.id " +
@@ -316,9 +315,6 @@ public class StudyServiceImpl implements IStudyService{
sc.setProgress(Integer.valueOf(objs[5].toString()));
sc.setStatus(Integer.valueOf(objs[6].toString()));
sc.setAname(objs[3].toString());
if(objs[7] != null){
sc.setScore(Float.valueOf(objs[7].toString()));
}
item.add(sc);
}
log.info("资源完成情况人员"+item);

View File

@@ -60,6 +60,7 @@ public class SysUploaderApi extends ApiBaseController{
fileTypeSet.add("pptx");
fileTypeSet.add("pdf");
fileTypeSet.add("zip");
fileTypeSet.add("jpeg");
}
@RequestMapping(value = "/file/upload", method = RequestMethod.POST, produces = "application/json")