Browse Source

接口添加返回值

tags/正式版本
王宁 2 years ago
parent
commit
a23b21e334

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/paperstudent/EPaperStudentMapper.java View File

85
 
85
 
86
     //考试试卷学生
86
     //考试试卷学生
87
     List<ERstudent> listByExamAndSubjectId(@Param("examid") Integer examid,@Param("subjectid") String subjectid);
87
     List<ERstudent> listByExamAndSubjectId(@Param("examid") Integer examid,@Param("subjectid") String subjectid);
88
+
89
+    void updateStuStartime(@Param("epsid") Integer epsid,@Param("starttime") Integer starttime);
88
 }
90
 }

+ 2
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java View File

130
             map.put("files",files);
130
             map.put("files",files);
131
         }
131
         }
132
 
132
 
133
+        ePaperStudentMapper.updateStuStartime(epsid,N_Utils.getSecondTimestamp());
133
         map.put("paper",psvo);
134
         map.put("paper",psvo);
134
         map.put("questions",questions);
135
         map.put("questions",questions);
135
         return map;
136
         return map;
203
             List<Map> files = ePaperFileMapper.listPaperFiles(psvo.getEpid());
204
             List<Map> files = ePaperFileMapper.listPaperFiles(psvo.getEpid());
204
             psvo.setFiles(files);
205
             psvo.setFiles(files);
205
         }
206
         }
206
-
207
         psvo.setQtypelist(questions);
207
         psvo.setQtypelist(questions);
208
+        ePaperStudentMapper.updateStuStartime(epsid,N_Utils.getSecondTimestamp());
208
         return psvo;
209
         return psvo;
209
     }
210
     }
210
 
211
 

+ 5
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml View File

41
 
41
 
42
     <!--获取考试科目时间信息-->
42
     <!--获取考试科目时间信息-->
43
     <select id="getExamSubjectPaperByEpsid" resultType="java.util.Map">
43
     <select id="getExamSubjectPaperByEpsid" resultType="java.util.Map">
44
-        select ps.epsid,ps.classid,ps.examid,e.examname,e.examcomm,e.gradeid,es.esid,es.subjectid,es.subjectname,es.sdate,
44
+        select ps.epsid,ps.classid,ps.examid,e.examname,e.examcomm,e.monitored,e.gradeid,es.esid,es.subjectid,es.subjectname,es.sdate,
45
                es.begintime,es.endtime,p.ptype,c.classname
45
                es.begintime,es.endtime,p.ptype,c.classname
46
         from e_paper_student ps left join e_base e on ps.examid=e.examid
46
         from e_paper_student ps left join e_base e on ps.examid=e.examid
47
         left join e_subject es on ps.esid=es.esid and ps.examid=es.examid
47
         left join e_subject es on ps.esid=es.esid and ps.examid=es.examid
273
             </foreach>
273
             </foreach>
274
         </where>
274
         </where>
275
     </update>
275
     </update>
276
+    <!--修改开始考试时间-->
277
+    <update id="updateStuStartime">
278
+        update e_paper_student set starttime=#{starttime} where epsid=#{epsid}
279
+    </update>
276
 </mapper>
280
 </mapper>

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentQuestionMapper.xml View File

196
         <result column="eptnum" property="eptnum"></result>
196
         <result column="eptnum" property="eptnum"></result>
197
         <result column="eptorder" property="eptorder"></result>
197
         <result column="eptorder" property="eptorder"></result>
198
         <result column="eptscore" property="eptscore"></result>
198
         <result column="eptscore" property="eptscore"></result>
199
-        <collection property="questions" ofType="java.util.Map" javaType="java.util.Map">
199
+        <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
200
             <result column="epsqid" property="epsqid"></result>
200
             <result column="epsqid" property="epsqid"></result>
201
             <result column="score" property="score"></result>
201
             <result column="score" property="score"></result>
202
             <result column="qorder" property="qorder"></result>
202
             <result column="qorder" property="qorder"></result>

+ 4
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionService.java View File

126
         question.setQstate(1);
126
         question.setQstate(1);
127
         question.setCreatetime(N_Utils.getSecondTimestamp());
127
         question.setCreatetime(N_Utils.getSecondTimestamp());
128
         String questionid = StudyUtil.getId();
128
         String questionid = StudyUtil.getId();
129
+        //暂时添加默认值放置从校本题库天理添加试题无qlevel
130
+        if(question.getQlevel() == null){
131
+            question.setQlevel(1);
132
+        }
129
         question.setQuestionid(questionid);
133
         question.setQuestionid(questionid);
130
         if (N_Utils.isEmpty(question.getSubjectid())) {//科目为空根据教材id取科目
134
         if (N_Utils.isEmpty(question.getSubjectid())) {//科目为空根据教材id取科目
131
             TSubjectBook book = subjectBookMapper.selectByPrimaryKey(question.getLsbid());
135
             TSubjectBook book = subjectBookMapper.selectByPrimaryKey(question.getLsbid());

Loading…
Cancel
Save