wuxw
2019-12-30 4429473e40bc36326087b4fa5a13ea79ccbf99cc
优化添加小区时加入地区功能
9个文件已修改
197 ■■■■ 已修改文件
WebService/src/main/java/com/java110/web/components/community/AddCommunityComponent.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/smo/auditAppUserBindingOwner/impl/EditAuditAppUserBindingOwnerSMOImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/communityPackage/add-community/addCommunity.html 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/communityPackage/add-community/addCommunity.js 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/ownerPackage/auditAppUserBindingOwner-manage/auditAppUserBindingOwnerManage.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/ownerPackage/auditAppUserBindingOwner-manage/auditAppUserBindingOwnerManage.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/owner/OwnerAppUserDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/auditAppUserBindingOwner/ApiAuditAppUserBindingOwnerDataVo.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/OwnerAppUserServiceDaoImplMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/components/community/AddCommunityComponent.java
@@ -1,8 +1,10 @@
package com.java110.web.components.community;
import com.java110.core.context.IPageData;
import com.java110.web.smo.ICompanyServiceSMO;
import com.java110.web.smo.community.IAddCommunitySMO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
@@ -15,6 +17,9 @@
    @Autowired
    private IAddCommunitySMO addCommunitySMOImpl;
    @Autowired
    private ICompanyServiceSMO companyServiceSMOImpl;
    /**
     * 添加小区数据
     * @param pd 页面数据封装
@@ -24,6 +29,22 @@
        return addCommunitySMOImpl.saveCommunity(pd);
    }
    /**
     * 功能描述: 查询所有省市
     * @param pd
     * @return
     */
    public ResponseEntity<String> getAreas(IPageData pd){
        ResponseEntity<String> responseEntity = null;
        try{
            responseEntity =  companyServiceSMOImpl.getAreas(pd);
        }catch (Exception e){
            responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
        }finally {
            return responseEntity;
        }
    }
    public IAddCommunitySMO getAddCommunitySMOImpl() {
        return addCommunitySMOImpl;
    }
