Compare commits

...

18 Commits

Author SHA1 Message Date
zhaolongfei
7be0acf350 修复在线管理资源完成情况搜索框不能同时搜索问题 2024-08-09 16:29:16 +08:00
zhaolongfei
87892fe8ef 修复在线管理资源完成情况搜索框不能同时搜索问题 2024-08-09 16:27:22 +08:00
zhaolongfei
a0c891cd35 修复在线管理资源完成情况搜索框不能同时搜索问题 2024-08-09 16:24:35 +08:00
zhaolongfei
91bcec00ef 修复同步到item表没有名称问题 2024-08-06 14:42:05 +08:00
zhaolongfei
6c616a1163 在线课作业重复提交报错修复 2024-08-05 15:12:54 +08:00
zhaolongfei
939325d5bd 在线课作业重复提交报错修复 2024-08-05 15:05:28 +08:00
zhaolongfei
4eddbc8e8f 在线管理资源完成情况名称搜索修复 2024-08-05 11:21:14 +08:00
zhaolongfei
50bdd59a26 在线管理资源完成情况名称搜索修复 2024-08-05 11:11:12 +08:00
zhaolongfei
b85eb97bc1 在线管理资源完成情况名称搜索修复 2024-08-05 10:57:14 +08:00
zhaolongfei
28b58a73cf 在线管理资源完成情况名称搜索修复 2024-08-05 10:29:36 +08:00
zhaolongfei
b9adf4c45f 作业多次点击提交报错修复 2024-08-02 17:08:00 +08:00
zhaolongfei
49aab74463 作业多次点击提交报错修复 2024-08-02 13:19:08 +08:00
zhaolongfei
9f30910d04 作业多次点击提交报错修复 2024-08-02 11:32:14 +08:00
zhaolongfei
6658b8c04b 作业多次点击提交报错修复 2024-08-02 11:03:13 +08:00
zhaolongfei
19df4224a9 作业多次点击提交报错修复 2024-08-02 10:16:05 +08:00
zhaolongfei
95ddc9f5d5 作业多次点击提交报错修复 2024-08-02 09:36:36 +08:00
zhaolongfei
64965f5ec6 考试管理删除不同步 2024-07-31 19:01:53 +08:00
zhaolongfei
a407ca2dad 考试管理删除不同步 2024-07-31 18:35:49 +08:00
7 changed files with 17 additions and 41 deletions

View File

@@ -12,13 +12,10 @@ import com.xboe.module.dict.entity.DictDto;
import com.xboe.module.exam.entity.ExamTest; import com.xboe.module.exam.entity.ExamTest;
import com.xboe.school.study.entity.StudyCourse; import com.xboe.school.study.entity.StudyCourse;
import com.xboe.system.user.dao.UserDao; import com.xboe.system.user.dao.UserDao;
import com.xboe.system.user.entity.User;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;

View File

@@ -178,4 +178,5 @@ public class ExamTest extends BaseEntity {
@Transient @Transient
private String paperName; private String paperName;
} }

View File

