From 65d95ba62c70c8fe4fd5d4d3db18a9ecfd4a7552 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Mon, 8 Jul 2024 11:47:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=9A=E6=97=B6=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=86=85=E5=AE=B9=20=E4=BC=98=E5=8C=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=9C=A8=E7=BA=BF=E7=8E=87=E5=88=86=E6=9E=90=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/StatusController.java | 6 +- .../com/zc/business/enums/UniversalEnum.java | 16 +- .../service/impl/ExcelExportService.java | 199 ++++++++++-------- 3 files changed, 125 insertions(+), 96 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/StatusController.java b/zc-business/src/main/java/com/zc/business/controller/StatusController.java index e7ac9b3d..9ab72129 100644 --- a/zc-business/src/main/java/com/zc/business/controller/StatusController.java +++ b/zc-business/src/main/java/com/zc/business/controller/StatusController.java @@ -267,6 +267,8 @@ public class StatusController extends BaseController { itemTypeMap.put(UniversalEnum.ELEVEN.getValue(), UniversalEnum.CLASS_I_TRAFFIC_SURVEY_STATION.getValue()); itemTypeMap.put(UniversalEnum.TWELVE.getValue(), UniversalEnum.INTELLIGENT_DRIVING_GUIDANCE_SYSTEM.getValue()); itemTypeMap.put(UniversalEnum.THIRTEEN.getValue(), UniversalEnum.SMART_DEVICE_BOX.getValue()); + itemTypeMap.put(UniversalEnum.FIFTEEN.getValue(), UniversalEnum.SOLAR_PANEL.getValue()); + itemTypeMap.put(UniversalEnum.SIXTEEN.getValue(), UniversalEnum.REMOTE_COMPUTER.getValue()); LocalDateTime todayStart = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS); LocalDateTime currentTime = LocalDateTime.now(); Status status = new Status(); @@ -394,7 +396,9 @@ public class StatusController extends BaseController { UniversalEnum.LASER_FATIGUE_AWAKENING.getValue(), UniversalEnum.CLASS_I_TRAFFIC_SURVEY_STATION.getValue(), UniversalEnum.INTELLIGENT_DRIVING_GUIDANCE_SYSTEM.getValue(), - UniversalEnum.SMART_DEVICE_BOX.getValue() + UniversalEnum.SMART_DEVICE_BOX.getValue(), + UniversalEnum.SOLAR_PANEL.getValue(), + UniversalEnum.REMOTE_COMPUTER.getValue() }; orderRule= Arrays.toString(rules).replace(UniversalEnum.LEFT_CENTER_BRACKET.getValue(),UniversalEnum.EMPTY_STRING.getValue()).replace(UniversalEnum.CLOSE_CENTER_BRACKET.getValue(),UniversalEnum.EMPTY_STRING.getValue()).replace(UniversalEnum.BLANK_SPACE.getValue(),UniversalEnum.EMPTY_STRING.getValue()); ruleMap.put("rule",orderRule); diff --git a/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java b/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java index 4fcf7c24..5282ab65 100644 --- a/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java @@ -338,10 +338,16 @@ public enum UniversalEnum { ROAD_SECTION_NAME(0, "路段名称"), // 菏泽方向 - DIRECTION_OF_HEZE(0, "菏泽方向"), + DIRECTION_OF_HEZE(1, "菏泽方向"), + + // 双向 + BIDIRECTIONAL(2, "双向"), // 济南方向 - DIRECTION_OF_JINAN(0, "济南方向"), + DIRECTION_OF_JINAN(3, "济南方向"), + + // 未知方向 + UNKNOWN_DIRECTION(4, "未知方向"), // 上行 Up(0, "上行"), @@ -409,6 +415,12 @@ public enum UniversalEnum { //智能设备箱 SMART_DEVICE_BOX(0, "智能设备箱"), + //太阳能板 + SOLAR_PANEL(0, "太阳能板"), + + //远端机 + REMOTE_COMPUTER(0, "远端机"), + //设备名称 DEVICE_NAME(0, "设备名称"), diff --git a/zc-business/src/main/java/com/zc/business/service/impl/ExcelExportService.java b/zc-business/src/main/java/com/zc/business/service/impl/ExcelExportService.java index 82daa086..913f3ef5 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/ExcelExportService.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/ExcelExportService.java @@ -17,7 +17,7 @@ import java.util.stream.Collectors; @Service public class ExcelExportService { - public void exportDataToExcel(Map> ipMap, Map >categoryMap, String filePath) { + public void exportDataToExcel(Map> ipMap, Map> categoryMap, String filePath) { Workbook workbook = new XSSFWorkbook(); Map> map = new TreeMap<>(ipMap); Sheet sheet = workbook.createSheet(UniversalEnum.DEVICE_FAILURE_RATE_TIME_SHARING_STATISTICS_PAGE.getValue()); @@ -37,41 +37,50 @@ public class ExcelExportService { sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ONE.getNumber(), UniversalEnum.FOUR.getNumber(), UniversalEnum.FOUR.getNumber())); sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ONE.getNumber(), UniversalEnum.FIVE.getNumber(), UniversalEnum.FIVE.getNumber())); sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ONE.getNumber(), UniversalEnum.SIX.getNumber(), UniversalEnum.SIX.getNumber())); - int i=UniversalEnum.ZERO.getNumber(); - boolean flag = true; - Row row1= sheet.createRow(UniversalEnum.ONE.getNumber()); + int i = UniversalEnum.ZERO.getNumber(); + boolean flag = true; + Row row1 = sheet.createRow(UniversalEnum.ONE.getNumber()); for (Map.Entry> entry : map.entrySet()) { - row0.createCell(UniversalEnum.TWO.getNumber()*i+UniversalEnum.SEVEN.getNumber()).setCellValue(entry.getKey()+UniversalEnum.HOUR.getValue()); - sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ZERO.getNumber(), UniversalEnum.TWO.getNumber()*i+UniversalEnum.SEVEN.getNumber(), UniversalEnum.TWO.getNumber()*i+UniversalEnum.EIGHT.getNumber())); - row1.createCell(UniversalEnum.TWO.getNumber()*i+UniversalEnum.SEVEN.getNumber()).setCellValue(UniversalEnum.ONLINE_RATE.getValue()); - row1.createCell(UniversalEnum.TWO.getNumber()*i+UniversalEnum.EIGHT.getNumber()).setCellValue(UniversalEnum.PACKET_LOSS_RATE.getValue()); + row0.createCell(UniversalEnum.TWO.getNumber() * i + UniversalEnum.SEVEN.getNumber()).setCellValue(entry.getKey() + UniversalEnum.HOUR.getValue()); + sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ZERO.getNumber(), UniversalEnum.TWO.getNumber() * i + UniversalEnum.SEVEN.getNumber(), UniversalEnum.TWO.getNumber() * i + UniversalEnum.EIGHT.getNumber())); + row1.createCell(UniversalEnum.TWO.getNumber() * i + UniversalEnum.SEVEN.getNumber()).setCellValue(UniversalEnum.ONLINE_RATE.getValue()); + row1.createCell(UniversalEnum.TWO.getNumber() * i + UniversalEnum.EIGHT.getNumber()).setCellValue(UniversalEnum.PACKET_LOSS_RATE.getValue()); rowNum = UniversalEnum.TWO.getNumber(); - List groupItems = entry.getValue(); - for (Status ignored : groupItems) { - int a=rowNum++; - Row row = sheet.getRow(a); // 获取指定索引的行 - if (row == null) { // 如果行不存在,则创建新行 - row = sheet.createRow(a); - } - if(flag) { - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getDeviceName()); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getDeviceIp()); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getDeviceNo()); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getDirection()); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getProduction()); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getModel()); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getContent()); + List groupItems = entry.getValue(); + for (Status ignored : groupItems) { + int a = rowNum++; + Row row = sheet.getRow(a); // 获取指定索引的行 + if (row == null) { // 如果行不存在,则创建新行 + row = sheet.createRow(a); + } + if (flag) { + row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(ignored.getDeviceName()); + row.createCell(UniversalEnum.ONE.getNumber()).setCellValue(ignored.getDeviceIp()); + row.createCell(UniversalEnum.TWO.getNumber()).setCellValue(ignored.getDeviceNo()); + Integer direction = Integer.parseInt(ignored.getDirection() != null ? ignored.getDirection() : UniversalEnum.FOUR.getValue()); + String directionDescription = UniversalEnum.UNKNOWN_DIRECTION.getValue(); + if (Objects.equals(direction, UniversalEnum.DIRECTION_OF_HEZE.getNumber())) { + directionDescription = UniversalEnum.DIRECTION_OF_HEZE.getValue(); + } else if (Objects.equals(direction, UniversalEnum.BIDIRECTIONAL.getNumber())) { + directionDescription = UniversalEnum.BIDIRECTIONAL.getValue(); + } else if (Objects.equals(direction, UniversalEnum.DIRECTION_OF_JINAN.getNumber())) { + directionDescription = UniversalEnum.DIRECTION_OF_JINAN.getValue(); } - row.createCell(UniversalEnum.TWO.getNumber()*i+UniversalEnum.SEVEN.getNumber()).setCellValue(ignored.getSuccessRate()); - row.createCell(UniversalEnum.TWO.getNumber()*i+UniversalEnum.EIGHT.getNumber()).setCellValue(ignored.getLostRate()); + row.createCell(UniversalEnum.THREE.getNumber()).setCellValue(directionDescription); + row.createCell(UniversalEnum.FOUR.getNumber()).setCellValue(ignored.getProduction()); + row.createCell(UniversalEnum.FIVE.getNumber()).setCellValue(ignored.getModel()); + row.createCell(UniversalEnum.SIX.getNumber()).setCellValue(ignored.getContent()); + } + row.createCell(UniversalEnum.TWO.getNumber() * i + UniversalEnum.SEVEN.getNumber()).setCellValue(ignored.getSuccessRate()); + row.createCell(UniversalEnum.TWO.getNumber() * i + UniversalEnum.EIGHT.getNumber()).setCellValue(ignored.getLostRate()); } i++; - flag = false; + //flag = false; } Sheet sheets = workbook.createSheet(UniversalEnum.DEVICE_FAILURE_RATE_SUMMARY_PAGE.getValue()); - createSheet(sheets,categoryMap); + createSheet(sheets, categoryMap); Sheet sheet1 = workbook.createSheet(UniversalEnum.EQUIPMENT_FAILURE_RATE_TIME_SHARING_SUMMARY_PAGE.getValue()); - createSheet1(sheet1,ipMap); + createSheet1(sheet1, ipMap); try (FileOutputStream outputStream = new FileOutputStream(filePath)) { workbook.write(outputStream); } catch (IOException e) { @@ -80,15 +89,16 @@ public class ExcelExportService { System.out.println("excel写入成功!!!!!!"); } - public void createSheet1(Sheet sheet,Map> ipMap){ + + public void createSheet1(Sheet sheet, Map> ipMap) { Map> map = new TreeMap<>(ipMap); int rowNum = UniversalEnum.ZERO.getNumber(); Row row0 = sheet.createRow(rowNum); row0.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(UniversalEnum.EQUIPMENT_CLASSIFICATION.getValue()); sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ONE.getNumber(), UniversalEnum.ZERO.getNumber(), UniversalEnum.ZERO.getNumber())); - int i=UniversalEnum.ZERO.getNumber(); - boolean flag = true; - Row row1= sheet.createRow(UniversalEnum.ONE.getNumber()); + int i = UniversalEnum.ZERO.getNumber(); + boolean flag = true; + Row row1 = sheet.createRow(UniversalEnum.ONE.getNumber()); for (Map.Entry> entry : map.entrySet()) { row0.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.ONE.getNumber()).setCellValue(entry.getKey() + UniversalEnum.HOUR.getNumber()); sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ZERO.getNumber(), UniversalEnum.THREE.getNumber() * i + UniversalEnum.ONE.getNumber(), UniversalEnum.THREE.getNumber() * i + UniversalEnum.THREE.getNumber())); @@ -102,46 +112,49 @@ public class ExcelExportService { List groupItems = entrys.getValue(); long b = groupItems.stream().filter(iteam -> Objects.equals(iteam.getDeviceStatus(), UniversalEnum.ONE.getValue())).count(); // for (Status ignored : groupItems) { - int a = rowNum++; - Row row = sheet.getRow(a); // 获取指定索引的行 - if (row == null) { // 如果行不存在,则创建新行 - row = sheet.createRow(a); - } - HashMap itemTypeMap = new HashMap<>(); - itemTypeMap.put(UniversalEnum.ONE_ONE.getValue(), UniversalEnum.HD_NETWORK_GUN_TYPE_FIXED_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.ONE_TWO.getValue(), UniversalEnum.HD_NETWORK_SPHERICAL_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.ONE_THREE.getValue(), UniversalEnum.UNDER_THE_BRIDGE_HD_NETWORK_SPHERICAL_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.ONE_FOUR.getValue(), UniversalEnum.THREE_HUNDRED_SIXTY_PANORAMIC_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.ONE_FIVE.getValue(), UniversalEnum.ONE_HUNDRED_EIGHTY_PANORAMIC_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.TWO_ONE.getValue(), UniversalEnum.GANTRY_TYPE_VARIABLE_MESSAGE_SIGN.getValue()); - itemTypeMap.put(UniversalEnum.TWO_THREE.getValue(), UniversalEnum.AWNING_VARIABLE_INFORMATION_SIGN.getValue()); - itemTypeMap.put(UniversalEnum.TWO_FOUR.getValue(), UniversalEnum.CANTILEVER_VARIABLE_INFORMATION_SIGN_IN_FRONT_OF_STATION.getValue()); - itemTypeMap.put(UniversalEnum.THREE.getValue(), UniversalEnum.METEOROLOGICAL_DETECTOR.getValue()); - itemTypeMap.put(UniversalEnum.FIVE.getValue(), UniversalEnum.SECTION_VOICE_BROADCAST_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.SIX.getValue(), UniversalEnum.GUARDRAIL_COLLISION_WARNING_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.SEVEN.getValue(), UniversalEnum.MILLIMETER_WAVE_RADAR.getValue()); - itemTypeMap.put(UniversalEnum.EIGHT.getValue(), UniversalEnum.CONFLUENCE_AREA_EARLY_WARNING_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.TEN.getValue(), UniversalEnum.LASER_FATIGUE_AWAKENING.getValue()); - itemTypeMap.put(UniversalEnum.ELEVEN.getValue(), UniversalEnum.CLASS_I_TRAFFIC_SURVEY_STATION.getValue()); - itemTypeMap.put(UniversalEnum.TWELVE.getValue(), UniversalEnum.INTELLIGENT_DRIVING_GUIDANCE_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.THIRTEEN.getValue(), UniversalEnum.SMART_DEVICE_BOX.getValue()); - String type = groupItems.get(UniversalEnum.ZERO.getNumber()).getType(); - String description = itemTypeMap.get(type); - if (flag) { - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(description); - } - row.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.ONE.getNumber()).setCellValue(groupItems.size()); - row.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.TWO.getNumber()).setCellValue(b); - row.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.THREE.getNumber()).setCellValue(String.format("%.2f%%", (double) b / groupItems.size() * UniversalEnum.ONE_HUNDRED.getNumber())); + int a = rowNum++; + Row row = sheet.getRow(a); // 获取指定索引的行 + if (row == null) { // 如果行不存在,则创建新行 + row = sheet.createRow(a); } - i++; - flag = false; - // } + HashMap itemTypeMap = new HashMap<>(); + itemTypeMap.put(UniversalEnum.ONE_ONE.getValue(), UniversalEnum.HD_NETWORK_GUN_TYPE_FIXED_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_TWO.getValue(), UniversalEnum.HD_NETWORK_SPHERICAL_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_THREE.getValue(), UniversalEnum.UNDER_THE_BRIDGE_HD_NETWORK_SPHERICAL_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_FOUR.getValue(), UniversalEnum.THREE_HUNDRED_SIXTY_PANORAMIC_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_FIVE.getValue(), UniversalEnum.ONE_HUNDRED_EIGHTY_PANORAMIC_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.TWO_ONE.getValue(), UniversalEnum.GANTRY_TYPE_VARIABLE_MESSAGE_SIGN.getValue()); + itemTypeMap.put(UniversalEnum.TWO_TWO.getValue(), UniversalEnum.VARIABLE_MESSAGE_SIGN_IN_FRONT_OF_STATION.getValue()); + itemTypeMap.put(UniversalEnum.TWO_THREE.getValue(), UniversalEnum.AWNING_VARIABLE_INFORMATION_SIGN.getValue()); + itemTypeMap.put(UniversalEnum.TWO_FOUR.getValue(), UniversalEnum.CANTILEVER_VARIABLE_INFORMATION_SIGN_IN_FRONT_OF_STATION.getValue()); + itemTypeMap.put(UniversalEnum.THREE.getValue(), UniversalEnum.METEOROLOGICAL_DETECTOR.getValue()); + itemTypeMap.put(UniversalEnum.FIVE.getValue(), UniversalEnum.SECTION_VOICE_BROADCAST_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.SIX.getValue(), UniversalEnum.GUARDRAIL_COLLISION_WARNING_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.SEVEN.getValue(), UniversalEnum.MILLIMETER_WAVE_RADAR.getValue()); + itemTypeMap.put(UniversalEnum.EIGHT.getValue(), UniversalEnum.CONFLUENCE_AREA_EARLY_WARNING_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.TEN.getValue(), UniversalEnum.LASER_FATIGUE_AWAKENING.getValue()); + itemTypeMap.put(UniversalEnum.ELEVEN.getValue(), UniversalEnum.CLASS_I_TRAFFIC_SURVEY_STATION.getValue()); + itemTypeMap.put(UniversalEnum.TWELVE.getValue(), UniversalEnum.INTELLIGENT_DRIVING_GUIDANCE_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.THIRTEEN.getValue(), UniversalEnum.SMART_DEVICE_BOX.getValue()); + itemTypeMap.put(UniversalEnum.FIFTEEN.getValue(), UniversalEnum.SOLAR_PANEL.getValue()); + itemTypeMap.put(UniversalEnum.SIXTEEN.getValue(), UniversalEnum.REMOTE_COMPUTER.getValue()); + String type = groupItems.get(UniversalEnum.ZERO.getNumber()).getType(); + String description = itemTypeMap.get(type); + if (flag) { + row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(description); + } + row.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.ONE.getNumber()).setCellValue(groupItems.size()); + row.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.TWO.getNumber()).setCellValue(b); + row.createCell(UniversalEnum.THREE.getNumber() * i + UniversalEnum.THREE.getNumber()).setCellValue(String.format("%.2f%%", (double) b / groupItems.size() * UniversalEnum.ONE_HUNDRED.getNumber())); + } + i++; + flag = false; + // } } } - public void createSheet(Sheet sheet,Map >categoryMap){ + public void createSheet(Sheet sheet, Map> categoryMap) { int rowNum = UniversalEnum.ZERO.getNumber(); Row row = sheet.createRow(rowNum); row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(UniversalEnum.EQUIPMENT_CLASSIFICATION.getValue()); @@ -151,40 +164,40 @@ public class ExcelExportService { rowNum = UniversalEnum.ONE.getNumber(); for (Map.Entry> entry : categoryMap.entrySet()) { List groupItems = entry.getValue(); - long a=groupItems.stream().filter(iteam-> Objects.equals(iteam.getDeviceStatus(), UniversalEnum.ONE.getValue())).count(); - row = sheet.createRow(rowNum++); + long a = groupItems.stream().filter(iteam -> Objects.equals(iteam.getDeviceStatus(), UniversalEnum.ONE.getValue())).count(); + row = sheet.createRow(rowNum++); HashMap itemTypeMap = new HashMap<>(); - itemTypeMap.put(UniversalEnum.ONE.getValue(), UniversalEnum.HD_NETWORK_GUN_TYPE_FIXED_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.TWO.getValue(), UniversalEnum.HD_NETWORK_SPHERICAL_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.THREE.getValue(), UniversalEnum.UNDER_THE_BRIDGE_HD_NETWORK_SPHERICAL_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.FOUR.getValue(), UniversalEnum.THREE_HUNDRED_SIXTY_PANORAMIC_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.FIVE.getValue(), UniversalEnum.ONE_HUNDRED_EIGHTY_PANORAMIC_CAMERA.getValue()); - itemTypeMap.put(UniversalEnum.SIX.getValue(), UniversalEnum.GANTRY_TYPE_VARIABLE_MESSAGE_SIGN.getValue()); - itemTypeMap.put(UniversalEnum.SEVEN.getValue(), UniversalEnum.AWNING_VARIABLE_INFORMATION_SIGN.getValue()); - itemTypeMap.put(UniversalEnum.EIGHT.getValue(), UniversalEnum.CANTILEVER_VARIABLE_INFORMATION_SIGN_IN_FRONT_OF_STATION.getValue()); - itemTypeMap.put(UniversalEnum.NINE.getValue(), UniversalEnum.METEOROLOGICAL_DETECTOR.getValue()); - itemTypeMap.put(UniversalEnum.TEN.getValue(), UniversalEnum.SECTION_VOICE_BROADCAST_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.ELEVEN.getValue(), UniversalEnum.GUARDRAIL_COLLISION_WARNING_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.TWELVE.getValue(), UniversalEnum.MILLIMETER_WAVE_RADAR.getValue()); - itemTypeMap.put(UniversalEnum.THIRTEEN.getValue(), UniversalEnum.CONFLUENCE_AREA_EARLY_WARNING_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.FOURTEEN.getValue(), UniversalEnum.LASER_FATIGUE_AWAKENING.getValue()); - itemTypeMap.put(UniversalEnum.FIFTEEN.getValue(), UniversalEnum.CLASS_I_TRAFFIC_SURVEY_STATION.getValue()); - itemTypeMap.put(UniversalEnum.SIXTEEN.getValue(), UniversalEnum.INTELLIGENT_DRIVING_GUIDANCE_SYSTEM.getValue()); - itemTypeMap.put(UniversalEnum.SEVENTEEN.getValue(), UniversalEnum.SMART_DEVICE_BOX.getValue()); + itemTypeMap.put(UniversalEnum.ONE_ONE.getValue(), UniversalEnum.HD_NETWORK_GUN_TYPE_FIXED_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_TWO.getValue(), UniversalEnum.HD_NETWORK_SPHERICAL_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_THREE.getValue(), UniversalEnum.UNDER_THE_BRIDGE_HD_NETWORK_SPHERICAL_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_FOUR.getValue(), UniversalEnum.THREE_HUNDRED_SIXTY_PANORAMIC_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.ONE_FIVE.getValue(), UniversalEnum.ONE_HUNDRED_EIGHTY_PANORAMIC_CAMERA.getValue()); + itemTypeMap.put(UniversalEnum.TWO_ONE.getValue(), UniversalEnum.GANTRY_TYPE_VARIABLE_MESSAGE_SIGN.getValue()); + itemTypeMap.put(UniversalEnum.TWO_TWO.getValue(), UniversalEnum.VARIABLE_MESSAGE_SIGN_IN_FRONT_OF_STATION.getValue()); + itemTypeMap.put(UniversalEnum.TWO_THREE.getValue(), UniversalEnum.AWNING_VARIABLE_INFORMATION_SIGN.getValue()); + itemTypeMap.put(UniversalEnum.TWO_FOUR.getValue(), UniversalEnum.CANTILEVER_VARIABLE_INFORMATION_SIGN_IN_FRONT_OF_STATION.getValue()); + itemTypeMap.put(UniversalEnum.THREE.getValue(), UniversalEnum.METEOROLOGICAL_DETECTOR.getValue()); + itemTypeMap.put(UniversalEnum.FIVE.getValue(), UniversalEnum.SECTION_VOICE_BROADCAST_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.SIX.getValue(), UniversalEnum.GUARDRAIL_COLLISION_WARNING_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.SEVEN.getValue(), UniversalEnum.MILLIMETER_WAVE_RADAR.getValue()); + itemTypeMap.put(UniversalEnum.EIGHT.getValue(), UniversalEnum.CONFLUENCE_AREA_EARLY_WARNING_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.TEN.getValue(), UniversalEnum.LASER_FATIGUE_AWAKENING.getValue()); + itemTypeMap.put(UniversalEnum.ELEVEN.getValue(), UniversalEnum.CLASS_I_TRAFFIC_SURVEY_STATION.getValue()); + itemTypeMap.put(UniversalEnum.TWELVE.getValue(), UniversalEnum.INTELLIGENT_DRIVING_GUIDANCE_SYSTEM.getValue()); + itemTypeMap.put(UniversalEnum.THIRTEEN.getValue(), UniversalEnum.SMART_DEVICE_BOX.getValue()); + itemTypeMap.put(UniversalEnum.FIFTEEN.getValue(), UniversalEnum.SOLAR_PANEL.getValue()); + itemTypeMap.put(UniversalEnum.SIXTEEN.getValue(), UniversalEnum.REMOTE_COMPUTER.getValue()); String type = groupItems.get(UniversalEnum.ZERO.getNumber()).getType(); String description = itemTypeMap.get(type); - row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(description); - row.createCell(UniversalEnum.ONE.getNumber()).setCellValue(groupItems.size()); - row.createCell(UniversalEnum.TWO.getNumber()).setCellValue(a); - row.createCell(UniversalEnum.THREE.getNumber()).setCellValue(String.format("%.2f%%", (double) a / groupItems.size() * UniversalEnum.ONE_HUNDRED.getNumber())); + row.createCell(UniversalEnum.ZERO.getNumber()).setCellValue(description); + row.createCell(UniversalEnum.ONE.getNumber()).setCellValue(groupItems.size()); + row.createCell(UniversalEnum.TWO.getNumber()).setCellValue(a); + row.createCell(UniversalEnum.THREE.getNumber()).setCellValue(String.format("%.2f%%", (double) a / groupItems.size() * UniversalEnum.ONE_HUNDRED.getNumber())); } } - - - }