魏熙美 6 лет назад
Родитель
Сommit
b31c1a87ea
15 измененных файлов: 337 добавлений и 357 удалений
  1. 22
    22
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java
  2. 6
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  3. 6
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserVerifyMapper.java
  4. 0
    11
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java
  5. 5
    12
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  6. 81
    99
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java
  7. 20
    30
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuilding.java
  8. 4
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java
  9. 6
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java
  10. 15
    10
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  11. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java
  12. 5
    5
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  13. 123
    70
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml
  14. 40
    72
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingMapper.xml
  15. 2
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml

+ 22
- 22
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java Просмотреть файл

35
     @ApiOperation(value = "根据 小区/期/楼栋/单元/楼层/户号", notes = "根据 小区/期/楼栋/单元/楼层/户号")
35
     @ApiOperation(value = "根据 小区/期/楼栋/单元/楼层/户号", notes = "根据 小区/期/楼栋/单元/楼层/户号")
36
     @ApiImplicitParams({
36
     @ApiImplicitParams({
37
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "communityId", value = "小区"),
37
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "communityId", value = "小区"),
38
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phase", value = "期"),
39
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "building", value = "楼栋"),
40
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unit", value = "单元"),
41
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "level", value = "楼层"),
42
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNo", value = "户号"),
38
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
39
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
40
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
41
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层"),
42
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
43
     })
43
     })
44
     public ResponseBean selectByAddress(@RequestParam("communityId") Integer communityId,
44
     public ResponseBean selectByAddress(@RequestParam("communityId") Integer communityId,
45
-                                        @RequestParam(value = "phase", required = false) String phase,
46
-                                        @RequestParam(value = "building",required = false) String building,
47
-                                        @RequestParam(value = "unit", required = false) String unit,
48
-                                        @RequestParam(value = "level", required = false) String level,
49
-                                        @RequestParam(value = "roomNo", required = false) String roomNo) {
45
+                                        @RequestParam(value = "phaseId", required = false) Integer phaseId,
46
+                                        @RequestParam(value = "buildingId",required = false) Integer buildingId,
47
+                                        @RequestParam(value = "unitId", required = false) Integer unitId,
48
+                                        @RequestParam(value = "levelId", required = false) Integer levelId,
49
+                                        @RequestParam(value = "roomNoId", required = false) Integer roomNoId) {
50
 
50
 
51
         ResponseBean responseBean = new ResponseBean();
51
         ResponseBean responseBean = new ResponseBean();
52
-        responseBean = iBuildingOwnerInfo.selectBuildList(communityId, phase, building, unit, level, roomNo);
52
+        responseBean = iBuildingOwnerInfo.selectBuildList(communityId, phaseId, buildingId, unitId, levelId, roomNoId);
53
         return responseBean;
53
         return responseBean;
54
 
54
 
55
     }
55
     }
57
     @RequestMapping(value = "/building/has", method = RequestMethod.GET)
57
     @RequestMapping(value = "/building/has", method = RequestMethod.GET)
58
     @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号", notes = "根据 小区、期、楼栋、单元、楼层、户号")
58
     @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号", notes = "根据 小区、期、楼栋、单元、楼层、户号")
59
     @ApiImplicitParams({
59
     @ApiImplicitParams({
60
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phase", value = "期"),
61
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "building", value = "楼栋"),
62
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unit", value = "单元"),
63
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "level", value = "楼层"),
64
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNo", value = "户号"),
60
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
61
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
62
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
63
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层"),
64
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
65
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
65
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
66
     })
66
     })
67
-    public ResponseBean hasBuilding(@RequestParam(value = "phase", required = false) String phase,
68
-                                   @RequestParam(value = "building",required = false) String building,
69
-                                   @RequestParam(value = "unit", required = false) String unit,
70
-                                   @RequestParam(value = "level", required = false) String level,
71
-                                   @RequestParam(value = "roomNo", required = false) String roomNo,
67
+    public ResponseBean hasBuilding(@RequestParam(value = "phaseId", required = false) Integer phaseId,
68
+                                   @RequestParam(value = "buildingId",required = false) Integer buildingId,
69
+                                   @RequestParam(value = "unitId", required = false) Integer unitId,
70
+                                   @RequestParam(value = "levelId", required = false) Integer levelId,
71
+                                   @RequestParam(value = "roomNoId", required = false) Integer roomNoId,
72
                                    HttpSession session){
72
                                    HttpSession session){
73
 
73
 
74
         ResponseBean responseBean = new ResponseBean();
74
         ResponseBean responseBean = new ResponseBean();
75
         UserElement userElement = getUserElement(session);
75
         UserElement userElement = getUserElement(session);
76
-        responseBean = iBuildingOwnerInfo.hasBuild(userElement, phase, building, unit, level, roomNo);
76
+        responseBean = iBuildingOwnerInfo.hasBuild(userElement, phaseId, buildingId, unitId, levelId, roomNoId);
77
         return responseBean;
77
         return responseBean;
78
     }
78
     }
79
 
79
 

+ 6
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Просмотреть файл

45
     /**
45
     /**
46
      * 查询房屋成员列表
46
      * 查询房屋成员列表
47
      * @param communityId
47
      * @param communityId
48
-     * @param phase
49
-     * @param building
50
-     * @param unit
51
-     * @param level
52
-     * @param roomNo
48
+     * @param phaseId
49
+     * @param buildingId
50
+     * @param unitId
51
+     * @param levelId
52
+     * @param roomNoId
53
      * @return
53
      * @return
54
      */
54
      */
55
-    List<TaUser> selectHouseUserList(@Param("communityId") Integer communityId, @Param("phase") String phase, @Param("building") String building, @Param("unit") String unit, @Param("level") String level, @Param("roomNo") String roomNo, @Param("userId") Integer userId);
55
+    List<TaUser> selectHouseUserList(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId, @Param("buildingId") Integer buildingId, @Param("unitId") Integer unitId, @Param("levelId") Integer levelId, @Param("roomNoId") Integer roomNoId, @Param("userId") Integer userId);
56
 
56
 
57
     /**
57
     /**
58
      * 判断当前用户的关联关系
58
      * 判断当前用户的关联关系

+ 6
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserVerifyMapper.java Просмотреть файл

31
     /**
31
     /**
32
      * 根据 用户id、小区id 、 小区、期、栋、单元、楼层、户号 进行条件查询
32
      * 根据 用户id、小区id 、 小区、期、栋、单元、楼层、户号 进行条件查询
33
      * @param communityId
33
      * @param communityId
34
-     * @param phase
35
-     * @param building
36
-     * @param unit
37
-     * @param level
38
-     * @param roomNo
34
+     * @param phaseId
35
+     * @param buildingId
36
+     * @param unitId
37
+     * @param levelId
38
+     * @param roomNoId
39
      * @return
39
      * @return
40
      */
40
      */
41
-    TaUserVerify selectCommunityAndAddress(Integer userId,Integer communityId,String phase,String building, String unit,String level,String roomNo);
41
+    TaUserVerify selectCommunityAndAddress(Integer userId,Integer communityId,Integer phaseId,Integer buildingId, Integer unitId,Integer levelId,Integer roomNoId);
42
 }
