fengxiang
2018-09-27 c4aff381036d7a358fc443a558815a7d73bb5306
大屏组织path,获取areacode
2 files modified
40 ■■■■■ changed files
src/main/java/com/moral/controller/ScreenController.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/entity/Organization.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/controller/ScreenController.java
@@ -153,12 +153,19 @@
                    }else{
                        resultMap.put("type","government");
                    }
                    resultMap.put("areaCode",
                            organization.getVillageCode()|
                            organization.getTownCode()|
                            organization.getAreaCode()*1000000|
                            organization.getCityCode()*1000000|
                            organization.getProvinceCode()*1000000);
                    Number areaCode = null;
                    if(organization.getVillageCode()!=null){
                        areaCode = organization.getVillageCode();
                    }else if (organization.getTownCode()!=null){
                        areaCode = organization.getTownCode();
                    }else if(organization.getAreaCode()!=null) {
                        areaCode = organization.getAreaCode();
                    }else if(organization.getCityCode()!=null) {
                        areaCode = organization.getCityCode();
                    }else if(organization.getProvinceCode()!=null) {
                        areaCode = organization.getProvinceCode();
                    }
                    resultMap.put("areaCode",areaCode);
                }
                resultMap.put("mapPath",areaNamesBuilder.toString());
            }
src/main/java/com/moral/entity/Organization.java
@@ -90,27 +90,6 @@
    private String description;
    private Long townCode;
    private Long villageCode;
    public Integer getProvinceCode() {
        return provinceCode==null?0:provinceCode;
    }
    public Integer getCityCode() {
        return cityCode==null?0:cityCode;
    }
    public Integer getAreaCode() {
        return areaCode==null?0:areaCode;
    }
    public Long getTownCode() {
        return townCode==null?0:townCode;
    }
    public Long getVillageCode() {
        return villageCode==null?0:villageCode;
    }
    @Transient
    private Integer parentId;
    @Transient