|
|
@@ -26,6 +26,7 @@ import io.swagger.annotations.ApiOperation;
|
|
26
|
26
|
import org.apache.commons.lang.ObjectUtils;
|
|
27
|
27
|
import org.apache.commons.lang3.StringUtils;
|
|
28
|
28
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
29
|
+import org.springframework.http.MediaType;
|
|
29
|
30
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
30
|
31
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
31
|
32
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -95,7 +96,7 @@ public class RoleInfoController {
|
|
95
|
96
|
PageInfo<RoleInfo> pageInfo = null;
|
|
96
|
97
|
try {
|
|
97
|
98
|
if(parentId == 0) {//是顶级机构,则获取出入库的角色信息
|
|
98
|
|
- if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
|
99
|
+ /*if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
99
|
100
|
ExchangeServer wb = new ExchangeServer();
|
|
100
|
101
|
IExchangeService action = wb.getExchangeServiceImplPort();
|
|
101
|
102
|
//获取系统所有角色
|
|
|
@@ -112,7 +113,7 @@ public class RoleInfoController {
|
|
112
|
113
|
roleInfo.setRoleId(100+i);
|
|
113
|
114
|
list.add(roleInfo);
|
|
114
|
115
|
}
|
|
115
|
|
- }
|
|
|
116
|
+ }*/
|
|
116
|
117
|
}
|
|
117
|
118
|
} finally {
|
|
118
|
119
|
pageInfo = new PageInfo<RoleInfo>(list);
|
|
|
@@ -126,7 +127,7 @@ public class RoleInfoController {
|
|
126
|
127
|
* @param roleId 角色编号
|
|
127
|
128
|
* @return RoleInfo 角色信息
|
|
128
|
129
|
*/
|
|
129
|
|
- @RequestMapping(value="/edit")
|
|
|
130
|
+ @RequestMapping(value="/edit",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
|
|
130
|
131
|
public RoleInfo edit(Integer roleId) {
|
|
131
|
132
|
RoleInfo roleInfo = new RoleInfo();
|
|
132
|
133
|
if (roleId != null) {
|
|
|
@@ -154,7 +155,7 @@ public class RoleInfoController {
|
|
154
|
155
|
return roleInfoService.validRoleName(roleName,roleId);
|
|
155
|
156
|
}else {
|
|
156
|
157
|
try {
|
|
157
|
|
- if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
|
158
|
+ /*if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
158
|
159
|
ExchangeServer wb = new ExchangeServer();
|
|
159
|
160
|
IExchangeService action = wb.getExchangeServiceImplPort();
|
|
160
|
161
|
//获取系统所有角色
|
|
|
@@ -168,7 +169,7 @@ public class RoleInfoController {
|
|
168
|
169
|
return false;
|
|
169
|
170
|
}
|
|
170
|
171
|
}
|
|
171
|
|
- }
|
|
|
172
|
+ }*/
|
|
172
|
173
|
}catch (Exception e) {
|
|
173
|
174
|
e.printStackTrace();
|
|
174
|
175
|
}
|
|
|
@@ -309,7 +310,7 @@ public class RoleInfoController {
|
|
309
|
310
|
}
|
|
310
|
311
|
|
|
311
|
312
|
//追加出入库的角色信息
|
|
312
|
|
- if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
|
313
|
+ /*if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
313
|
314
|
try {
|
|
314
|
315
|
ExchangeServer wb = new ExchangeServer();
|
|
315
|
316
|
IExchangeService action = wb.getExchangeServiceImplPort();
|
|
|
@@ -329,7 +330,7 @@ public class RoleInfoController {
|
|
329
|
330
|
} catch (Exception e) {
|
|
330
|
331
|
e.printStackTrace();
|
|
331
|
332
|
}
|
|
332
|
|
- }
|
|
|
333
|
+ }*/
|
|
333
|
334
|
|
|
334
|
335
|
modelMap.put("roleList", voList);
|
|
335
|
336
|
modelMap.put("roleNameObj", roleNameObj);
|
|
|
@@ -343,7 +344,7 @@ public class RoleInfoController {
|
|
343
|
344
|
List<Map<String, Object>> funcList = new ArrayList<Map<String, Object>>();
|
|
344
|
345
|
List<Map<String, Object>> btnList = new ArrayList<Map<String, Object>>();
|
|
345
|
346
|
//追加出入库的角色信息
|
|
346
|
|
- if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
|
347
|
+ /*if("正常".equals(NetStateUtil.connectingAddress(wsdlUrl))) {
|
|
347
|
348
|
try {
|
|
348
|
349
|
ExchangeServer wb = new ExchangeServer();
|
|
349
|
350
|
IExchangeService action = wb.getExchangeServiceImplPort();
|
|
|
@@ -371,7 +372,7 @@ public class RoleInfoController {
|
|
371
|
372
|
} catch (Exception e) {
|
|
372
|
373
|
e.printStackTrace();
|
|
373
|
374
|
}
|
|
374
|
|
- }
|
|
|
375
|
+ }*/
|
|
375
|
376
|
modelMap.put("funcList", funcList);
|
|
376
|
377
|
modelMap.put("btnList", btnList);
|
|
377
|
378
|
return modelMap;
|
|
|
@@ -420,5 +421,14 @@ public class RoleInfoController {
|
|
420
|
421
|
modelMap.put("status", status.equals("1") ? "success":"fail");
|
|
421
|
422
|
return modelMap;
|
|
422
|
423
|
}
|
|
423
|
|
-
|
|
|
424
|
+
|
|
|
425
|
+ /**
|
|
|
426
|
+ * 增加基础的 角色到表里
|
|
|
427
|
+ */
|
|
|
428
|
+ @RequestMapping(value="/addBasicRole")
|
|
|
429
|
+ public void addBasicRole() {
|
|
|
430
|
+ roleInfoService.addBasicRole();
|
|
|
431
|
+
|
|
|
432
|
+ }
|
|
|
433
|
+
|
|
424
|
434
|
}
|