| | |
| | | public R<List<HospitalCollectTotalUpDto>> tanscollecttotal2(@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)LocalDate date) { |
| | | SysUser sysUser = SecurityUtils.getLoginUser().getUser(); |
| | | //先获取医院ids |
| | | List<MwCollectRecord> list = collectRecordService.lambdaQuery().eq(date!=null,MwCollectRecord::getCheckoutTime,date).eq(MwCollectRecord::getCheckoutUserId, sysUser.getUserId()).groupBy(MwCollectRecord::getDepartmentId).list(); |
| | | List<MwCollectRecord> list = collectRecordService.lambdaQuery().ge(MwCollectRecord::getCheckoutTime, date.atStartOfDay()) |
| | | .le(MwCollectRecord::getCheckoutTime, date.atTime(23,59,59)) |
| | | .eq(MwCollectRecord::getCheckoutUserId, sysUser.getUserId()).groupBy(MwCollectRecord::getDepartmentId).list(); |
| | | //循环医院,然后放入 |
| | | List<HospitalCollectTotalUpDto> list1 = new ArrayList<>(); |
| | | for (MwCollectRecord mwCollectRecord : list) { |
| | |
| | | SysUser sysUser = SecurityUtils.getLoginUser().getUser(); |
| | | SysUser byId = userService.getById(sysUser.getUserId()); |
| | | Page<MwCollectRecord> page = collectRecordService.lambdaQuery() |
| | | .eq(MwCollectRecord::getCollectTime, DateUtils.toDate(date)) |
| | | .ge(MwCollectRecord::getCreateTime, date.atStartOfDay()) |
| | | .le(MwCollectRecord::getCreateTime, date.atTime(23,59,59)) |
| | | .eq(MwCollectRecord::getDepartmentId, byId.getDepartmentId()) |
| | | .orderByDesc(MwCollectRecord::getCollectTime) |
| | | .page(Page.of(pageNum, pageSize)); |