|
@@ -91,10 +91,10 @@ public class DdCollegeUtilService {
|
|
//查询试卷集合
|
|
//查询试卷集合
|
|
//List<TestPaper> papers = queryByCourse(courseCode);
|
|
//List<TestPaper> papers = queryByCourse(courseCode);
|
|
TestPaper testPaper1 = new TestPaper();
|
|
TestPaper testPaper1 = new TestPaper();
|
|
- testPaper1.setId("21D9D5D5E5FE0A438282C9B490BF45DE");
|
|
|
|
|
|
+ testPaper1.setId("FCE63B16D006FE488C44A03ADF270DDC");
|
|
testPaper1.setName("地大所有题型");
|
|
testPaper1.setName("地大所有题型");
|
|
testPaper1.setScore(100.0);
|
|
testPaper1.setScore(100.0);
|
|
- testPaper1.setTestPaperContentId("F61A67F4898249767CB0A31A3BD2616B");//EBE6752BCE3A360D1F50BE9FBA4ADCE7,F61A67F4898249767CB0A31A3BD2616B
|
|
|
|
|
|
+ testPaper1.setTestPaperContentId("AFF665B0F5AB5840B1179D08AE3895D8");//EBE6752BCE3A360D1F50BE9FBA4ADCE7,F61A67F4898249767CB0A31A3BD2616B
|
|
List<TestPaper> papers = new ArrayList<TestPaper>();
|
|
List<TestPaper> papers = new ArrayList<TestPaper>();
|
|
papers.add(testPaper1);
|
|
papers.add(testPaper1);
|
|
if(papers != null && papers.size()>0){
|
|
if(papers != null && papers.size()>0){
|
|
@@ -193,9 +193,9 @@ public class DdCollegeUtilService {
|
|
@SuppressWarnings({"unchecked","rawtypes"})
|
|
@SuppressWarnings({"unchecked","rawtypes"})
|
|
public List<TestQuestion> queryByTestPaper(String testPaperContentId){
|
|
public List<TestQuestion> queryByTestPaper(String testPaperContentId){
|
|
String sql = "SELECT q.ID id,d.dNumber,d.`name` dName,d.number number,d.score score,q.PARENT_ID parent_id,q.QUESTION_TYPE_ENUM type,q.JSON "
|
|
String sql = "SELECT q.ID id,d.dNumber,d.`name` dName,d.number number,d.score score,q.PARENT_ID parent_id,q.QUESTION_TYPE_ENUM type,q.JSON "
|
|
- + "FROM dd_question_content_temp q ,(SELECT b.QUESTION_CONTENT_ID question_id, b.SCORE score, b.SEQUENCE number, c.name name, c.dNumber dNumber "
|
|
|
|
- + "FROM dd_test_paper_question_temp b ,(SELECT a.ID id, a.`NAME` name,a.SEQUENCE dNumber,a.TEST_PAPER_CONTENT_ID "
|
|
|
|
- + "FROM dd_test_paper_question_group_temp a WHERE a.TEST_PAPER_CONTENT_ID = '"+ testPaperContentId + "' ORDER BY a.sequence) c "
|
|
|
|
|
|
+ + "FROM QUESTION_CONTENT q ,(SELECT b.QUESTION_CONTENT_ID question_id, b.SCORE score, b.SEQUENCE number, c.name name, c.dNumber dNumber "
|
|
|
|
+ + "FROM TEST_PAPER_QUESTION b ,(SELECT a.ID id, a.`NAME` name,a.SEQUENCE dNumber,a.TEST_PAPER_CONTENT_ID "
|
|
|
|
+ + "FROM TEST_PAPER_QUESTION_GROUP a WHERE a.TEST_PAPER_CONTENT_ID = '"+ testPaperContentId + "' ORDER BY a.sequence) c "
|
|
+ "WHERE b.TEST_PAPER_QUESTION_GROUP_ID = c.id ORDER BY c.dNumber,b.SEQUENCE) d WHERE q.ID = d.question_id ORDER BY d.dNumber,d.number;";
|
|
+ "WHERE b.TEST_PAPER_QUESTION_GROUP_ID = c.id ORDER BY c.dNumber,b.SEQUENCE) d WHERE q.ID = d.question_id ORDER BY d.dNumber,d.number;";
|
|
List<TestQuestion> questions = this.jdbcTemplate.query(sql, new BeanPropertyRowMapper(TestQuestion.class));
|
|
List<TestQuestion> questions = this.jdbcTemplate.query(sql, new BeanPropertyRowMapper(TestQuestion.class));
|
|
return questions;
|
|
return questions;
|