42
 }

+ 0
- 11
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java Просмотреть файл

20
 
20
 
21
     int updateByPrimaryKey(TpBuilding record);
21
     int updateByPrimaryKey(TpBuilding record);
22
 
22
 
23
-    /**
24
-     * 根据 小区/期/栋/单元/楼层/户号 进行条件查询
25
-     * @param communityId
26
-     * @param phaseId
27
-     * @param buildingId
28
-     * @param unitId
29
-     * @param levelId
30
-     * @param roomNo
31
-     * @return
32
-     */
33
-    List<TpBuilding> selectByAddress(Integer communityId,Integer phaseId,Integer buildingId, Integer unitId,Integer levelId,String roomNo);
34
 
23
 
35
 
24
 
36
 }
25
 }

+ 5
- 12
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Просмотреть файл

31
     //根据手机号查询当前信息
31
     //根据手机号查询当前信息
32
     TpBuildingOwnerInfo selectOwnerTel(@Param("ownerTel")String ownerTel);
32
     TpBuildingOwnerInfo selectOwnerTel(@Param("ownerTel")String ownerTel);
33
 
33
 
34
-
35
-    /**
36
-     * 查询当前房产所在的小区
37
-     * @return
38
-     */
39
-//    List<TpBuildingOwnerInfo> buildingownerinfoList(@Param("name") String name,@Param("phone") String phone);
40
-
41
     /*
34
     /*
42
      * 根据 小区,期,楼栋,单元,楼层,户号
35
      * 根据 小区,期,楼栋,单元,楼层,户号
43
      * @param communityId
36
      * @param communityId
50
      */
43
      */
51
     @ResultMap("BaseResultMap")
44
     @ResultMap("BaseResultMap")
52
     @Select("select * from tp_building_owner_info where community_id=#{communityId}" +
45
     @Select("select * from tp_building_owner_info where community_id=#{communityId}" +
53
-            " and phase=#{phase} and building=#{building} and unit=#{unit}" +
54
-            " and level=#{level} and room_no=#{roomNo} and verify_status=1")
55
-    TpBuildingOwnerInfo selectCommunityIdAndAddress(@Param("communityId") Integer communityId, @Param("phase") String phase,
56
-                                                    @Param("building") String building, @Param("unit") String unit,
57
-                                                    @Param("level") String level, @Param("roomNo") String roomNo);
46
+            " and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}" +
47
+            " and level_id=#{levelId} and room_no_id=#{roomNoId} and verify_status=1")
48
+    TpBuildingOwnerInfo selectCommunityIdAndAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId,
49
+                                                    @Param("buildingId") Integer building, @Param("unitId") Integer unitId,
50
+                                                    @Param("levelId") Integer level, @Param("roomNoId") Integer roomNoId);
58
 
51
 
59
 }
52
 }

+ 81
- 99
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java Просмотреть файл

11
 
11
 
12
     private Integer roleId;
12
     private Integer roleId;
13
 
13
 
14
-    private String phase;
14
+    private Integer phaseId;
15
 
15
 
16
-    private String building;
16
+    private String phaseName;
17
 
17
 
18
-    private String unit;
18
+    private Integer buildingId;
19
 
19
 
20
-    private String level;
20
+    private String buildingName;
21
 
21
 
22
-    private String roomNo;
22
+    private Integer unitId;
23
 
23
 
24
-    private String verifyStatus;
25
-
26
-    private Date createDate;
24
+    private String unitName;
27
 
25
 
28
-    /**
29
-     * 期
30
-     */
31
-    private  String phaseName;
32
-
33
-    /**
34
-     * 栋
35
-     */
36
-    private  String buildingName;
26
+    private Integer levelId;
37
 
27
 
38
-    /**
39
-     * 单元
40
-     */
41
-    private  String unitName;
28
+    private String levelName;
42
 
29
 
43
-    /**
44
-     * 楼层
45
-     */
46
-    private  String levelName;
30
+    private Integer roomNoId;
47
 
31
 
48
-    /**
49
-     * 房间号
50
-     */
51
-    private  String roomNoName;
32
+    private String roomNoName;
52
 
33
 
53
-    public String getPhaseName() {
54
-        return phaseName;
55
-    }
34
+    private String verifyStatus;
56
 
35
 
57
-    public void setPhaseName(String phaseName) {
58
-        this.phaseName = phaseName;
59
-    }
36
+    private Date createDate;
60
 
37
 
61
-    /**
62
-     * 审核人姓名
63
-     */
64
     private String verifyName;
38
     private String verifyName;
65
 
39
 
66
     //  ------------------
40
     //  ------------------
118
         this.roleId = roleId;
92
         this.roleId = roleId;
119
     }
93
     }
120
 
94
 
121
-    public String getPhase() {
122
-        return phase;
95
+    public Integer getPhaseId() {
96
+        return phaseId;
97
+    }
98
+
99
+    public void setPhaseId(Integer phaseId) {
100
+        this.phaseId = phaseId;
101
+    }
102
+
103
+    public String getPhaseName() {
104
+        return phaseName;
105
+    }
106
+
107
+    public void setPhaseName(String phaseName) {
108
+        this.phaseName = phaseName;
109
+    }
110
+
111
+    public Integer getBuildingId() {
112
+        return buildingId;
113
+    }
114
+
115
+    public void setBuildingId(Integer buildingId) {
116
+        this.buildingId = buildingId;
117
+    }
118
+
119
+    public String getBuildingName() {
120
+        return buildingName;
123
     }
121
     }
124
 
122
 
125
-    public void setPhase(String phase) {
126
-        this.phase = phase == null ? null : phase.trim();
123
+    public void setBuildingName(String buildingName) {
124
+        this.buildingName = buildingName;
125
+    }
126
+
127
+    public Integer getUnitId() {
128
+        return unitId;
129
+    }
130
+
131
+    public void setUnitId(Integer unitId) {
132
+        this.unitId = unitId;
133
+    }
134
+
135
+    public String getUnitName() {
136
+        return unitName;
137
+    }
138
+
139
+    public void setUnitName(String unitName) {
140
+        this.unitName = unitName;
127
     }
141
     }
128
 
142
 
129
-    public String getBuilding() {
130
-        return building;
143
+    public Integer getLevelId() {
144
+        return levelId;
131
     }
145
     }
132
 
146
 
133
-    public void setBuilding(String building) {
134
-        this.building = building == null ? null : building.trim();
147
+    public void setLevelId(Integer levelId) {
148
+        this.levelId = levelId;
135
     }
149
     }
136
 
150
 
137
-    public String getUnit() {
138
-        return unit;
151
+    public String getLevelName() {
152
+        return levelName;
139
     }
153
     }
140
 
154
 
141
-    public void setUnit(String unit) {
142
-        this.unit = unit == null ? null : unit.trim();
155
+    public void setLevelName(String levelName) {
156
+        this.levelName = levelName;
143
     }
157
     }
