mrzcc
2020-02-19 44f9cd5c403584c39c8bb893f69244e4835daab8
Merge remote-tracking branch 'origin/master'
10个文件已修改
280 ■■■■ 已修改文件
Api/src/main/java/com/java110/api/listener/community/ListAuditEnterCommunitysListener.java 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Api/src/main/java/com/java110/api/listener/parkingSpace/SaveParkingSpaceListener.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/components/community/AuditEnterCommunityManageComponent.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/smo/community/impl/ListAuditEnterCommunitysSMOImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/communityPackage/audit-enter-community-manage/auditEnterCommunityManage.html 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/communityPackage/audit-enter-community-manage/auditEnterCommunityManage.js 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/CommunityMemberDto.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/community/ApiCommunityDataVo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-utils/src/main/java/com/java110/utils/util/StringUtil.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Api/src/main/java/com/java110/api/listener/community/ListAuditEnterCommunitysListener.java
@@ -11,6 +11,7 @@
import com.java110.dto.CommunityMemberDto;
import com.java110.dto.store.StoreDto;
import com.java110.event.service.api.ServiceDataFlowEvent;
import com.java110.utils.util.StringUtil;
import com.java110.vo.api.community.ApiCommunityDataVo;
import com.java110.vo.api.community.ApiCommunityVo;
import org.springframework.beans.factory.annotation.Autowired;
@@ -67,6 +68,81 @@
    @Override
    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
        if (StringUtil.jsonHasKayAndValue(reqJson, "name") || StringUtil.jsonHasKayAndValue(reqJson, "tel")) {
            getInfoByStore(context,reqJson);
        }else{
            getInfoByCommunity(context,reqJson);
        }
    }
    private void getInfoByStore(DataFlowContext context, JSONObject reqJson) {
        StoreDto storeDto = new StoreDto();
        storeDto.setName(reqJson.getString("name"));
        storeDto.setTel(reqJson.getString("tel"));
        List<StoreDto> storeDtos = storeInnerServiceSMOImpl.getStores(storeDto);
        List<ApiCommunityDataVo> communitys = null;
        int count = 0;
        if (storeDtos.size() > 0) {
            CommunityMemberDto communityMemberDto = new CommunityMemberDto();
            communityMemberDto.setNeedCommunityInfo(true);
            communityMemberDto.setNoAuditEnterCommunity(true);
            communityMemberDto.setMemberId(reqJson.getString("memberId"));
            communityMemberDto.setSubMemberId(storeDtos.get(0).getStoreId());
            count = communityInnerServiceSMOImpl.getCommunityMemberCount(communityMemberDto);
            if (count > 0) {
                communitys = BeanConvertUtil.covertBeanList(communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto), ApiCommunityDataVo.class);
            }else{
                communitys = new ArrayList<>();
            }
        } else {
            communitys = new ArrayList<>();
        }
        //刷入 商户信息
        if (communitys.size() > 0) {
            freshCommunityInfo(communitys);
        }
        ApiCommunityVo apiCommunityVo = new ApiCommunityVo();
        apiCommunityVo.setTotal(count);
        apiCommunityVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row")));
        apiCommunityVo.setCommunitys(communitys);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiCommunityVo), HttpStatus.OK);
        context.setResponseEntity(responseEntity);
    }
    /**
     * 刷新 小区 商户信息
     *
     * @param communityDataVos
     */
    private void freshCommunityInfo(List<ApiCommunityDataVo> communityDataVos) {
        for (ApiCommunityDataVo apiCommunityDataVo : communityDataVos) {
            StoreDto storeDto = new StoreDto();
            storeDto.setStoreId(apiCommunityDataVo.getMemberId());
            List<StoreDto> storeDtos = storeInnerServiceSMOImpl.getStores(storeDto);
            if (storeDtos.size() != 1) {
                continue;
            }
            //BeanConvertUtil.covertBean(storeDtos.get(0), apiCommunityDataVo);
            apiCommunityDataVo.setStoreName(storeDtos.get(0).getStoreName());
            apiCommunityDataVo.setStoreTypeCd(storeDtos.get(0).getStoreTypeCd());
            apiCommunityDataVo.setStoreTypeName(storeDtos.get(0).getStoreTypeName());
            apiCommunityDataVo.setTel(storeDtos.get(0).getTel());
            apiCommunityDataVo.setAddress(storeDtos.get(0).getAddress());
        }
    }
    private void getInfoByCommunity(DataFlowContext context, JSONObject reqJson) {
        CommunityMemberDto communityMemberDto = BeanConvertUtil.covertBean(reqJson, CommunityMemberDto.class);
        communityMemberDto.setNeedCommunityInfo(true);
@@ -96,30 +172,6 @@
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiCommunityVo), HttpStatus.OK);
        context.setResponseEntity(responseEntity);
    }
    /**
     * 刷新 小区 商户信息
     * @param communityDataVos
     */
    private void freshCommunityInfo(List<ApiCommunityDataVo> communityDataVos){
        for(ApiCommunityDataVo apiCommunityDataVo : communityDataVos) {
            StoreDto storeDto = new StoreDto();
            storeDto.setStoreId(apiCommunityDataVo.getMemberId());
            List<StoreDto> storeDtos = storeInnerServiceSMOImpl.getStores(storeDto);
            if(storeDtos.size() != 1){
                continue;
            }
            //BeanConvertUtil.covertBean(storeDtos.get(0), apiCommunityDataVo);
            apiCommunityDataVo.setStoreName(storeDtos.get(0).getStoreName());
            apiCommunityDataVo.setStoreTypeCd(storeDtos.get(0).getStoreTypeCd());
            apiCommunityDataVo.setStoreTypeName(storeDtos.get(0).getStoreTypeName());
            apiCommunityDataVo.setTel(storeDtos.get(0).getTel());
            apiCommunityDataVo.setAddress(storeDtos.get(0).getAddress());
        }
    }
    public IStoreInnerServiceSMO getStoreInnerServiceSMOImpl() {
Api/src/main/java/com/java110/api/listener/parkingSpace/SaveParkingSpaceListener.java
@@ -125,7 +125,7 @@
        Assert.jsonObjectHaveKey(paramIn, "num", "请求报文中未包含age");
        Assert.jsonObjectHaveKey(paramIn, "area", "请求报文中未包含name");
        Assert.jsonObjectHaveKey(paramIn, "userId", "请求报文中未包含userId");
        Assert.jsonObjectHaveKey(paramIn, "paId", "请求报文停车场信息");
        Assert.jsonObjectHaveKey(paramIn, "paId", "请求报文中未包含停车场信息");
    }