@@ -31,4 +52,12 @@
    public void setAddCommunitySMOImpl(IAddCommunitySMO addCommunitySMOImpl) {
        this.addCommunitySMOImpl = addCommunitySMOImpl;
    }
    public ICompanyServiceSMO getCompanyServiceSMOImpl() {
        return companyServiceSMOImpl;
    }
    public void setCompanyServiceSMOImpl(ICompanyServiceSMO companyServiceSMOImpl) {
        this.companyServiceSMOImpl = companyServiceSMOImpl;
    }
}
WebService/src/main/java/com/java110/web/smo/auditAppUserBindingOwner/impl/EditAuditAppUserBindingOwnerSMOImpl.java
@@ -44,7 +44,7 @@
        ResponseEntity<String> responseEntity = null;
        super.validateStoreStaffCommunityRelationship(pd, restTemplate);
        if("1200".equals(paramIn.getString("1100"))){
        if("1100".equals(paramIn.getString("state"))){
            paramIn.put("state","12000");
        }else{
            paramIn.put("state","13000");
WebService/src/main/resources/components/communityPackage/add-community/addCommunity.html
@@ -7,19 +7,6 @@
                <div class="ibox-content">
                    <div>
                        <div>
                            <!--<div class="form-group row">
                                <label class="col-sm-2 col-form-label">楼名称</label>
                                <div class="col-sm-10"><input v-model="addFloorInfo.name" type="text" placeholder="必填,请填写名称" class="form-control"></div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">楼编号</label>
                                <div class="col-sm-10"><input v-model="addFloorInfo.floorNum" type="email" placeholder="必填,请填写编号" class="form-control"></div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">备注</label>
                                <div class="col-sm-10"><input v-model="addFloorInfo.remark" type="tel" placeholder="可填,请填写备注" class="form-control"></div>
                            </div>-->
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">小区名称</label>
                                <div class="col-sm-10">
@@ -28,6 +15,48 @@
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">小区地区</label>
                                <div class="col-sm-4">
                                    <select id="pro" class="form-control form-control-sm"
                                            style="width: 10vw;display: inline;"
                                            v-model="selectProv"
                                            @change="getProv(selectProv)">
                                        <option value='' disabled selected style='display:none;'>请选择省</option>
                                        <option v-for="item in provs"
                                                :label="item.areaName"
                                                :value="item.areaCode">{{item.areaName}}
                                        </option>
                                    </select>
                                </div>
                                <div class="col-sm-3">
                                    <select id="city" class="form-control form-control-sm"
                                            style="width: 10vw;display: inline;"
                                            v-if="selectProv!=''"
                                            v-model="selectCity"
                                            @change="getCity(selectCity)">
                                        <option value='' disabled selected style='display:none;'>请选择城市</option>
                                        <option v-for="item in citys"
                                                :label="item.areaName"
                                                :value="item.areaCode">{{item.areaName}}
                                        </option>
                                    </select>
                                </div>
                                <div class="col-sm-3">
                                    <select id="area" class="form-control form-control-sm"
                                            style="width: 10vw;display: inline;"
                                            v-if="selectCity!=''"
                                            v-model="selectArea"
                                            @change="getArea(selectArea)">
                                        <option value='' disabled selected style='display:none;'>请选择区县</option>
                                        <option v-for="item in areas"
                                                :label="item.areaName"
                                                :value="item.areaCode">{{item.areaName}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">小区地址</label>
                                <div class="col-sm-10">
                                    <input v-model="addCommunityInfo.address" type="text" placeholder="必填,请填写小区地址"
WebService/src/main/resources/components/communityPackage/add-community/addCommunity.js
@@ -5,15 +5,23 @@
            addCommunityInfo: {
                name: '',
                address: '',
                areaAddress:'',
                nearbyLandmarks: '',
                cityCode: '0971',
                mapX: '101.33',
                mapY: '101.33',
            }
            },
            areas: [],
            provs: [],
            citys: [],
            selectProv: '',
            selectCity: '',
            selectArea: '',
            allCity: []
        },
        _initMethod: function () {
            vc.component._initArea('101', '0');
        },
        _initEvent: function () {
            vc.on('addCommunity', 'openAddCommunityModal', function () {
@@ -95,6 +103,9 @@
                //vc.component.addCommunityInfo.communityId = vc.getCurrentCommunity().communityId;
                vc.component.addCommunityInfo.address = vc.component.addCommunityInfo.areaAddress+ vc.addCommunityInfo.address;
                vc.http.post(
                    'addCommunity',
                    'save',
@@ -132,7 +143,65 @@
                    mapY: '101.33',
                };
            }
            },
            getProv: function (_prov) {
                vc.component._initArea('202', _prov);
            },
            getCity: function (_city) {
                vc.component._initArea('303',_city);
            },
            getArea:function(_area){
              vc.component.addCommunityInfo.cityCode = _area;
                vc.component.addCommunityInfo.areaAddress = '';
                if (vc.component.provs == null || vc.component.provs == undefined) {
                    return;
                }
                vc.component.provs.forEach(function (_param) {
                    if (_param.areaCode == vc.component.selectProv) {
                        vc.component.addCommunityInfo.areaAddress = _param.areaName;
                    }
                });
                vc.component.citys.forEach(function (_param) {
                    if (_param.areaCode == vc.component.selectCity) {
                        vc.component.addCommunityInfo.areaAddress += _param.areaName;
                    }
                });
                vc.component.areas.forEach(function (_param) {
                    if (_param.areaCode == vc.component.selectArea) {
                        vc.component.addCommunityInfo.areaAddress += _param.areaName;
                    }
                });
            },
            _initArea: function (_areaLevel, _parentAreaCode) { //加载区域
                var _param = {
                    params: {
                        areaLevel: _areaLevel,
                        parentAreaCode: _parentAreaCode
                    }
                };
                vc.http.get('addCommunity', 'getAreas',
                    _param,
                    function (json, res) {
                        if (res.status == 200) {
                            var _tmpAreas = JSON.parse(json);
                            if (_areaLevel == '101') {
                                vc.component.provs = _tmpAreas;
                            } else if (_areaLevel == '202') {
                                vc.component.citys = _tmpAreas;
                            } else {
                                vc.component.areas = _tmpAreas;
                            }
                            return;
                        }
                        //vc.component.$emit('errorInfoEvent',json);
                    }, function (errInfo, error) {
                        console.log('请求失败处理', errInfo, error);
                        vc.toast("查询地区失败");
                    });
            },
        }
    });
