mitao
2025-02-19 ae7f04be9321ddbe17c46fae8ab05d34e7493f9f
medicalWaste-admin/src/main/java/com/sinata/web/controller/applet/AppMwCollectRecordController.java
@@ -219,7 +219,9 @@
    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) {