Browse Source

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

tags/正式3.9.0
王宁 1 year ago
parent
commit
5d6d4161ee

+ 16
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java View File

308
         return new ResultVo(0, "获取批阅班级列表成功", list);
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
     @GetMapping("/hpa")
316
     @GetMapping("/hpa")
313
     public ResultVo handlePaperAnalyze(Integer paperid) {
317
     public ResultVo handlePaperAnalyze(Integer paperid) {
314
         paperService.listPapersForAnalyze(paperid);
318
         paperService.listPapersForAnalyze(paperid);
315
         return new ResultVo(0, "成功处理作业分析");
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
     @PostMapping("/hfile")
334
     @PostMapping("/hfile")
320
     public ResultVo getPaperHearfile(@RequestBody TPaper paper) {
335
     public ResultVo getPaperHearfile(@RequestBody TPaper paper) {

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperMapper.java View File

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

+ 8
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

1202
     public void listPapersForAnalyze(Integer paperid){
1202
     public void listPapersForAnalyze(Integer paperid){
1203
         List<TPaper> papers = paperMapper.listPapersForAnalyze(paperid);
1203
         List<TPaper> papers = paperMapper.listPapersForAnalyze(paperid);
1204
         for(TPaper p : papers){
1204
         for(TPaper p : papers){
1205
-            if(p.getPapertype() == 1){
1205
+            if(p.getPapertype() == 1 || p.getPapertype() == 3){
1206
                 //题库
1206
                 //题库
1207
                 this.generatePaperAnalyze(p);
1207
                 this.generatePaperAnalyze(p);
1208
             }else{
1208
             }else{
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
     public String getHearfileByPaperid(Integer paperid){
1228
     public String getHearfileByPaperid(Integer paperid){

+ 9
- 0
sstudy/src/main/resources/mapper/paper/PaperMapper.xml View File

399
         </if>
399
         </if>
400
         order by paperid
400
         order by paperid
401
     </select>
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
     <select id="getHearfileByPaperid" resultType="java.lang.String">
413
     <select id="getHearfileByPaperid" resultType="java.lang.String">

Loading…
Cancel
Save