Преглед изворни кода

作业逻辑删除,操作日志优化

tags/正式3.13.0
王宁 пре 1 година
родитељ
комит
8229093591
20 измењених фајлова са 112 додато и 98 уклоњено
  1. 9
    10
      sapi/src/main/java/com/xhkjedu/sapi/aop/WebControllerAop.java
  2. 2
    2
      sapi/src/main/resources/mapper/analyze/SchoolSummaryMapper.xml
  3. 4
    4
      sapi/src/main/resources/mapper/analyze/SchoolTaskMapper.xml
  4. 6
    3
      sapi/src/main/resources/mapper/region/RPaperAnalyzeMapper.xml
  5. 2
    2
      sapi/src/main/resources/mapper/region/RegionAnalyzeMapper.xml
  6. 2
    1
      sapi/src/main/resources/mapper/region/SAnalyzeMapper.xml
  7. 9
    10
      sclass/src/main/java/com/xhkjedu/sclass/aop/WebControllerAop.java
  8. 9
    10
      sexam/src/main/java/com/xhkjedu/sexam/aop/WebControllerAop.java
  9. 9
    10
      slive/src/main/java/com/xhkjedu/slive/aop/WebControllerAop.java
  10. 9
    10
      sstudy/src/main/java/com/xhkjedu/sstudy/aop/WebControllerAop.java
  11. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java
  12. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperReportController.java
  13. 3
    0
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperMapper.java
  14. 4
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/model/paper/TPaper.java
  15. 4
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java
  16. 13
    11
      sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml
  17. 11
    5
      sstudy/src/main/resources/mapper/paper/PaperMapper.xml
  18. 2
    2
      sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml
  19. 3
    3
      sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml
  20. 9
    10
      suser/src/main/java/com/xhkjedu/suser/aop/WebControllerAop.java

+ 9
- 10
sapi/src/main/java/com/xhkjedu/sapi/aop/WebControllerAop.java Прегледај датотеку

@@ -13,7 +13,6 @@ import com.xhkjedu.vo.ResultVo;
13 13
 import com.xhkjedu.vo.system.UserVo;
14 14
 import lombok.extern.slf4j.Slf4j;
15 15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17 16
 import org.aspectj.lang.annotation.*;
18 17
 import org.aspectj.lang.reflect.MethodSignature;
19 18
 import org.springframework.stereotype.Component;