144
 
158
 
145
-    public String getLevel() {
146
-        return level;
159
+    public Integer getRoomNoId() {
160
+        return roomNoId;
147
     }
161
     }
148
 
162
 
149
-    public void setLevel(String level) {
150
-        this.level = level == null ? null : level.trim();
163
+    public void setRoomNoId(Integer roomNoId) {
164
+        this.roomNoId = roomNoId;
151
     }
165
     }
152
 
166
 
153
-    public String getRoomNo() {
154
-        return roomNo;
167
+    public String getRoomNoName() {
168
+        return roomNoName;
155
     }
169
     }
156
 
170
 
157
-    public void setRoomNo(String roomNo) {
158
-        this.roomNo = roomNo == null ? null : roomNo.trim();
171
+    public void setRoomNoName(String roomNoName) {
172
+        this.roomNoName = roomNoName;
159
     }
173
     }
160
 
174
 
161
     public String getVerifyStatus() {
175
     public String getVerifyStatus() {
163
     }
177
     }
164
 
178
 
165
     public void setVerifyStatus(String verifyStatus) {
179
     public void setVerifyStatus(String verifyStatus) {
166
-        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
180
+        this.verifyStatus = verifyStatus;
167
     }
181
     }
168
 
182
 
169
     public Date getCreateDate() {
183
     public Date getCreateDate() {
174
         this.createDate = createDate;
188
         this.createDate = createDate;
175
     }
189
     }
176
 
190
 
191
+    public String getVerifyName() {
192
+        return verifyName;
193
+    }
194
+
195
+    public void setVerifyName(String verifyName) {
196
+        this.verifyName = verifyName;
197
+    }
198
+
177
     public String getRoleName() {
199
     public String getRoleName() {
178
         return roleName;
200
         return roleName;
179
     }
201
     }
190
         this.ownerName = ownerName;
212
         this.ownerName = ownerName;
191
     }
213
     }
192
 
214
 
193
-    public String getVerifyName() {
194
-        return verifyName;
195
-    }
196
-
197
-    public void setVerifyName(String verifyName) {
198
-        this.verifyName = verifyName;
199
-    }
200
-
201
     public String getCommunityName() {
215
     public String getCommunityName() {
202
         return communityName;
216
         return communityName;
203
     }
217
     }
213
     public void setCommunityAddress(String communityAddress) {
227
     public void setCommunityAddress(String communityAddress) {
214
         this.communityAddress = communityAddress;
228
         this.communityAddress = communityAddress;
215
     }
229
     }
216
-
217
-    public String getBuildingName() {
218
-        return buildingName;
219
-    }
220
-
221
-    public String getUnitName() {
222
-        return unitName;
223
-    }
224
-
225
-    public String getLevelName() {
226
-        return levelName;
227
-    }
228
-
229
-    public String getRoomNoName() {
230
-        return roomNoName;
231
-    }
232
-
233
-    public void setBuildingName(String buildingName) {
234
-        this.buildingName = buildingName;
235
-    }
236
-
237
-    public void setUnitName(String unitName) {
238
-        this.unitName = unitName;
239
-    }
240
-
241
-    public void setLevelName(String levelName) {
242
-        this.levelName = levelName;
243
-    }
244
-
245
-    public void setRoomNoName(String roomNoName) {
246
-        this.roomNoName = roomNoName;
247
-    }
248
 }
230
 }

+ 20
- 30
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuilding.java Просмотреть файл

7
 
7
 
8
     private Integer communityId;
8
     private Integer communityId;
9
 
9
 
10
-    private String phase;
10
+    private Integer phaseId;
11
 
11
 
12
-    private String building;
12
+    private String phaseName;
13
 
13
 
14
-    private String unit;
14
+    private String name;
15
 
15
 
16
-    private String level;
17
-
18
-    private String roomNo;
16
+    private String sort;
19
 
17
 
20
     private Date createDate;
18
     private Date createDate;
21
 
19
 
35
         this.communityId = communityId;
33
         this.communityId = communityId;
36
     }
34
     }
37
 
35
 
38
-    public String getPhase() {
39
-        return phase;
40
-    }
41
-
42
-    public void setPhase(String phase) {
43
-        this.phase = phase == null ? null : phase.trim();
44
-    }
45
-
46
-    public String getBuilding() {
47
-        return building;
36
+    public Integer getPhaseId() {
37
+        return phaseId;
48
     }
38
     }
49
 
39
 
50
-    public void setBuilding(String building) {
51
-        this.building = building == null ? null : building.trim();
40
+    public void setPhaseId(Integer phaseId) {
41
+        this.phaseId = phaseId;
52
     }
42
     }
53
 
43
 
54
-    public String getUnit() {
55
-        return unit;
44
+    public String getPhaseName() {
45
+        return phaseName;
56
     }
46
     }
57
 
47
 
58
-    public void setUnit(String unit) {
59
-        this.unit = unit == null ? null : unit.trim();
48
+    public void setPhaseName(String phaseName) {
49
+        this.phaseName = phaseName;
60
     }
50
     }
61
 
51
 
62
-    public String getLevel() {
63
-        return level;
52
+    public String getName() {
53
+        return name;
64
     }
54
     }
65
 
55
 
66
-    public void setLevel(String level) {
67
-        this.level = level == null ? null : level.trim();
56
+    public void setName(String name) {
57
+        this.name = name;
68
     }
58
     }
69
 
59
 
70
-    public String getRoomNo() {
71
-        return roomNo;
60
+    public String getSort() {
61
+        return sort;
72
     }
62
     }
73
 
63
 
74
-    public void setRoomNo(String roomNo) {
75
-        this.roomNo = roomNo == null ? null : roomNo.trim();
64
+    public void setSort(String sort) {
65
+        this.sort = sort;
76
     }
66
     }
77
 
67
 
78
     public Date getCreateDate() {
68
     public Date getCreateDate() {

+ 4
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java Просмотреть файл

19
      * @param buildingId
19
      * @param buildingId
20
      * @param unitId
20
      * @param unitId
21
      * @param levelId
21
      * @param levelId
22
-     * @param roomNo
22
+     * @param roomNoId
23
      * @return
23
      * @return
24
      */
24
      */
25
-    ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo);
25
+    ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
26
 
26
 
27
     /**
27
     /**
28
      * 根据 小区/期/楼栋/单元/楼层/户号
28
      * 根据 小区/期/楼栋/单元/楼层/户号
30
      * @param buildingId
30
      * @param buildingId
31
      * @param unitId
31
      * @param unitId
32
      * @param levelId
32
      * @param levelId
33
-     * @param roomNo
33
+     * @param roomNoId
34
      * @return
34
      * @return
35
      */
35
      */
36
-    ResponseBean hasBuild(UserElement userElement,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo);
36
+    ResponseBean hasBuild(UserElement userElement,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
37
 
37
 
38
 }
38
 }

+ 6
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java Просмотреть файл

39
     private TaUserVerifyMapper taUserVerifyMapper;
39
     private TaUserVerifyMapper taUserVerifyMapper;
40
 
40
 