WebService/src/main/resources/components/ownerPackage/auditAppUserBindingOwner-manage/auditAppUserBindingOwnerManage.html
@@ -28,7 +28,7 @@
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <select class="custom-select" v-model="auditAppUserBindingOwnerManageInfo.conditions.null">
                            <select class="custom-select" v-model="auditAppUserBindingOwnerManageInfo.conditions.state">
                                <option selected value="">请选择状态</option>
                                <option value="10000">审核中</option>
                                <option value="12000">审核成功</option>
@@ -95,7 +95,7 @@
                            <td class="text-center">{{auditAppUserBindingOwner.state}}</td>
                            <td class="text-center">{{auditAppUserBindingOwner.createTime}}</td>
                            <td class="text-center">
                                <div class="btn-group">
                                <div class="btn-group" v-if="auditAppUserBindingOwner.state == '1000'">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openAuditAppUserBindingOwnerModel(auditAppUserBindingOwner)">
                                        审核
WebService/src/main/resources/components/ownerPackage/auditAppUserBindingOwner-manage/auditAppUserBindingOwnerManage.js
@@ -17,6 +17,7 @@
                    appUserName:'',
                    idCard:'',
                    link:'',
                    state:''
                }
            }
        },
@@ -94,6 +95,9 @@
                }else{
                    vc.component.auditAppUserBindingOwnerManageInfo.moreCondition = true;
                }
            },
            _queryAuditAppUserBindingOwnerMethod:function () {
                vc.component._listAuditAppUserBindingOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            }
             
java110-bean/src/main/java/com/java110/dto/owner/OwnerAppUserDto.java
@@ -22,6 +22,7 @@
    private String appUserName;
    private String communityName;
    private String state;
    private String stateName;
    private String appUserId;
    private String communityId;
    private String appTypeCd;
@@ -147,4 +148,12 @@
    public void setStates(String[] states) {
        this.states = states;
    }
    public String getStateName() {
        return stateName;
    }
    public void setStateName(String stateName) {
        this.stateName = stateName;
    }
}
java110-bean/src/main/java/com/java110/vo/api/auditAppUserBindingOwner/ApiAuditAppUserBindingOwnerDataVo.java
@@ -13,6 +13,7 @@
    private String idCard;
    private String link;
    private String state;
    private String stateName;
    private String createTime;
    public String getAppUserId() {
@@ -87,5 +88,11 @@
        this.createTime = createTime;
    }
    public String getStateName() {
        return stateName;
    }
    public void setStateName(String stateName) {
        this.stateName = stateName;
    }
}
java110-db/src/main/resources/mapper/user/OwnerAppUserServiceDaoImplMapper.xml
@@ -118,9 +118,12 @@
        select t.id_card,t.id_card idCard,t.open_id,t.open_id openId,t.link,t.remark,t.status_cd,t.status_cd
        statusCd,t.app_user_name,t.app_user_name appUserName,t.community_name,t.community_name
        communityName,t.state,t.app_user_id,t.app_user_id appUserId,t.community_id,t.community_id
        communityId,t.app_type_cd,t.app_type_cd appTypeCd,t.b_id,t.b_id bId,t.member_id,t.member_id memberId
        from owner_app_user t
        communityId,t.app_type_cd,t.app_type_cd appTypeCd,t.b_id,t.b_id bId,t.member_id,t.member_id memberId,td1.name stateName
        from owner_app_user t,t_dict td1
        where 1 =1
        and t.state = td1.status_cd
        and td1.table_name = 'owner_app_user'
        and td1.table_columns = 'state'
        <if test="idCard !=null and idCard != ''">
            and t.id_card= #{idCard}
        </if>
@@ -223,8 +226,11 @@
    <!-- 查询绑定业主数量 add by wuxw 2018-07-03 -->
    <select id="queryOwnerAppUsersCount" parameterType="Map" resultType="Map">
        select count(1) count
        from owner_app_user t
        from owner_app_user t,t_dict td1
        where 1 =1
        and t.state = td1.status_cd
        and td1.table_name = 'owner_app_user'
        and td1.table_columns = 'state'
        <if test="idCard !=null and idCard != ''">
            and t.id_card= #{idCard}
        </if>