Commit cb960f9187578f017ce60a47ce9b742bca261e04
1 parent
4751a3645e
Exists in
master
and in
1 other branch
修改产检删除
Showing 1 changed file with 12 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
cb960f9
... | ... | @@ -178,13 +178,21 @@ |
178 | 178 | List<HashMap> list = recordService.aggregateOne(antExRecordQuery); |
179 | 179 | for (HashMap map : list) { |
180 | 180 | CjStatisticsResult cjStatisticsResult = new CjStatisticsResult(); |
181 | - String dId = map.get("_id").toString(); | |
181 | + String dId=null; | |
182 | + if(map.containsKey("_id")){ | |
183 | + dId = map.get("_id").toString(); | |
184 | + } | |
185 | + | |
182 | 186 | cjStatisticsResult.setdId(dId); |
183 | 187 | cjStatisticsResult.setCount(map.get("count").toString()); |
184 | 188 | try { |
185 | - Users users = usersService.getUsers(Integer.valueOf(dId)); | |
186 | - if (null != users) { | |
187 | - cjStatisticsResult.setdName(users.getName()); | |
189 | + if(null==dId){ | |
190 | + cjStatisticsResult.setdName("未知"); | |
191 | + }else{ | |
192 | + Users users = usersService.getUsers(Integer.valueOf(dId)); | |
193 | + if (null != users) { | |
194 | + cjStatisticsResult.setdName(users.getName()); | |
195 | + } | |
188 | 196 | } |
189 | 197 | } catch (Exception e) { |
190 | 198 | } |