41
     @Override
41
     @Override
42
-    public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo) {
42
+    public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
43
         ResponseBean responseBean = new ResponseBean();
43
         ResponseBean responseBean = new ResponseBean();
44
 
44
 
45
-        List<TpBuilding> buildingList = tpBuildingMapper.selectByAddress(communityId, phaseId, buildingId, unitId, levelId, roomNo);
46
-        responseBean.addSuccess(buildingList);
45
+
46
+        responseBean.addSuccess(null);
47
         return responseBean;
47
         return responseBean;
48
     }
48
     }
49
 
49
 
50
     @Override
50
     @Override
51
-    public ResponseBean hasBuild(UserElement userElement,  Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, String roomNo) {
51
+    public ResponseBean hasBuild(UserElement userElement,  Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
52
         ResponseBean responseBean = new ResponseBean();
52
         ResponseBean responseBean = new ResponseBean();
53
         // 1.检验该用户关联有没有这个 户号
53
         // 1.检验该用户关联有没有这个 户号
54
-        TaUserVerify taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNo);
54
+        TaUserVerify taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
55
         if (null != taUserVerify) {
55
         if (null != taUserVerify) {
56
             responseBean.addError("您已关联此房产,无法再次关联!");
56
             responseBean.addError("您已关联此房产,无法再次关联!");
57
             return responseBean;
57
             return responseBean;
61
 
61
 
62
         // TODO 楼栋资料库查询有变动
62
         // TODO 楼栋资料库查询有变动
63
         // 2.检验这个户号是否关联了 户主
63
         // 2.检验这个户号是否关联了 户主
64
-        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), phase, building, unit, level, roomNo);
64
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
65
         if (null != tpBuildingOwnerInfo) {
65
         if (null != tpBuildingOwnerInfo) {
66
             result.put("ownerName",tpBuildingOwnerInfo.getOwnerName());
66
             result.put("ownerName",tpBuildingOwnerInfo.getOwnerName());
67
             result.put("roleName", "OWNER");
67
             result.put("roleName", "OWNER");

+ 15
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Просмотреть файл

338
         // 2. 根据 期、楼栋、单元、楼层、户号、小区id,查询 审核表 得到审核记录
338
         // 2. 根据 期、楼栋、单元、楼层、户号、小区id,查询 审核表 得到审核记录
339
 
339
 
340
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
340
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
341
-        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo(), userElement.getId());
341
+        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getId());
342
 
342
 
343
         responseBean.addSuccess(userList);
343
         responseBean.addSuccess(userList);
344
         return responseBean;
344
         return responseBean;
470
         userVerify.setCommunityId(userElement.getCommunityId());
470
         userVerify.setCommunityId(userElement.getCommunityId());
471
         userVerify.setRoleId(sysRole.getId());
471
         userVerify.setRoleId(sysRole.getId());
472
         userVerify.setUserId(user.getId());
472
         userVerify.setUserId(user.getId());
473
-        userVerify.setPhase(userElementUserVerify.getPhase());
474
-        userVerify.setBuilding(userElementUserVerify.getBuilding());
475
-        userVerify.setUnit(userElementUserVerify.getUnit());
476
-        userVerify.setLevel(userElementUserVerify.getLevel());
477
-        userVerify.setRoomNo(userElementUserVerify.getRoomNo());
473
+        userVerify.setPhaseId(userElementUserVerify.getPhaseId());
474
+        userVerify.setPhaseName(userElementUserVerify.getPhaseName());
475
+        userVerify.setBuildingId(userElementUserVerify.getBuildingId());
476
+        userVerify.setBuildingName(userElementUserVerify.getBuildingName());
477
+        userVerify.setUnitId(userElementUserVerify.getUnitId());
478
+        userVerify.setUnitName(userElementUserVerify.getUnitName());
479
+        userVerify.setLevelId(userElementUserVerify.getLevelId());
480
+        userVerify.setLevelName(userElementUserVerify.getLevelName());
481
+        userVerify.setRoomNoId(userElementUserVerify.getRoomNoId());
482
+        userVerify.setRoomNoName(userElementUserVerify.getRoomNoName());
478
 
483
 
479
         taUserVerifyMapper.insertSelective(userVerify);
484
         taUserVerifyMapper.insertSelective(userVerify);
480
 
485
 
843
 
848
 
844
         // 根据 审核id 查询 出审核的数据,里面有角色id
849
         // 根据 审核id 查询 出审核的数据,里面有角色id
845
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(user.getUserVerifyId());
850
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(user.getUserVerifyId());
846
-        userVO.setAddressBuilding(userVerify.getPhase() + userVerify.getBuilding() + userVerify.getUnit() + userVerify.getLevel() + userVerify.getRoomNo());
851
+        userVO.setAddressBuilding(userVerify.getPhaseName() + userVerify.getBuildingName() + userVerify.getUnitName() + userVerify.getLevelName() + userVerify.getRoomNoName());
847
 
852
 
848
         // 角色
853
         // 角色
849
         TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
854
         TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
865
          */
870
          */
866
 
871
 
867
         // TODO 楼栋资料库查询有变动
872
         // TODO 楼栋资料库查询有变动
868
-        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(user.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo());
873
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(user.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId());
869
 
874
 
870
         if (null != tpBuildingOwnerInfo) {
875
         if (null != tpBuildingOwnerInfo) {
871
             //查询当前人业主或租客的信息
876
             //查询当前人业主或租客的信息
966
             // 设置 userVO 信息
971
             // 设置 userVO 信息
967
             setUserVoProperties(userVerify.getCommunityId(), taUserVO);
972
             setUserVoProperties(userVerify.getCommunityId(), taUserVO);
968
 
973
 
969
-            taUserVO.setAddressBuilding(userVerify.getPhase() + userVerify.getBuilding() + userVerify.getUnit() + userVerify.getLevel() + userVerify.getRoomNo());
974
+            taUserVO.setAddressBuilding(userVerify.getPhaseName() + userVerify.getBuildingName() + userVerify.getUnitName() + userVerify.getLevelName() + userVerify.getRoomNoName());
970
             TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
975
             TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
971
             taUserVO.setRole(taSysRole.getRoleName());
976
             taUserVO.setRole(taSysRole.getRoleName());
972
 
977
 
1002
 
1007
 
1003
         // TODO 楼栋资料库查询有变动
1008
         // TODO 楼栋资料库查询有变动
1004
         // 查询出要被删除的房产的 楼栋资料信息
1009
         // 查询出要被删除的房产的 楼栋资料信息
1005
-        TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo());
1010
+        TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId());
1006
         TaUser currentUser = hasUserPhone(buildingOwnerInfo.getOwnerTel());
1011
         TaUser currentUser = hasUserPhone(buildingOwnerInfo.getOwnerTel());
1007
 
1012
 
1008
         // 如果业主删除房屋成员(也就是删除房产审核),房产的业主id 和 当前登录的业主的id,相等的时候才允许删除(相等才能表示是这个业主的房产)
1013
         // 如果业主删除房屋成员(也就是删除房产审核),房产的业主id 和 当前登录的业主的id,相等的时候才允许删除(相等才能表示是这个业主的房产)

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java Просмотреть файл

52
 
52
 
53
             // TODO 楼栋资料库查询有变动
53
             // TODO 楼栋资料库查询有变动
54
             // 开始查询 业主
54
             // 开始查询 业主
55
-            TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(taUserVerify.getCommunityId(), taUserVerify.getPhase(), taUserVerify.getBuilding(), taUserVerify.getUnit(), taUserVerify.getLevel(), taUserVerify.getRoomNo());
55
+            TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(taUserVerify.getCommunityId(), taUserVerify.getPhaseId(), taUserVerify.getBuildingId(), taUserVerify.getUnitId(), taUserVerify.getLevelId(), taUserVerify.getRoomNoId());
56
             taUserVerify.setOwnerName(tpBuildingOwnerInfo.getOwnerName());
56
             taUserVerify.setOwnerName(tpBuildingOwnerInfo.getOwnerName());
57
         }
