傅行帆 пре 6 година
родитељ
комит
cfae8b983b

+ 52
- 6
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java Прегледај датотеку

@@ -112,16 +112,62 @@ public class BuildingOwnerInfoController extends BaseController {
112 112
         return responseBean;
113 113
     }
114 114
 
115
-    @ApiOperation(value = "查询 楼栋/单元/楼层/户号", notes = "查询 楼栋/单元/楼层/户号")
115
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
116 116
     @ApiImplicitParams({
117
-            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "building楼层;" +
118
-                    "unit单元;level楼层") // ;roomNo户号
119 117
     })
120
-    @RequestMapping(value = "/building/address",method = RequestMethod.POST)
121
-    public ResponseBean buildingUnitNumber(@RequestBody String parameter, HttpSession session){
118
+    @RequestMapping(value = "/building/phase",method = RequestMethod.GET)
119
+    public ResponseBean getPhaseList(HttpSession session){
122 120
         ResponseBean responseBean = new ResponseBean();
123 121
         UserElement userElement = getUserElement(session);
124
-        responseBean = iBuildingOwnerInfoService.getBuildingOrUnitOrNumber(parameter, userElement.getCommunityId());
122
+        responseBean = iBuildingOwnerInfoService.getPhaseList(userElement.getCommunityId());
123
+        return responseBean;
124
+    }
125
+    
126
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
127
+    @ApiImplicitParams({
128
+            @ApiImplicitParam(paramType = "query", name = "phaseId",value = "期区ID")
129
+    })
130
+    @RequestMapping(value = "/building/building",method = RequestMethod.GET)
131
+    public ResponseBean getBuildingList(@RequestParam Integer phaseId, HttpSession session){
132
+        ResponseBean responseBean = new ResponseBean();
133
+        UserElement userElement = getUserElement(session);
134
+        responseBean = iBuildingOwnerInfoService.getBuildingList(phaseId,userElement.getCommunityId());
135
+        return responseBean;
136
+    }
137
+    
138
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
139
+    @ApiImplicitParams({
140
+            @ApiImplicitParam(paramType = "query", name = "buildingId",value = "楼栋ID")
141
+    })
142
+    @RequestMapping(value = "/building/unit",method = RequestMethod.GET)
143
+    public ResponseBean getUnitList(@RequestParam Integer buildingId,HttpSession session){
144
+        ResponseBean responseBean = new ResponseBean();
145
+        UserElement userElement = getUserElement(session);
146
+        responseBean = iBuildingOwnerInfoService.getUnitList(buildingId,userElement.getCommunityId());
147
+        return responseBean;
148
+    }
149
+    
150
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
151
+    @ApiImplicitParams({
152
+            @ApiImplicitParam(paramType = "query", name = "unitId",value = "单元ID")
153
+    })
154
+    @RequestMapping(value = "/building/level",method = RequestMethod.GET)
155
+    public ResponseBean getLevelList(@RequestParam Integer unitId,HttpSession session){
156
+        ResponseBean responseBean = new ResponseBean();
157
+        UserElement userElement = getUserElement(session);
158
+        responseBean = iBuildingOwnerInfoService.getLevelList(unitId,userElement.getCommunityId());
159
+        return responseBean;
160
+    }
161
+    
162
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
163
+    @ApiImplicitParams({
164
+            @ApiImplicitParam(paramType = "query", name = "levelId",value = "楼层ID")
165
+    })
166
+    @RequestMapping(value = "/building/roomno",method = RequestMethod.GET)
167
+    public ResponseBean getRoomNoList(@RequestParam Integer levelId,HttpSession session){
168
+        ResponseBean responseBean = new ResponseBean();
169
+        UserElement userElement = getUserElement(session);
170
+        responseBean = iBuildingOwnerInfoService.getRoomNoList(levelId,userElement.getCommunityId());
125 171
         return responseBean;
126 172
     }
127 173
     

+ 33
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java Прегледај датотеку

@@ -59,11 +59,10 @@ public interface IBuildingOwnerInfoService extends IService<TpBuildingOwnerInfo>
59 59
      *
60 60
      *   楼栋是根据 小区ID查询
61 61
      *
62
-     * @param parameter
63 62
      * @param communityId
64 63
      * @return
65 64
      */
66
-    ResponseBean getBuildingOrUnitOrNumber(String parameter, Integer communityId);
65
+    ResponseBean getPhaseList(Integer communityId);
67 66
     
68 67
     /**
69 68
      * 上传excel里面的内容
@@ -118,4 +117,36 @@ public interface IBuildingOwnerInfoService extends IService<TpBuildingOwnerInfo>
118 117
      * @return
119 118
      */
120 119
     ResponseBean downloadExcel(UserElement userElement);
120
+    
121
+    /**
122
+     * 获取楼栋信息
123
+     * @param phaseId
124
+     * @param communityId
125
+     * @return
126
+     */
127
+    ResponseBean getBuildingList(Integer phaseId, Integer communityId);
128
+    
129
+    /**
130
+     * 获取单元信息
131
+     * @param buildingId
132
+     * @param communityId
133
+     * @return
134
+     */
135
+    ResponseBean getUnitList(Integer buildingId, Integer communityId);
136
+    
137
+    /**
138
+     * 获取楼层信息
139
+     * @param unitId
140
+     * @param communityId
141
+     * @return
142
+     */
143
+    ResponseBean getLevelList(Integer unitId, Integer communityId);
144
+    
145
+    /**
146
+     * 获取室号信息
147
+     * @param levelId
148
+     * @param communityId
149
+     * @return
150
+     */
151
+    ResponseBean getRoomNoList(Integer levelId, Integer communityId);
121 152
 }

