weiximei 6 年之前
父節點
當前提交
e0b7072a61

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java 查看文件

@@ -9,6 +9,9 @@ public class TpBuildingOwnerInfo {
9 9
 
10 10
     private String idCard;
11 11
 
12
+    // 期
13
+    private String phase;
14
+
12 15
     private String building;
13 16
 
14 17
     private String unit;
@@ -59,6 +62,14 @@ public class TpBuildingOwnerInfo {
59 62
         this.idCard = idCard == null ? null : idCard.trim();
60 63
     }
61 64
 
65
+    public String getPhase() {
66
+        return phase;
67
+    }
68
+
69
+    public void setPhase(String phase) {
70
+        this.phase = phase;
71
+    }
72
+
62 73
     public String getBuilding() {
63 74
         return building;
64 75
     }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 查看文件

@@ -847,7 +847,7 @@ public class TaUserServiceImpl implements ITaUserService {
847 847
         TaUserVO userVO = new TaUserVO();
848 848
         BeanUtils.copyProperties(user,userVO);
849 849
         userVO.setAddressProvince(province.getProvince()+""+city.getCity()+""+district.getDistrict());
850
-        userVO.setAddressBuilding(tpBuildingOwnerInfo.getBuilding()
850
+        userVO.setAddressBuilding(tpBuildingOwnerInfo.getPhase() + tpBuildingOwnerInfo.getBuilding()
851 851
                 +tpBuildingOwnerInfo.getUnit()
852 852
                 +tpBuildingOwnerInfo.getLevel()
853 853
                 +tpBuildingOwnerInfo.getRoomNo());

+ 14
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml 查看文件

@@ -5,6 +5,7 @@
5 5
     <id column="id" property="id" jdbcType="INTEGER" />
6 6
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
7 7
     <result column="id_card" property="idCard" jdbcType="VARCHAR" />
8
+    <result column="phase" property="phase" jdbcType="VARCHAR" />
8 9
     <result column="building" property="building" jdbcType="VARCHAR" />
9 10
     <result column="unit" property="unit" jdbcType="VARCHAR" />
10 11
     <result column="level" property="level" jdbcType="VARCHAR" />
@@ -20,7 +21,7 @@
20 21
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
21 22
   </resultMap>
22 23
   <sql id="Base_Column_List" >
23
-    id, community_id, id_card, building, unit, level, room_no, owner_name, owner_tel, 
24
+    id, community_id, id_card, phase, building, unit, level, room_no, owner_name, owner_tel,
24 25
     gender, pair_status, verify_status, create_user, create_date, update_user, update_date
25 26
   </sql>
26 27
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -34,14 +35,14 @@
34 35
     where id = #{id,jdbcType=INTEGER}
35 36
   </delete>
36 37
   <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
37
-    insert into tp_building_owner_info (id, community_id, id_card, 
38
+    insert into tp_building_owner_info (id, community_id, id_card, phase,
38 39
       building, unit, level, 
39 40
       room_no, owner_name, owner_tel, 
40 41
       gender, pair_status, verify_status, 
41 42
       create_user, create_date, update_user, 
42 43
       update_date)
43 44
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
44
-      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
45
+      #{phase,jdbcType=VARCHAR}, #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},
45 46
       #{roomNo,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
46 47
       #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
47 48
       #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, 
@@ -59,6 +60,9 @@
59 60
       <if test="idCard != null" >
60 61
         id_card,
61 62
       </if>
63
+      <if test="phase != null">
64
+        phase,
65
+      </if>
62 66
       <if test="building != null" >
63 67
         building,
64 68
       </if>
@@ -109,6 +113,9 @@
109 113
       <if test="idCard != null" >
110 114
         #{idCard,jdbcType=VARCHAR},
111 115
       </if>
116
+      <if test="phase != null">
117
+        #{phase,jdbcType=VARCHAR},
118
+      </if>
112 119
       <if test="building != null" >
113 120
         #{building,jdbcType=VARCHAR},
114 121
       </if>
@@ -159,6 +166,9 @@
159 166
       <if test="idCard != null" >
160 167
         id_card = #{idCard,jdbcType=VARCHAR},
161 168
       </if>
169
+      <if test="phase != null">
170
+        phase = #{phase,jdbcType=VARCHAR},
171
+      </if>
162 172
       <if test="building != null" >
163 173
         building = #{building,jdbcType=VARCHAR},
164 174
       </if>
@@ -205,6 +215,7 @@
205 215
     update tp_building_owner_info
206 216
     set community_id = #{communityId,jdbcType=INTEGER},
207 217
       id_card = #{idCard,jdbcType=VARCHAR},
218
+      phase = #{phase,jdbcType=VARCHAR},
208 219
       building = #{building,jdbcType=VARCHAR},
209 220
       unit = #{unit,jdbcType=VARCHAR},
210 221
       level = #{level,jdbcType=VARCHAR},

+ 14
- 5
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java 查看文件

@@ -97,6 +97,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
97 97
         Map<String, Object> map = Maps.newHashMap();
98 98
         // 小区Id
99 99
         map.put("community_id", userElement.getCommunityId());
100
+        // 期
101
+        map.put("phase", tpBuildingOwnerInfo.getPhase());
100 102
         // 栋
101 103
         map.put("building", tpBuildingOwnerInfo.getBuilding());
102 104
         // 单元
@@ -360,6 +362,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
360 362
 
361 363
         // 小区
362 364
         map.put("community_id", communityId);
365
+        // 期
366
+        map.put("phase", tpBuildingOwnerInfo.getPhase());
363 367
         // 栋
364 368
         map.put("building", tpBuildingOwnerInfo.getBuilding());
365 369
         // 单元
@@ -373,12 +377,15 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
373 377
         /**
374 378
          * 通过分组来去重
375 379
          *
376
-         * 1. building 为空表示为 building 字段进行分组
377
-         * 2. unit 为空表示为 unit 字段进行分组
378
-         * 3. level 为空表示为 level 字段进行分组
379
-         * 4. room_no 为空表示为 room_no 字段进行分组
380
+         * 1. phase 为空表示为 phase 字段进行分组
381
+         * 2. building 为空表示为 building 字段进行分组
382
+         * 3. unit 为空表示为 unit 字段进行分组
383
+         * 4. level 为空表示为 level 字段进行分组
384
+         * 5. room_no 为空表示为 room_no 字段进行分组
380 385
          */
381
-        if (null == tpBuildingOwnerInfo.getBuilding() || "".equals(tpBuildingOwnerInfo.getBuilding())) {
386
+        if (null == tpBuildingOwnerInfo.getPhase() || "".equals(tpBuildingOwnerInfo.getPhase())) {
387
+            queryWrapper.groupBy("phase");
388
+        } else if (null == tpBuildingOwnerInfo.getBuilding() || "".equals(tpBuildingOwnerInfo.getBuilding())) {
382 389
             queryWrapper.groupBy("building");
383 390
         } else if (null == tpBuildingOwnerInfo.getUnit() || "".equals(tpBuildingOwnerInfo.getUnit())) {
384 391
             queryWrapper.groupBy("unit");
@@ -762,6 +769,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
762 769
         QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
763 770
         // 小区ID
764 771
         queryWrapper.eq("community_id", communityId);
772
+        // 期
773
+        queryWrapper.eq("phase", tpBuildingOwnerInfo.getPhase());
765 774
         // 栋
766 775
         queryWrapper.eq("building", tpBuildingOwnerInfo.getBuilding());
767 776
         // 单元

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java 查看文件

@@ -109,7 +109,7 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
109 109
         String [] contentImgArray = jsonArray.toArray(new String[]{});
110 110
         TpActivity tpActivity = jsonObject.toJavaObject(TpActivity.class);
111 111
 
112
-        if (contentImgArray.length <= 0 && (null == tpActivity.getActivityContent() || "".equals(tpActivity.getActivityContent())) {
112
+        if (contentImgArray.length <= 0 && (null == tpActivity.getActivityContent() || "".equals(tpActivity.getActivityContent()))) {
113 113
             responseBean.addError("活动内容描述 和 活动配图至少要存在一个!");
114 114
             return responseBean;
115 115
         }

+ 4
- 0
VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js 查看文件

@@ -6,6 +6,7 @@ export function buildingAddress(data) {
6 6
     url: '/building/address',
7 7
     method: 'post',
8 8
     data: {
9
+      phase: data.phase,
9 10
       building: data.building,
10 11
       unit: data.unit,
11 12
       level: data.level,
@@ -21,6 +22,7 @@ export function buildingList(data) {
21 22
     url: '/building/list',
22 23
     method: 'post',
23 24
     data: {
25
+      phase: data.phase,
24 26
       building: data.building,
25 27
       unit: data.unit,
26 28
       level: data.level,
@@ -73,6 +75,7 @@ export function addBuilding(data) {
73 75
     url: '/building/add',
74 76
     method: 'post',
75 77
     data: {
78
+      phase: data.phase,
76 79
       building: data.building,
77 80
       unit: data.unit,
78 81
       level: data.level,
@@ -90,6 +93,7 @@ export function updateBuilding(data) {
90 93
     method: 'put',
91 94
     data: {
92 95
       id: data.id,
96
+      phase: data.phase,
93 97
       building: data.building,
94 98
       unit: data.unit,
95 99
       level: data.level,

+ 7
- 0
VUECODE/smart-property-manage/src/views/building/add/index.vue 查看文件

@@ -1,6 +1,9 @@
1 1
 <template>
2 2
   <div class="root">
3 3
     <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="add-ruleForm">
4
+      <el-form-item label="期" prop="phase">
5
+        <el-input v-model="ruleForm.phase"/>
6
+      </el-form-item>
4 7
       <el-form-item label="栋" prop="building">
5 8
         <el-input v-model="ruleForm.building"/>
6 9
       </el-form-item>
@@ -32,6 +35,7 @@ export default {
32 35
   data() {
33 36
     return {
34 37
       ruleForm: {
38
+        phase: '',
35 39
         building: '',
36 40
         unit: '',
37 41
         level: '',
@@ -40,6 +44,9 @@ export default {
40 44
         ownerTel: ''
41 45
       },
42 46
       rules: {
47
+        phase: [
48
+          { required: true, message: '请输入期', trigger: 'blur' }
49
+        ],
43 50
         building: [
44 51
           { required: true, message: '请输入楼栋', trigger: 'blur' }
45 52
         ],

+ 5
- 0
VUECODE/smart-property-manage/src/views/building/edi/index.vue 查看文件

@@ -36,6 +36,7 @@ export default {
36 36
     return {
37 37
       ruleForm: {
38 38
         id: '',
39
+        phase: '',
39 40
         building: '',
40 41
         unit: '',
41 42
         level: '',
@@ -46,6 +47,9 @@ export default {
46 47
       isOwnerTel: false, // 手机号是否可以编辑 true 不可编辑  false 为可编辑
47 48
       listQuery: [], // 查询的参数
48 49
       rules: {
50
+        phase: [
51
+          { required: true, message: '请输入楼栋', trigger: 'blur' }
52
+        ],
49 53
         building: [
50 54
           { required: true, message: '请输入楼栋', trigger: 'blur' }
51 55
         ],
@@ -115,6 +119,7 @@ export default {
115 119
       this.$store.dispatch('GetByIdBuildingId', buildingId).then((res) => {
116 120
         const data = res.data
117 121
         this.ruleForm.id = data.id
122
+        this.ruleForm.phase = data.phase
118 123
         this.ruleForm.building = data.building
119 124
         this.ruleForm.unit = data.unit
120 125
         this.ruleForm.level = data.level

+ 44
- 10
VUECODE/smart-property-manage/src/views/building/index.vue 查看文件

@@ -3,6 +3,14 @@
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)">
7
+          <!--<el-option label="选择楼栋" value="-1" />-->
8
+          <el-option
9
+            v-for="item in phaseList"
10
+            :key="item.id"
11
+            :label="item.phase"
12
+            :value="item.phase"/>
13
+        </el-select>
6 14
         <el-select v-model="listQuery.building" placeholder="栋" @change="buildSelectChange(1)">
7 15
           <!--<el-option label="选择楼栋" value="-1" />-->
8 16
           <el-option
@@ -63,6 +71,7 @@
63 71
       style="width: 100%; margin-top: 20px;"
64 72
       @selection-change="handleSelectionChange">
65 73
       <el-table-column type="selection" width="55" align="center"/>
74
+      <el-table-column prop="phase" label="期" align="center" />
66 75
       <el-table-column prop="building" label="栋" align="center" />
67 76
       <el-table-column prop="unit" label="单元" align="center" />
68 77
       <el-table-column prop="level" label="楼层" align="center" />
@@ -96,6 +105,7 @@ export default {
96 105
   data() {
97 106
     return {
98 107
       listQuery: {
108
+        phase: '',
99 109
         building: '',
100 110
         unit: '',
101 111
         level: '',
@@ -105,11 +115,12 @@ export default {
105 115
         pageSize: 10
106 116
       },
107 117
       total: 0, // 数据总数
108
-      buildingInfoLists: [],
109
-      buildingList: [],
110
-      unitList: [],
111
-      levelList: [],
112
-      roomNoList: [],
118
+      phaseList: [], // 期 集合
119
+      buildingInfoLists: [], // 表格数据集合
120
+      buildingList: [], // seletc 楼栋集合
121
+      unitList: [], // seletc 单元集合
122
+      levelList: [], // seletc 层 集合
123
+      roomNoList: [], //  seletc 户号集合
113 124
       listLoading: true, // 加载圈
114 125
       deleteIds: [] // 需要删除的id集合
115 126
     }
@@ -129,7 +140,10 @@ export default {
129 140
   },
130 141
   mounted() {
131 142
     // 获取栋
132
-    this.getBuild()
143
+    // this.getBuild()
144
+
145
+    // 获取期
146
+    this.getPhase()
133 147
 
134 148
     const query = this.$route.params.listQuery
135 149
     if (query !== undefined) {
@@ -169,12 +183,20 @@ export default {
169 183
         this.deleteIds.push(data[i].id)
170 184
       }
171 185
     },
186
+    getPhase() { // 获取楼栋
187
+      this.listQuery.phase = ''
188
+      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
189
+        this.phaseList = res.data
190
+      }).catch(() => {
191
+        console.log('error phase BuildingAddress')
192
+      })
193
+    },
172 194
     getBuild() { // 获取楼栋
173 195
       this.listQuery.building = ''
174 196
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
175 197
         this.buildingList = res.data
176 198
       }).catch(() => {
177
-        console.log('error BuildingAddress')
199
+        console.log('error building BuildingAddress')
178 200
       })
179 201
     },
180 202
     getUnit() { // 获取单元
@@ -182,7 +204,7 @@ export default {
182 204
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
183 205
         this.unitList = res.data
184 206
       }).catch(() => {
185
-        console.log('error BuildingAddress')
207
+        console.log('error unit BuildingAddress')
186 208
       })
187 209
     },
188 210
     getLevel() { // 获取楼层
@@ -190,7 +212,7 @@ export default {
190 212
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
191 213
         this.levelList = res.data
192 214
       }).catch(() => {
193
-        console.log('error BuildingAddress')
215
+        console.log('error level BuildingAddress')
194 216
       })
195 217
     },
196 218
     getRoomNo() { // 获取户号
@@ -198,11 +220,22 @@ export default {
198 220
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
199 221
         this.roomNoList = res.data
200 222
       }).catch(() => {
201
-        console.log('error BuildingAddress')
223
+        console.log('error roomNo BuildingAddress')
202 224
       })
203 225
     },
204 226
     buildSelectChange(value) { // select 的 change
205 227
       switch (value) {
228
+        case 0: // 查询栋
229
+          this.buildingList = []
230
+          this.unitList = []
231
+          this.levelList = []
232
+          this.roomNoList = []
233
+          this.listQuery.building = ''
234
+          this.listQuery.unit = ''
235
+          this.listQuery.level = ''
236
+          this.listQuery.roomNo = ''
237
+          this.getBuild()
238
+          break
206 239
         case 1: // 查询 单元
207 240
           this.unitList = []
208 241
           this.levelList = []
@@ -245,6 +278,7 @@ export default {
245 278
       })
246 279
     },
247 280
     emptyListQuery() { // 清空按钮
281
+      this.listQuery.phase = ''
248 282
       this.listQuery.building = ''
249 283
       this.listQuery.unit = ''
250 284
       this.listQuery.level = ''