57
         }
58
 
58
 
169
             responseBean.addError("该审核不存在!");
169
             responseBean.addError("该审核不存在!");
170
             return responseBean;
170
             return responseBean;
171
         }
171
         }
172
-        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhase(), userVerify.getBuilding(), userVerify.getUnit(), userVerify.getLevel(), userVerify.getRoomNo(), userElement.getId());
172
+        List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getId());
173
         boolean bool = userList.stream().anyMatch(e -> e.getId().intValue() == userVerify.getId().intValue());
173
         boolean bool = userList.stream().anyMatch(e -> e.getId().intValue() == userVerify.getId().intValue());
174
         if (bool) {
174
         if (bool) {
175
             userVerify.setVerifyStatus(userVerifyStatus);
175
             userVerify.setVerifyStatus(userVerifyStatus);

+ 5
- 5
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Просмотреть файл

364
     INNER JOIN ta_sys_role tsr ON tuv.role_id = tsr.id
364
     INNER JOIN ta_sys_role tsr ON tuv.role_id = tsr.id
365
     WHERE
365
     WHERE
366
 	tuv.community_id = #{communityId}
366
 	tuv.community_id = #{communityId}
367
-	AND tuv.phase = #{phase}
368
-	AND tuv.building = #{building}
369
-	AND tuv.unit = #{unit}
370
-	AND tuv.`level` = #{level}
371
-	AND tuv.room_no = #{roomNo}
367
+	AND tuv.phase_id = #{phaseId}
368
+	AND tuv.building_id = #{buildingId}
369
+	AND tuv.unit_id = #{unitId}
370
+	AND tuv.`level_id` = #{levelId}
371
+	AND tuv.room_no_id = #{roomNoId}
372
 	AND tuv.user_id != #{userId}
372
 	AND tuv.user_id != #{userId}
373
   </select>
373
   </select>
374
 
374
 

+ 123
- 70
CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml Просмотреть файл

6
     <result column="user_id" property="userId" jdbcType="INTEGER" />
6
     <result column="user_id" property="userId" jdbcType="INTEGER" />
7
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
8
     <result column="role_id" property="roleId" jdbcType="INTEGER" />
8
     <result column="role_id" property="roleId" jdbcType="INTEGER" />
9
-    <result column="phase" property="phase" jdbcType="VARCHAR" />
10
-    <result column="building" property="building" jdbcType="VARCHAR" />
11
-    <result column="unit" property="unit" jdbcType="VARCHAR" />
12
-    <result column="level" property="level" jdbcType="VARCHAR" />
13
-    <result column="room_no" property="roomNo" jdbcType="VARCHAR" />
9
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
10
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
11
+    <result column="building_id" property="buildingId" jdbcType="INTEGER" />
12
+    <result column="building_name" property="buildingName" jdbcType="VARCHAR" />
13
+    <result column="unit_id" property="unitId" jdbcType="INTEGER" />
14
+    <result column="unit_name" property="unitName" jdbcType="VARCHAR" />
15
+    <result column="level_id" property="levelId" jdbcType="INTEGER" />
16
+    <result column="level_name" property="levelName" jdbcType="VARCHAR" />
17
+    <result column="room_no_id" property="roomNoId" jdbcType="INTEGER" />
18
+    <result column="room_no_name" property="roomNoName" jdbcType="VARCHAR" />
14
     <result column="verify_status" property="verifyStatus" jdbcType="VARCHAR" />
19
     <result column="verify_status" property="verifyStatus" jdbcType="VARCHAR" />
15
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
16
-    <result column="verify_name" property="verifyName"/>
17
-    <result column="phase_name" property="phaseName"/>
18
-    <result column="building_name" property="buildingName"/>
19
-    <result column="unit_name" property="unitName"/>
20
-    <result column="level_name" property="levelName"/>
21
-    <result column="room_no_name" property="roomNoName"/>
21
+    <result column="verify_name" property="verifyName" jdbcType="VARCHAR" />
22
   </resultMap>
22
   </resultMap>
23
   <sql id="Base_Column_List" >
23
   <sql id="Base_Column_List" >
24
-    id, user_id, community_id, role_id, phase, building, unit, level, room_no, verify_status, 
25
-     create_date, verify_name, phase_name, building_name, unit_name, room_no_name,level_name
24
+    id, user_id, community_id, role_id, phase_id, phase_name, building_id, building_name,
25
+    unit_id, unit_name, level_id, level_name, room_no_id, room_no_name, verify_status,
26
+    create_date, verify_name
26
   </sql>
27
   </sql>
27
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
28
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
28
-    select 
29
+    select
29
     <include refid="Base_Column_List" />
30
     <include refid="Base_Column_List" />
30
     from ta_user_verify
31
     from ta_user_verify
31
     where id = #{id,jdbcType=INTEGER}
32
     where id = #{id,jdbcType=INTEGER}
35
     where id = #{id,jdbcType=INTEGER}
36
     where id = #{id,jdbcType=INTEGER}
36
   </delete>
37
   </delete>
37
   <insert id="insert" parameterType="com.community.huiju.model.TaUserVerify" >
38
   <insert id="insert" parameterType="com.community.huiju.model.TaUserVerify" >
38
-    insert into ta_user_verify (id, user_id, community_id, 
39
-      role_id, phase, building, 
40
-      unit, level, room_no, 
41
-      verify_status,
39
+    insert into ta_user_verify (id, user_id, community_id,
40
+      role_id, phase_id, phase_name,
41
+      building_id, building_name, unit_id,
42
+      unit_name, level_id, level_name,
43
+      room_no_id, room_no_name, verify_status,
42
       create_date, verify_name)
44
       create_date, verify_name)
43
-    values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, 
44
-      #{roleId,jdbcType=INTEGER}, #{phase,jdbcType=VARCHAR}, #{building,jdbcType=VARCHAR}, 
45
-      #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{roomNo,jdbcType=VARCHAR}, 
46
-      #{verifyStatus,jdbcType=VARCHAR},
47
-      #{createDate,jdbcType=TIMESTAMP}, #{verifyName})
45
+    values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},
46
+      #{roleId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER}, #{phaseName,jdbcType=VARCHAR},
47
+      #{buildingId,jdbcType=INTEGER}, #{buildingName,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER},
48
+      #{unitName,jdbcType=VARCHAR}, #{levelId,jdbcType=INTEGER}, #{levelName,jdbcType=VARCHAR},
49
+      #{roomNoId,jdbcType=INTEGER}, #{roomNoName,jdbcType=VARCHAR}, #{verifyStatus,jdbcType=VARCHAR},
50
+      #{createDate,jdbcType=TIMESTAMP}, #{verifyName,jdbcType=VARCHAR})
48
   </insert>
51
   </insert>
49
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserVerify" >
52
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserVerify" >
50
     insert into ta_user_verify
53
     insert into ta_user_verify
61
       <if test="roleId != null" >
64
       <if test="roleId != null" >
62
         role_id,
65
         role_id,
63
       </if>
66
       </if>
64
-      <if test="phase != null" >
65
-        phase,
67
+      <if test="phaseId != null" >
68
+        phase_id,
69
+      </if>
70
+      <if test="phaseName != null" >
71
+        phase_name,
72
+      </if>
73
+      <if test="buildingId != null" >
74
+        building_id,
75
+      </if>
76
+      <if test="buildingName != null" >
77
+        building_name,
66
       </if>
78
       </if>
67
-      <if test="building != null" >
68
-        building,
79
+      <if test="unitId != null" >
80
+        unit_id,
69
       </if>
81
       </if>
70
-      <if test="unit != null" >
71
-        unit,
82
+      <if test="unitName != null" >
83
+        unit_name,
72
       </if>
84
       </if>
73
-      <if test="level != null" >
74
-        level,
85
+      <if test="levelId != null" >
86
+        level_id,
75
       </if>
87
       </if>
76
-      <if test="roomNo != null" >
77
-        room_no,
88
+      <if test="levelName != null" >
89
+        level_name,
90
+      </if>
91
+      <if test="roomNoId != null" >
92
+        room_no_id,
93
+      </if>
94
+      <if test="roomNoName != null" >
95
+        room_no_name,
78
       </if>
96
       </if>
79
       <if test="verifyStatus != null" >
97
       <if test="verifyStatus != null" >
80
         verify_status,
98
         verify_status,
82
       <if test="createDate != null" >
100
       <if test="createDate != null" >
83
         create_date,
101
         create_date,
84
       </if>
102
       </if>
85
-      <if test="verifyName != null">
86
-          verify_name,
103
+      <if test="verifyName != null" >
104
+        verify_name,
87
       </if>
105
       </if>
88
     </trim>
106
     </trim>
89
     <trim prefix="values (" suffix=")" suffixOverrides="," >
107
     <trim prefix="values (" suffix=")" suffixOverrides="," >
99
       <if test="roleId != null" >
117
       <if test="roleId != null" >
100
         #{roleId,jdbcType=INTEGER},
118
         #{roleId,jdbcType=INTEGER},
101
       </if>
119
       </if>
102
-      <if test="phase != null" >
103
-        #{phase,jdbcType=VARCHAR},
120
+      <if test="phaseId != null" >
121
+        #{phaseId,jdbcType=INTEGER},
122
+      </if>
123
+      <if test="phaseName != null" >
124
+        #{phaseName,jdbcType=VARCHAR},
125
+      </if>
126
+      <if test="buildingId != null" >
127
+        #{buildingId,jdbcType=INTEGER},
104
       </if>
128
       </if>
105
-      <if test="building != null" >
106
-        #{building,jdbcType=VARCHAR},
129
+      <if test="buildingName != null" >
130
+        #{buildingName,jdbcType=VARCHAR},
107
       </if>
131
       </if>
108
-      <if test="unit != null" >
109
-        #{unit,jdbcType=VARCHAR},
132
+      <if test="unitId != null" >
133
+        #{unitId,jdbcType=INTEGER},
110
       </if>
134
       </if>
111
-      <if test="level != null" >
112
-        #{level,jdbcType=VARCHAR},
135
+      <if test="unitName != null" >
136
+        #{unitName,jdbcType=VARCHAR},
113
       </if>
137
       </if>
114
-      <if test="roomNo != null" >
115
-        #{roomNo,jdbcType=VARCHAR},
138
+      <if test="levelId != null" >
139
+        #{levelId,jdbcType=INTEGER},
140
+      </if>
141
+      <if test="levelName != null" >
142
+        #{levelName,jdbcType=VARCHAR},
143
+      </if>
144
+      <if test="roomNoId != null" >
145
+        #{roomNoId,jdbcType=INTEGER},
146
+      </if>
147
+      <if test="roomNoName != null" >
148
+        #{roomNoName,jdbcType=VARCHAR},
116
       </if>
149
       </if>
117
       <if test="verifyStatus != null" >
150
       <if test="verifyStatus != null" >
118
         #{verifyStatus,jdbcType=VARCHAR},
151
         #{verifyStatus,jdbcType=VARCHAR},
120
       <if test="createDate != null" >
153
       <if test="createDate != null" >
121
         #{createDate,jdbcType=TIMESTAMP},
154
         #{createDate,jdbcType=TIMESTAMP},
122
       </if>
155
       </if>
123
-      <if test="verifyName != null">
124
-          #{verifyName},
156
+      <if test="verifyName != null" >
157
+        #{verifyName,jdbcType=VARCHAR},
125
       </if>
158
       </if>
126
     </trim>
159
     </trim>
127
   </insert>
160
   </insert>
137
       <if test="roleId != null" >
170
       <if test="roleId != null" >
138
         role_id = #{roleId,jdbcType=INTEGER},
171
         role_id = #{roleId,jdbcType=INTEGER},
139
       </if>
172
       </if>
140
-      <if test="phase != null" >
141
-        phase = #{phase,jdbcType=VARCHAR},
173
+      <if test="phaseId != null" >
174
+        phase_id = #{phaseId,jdbcType=INTEGER},
175
+      </if>
176
+      <if test="phaseName != null" >
177
+        phase_name = #{phaseName,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="buildingId != null" >
180
+        building_id = #{buildingId,jdbcType=INTEGER},
181
+      </if>
182
+      <if test="buildingName != null" >
183
+        building_name = #{buildingName,jdbcType=VARCHAR},
184
+      </if>
185
+      <if test="unitId != null" >
186
+        unit_id = #{unitId,jdbcType=INTEGER},
187
+      </if>
188
+      <if test="unitName != null" >
189
+        unit_name = #{unitName,jdbcType=VARCHAR},
142
       </if>
190
       </if>
143
-      <if test="building != null" >
144
-        building = #{building,jdbcType=VARCHAR},
191
+      <if test="levelId != null" >
192
+        level_id = #{levelId,jdbcType=INTEGER},
145
       </if>
193
       </if>
146
-      <if test="unit != null" >
147
-        unit = #{unit,jdbcType=VARCHAR},
194
+      <if test="levelName != null" >
195
+        level_name = #{levelName,jdbcType=VARCHAR},
148
       </if>
196
       </if>
149
-      <if test="level != null" >
150
-        level = #{level,jdbcType=VARCHAR},
197
+      <if test="roomNoId != null" >
198
+        room_no_id = #{roomNoId,jdbcType=INTEGER},
151
       </if>
199
       </if>
152
-      <if test="roomNo != null" >
153
-        room_no = #{roomNo,jdbcType=VARCHAR},
200
+      <if test="roomNoName != null" >
201
+        room_no_name = #{roomNoName,jdbcType=VARCHAR},
154
       </if>
202
       </if>
155
       <if test="verifyStatus != null" >
203
       <if test="verifyStatus != null" >
156
         verify_status = #{verifyStatus,jdbcType=VARCHAR},
204
         verify_status = #{verifyStatus,jdbcType=VARCHAR},
158
       <if test="createDate != null" >
206
       <if test="createDate != null" >
159
         create_date = #{createDate,jdbcType=TIMESTAMP},
207
         create_date = #{createDate,jdbcType=TIMESTAMP},
160
       </if>
208
       </if>
161
-      <if test="verifyName != null">
162
-          verify_name = #{verifyName}
209
+      <if test="verifyName != null" >
210
+        verify_name = #{verifyName,jdbcType=VARCHAR},
163
       </if>
211
       </if>
164
     </set>
212
     </set>
165
     where id = #{id,jdbcType=INTEGER}
213
     where id = #{id,jdbcType=INTEGER}
169
     set user_id = #{userId,jdbcType=INTEGER},
217
     set user_id = #{userId,jdbcType=INTEGER},
170
       community_id = #{communityId,jdbcType=INTEGER},
218
       community_id = #{communityId,jdbcType=INTEGER},
171
       role_id = #{roleId,jdbcType=INTEGER},
219
       role_id = #{roleId,jdbcType=INTEGER},
172
-      phase = #{phase,jdbcType=VARCHAR},
173
-      building = #{building,jdbcType=VARCHAR},
174
-      unit = #{unit,jdbcType=VARCHAR},
175
-      level = #{level,jdbcType=VARCHAR},
176
-      room_no = #{roomNo,jdbcType=VARCHAR},
220
+      phase_id = #{phaseId,jdbcType=INTEGER},
221
+      phase_name = #{phaseName,jdbcType=VARCHAR},
222
+      building_id = #{buildingId,jdbcType=INTEGER},
223
+      building_name = #{buildingName,jdbcType=VARCHAR},
224
+      unit_id = #{unitId,jdbcType=INTEGER},
225
+      unit_name = #{unitName,jdbcType=VARCHAR},
226
+      level_id = #{levelId,jdbcType=INTEGER},
227
+      level_name = #{levelName,jdbcType=VARCHAR},
228
+      room_no_id = #{roomNoId,jdbcType=INTEGER},
229
+      room_no_name = #{roomNoName,jdbcType=VARCHAR},
177
       verify_status = #{verifyStatus,jdbcType=VARCHAR},
230
       verify_status = #{verifyStatus,jdbcType=VARCHAR},
178
       create_date = #{createDate,jdbcType=TIMESTAMP},
231
       create_date = #{createDate,jdbcType=TIMESTAMP},
179
-      verify_name = #{verifyName}
232
+      verify_name = #{verifyName,jdbcType=VARCHAR}
180
     where id = #{id,jdbcType=INTEGER}
233
     where id = #{id,jdbcType=INTEGER}
181
   </update>
234
   </update>
182
   <select id="selectByUserId" resultMap="BaseResultMap" parameterType="integer">
235
   <select id="selectByUserId" resultMap="BaseResultMap" parameterType="integer">
191
     from ta_user_verify
244
     from ta_user_verify
192
     where community_id = #{communityId,jdbcType=INTEGER}
245
     where community_id = #{communityId,jdbcType=INTEGER}
193
     and user_id = #{userId,jdbcType=INTEGER}
246
     and user_id = #{userId,jdbcType=INTEGER}
194
-    and phase = #{phase,jdbcType=VARCHAR}
195
-    and building = #{building,jdbcType=VARCHAR}
196
-    and unit = #{unit,jdbcType=VARCHAR}
197
-    and level = #{level,jdbcType=VARCHAR}
198
-    and room_no = #{roomNo,jdbcType=VARCHAR}
247
+    and phase_id = #{phaseId,jdbcType=INTEGER}
248
+    and building_id = #{buildingId,jdbcType=INTEGER}
249
+    and unit_id = #{unitId,jdbcType=INTEGER}
250
+    and level_id = #{levelId,jdbcType=INTEGER}
251
+    and room_no_id = #{roomNoId,jdbcType=INTEGER}
199
   </select>
252
   </select>
200
 </mapper>
253
 </mapper>

+ 40
- 72
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingMapper.xml Просмотреть файл

4
   <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBuilding" >
4
   <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBuilding" >
5
     <id column="id" property="id" jdbcType="INTEGER" />
5
     <id column="id" property="id" jdbcType="INTEGER" />
6
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
6
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
-    <result column="phase" property="phase" jdbcType="VARCHAR" />
8
-    <result column="building" property="building" jdbcType="VARCHAR" />
9
-    <result column="unit" property="unit" jdbcType="VARCHAR" />
10
-    <result column="level" property="level" jdbcType="VARCHAR" />
11
-    <result column="room_no" property="roomNo" jdbcType="VARCHAR" />
7
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
8
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
9
+    <result column="name" property="name" jdbcType="VARCHAR" />
10
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
12
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
11
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
13
   </resultMap>
12
   </resultMap>
14
   <sql id="Base_Column_List" >
13
   <sql id="Base_Column_List" >
15
-    id, community_id, phase, building, unit, level, room_no, create_date
14
+    id, community_id, phase_id, phase_name, name, sort, create_date
16
   </sql>
15
   </sql>
17
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
16
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
18
-    select 
17
+    select
19
     <include refid="Base_Column_List" />
18
     <include refid="Base_Column_List" />
20
     from tp_building
19
     from tp_building
21
     where id = #{id,jdbcType=INTEGER}
20
     where id = #{id,jdbcType=INTEGER}
25
     where id = #{id,jdbcType=INTEGER}
24
     where id = #{id,jdbcType=INTEGER}
26
   </delete>
25
   </delete>
27
   <insert id="insert" parameterType="com.community.huiju.model.TpBuilding" >
26
   <insert id="insert" parameterType="com.community.huiju.model.TpBuilding" >
28
-    insert into tp_building (id, community_id, phase, 
29
-      building, unit, level, 
30
-      room_no, create_date)
31
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phase,jdbcType=VARCHAR}, 
32
-      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
33
-      #{roomNo,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
27
+    insert into tp_building (id, community_id, phase_id,
28
+      phase_name, name, sort,
29
+      create_date)
30
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER},
31
+      #{phaseName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
32
+      #{createDate,jdbcType=TIMESTAMP})
34
   </insert>
