把下面代码缺失字段补充完整 并对index进行排序 @ExcelProperty(value = "申告来源", index = 13) @ColumnWidth(20) private String @ExcelProperty(value = "申告时间", index = 14) @ColumnWidth(20) private String @ExcelProperty(value = "编号", index = 15) @ColumnWidth(20) private String @ExcelProperty(value = "新产品名称", index = 16) @ColumnWidth(20) private String @ExcelProperty(value = "故障发生时间", index = 17) @ColumnWidth(20) private String @ExcelProperty(value = "故障修复时间", index = 18) @ColumnWidth(20) private String @ExcelProperty(value = "业务分类", index = 19) @ColumnWidth(20) private String @ExcelProperty(value = "业务小类", index = 20) @ColumnWidth(20) private String @ExcelProperty(value = "派单省", index = 21) @ColumnWidth(20) private String @ExcelProperty(value = "派单人", index = 22) @ColumnWidth(20) private String @ExcelProperty(value = "派单时间", index = 23) @ColumnWidth(20) private String @ExcelProperty(value = "派单用时", index = 24) @ColumnWidth(20) private String @ExcelProperty(value = "确认时间", index = 25) @ColumnWidth(20) private String @ExcelProperty(value = "确认用时", index = 26) @ColumnWidth(20) private String @ExcelProperty(value = "处理省", index = 27) @ColumnWidth(20) private String @ExcelProperty(value = "处理省市", index = 28) @ColumnWidth(20) private String @ExcelProperty(value = "收单用时", index = 29) @ColumnWidth(20) private String @ExcelProperty(value = "故障原因", index = 30) @ColumnWidth(20) private String @ExcelProperty(value = "故障级别", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "故障类型", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "故障子类型", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "业务不可用时长", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "故障历时", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "免责时长", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "客户确认业务恢复时间", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "FAULT_PROV", index = 0) @ColumnWidth(20) private String @ExcelProperty(value = "项目名称", index = 0) @ColumnWidth(20) priva
时间: 2024-03-08 15:48:22 浏览: 93
由于缺失字段的类型和默认值未知,因此以下代码中只是简单地补充了缺失字段,并对 index 进行了排序:
```
@ExcelProperty(value = "故障级别", index = 0) @ColumnWidth(20) private String faultLevel = "";
@ExcelProperty(value = "故障类型", index = 0) @ColumnWidth(20) private String faultType = "";
@ExcelProperty(value = "故障子类型", index = 0) @ColumnWidth(20) private String faultSubType = "";
@ExcelProperty(value = "业务不可用时长", index = 0) @ColumnWidth(20) private String unavailableDuration = "";
@ExcelProperty(value = "故障历时", index = 0) @ColumnWidth(20) private String faultDuration = "";
@ExcelProperty(value = "免责时长", index = 0) @ColumnWidth(20) private String exemptionDuration = "";
@ExcelProperty(value = "客户确认业务恢复时间", index = 0) @ColumnWidth(20) private String recoverTime = "";
@ExcelProperty(value = "FAULT_PROV", index = 0) @ColumnWidth(20) private String faultProv = "";
@ExcelProperty(value = "项目名称", index = 0) @ColumnWidth(20) private String projectName = "";
@ExcelProperty(value = "申告来源", index = 13) @ColumnWidth(20) private String declareSource = "";
@ExcelProperty(value = "申告时间", index = 14) @ColumnWidth(20) private String declareTime = "";
@ExcelProperty(value = "编号", index = 15) @ColumnWidth(20) private String number = "";
@ExcelProperty(value = "新产品名称", index = 16) @ColumnWidth(20) private String newProductName = "";
@ExcelProperty(value = "故障发生时间", index = 17) @ColumnWidth(20) private String faultStartTime = "";
@ExcelProperty(value = "故障修复时间", index = 18) @ColumnWidth(20) private String faultEndTime = "";
@ExcelProperty(value = "业务分类", index = 19) @ColumnWidth(20) private String businessCategory = "";
@ExcelProperty(value = "业务小类", index = 20) @ColumnWidth(20) private String businessSubCategory = "";
@ExcelProperty(value = "派单省", index = 21) @ColumnWidth(20) private String dispatchProvince = "";
@ExcelProperty(value = "派单人", index = 22) @ColumnWidth(20) private String dispatcher = "";
@ExcelProperty(value = "派单时间", index = 23) @ColumnWidth(20) private String dispatchTime = "";
@ExcelProperty(value = "派单用时", index = 24) @ColumnWidth(20) private String dispatchDuration = "";
@ExcelProperty(value = "确认时间", index = 25) @ColumnWidth(20) private String confirmTime = "";
@ExcelProperty(value = "确认用时", index = 26) @ColumnWidth(20) private String confirmDuration = "";
@ExcelProperty(value = "处理省", index = 27) @ColumnWidth(20) private String processProvince = "";
@ExcelProperty(value = "处理省市", index = 28) @ColumnWidth(20) private String processCity = "";
@ExcelProperty(value = "收单用时", index = 29) @ColumnWidth(20) private String receiptDuration = "";
@ExcelProperty(value = "故障原因", index = 30) @ColumnWidth(20) private String faultReason = "";
// 对 index 进行排序
List<Field> fields = Arrays.asList(this.getClass().getDeclaredFields());
fields.sort(Comparator.comparingInt(f -> f.getAnnotation(ExcelProperty.class).index()));
```
请注意,补充字段的类型和默认值需要根据实际情况进行调整。
阅读全文