Kaynağa Gözat

Merge remote-tracking branch 'origin/wn' into ywx

tags/正式3.10.0
雍文秀 1 yıl önce
ebeveyn
işleme
7ba16e8081

+ 18
- 0
sapi/src/main/java/com/xhkjedu/sapi/model/system/TUserLog.java Dosyayı Görüntüle

@@ -23,6 +23,9 @@ public class TUserLog extends BaseBean {
23 23
     //登录名
24 24
     private String loginname;
25 25
 
26
+    //用户类型999超管0学校管理员1教师2学生
27
+    private Integer usertype;
28
+
26 29
     //登录状态1成功2失败
27 30
     private Integer loginstate;
28 31
 
@@ -47,6 +50,21 @@ public class TUserLog extends BaseBean {
47 50
     //学校id
48 51
     private Integer schoolid;
49 52
 
53
+    //登录mac地址
54
+    private String mac;
55
+
56
+    //登录终端品牌(华为、小米、荣耀、vivo、oppo、浏览器名等)
57
+    private String ultypeband;
58
+
59
+    //登录终端型号(华为mate9、小米13、浏览器版本号等)
60
+    private String ultypemodel;
61
+
62
+    //系统版本(android、鸿蒙、荣耀系统、win等)
63
+    private String systemversion;
64
+
65
+    //操作系统位数
66
+    private String systembit;
67
+
50 68
     @Transient
51 69
     //截止时间
52 70
     private Integer endtime;

+ 14
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java Dosyayı Görüntüle

@@ -1910,6 +1910,19 @@ public class EReportGenerateService {
1910 1910
             }
1911 1911
         }
1912 1912
 
1913
+        Map<String,List<Map>> answermapNew = new LinkedHashMap<>();
1914
+        if(q.getCtype() == 4 || q.getCtype() == 5 || q.getCtype() ==6){
1915
+            for (Map.Entry<String, List<Map>> entry : answermap.entrySet()) {
1916
+                if(!entry.getKey().equals("未作答")){
1917
+                    answermapNew.put(entry.getKey(),entry.getValue());
1918
+                }
1919
+            }
1920
+            //判断题把“未作答”放最后
1921
+            answermapNew.put("未作答",answermap.get("未作答"));
1922
+        }else{
1923
+            answermapNew.putAll(answermap);
1924
+        }
1925
+
1913 1926
         String erroroption = "";//高频错误项
1914 1927
         if (q.getCtype() == 1 || q.getCtype() == 2 || q.getCtype() == 4 || q.getCtype() == 5 || q.getCtype() == 6) {
1915 1928
             String answer = q.getAnswer();//试题正确答案
@@ -1928,7 +1941,7 @@ public class EReportGenerateService {
1928 1941
 
1929 1942
         List<Map> dafblist = new ArrayList<>();//答案分布
1930 1943
         Map<String, Map> dafbmap = new HashMap<>();//答案分布
1931
-        for (Map.Entry<String, List<Map>> entry : answermap.entrySet()) {
1944
+        for (Map.Entry<String, List<Map>> entry : answermapNew.entrySet()) {
1932 1945
             String key = entry.getKey();
1933 1946
             List<Map> students = entry.getValue();
1934 1947
             Map dafb = new HashMap();

+ 15
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperreport/PaperReportService.java Dosyayı Görüntüle

@@ -891,8 +891,21 @@ public class PaperReportService {
891 891
             }
892 892
         }
893 893
 
894
+        Map<String,List<Map>> answermapNew = new LinkedHashMap<>();
895
+        if(ctype == 4 || ctype == 5 || ctype ==6){
896
+            for (Map.Entry<String, List<Map>> entry : answermap.entrySet()) {
897
+                if(!entry.getKey().equals("未作答")){
898
+                    answermapNew.put(entry.getKey(),entry.getValue());
899
+                }
900
+            }
901
+            //判断题把“未作答”放最后
902
+            answermapNew.put("未作答",answermap.get("未作答"));
903
+        }else{
904
+            answermapNew.putAll(answermap);
905
+        }
906
+
894 907
         Map<String, Map> dafbmap = new LinkedHashMap<>();// 答案分布
895
-        for (Map.Entry<String, List<Map>> entry : answermap.entrySet()) {
908
+        for (Map.Entry<String, List<Map>> entry : answermapNew.entrySet()) {
896 909
             String key = entry.getKey();
897 910
             List<Map> students = entry.getValue();
898 911
             Map dafb = new HashMap();
@@ -966,7 +979,7 @@ public class PaperReportService {
966 979
                 }
967 980
             }
968 981
 
969
-            //把提交学生进行分组
982
+            //把提交学生按学校进行分组
970 983
             Map<Integer,List<PaperRStuVo>> schoolCommitStuList = commitStuList.stream().collect(Collectors.groupingBy(PaperRStuVo :: getSchoolid));
971 984
 
972 985
             // 根据试卷知识点分析进行生成班级、学校知识点分析

+ 6
- 0
sstudy/src/main/resources/mapper/question/QuestionMapper.xml Dosyayı Görüntüle

@@ -193,6 +193,9 @@
193 193
         <if test="question.complexity!=null and question.complexity!=0">
194 194
             and q.complexity=#{question.complexity}
195 195
         </if>
196
+        <if test="question.year!=null and question.year!=0">
197
+            and FROM_UNIXTIME(q.createtime,'%Y')=#{question.year}
198
+        </if>
196 199
         and q.qlevel &lt; 3
197 200
         </where>
198 201
         group by q.questionid order by q.qstate,q.createtime desc
@@ -288,6 +291,9 @@
288 291
                 and qc.userid=#{question.createid}
289 292
             </if>
290 293
         </if>
294
+        <if test="question.year!=null and question.year!=0">
295
+            and FROM_UNIXTIME(q.createtime,'%Y')=#{question.year}
296
+        </if>
291 297
         and q.qlevel &lt; 3
292 298
         group by q.questionid order by q.createtime desc
293 299
     </select>

+ 3
- 0
sstudy/src/main/resources/mapper/resource/ResourceMapper.xml Dosyayı Görüntüle

@@ -68,6 +68,9 @@
68 68
                 and rc.userid=#{resource.createid}
69 69
             </if>
70 70
         </if>
71
+        <if test="resource.year!=null and resource.year!=0">
72
+            and FROM_UNIXTIME(r.createtime,'%Y')=#{resource.year}
73
+        </if>
71 74
         group by r.resourceid
72 75
         <choose>
73 76
             <when test="resource.readcount!=null and resource.readcount!=0">

+ 4
- 0
suser/src/main/java/com/xhkjedu/suser/model/system/TUser.java Dosyayı Görüntüle

@@ -174,4 +174,8 @@ public class TUser extends BaseBean {
174 174
     @Transient
175 175
     //登录终端型号(华为mate9、小米13等)
176 176
     private String ultypemodel;
177
+
178
+    @Transient
179
+    //操作系统位数
180
+    private String systembit;
177 181
 }

+ 6
- 3
suser/src/main/java/com/xhkjedu/suser/model/system/TUserLog.java Dosyayı Görüntüle

@@ -41,18 +41,21 @@ public class TUserLog extends BaseBean {
41 41
     //登录终端设备
42 42
     private String ultype;
43 43
 
44
-    //登录终端品牌(华为、小米、荣耀、vivo、oppo等)
44
+    //登录终端品牌(华为、小米、荣耀、vivo、oppo、浏览器名等)
45 45
     private String ultypeband;
46 46
 
47
-    //登录终端型号(华为mate9、小米13等)
47
+    //登录终端型号(华为mate9、小米13、浏览器版本号等)
48 48
     private String ultypemodel;
49 49
 
50 50
     //版本号
51 51
     private String versionnum;
52 52
 
53
-    //系统版本(android、鸿蒙、荣耀系统等)
53
+    //系统版本(android、鸿蒙、荣耀系统、win等)
54 54
     private String systemversion;
55 55
 
56
+    //操作系统位数
57
+    private String systembit;
58
+
56 59
     //备注
57 60
     private String logtxt;
58 61
 

+ 1
- 0
suser/src/main/java/com/xhkjedu/suser/service/system/UserLogService.java Dosyayı Görüntüle

@@ -54,6 +54,7 @@ public class UserLogService {
54 54
         params.put("mac", user.getMac());
55 55
         params.put("versioncode", user.getVersionnum());
56 56
         params.put("systemversion", user.getSystemversion());
57
+        params.put("systembit", user.getSystembit());
57 58
         params.put("usertype", userLog.getUsertype());
58 59
         params.put("device", userLog.getUltype());
59 60
         params.put("logip", userLog.getLogip());

+ 10
- 4
suser/src/main/java/com/xhkjedu/suser/service/system/UserService.java Dosyayı Görüntüle

@@ -369,6 +369,7 @@ public class UserService extends JedisUtil {
369 369
             result.setObj(userVo);
370 370
             //获取到用户信息后保存登录日志
371 371
             return getLogResultVo(user,result,"扫码登录",request);
372
+
372 373
         }else{
373 374
             result.setCode(1);
374 375
             result.setMsg("登录失败");
@@ -433,10 +434,15 @@ public class UserService extends JedisUtil {
433 434
     public void saveSyncLoginLog(TUserLog userLog, TUser user,UserVo userVo, HttpServletRequest request) {
434 435
         try {
435 436
 
436
-            userLog.setUserid(user.getUserid());
437
-            userLog.setUsername(user.getUsername());
438
-            userLog.setSchoolid(user.getSchoolid());
439
-            Integer usertype = user.getUsertype();
437
+            userLog.setUserid(userVo.getUserid());
438
+            userLog.setUsername(userVo.getUsername());
439
+            userLog.setSchoolid(userVo.getSchoolid());
440
+            userLog.setLoginname(userVo.getLoginname());
441
+            userLog.setSystemversion(user.getSystemversion());
442
+            userLog.setUltypeband(user.getUltypeband());
443
+            userLog.setUltypemodel(user.getUltypemodel());
444
+            userLog.setSystembit(user.getSystembit());
445
+            Integer usertype = userVo.getUsertype();
440 446
             userLog.setUsertype(usertype);
441 447
             String ultype = user.getUltype();
442 448
             if (N_Utils.isNotEmpty(ultype) && ultype.equals("p_web") && usertype != null) {

Loading…
İptal
Kaydet