33
   </insert>
35
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuilding" >
34
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuilding" >
36
     insert into tp_building
35
     insert into tp_building
41
       <if test="communityId != null" >
40
       <if test="communityId != null" >
42
         community_id,
41
         community_id,
43
       </if>
42
       </if>
44
-      <if test="phase != null" >
45
-        phase,
46
-      </if>
47
-      <if test="building != null" >
48
-        building,
43
+      <if test="phaseId != null" >
44
+        phase_id,
49
       </if>
45
       </if>
50
-      <if test="unit != null" >
51
-        unit,
46
+      <if test="phaseName != null" >
47
+        phase_name,
52
       </if>
48
       </if>
53
-      <if test="level != null" >
54
-        level,
49
+      <if test="name != null" >
50
+        name,
55
       </if>
51
       </if>
56
-      <if test="roomNo != null" >
57
-        room_no,
52
+      <if test="sort != null" >
53
+        sort,
58
       </if>
54
       </if>
59
       <if test="createDate != null" >
55
       <if test="createDate != null" >
60
         create_date,
56
         create_date,
67
       <if test="communityId != null" >
63
       <if test="communityId != null" >
68
         #{communityId,jdbcType=INTEGER},
64
         #{communityId,jdbcType=INTEGER},
69
       </if>
65
       </if>
