"lines-code">
			paramsMap.put("specId", specIds);
74
		}else {
83
		} else {
75 84
			paramsMap.put("specId", params.get("deviceTypeId"));
76 85
		}
77 86
@ -114,38 +123,50 @@ public class DeviceManageServiceImpl implements DeviceManageService {
114 123
115 124
		// 调用北向接口
116 125
		String url = NorthboundInterfaceConstant.queryPageDevice;
117
		Map<String, String> deviceInfoListMap = northboundInterfaceUtil.iotPostCallUtil(url, dataMap);
126
		Map<String, Object> deviceInfoListMap = northboundInterfaceUtil.iotPostCallUtil(url, dataMap);
118 127
		List<Map> deviceInfoList = JSON.parseArray(JSON.toJSONString(deviceInfoListMap.get("result")), Map.class);
119 128
120 129
		// 整理返回数据信息
121 130
		List<Map> resultList = new ArrayList<Map>();
122 131
		if (deviceInfoList != null && deviceInfoList.size() > 0) {
123
			for (Map map : deviceInfoList) {
132
			for (Map deviceInfoMap : deviceInfoList) {
124 133
				Map resultMap = new HashMap();
125 134
126 135
				// 终端编号
127
				String deviceId = String.valueOf(map.get("resourceId"));
136
				String deviceId = String.valueOf(deviceInfoMap.get("resourceId"));
128 137
				resultMap.put("deviceId", deviceId);
129 138
				resultMap.put("deviceNo", deviceId);
130 139
131 140
				// 备注
132
				String remarks = String.valueOf(map.get("remarks"));
141
				String remarks = String.valueOf(deviceInfoMap.get("remarks"));
133 142
				remarks = (remarks == null || "".equals(remarks) || "null".equals(remarks)) ? "无" : remarks;
134 143
				resultMap.put("remarks", remarks);
135 144
145
				// 终端类型
146
				String deviceType = String.valueOf(deviceInfoMap.get("specId"));
147
				for (CharacteristicSpecValue characteristicSpecValue : characteristicSpecValueList) {
148
					if (deviceType.equals(characteristicSpecValue.getCode())) {
149
						resultMap.put("deviceTypeId", deviceType);
150
						resultMap.put("deviceTypeName", characteristicSpecValue.getValue());
151
						break;
152
					}
153
				}
154
136 155
				// 绑定信息
137 156
				resultMap.put("bindName", "--");
157
				boolean bindFlag = true;
138 158
				if (!unBindDeviceBoolean) {
139 159
					if (bindToolInfoList != null) {
140
						for (Map<String, Object> bindToolInfoMap : bindToolInfoList) {
160
						for (int i = 0; i < bindToolInfoList.size() && bindFlag; i++) {
161
							Map<String, Object> bindToolInfoMap = bindToolInfoList.get(i);
141 162
							if (deviceId.equals(String.valueOf(bindToolInfoMap.get("terminalId")))) {
142 163
								resultMap.put("bindCode", bindToolInfoMap.get("resourceToolCode"));
143 164
								resultMap.put("bindName", bindToolInfoMap.get("resourceToolName"));
144
								break;
165
								bindFlag = false;
145 166
							}
146 167
						}
147 168
					}
148
					if (bindEmployeeInfoList != null) {
169
					if (bindEmployeeInfoList != null && bindFlag) {
149 170
						for (EmployeeTerminalRelaDto employeeTerminalRelaDto : bindEmployeeInfoList) {
150 171
							if (deviceId.equals(employeeTerminalRelaDto.getTerminalId())) {
151 172
								resultMap.put("bindCode", employeeTerminalRelaDto.getCode());
@ -168,86 +189,180 @@ public class DeviceManageServiceImpl implements DeviceManageService {
168 189
	}
169 190
170 191
	public List<CharacteristicSpecValue> queryDeviceTypeList() {
171
		CharacteristicSpec characteristicSpec = this.characteristicSpecService
192
		CharacteristicSpec characteristicSpec = characteristicSpecService
172 193
				.findBusinessSpecByCharSpecCode(EbcConstant.BUSINESS_SPEC_PRODUCT_TYPE);
194
		if (characteristicSpec == null) {
195
			return new ArrayList<CharacteristicSpecValue>();
196
		}
197
173 198
		List<CharacteristicSpecValue> resultList = characteristicSpec.getCharacteristicSpecValues();
174 199
		return resultList;
175 200
	}
176 201
177
	
178 202
	@Override
179 203
	public Map<String, Object> queryOneDeviceInfo(Map<String, String> params) throws Exception {
180
		//调用北向接口
181
		String url = NorthboundInterfaceConstant.queryOneDevice+ params.get("deviceId");
182
		Map<String, String> deviceInfoMap = northboundInterfaceUtil.iotGetCallUtil(url);
183
		Map resultMap = JSONObject.parseObject(deviceInfoMap.get("result"), Map.class);
184
		String remarks = deviceInfoMap.get("remarks") == null ? "" : deviceInfoMap.get("remarks");
185
		resultMap.put("remarks", remarks);
204
		// 调用北向接口
205
		String url = NorthboundInterfaceConstant.queryOneDevice + params.get("deviceId");
206
		Map<String, Object> deviceInfoMap = northboundInterfaceUtil.iotGetCallUtil(url);
207
208
		JSONObject deviceInfoJson = (JSONObject) deviceInfoMap.get("result");
209
210
		if (deviceInfoJson == null) {
211
			return new HashMap<String, Object>();
212
		}
213
214
		Map<String, Object> resultMap = new HashMap<String, Object>();
215
		resultMap.put("deviceId", deviceInfoJson.get("deviceId"));
216
		resultMap.put("deviceNo", deviceInfoJson.get("deviceId"));
217
		resultMap.put("remarks", deviceInfoJson.get("remarks"));
218
219
		// 终端类型
220
		List<CharacteristicSpecValue> characteristicSpecValueList = queryDeviceTypeList();
221
		for (CharacteristicSpecValue characteristicSpecValue : characteristicSpecValueList) {
222
			if (deviceInfoJson.get("productId").equals(characteristicSpecValue.getCode())) {
223
				resultMap.put("deviceTypeId", deviceInfoJson.get("productId"));
224
				resultMap.put("deviceTypeName", characteristicSpecValue.getValue());
225
				break;
226
			}
227
		}
228
186 229
		return resultMap;
187 230
	}
188
	
189 231
190 232
	@Override
191
	public Map<String, String> addDeviceInfo(Map<String, String> params) throws Exception {
233
	public Map<String, Object> addDeviceInfo(Map<String, String> params) throws Exception {
192 234
		Map<String, Object> paramsMap = new HashMap<String, Object>();
193 235
		String deviceId = params.get("deviceNo");
194 236
195 237
		paramsMap.put("deviceId", deviceId);// 终端id
196 238
		paramsMap.put("terminalSN", deviceId); // 终端编号
197 239
		paramsMap.put("productId", params.get("deviceTypeId")); // 终端类型
198
		paramsMap.put("deviceName", EbcConstant.BEIDOUDEVICE_NAME+params.get("deviceTypeName") + deviceId); // 名称
240
		paramsMap.put("deviceName", EbcConstant.BEIDOUDEVICE_NAME + params.get("deviceTypeName") + deviceId); // 名称
199 241
		paramsMap.put("remarks", params.get("remarks")); // 备注
200 242
201 243
		// 调用北向接口
202 244
		String url = NorthboundInterfaceConstant.addDevice;
203
		Map<String, String> map = northboundInterfaceUtil.iotPostCallUtil(url, paramsMap);
204
		return map;
245
		Map<String, Object> resultMap = northboundInterfaceUtil.iotPostCallUtil(url, paramsMap);
246
		return resultMap;
205 247
	}
206
	
207 248
208 249
	@Override
209
	public Map<String, String> modifyDeviceInfo(Map<String, String> params) throws Exception {
250
	public Map<String, Object> modifyDeviceInfo(Map<String, String> params) throws Exception {
210 251
		Map<String, Object> paramsMap = new HashMap<String, Object>();
211 252
		String deviceId = params.get("deviceId");
212 253
213 254
		paramsMap.put("deviceId", deviceId);// 终端id
214 255
		paramsMap.put("terminalSN", deviceId); // 终端编号
215 256
		paramsMap.put("productId", params.get("deviceTypeId")); // 终端类型
216
		paramsMap.put("deviceName", EbcConstant.BEIDOUDEVICE_NAME+params.get("deviceTypeName") + deviceId); // 名称
257
		paramsMap.put("deviceName", EbcConstant.BEIDOUDEVICE_NAME + params.get("deviceTypeName") + deviceId); // 名称
217 258
		paramsMap.put("remarks", params.get("remarks")); // 备注
218 259
219 260
		// 调用北向接口
220 261
		String url = NorthboundInterfaceConstant.updateDevice;
221
		Map<String, String> map = northboundInterfaceUtil.iotPostCallUtil(url, paramsMap);
222
		return map;
262
		Map<String, Object> resultMap = northboundInterfaceUtil.iotPostCallUtil(url, paramsMap);
263
		return resultMap;
223 264
	}
224
	
225 265
226 266
	@Override
227
	public Map<String, String> deleteDeviceInfo(Map<String, String> params) throws Exception {
228
		// 调用北向接口
229
				String url = NorthboundInterfaceConstant.deleteDevice + params.get("deviceId");
230
				Map<String, String> map = northboundInterfaceUtil.iotGetCallUtil(url);
267
	public Map<String, Object> deleteDeviceInfo(Map<String, String> params) throws Exception {
268
		Map<String, Object> resultMap = null;
269
		if (unbindDevice(params)) {
270
			// 调用北向接口
271
			String url = NorthboundInterfaceConstant.deleteDevice + params.get("deviceId");
272
			resultMap = northboundInterfaceUtil.iotGetCallUtil(url);
273
		}
274
275
		return resultMap;
276
	}
277
278
	@Override
279
	public boolean bindDevice(Map<String, String> params) throws Exception {
280
		boolean result=false;
281
		if (unbindDevice(params)) {
282
			if (EbcConstant.BIND_DEVICE_TYPE_USER.equals(params.get("bindType"))) {
283
				//与人员绑定
284
				EmployeeTerminalRela employeeTerminalRela = new EmployeeTerminalRela();
285
				employeeTerminalRela.setRelaType("1");//TODO 关系类型
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

修改日志文件 · 779c6e3826 - Nuosi Git Service
Selaa lähdekoodia

修改日志文件

wangchao 4 vuotta sitten
vanhempi
commit
779c6e3826

+ 0 - 34
ipu-demo/src/main/java/com/ai/ipu/server/service/impl/MapTagManageServiceImpl.java

@ -1,34 +0,0 @@
1
package com.ai.ipu.server.service.impl;
2
3
import com.ai.ipu.data.JMap;
4
import com.ai.ipu.server.dao.interfaces.MapTagManageDao;
5
import com.ai.ipu.server.model.MapTag;
6
import com.ai.ipu.server.service.interfaces.MapTagManageService;
7
import com.github.pagehelper.PageInfo;
8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.stereotype.Service;
10
11
import java.util.List;
12
import java.util.Map;
13
14
@Service
15
public class MapTagManageServiceImpl implements MapTagManageService {
16
17
    @Autowired
18
    MapTagManageDao mapTagManageDao;
19
20
    @Override
21
    public PageInfo queryMapTagInfo(JMap params) throws Exception {
22
        return mapTagManageDao.queryMapTagInfo(params);
23
    }
24
25
    @Override
26
    public int modifyMapTagInfo(JMap params) throws Exception{
27
        return mapTagManageDao.modifyMapTagInfo(params);
28
    }
29
30
    @Override
31
    public int addMapTagInfo(JMap params) throws Exception{
32
        return mapTagManageDao.addMapTagInfo(params);
33
    }
34
}