mitao
2025-04-07 6c17cac744b3b439e38f6998ce4704c9a01c5dd2
bug修改
6个文件已修改
34 ■■■■ 已修改文件
medicalWaste-system/src/main/java/com/sinata/system/config/AutoColumnWidthStrategy.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwStagingRoomVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwWarningRecordVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwBoxServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwMicroEquipmentRecordServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
medicalWaste-system/src/main/java/com/sinata/system/config/AutoColumnWidthStrategy.java
@@ -20,8 +20,8 @@
        if (needSetWidth) {
            Map<Integer, Integer> maxWidthMap = cache.computeIfAbsent(writeSheetHolder.getSheetNo(), k -> new HashMap<>());
            int columnWidth = calculateWidth(cellDataList, cell, isHead);
            if (columnWidth >= 16) {
                columnWidth = 16;
            if (columnWidth >= 17) {
                columnWidth = 17;
            }
            if (columnWidth > 0) {
                columnWidth = Math.min(columnWidth, 255); // 最大支持255字符
medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwStagingRoomVO.java
@@ -33,7 +33,7 @@
    private Integer usedNum;
    @ApiModelProperty("未使用数量")
    private Integer unused;
    private Integer unUsedNum;
    @ApiModelProperty("使用率")
    private BigDecimal useRate;
medicalWaste-system/src/main/java/com/sinata/system/domain/vo/MwWarningRecordVO.java
@@ -44,7 +44,7 @@
    private Integer type;
    @ApiModelProperty("预警消息")
    @ExcelProperty(value = "预警消息", index = 3)
    @ExcelProperty(value = "预警信息", index = 3)
    private String message;
    @ApiModelProperty("预警状态 1:未解除;2:已解除")
medicalWaste-system/src/main/java/com/sinata/system/service/biz/StaticsService.java
@@ -222,7 +222,7 @@
     * @return
     */
    public void hospitalReportExport(HospitalReportQuery query) throws IOException {
        List<List<String>> head = hospitalReportHead(query.getDepartmentId());
        List<List<String>> head = hospitalReportHead(query);
        System.out.println(JSONObject.toJSONString(head));
        // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
        response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
@@ -268,8 +268,8 @@
     *
     * @return
     */
    private List<List<String>> hospitalReportHead(Long departmentId) {
        SysDepartment department = sysDepartmentService.getById(departmentId);
    private List<List<String>> hospitalReportHead(HospitalReportQuery query) {
        SysDepartment department = sysDepartmentService.getById(query.getDepartmentId());
        List<SysDictDataVO> wasteTypeList = sysDictDataService.medicalWasteTypeList();
        List<List<String>> headTitles = Lists.newArrayList();
        String title = "";
@@ -286,7 +286,9 @@
        });
        headTitles.add(Lists.newArrayList(title, "小计", "数量"));
        headTitles.add(Lists.newArrayList(title, "小计", "重量(kg)"));
        headTitles.add(Lists.newArrayList(title, "是否超时", "是否超时"));
        if (query.getDateType().equals(1)) {
            headTitles.add(Lists.newArrayList(title, "是否超时", "是否超时"));
        }
        return headTitles;
    }
medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwBoxServiceImpl.java
@@ -72,7 +72,7 @@
                .between(Objects.nonNull(query.getLastUseTimeStart())
                                && Objects.nonNull(query.getLastUseTimeEnd()),
                        MwBox::getLastUseTime, query.getLastUseTimeStart(), query.getLastUseTimeEnd())
                .orderByDesc(MwBox::getBoxNumber)
                .orderByDesc(MwBox::getCreateTime)
                .page(new Page<>(query.getPageCurr(), query.getPageSize()));
        return PageDTO.of(page, MwBoxVO.class);
    }
medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwMicroEquipmentRecordServiceImpl.java
@@ -245,13 +245,13 @@
                ).map(MwMicroEquipmentStaticsVO::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP);
                long count = staticsData.stream().filter(e -> e.getWasteType().equals(sysDictData.getDictCode())
                        && finalSdf.format(e.getUseTime()).equals(date)).count();
                departmentReportItemVO.getData().add(weight);
                departmentReportItemVO.getData().add(BigDecimal.valueOf(count));
                totalWeight = totalWeight.add(weight);
                departmentReportItemVO.getData().add(weight);
                totalCount = totalCount.add(BigDecimal.valueOf(count));
                totalWeight = totalWeight.add(weight);
            }
            departmentReportItemVO.getData().add(totalWeight);
            departmentReportItemVO.getData().add(totalCount);
            departmentReportItemVO.getData().add(totalWeight);
            result.add(departmentReportItemVO);
        }
@@ -370,11 +370,11 @@
        headTitles.add(Lists.newArrayList(title, "日期", "日期"));
        String finalTitle = title;
        medicalWasteTypeList.forEach(item -> {
            headTitles.add(Lists.newArrayList(finalTitle, item.getDictLabel(), "总数量"));
            headTitles.add(Lists.newArrayList(finalTitle, item.getDictLabel(), "总重量(kg)"));
            headTitles.add(Lists.newArrayList(finalTitle, item.getDictLabel(), "数量"));
            headTitles.add(Lists.newArrayList(finalTitle, item.getDictLabel(), "重量(kg)"));
        });
        headTitles.add(Lists.newArrayList(title, "小计", "总重量(KG)"));
        headTitles.add(Lists.newArrayList(title, "小计", "总数量"));
        headTitles.add(Lists.newArrayList(title, "小计", "数量"));
        headTitles.add(Lists.newArrayList(title, "小计", "重量(kg)"));
        return headTitles;
    }