Quellcode durchsuchen

完善开始做作业

tags/正式3.9.0
王宁 vor 1 Jahr
Ursprung
Commit
979a6a6f63

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java Datei anzeigen

@@ -114,9 +114,9 @@ public class PaperStudentService {
114 114
             }
115 115
 
116 116
             if(N_Utils.isListNotEmpty(savelist)) paperStudentQuestionMapper.batchSave(savelist);
117
-            updateState(null,null,psid,1);
118 117
             paperQuestionBeans = getPaperQuestion(psid);
119 118
         }
119
+        updateState(null,null,psid,1);
120 120
 
121 121
         return paperQuestionBeans;
122 122
     }

+ 7
- 4
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java Datei anzeigen

@@ -106,12 +106,13 @@ public class PaperStudentWebService {
106 106
                     if(N_Utils.isListNotEmpty(stuques)) savelist.addAll(stuques);
107 107
                 }
108 108
                 if(N_Utils.isListNotEmpty(savelist)) paperStudentQuestionMapper.batchSave(savelist);
109
-                Integer timestamp = N_Utils.getSecondTimestamp();
110
-                paperStudentMapper.updateState(null,null,psid,1,timestamp);//更改开始状态
109
+
111 110
                 types = paperAnalyzeMapper.listPeopleDetailAnalyze(psid);
112 111
             }
113 112
             StudyUtil.setPaperQuestion(types, paperAnalyzeMapper);
114 113
             paper.setTypes(types);
114
+            Integer timestamp = N_Utils.getSecondTimestamp();
115
+            paperStudentMapper.updateState(null,null,psid,1,timestamp);//更改开始状态
115 116
         }catch (Exception e){
116 117
             log.error("开始做作业失败:"+e.getMessage());
117 118
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -131,14 +132,16 @@ public class PaperStudentWebService {
131 132
         StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
132 133
         List<StudentPaperTypeVo> types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
133 134
         if (N_Utils.isListEmpty(types)){
134
-            Integer timestamp = N_Utils.getSecondTimestamp();
135
-            paperStudentMapper.updateState(null,null,psid,1,timestamp);//更改开始状态
135
+
136 136
             paperStudentScantronService.saveBatchStudentScantron(psid);
137 137
             types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
138 138
         }
139
+
139 140
         paper.setTypes(types);
140 141
         List<TPaperFile> files = paperMapper.listPaperFile(paper.getPaperid(), 0);
141 142
         paper.setFiles(files);
143
+        Integer timestamp = N_Utils.getSecondTimestamp();
144
+        paperStudentMapper.updateState(null,null,psid,1,timestamp);//更改开始状态
142 145
         return paper;
143 146
     }
144 147
 

+ 0
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml Datei anzeigen

@@ -334,6 +334,5 @@
334 334
     <select id="listPaperStuForQueQues" resultType="com.xhkjedu.sstudy.model.paperstudent.TPaperStudent">
335 335
         select ps.* from t_paper_student ps where ps.paperid=#{paperid}
336 336
         and psid not in (select sq.psid from t_paper_student_question sq where sq.paperid=#{paperid} group by sq.psid) order by ps.psid
337
-
338 337
     </select>
339 338
 </mapper>

Laden…
Abbrechen
Speichern