Просмотр исходного кода

优化小区信息菜单信息

wuxw лет назад: 6
Родитель
Сommit
fb91efe81d

+ 6 - 0
WebService/src/main/java/com/java110/web/smo/community/impl/ListCommunitysSMOImpl.java

@@ -3,6 +3,7 @@ package com.java110.web.smo.community.impl;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.common.constant.PrivilegeCodeConstant;
 import com.java110.common.constant.ServiceConstant;
+import com.java110.common.constant.StoreTypeConstant;
 import com.java110.common.exception.SMOException;
 import com.java110.common.util.BeanConvertUtil;
 import com.java110.web.smo.community.IListCommunitysSMO;
@@ -46,6 +47,11 @@ public class ListCommunitysSMOImpl extends AbstractComponentSMO implements IList
         Map paramMap = BeanConvertUtil.beanCovertMap(result);
         paramIn.putAll(paramMap);
 
+
+        if(!StoreTypeConstant.STORE_TYPE_SYSTEM_MANAGER.equals(result.getStoreTypeCd())) {
+            paramIn.put("memberId", result.getStoreId());
+        }
+
         String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/community.listCommunitys" + mapToUrlParam(paramIn);
 
 

+ 14 - 11
WebService/src/main/resources/components/communityPackage/community-manage/communityManage.html

@@ -16,35 +16,38 @@
                     <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                         <thead>
                         <tr>
-                                                        <th>小区ID</th>
+                            <th>小区ID</th>
                             <th>小区名称</th>
                             <th>小区地址</th>
                             <th>附近地标</th>
                             <th>城市编码</th>
                             <th>小区维度</th>
                             <th>小区经度</th>
+                            <th>状态</th>
                             <th class="text-right">操作</th>
-
-
                         </tr>
                         </thead>
                         <tbody>
-                            <tr v-for="community in communityManageInfo.communitys">
-                                                            <td>{{community.communityId}}</td>
+                        <tr v-for="community in communityManageInfo.communitys">
+                            <td>{{community.communityId}}</td>
                             <td>{{community.name}}</td>
                             <td>{{community.address}}</td>
                             <td>{{community.nearbyLandmarks}}</td>
                             <td>{{community.cityCode}}</td>
                             <td>{{community.mapX}}</td>
                             <td>{{community.mapY}}</td>
-                            <td><div class="btn-group">
-                                    <button class="btn-white btn btn-xs" v-on:click="_openEditCommunityModel(community)">修改</button>
+                            <td>{{community.stateName}}</td>
+                            <td>
+                                <div class="btn-group">
+                                    <button class="btn-white btn btn-xs"
+                                            v-on:click="_openEditCommunityModel(community)">修改
+                                    </button>
                                 </div>
-                               <!-- <div class="btn-group">
-                                    <button class="btn-white btn btn-xs" v-on:click="_openDeleteCommunityModel(community)">删除</button>
-                                </div></td>-->
+                                <!-- <div class="btn-group">
+                                     <button class="btn-white btn btn-xs" v-on:click="_openDeleteCommunityModel(community)">删除</button>
+                                 </div></td>-->
 
-                            </tr>
+                        </tr>
                         </tbody>
                         <tfoot>
                         <tr>

+ 1 - 1
WebService/src/main/resources/views/communityFlow.html

@@ -5,7 +5,7 @@
       xmlns:vc="http://www.thymeleaf.org">
 <head>
     <meta charset="UTF-8"/>
-    <title>小区初始化|java110</title>
+    <title>添加小区|java110</title>
     <vc:create name="commonTop"></vc:create>
 </head>
 <body>

+ 60 - 19
java110-bean/src/main/java/com/java110/dto/community/CommunityDto.java