@@ -187,15 +186,15 @@ public class WebControllerAop {
187 186
      * @Param [pjp]
188 187
      * @Return java.lang.Object
189 188
      **/
190
-    @Around("handleLog()")
191
-    public Object arround(ProceedingJoinPoint pjp) {
192
-        try {
193
-            return pjp.proceed();
194
-        } catch (Throwable e) {
195
-            e.printStackTrace();
196
-        }
197
-        return null;
198
-    }
189
+    // @Around("handleLog()")
190
+    // public Object arround(ProceedingJoinPoint pjp) {
191
+    //     try {
192
+    //         return pjp.proceed();
193
+    //     } catch (Throwable e) {
194
+    //         e.printStackTrace();
195
+    //     }
196
+    //     return null;
197
+    // }
199 198
 
200 199
     /**
201 200
      * 发送消息

+ 2
- 2
sapi/src/main/resources/mapper/analyze/SchoolSummaryMapper.xml Прегледај датотеку

@@ -25,8 +25,8 @@
25 25
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
26 26
         left join t_class c on pg.classid=c.classid
27 27
         left join t_director d on p.directorid=d.directorid
28
-        where (d.disabled=0 or p.directorid is null) and p.paperstate=22 and p.schoolid=#{sparams.schoolid} and pg.schoolid=#{sparams.schoolid}
29
-        and c.gradeid=#{sparams.gradeid} and p.year=#{sparams.year}
28
+        where p.deleted=0 and p.paperstate=22 and p.schoolid=#{sparams.schoolid} and pg.schoolid=#{sparams.schoolid}
29
+        and c.gradeid=#{sparams.gradeid} and p.year=#{sparams.year} and (d.disabled=0 or p.directorid is null)
30 30
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
31 31
             and p.subjectid=#{sparams.subjectid}
32 32
         </if>

+ 4
- 4
sapi/src/main/resources/mapper/analyze/SchoolTaskMapper.xml Прегледај датотеку

@@ -25,8 +25,8 @@
25 25
         LEFT JOIN t_class c ON pg.classid=c.classid
26 26
         LEFT JOIN T_USER U ON p.createid=u.userid
27 27
         left join t_director d on p.directorid=d.directorid
28
-        where (d.disabled=0 or p.directorid is null) and p.paperstate=22 AND p.schoolid=#{sparams.schoolid} AND pg.schoolid=#{sparams.schoolid}
29
-        AND c.gradeid=#{sparams.gradeid} and p.year=#{sparams.year} AND u.userstate=1
28
+        where p.deleted=0 and p.paperstate=22 AND p.schoolid=#{sparams.schoolid} AND pg.schoolid=#{sparams.schoolid}
29
+        AND c.gradeid=#{sparams.gradeid} and p.year=#{sparams.year} AND u.userstate=1 and (d.disabled=0 or p.directorid is null)
30 30
         <if test="sparams.starttime!=null and sparams.starttime!=0">
31 31
             AND pg.starttime>=#{sparams.starttime}
32 32
         </if>
@@ -46,8 +46,8 @@
46 46
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
47 47
         left join t_class c on c.classid=pg.classid
48 48
         left join t_director d on p.directorid=d.directorid
49
-        where (d.disabled=0 or p.directorid is null) and p.schoolid=#{sparams.schoolid} and p.paperstate=22 and pg.schoolid=#{sparams.schoolid}
50
-        and c.gradeid=#{sparams.gradeid} and p.year=#{sparams.year}
49
+        where d.deleted=0 and p.schoolid=#{sparams.schoolid} and p.paperstate=22 and pg.schoolid=#{sparams.schoolid}
50
+        and c.gradeid=#{sparams.gradeid} and p.year=#{sparams.year} and (d.disabled=0 or p.directorid is null)
51 51
         <if test="sparams.starttime!=null and sparams.starttime!=0">
52 52
             AND pg.starttime>=#{sparams.starttime}
53 53
         </if>

+ 6
- 3
sapi/src/main/resources/mapper/region/RPaperAnalyzeMapper.xml Прегледај датотеку

@@ -8,7 +8,8 @@
8 8
         LEFT JOIN t_school s on p.schoolid=s.schoolid and pg.schoolid=s.schoolid
9 9
         left join t_class c on c.classid=pg.classid
10 10
         left join t_director d on p.directorid=d.directorid
11
-        where (d.disabled=0 or p.directorid is null) and s.schoollevel=#{param.level} and s.schoolstate=1 and p.year=#{param.year}
11
+        where p.deleted=0 and s.schoollevel=#{param.level} and s.schoolstate=1 and p.year=#{param.year}
12
+        and (d.disabled=0 or p.directorid is null)
12 13
         <if test="param.begintime!=null and param.begintime!=0">
13 14
             and pg.starttime between #{param.begintime} and #{param.endtime}
14 15
         </if>
@@ -73,7 +74,8 @@
73 74
         left join t_school s on p.schoolid=s.schoolid and pg.schoolid=s.schoolid
74 75
         left join t_class c on c.classid=pg.classid
75 76
         left join t_director d on p.directorid=d.directorid
76
-        where (d.disabled=0 or p.directorid is null) and s.schoollevel=#{param.level} and s.schoolstate=1 and p.year=#{param.year}
77
+        where p.deleted=0 and s.schoollevel=#{param.level} and s.schoolstate=1 and p.year=#{param.year}
78
+        and (d.disabled=0 or p.directorid is null)
77 79
         <if test="param.begintime!=null and param.begintime!=0">
78 80
             and pg.starttime between #{param.begintime} and #{param.endtime}
79 81
         </if>
@@ -123,7 +125,8 @@
123 125
         left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid and ps.psstate in(1,2)
124 126
         left join t_class c on c.classid=pg.classid
125 127
         left join t_director d on p.directorid=d.directorid
126
-        where (d.disabled=0 or p.directorid is null) and s.schoollevel=#{param.level} and s.schoolstate=1 and p.year=#{param.year}
128
+        where p.deleted=0 and s.schoollevel=#{param.level} and s.schoolstate=1 and p.year=#{param.year}
129
+        and (d.disabled=0 or p.directorid is null)
127 130
         <if test="param.begintime!=null and param.begintime!=0">
128 131
             and pg.starttime between #{param.begintime} and #{param.endtime}
129 132
         </if>

+ 2
- 2
sapi/src/main/resources/mapper/region/RegionAnalyzeMapper.xml Прегледај датотеку

@@ -98,7 +98,7 @@
98 98
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
99 99
         left join t_class c on c.classid=pg.classid
100 100
         left join t_director d on p.directorid=d.directorid
101
-        where (d.disabled=0 or p.directorid is null) and s.schoolstate=1
101
+        where p.deleted=0 and s.schoolstate=1 and (d.disabled=0 or p.directorid is null)
102 102
         <if test="param.year!=null and param.year!=0">
103 103
             and c.year=#{param.year}
104 104
         </if>
@@ -172,7 +172,7 @@
172 172
         and pg.starttime between #{param.begintime} and #{param.endtime}
173 173
         left join t_class c on c.classid=pg.classid
174 174
         left join t_director d on p.directorid=d.directorid
175
-        where (d.disabled=0 or p.directorid is null) and s.schoolstate=1
175
+        where p.deleted=0 and s.schoolstate=1 and (d.disabled=0 or p.directorid is null)
176 176
         <if test="param.year!=null and param.year!=0">
177 177
             and c.year=#{param.year}
178 178
         </if>

+ 2
- 1
sapi/src/main/resources/mapper/region/SAnalyzeMapper.xml Прегледај датотеку

@@ -82,7 +82,8 @@
82 82
         left join t_class c on pg.classid=c.classid
83 83
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
84 84
         left join t_director d on p.directorid=d.directorid
85
-        where (d.disabled=0 or p.directorid is null) and c.year=#{param.year} and p.schoolid=#{param.schoolid} and pg.pgstate=22 and pg.schoolid=#{param.schoolid}
85
+        where p.deleted=0 and c.year=#{param.year} and p.schoolid=#{param.schoolid} and pg.pgstate=22 and pg.schoolid=#{param.schoolid}
86
+        and (d.disabled=0 or p.directorid is null)
86 87
         and pg.starttime between #{param.begintime} and #{param.endtime}
87 88
         group by c.gradeid,p.subjectid
88 89
     </select>

+ 9
- 10
sclass/src/main/java/com/xhkjedu/sclass/aop/WebControllerAop.java Прегледај датотеку

@@ -13,7 +13,6 @@ import com.xhkjedu.vo.ResultVo;
13 13
 import com.xhkjedu.vo.system.UserVo;
14 14
 import lombok.extern.slf4j.Slf4j;
15 15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17 16
 import org.aspectj.lang.annotation.*;
18 17
 import org.aspectj.lang.reflect.MethodSignature;
19 18
 import org.springframework.stereotype.Component;
@@ -187,15 +186,15 @@ public class WebControllerAop {
187 186
      * @Param [pjp]
188 187
      * @Return java.lang.Object
189 188
      **/
190
-    @Around("handleLog()")
191
-    public Object arround(ProceedingJoinPoint pjp) {
192
-        try {
193
-            return pjp.proceed();
194
-        } catch (Throwable e) {
195
-            e.printStackTrace();
196
-        }
197
-        return null;
198
-    }
189
+    // @Around("handleLog()")
190
+    // public Object arround(ProceedingJoinPoint pjp) {
191
+    //     try {
192
+    //         return pjp.proceed();
193
+    //     } catch (Throwable e) {
194
+    //         e.printStackTrace();
195
+    //     }
196
+    //     return null;
197
+    // }
199 198
 
200 199
     /**
201 200
      * 发送消息

+ 9
- 10
sexam/src/main/java/com/xhkjedu/sexam/aop/WebControllerAop.java Прегледај датотеку

@@ -13,7 +13,6 @@ import com.xhkjedu.vo.ResultVo;
13 13
 import com.xhkjedu.vo.system.UserVo;
14 14
 import lombok.extern.slf4j.Slf4j;
15 15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17 16
 import org.aspectj.lang.annotation.*;
18 17
 import org.aspectj.lang.reflect.MethodSignature;
19 18
 import org.springframework.stereotype.Component;
@@ -187,15 +186,15 @@ public class WebControllerAop {
187 186
      * @Param [pjp]
188 187
      * @Return java.lang.Object
189 188
      **/
190
-    @Around("handleLog()")
191
-    public Object arround(ProceedingJoinPoint pjp) {
192
-        try {
193
-            return pjp.proceed();
194
-        } catch (Throwable e) {
195
-            e.printStackTrace();
196
-        }
197
-        return null;
198
-    }
189
+    // @Around("handleLog()")
190
+    // public Object arround(ProceedingJoinPoint pjp) {
191
+    //     try {
192
+    //         return pjp.proceed();
193
+    //     } catch (Throwable e) {
194
+    //         e.printStackTrace();
195
+    //     }
196
+    //     return null;
197
+    // }
199 198
 
200 199
     /**
201 200
      * 发送消息

+ 9
- 10
slive/src/main/java/com/xhkjedu/slive/aop/WebControllerAop.java Прегледај датотеку

@@ -13,7 +13,6 @@ import com.xhkjedu.vo.ResultVo;
13 13
 import com.xhkjedu.vo.system.UserVo;
14 14
 import lombok.extern.slf4j.Slf4j;
15 15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17 16
 import org.aspectj.lang.annotation.*;
18 17
 import org.aspectj.lang.reflect.MethodSignature;
19 18
 import org.springframework.stereotype.Component;
@@ -187,15 +186,15 @@ public class WebControllerAop {
187 186
      * @Param [pjp]
188 187
      * @Return java.lang.Object
189 188
      **/
190
-    @Around("handleLog()")
191
-    public Object arround(ProceedingJoinPoint pjp) {
192
-        try {
193
-            return pjp.proceed();
194
-        } catch (Throwable e) {
195
-            e.printStackTrace();
196
-        }
197
-        return null;
198
-    }
189
+    // @Around("handleLog()")
190
+    // public Object arround(ProceedingJoinPoint pjp) {
191
+    //     try {
192
+    //         return pjp.proceed();
193
+    //     } catch (Throwable e) {
194
+    //         e.printStackTrace();
195
+    //     }
196
+    //     return null;
197
+    // }
199 198
 
200 199
     /**
201 200
      * 发送消息

+ 9
- 10
sstudy/src/main/java/com/xhkjedu/sstudy/aop/WebControllerAop.java Прегледај датотеку

@@ -13,7 +13,6 @@ import com.xhkjedu.vo.ResultVo;
13 13
 import com.xhkjedu.vo.system.UserVo;
14 14
 import lombok.extern.slf4j.Slf4j;
15 15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17 16
 import org.aspectj.lang.annotation.*;
18 17
 import org.aspectj.lang.reflect.MethodSignature;
19 18
 import org.springframework.stereotype.Component;
@@ -187,15 +186,15 @@ public class WebControllerAop {
187 186
      * @Param [pjp]
188 187
      * @Return java.lang.Object
189 188
      **/
190
-    @Around("handleLog()")
191
-    public Object arround(ProceedingJoinPoint pjp) {
192
-        try {
193
-            return pjp.proceed();
194
-        } catch (Throwable e) {
195
-            e.printStackTrace();
196
-        }
197
-        return null;
198
-    }
189
+    // @Around("handleLog()")
190
+    // public Object arround(ProceedingJoinPoint pjp) {
191
+    //     try {
192
+    //         return pjp.proceed();
193
+    //     } catch (Throwable e) {
194
+    //         e.printStackTrace();
195
+    //     }
196
+    //     return null;
197
+    // }
199 198
 
200 199
     /**
201 200
      * 发送消息

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java Прегледај датотеку

@@ -124,7 +124,7 @@ public class PaperController {
124 124
      * @return com.xhkjedu.vo.ResultVo
125 125
      */
126 126
     @PostMapping("del")
127
-    @Action("作业管理-删除附件作业")
127
+    @Action("作业管理-删除作业")
128 128
     public ResultVo delPaper(@RequestBody TPaper paper){
129 129
         Integer result = paperService.delPaper(paper);
130 130
         if(result>0){

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperReportController.java Прегледај датотеку

@@ -38,7 +38,7 @@ public class PaperReportController {
38 38
      * @return com.xhkjedu.vo.ResultVo
39 39
      **/
40 40
     @PostMapping("gpr")
41
-    @Action("作业管理-生报告")
41
+    @Action("作业管理-生报告")
42 42
     public ResultVo generatePaperReport(@RequestBody TPaperClass paper) {
43 43
         Integer paperid = paper.getPaperid();
44 44
         N_Utils.validation(new Object[]{paperid, "作业id", 1});

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperMapper.java Прегледај датотеку

@@ -127,6 +127,9 @@ public interface PaperMapper extends TkMapper<TPaper> {
127 127
      **/
128 128
     Integer delPaper(Integer paperid);
129 129
 
130
+    //修改作业删除状态
131
+    Integer updatePaperDeleted(@Param("paperid")Integer paperid,@Param("deleted")Integer deleted);
132
+
130 133
     //获取作业原文件保存地址列表
131 134
     List<String> listSourcePath(Integer paperid);
132 135
 

+ 4
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/model/paper/TPaper.java Прегледај датотеку

@@ -79,11 +79,14 @@ public class TPaper extends BaseBean {
79 79
     //发布年份
80 80
     private Integer year;
81 81
 
82
+    //是否删除0未删除1已删除
83
+    private Integer deleted;
84
+
82 85
     //作业附件
83 86
     @Transient
84 87
     private List<TPaperFile> pfiles = new ArrayList<>();
85 88
 
86
-    //答题卡试题json对象集合
89
+    //答题卡试题json对象集合
87 90
     @Transient
88 91
     private String questionStr;
89 92
 

+ 4
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java Прегледај датотеку

@@ -193,6 +193,7 @@ public class PaperService {
193 193
         paper.setChecktype(0);
194 194
         paper.setHasreport(0);
195 195
         paper.setTimetype(1);
196
+        paper.setDeleted(0);
196 197
         String directorid = paper.getDirectorid();
197 198
         if (directorid != null && (directorid.equals("0") || directorid.equals(""))) {
198 199
             paper.setDirectorid(null);
@@ -353,7 +354,7 @@ public class PaperService {
353 354
      */
354 355
     public Integer delPaper(TPaper paper){
355 356
 
356
-        int result =  paperMapper.delPaper(paper.getPaperid());
357
+        // int result =  paperMapper.delPaper(paper.getPaperid());
357 358
         //2023-06-08新增作业复制功能,因为文件仅复制地址,之前删除文件取消
358 359
        /* List<TPaperFile> pfilelist = paperFileService.listObjsByPaperid(paper.getPaperid());//获取作业文件夹
359 360
 
@@ -369,7 +370,8 @@ public class PaperService {
369 370
             }
370 371
             messageSender.resourceDel(resourceUrls);//给文件服务器发送mq删除文件
371 372
         }*/
372
-        return result;
373
+        //2023-11-22作业删除改为逻辑删除
374
+        return paperMapper.updatePaperDeleted(paper.getPaperid(),1);
373 375
     }
374 376
 
375 377
     /**

+ 13
- 11
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml Прегледај датотеку

@@ -296,7 +296,7 @@
296 296
         select p.paperid,p.papername,pg.starttime
297 297
         from t_paper p left join t_paper_class pg on p.paperid = pg.paperid
298 298
         left join t_director d on p.directorid=d.directorid
299
-        where (d.disabled=0 or p.directorid is null) and p.createid=#{createid}
299
+        where p.deleted=0 and p.createid=#{createid} and (d.disabled=0 or p.directorid is null)
300 300
         group by p.paperid order by pg.starttime desc limit #{papernum}
301 301
     </select>
302 302
     <!--获取作业班级列表-->
@@ -381,8 +381,8 @@
381 381
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
382 382
         left join t_class c on pg.classid=c.classid
383 383
         left join t_director d on p.directorid=d.directorid
384
-        where (d.disabled=0 or p.directorid is null) and p.paperstate=22 and p.schoolid=#{paper.schoolid} and pg.schoolid=#{paper.schoolid}
385
-        and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
384
+        where p.deleted=0 and p.paperstate=22 and p.schoolid=#{paper.schoolid} and pg.schoolid=#{paper.schoolid}
385
+        and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and (d.disabled=0 or p.directorid is null)
386 386
         <if test="paper.starttime!=null and paper.starttime!=0">
387 387
             and pg.starttime>=#{paper.starttime}
388 388
         </if>
@@ -404,9 +404,9 @@
404 404
     <select id="listPaperStuGrade" resultType="java.util.Map">
405 405
         select a.*,ifnull(truncate(a.commitnum*100/a.sdnum,2),0)commitrate
406 406
         from(select cs.*
407
-        ,count(distinct if(p.paperid is not null and (d.disabled=0 or p.directorid is null),ps.psid,null))sdnum
408
-        ,count(distinct if(ps.psstate in (1,2) and p.paperid is not null and (d.disabled=0 or p.directorid is null),ps.psid,null))commitnum
409
-        ,ifnull(truncate(sum(if(p.paperid is not null and (d.disabled=0 or p.directorid is null),ps.userscore,0))*100/
407
+        ,count(distinct if(p.paperid is not null and p.deleted=0 and (d.disabled=0 or p.directorid is null),ps.psid,null))sdnum
408
+        ,count(distinct if(ps.psstate in (1,2) and p.paperid is not null and p.deleted=0 and (d.disabled=0 or p.directorid is null),ps.psid,null))commitnum
409
+        ,ifnull(truncate(sum(if(p.paperid is not null and p.deleted=0 and (d.disabled=0 or p.directorid is null),ps.userscore,0))*100/
410 410
         sum(if(p.paperid is not null and (d.disabled=0 or p.directorid is null),ps.paperscore,0)),2),0)scorerate
411 411
         from (select cs2.studentid,u.username studentname
412 412
         from t_class_student cs2,t_class c,t_user u
@@ -422,7 +422,7 @@
422 422
         group by cs2.studentid)cs
423 423
         left join t_paper_student ps on ps.studentid=cs.studentid
424 424
         left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
425
-        left join t_paper p on ps.paperid=p.paperid and p.paperstate=22
425
+        left join t_paper p on ps.paperid=p.paperid and p.paperstate=22 and p.deleted=0
426 426
         <if test="paper.starttime!=null and paper.starttime!=0">
427 427
             and pg.starttime>=#{paper.starttime}
428 428
         </if>
@@ -454,8 +454,8 @@
454 454
         left join t_paper p on ps.paperid=p.paperid
455 455
         left join t_subject s on p.subjectid=s.subjectid
456 456
         left join t_director d on p.directorid=d.directorid
457
-        where (d.disabled=0 or p.directorid is null) and ps.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and
458
-        p.paperstate=22
457
+        where p.deleted=0 and ps.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and
458
+        p.paperstate=22  and (d.disabled=0 or p.directorid is null)
459 459
         <if test="paper.starttime!=null and paper.starttime!=0">
460 460
             and pg.starttime>=#{paper.starttime}
461 461
         </if>
@@ -480,7 +480,8 @@
480 480
         left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
481 481
         left join t_paper p on ps.paperid=p.paperid
482 482
         left join t_director d on p.directorid=d.directorid
483
-        where (d.disabled=0 or p.directorid is null) and ps.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and p.paperstate=22
483
+        where p.deleted=0 and ps.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and p.paperstate=22
484
+        and (d.disabled=0 or p.directorid is null)
484 485
         <if test="paper.starttime!=null and paper.starttime!=0">
485 486
             and pg.starttime>=#{paper.starttime}
486 487
         </if>
@@ -505,7 +506,8 @@
505 506
         left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
506 507
         left join t_paper p on pg.paperid=p.paperid
507 508
         left join t_director d on p.directorid=d.directorid
508
-        where (d.disabled=0 or p.directorid is null) and c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and p.paperstate=22
509
+        where p.deleted=0 and c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and p.paperstate=22
510
+        and (d.disabled=0 or p.directorid is null)
509 511
         <if test="paper.starttime!=null and paper.starttime!=0">
510 512
             and pg.starttime>=#{paper.starttime}
511 513
         </if>

+ 11
- 5
sstudy/src/main/resources/mapper/paper/PaperMapper.xml Прегледај датотеку

@@ -198,7 +198,7 @@
198 198
         from t_paper p left join t_user u on p.createid=u.userid
199 199
         left join t_paper_class pg on p.paperid=pg.paperid
200 200
         left join t_director d on p.directorid=d.directorid
201
-        where (d.disabled=0 or p.directorid is null) and p.lsbid=#{paper.lsbid}
201
+        where p.deleted=0 and p.lsbid=#{paper.lsbid} and (d.disabled=0 or p.directorid is null)
202 202
         <if test="userVo.usertype!=null and userVo.usertype==0">
203 203
             and p.schoolid=#{userVo.schoolid}
204 204
         </if>
@@ -233,7 +233,7 @@
233 233
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime,p.createid,p.hasreport,p.schoolid
234 234
         ,(select u.username from t_user u where u.userid=p.createid)createname
235 235
         from t_paper p left join t_director d on p.directorid=d.directorid
236
-        where (d.disabled=0 or p.directorid is null) and p.lsbid=#{paper.lsbid} and p.paperstate=21
236
+        where p.deleted=0 and p.lsbid=#{paper.lsbid} and p.paperstate=21 and (d.disabled=0 or p.directorid is null)
237 237
         <if test="userVo.usertype!=null and userVo.usertype==0">
238 238
             and p.schoolid=#{userVo.schoolid}
239 239
         </if>
@@ -277,7 +277,7 @@
277 277
         left join t_paper_class pg on p.paperid=pg.paperid
278 278
         left join t_paper_student ps on p.paperid=ps.paperid and pg.classid=ps.classid
279 279
         left join t_director d on p.directorid=d.directorid
280
-        where (d.disabled=0 or p.directorid is null)
280
+        where p.deleted=0 and (d.disabled=0 or p.directorid is null)
281 281
         and (p.createid=#{checkid} or ps.checkid=#{checkid}) and ps.psstate in (1,2) and ps.pschecked!=1
282 282
         group by p.paperid order by p.createtime desc
283 283
     </select>
@@ -332,8 +332,8 @@
332 332
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
333 333
         left join t_class c on pg.classid=c.classid
334 334
         left join t_director d on p.directorid=d.directorid
335
-        where (d.disabled=0 or p.directorid is null) and p.createid=#{paper.createid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
336
-        and pg.schoolid=#{paper.schoolid}
335
+        where p.deleted=0 and p.createid=#{paper.createid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
336
+        and pg.schoolid=#{paper.schoolid} and (d.disabled=0 or p.directorid is null)
337 337
         <if test="paper.starttime!=null and paper.starttime!=0">
338 338
             and pg.starttime>=#{paper.starttime}
339 339
         </if>
@@ -360,6 +360,12 @@
360 360
         LEFT JOIN t_question_student qs ON p.paperid=qs.paperid
361 361
         WHERE p.paperid=#{paperid}
362 362
     </delete>
363
+
364
+    <!--修改作业删除状态-->
365
+    <update id="updatePaperDeleted">
366
+        update t_paper set deleted=#{deleted} where paperid=#{paperid}
367
+    </update>
368
+
363 369
     <!--获取作业原文件保存地址列表-->
364 370
     <select id="listSourcePath" resultType="java.lang.String">
365 371
         select distinct sourcepath from t_paper_file where paperid=#{paperid} and fileclass=1

+ 2
- 2
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml Прегледај датотеку

@@ -33,7 +33,7 @@
33 33
         ,(select u.username from t_user u where u.userid=p.createid)createname
34 34
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
35 35
         left join t_director d on p.directorid=d.directorid
36
-        where (d.disabled=0 or p.directorid is null) and (p.createid=#{paper.teacherid} or pg.checkid=#{paper.teacherid} or
36
+        where p.deleted=0 and (d.disabled=0 or p.directorid is null) and (p.createid=#{paper.teacherid} or pg.checkid=#{paper.teacherid} or
37 37
         (p.hashb=1 and p.schoolid=#{paper.schoolid} and pg.classid in (${paper.classids})) or
38 38
         (pg.classid in (${paper.bxclassids})))
39 39
         <if test="paper.lsbid!=null and paper.lsbid!='0'.toString() and paper.lsbid!=''">
@@ -55,7 +55,7 @@
55 55
         ,p.subjectid,p.paperscore,p.schoolid
56 56
         ,(select u.username from t_user u where u.userid=p.createid)createname
57 57
         from t_paper p left join t_director d on p.directorid=d.directorid
58
-        where (d.disabled=0 or p.directorid is null) and p.createid=#{paper.teacherid} and p.paperstate=#{paper.psstate}
58
+        where p.deleted=0 and p.createid=#{paper.teacherid} and p.paperstate=#{paper.psstate} and (d.disabled=0 or p.directorid is null)
59 59
         order by p.createtime desc,p.paperid desc
60 60
     </select>
61 61
     <!--作业情况-->

+ 3
- 3
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml Прегледај датотеку

@@ -18,7 +18,7 @@
18 18
         left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
19 19
         left join t_user u on p.createid = u.userid
20 20
         left join t_director d on p.directorid=d.directorid
21
-        where (d.disabled=0 or p.directorid is null) and ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
21
+        where p.deleted=0 and ps.studentid = #{ps.studentid} and (d.disabled=0 or p.directorid is null) and pg.starttime&lt;=#{ps.nowtime}
22 22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
23 23
             and p.subjectid=#{ps.subjectid}
24 24
         </if>
@@ -48,7 +48,7 @@
48 48
         left join t_user u on p.createid = u.userid
49 49
         left join t_subject s on p.subjectid = s.subjectid
50 50
         left join t_director d on p.directorid=d.directorid
51
-        where (d.disabled=0 or p.directorid is null) and ps.checkid=#{ps.checkid} and ps.psstate in (1,2) and ps.pschecked!=1
51
+        where p.deleted=0 and ps.checkid=#{ps.checkid} and (d.disabled=0 or p.directorid is null) and ps.psstate in (1,2) and ps.pschecked!=1
52 52
         ORDER BY ps.stoptime desc LIMIT #{ps.page},#{ps.pageSize}
53 53
     </select>
54 54
     <!--作业说明-->
@@ -200,7 +200,7 @@
200 200
         left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
201 201
         left join t_user u on p.createid = u.userid
202 202
         left join t_director d on p.directorid=d.directorid
203
-        where (d.disabled=0 or p.directorid is null) and ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
203
+        where p.deleted=0 and ps.studentid = #{ps.studentid} and (d.disabled=0 or p.directorid is null) and pg.starttime&lt;=#{ps.nowtime}
204 204
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
205 205
             and p.subjectid=#{ps.subjectid}
206 206
         </if>

+ 9
- 10
suser/src/main/java/com/xhkjedu/suser/aop/WebControllerAop.java Прегледај датотеку

@@ -13,7 +13,6 @@ import com.xhkjedu.vo.ResultVo;
13 13
 import com.xhkjedu.vo.system.UserVo;
14 14
 import lombok.extern.slf4j.Slf4j;
15 15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17 16
 import org.aspectj.lang.annotation.*;
18 17
 import org.aspectj.lang.reflect.MethodSignature;
19 18
 import org.springframework.stereotype.Component;
@@ -187,15 +186,15 @@ public class WebControllerAop {
187 186
      * @Param [pjp]
188 187
      * @Return java.lang.Object
189 188
      **/
190
-    @Around("handleLog()")
191
-    public Object arround(ProceedingJoinPoint pjp) {
192
-        try {
193
-            return pjp.proceed();
194
-        } catch (Throwable e) {
195
-            e.printStackTrace();
196
-        }
197
-        return null;
198
-    }
189
+    // @Around("handleLog()")
190
+    // public Object arround(ProceedingJoinPoint pjp) {
191
+    //     try {
192
+    //         return pjp.proceed();
193
+    //     } catch (Throwable e) {
194
+    //         e.printStackTrace();
195
+    //     }
196
+    //     return null;
197
+    // }
199 198
 
200 199
     /**
201 200
      * 发送消息

Loading…
Откажи
Сачувај