Browse Source

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

tags/正式3.13.0
王宁 1 year ago
parent
commit
8229093591
20 changed files with 112 additions and 98 deletions
  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 View File

13
 import com.xhkjedu.vo.system.UserVo;
13
 import com.xhkjedu.vo.system.UserVo;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
 import org.aspectj.lang.JoinPoint;
15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17
 import org.aspectj.lang.annotation.*;
16
 import org.aspectj.lang.annotation.*;
18
 import org.aspectj.lang.reflect.MethodSignature;
17
 import org.aspectj.lang.reflect.MethodSignature;
19
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
187
      * @Param [pjp]
186
      * @Param [pjp]
188
      * @Return java.lang.Object
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 View File

25
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
25
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
26
         left join t_class c on pg.classid=c.classid
26
         left join t_class c on pg.classid=c.classid
27
         left join t_director d on p.directorid=d.directorid
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
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
30
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
31
             and p.subjectid=#{sparams.subjectid}
31
             and p.subjectid=#{sparams.subjectid}
32
         </if>
32
         </if>

+ 4
- 4
sapi/src/main/resources/mapper/analyze/SchoolTaskMapper.xml View File

25
         LEFT JOIN t_class c ON pg.classid=c.classid
25
         LEFT JOIN t_class c ON pg.classid=c.classid
26
         LEFT JOIN T_USER U ON p.createid=u.userid
26
         LEFT JOIN T_USER U ON p.createid=u.userid
27
         left join t_director d on p.directorid=d.directorid
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
         <if test="sparams.starttime!=null and sparams.starttime!=0">
30
         <if test="sparams.starttime!=null and sparams.starttime!=0">
31
             AND pg.starttime>=#{sparams.starttime}
31
             AND pg.starttime>=#{sparams.starttime}
32
         </if>
32
         </if>
46
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
46
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
47
         left join t_class c on c.classid=pg.classid
47
         left join t_class c on c.classid=pg.classid
48
         left join t_director d on p.directorid=d.directorid
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
         <if test="sparams.starttime!=null and sparams.starttime!=0">
51
         <if test="sparams.starttime!=null and sparams.starttime!=0">
52
             AND pg.starttime>=#{sparams.starttime}
52
             AND pg.starttime>=#{sparams.starttime}
53
         </if>
53
         </if>

+ 6
- 3
sapi/src/main/resources/mapper/region/RPaperAnalyzeMapper.xml View File

8
         LEFT JOIN t_school s on p.schoolid=s.schoolid and pg.schoolid=s.schoolid
8
         LEFT JOIN t_school s on p.schoolid=s.schoolid and pg.schoolid=s.schoolid
9
         left join t_class c on c.classid=pg.classid
9
         left join t_class c on c.classid=pg.classid
10
         left join t_director d on p.directorid=d.directorid
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
         <if test="param.begintime!=null and param.begintime!=0">
13
         <if test="param.begintime!=null and param.begintime!=0">
13
             and pg.starttime between #{param.begintime} and #{param.endtime}
14
             and pg.starttime between #{param.begintime} and #{param.endtime}
14
         </if>
15
         </if>
73
         left join t_school s on p.schoolid=s.schoolid and pg.schoolid=s.schoolid
74
         left join t_school s on p.schoolid=s.schoolid and pg.schoolid=s.schoolid
74
         left join t_class c on c.classid=pg.classid
75
         left join t_class c on c.classid=pg.classid
75
         left join t_director d on p.directorid=d.directorid
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
         <if test="param.begintime!=null and param.begintime!=0">
79
         <if test="param.begintime!=null and param.begintime!=0">
78
             and pg.starttime between #{param.begintime} and #{param.endtime}
80
             and pg.starttime between #{param.begintime} and #{param.endtime}
79
         </if>
81
         </if>
123
         left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid and ps.psstate in(1,2)
125
         left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid and ps.psstate in(1,2)
124
         left join t_class c on c.classid=pg.classid
126
         left join t_class c on c.classid=pg.classid
125
         left join t_director d on p.directorid=d.directorid
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
         <if test="param.begintime!=null and param.begintime!=0">
130
         <if test="param.begintime!=null and param.begintime!=0">
128
             and pg.starttime between #{param.begintime} and #{param.endtime}
131
             and pg.starttime between #{param.begintime} and #{param.endtime}
129
         </if>
132
         </if>

+ 2
- 2
sapi/src/main/resources/mapper/region/RegionAnalyzeMapper.xml View File

98
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
98
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
99
         left join t_class c on c.classid=pg.classid
99
         left join t_class c on c.classid=pg.classid
100
         left join t_director d on p.directorid=d.directorid
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
         <if test="param.year!=null and param.year!=0">
102
         <if test="param.year!=null and param.year!=0">
103
             and c.year=#{param.year}
103
             and c.year=#{param.year}
104
         </if>
104
         </if>
