zhuo
2025-05-07 50164d95bfe34f532e3f2513a53f62c0864fe1a2
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceServiceImpl.java
@@ -44,6 +44,7 @@
import java.io.OutputStream;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@@ -352,6 +353,7 @@
            template.write(os);
            os.flush();
            os.close();
            inputStream.close();
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("导出失败");
@@ -396,11 +398,11 @@
                DeviceMaintenance deviceMaintenance = deviceMaintenanceList.get(i);
                DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
                // 维修日期
                deviceMetricRecordAndMaintenanceDto.setMaintenanceDateString(deviceMaintenance.getDate().format(dateTimeFormatter));
                deviceMetricRecordAndMaintenanceDto.setMaintenanceDateString(deviceMaintenance.getMaintenanceDate().format(dateTimeFormatter));
                // 处理方法
                deviceMetricRecordAndMaintenanceDto.setHandlingMethod(deviceMaintenance.getContent());
                deviceMetricRecordAndMaintenanceDto.setHandlingMethod(deviceMaintenance.getMaintenanceContent());
                // 备注
                deviceMetricRecordAndMaintenanceDto.setComments(deviceMaintenance.getComments());
                deviceMetricRecordAndMaintenanceDto.setComments(deviceMaintenance.getRemark());
            }
            deviceMetricRecordAndMaintenanceDtoList.add(deviceMetricRecordAndMaintenanceDto);
@@ -487,6 +489,7 @@
            template.write(os);
            os.flush();
            os.close();
            inputStream.close();
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("导出失败");