@@ -16,12 +16,16 @@ import java.util.Date;
 public class CommunityDto extends PageDto implements Serializable {
 
     private String address;
-private String nearbyLandmarks;
-private String cityCode;
-private String name;
-private String communityId;
-private String mapY;
-private String mapX;
+    private String nearbyLandmarks;
+    private String cityCode;
+    private String name;
+    private String communityId;
+    private String mapY;
+    private String mapX;
+    private String memberId;
+    private String state;
+    private String stateName;
+
 
 
     private Date createTime;
@@ -32,43 +36,56 @@ private String mapX;
     public String getAddress() {
         return address;
     }
-public void setAddress(String address) {
+
+    public void setAddress(String address) {
         this.address = address;
     }
-public String getNearbyLandmarks() {
+
+    public String getNearbyLandmarks() {
         return nearbyLandmarks;
     }
-public void setNearbyLandmarks(String nearbyLandmarks) {
+
+    public void setNearbyLandmarks(String nearbyLandmarks) {
         this.nearbyLandmarks = nearbyLandmarks;
     }
-public String getCityCode() {
+
+    public String getCityCode() {
         return cityCode;
     }
-public void setCityCode(String cityCode) {
+
+    public void setCityCode(String cityCode) {
         this.cityCode = cityCode;
     }
-public String getName() {
+
+    public String getName() {
         return name;
     }
-public void setName(String name) {
+
+    public void setName(String name) {
         this.name = name;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getMapY() {
+
+    public String getMapY() {
         return mapY;
     }
-public void setMapY(String mapY) {
+
+    public void setMapY(String mapY) {
         this.mapY = mapY;
     }
-public String getMapX() {
+
+    public String getMapX() {
         return mapX;
     }
-public void setMapX(String mapX) {
+
+    public void setMapX(String mapX) {
         this.mapX = mapX;
     }
 
@@ -88,4 +105,28 @@ public void setMapX(String mapX) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getMemberId() {
+        return memberId;
+    }
+
+    public void setMemberId(String memberId) {
+        this.memberId = memberId;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getStateName() {
+        return stateName;
+    }
+
+    public void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
 }

+ 29 - 0
java110-bean/src/main/java/com/java110/vo/api/community/ApiCommunityDataVo.java

@@ -12,49 +12,78 @@ public class ApiCommunityDataVo implements Serializable {
     private String cityCode;
     private String mapX;
     private String mapY;
+    private String state;
+    private String stateName;
+
     public String getCommunityId() {
         return communityId;
     }
+
     public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
+
     public String getName() {
         return name;
     }
+
     public void setName(String name) {
         this.name = name;
     }
+
     public String getAddress() {
         return address;
     }
+
     public void setAddress(String address) {
         this.address = address;
     }
+
     public String getNearbyLandmarks() {
         return nearbyLandmarks;
     }
+
     public void setNearbyLandmarks(String nearbyLandmarks) {
         this.nearbyLandmarks = nearbyLandmarks;
     }
+
     public String getCityCode() {
         return cityCode;
     }
+
     public void setCityCode(String cityCode) {
         this.cityCode = cityCode;
     }
+
     public String getMapX() {
         return mapX;
     }
+
     public void setMapX(String mapX) {
         this.mapX = mapX;
     }
+
     public String getMapY() {
         return mapY;
     }
+
     public void setMapY(String mapY) {
         this.mapY = mapY;
     }
 
+    public String getState() {
+        return state;
+    }
 
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getStateName() {
+        return stateName;
+    }
 
+    public void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
 }

+ 20 - 1
java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml

@@ -358,7 +358,10 @@
 
     <!-- 查询小区信息 add by wuxw 2018-07-03 -->
     <select id="getCommunityInfoNew" parameterType="Map" resultType="Map">
-        select  t.address,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.map_y,t.map_y mapY,t.map_x,t.map_x mapX
+        select  t.address,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,
+        t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,
+        t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.map_y,t.map_y mapY,
+        t.map_x,t.map_x mapX,t.state,if(t.state='1000','待审核','审核完成') stateName
         from s_community t
         where 1 =1
         <if test="address !=null and address != ''">
@@ -388,6 +391,14 @@
         <if test="mapX !=null and mapX != ''">
             and t.map_x= #{mapX}
         </if>
+        <if test="memberId !=null and memberId !=''">
+            and exists(
+            select 1 from s_community_member cm
+            where cm.community_id = t.community_id
+            and cm.member_id = #{memberId}
+            and cm.status_cd = '0'
+            )
+        </if>
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>
@@ -428,6 +439,14 @@
         <if test="mapX !=null and mapX != ''">
             and t.map_x= #{mapX}
         </if>
+        <if test="memberId !=null and memberId !=''">
+            and exists(
+                select 1 from s_community_member cm
+                where cm.community_id = t.community_id
+                and cm.member_id = #{memberId}
+                and cm.status_cd = '0'
+            )
+        </if>
 
 
     </select>