Browse Source

教研管理

tags/正式3.10.0
雍文秀 1 year ago
parent
commit
b930022e9b

+ 5
- 4
sapi/src/main/java/com/xhkjedu/sapi/service/research/ResearchService.java View File

@@ -1,5 +1,6 @@
1 1
 package com.xhkjedu.sapi.service.research;
2 2
 
3
+import com.xhkjedu.model.BaseBean;
3 4
 import com.xhkjedu.sapi.listener.MessageSender;
4 5
 import com.xhkjedu.sapi.mapper.research.ResearchMapper;
5 6
 import com.xhkjedu.sapi.mapper.research.ResearchUserMapper;
@@ -160,12 +161,12 @@ public class ResearchService {
160 161
         for (Map.Entry<Integer, List<TResearchUser>> entry : collect.entrySet()) {
161 162
             List<TResearchUser> users = entry.getValue();
162 163
             Integer key = entry.getKey();
163
-            Map s = new HashMap();
164
+            Map<String, Object> s = new HashMap<>();
164 165
             s.put("schoolid", key);
165 166
             s.put("schoolname", users.get(0).getSchoolname());
166
-            List<String> wcyList = users.stream().filter(u -> u.getRustate().equals(0)).map(u -> u.getCreatename()).collect(Collectors.toList());
167
-            List<String> ycyList = users.stream().filter(u -> u.getRustate().equals(1)).map(u -> u.getCreatename()).collect(Collectors.toList());
168
-            s.put("cyrate", N_Utils.getDoubleDivideForAvg(ycyList.size(), users.size()));
167
+            List<String> wcyList = users.stream().filter(u -> u.getRustate().equals(0)).map(BaseBean::getCreatename).collect(Collectors.toList());
168
+            List<String> ycyList = users.stream().filter(u -> u.getRustate().equals(1)).map(BaseBean::getCreatename).collect(Collectors.toList());
169
+            s.put("cyrate", N_Utils.getIntegerDivideAndMulitiply(ycyList.size(), users.size()));
169 170
             s.put("wcyList", wcyList);
170 171
             s.put("ycyList", ycyList);
171 172
             schools.add(s);

Loading…
Cancel
Save