@RequiresPermissions("system:statistical:list") @PostMapping("/getStuListNotClockIn/{orgIndexCode}/{accessTime}") @ResponseBody public TableDataInfo getStuListNotClockIn(@PathVariable String orgIndexCode,@PathVariable String accessTime) { AttPrimary attPrimary = new AttPrimary(); attPrimary.setOrgIndexCode(orgIndexCode); attPrimary.setAccessTime(accessTime); List<AttPrimary> attPrimaries = attPrimaryService.selectAttPrimaryList(attPrimary); Map stuList = HkApiPerson.getStuListByOrg("1","1000",orgIndexCode); JSONObject jsonObject = JSON.parseObject(JSONUtils.toJSONString(stuList));; List<AttPrimaryHk> stuListHk = JSON.parseArray(jsonObject.getString("list"), AttPrimaryHk.class); System.err.println(stuListHk); List distinctByUniqueList = stuListHk.stream() .filter(item -> !attPrimaries.stream() .map(e -> e.getStuId()) .collect(Collectors.toList()) .contains(item.getPersonId())) .collect(Collectors.toList()); return getDataTable(distinctByUniqueList); }
java8多个list对象用lambda求差集
最新推荐文章于 2023-12-05 09:50:04 发布