From ae7f04be9321ddbe17c46fae8ab05d34e7493f9f Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 19 二月 2025 13:40:06 +0800 Subject: [PATCH] 管理后台bug修改 --- medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java | 27 +++++++++++---------------- 1 files changed, 11 insertions(+), 16 deletions(-) diff --git a/medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java b/medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java index f878b2b..8faca33 100644 --- a/medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java +++ b/medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java @@ -28,6 +28,7 @@ import com.sinata.system.service.MwDisposalRecordService; import com.sinata.system.service.MwWarningRecordService; import com.sinata.system.service.SysDepartmentService; +import com.sinata.system.utils.ImageToBase64; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -241,7 +242,7 @@ departmentReportItemVO.setName(transformVO.getHospitalName()); departmentReportItemVO.setData(new ArrayList<>()); departmentReportItemVO.setDriverName(transformVO.getDriverName()); - departmentReportItemVO.setHospitalSignature(transformVO.getHospitalSignature()); + departmentReportItemVO.setHospitalSignature(ImageToBase64.convertImageToBase64(transformVO.getHospitalSignature())); departmentReportItemVO.setHandoverTime(transformVO.getCheckoutTime()); for (SysDictData sysDictData : wasteTypeList) { BigDecimal count = BigDecimal.valueOf(transformVO.getCollectRecordList().stream().filter(item -> item.getWasteType().equals(sysDictData.getDictCode())).count()); @@ -370,23 +371,17 @@ SimpleDateFormat finalSdf = sdf; //接收 for (SysDictData sysDictData : wasteTypeList) { - departmentReportItemVO.getData().add(BigDecimal.ZERO); - if (CollUtils.isNotEmpty(receivedList)) { - BigDecimal totalWeight = receivedList.stream().filter(item -> item.getWasteType().equals(sysDictData.getDictCode()) && - finalSdf.format(item.getReceiveTime()).equals(date)).map(MwDisposalRecordReportVO::getWeight) - .reduce(BigDecimal.ZERO, BigDecimal::add); - departmentReportItemVO.getData().add(totalWeight); - } + BigDecimal totalWeight = receivedList.stream().filter(item -> item.getWasteType().equals(sysDictData.getDictCode()) && + finalSdf.format(item.getReceiveTime()).equals(date)).map(MwDisposalRecordReportVO::getWeight) + .reduce(BigDecimal.ZERO, BigDecimal::add); + departmentReportItemVO.getData().add(totalWeight); } //处置 for (SysDictData sysDictData : wasteTypeList) { - departmentReportItemVO.getData().add(BigDecimal.ZERO); - if (CollUtils.isNotEmpty(disposaledList)) { - BigDecimal totalWeight = disposaledList.stream().filter(item -> item.getWasteType().equals(sysDictData.getDictCode()) && - finalSdf.format(item.getReceiveTime()).equals(date)).map(MwDisposalRecordReportVO::getWeight) - .reduce(BigDecimal.ZERO, BigDecimal::add); - departmentReportItemVO.getData().add(totalWeight); - } + BigDecimal totalWeight = disposaledList.stream().filter(item -> item.getWasteType().equals(sysDictData.getDictCode()) && + finalSdf.format(item.getDisposalTime()).equals(date)).map(MwDisposalRecordReportVO::getWeight) + .reduce(BigDecimal.ZERO, BigDecimal::add); + departmentReportItemVO.getData().add(totalWeight); } list.add(departmentReportItemVO); } @@ -510,7 +505,7 @@ } for (SysDictData sysDictData : wasteTypeList) { BigDecimal weight = checkoutRecordList.stream().filter(e -> e.getWasteType().equals(sysDictData.getDictCode()) && - finalSdf.format(e.getCollectTime()).equals(date)).map(MwCollectRecordVO::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add); + finalSdf.format(e.getCheckoutTime()).equals(date)).map(MwCollectRecordVO::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add); departmentReportItemVO.getData().add(weight); } for (SysDictData sysDictData : wasteTypeList) { -- Gitblit v1.7.1