1cd19658 张雷

奥体项目实时数据增加仪表排序

1 个父辈 c2f21995
...@@ -50,6 +50,9 @@ public class WhatStructData { ...@@ -50,6 +50,9 @@ public class WhatStructData {
50 /**备注*/ 50 /**备注*/
51 @ApiModelProperty(value = "备注") 51 @ApiModelProperty(value = "备注")
52 private String remark; 52 private String remark;
53 /**排序*/
54 @ApiModelProperty(value = "排序")
55 private Integer monitorSort;
53 /**创建人id*/ 56 /**创建人id*/
54 @ApiModelProperty(value = "创建人id") 57 @ApiModelProperty(value = "创建人id")
55 private String createBy; 58 private String createBy;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <mapper namespace="com.skua.modules.business.mapper.WhatStructDataMapper"> 3 <mapper namespace="com.skua.modules.business.mapper.WhatStructDataMapper">
4 4
5 <select id="getList" resultType="com.skua.modules.business.entity.WhatStructData"> 5 <select id="getList" resultType="com.skua.modules.business.entity.WhatStructData">
6 select * from what_struct_data 6 select * from what_struct_data order by monitor_sort
7 </select> 7 </select>
8 8
9 <select id="getListForUE" resultType="com.skua.modules.business.entity.WhatStructData"> 9 <select id="getListForUE" resultType="com.skua.modules.business.entity.WhatStructData">
......
...@@ -45,51 +45,51 @@ public class YwLocationServiceImpl implements ILocationService { ...@@ -45,51 +45,51 @@ public class YwLocationServiceImpl implements ILocationService {
45 HashMap<String,Object> pMap = new HashMap<>(); 45 HashMap<String,Object> pMap = new HashMap<>();
46 pMap.put("username", username); 46 pMap.put("username", username);
47 pMap.put("password", password); 47 pMap.put("password", password);
48 // String get = HttpUtil.get(url+"open/information/getRealGps.do",pMap); 48 String get = HttpUtil.get(url+"open/information/getRealGps.do",pMap);
49 String get = "{\n" + 49 // String get = "{\n" +
50 "\"data\":\n" + 50 // "\"data\":\n" +
51 "[{\n" + 51 // "[{\n" +
52 "\"empName\":\"贾伟峰\",\n" + 52 // "\"empName\":\"贾伟峰\",\n" +
53 "\"area\":\"2\",\n" + 53 // "\"area\":\"2\",\n" +
54 "\"deviceNo\":\"16a7ebee\",\n" + 54 // "\"deviceNo\":\"16a7ebee\",\n" +
55 "\"crossY\":\"2564\",\n" + 55 // "\"crossY\":\"2564\",\n" +
56 "\"crossX\":\"1508\",\n" + 56 // "\"crossX\":\"1508\",\n" +
57 "\"longitude\":104.04438600000114,\n" + 57 // "\"longitude\":104.04438600000114,\n" +
58 "\"latitude\":30.630693000000115,\n" + 58 // "\"latitude\":30.630693000000115,\n" +
59 "\"dateTime\":\"2022-05-05 11:35:52\",\n" + 59 // "\"dateTime\":\"2022-05-05 11:35:52\",\n" +
60 "\"layer\":\"-1\",\n" + 60 // "\"layer\":\"-1\",\n" +
61 "\"empNo\":\"108036\",\n" + 61 // "\"empNo\":\"108036\",\n" +
62 "\"specifictype\":\"0\"\n" + 62 // "\"specifictype\":\"0\"\n" +
63 "},\n" + 63 // "},\n" +
64 "{\n" + 64 // "{\n" +
65 "\"empName\":\"宋锡园\",\n" + 65 // "\"empName\":\"宋锡园\",\n" +
66 "\"area\":\"2\",\n" + 66 // "\"area\":\"2\",\n" +
67 "\"deviceNo\":\"169c1502\",\n" + 67 // "\"deviceNo\":\"169c1502\",\n" +
68 "\"crossY\":\"2584\",\n" + 68 // "\"crossY\":\"2584\",\n" +
69 "\"crossX\":\"1538\",\n" + 69 // "\"crossX\":\"1538\",\n" +
70 "\"longitude\":104.04438600000114,\n" + 70 // "\"longitude\":104.04438600000114,\n" +
71 "\"latitude\":30.630693000000115,\n" + 71 // "\"latitude\":30.630693000000115,\n" +
72 "\"dateTime\":\"2022-05-05 11:35:52\",\n" + 72 // "\"dateTime\":\"2022-05-05 11:35:52\",\n" +
73 "\"layer\":\"-1\",\n" + 73 // "\"layer\":\"-1\",\n" +
74 "\"empNo\":\"108037\",\n" + 74 // "\"empNo\":\"108037\",\n" +
75 "\"specifictype\":\"0\"\n" + 75 // "\"specifictype\":\"0\"\n" +
76 "},\n" + 76 // "},\n" +
77 "{\n" + 77 // "{\n" +
78 "\"empName\":\"何成翔\",\n" + 78 // "\"empName\":\"何成翔\",\n" +
79 "\"area\":\"2\",\n" + 79 // "\"area\":\"2\",\n" +
80 "\"deviceNo\":\"169c0cba\",\n" + 80 // "\"deviceNo\":\"169c0cba\",\n" +
81 "\"crossY\":\"2564\",\n" + 81 // "\"crossY\":\"2564\",\n" +
82 "\"crossX\":\"2816\",\n" + 82 // "\"crossX\":\"2816\",\n" +
83 "\"longitude\":124.01230000114,\n" + 83 // "\"longitude\":124.01230000114,\n" +
84 "\"latitude\":31.6301230000115,\n" + 84 // "\"latitude\":31.6301230000115,\n" +
85 "\"dateTime\":\"2022-05-05 11:35:52\",\n" + 85 // "\"dateTime\":\"2022-05-05 11:35:52\",\n" +
86 "\"layer\":\"-1\",\n" + 86 // "\"layer\":\"-1\",\n" +
87 "\"empNo\":\"147258\",\n" + 87 // "\"empNo\":\"147258\",\n" +
88 "\"specifictype\":\"0\"\n" + 88 // "\"specifictype\":\"0\"\n" +
89 "}],\n" + 89 // "}],\n" +
90 "\"status\":0,\n" + 90 // "\"status\":0,\n" +
91 "\"msginfo\":\"接口调用成功!\"\n" + 91 // "\"msginfo\":\"接口调用成功!\"\n" +
92 "}"; 92 // "}";
93 JSONObject json = JSONObject.parseObject(get); 93 JSONObject json = JSONObject.parseObject(get);
94 List<UserLocationYwResult> getList = JSONObject.parseArray(json.get("data").toString(), UserLocationYwResult.class); 94 List<UserLocationYwResult> getList = JSONObject.parseArray(json.get("data").toString(), UserLocationYwResult.class);
95 getLocationBasicInfo();//坐标转换基础信息 95 getLocationBasicInfo();//坐标转换基础信息
...@@ -118,29 +118,29 @@ public class YwLocationServiceImpl implements ILocationService { ...@@ -118,29 +118,29 @@ public class YwLocationServiceImpl implements ILocationService {
118 pMap.put("begintime", startTime); 118 pMap.put("begintime", startTime);
119 pMap.put("endtime", endTime); 119 pMap.put("endtime", endTime);
120 pMap.put("deveuis", deviceCode); 120 pMap.put("deveuis", deviceCode);
121 // String get = HttpUtil.get(url+"open/information/getHis.do",pMap); 121 String get = HttpUtil.get(url+"open/information/getHis.do",pMap);
122 String get = "{\n" + 122 // String get = "{\n" +
123 "\"data\":[\n" + 123 // "\"data\":[\n" +
124 "{\n" + 124 // "{\n" +
125 "\"name\":\"贾伟峰\",\n" + 125 // "\"name\":\"贾伟峰\",\n" +
126 "\"time\":\"2020-04-20 00:02:35\",\n" + 126 // "\"time\":\"2020-04-20 00:02:35\",\n" +
127 "\"x\":\"3539.05\",\n" + 127 // "\"x\":\"3539.05\",\n" +
128 "\"y\":\"2711.93\",\n" + 128 // "\"y\":\"2711.93\",\n" +
129 "\"lat\":32.54224453987491,\n" + 129 // "\"lat\":32.54224453987491,\n" +
130 "\"lon\":121.05223514735032\n" + 130 // "\"lon\":121.05223514735032\n" +
131 "},\n" + 131 // "},\n" +
132 "{\n" + 132 // "{\n" +
133 "\"name\":\"贾伟峰\",\n" + 133 // "\"name\":\"贾伟峰\",\n" +
134 "\"time\":\"2020-04-20 00:02:45\",\n" + 134 // "\"time\":\"2020-04-20 00:02:45\",\n" +
135 "\"x\":\"3536.05\",\n" + 135 // "\"x\":\"3536.05\",\n" +
136 "\"y\":\"2611.93\",\n" + 136 // "\"y\":\"2611.93\",\n" +
137 "\"lat\":32.54212353987491,\n" + 137 // "\"lat\":32.54212353987491,\n" +
138 "\"lon\":121.05123514735032\n" + 138 // "\"lon\":121.05123514735032\n" +
139 "}\n" + 139 // "}\n" +
140 "],\n" + 140 // "],\n" +
141 "\"msginfo\":\"成功!\",\n" + 141 // "\"msginfo\":\"成功!\",\n" +
142 "\"status\":0\n" + 142 // "\"status\":0\n" +
143 "}"; 143 // "}";
144 JSONObject json = JSONObject.parseObject(get); 144 JSONObject json = JSONObject.parseObject(get);
145 List<UserLocationHistoryYwResult> getList = JSONObject.parseArray(json.get("data").toString(), UserLocationHistoryYwResult.class); 145 List<UserLocationHistoryYwResult> getList = JSONObject.parseArray(json.get("data").toString(), UserLocationHistoryYwResult.class);
146 getLocationBasicInfo();//坐标转换基础信息 146 getLocationBasicInfo();//坐标转换基础信息
...@@ -166,30 +166,30 @@ public class YwLocationServiceImpl implements ILocationService { ...@@ -166,30 +166,30 @@ public class YwLocationServiceImpl implements ILocationService {
166 map.put("page",1); 166 map.put("page",1);
167 map.put("rows",1000); 167 map.put("rows",1000);
168 map.put("emp",""); 168 map.put("emp","");
169 // String post = HttpUtil.get(url+"open/information/getEmp.do",map); 169 String post = HttpUtil.get(url+"open/information/getEmp.do",map);
170 String post = "{\n" + 170 // String post = "{\n" +
171 "\t\"data\": {\n" + 171 // "\t\"data\": {\n" +
172 "\t\t\"total\": 3,\n" + 172 // "\t\t\"total\": 3,\n" +
173 "\t\t\"rows\": [{\n" + 173 // "\t\t\"rows\": [{\n" +
174 "\t\t\t\"id\": 1,\n" + 174 // "\t\t\t\"id\": 1,\n" +
175 "\t\t\t\"empno\": \"108036\",\n" + 175 // "\t\t\t\"empno\": \"108036\",\n" +
176 "\t\t\t\"empname\": \"贾伟峰\",\n" + 176 // "\t\t\t\"empname\": \"贾伟峰\",\n" +
177 "\t\t\t\"deviceno\": \"16a7ebee\"\n" + 177 // "\t\t\t\"deviceno\": \"16a7ebee\"\n" +
178 "\t\t},{\n" + 178 // "\t\t},{\n" +
179 "\t\t\t\"id\": 2,\n" + 179 // "\t\t\t\"id\": 2,\n" +
180 "\t\t\t\"empno\": \"108037\",\n" + 180 // "\t\t\t\"empno\": \"108037\",\n" +
181 "\t\t\t\"empname\": \"宋锡园\",\n" + 181 // "\t\t\t\"empname\": \"宋锡园\",\n" +
182 "\t\t\t\"deviceno\": \"169c1502\"\n" + 182 // "\t\t\t\"deviceno\": \"169c1502\"\n" +
183 "\t\t},{\n" + 183 // "\t\t},{\n" +
184 "\t\t\t\"id\": 3,\n" + 184 // "\t\t\t\"id\": 3,\n" +
185 "\t\t\t\"empno\": \"147258\",\n" + 185 // "\t\t\t\"empno\": \"147258\",\n" +
186 "\t\t\t\"empname\": \"何成翔\",\n" + 186 // "\t\t\t\"empname\": \"何成翔\",\n" +
187 "\t\t\t\"deviceno\": \"169c0cba\"\n" + 187 // "\t\t\t\"deviceno\": \"169c0cba\"\n" +
188 "\t\t}]\n" + 188 // "\t\t}]\n" +
189 "\t},\n" + 189 // "\t},\n" +
190 "\t\"msginfo\": \"成功!\",\n" + 190 // "\t\"msginfo\": \"成功!\",\n" +
191 "\t\"status\": 0\n" + 191 // "\t\"status\": 0\n" +
192 "} "; 192 // "} ";
193 JSONObject json = JSONObject.parseObject(JSONObject.parseObject(post).get("data").toString()); 193 JSONObject json = JSONObject.parseObject(JSONObject.parseObject(post).get("data").toString());
194 List<UserBaseInfoYwResult> userList = JSONObject.parseArray(json.get("rows").toString(), UserBaseInfoYwResult.class); 194 List<UserBaseInfoYwResult> userList = JSONObject.parseArray(json.get("rows").toString(), UserBaseInfoYwResult.class);
195 for (UserBaseInfoYwResult userBaseInfoYwResult : userList) { 195 for (UserBaseInfoYwResult userBaseInfoYwResult : userList) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!