70
-      <if test="phase != null" >
71
-        #{phase,jdbcType=VARCHAR},
66
+      <if test="phaseId != null" >
67
+        #{phaseId,jdbcType=INTEGER},
72
       </if>
68
       </if>
73
-      <if test="building != null" >
74
-        #{building,jdbcType=VARCHAR},
69
+      <if test="phaseName != null" >
70
+        #{phaseName,jdbcType=VARCHAR},
75
       </if>
71
       </if>
76
-      <if test="unit != null" >
77
-        #{unit,jdbcType=VARCHAR},
72
+      <if test="name != null" >
73
+        #{name,jdbcType=VARCHAR},
78
       </if>
74
       </if>
79
-      <if test="level != null" >
80
-        #{level,jdbcType=VARCHAR},
81
-      </if>
82
-      <if test="roomNo != null" >
83
-        #{roomNo,jdbcType=VARCHAR},
75
+      <if test="sort != null" >
76
+        #{sort,jdbcType=VARCHAR},
84
       </if>
77
       </if>
85
       <if test="createDate != null" >
78
       <if test="createDate != null" >
86
         #{createDate,jdbcType=TIMESTAMP},
79
         #{createDate,jdbcType=TIMESTAMP},
93
       <if test="communityId != null" >
86
       <if test="communityId != null" >