172
         and pg.starttime between #{param.begintime} and #{param.endtime}
172
         and pg.starttime between #{param.begintime} and #{param.endtime}
173
         left join t_class c on c.classid=pg.classid
173
         left join t_class c on c.classid=pg.classid
174
         left join t_director d on p.directorid=d.directorid
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
         <if test="param.year!=null and param.year!=0">
176
         <if test="param.year!=null and param.year!=0">
177
             and c.year=#{param.year}
177
             and c.year=#{param.year}
178
         </if>
178
         </if>

+ 2
- 1
sapi/src/main/resources/mapper/region/SAnalyzeMapper.xml View File

82
         left join t_class c on pg.classid=c.classid
82
         left join t_class c on pg.classid=c.classid
83
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
83
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
84
         left join t_director d on p.directorid=d.directorid
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
         and pg.starttime between #{param.begintime} and #{param.endtime}
87
         and pg.starttime between #{param.begintime} and #{param.endtime}
87
         group by c.gradeid,p.subjectid
88
         group by c.gradeid,p.subjectid
88
     </select>
89
     </select>

+ 9
- 10
sclass/src/main/java/com/xhkjedu/sclass/aop/WebControllerAop.java View File

13
 import com.xhkjedu.vo.system.UserVo;
13
 import com.xhkjedu.vo.system.UserVo;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
 import org.aspectj.lang.JoinPoint;
15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17
 import org.aspectj.lang.annotation.*;
16
 import org.aspectj.lang.annotation.*;
18
 import org.aspectj.lang.reflect.MethodSignature;
17
 import org.aspectj.lang.reflect.MethodSignature;
19
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
187
      * @Param [pjp]
186
      * @Param [pjp]
188
      * @Return java.lang.Object
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 View File

13
 import com.xhkjedu.vo.system.UserVo;
13
 import com.xhkjedu.vo.system.UserVo;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
 import org.aspectj.lang.JoinPoint;
15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17
 import org.aspectj.lang.annotation.*;
16
 import org.aspectj.lang.annotation.*;
18
 import org.aspectj.lang.reflect.MethodSignature;
17
 import org.aspectj.lang.reflect.MethodSignature;
19
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
187
      * @Param [pjp]
186
      * @Param [pjp]
188
      * @Return java.lang.Object
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 View File

13
 import com.xhkjedu.vo.system.UserVo;
13
 import com.xhkjedu.vo.system.UserVo;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
 import org.aspectj.lang.JoinPoint;
15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17
 import org.aspectj.lang.annotation.*;
16
 import org.aspectj.lang.annotation.*;
18
 import org.aspectj.lang.reflect.MethodSignature;
17
 import org.aspectj.lang.reflect.MethodSignature;
19
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
187
      * @Param [pjp]
186
      * @Param [pjp]
188
      * @Return java.lang.Object
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 View File

13
 import com.xhkjedu.vo.system.UserVo;
13
 import com.xhkjedu.vo.system.UserVo;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
 import org.aspectj.lang.JoinPoint;
15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17
 import org.aspectj.lang.annotation.*;
16
 import org.aspectj.lang.annotation.*;
18
 import org.aspectj.lang.reflect.MethodSignature;
17
 import org.aspectj.lang.reflect.MethodSignature;
19
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
187
      * @Param [pjp]
186
      * @Param [pjp]
188
      * @Return java.lang.Object
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 View File

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

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

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

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

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

+ 4
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/model/paper/TPaper.java View File

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

+ 4
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

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

296
         select p.paperid,p.papername,pg.starttime
296
         select p.paperid,p.papername,pg.starttime
297
         from t_paper p left join t_paper_class pg on p.paperid = pg.paperid
297
         from t_paper p left join t_paper_class pg on p.paperid = pg.paperid
298
         left join t_director d on p.directorid=d.directorid
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
         group by p.paperid order by pg.starttime desc limit #{papernum}
300
         group by p.paperid order by pg.starttime desc limit #{papernum}
301
     </select>
301
     </select>
302
     <!--获取作业班级列表-->
302
     <!--获取作业班级列表-->
381
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
381
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
382
         left join t_class c on pg.classid=c.classid
382
         left join t_class c on pg.classid=c.classid
383
         left join t_director d on p.directorid=d.directorid
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
         <if test="paper.starttime!=null and paper.starttime!=0">
386
         <if test="paper.starttime!=null and paper.starttime!=0">
387
             and pg.starttime>=#{paper.starttime}
387
             and pg.starttime>=#{paper.starttime}
388
         </if>
388
         </if>
404
     <select id="listPaperStuGrade" resultType="java.util.Map">
404
     <select id="listPaperStuGrade" resultType="java.util.Map">
405
         select a.*,ifnull(truncate(a.commitnum*100/a.sdnum,2),0)commitrate
405
         select a.*,ifnull(truncate(a.commitnum*100/a.sdnum,2),0)commitrate
