Преглед изворни кода

适配页面重排版-北煤2

hjp пре 3 месеци
родитељ
комит
99dd87f4ac
2 измењених фајлова са 182 додато и 3 уклоњено
  1. 118 1
      src/main/java/com/jg/util/GetStructure.java
  2. 64 2
      src/main/resources/jsons/北煤2tag.json

+ 118 - 1
src/main/java/com/jg/util/GetStructure.java

@@ -429,8 +429,125 @@ public class GetStructure {
     }
 
     public static Map<String, Object> beimei2(Map<Integer, ShowVo> showVoMap){
+        Map<String, Object> allMap = new HashMap<>();
 
-        return null;
+        //top
+        List<ShowVo> top = new ArrayList<>();
+        top.add(showVoMap.get(94));
+        top.add(showVoMap.get(98));
+        top.add(showVoMap.get(96));
+        allMap.put("top",top);
+
+        //left
+        Map<String,Object> left = new HashMap<>();
+        List<ShowVo> left1 = new ArrayList<>();
+        left1.add(showVoMap.get(0));
+        left1.add(showVoMap.get(2));
+        left1.add(showVoMap.get(4));
+        left1.add(showVoMap.get(6));
+        left.put("1",left1);
+
+        List<ShowVo> left2 = new ArrayList<>();
+        left2.add(showVoMap.get(80));
+        left2.add(showVoMap.get(86));
+        left.put("2",left2);
+
+        List<ShowVo> left3 = new ArrayList<>();
+        left3.add(showVoMap.get(90));
+        left3.add(showVoMap.get(92));
+        left3.add(showVoMap.get(112));
+        left.put("3",left3);
+
+        Map<String,Object> l4Map = new HashMap<>();
+        l4Map.put("circulatingAir1",showVoMap.get(16));//循环
+        l4Map.put("furnaceAir1",showVoMap.get(18));//炉膛
+        l4Map.put("circulatingAir2",showVoMap.get(20));//循环
+        l4Map.put("furnaceAir2",showVoMap.get(22));//炉膛
+        left.put("4",l4Map);
+
+        List<ShowVo> left5 = new ArrayList<>();
+        left5.add(showVoMap.get(84));
+        left5.add(showVoMap.get(88));
+        left5.add(showVoMap.get(100));
+        left.put("5",left5);
+
+        List<ShowVo> left6 = new ArrayList<>();
+        left6.add(showVoMap.get(78));
+        left6.add(showVoMap.get(82));
+        left.put("6",left6);
+
+        List<ShowVo> left7 = new ArrayList<>();
+        left7.add(showVoMap.get(8));
+        left7.add(showVoMap.get(10));
+        left7.add(showVoMap.get(12));
+        left7.add(showVoMap.get(14));
+        left.put("7",left7);
+        allMap.put("left",left);
+
+        //right
+        List<Map> right = new ArrayList<>();
+        Map<String,Object> right1 = new HashMap<>();
+        right1.put("name","东库侧北温度(2车道)");
+        List<ShowVo> right1Data = new ArrayList<>();
+        right1Data.add(showVoMap.get(114));
+        right1Data.add(showVoMap.get(36));
+        right1Data.add(showVoMap.get(116));
+        right1Data.add(showVoMap.get(38));
+        right1Data.add(showVoMap.get(118));
+        right1Data.add(showVoMap.get(40));
+        right1Data.add(showVoMap.get(120));
+        right1Data.add(showVoMap.get(42));
+        right1Data.add(showVoMap.get(122));
+        right1.put("data",right1Data);
+        right.add(right1);
+
+        Map<String,Object> right2 = new HashMap<>();
+        right2.put("name","东库顶北温度(2车道)");
+        List<ShowVo> right2Data = new ArrayList<>();
+        right2Data.add(showVoMap.get(102));
+        right2Data.add(showVoMap.get(42));
+        right2Data.add(showVoMap.get(104));
+        right2Data.add(showVoMap.get(48));
+        right2Data.add(showVoMap.get(108));
+        right2Data.add(showVoMap.get(46));
+        right2Data.add(showVoMap.get(106));
+        right2Data.add(showVoMap.get(52));
+        right2Data.add(showVoMap.get(110));
+        right2.put("data",right2Data);
+        right.add(right2);
+
+        Map<String,Object> right3 = new HashMap<>();
+        right3.put("name","西库顶北温度(1车道)");
+        List<ShowVo> right3Data = new ArrayList<>();
+        right3Data.add(showVoMap.get(68));
+        right3Data.add(showVoMap.get(50));
+        right3Data.add(showVoMap.get(72));
+        right3Data.add(showVoMap.get(56));
+        right3Data.add(showVoMap.get(70));
+        right3Data.add(showVoMap.get(54));
+        right3Data.add(showVoMap.get(76));
+        right3Data.add(showVoMap.get(58));
+        right3Data.add(showVoMap.get(74));
+        right3.put("data",right3Data);
+        right.add(right3);
+
+        Map<String,Object> right4 = new HashMap<>();
+        right4.put("name","西库侧北温度(1车道)");
+        List<ShowVo> right4Data = new ArrayList<>();
+        right4Data.add(showVoMap.get(24));
+        right4Data.add(showVoMap.get(60));
+        right4Data.add(showVoMap.get(26));
+        right4Data.add(showVoMap.get(64));
+        right4Data.add(showVoMap.get(30));
+        right4Data.add(showVoMap.get(62));
+        right4Data.add(showVoMap.get(32));
+        right4Data.add(showVoMap.get(66));
+        right4Data.add(showVoMap.get(34));
+        right4.put("data",right4Data);
+        right.add(right4);
+        allMap.put("right",right);
+
+        return allMap;
     }
     public static Map<String, Object> beimei3(Map<Integer, ShowVo> showVoMap){
         return null;

+ 64 - 2
src/main/resources/jsons/北煤2tag.json

@@ -1,5 +1,6 @@
 [
 	{
+		"name": "煤气阀1",
 		"offset": 0,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -9,6 +10,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀2",
 		"offset": 2,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -18,6 +20,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀3",
 		"offset": 4,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -27,6 +30,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀4",
 		"offset": 6,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -36,6 +40,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀5",
 		"offset": 8,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -45,6 +50,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀6",
 		"offset": 10,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -54,6 +60,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀7",
 		"offset": 12,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -63,6 +70,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气阀8",
 		"offset": 14,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -72,6 +80,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "1#循环",
 		"offset": 16,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -81,6 +90,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "1#炉膛",
 		"offset": 18,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -90,6 +100,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "2#循环",
 		"offset": 20,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -99,6 +110,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "2#炉膛",
 		"offset": 22,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -108,6 +120,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "1#温度",
 		"offset": 24,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -117,6 +130,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "3#温度",
 		"offset": 26,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -126,6 +140,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "",
 		"offset": 28,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -135,24 +150,27 @@
 		"dataType": "int"
 	},
 	{
+		"name": "5#温度",
 		"offset": 30,
 		"slaveId": 1,
 		"functionCode": 4,
-		"tag": "BM2_04",
+		"tag": "BM2_05",
 		"desc": "西库侧北7温度",
 		"unit": "℃",
 		"dataType": "int"
 	},
 	{
+		"name": "7#温度",
 		"offset": 32,
 		"slaveId": 1,
 		"functionCode": 4,
-		"tag": "BM2_05",
+		"tag": "BM2_04",
 		"desc": "西库侧北5温度",
 		"unit": "℃",
 		"dataType": "int"
 	},
 	{
+		"name": "9#温度",
 		"offset": 34,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -162,6 +180,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "2#温度",
 		"offset": 36,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -171,6 +190,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "4#温度",
 		"offset": 38,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -180,6 +200,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "6#温度",
 		"offset": 40,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -189,6 +210,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "2#温度",
 		"offset": 42,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -198,6 +220,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "8#温度",
 		"offset": 44,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -207,6 +230,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "6#温度",
 		"offset": 46,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -216,6 +240,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "4#温度",
 		"offset": 48,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -225,6 +250,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "2#温度",
 		"offset": 50,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -234,6 +260,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "8#温度",
 		"offset": 52,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -243,6 +270,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "6#温度",
 		"offset": 54,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -252,6 +280,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "4#温度",
 		"offset": 56,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -261,6 +290,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "8#温度",
 		"offset": 58,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -270,6 +300,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "2#温度",
 		"offset": 60,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -279,6 +310,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "6#温度",
 		"offset": 62,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -288,6 +320,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "4#温度",
 		"offset": 64,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -297,6 +330,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "8#温度",
 		"offset": 66,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -306,6 +340,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "1#温度",
 		"offset": 68,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -315,6 +350,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "5#温度",
 		"offset": 70,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -324,6 +360,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "3#温度",
 		"offset": 72,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -333,6 +370,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "9#温度",
 		"offset": 74,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -342,6 +380,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "7#温度",
 		"offset": 76,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -351,6 +390,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "西温度",
 		"offset": 78,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -360,6 +400,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "西温度",
 		"offset": 80,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -369,6 +410,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "东温度",
 		"offset": 82,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -378,6 +420,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "热风温度",
 		"offset": 84,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -387,6 +430,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "东温度",
 		"offset": 86,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -396,6 +440,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "循环管温度",
 		"offset": 88,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -405,6 +450,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "热风温度",
 		"offset": 90,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -414,6 +460,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "循环管温度",
 		"offset": 92,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -423,6 +470,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气量",
 		"offset": 94,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -432,6 +480,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气温度",
 		"offset": 96,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -441,6 +490,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "煤气压力",
 		"offset": 98,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -450,6 +500,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "支管压力",
 		"offset": 100,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -459,6 +510,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "1#温度",
 		"offset": 102,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -468,6 +520,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "3#温度",
 		"offset": 104,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -477,6 +530,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "7#温度",
 		"offset": 106,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -486,6 +540,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "5#温度",
 		"offset": 108,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -495,6 +550,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "9#温度",
 		"offset": 110,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -504,6 +560,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "支管压力",
 		"offset": 112,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -513,6 +570,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "1#温度",
 		"offset": 114,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -522,6 +580,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "3#温度",
 		"offset": 116,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -531,6 +590,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "5#温度",
 		"offset": 118,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -540,6 +600,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "7#温度",
 		"offset": 120,
 		"slaveId": 1,
 		"functionCode": 4,
@@ -549,6 +610,7 @@
 		"dataType": "int"
 	},
 	{
+		"name": "9#温度",
 		"offset": 122,
 		"slaveId": 1,
 		"functionCode": 4,