Przeglądaj źródła

优化楼栋 功能

wuxw 6 lat temu
rodzic
commit
d64ea078d3

+ 2 - 2
Api/src/main/java/com/java110/api/listener/floor/QueryFloorsListener.java

@@ -56,9 +56,9 @@ public class QueryFloorsListener extends AbstractServiceApiDataFlowListener {
         JSONObject reqJson = dataFlowContext.getReqJson();
         validateFloorData(reqJson);
 
-        int page = reqJson.getInteger("page");
+        //int page = reqJson.getInteger("page");
         int row = reqJson.getInteger("row");
-        String communityId = reqJson.getString("communityId");
+        //String communityId = reqJson.getString("communityId");
 
         ApiFloorVo apiFloorVo = new ApiFloorVo();
 

+ 1 - 6
WebService/src/main/java/com/java110/web/smo/impl/FloorServiceSMOImpl.java

@@ -92,12 +92,7 @@ public class FloorServiceSMOImpl extends BaseComponentSMO implements IFloorServi
         String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd");
         //数据校验是否 商户是否入驻该小区
         super.checkStoreEnterCommunity(pd, storeId, storeTypeCd, communityId, restTemplate);
-        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/floor.queryFloors?row=" + rows + "&page=" + page + "&communityId="
-                + communityId;
-
-        if (!StringUtil.isEmpty(floorNum)) {
-            apiUrl += "&floorNum=" + floorNum;
-        }
+        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/floor.queryFloors" + mapToUrlParam(paramIn);
 
         responseEntity = this.callCenterService(restTemplate, pd, "",
                 apiUrl,

+ 2 - 1
WebService/src/main/resources/components/floorPackage/edit-floor/editFloor.js

@@ -8,7 +8,8 @@
                 floorNum:'',
                 remark:'',
                 errorInfo:''
-editFloor        },
+            }
+        },
         watch:{
             "editFloorInfo.floorNum":{//深度监听,可监听到对象、数组的变化
                 handler(val, oldVal){

+ 46 - 1
WebService/src/main/resources/components/floorPackage/floor-manage/listFloor.html

@@ -1,4 +1,49 @@
 <div id="component" >
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <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()">更多
+                         </button>-->
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div class="row">
+
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入楼栋ID"
+                                       v-model="listFloorInfo.conditions.floorId" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-3">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入楼栋编号"
+                                       v-model="listFloorInfo.conditions.floorNum" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入楼栋编号"
+                                       v-model="listFloorInfo.conditions.floorName" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFloorMethod()"><i
+                                    class="glyphicon glyphicon-search" ></i> 查询
+                            </button>
+                        </div>
+
+                    </div>
+
+
+                </div>
+            </div>
+        </div>
+    </div>
     <div class="row">
         <div class="col-lg-12">
             <div class="ibox">
@@ -16,7 +61,7 @@
                     <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                         <thead>
                         <tr>
-                            <th class="text-center">楼ID</th>
+                            <th class="text-center">楼ID</th>
                             <th class="text-center">编号</th>
                             <th class="text-center">名称</th>
                             <th class="text-center">创建员工</th>

+ 15 - 7
WebService/src/main/resources/components/floorPackage/floor-manage/listFloor.js

@@ -7,7 +7,12 @@
                 floors:[],
                 total:0,
                 records:1,
-                errorInfo:""
+                errorInfo:"",
+                conditions:{
+                    floorId:'',
+                    floorNum:'',
+                    floorName:''
+                }
             }
         },
         _initMethod:function(){
@@ -23,13 +28,13 @@
         },
         methods:{
             _listFloorData:function(_page,_rows){
+
+                vc.component.listFloorInfo.conditions.page = _page;
+                vc.component.listFloorInfo.conditions.row = _rows;
+                vc.component.listFloorInfo.conditions.communityId=vc.getCurrentCommunity().communityId
                 var param = {
-                    params:{
-                        page:_page,
-                        rows:_rows,
-                        communityId:vc.getCurrentCommunity().communityId
-                    }
-                }
+                    params:vc.component.listFloorInfo.conditions
+                };
 
                //发送get请求
                vc.http.get('listFloor',
@@ -60,6 +65,9 @@
             },
             _openEditFloorModel:function(_floor){
                 vc.emit('editFloor','openEditFloorModal',_floor);
+            },
+            _queryFloorMethod:function(){
+                vc.component._listFloorData(DEFAULT_PAGE, DEFAULT_ROWS);
             }
         }
     })

+ 2 - 2
java110-db/src/main/resources/mapper/floor/FloorServiceDaoImplMapper.xml

@@ -147,7 +147,7 @@
             and f.floor_id= #{floorId}
         </if>
         <if test="name !=null and name != ''">
-            and f.name= #{name}
+            and f.name like concat('%',#{name},'%')
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and f.status_cd= #{statusCd}
@@ -187,7 +187,7 @@
             and f.floor_id= #{floorId}
         </if>
         <if test="name !=null and name != ''">
-            and f.name= #{name}
+            and f.name like concat('%',#{name},'%')
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and f.status_cd= #{statusCd}