span rel="">
employeeTerminalRela.setWorkEmployeeId(params.get("workEmployeeId"));//用户ID
employeeTerminalRela.setTerminalId(params.get("deviceId"));//终端ID
CommonRequest<EmployeeTerminalRela> resourceEmployeeTerminalRelalCommonRequest = new CommonRequest<EmployeeTerminalRela>(employeeTerminalRela);
CommonResponse<EmployeeTerminalRela> createRelaResult = employeeTerminalRelaCommand.createIndividualDevRela(resourceEmployeeTerminalRelalCommonRequest);
result=createRelaResult.isSuccess();
}else if (EbcConstant.BIND_DEVICE_TYPE_SHIP.equals(params.get("bindType"))) {
//与工具绑定
ResourceToolTerminalRel resourceToolTerminalRel=new ResourceToolTerminalRel();
resourceToolTerminalRel.setRelaType("LOC");//TODO 关系类型,默认可填'LOC'
resourceToolTerminalRel.setTerminalId(params.get("deviceId"));//终端ID
resourceToolTerminalRel.setResourceToolId(params.get("toolId"));//设备ID
CommonRequest<ResourceToolTerminalRel> resourceToolTerminalRelCommonRequest =new CommonRequest<ResourceToolTerminalRel>(resourceToolTerminalRel);
CommonResponse<ResourceToolTerminalRel> createRelaResult = resourceToolCommand.createWorkToolsDevRela(resourceToolTerminalRelCommonRequest);
result=createRelaResult.isSuccess();
// 根据终端id删除终端关联信息
/*if (NorthboundInterfaceConstant.resultCode_succeed.equals(map.get("resultCode"))) {
HashMap<String, Object> paramsHashMap = new HashMap<>();
paramsHashMap.put("DEVICE_ID", params.get("deviceId"));
int i = unbindDevice(paramsHashMap);
}*/
return map;
}
}
return result;
}
@Override
public Map<String, Object> queryBindDeviceInfo(Map<String, String> params) throws Exception {
List<String> deviceIdList=new ArrayList<String>();
deviceIdList.add(params.get("deviceId"));
HashMap<String, Object> deviceIdListMap=new HashMap<String, Object>();
deviceIdListMap.put("deviceIdList", deviceIdList);
// 终端与人员绑定
CommonResponse<List<EmployeeTerminalRelaDto>> bindEmployeeInfoCommon = employeeTerminalRelaQuery
.queryIndividualDevRela(new CommonRequest<List<String>>(deviceIdList));
List<EmployeeTerminalRelaDto> bindEmployeeInfoList = bindEmployeeInfoCommon.getData();
// 终端与工具绑定
CommonResponse<PageInfo<Map<String, Object>>> bindToolInfoCommon = resourceToolQuery
.queryWorkToolsDevRela(new CommonRequest<HashMap<String, Object>>(deviceIdListMap));
List<Map<String, Object>> bindToolInfoList = bindToolInfoCommon.getData().getData();
return null;
}
@Override
public boolean unbindDevice(Map<String, String> params) throws Exception {
String[] deviceIds = params.get("deviceId").split(",");
List<String> deviceIdList = new ArrayList<String>();
for (String deviceId : deviceIds) {
deviceIdList.add(deviceId);
}
// 根据终端id删除终端关联信息
CommonResponse deleteRelaResult = resourceToolCommand
.deleteWorkToolsDevRelaByTerminalId(new CommonRequest(deviceIdList));
CommonResponse<Void> resopnse = employeeTerminalRelaCommand
.deleteIndividualDevRela(new CommonRequest(deviceIdList));
return deleteRelaResult.isSuccess() && resopnse.isSuccess();
}
@Override
public List<Map<String, Object>> queryAssociatInfo(Map<String, String> params) throws Exception {
if (EbcConstant.BIND_DEVICE_TYPE_USER.equals(params.get("type"))) {
// 类型是用户,查询用户列表
} else if (EbcConstant.BIND_DEVICE_TYPE_SHIP.equals(params.get("type"))) {
// 类型是船舶,查询船舶列表
}
return null;
}
/*@Override
public Map<String, Object> queryPageDeviceInfo(Map<String, Object> params, int pageNum, int pageSize)
throws Exception {
@ -291,11 +406,11 @@ public class DeviceManageServiceImpl implements DeviceManageService {
@Override
public List<Map<String, Object>> queryAssociatInfo(Map<String, Object> params) throws Exception {
if (EbcConstant.bind_device_type_user.equals(params.get("type"))) {
if (EbcConstant.BIND_DEVICE_TYPE_USER.equals(params.get("type"))) {
// 类型是用户,查询用户列表
// TODO 调用uspa接口获取人员信息 暂时用枚举
return UserEnums.getAllUserList();
} else if (EbcConstant.bind_device_type_ship.equals(params.get("type"))) {
} else if (EbcConstant.BIND_DEVICE_TYPE_SHIP.equals(params.get("type"))) {
// 类型是船舶,查询船舶列表
return deviceManageDao.queryAssociatBoatInfo(params);
}
|
||
3 | 3 |
|
4 | 4 |
|
5 | 5 |
|
6 |
|
|
7 |
|
|
6 | 8 |
|
7 | 9 |
|
8 | 10 |
|
|
||
22 | 24 |
|
23 | 25 |
|
24 | 26 |
|
25 |
|
|
27 |
|
|
26 | 28 |
|
27 | 29 |
|
28 | 30 |
|
|
||
30 | 32 |
|
31 | 33 |
|
32 | 34 |
|
33 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
34 | 45 |
|
35 |
|
|
36 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
37 | 65 |
|
66 |
|
|
38 | 67 |
|
39 | 68 |
|
40 | 69 |
|
70 |
|
|
41 | 71 |
|
42 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
43 | 79 |
|
44 |
|
|
45 |
|
|
80 |
|
|
81 |
|
|
46 | 82 |
|
47 | 83 |
|
48 | 84 |
|
49 | 85 |
|
86 |
|
|
50 | 87 |
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
88 |
|
|
89 |
|
|
55 | 90 |
|
56 | 91 |
|
57 | 92 |
|
58 | 93 |
|
59 |
|
|
60 |
|
|
94 |
|
|
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 |
|
|
||
90 | 104 |
|
91 | 105 |
|
92 | 106 |
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
107 |
|
|
118 | 108 |
|
119 |
|
|
120 |
|
|
121 | 109 |
|
122 | 110 |
|
123 | 111 |
|
|
||
68 | 68 |
|
69 | 69 |
|
70 | 70 |
|
71 |
|
|
71 |
|
|
72 | 72 |
|
73 | 73 |
|
74 | 74 |
|
|
||
83 | 83 |
|
84 | 84 |
|
85 | 85 |
|
86 |
|
|
86 |
|
|
87 | 87 |
|
88 | 88 |
|
89 | 89 |
|
|
||
92 | 92 |
|
93 | 93 |
|
94 | 94 |
|
95 |
|
|
95 |
|
|
96 | 96 |
|
97 | 97 |
|
98 | 98 |
|
|
||
105 | 105 |
|
106 | 106 |
|
107 | 107 |
|
108 |
|
|
108 |
|
|
109 | 109 |
|
110 | 110 |
|
111 | 111 |
|
|
||
115 | 115 |
|
116 | 116 |
|
117 | 117 |
|
118 |
|
|
118 |
|
|
119 | 119 |
|
120 | 120 |
|
121 | 121 |
|
122 | 122 |
|
123 |
|
|
123 |
|
|
124 | 124 |
|
125 | 125 |
|
126 | 126 |
|
|
||
142 | 142 |
|
143 | 143 |
|
144 | 144 |
|
145 |
|
|
145 |
|
|
146 | 146 |
|
147 | 147 |
|
148 | 148 |
|
|
||
157 | 157 |
|
158 | 158 |
|
159 | 159 |
|
160 |
|
|
160 |
|
|
161 | 161 |
|
162 | 162 |
|
163 | 163 |
|
164 | 164 |
|
165 | 165 |
|
166 | 166 |
|
167 |
|
|
167 |
|
|
168 | 168 |
|
169 | 169 |
|
170 | 170 |
|
|
||
172 | 172 |
|
173 | 173 |
|
174 | 174 |
|
175 |
|
|
175 |
|
|
176 | 176 |
|
177 | 177 |
|
178 | 178 |
|
179 | 179 |
|
180 |
|
|
180 |
|
|
181 | 181 |
|
182 | 182 |
|
183 | 183 |
|
|
||
191 | 191 |
|
192 | 192 |
|
193 | 193 |
|
194 |
|
|
194 |
|
|
195 | 195 |
|
196 | 196 |
|
197 | 197 |
|
|
||
202 | 202 |
|
203 | 203 |
|
204 | 204 |
|
205 |
|
|
205 |
|
|
206 | 206 |
|
207 | 207 |
|
208 | 208 |
|
209 | 209 |
|
210 |
|
|
210 |
|
|
211 | 211 |
|
212 | 212 |
|
213 | 213 |
|
|
||
3 | 3 |
|
4 | 4 |
|
5 | 5 |
|
6 |
|
|
6 |
|
|
7 | 7 |
|
8 |
|
|
9 |
|
|
8 |
|
|
9 |
|
|
10 | 10 |
|
11 | 11 |
|
12 | 12 |
|