+ 66
- 35
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Прегледај датотеку

@@ -67,10 +67,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
67 67
 
68 68
     @Autowired
69 69
     private TaSysUserRoleMapper taSysUserRoleMapper;
70
-
71
-    @Autowired
72
-    private ITaUserService iTaUserService;
73
-
70
+    
74 71
     @Autowired
75 72
     private BillInvoiceMapper billInvoiceMapper;
76 73
 
@@ -83,6 +80,18 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
83 80
     @Autowired
84 81
     private TaUserVerifyMapper taUserVerifyMapper;
85 82
     
83
+    @Autowired
84
+    private TpPhaseMapper tpPhaseMapper;
85
+    
86
+    @Autowired
87
+    private TpBuildingMapper tpBuildingMapper;
88
+    
89
+    @Autowired
90
+    private TpUnitMapper tpUnitMapper;
91
+    
92
+    @Autowired
93
+    private TpLevelMapper tpLevelMapper;
94
+    
86 95
     public static final Logger logger = LoggerFactory.getLogger(BuildingOwnerInfoServiceImpl.class);
87 96
     
88 97
     @Override
@@ -377,47 +386,21 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
377 386
     }
378 387
 
379 388
     @Override
380
-    public ResponseBean getBuildingOrUnitOrNumber(String parameter,Integer communityId) {
389
+    public ResponseBean getPhaseList(Integer communityId) {
381 390
 
382 391
         ResponseBean responseBean = new ResponseBean();
383 392
         if (null == communityId || "".equals(communityId)) {
384 393
             throw new WisdomException("编号:%s 小区不存在!", communityId);
385 394
         }
386 395
 
387
-        TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
388
-
389 396
         Map<String, Object> map = Maps.newHashMap();
390
-
391 397
         // 小区
392 398
         map.put("community_id", communityId);
393
-        map.put("owner_status", "1");
394
-        // 期
395
-        //map.put("phase", tpBuildingOwnerInfo.getPhaseName());
396
-        // 栋
397
-        //map.put("building", tpBuildingOwnerInfo.getBuildingName());
398
-        // 单元
399
-        //map.put("unit", tpBuildingOwnerInfo.getUnitName());
400
-        // 楼层
401
-        //map.put("level", tpBuildingOwnerInfo.getLevelName());
402
-
403
-        QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
399
+        QueryWrapper<TpPhase> queryWrapper = new QueryWrapper<>();
404 400
         queryWrapper.allEq(map, false);
405
-
406
-        /**
407
-         * 1.如果 楼栋值不存在表示根据小区Id查询时查询楼栋!
408
-         * 2.如果 楼栋存在表示查询单元
409
-         * 3.如果 单元存在表示查询楼层
410
-         * 4.如果 楼层存在表示查询户号
411
-         *
412
-         * 查询户号, 依赖于前面的查询条件成立!
413
-         *
414
-         * 这里的查询都依赖于, 前面的查询条件成立! 比如 要使用条件2, 那么条件1 必须成立!
415
-         *
416
-         */
417
-
418
-        List<TpBuildingOwnerInfo> selectList = tpBuildingOwnerInfoMapper.selectList(queryWrapper);
419
-
420
-        responseBean.addSuccess(selectList);
401
+    
402
+        List<TpPhase> tpPhaseList = tpPhaseMapper.selectList(queryWrapper);
403
+        responseBean.addSuccess(tpPhaseList);
421 404
 
422 405
         return responseBean;
423 406
     }
@@ -948,4 +931,52 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
948 931
         responseBean.addSuccess(workbook);
949 932
         return responseBean;
950 933
     }