@@ -95,7 +95,7 @@ public class ExamTestServiceImpl implements IExamTestService {
@Override @Override
public Boolean has(String paperId) { public Boolean has(String paperId) {
ExamTest et=examTestDao.findOne(FieldFilters.eq("paperId", paperId)); ExamTest et=examTestDao.findOne(FieldFilters.eq("paperId", paperId),FieldFilters.eq("deleted", false));
//String etId= (String)examTestDao.findField("id", FieldFilters.eq("paperId", paperId)); //String etId= (String)examTestDao.findField("id", FieldFilters.eq("paperId", paperId));
if(et==null){ if(et==null){
return true; return true;

View File

@@ -44,7 +44,7 @@ public class StudyAssessServiceImpl implements IStudyAssessService{
LocalDateTime ldt=LocalDateTime.now(); LocalDateTime ldt=LocalDateTime.now();
sci.setStudyId(assess.getStudyId()); sci.setStudyId(assess.getStudyId());
sci.setContentId(assess.getContentId()); sci.setContentId(assess.getContentId());
//sci.setContentName(homework.getContentName()); sci.setContentName("评估");
sci.setCourseId(assess.getCourseId()); sci.setCourseId(assess.getCourseId());
//sci.setCsectionId(homework.getCsectionId()); //sci.setCsectionId(homework.getCsectionId());
sci.setProgress(100);//直接设置为学习完成 sci.setProgress(100);//直接设置为学习完成

View File

@@ -82,7 +82,7 @@ public class StudyExamServiceImpl implements IStudyExamService{
LocalDateTime ldt=LocalDateTime.now(); LocalDateTime ldt=LocalDateTime.now();
sci.setStudyId(exam.getStudyId()); sci.setStudyId(exam.getStudyId());
sci.setContentId(exam.getContentId()); sci.setContentId(exam.getContentId());
//sci.setContentName(homework.getContentName()); sci.setContentName("考试");
sci.setCourseId(exam.getCourseId()); sci.setCourseId(exam.getCourseId());
//sci.setCsectionId(homework.getCsectionId()); //sci.setCsectionId(homework.getCsectionId());
sci.setProgress(prog);//直接设置为学习完成 sci.setProgress(prog);//直接设置为学习完成

View File

@@ -46,7 +46,7 @@ public class StudyHomeWorkServiceImpl implements IStudyHomeWorkService{
LocalDateTime ldt=LocalDateTime.now(); LocalDateTime ldt=LocalDateTime.now();
sci.setStudyId(homework.getStudyId()); sci.setStudyId(homework.getStudyId());
sci.setContentId(homework.getContentId()); sci.setContentId(homework.getContentId());
//sci.setContentName(homework.getContentName()); sci.setContentName(homework.getHwName());
sci.setCourseId(homework.getCourseId()); sci.setCourseId(homework.getCourseId());
//sci.setCsectionId(homework.getCsectionId()); //sci.setCsectionId(homework.getCsectionId());
sci.setProgress(100);//直接设置为学习完成 sci.setProgress(100);//直接设置为学习完成
@@ -67,7 +67,7 @@ public class StudyHomeWorkServiceImpl implements IStudyHomeWorkService{
//只是保留一条作业记录,不再保存多条记录了 //只是保留一条作业记录,不再保存多条记录了
//dao.save(homework); //dao.save(homework);
//设置id。然后进行悠 //设置id。然后进行悠
homework.setId(obj.toString()); homework.setId(homework.getStudyItemId());
dao.update(homework); dao.update(homework);
} }
} }

View File

@@ -180,29 +180,31 @@ public class StudyServiceImpl implements IStudyService{
query.addFilter(FieldFilters.eq("courseId",courseId)); query.addFilter(FieldFilters.eq("courseId",courseId));
} }
if(StringUtils.isNotBlank(name)) { if(StringUtils.isNotBlank(name)) {
query.addFilter(FieldFilters.eq("aname", name)); query.addFilter(FieldFilters.like("aname", name));
} }
int pageIndex2 = pageIndex-1; int pageIndex2 = pageIndex-1;
if(status!=null) { if(status!=null) {
if(status==3) { if(status==3) {
query.addFilter(FieldFilters.eq("status", 2)); query.addFilter(FieldFilters.eq("status", 2));
query.addFilter(FieldFilters.like("aname", name));
return scItemDao.findPage(query.builder()); return scItemDao.findPage(query.builder());
}else if(status==2){ }else if(status==2){
query.addFilter(FieldFilters.eq("status",9)); query.addFilter(FieldFilters.eq("status",9));
query.addFilter(FieldFilters.like("aname", name));
return scItemDao.findPage(query.builder()); return scItemDao.findPage(query.builder());
}else if (status == 1) { }else if (status == 1) {
String sql = "select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,item.content_id,0 as progress,1 as status from boe_study_course bsc " + String sql = "select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,item.content_id,0 as progress,1 as status from boe_study_course bsc " +
" left join boe_study_course_item item on bsc.course_id = item.course_id and bsc.id = item.study_id" + " left join boe_study_course_item item on bsc.course_id = item.course_id and bsc.id = item.study_id" +
" where bsc.course_id = '"+courseId+"' and bsc.id not in(" + " where bsc.course_id = '"+courseId+"' and bsc.aname like '%"+name+"%' and bsc.id not in(" +
" select item.study_id from boe_study_course_item item " + " select item.study_id from boe_study_course_item item " +
" where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' group by item.study_id" + " where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and item.aname like '%"+name+"%' group by item.study_id" +
" ) group by bsc.id limit "+ pageIndex2+","+ pageSize+";"; " ) group by bsc.id limit "+ pageIndex2+","+ pageSize+";";
String sql2 = "select count(*) as total from (select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,item.content_id,0 as progress,1 as status from boe_study_course bsc " + String sql2 = "select count(*) as total from (select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,item.content_id,0 as progress,1 as status from boe_study_course bsc " +
" left join boe_study_course_item item on bsc.course_id = item.course_id and bsc.id = item.study_id" + " left join boe_study_course_item item on bsc.course_id = item.course_id and bsc.id = item.study_id" +
" where bsc.course_id = '"+courseId+"' and bsc.id not in(" + " where bsc.course_id = '"+courseId+"' and bsc.aname like '%"+name+"%' and bsc.id not in(" +
" select item.study_id from boe_study_course_item item " + " select item.study_id from boe_study_course_item item " +
" where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' group by item.study_id" + " where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and item.aname like '%"+name+"%' group by item.study_id" +
" ) group by bsc.id) as total"; " ) group by bsc.id) as total";
log.info("资源完成情况未开始sql"+sql); log.info("资源完成情况未开始sql"+sql);
List<Object[]> list = scDao.sqlFindList(sql); List<Object[]> list = scDao.sqlFindList(sql);
@@ -224,46 +226,22 @@ public class StudyServiceImpl implements IStudyService{
return pageList; return pageList;
} }
} }
// String sql = "select * from (select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,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.`status` in (2,9) and bsc.course_id = '"+ courseId+"' group by bsc.id " +
// " UNION ALL " +
// " select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,0 as progress,1 as status from boe_study_course bsc " +
// " LEFT JOIN boe_study_course_item item on item.course_id = bsc.course_id " +
// " where bsc.course_id = '"+courseId+"' and bsc.id not in (" +
// " select bsc.id 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+"' group by bsc.id" +
// " )group by bsc.id) a group by a.id limit "+ pageIndex+","+ pageSize+";";
// String sql2 = "select count(*) from (select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,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.`status` in (2,9) and bsc.course_id = '"+ courseId+"' group by bsc.id " +
// " UNION ALL " +
// " select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,0 as progress,1 as status from boe_study_course bsc " +
// " LEFT JOIN boe_study_course_item item on item.course_id = bsc.course_id " +
// " where bsc.course_id = '"+courseId+"' and bsc.id not in (" +
// " select bsc.id 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+"' group by bsc.id" +
// " )group by bsc.id) a group by a.id";
String sql = "select a.id, a.course_id, a.course_name, a.aname, " + 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 " + "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 + "') a " + "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 " + "left join " +
"(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status " + "(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 " + "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 + "' group by bsc.id) b " + "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 " + "on a.course_id = b.course_id and a.id = b.id " +
"group by a.id limit "+ pageIndex2+","+ pageSize+";"; "group by a.id limit "+ pageIndex2+","+ pageSize+";";
String sql2 = "select count(*) as total from (select a.id, a.course_id, a.course_name, a.aname, " + String sql2 = "select count(*) as total from (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 " + "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 + "') a " + "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 " + "left join " +
"(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status " + "(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 " + "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 + "' group by bsc.id) b " + "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 " + "on a.course_id = b.course_id and a.id = b.id " +
"group by a.id) as total"; "group by a.id) as total";
log.info("资源完成情况全部sql"+sql); log.info("资源完成情况全部sql"+sql);