WebService/src/main/java/com/java110/web/components/community/AuditEnterCommunityManageComponent.java
@@ -37,7 +37,7 @@
    public ResponseEntity<String> list(IPageData pd) {
        JSONObject reqParam = JSONObject.parseObject(pd.getReqData());
        reqParam.put("auditStatusCd", StateConstant.NO_AUDIT);
        //reqParam.put("auditStatusCd", StateConstant.NO_AUDIT);
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(),
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId());
WebService/src/main/java/com/java110/web/smo/community/impl/ListAuditEnterCommunitysSMOImpl.java
@@ -36,7 +36,7 @@
        super.validatePageInfo(pd);
        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_AUDIT_ENTER_COMMUNITY);
        //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_AUDIT_ENTER_COMMUNITY);
    }
    @Override
WebService/src/main/resources/components/communityPackage/audit-enter-community-manage/auditEnterCommunityManage.html
@@ -3,7 +3,73 @@
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>入驻审核</h5>
                    <h5>查询条件</h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
                                v-on:click="_moreCondition()">{{auditEnterCommunityManageInfo.moreCondition ==
                            true?'隐藏':'更多'}}
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" placeholder="请输入商户名称"
                                       v-model="auditEnterCommunityManageInfo.conditions.name" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" placeholder="请输入小区名称"
                                       v-model="auditEnterCommunityManageInfo.conditions.communityName"
                                       class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <select class="custom-select"
                                    v-model="auditEnterCommunityManageInfo.conditions.auditStatusCd">
                                <option selected value="">请选择审核状态</option>
                                <option value="1000">未审核</option>
                                <option value="1100">审核通过</option>
                                <option value="1200">审核未通过</option>
                            </select></div>
                        <div class="col-sm-1">
                            <button type="button" class="btn btn-primary btn-sm"
                                    v-on:click="_queryEnterCommunityMethod()">
                                <i class="glyphicon glyphicon-search"></i> 查询
                            </button>
                        </div>
                    </div>
                    <div class="row" v-if="auditEnterCommunityManageInfo.moreCondition == true">
                        <div class="col-sm-4">
                            <select class="custom-select"
                                    v-model="auditEnterCommunityManageInfo.conditions.memberTypeCd">
                                <option selected value="">请选择商户类型</option>
                                <option value="390001200002">物业公司</option>
                                <option value="390001200003">代理商</option>
                            </select>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" placeholder="请输入联系电话"
                                       v-model="auditEnterCommunityManageInfo.conditions.tel"
                                       class=" form-control">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>商户审核</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
@@ -33,11 +99,17 @@
                            <td>{{community.address}}</td>
                            <td>{{community.stateName}}</td>
                            <td>
                                <div class="btn-group">
                                <div class="btn-group" v-if="community.auditStatusCd=='1000'">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openEnterAuditCommunityModal(community)">审核
                                    </button>
                                </div>
                                <!--v-on:click="_openEnterAuditCommunityModal(community)"-->
                                <div class="btn-group" v-if="community.auditStatusCd!='1000'">
                                    <button class="btn-white btn btn-xs"
                                            >撤回审核
                                    </button>
                                </div>
                        </tr>