934
+    
935
+    /**
936
+     * 获取楼栋信息
937
+     *
938
+     * @param phaseId
939
+     * @param communityId
940
+     * @return
941
+     */
942
+    @Override
943
+    public ResponseBean getBuildingList(Integer phaseId, Integer communityId) {
944
+        return null;
945
+    }
946
+    
947
+    /**
948
+     * 获取单元信息
949
+     *
950
+     * @param buildingId
951
+     * @param communityId
952
+     * @return
953
+     */
954
+    @Override
955
+    public ResponseBean getUnitList(Integer buildingId, Integer communityId) {
956
+        return null;
957
+    }
958
+    
959
+    /**
960
+     * 获取楼层信息
961
+     *
962
+     * @param unitId
963
+     * @param communityId
964
+     * @return
965
+     */
966
+    @Override
967
+    public ResponseBean getLevelList(Integer unitId, Integer communityId) {
968
+        return null;
969
+    }
970
+    
971
+    /**
972
+     * 获取室号信息
973
+     *
974
+     * @param levelId
975
+     * @param communityId
976
+     * @return
977
+     */
978
+    @Override
979
+    public ResponseBean getRoomNoList(Integer levelId, Integer communityId) {
980
+        return null;
981
+    }
951 982
 }

+ 42
- 13
VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js Прегледај датотеку

@@ -1,19 +1,48 @@
1 1
 import request from '@/utils/request'
2 2
 
3 3
 //  查询 楼栋/单元/楼层/户号