406
         from(select cs.*
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
         sum(if(p.paperid is not null and (d.disabled=0 or p.directorid is null),ps.paperscore,0)),2),0)scorerate
410
         sum(if(p.paperid is not null and (d.disabled=0 or p.directorid is null),ps.paperscore,0)),2),0)scorerate
411
         from (select cs2.studentid,u.username studentname
411
         from (select cs2.studentid,u.username studentname
412
         from t_class_student cs2,t_class c,t_user u
412
         from t_class_student cs2,t_class c,t_user u
422
         group by cs2.studentid)cs
422
         group by cs2.studentid)cs
423
         left join t_paper_student ps on ps.studentid=cs.studentid
423
         left join t_paper_student ps on ps.studentid=cs.studentid
424
         left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
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
         <if test="paper.starttime!=null and paper.starttime!=0">
426
         <if test="paper.starttime!=null and paper.starttime!=0">
427
             and pg.starttime>=#{paper.starttime}
427
             and pg.starttime>=#{paper.starttime}
428
         </if>
428
         </if>
454
         left join t_paper p on ps.paperid=p.paperid
454
         left join t_paper p on ps.paperid=p.paperid
455
         left join t_subject s on p.subjectid=s.subjectid
455
         left join t_subject s on p.subjectid=s.subjectid
456
         left join t_director d on p.directorid=d.directorid
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
         <if test="paper.starttime!=null and paper.starttime!=0">
459
         <if test="paper.starttime!=null and paper.starttime!=0">
460
             and pg.starttime>=#{paper.starttime}
460
             and pg.starttime>=#{paper.starttime}
461
         </if>
461
         </if>
480
         left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
480
         left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
481
         left join t_paper p on ps.paperid=p.paperid
481
         left join t_paper p on ps.paperid=p.paperid
482
         left join t_director d on p.directorid=d.directorid
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
         <if test="paper.starttime!=null and paper.starttime!=0">
485
         <if test="paper.starttime!=null and paper.starttime!=0">
485
             and pg.starttime>=#{paper.starttime}
486
             and pg.starttime>=#{paper.starttime}
486
         </if>
487
         </if>
505
         left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
506
         left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
506
         left join t_paper p on pg.paperid=p.paperid
507
         left join t_paper p on pg.paperid=p.paperid
507
         left join t_director d on p.directorid=d.directorid
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
         <if test="paper.starttime!=null and paper.starttime!=0">
511
         <if test="paper.starttime!=null and paper.starttime!=0">
510
             and pg.starttime>=#{paper.starttime}
512
             and pg.starttime>=#{paper.starttime}
511
         </if>
513
         </if>

+ 11
- 5
sstudy/src/main/resources/mapper/paper/PaperMapper.xml View File

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

+ 2
- 2
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml View File

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

+ 3
- 3
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml View File

18
         left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
18
         left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
19
         left join t_user u on p.createid = u.userid
19
         left join t_user u on p.createid = u.userid
20
         left join t_director d on p.directorid=d.directorid
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
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
23
             and p.subjectid=#{ps.subjectid}
23
             and p.subjectid=#{ps.subjectid}
24
         </if>
24
         </if>
48
         left join t_user u on p.createid = u.userid
48
         left join t_user u on p.createid = u.userid
49
         left join t_subject s on p.subjectid = s.subjectid
49
         left join t_subject s on p.subjectid = s.subjectid
50
         left join t_director d on p.directorid=d.directorid
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
         ORDER BY ps.stoptime desc LIMIT #{ps.page},#{ps.pageSize}
52
         ORDER BY ps.stoptime desc LIMIT #{ps.page},#{ps.pageSize}
53
     </select>
53
     </select>
54
     <!--作业说明-->
54
     <!--作业说明-->
200
         left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
200
         left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
201
         left join t_user u on p.createid = u.userid
201
         left join t_user u on p.createid = u.userid
202
         left join t_director d on p.directorid=d.directorid
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
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
204
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
205
             and p.subjectid=#{ps.subjectid}
205
             and p.subjectid=#{ps.subjectid}
206
         </if>
206
         </if>

+ 9
- 10
suser/src/main/java/com/xhkjedu/suser/aop/WebControllerAop.java View File

13
 import com.xhkjedu.vo.system.UserVo;
13
 import com.xhkjedu.vo.system.UserVo;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
 import org.aspectj.lang.JoinPoint;
15
 import org.aspectj.lang.JoinPoint;
16
-import org.aspectj.lang.ProceedingJoinPoint;
17
 import org.aspectj.lang.annotation.*;
16
 import org.aspectj.lang.annotation.*;
18
 import org.aspectj.lang.reflect.MethodSignature;
17
 import org.aspectj.lang.reflect.MethodSignature;
19
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
187
      * @Param [pjp]
186
      * @Param [pjp]
188
      * @Return java.lang.Object
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…
Cancel
Save