span rel=""> 286
				  employeeTerminalRela.setWorkEmployeeId(params.get("workEmployeeId"));//用户ID
287
				  employeeTerminalRela.setTerminalId(params.get("deviceId"));//终端ID
288
				  CommonRequest<EmployeeTerminalRela> resourceEmployeeTerminalRelalCommonRequest = new CommonRequest<EmployeeTerminalRela>(employeeTerminalRela);
289
				  
290
				  CommonResponse<EmployeeTerminalRela> createRelaResult = employeeTerminalRelaCommand.createIndividualDevRela(resourceEmployeeTerminalRelalCommonRequest);
291
				  result=createRelaResult.isSuccess();
292
				  
293
			}else if (EbcConstant.BIND_DEVICE_TYPE_SHIP.equals(params.get("bindType"))) {
294
				//与工具绑定
295
				ResourceToolTerminalRel resourceToolTerminalRel=new ResourceToolTerminalRel();
296
				resourceToolTerminalRel.setRelaType("LOC");//TODO 关系类型,默认可填'LOC'
297
				resourceToolTerminalRel.setTerminalId(params.get("deviceId"));//终端ID
298
				resourceToolTerminalRel.setResourceToolId(params.get("toolId"));//设备ID
299
				CommonRequest<ResourceToolTerminalRel> resourceToolTerminalRelCommonRequest =new CommonRequest<ResourceToolTerminalRel>(resourceToolTerminalRel);
231 300
				
301
				CommonResponse<ResourceToolTerminalRel> createRelaResult = resourceToolCommand.createWorkToolsDevRela(resourceToolTerminalRelCommonRequest);
302
				result=createRelaResult.isSuccess();
232 303
				
233
				// 根据终端id删除终端关联信息
234
				/*if (NorthboundInterfaceConstant.resultCode_succeed.equals(map.get("resultCode"))) {
235
					HashMap<String, Object> paramsHashMap = new HashMap<>();
236
					paramsHashMap.put("DEVICE_ID", params.get("deviceId"));
237
					int i = unbindDevice(paramsHashMap);
238
				}*/
239
				return map;
304
			}
305
		}
306
		return result;
307
	}
308
309
	@Override
310
	public Map<String, Object> queryBindDeviceInfo(Map<String, String> params) throws Exception {
311
		List<String> deviceIdList=new ArrayList<String>();
312
		deviceIdList.add(params.get("deviceId"));
313
		HashMap<String, Object> deviceIdListMap=new HashMap<String, Object>();
314
		deviceIdListMap.put("deviceIdList", deviceIdList);
315
		
316
		
317
		
318
		// 终端与人员绑定
319
		CommonResponse<List<EmployeeTerminalRelaDto>> bindEmployeeInfoCommon = employeeTerminalRelaQuery
320
				.queryIndividualDevRela(new CommonRequest<List<String>>(deviceIdList));
321
		List<EmployeeTerminalRelaDto> bindEmployeeInfoList = bindEmployeeInfoCommon.getData();
322
		
323
		
324
		
325
		// 终端与工具绑定
326
		CommonResponse<PageInfo<Map<String, Object>>> bindToolInfoCommon = resourceToolQuery
327
				.queryWorkToolsDevRela(new CommonRequest<HashMap<String, Object>>(deviceIdListMap));
328
		List<Map<String, Object>> bindToolInfoList = bindToolInfoCommon.getData().getData();
329
			
330
			
331
			
332
		
333
		return null;
334
	}
335
336
	@Override
337
	public boolean unbindDevice(Map<String, String> params) throws Exception {
338
		String[] deviceIds = params.get("deviceId").split(",");
339
		List<String> deviceIdList = new ArrayList<String>();
340
		for (String deviceId : deviceIds) {
341
			deviceIdList.add(deviceId);
342
		}
343
344
		// 根据终端id删除终端关联信息
345
		CommonResponse deleteRelaResult = resourceToolCommand
346
				.deleteWorkToolsDevRelaByTerminalId(new CommonRequest(deviceIdList));
347
		CommonResponse<Void> resopnse = employeeTerminalRelaCommand
348
				.deleteIndividualDevRela(new CommonRequest(deviceIdList));
349
350
		return deleteRelaResult.isSuccess() && resopnse.isSuccess();
351
	}