WebService/src/main/resources/components/communityPackage/audit-enter-community-manage/auditEnterCommunityManage.js
@@ -10,7 +10,15 @@
                communitys:[],
                total:0,
                records:1,
                currentCommunityMemberId:''
                currentCommunityMemberId:'',
                moreCondition:false,
                conditions:{
                    name:'',
                    memberTypeCd:'',
                    communityName:'',
                    auditStatusCd:'1000',
                    tel:''
                }
            }
        },
        _initMethod:function(){
@@ -29,13 +37,13 @@
        },
        methods:{
            _listCommunitys:function(_page, _rows){
                var param = {
                    params:{
                        page:_page,
                        row:_rows
                    }
               }
               vc.component.auditEnterCommunityManageInfo.conditions.page = _page;
               vc.component.auditEnterCommunityManageInfo.conditions.row = _rows;
               var param = {
                   params: vc.component.auditEnterCommunityManageInfo.conditions
               };
               //发送get请求
               vc.http.get('auditEnterCommunityManage',
                            'list',
@@ -80,6 +88,17 @@
                        console.log('请求失败处理');
                        vc.message(errInfo);
                });
            },
            _queryEnterCommunityMethod: function () {
                vc.component._listCommunitys(DEFAULT_PAGE, DEFAULT_ROWS);
            },
            _moreCondition: function () {
                if (vc.component.auditEnterCommunityManageInfo.moreCondition) {
                    vc.component.auditEnterCommunityManageInfo.moreCondition = false;
                } else {
                    vc.component.auditEnterCommunityManageInfo.moreCondition = true;
                }
            }
        }
java110-bean/src/main/java/com/java110/dto/CommunityMemberDto.java
@@ -12,8 +12,10 @@
    private String communityMemberId;
    private String communityId;
    private String communityName;
    private String memberId;
    private String subMemberId;
    private String memberTypeCd;
@@ -98,4 +100,20 @@
    public void setAuditStatusCds(String[] auditStatusCds) {
        this.auditStatusCds = auditStatusCds;
    }
    public String getCommunityName() {
        return communityName;
    }
    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }
    public String getSubMemberId() {
        return subMemberId;
    }
    public void setSubMemberId(String subMemberId) {
        this.subMemberId = subMemberId;
    }
}
java110-bean/src/main/java/com/java110/vo/api/community/ApiCommunityDataVo.java
@@ -15,6 +15,7 @@
    private String mapX;
    private String mapY;
    private String state;
    private String auditStatusCd;
    private String stateName;
    private String memberId;
    private String storeName;
@@ -149,4 +150,12 @@
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    public String getAuditStatusCd() {
        return auditStatusCd;
    }
    public void setAuditStatusCd(String auditStatusCd) {
        this.auditStatusCd = auditStatusCd;
    }
}
java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
@@ -319,6 +319,9 @@
        <if test="memberId != null and memberId != '' and needCommunityInfo == false">
            and ms.member_id = #{memberId}
        </if>
        <if test="subMemberId != null and subMemberId != ''">
            and ms.member_id = #{memberId}
        </if>
        <if test="noAuditEnterCommunity == true">
            and ms.member_type_cd not in ('390001200003','390001200005','390001200000')
        </if>
@@ -332,6 +335,10 @@
        <if test="communityId != null and communityId != ''">
            and ms.community_id = #{communityId}
        </if>
        <if test="communityName != null and communityName != '' and needCommunityInfo == true">
            and sc.name like concat('%',#{communityName},'%')
        </if>
        order by ms.create_time desc
        <if test="page != -1 and page != null">
            limit #{page},#{row}
        </if>
@@ -388,6 +395,10 @@
            and ms.member_id = #{memberId}
        </if>
        <if test="subMemberId != null and subMemberId != ''">
            and ms.member_id = #{memberId}
        </if>
        <if test="noAuditEnterCommunity == true">
            and ms.member_type_cd not in ('390001200003','390001200005','390001200000')
        </if>
@@ -408,6 +419,9 @@
        <if test="communityId != null and communityId != ''">
            and ms.community_id = #{communityId}
        </if>
        <if test="communityName != null and communityName != '' and needCommunityInfo == true">
            and sc.name like concat('%',#{communityName},'%')
        </if>
    </select>
    <!-- 查询小区信息 add by wuxw 2018-07-03 -->
java110-utils/src/main/java/com/java110/utils/util/StringUtil.java
@@ -7,6 +7,8 @@
package com.java110.utils.util;
import com.alibaba.fastjson.JSONObject;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.regex.Pattern;
@@ -481,4 +483,26 @@
        return description;
    }
    /**
     * json是否包含key 并且存在值
     * @param param
     * @param key
     * @return
     */
    public static boolean jsonHasKayAndValue(JSONObject param,String key){
        if(param == null){
            return false;
        }
        if(!param.containsKey(key)){
            return false;
        }
        if(isEmpty(param.getString(key))){
            return false;
        }
        return true;
    }
}