wuyouming666
2024-05-09 605b5b101e437db286b4f781db5e3501c554b41a
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/ExcelToJsonConverter.java
@@ -18,13 +18,13 @@
public class ExcelToJsonConverter {
    public static void main(String[] args) {
        String excelFilePath = "src/main/resources/JsonFile/alarm.xlsx";
        String excelFilePath = "src/main/resources/JsonFile/PlcdownGlass.xlsx";
        String sheetName = "Sheet1";
        int addressColumnIndex = 0;
        int nameColumnIndex = 1;
        //int unitColumnIndex = 2;
        String outputFilePath = "src/main/resources/JsonFile/PlcAlarm.json";
        String outputFilePath = "src/main/resources/JsonFile/PlcdownGlass.json";
        try (Workbook workbook = new XSSFWorkbook(new FileInputStream(excelFilePath))) {
            Sheet sheet = workbook.getSheet(sheetName);
@@ -75,8 +75,8 @@
            LinkedHashMap<String, Object> resultObject = new LinkedHashMap<>();
            resultObject.put("plcAddressBegin", "DB100.0");
            resultObject.put("plcAddressLenght", String.valueOf(plcAddressLength));
            // resultObject.put("dataType", "word");
            resultObject.put("dataType", "bit");
            resultObject.put("dataType", "word");
           // resultObject.put("dataType", "bit");
            resultObject.put("parameteInfor", jsonList);
            Gson gson = new Gson();