352
353
	@Override
354
	public List<Map<String, Object>> queryAssociatInfo(Map<String, String> params) throws Exception {
355
		if (EbcConstant.BIND_DEVICE_TYPE_USER.equals(params.get("type"))) {
356
			// 类型是用户,查询用户列表
357
			
358
			
359
		} else if (EbcConstant.BIND_DEVICE_TYPE_SHIP.equals(params.get("type"))) {
360
			// 类型是船舶,查询船舶列表
361
			
362
		}
363
		return null;
240 364
	}
241 365
242
	
243
	
244
	
245
	
246
	
247
	
248
	
249
	
250
	
251 366
	/*@Override
252 367
	public Map<String, Object> queryPageDeviceInfo(Map<String, Object> params, int pageNum, int pageSize)
253 368
			throws Exception {
@ -291,11 +406,11 @@ public class DeviceManageServiceImpl implements DeviceManageService {
291 406
	
292 407
	@Override
293 408
	public List<Map<String, Object>> queryAssociatInfo(Map<String, Object> params) throws Exception {
294
		if (EbcConstant.bind_device_type_user.equals(params.get("type"))) {
409
		if (EbcConstant.BIND_DEVICE_TYPE_USER.equals(params.get("type"))) {
295 410
			// 类型是用户,查询用户列表
296 411
			// TODO 调用uspa接口获取人员信息 暂时用枚举
297 412
			return UserEnums.getAllUserList();
298
		} else if (EbcConstant.bind_device_type_ship.equals(params.get("type"))) {
413
		} else if (EbcConstant.BIND_DEVICE_TYPE_SHIP.equals(params.get("type"))) {
299 414
			// 类型是船舶,查询船舶列表
300 415
			return deviceManageDao.queryAssociatBoatInfo(params);
301 416
		}

+ 48 - 60
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/interfaces/DeviceManageService.java

@ -3,6 +3,8 @@ package com.ai.bss.location.rescue.service.interfaces;
3 3
import java.util.List;
4 4
import java.util.Map;
5 5
6
import org.springframework.web.bind.annotation.RequestBody;
7
6 8
import com.ai.bss.characteristic.spec.model.CharacteristicSpecValue;
7 9
8 10
public interface DeviceManageService {
@ -22,7 +24,7 @@ public interface DeviceManageService {
22 24
	 * @return
23 25
	 */
24 26
	List<CharacteristicSpecValue> queryDeviceTypeList();
25
	
27
26 28
	/**
27 29
	* 获取单个终端信息
28 30
	* @param params
@ -30,55 +32,67 @@ public interface DeviceManageService {
30 32
	* @throws Exception
31 33
	*/
32 34
33
Map<String, Object> queryOneDeviceInfo(Map<String, String> params) throws Exception;
35
	Map<String, Object> queryOneDeviceInfo(Map<String, String> params) throws Exception;
36
37
	/**
38
		* 新增终端信息
39
		* @param params
40
		* @return
41
		* @throws Exception
42
		*/
43
44
	Map<String, Object> addDeviceInfo(Map<String, String> params) throws Exception;
34 45
35
/**
36
	* 新增终端信息
46
	/**
47
		* 修改终端信息
48
		* @param params
49
		* @return
50
		* @throws Exception
51
		*/
52
53
	Map<String, Object> modifyDeviceInfo(Map<String, String> params) throws Exception;
54
55
	/**
56
		* 删除终端信息
57
		* @param params
58
		* @return
59
		* @throws Exception
60
		*/
61
	Map<String, Object> deleteDeviceInfo(Map<String, String> params) throws Exception;
62
63
	/**
64
	* 绑定终端
37 65
	* @param params
66
	* @param type
38 67
	* @return
39 68
	* @throws Exception
40 69
	*/