4
-export function buildingAddress(data) {
5
-  const config = {
6
-    url: '/building/address',
7
-    method: 'post',
8
-    data: {
9
-      phase: data.phase,
10
-      building: data.building,
11
-      unit: data.unit,
12
-      level: data.level,
13
-      roomNo: data.roomNo
14
-    }
15
-  }
16
-  return request(config)
4
+export function getPhaseList(data) {
5
+  return request({
6
+    url: '/building/phase',
7
+    method: 'get',
8
+    params: data
9
+  })
10
+}
11
+
12
+//  查询 楼栋/单元/楼层/户号
13
+export function getBuildingList(data) {
14
+  return request({
15
+    url: '/building/building',
16
+    method: 'get',
17
+    params: data
18
+  })
19
+}
20
+
21
+//  查询 楼栋/单元/楼层/户号
22
+export function getUnitList(data) {
23
+  return request({
24
+    url: '/building/unit',
25
+    method: 'get',
26
+    params: data
27
+  })
28
+}
29
+
30
+//  查询 楼栋/单元/楼层/户号
31
+export function getLevelList(data) {
32
+  return request({
33
+    url: '/building/level',
34
+    method: 'get',
35
+    params: data
36
+  })
37
+}
38
+
39
+//  查询 楼栋/单元/楼层/户号
40
+export function getRoomNoList(data) {
41
+  return request({
42
+    url: '/building/roomno',
43
+    method: 'get',
44
+    params: data
45
+  })
17 46
 }
18 47
 
19 48
 // 获取楼栋业主信息列表

+ 43
- 3
VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js Прегледај датотеку

@@ -1,5 +1,5 @@
1 1
 
2
-import { buildingAddress, buildingList, deleteBuilding, addBuilding, updateBuilding, getByIdBuildingId, userPassCertification, updataPassCertification, communityBuildinglist, buildingHouse, communityBuildingAdd, buildingDownloadExcel } from '@/api/buildingOwnerInfo'
2
+import { getPhaseList, getBuildingList, getUnitList, getLevelList, getRoomNoList, buildingList, deleteBuilding, addBuilding, updateBuilding, getByIdBuildingId, userPassCertification, updataPassCertification, communityBuildinglist, buildingHouse, communityBuildingAdd, buildingDownloadExcel } from '@/api/buildingOwnerInfo'
3 3
 
4 4
 const buildingOwnerInfo = {
5 5
   state: {
@@ -11,9 +11,49 @@ const buildingOwnerInfo = {
11 11
     }
12 12
   },
13 13
   actions: {
14
-    BuildingAddress({ commit }, data) { // 查询 楼栋/单元/楼层/户号
14
+    GetPhaseList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
15 15
       return new Promise((resolve, reject) => {
16
-        buildingAddress(data).then(response => {
16
+        getPhaseList(data).then(response => {
17
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
18
+          resolve(response)
19
+        }).catch(error => {
20
+          reject(error)
21
+        })
22
+      })
23
+    },
24
+    GetBuildingList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
25
+      return new Promise((resolve, reject) => {
26
+        getBuildingList(data).then(response => {
27
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
28
+          resolve(response)
29
+        }).catch(error => {
30
+          reject(error)
31
+        })
32
+      })
33
+    },
34
+    GetUnitList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
35
+      return new Promise((resolve, reject) => {
36
+        getUnitList(data).then(response => {
37
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
38
+          resolve(response)
39
+        }).catch(error => {
40
+          reject(error)
41
+        })
42
+      })
43
+    },
44
+    GetLevelList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
45
+      return new Promise((resolve, reject) => {
46
+        getLevelList(data).then(response => {
47
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
48
+          resolve(response)
49
+        }).catch(error => {
50
+          reject(error)
51
+        })
52
+      })
53
+    },
54
+    GetRoomNoList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
55
+      return new Promise((resolve, reject) => {
56
+        getRoomNoList(data).then(response => {
17 57
           // console.log('查询 楼栋/单元/楼层/户号: ', response)
18 58
           resolve(response)
19 59
         }).catch(error => {

+ 31
- 27
VUECODE/smart-property-manage/src/views/building/index.vue Прегледај датотеку

@@ -3,45 +3,45 @@
3 3
   <div class="root">
4 4
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
5 5
       <el-form-item label="楼盘库">
6
-        <el-select v-model="listQuery.phase" placeholder="期/区" @change="buildSelectChange(0)">
6
+        <el-select v-model="listQuery.phaseId" placeholder="期/区" @change="buildSelectChange(0)">
7 7
           <!--<el-option label="选择楼栋" value="-1" />-->
8 8
           <el-option
9 9
             v-for="item in phaseList"
10 10
             :key="item.id"
11
-            :label="item.phase"
12
-            :value="item.phase"/>
11
+            :label="item.name"
12
+            :value="item.id"/>
13 13
         </el-select>
14
-        <el-select v-model="listQuery.building" placeholder="栋" @change="buildSelectChange(1)">
14
+        <el-select v-model="listQuery.buildingId" placeholder="栋" @change="buildSelectChange(1)">
15 15
           <!--<el-option label="选择楼栋" value="-1" />-->
16 16
           <el-option
17 17
             v-for="item in buildingList"
18 18
             :key="item.id"
19
-            :label="item.building"
20
-            :value="item.building"/>
19
+            :label="item.name"
20
+            :value="item.id"/>
21 21
         </el-select>
22
-        <el-select v-model="listQuery.unit" placeholder="单元" @change="buildSelectChange(2)">
22
+        <el-select v-model="listQuery.unitId" placeholder="单元" @change="buildSelectChange(2)">
23 23
           <!--<el-option label="选择单元" value="-1" />-->
24 24
           <el-option
25 25
             v-for="item in unitList"
26 26
             :key="item.id"
27
-            :label="item.unit"
28
-            :value="item.unit"/>
27
+            :label="item.name"
28
+            :value="item.id"/>
29 29
         </el-select>
30
-        <el-select v-model="listQuery.level" placeholder="楼层" @change="buildSelectChange(3)">
30
+        <el-select v-model="listQuery.levelId" placeholder="楼层" @change="buildSelectChange(3)">
31 31
           <!--<el-option label="选择楼层" value="-1" />-->
32 32
           <el-option
33 33
             v-for="item in levelList"
34 34
             :key="item.id"
35
-            :label="item.level"
36
-            :value="item.level"/>
35
+            :label="item.name"
36
+            :value="item.id"/>
37 37
         </el-select>
38
-        <el-select v-model="listQuery.roomNo" placeholder="户号">
38
+        <el-select v-model="listQuery.roomNoId" placeholder="户号">
39 39
           <!--<el-option label="选择户号" value="-1" />-->
40 40
           <el-option
41 41
             v-for="item in roomNoList"
42 42
             :key="item.id"
43
-            :label="item.roomNo"
44
-            :value="item.roomNo"/>
43
+            :label="item.name"
44
+            :value="item.id"/>
45 45
         </el-select>
46 46
         <el-form-item label="业主名称">
47 47
           <el-input v-model="listQuery.ownerName" placeholder="业主名称" />
@@ -105,11 +105,11 @@ export default {
105 105
   data() {
106 106
     return {
107 107
       listQuery: {
108
-        phase: '',
109
-        building: '',
110
-        unit: '',
111
-        level: '',
112
-        roomNo: '',
108
+        phaseId: '',
109
+        buildingId: '',
110
+        unitId: '',
111
+        levelId: '',
112
+        roomNoId: '',
113 113
         ownerName: '',
114 114
         pageNum: 1,
115 115
         pageSize: 10
@@ -156,7 +156,11 @@ export default {
156 156
   },
157 157
   methods: {
158 158
     ...mapActions('buildingOwnerInfo', [
159
-      'BuildingAddress',
159
+      'GetPhaseList',
160
+      'GetBuildingList',
161
+      'GetUnitList',
162
+      'GetLevelList',
163
+      'GetRoomNoList',
160 164
       'BuildingInfoList'
161 165
     ]),
162 166
     handleSizeChange(val) {
@@ -185,15 +189,15 @@ export default {
185 189
     },
186 190
     getPhase() { // 获取期
187 191
       this.listQuery.phase = ''
188
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
192
+      this.$store.dispatch('GetPhaseList', this.listQuery).then((res) => {
189 193
         this.phaseList = res.data
190 194
       }).catch(() => {
191 195
         console.log('error phase BuildingAddress')
192 196
       })
193 197
     },
194 198
     getBuild() { // 获取楼栋
195
-      this.listQuery.building = ''
196
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
199
+      this.listQuery.buildingId = ''
200
+      this.$store.dispatch('GetBuildingList', this.listQuery).then((res) => {
197 201
         this.buildingList = res.data
198 202
       }).catch(() => {
199 203
         console.log('error building BuildingAddress')
@@ -201,7 +205,7 @@ export default {
201 205
     },
202 206
     getUnit() { // 获取单元
203 207
       this.listQuery.unit = ''
204
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
208
+      this.$store.dispatch('GetUnitList', this.listQuery).then((res) => {
205 209
         this.unitList = res.data
206 210
       }).catch(() => {
207 211
         console.log('error unit BuildingAddress')
@@ -209,7 +213,7 @@ export default {
209 213
     },
210 214
     getLevel() { // 获取楼层
211 215
       this.listQuery.level = ''
212
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
216
+      this.$store.dispatch('GetLevelList', this.listQuery).then((res) => {
213 217
         this.levelList = res.data
214 218
       }).catch(() => {
215 219
         console.log('error level BuildingAddress')
@@ -217,7 +221,7 @@ export default {
217 221
     },
218 222
     getRoomNo() { // 获取户号
219 223
       this.listQuery.roomNo = ''
220
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
224
+      this.$store.dispatch('GetRoomNoList', this.listQuery).then((res) => {
221 225
         this.roomNoList = res.data
222 226
       }).catch(() => {
223 227
         console.log('error roomNo BuildingAddress')

+ 1158
- 930
文档/MYSQL/smartCommunity.pdb
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1158
- 930
文档/MYSQL/smartCommunity.pdm
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку