Commit 25aa79ad authored by YangZhaoJun1's avatar YangZhaoJun1

aa

parent 55863372
package org.rcisoft.business.bchapter.dao; package org.rcisoft.business.bchapter.dao;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.rcisoft.business.bchapter.dto.QueryScoreListDTO; import org.rcisoft.business.bchapter.dto.*;
import org.rcisoft.business.bchapter.dto.ScoreInfoDTO;
import org.rcisoft.business.bchapter.dto.ScoreReportDto;
import org.rcisoft.business.bchapter.dto.StuScoreDTO;
import org.rcisoft.business.bchapter.entity.BChapter; import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.vo.StudentChapterScoreVO; import org.rcisoft.business.bchapter.vo.StudentChapterScoreVO;
import org.rcisoft.business.blesson.entity.BLesson; import org.rcisoft.business.blesson.entity.BLesson;
...@@ -299,12 +296,13 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -299,12 +296,13 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
@ResultMap(value = "ScoreReportResultMap" ) @ResultMap(value = "ScoreReportResultMap" )
List<ScoreReportDto> queryBChaptersBySlId(String slId); List<ScoreReportDto> queryBChaptersBySlId(String slId);
@Select("<script>select bc.*,su.business_id as userId,su.`name` as studentName,su.login_name as stuId from b_chapter bc \n" + @Select("<script>SELECT bc.business_id as businessId,\n" +
"LEFT JOIN b_r_student_chapter bsc on bc.business_id = bsc.chapter_id\n" + "(SELECT CONCAT((SELECT sort from b_chapter where business_id = bc.pid),\n" +
"LEFT JOIN b_student bs on bsc.student_id = bs.business_id\n" + "'.',\n" +
"LEFT JOIN s_user su on su.login_name = bs.`code` \n" + "(SELECT sort from b_chapter where business_id = bc.business_id),\n" +
"where bc.business_id = #{chapterId} and bsc.score = '-1'</script>") "' ',\n" +
@ResultMap(value = "BaseResultMap" ) "(SELECT chapter_name from b_chapter where business_id = bc.business_id))) as chapterName\n" +
List<BChapter> chapterListBySlId(String slId); " from b_chapter bc where bc.pid !='-1' AND bc.sl_id = #{slId} ORDER BY chapterName </script>")
List<ChapterSelectDto> chapterListBySlId(String slId);
} }
package org.rcisoft.business.bchapter.dto;
import lombok.Data;
/**
* Created by Administrator on 2018/1/25.
*/
@Data
public class ChapterSelectDto {
private String businessId;
private String chapterName;
}
package org.rcisoft.business.bchapter.service; package org.rcisoft.business.bchapter.service;
import org.rcisoft.business.bchapter.dto.QueryScoreListDTO; import org.rcisoft.business.bchapter.dto.*;
import org.rcisoft.business.bchapter.dto.ScoreInfoDTO;
import org.rcisoft.business.bchapter.dto.ScoreReportDto;
import org.rcisoft.business.bchapter.dto.StuScoreDTO;
import org.rcisoft.business.bchapter.entity.BChapter; import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.vo.StudentChapterScoreVO; import org.rcisoft.business.bchapter.vo.StudentChapterScoreVO;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
...@@ -115,5 +112,5 @@ public interface BChapterService{ ...@@ -115,5 +112,5 @@ public interface BChapterService{
List<ScoreReportDto> scoreReport(String slId); List<ScoreReportDto> scoreReport(String slId);
List<BChapter> chapterListBySlId(String slId); List<ChapterSelectDto> chapterListBySlId(String slId);
} }
...@@ -2,10 +2,7 @@ package org.rcisoft.business.bchapter.service.impl; ...@@ -2,10 +2,7 @@ package org.rcisoft.business.bchapter.service.impl;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.rcisoft.business.bchapter.dao.BChapterRepository; import org.rcisoft.business.bchapter.dao.BChapterRepository;
import org.rcisoft.business.bchapter.dto.QueryScoreListDTO; import org.rcisoft.business.bchapter.dto.*;
import org.rcisoft.business.bchapter.dto.ScoreInfoDTO;
import org.rcisoft.business.bchapter.dto.ScoreReportDto;
import org.rcisoft.business.bchapter.dto.StuScoreDTO;
import org.rcisoft.business.bchapter.entity.BChapter; import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.enums.AutomaticEnum; import org.rcisoft.business.bchapter.enums.AutomaticEnum;
import org.rcisoft.business.bchapter.enums.ChapterLevelEnum; import org.rcisoft.business.bchapter.enums.ChapterLevelEnum;
...@@ -506,7 +503,7 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -506,7 +503,7 @@ public class BChapterServiceImpl implements BChapterService {
} }
@Override @Override
public List<BChapter> chapterListBySlId(String slId) { public List<ChapterSelectDto> chapterListBySlId(String slId) {
return bChapterRepository.chapterListBySlId(slId); return bChapterRepository.chapterListBySlId(slId);
} }
......
...@@ -4,6 +4,7 @@ import org.apache.commons.io.FileUtils; ...@@ -4,6 +4,7 @@ import org.apache.commons.io.FileUtils;
import org.rcisoft.business.bfile.dao.BFileRepository; import org.rcisoft.business.bfile.dao.BFileRepository;
import org.rcisoft.business.bfile.entity.BFile; import org.rcisoft.business.bfile.entity.BFile;
import org.rcisoft.business.bfile.service.BFileService; import org.rcisoft.business.bfile.service.BFileService;
import org.rcisoft.business.bsl.task.SlTask;
import org.rcisoft.common.component.Global; import org.rcisoft.common.component.Global;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.constant.DelStatus; import org.rcisoft.core.constant.DelStatus;
...@@ -35,7 +36,7 @@ public class BFileServiceImpl implements BFileService { ...@@ -35,7 +36,7 @@ public class BFileServiceImpl implements BFileService {
@Autowired @Autowired
private BFileRepository bFileRepository; private BFileRepository bFileRepository;
@Autowired @Autowired
private OfficeToPdf officeToPdf; private SlTask slTask;
@Autowired @Autowired
private Global global; private Global global;
...@@ -263,7 +264,7 @@ public class BFileServiceImpl implements BFileService { ...@@ -263,7 +264,7 @@ public class BFileServiceImpl implements BFileService {
+ newPath+ filename; + newPath+ filename;
String outputFile = global.getBASE_UPLOAD_SERVER_LOCATION() + File.separator String outputFile = global.getBASE_UPLOAD_SERVER_LOCATION() + File.separator
+ newPath + uploadFileName + ".pdf"; + newPath + uploadFileName + ".pdf";
officeToPdf.office2PDF(inputFile,outputFile); slTask.officeToPdf(inputFile,outputFile);
} }
bFile.setVideoName(name+ "." +uploadFileSuffix);//文件名 bFile.setVideoName(name+ "." +uploadFileSuffix);//文件名
......
...@@ -37,7 +37,13 @@ public class TPaperChapterController extends PaginationController<TPaperChapter> ...@@ -37,7 +37,13 @@ public class TPaperChapterController extends PaginationController<TPaperChapter>
@ApiOperation(value="添加", notes="添加") @ApiOperation(value="添加", notes="添加")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")}) @ApiImplicitParams({@ApiImplicitParam(name = "pdesc", value = "说明", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slId", value = "开课ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "chapId", value = "章节id", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "poption", value = "1 随机 2 自主", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "pscope", value = "1 全部 2 本节", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "pcompose", value = "{'1':3,'2':0} 3道选择,2道判断", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "questionsId", value = "题目ID", required = false, dataType = "varchar")})
@PostMapping @PostMapping
public Result add(TPaperChapter tPaperChapter) { public Result add(TPaperChapter tPaperChapter) {
tPaperChapter.setToken(getToken()); tPaperChapter.setToken(getToken());
......
...@@ -36,6 +36,9 @@ public class TPaperChapter extends IdEntity<TPaperChapter> { ...@@ -36,6 +36,9 @@ public class TPaperChapter extends IdEntity<TPaperChapter> {
private String pcompose; private String pcompose;
@Transient
private String questionsId;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment