fengxiang
2018-07-16 b95fd235f28073131ffc4b9417219bdd576d3c7c
大屏登录 返回地址信息,超级管理员组织,返回 中国
3 files modified
13 ■■■■■ changed files
src/main/java/com/moral/controller/ScreenController.java 7 ●●●● patch | view | raw | blame | history
src/main/java/com/moral/service/DictionaryDataService.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/service/impl/DictionaryDataServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/moral/controller/ScreenController.java
@@ -106,6 +106,8 @@
    private  DeviceVersionService dviceVersionService;
    @Resource
    private  OrganizationService organizationService;
    @Resource
    private  DictionaryDataService dictionaryDataService;
    /**
     * Screen login. 大屏登录
     * 
@@ -122,10 +124,12 @@
            resultMap.put("accountId", -1);
        } else {
            resultMap = accountService.screenLogin(parameters);
            // 添加返回行政区信息字符串操作
            Object orgId = resultMap.get("orgId");
            if(resultMap.get("orgId")!=null && resultMap.get("orgId") instanceof Integer) {
                  Organization organization = organizationService.getOrganizationById((Integer) orgId);
                  StringBuilder areaNamesBuilder = new StringBuilder("中国");
                if((Integer) orgId != dictionaryDataService.querySupperOrgId()) {
                    Organization organization = organizationService.getOrganizationById((Integer) orgId);
                  if( organization.getAreaNames()!=null){
                      AreaNames areaNames =  organization.getAreaNames();
                      if(!StringUtils.isNullOrEmpty(areaNames.getProvinceName())){
@@ -141,6 +145,7 @@
                          }
                      }
                  }
                }
                  resultMap.put("mapPath",areaNamesBuilder.toString());
            }
        }
src/main/java/com/moral/service/DictionaryDataService.java
@@ -6,4 +6,6 @@
public interface DictionaryDataService {
    List<DictionaryData> queryByKey(String dictDataKey);
    Integer querySupperOrgId();
}
src/main/java/com/moral/service/impl/DictionaryDataServiceImpl.java
@@ -18,4 +18,8 @@
        query.setDictDataKey(dictDataKey);
        return  dataMapper.select(query);
    }
    @Override
    public Integer querySupperOrgId() {
        return  dataMapper.selectSupperOrgId();
    }
}