70
	boolean bindDevice(Map<String, String> params) throws Exception;
41 71
42
Map<String, String> addDeviceInfo(Map<String, String> params) throws Exception;
72
	/**
73
	 * 查询绑定关系信息
74
	 * @param params
75
	 * @return
76
	 * @throws Exception
77
	 */
78
	Map<String, Object> queryBindDeviceInfo(Map<String, String> params) throws Exception;
43 79
44
/**
45
	* 修改终端信息
80
	/**
81
	* 解绑终端
46 82
	* @param params
47 83
	* @return
48 84
	* @throws Exception
49 85
	*/
86
	boolean unbindDevice(Map<String, String> params) throws Exception;
50 87
51
Map<String, String> modifyDeviceInfo(Map<String, String> params) throws Exception;
52
53
/**
54
	* 删除终端信息
88
	/**
89
	* 获取人员或船舶的下拉列表数据
55 90
	* @param params
56 91
	* @return
57 92
	* @throws Exception
58 93
	*/
59
Map<String, String> deleteDeviceInfo(Map<String, String> params) throws Exception;
60
94
	List<Map<String, Object>> queryAssociatInfo(Map<String, String> params) throws Exception;
61 95
62
	
63
	
64
	
65
	
66
	
67
	
68
	
69
	
70
	
71
	
72
	
73
	
74
	
75
	
76
	
77
	
78
	
79
	
80
	
81
	
82 96
	/**
83 97
	 * 获取下拉列表的终端信息
84 98
	 * @param params
@ -90,34 +104,8 @@ Map<String, String> deleteDeviceInfo(Map<String, String> params) throws Exceptio
90 104
	/*List<Map<String, String>> queryListDeviceInfo(Map<String, Object> params, int pageNum, int pageSize)
91 105
			throws Exception;
92 106
	
93
	*//**
94
		* 绑定终端
95
		* @param params
96
		* @param type
97
		* @return
98
		* @throws Exception
99
		*/
100
	/*
101
	boolean bindDevice(Map<String, Object> params) throws Exception;
102
	
103
	*//**
104
		* 解绑终端
105
		* @param params
106
		* @return
107
		* @throws Exception
108
		*/
109
	/*
110
	boolean unbindDevice(Map<String, Object> params) throws Exception;
111
	
112
	*//**
113
		* 获取人员或船舶的下拉列表数据
114
		* @param params
115
		* @return
116
		* @throws Exception
117
		*/
107
	*/
118 108
	/*
119
	List<Map<String, Object>> queryAssociatInfo(Map<String, Object> params) throws Exception;
120
	
121 109
	Map<String, Object> verifyUserOrBoatAssociatInfo(Map<String, Object> params) throws Exception;
122 110
	
123 111
	*//**

+ 14 - 14
location-rescue-service/src/main/java/com/ai/bss/location/rescue/util/NorthboundInterfaceUtil.java

@ -68,7 +68,7 @@ public class NorthboundInterfaceUtil {
68 68
	 * @return
69 69
	 * @throws Exception
70 70
	 */
