|
@@ -58,10 +58,11 @@ public class BackgroundProcessingController extends BaseRESTfulController {
|
|
|
// 根据用户名去查询该用户绑定的公司及下属公司;7.2改为只查本单位因前端会报错
|
|
// 根据用户名去查询该用户绑定的公司及下属公司;7.2改为只查本单位因前端会报错
|
|
|
List<Map<String, Object>> companyList = backgroundProcessingMapper.getCurrentCompanyList(loginName);
|
|
List<Map<String, Object>> companyList = backgroundProcessingMapper.getCurrentCompanyList(loginName);
|
|
|
if (companyList != null && companyList.size() > 0) {
|
|
if (companyList != null && companyList.size() > 0) {
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
Map<String, Object> stringMap = new HashMap<>();
|
|
Map<String, Object> stringMap = new HashMap<>();
|
|
|
stringMap.put("companyId", -1);
|
|
stringMap.put("companyId", -1);
|
|
|
companyList.add(stringMap);
|
|
companyList.add(stringMap);
|
|
|
- } else {
|
|
|
|
|
//resMap.put("status","failed");
|
|
//resMap.put("status","failed");
|
|
|
//resMap.put("message","账号未与单位关联,联系管理人员");
|
|
//resMap.put("message","账号未与单位关联,联系管理人员");
|
|
|
//resMap.put("resultMessage","账号未与单位关联,联系管理人员");
|
|
//resMap.put("resultMessage","账号未与单位关联,联系管理人员");
|
|
@@ -81,9 +82,20 @@ public class BackgroundProcessingController extends BaseRESTfulController {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //去重
|
|
|
|
|
+ HashSet<Object> objects = new HashSet<>();
|
|
|
|
|
+ for(Map<String,Object> map : companyList) {
|
|
|
|
|
+ objects.add(map.get("companyId"));
|
|
|
|
|
+ }
|
|
|
|
|
+ List<Map<String,Object>> companyList1 = new ArrayList<>();
|
|
|
|
|
+ for(Object set : objects) {
|
|
|
|
|
+ Map<String, Object> objectObjectHashMap = new HashMap<>();
|
|
|
|
|
+ objectObjectHashMap.put("companyId",set);
|
|
|
|
|
+ companyList1.add(objectObjectHashMap);
|
|
|
|
|
+ }
|
|
|
Map<String, Object> rootCompanyMap = backgroundProcessingMapper.getCompanyRootMap(loginName);
|
|
Map<String, Object> rootCompanyMap = backgroundProcessingMapper.getCompanyRootMap(loginName);
|
|
|
//根据companyList查询名字相同的
|
|
//根据companyList查询名字相同的
|
|
|
- userInfo.put("dilCompanyList", companyList);
|
|
|
|
|
|
|
+ userInfo.put("dilCompanyList", companyList1);
|
|
|
if (rootCompanyMap != null && rootCompanyMap.get("isListed") != null) {
|
|
if (rootCompanyMap != null && rootCompanyMap.get("isListed") != null) {
|
|
|
userInfo.put("rootCompanyMap", rootCompanyMap);
|
|
userInfo.put("rootCompanyMap", rootCompanyMap);
|
|
|
}
|
|
}
|