94
         community_id = #{communityId,jdbcType=INTEGER},
87
         community_id = #{communityId,jdbcType=INTEGER},
95
       </if>
88
       </if>
96
-      <if test="phase != null" >
97
-        phase = #{phase,jdbcType=VARCHAR},
98
-      </if>
99
-      <if test="building != null" >
100
-        building = #{building,jdbcType=VARCHAR},
89
+      <if test="phaseId != null" >
90
+        phase_id = #{phaseId,jdbcType=INTEGER},
101
       </if>
91
       </if>
102
-      <if test="unit != null" >
103
-        unit = #{unit,jdbcType=VARCHAR},
92
+      <if test="phaseName != null" >
93
+        phase_name = #{phaseName,jdbcType=VARCHAR},
104
       </if>
94
       </if>
105
-      <if test="level != null" >
106
-        level = #{level,jdbcType=VARCHAR},
95
+      <if test="name != null" >
96
+        name = #{name,jdbcType=VARCHAR},
107
       </if>
97
       </if>
108
-      <if test="roomNo != null" >
109
-        room_no = #{roomNo,jdbcType=VARCHAR},
98
+      <if test="sort != null" >
99
+        sort = #{sort,jdbcType=VARCHAR},
110
       </if>
100
       </if>
111
       <if test="createDate != null" >
101
       <if test="createDate != null" >
112
         create_date = #{createDate,jdbcType=TIMESTAMP},
102
         create_date = #{createDate,jdbcType=TIMESTAMP},
117
   <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBuilding" >
107
   <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBuilding" >
118
     update tp_building
108
     update tp_building
119
     set community_id = #{communityId,jdbcType=INTEGER},
109
     set community_id = #{communityId,jdbcType=INTEGER},
120
-      phase = #{phase,jdbcType=VARCHAR},
121
-      building = #{building,jdbcType=VARCHAR},
122
-      unit = #{unit,jdbcType=VARCHAR},
123
-      level = #{level,jdbcType=VARCHAR},
124
-      room_no = #{roomNo,jdbcType=VARCHAR},
110
+      phase_id = #{phaseId,jdbcType=INTEGER},
111
+      phase_name = #{phaseName,jdbcType=VARCHAR},
112
+      name = #{name,jdbcType=VARCHAR},
113
+      sort = #{sort,jdbcType=VARCHAR},
125
       create_date = #{createDate,jdbcType=TIMESTAMP}
114
       create_date = #{createDate,jdbcType=TIMESTAMP}
126
     where id = #{id,jdbcType=INTEGER}
115
     where id = #{id,jdbcType=INTEGER}
127
   </update>
116
   </update>
128
-  <select id="selectByAddress" resultMap="BaseResultMap">
129
-    select
130
-    <include refid="Base_Column_List"/>
131
-    from tp_building
132
-    where community_id = #{communityId,jdbcType=INTEGER}
133
-    <if test="phase != null and phase != ''">
134
-      and phase = #{phase,jdbcType=VARCHAR}
135
-    </if>
136
-    <if test="building != null and building != ''">
137
-      and building = #{building,jdbcType=VARCHAR}
138
-    </if>
139
-    <if test="unit != null and unit != ''">
140
-      and unit = #{unit,jdbcType=VARCHAR}
141
-    </if>
142
-    <if test="level != null and level != ''">
143
-      and level = #{level,jdbcType=VARCHAR}
144
-    </if>
145
-    <if test="roomNo != null and roomNo != ''">
146
-      and roomNo = #{room_no,jdbcType=VARCHAR}
147
-    </if>
148
-  </select>
149
 </mapper>
117
 </mapper>

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Просмотреть файл

361
     where community_id = #{communityId,jdbcType=INTEGER} and wnerTel =  owner_tel = #{ownerTel,jdbcType=VARCHAR}
361
     where community_id = #{communityId,jdbcType=INTEGER} and wnerTel =  owner_tel = #{ownerTel,jdbcType=VARCHAR}
362
   </update>
362
   </update>
363
 
363
 
364
-  <select id="selectOwnerTel" resultType="com.community.huiju.model.TpBuildingOwnerInfo" parameterType="string">
364
+  <select id="selectOwnerTel" resultMap="BaseResultMap" parameterType="string">
365
     select
365
     select
366
-    id
366
+    <include refid="Base_Column_List"/>
367
     from
367
     from
368
     tp_building_owner_info
368
     tp_building_owner_info
369
     where  owner_tel = #{ownerTel,jdbcType=VARCHAR}
369
     where  owner_tel = #{ownerTel,jdbcType=VARCHAR}