71
	public Map<String, String> iotGetCallUtil(String url) throws Exception {
71
	public Map<String, Object> iotGetCallUtil(String url) throws Exception {
72 72
		// 调用北向服务的接口
73 73
		logger.debug("GET调用北向接口");
74 74
@ -83,7 +83,7 @@ public class NorthboundInterfaceUtil {
83 83
84 84
		if (!loginFlag) {
85 85
			logger.debug("调用北向接口登录失败");
86
			return new HashMap<String, String>();
86
			return new HashMap<String, Object>();
87 87
		}
88 88
89 89
		// 3.调用北向服务接口
@ -92,7 +92,7 @@ public class NorthboundInterfaceUtil {
92 92
		// (2)调用接口
93 93
		String resultJson = HttpServiceUtil.sendGet(iotServiceUrl + url, charset);
94 94
		// (3)将参数转为Map<String,String>【将返回值统一为String】
95
		Map<String, String> resultMap = JSON.parseObject(resultJson, Map.class);
95
		Map<String, Object> resultMap = JSON.parseObject(resultJson, Map.class);
96 96
97 97
		// 4.登录超时,需重新登录
98 98
		if ("登录超时".equals(resultMap.get("resultMsg"))) {
@ -105,7 +105,7 @@ public class NorthboundInterfaceUtil {
105 105
106 106
			if (!loginFlag) {
107 107
				logger.debug("再次调用北向接口登录失败");
108
				return new HashMap<String, String>();
108
				return new HashMap<String, Object>();
109 109
			}
110 110
111 111
			try {
@ -115,12 +115,12 @@ public class NorthboundInterfaceUtil {
115 115
				resultMap = JSON.parseObject(fianlresultJson, Map.class);
116 116
			} catch (Exception e) {
117 117
				logger.error("再次调用北向接口失败: " + e.getMessage());
118
				return new HashMap<String, String>();
118
				return new HashMap<String, Object>();
119 119
			}
120 120
121 121
			if (resultMap == null) {
122 122
				logger.error("再次调用北向接口返回值为空");
123
				return new HashMap<String, String>();
123
				return new HashMap<String, Object>();
124 124
			}
125 125
		}
126 126
@ -142,7 +142,7 @@ public class NorthboundInterfaceUtil {
142 142
	 * @return
143 143
	 * @throws Exception
144 144
	 */
145
	public Map<String, String> iotPostCallUtil(String url, Map<String, Object> paramsMap) throws Exception {
145
	public Map<String, Object> iotPostCallUtil(String url, Map<String, Object> paramsMap) throws Exception {
146 146
		// 调用北向服务的接口
147 147
		logger.debug("POSt调用北向接口");
148 148
@ -157,14 +157,14 @@ public class NorthboundInterfaceUtil {
157 157
158 158
		if (!loginFlag) {
159 159
			logger.debug("调用北向接口登录失败");
160
			return new HashMap<String, String>();
160
			return new HashMap<String, Object>();
161 161
		}
162 162
163 163
		// 3.调用北向服务接口
164 164
		// (1)设置字符集
165 165
		Charset charset = Charset.forName("utf-8");
166 166
		// 返回值
167
		Map<String, String> resultMap = null;
167
		Map<String, Object> resultMap = null;
168 168
		try {
169 169
			// (2)调用接口
170 170
			String resultJson = HttpServiceUtil.sendPost(iotServiceUrl + url, paramsMap, charset, getMapCache());
@ -172,12 +172,12 @@ public class NorthboundInterfaceUtil {
172 172
			resultMap = JSON.parseObject(resultJson, Map.class);
173 173
		} catch (Exception e) {
174 174
			logger.error("调用北向接口失败: " + e.getMessage());
175
			return new HashMap<String, String>();
175
			return new HashMap<String, Object>();
176 176
		}
177 177
178 178
		if (resultMap == null) {
179 179
			logger.error("调用北向接口返回值为空");
180
			return new HashMap<String, String>();
180
			return new HashMap<String, Object>();
181 181
		}
182 182
183 183
		// 4.登录超时,需重新登录
@ -191,7 +191,7 @@ public class NorthboundInterfaceUtil {
191 191
192 192
			if (!loginFlag) {
193 193
				logger.debug("再次调用北向接口登录失败");
194
				return new HashMap<String, String>();
194
				return new HashMap<String, Object>();
195 195
			}
196 196
197 197
			try {
@ -202,12 +202,12 @@ public class NorthboundInterfaceUtil {
202 202
				resultMap = JSON.parseObject(fianlresultJson, Map.class);
203 203
			} catch (Exception e) {
204 204
				logger.error("再次调用北向接口失败: " + e.getMessage());
205
				return new HashMap<String, String>();
205
				return new HashMap<String, Object>();
206 206
			}
207 207
208 208
			if (resultMap == null) {
209 209
				logger.error("再次调用北向接口返回值为空");
210
				return new HashMap<String, String>();
210
				return new HashMap<String, Object>();
211 211
			}
212 212
		}
213 213

+ 3 - 3
location-rescue-service/src/main/resources/application.properties

@ -3,10 +3,10 @@ server.port=8086
3 3
4 4
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
5 5
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
6
spring.datasource.url=jdbc:mysql://10.11.20.120:3306/common_frm?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
6
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy
7 7
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
8
spring.datasource.username=comon_frm
9
spring.datasource.password=1qaz@WSX
8
spring.datasource.username=ebc
9
spring.datasource.password=ebc@123
10 10
11 11
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
12 12
#spring.jpa.database=default

ios屏蔽4个功能演示;暂时屏蔽视频压缩和邮件的功能演示 · ca637f548b - Nuosi Git Service
Sfoglia il codice sorgente

ios屏蔽4个功能演示;暂时屏蔽视频压缩和邮件的功能演示

chengwb3 8 anni fa
parent
commit
ca637f548b

+ 35 - 0
display-server/src/main/webapp/biz/js/index.js

@ -1,8 +1,43 @@
1 1
require(["common","mobile","util"], function(Common,Mobile) {
2 2

3
	//终端类型,a为android,i为ios
4
	var deviceType = (function(){
5
		/*
6
		IpuMobile/i1/android/00/2.0/Hybrid
7
        userAgent格式
8
        i1版本规范:
9
        标识符/规范版本号/终端类型(ios,android,wp)/终端型号(平板,或尺寸,00表示默认)/框架版本号/结尾标识符
10
        */
11
		var sUserAgent = window.navigator.userAgent;
12
		//          标识符     规范1  类型2 型号3  框架4 结尾标识符
13
		var re = /IpuMobile\/(.*)\/(.*)\/(.*)\/(.*)\/Hybrid/ig
14
		var arrMessages = re.exec(sUserAgent);
15
		if(arrMessages && arrMessages[1] =="i1" ){
16
			if(arrMessages[2] == "android"){
17
				return "a";
18
			}else if(arrMessages[2] == "ios"){
19
				return "i"
20
			}else if(arrMessages[2] == "wp"){
21
				return "w";
22
			}else{
23
				return null;
24
			}
25
		}else{
26
			return null;
27
		}
28
	})();
29
	
3 30
	$("#plugin-menu li,#ui-menu li").each(function(index, item) {
4 31
		if (item.getAttribute("action") != null) {
5 32
			$(item).tap(function() {
33
				
34
				// add by chengwb3 屏蔽ios的几个工程
35
				var actionStr = item.getAttribute("action");
36
				if((actionStr=="NFC" || actionStr=="Share" || actionStr=="BaiduMap" || actionStr=="PageHandler") && deviceType=="i"){
37
					alert("IOS系统暂不支持,开发中...");
38
					return;
39
				}
40
				
6 41
				var param = new Wade.DataMap();
7 42
				/*特殊符号测试*/
8 43
				param.put("flag",";/?:@&=+$,#()[]!#%*'");

+ 4 - 4
display-server/src/main/webapp/template/webapp/PluginIndex.html

@ -71,15 +71,15 @@
71 71
		<div class="pic"><span class="e_ico-position"></span></div>
72 72
		<div class="text">百度地图</div>
73 73
	</li>
74
	<li action="Mail">
74
	<!-- <li action="Mail">
75 75
		<div class="pic"><span class="e_ico-mail"></span></div>
76 76
		<div class="text">邮件</div>
77
	</li>
77
	</li> -->
78 78
	
79
	<li action="VideoCompressor">
79
	<!-- <li action="VideoCompressor">
80 80
		<div class="pic"><span class="e_ico-videoComp"></span></div>
81 81
		<div class="text">视频压缩</div>
82
	</li>
82
	</li> -->
83 83
	
84 84
 	<li action="PageHandler">
85 85
		<div class="pic"><span class="e_ico-conect"></span></div>