Ver código fonte

处理2022-10-18之前靶向作业分析数据

tags/正式3.9.0
王宁 1 ano atrás
pai
commit
5d6d4161ee

+ 16
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java Ver arquivo

@@ -308,13 +308,28 @@ public class PaperController {
308 308
         return new ResultVo(0, "获取批阅班级列表成功", list);
309 309
     }
310 310
 
311
-    //该方法用于重新生成之前的作业报告
311
+    /*
312
+    * @Description 该方法用于重新生成之前的作业报告
313
+    * @Author WN
314
+    * @Date 2022/10/18 15:34:21
315
+    */
312 316
     @GetMapping("/hpa")
313 317
     public ResultVo handlePaperAnalyze(Integer paperid) {
314 318
         paperService.listPapersForAnalyze(paperid);
315 319
         return new ResultVo(0, "成功处理作业分析");
316 320
     }
317 321
 
322
+    /*
323
+    * @Description 处理第一次(上方法)未处理靶向作业
324
+    * @Author WN
325
+    * @Date 2023/5/31 15:15:03
326
+    */
327
+    @GetMapping("/hpa2")
328
+    public ResultVo handlePaperAnalyze2(Integer paperid) {
329
+        paperService.listPapersForAnalyze2(paperid);
330
+        return new ResultVo(0, "成功处理作业分析");
331
+    }
332
+
318 333
     //获取作业中听力文件
319 334
     @PostMapping("/hfile")
320 335
     public ResultVo getPaperHearfile(@RequestBody TPaper paper) {

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperMapper.java Ver arquivo

@@ -152,6 +152,8 @@ public interface PaperMapper extends TkMapper<TPaper> {
152 152
 
153 153
     //获取所有试卷用于重新生成分析
154 154
     List<TPaper> listPapersForAnalyze(@Param("paperid") Integer paperid);
155
+    //获取未生成知识点靶向试卷用于重新生成分析
156
+    List<TPaper> listPapersForAnalyze2(@Param("paperid") Integer paperid);
155 157
 
156 158
     //获取作业听力文件
157 159
     String getHearfileByPaperid(@Param("paperid") Integer paperid);

+ 8
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java Ver arquivo

@@ -1202,7 +1202,7 @@ public class PaperService {
1202 1202
     public void listPapersForAnalyze(Integer paperid){
1203 1203
         List<TPaper> papers = paperMapper.listPapersForAnalyze(paperid);
1204 1204
         for(TPaper p : papers){
1205
-            if(p.getPapertype() == 1){
1205
+            if(p.getPapertype() == 1 || p.getPapertype() == 3){
1206 1206
                 //题库
1207 1207
                 this.generatePaperAnalyze(p);
1208 1208
             }else{
@@ -1216,6 +1216,13 @@ public class PaperService {
1216 1216
             }
1217 1217
         }
1218 1218
     }
1219
+    public void listPapersForAnalyze2(Integer paperid){
1220
+        List<TPaper> papers = paperMapper.listPapersForAnalyze2(paperid);
1221
+        for(TPaper p : papers){
1222
+            //题库
1223
+            this.generatePaperAnalyze(p);
1224
+        }
1225
+    }
1219 1226
 
1220 1227
     //获取作业听力文件地址
1221 1228
     public String getHearfileByPaperid(Integer paperid){

+ 9
- 0
sstudy/src/main/resources/mapper/paper/PaperMapper.xml Ver arquivo

@@ -399,6 +399,15 @@
399 399
         </if>
400 400
         order by paperid
401 401
     </select>
402
+    <!--获获取未生成知识点靶向试卷用于重新生成分析-->
403
+    <select id="listPapersForAnalyze2" resultType="com.xhkjedu.sstudy.model.paper.TPaper">
404
+        select p.* from t_paper_analyze a left join t_paper p on a.paperid=p.paperid
405
+        where p.papertype=3 and (pointjson is null or pointjson='')
406
+        <if test="paperid!=null and paperid!=''">
407
+            and p.paperid=#{paperid}
408
+        </if>
409
+        order by p.paperid
410
+    </select>
402 411
 
403 412
     <!--获取作业听力文件-->
404 413
     <select id="getHearfileByPaperid" resultType="java.lang.String">

Carregando…
Cancelar
Salvar