Pārlūkot izejas kodu

房间号单独拉出一张表

傅行帆 6 gadus atpakaļ
vecāks
revīzija
4ff95866ac

+ 18
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpRoomNoMapper.java Parādīt failu

1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpRoomNo;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 户号信息表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-09
14
+ */
15
+@Mapper
16
+public interface TpRoomNoMapper extends BaseMapper<TpRoomNo> {
17
+
18
+}

+ 6
- 10
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Parādīt failu

86
     /**
86
     /**
87
      * 户号
87
      * 户号
88
      */
88
      */
89
-    private String name;
89
+    private String roomNoId;
90
+    
91
+    /**
92
+     * 户号
93
+     */
94
+    private String roomNoName;
90
     
95
     
91
     /**
96
     /**
92
      * 业主姓名
97
      * 业主姓名
132
      * 更新时间
137
      * 更新时间
133
      */
138
      */
134
     private LocalDateTime updateDate;
139
     private LocalDateTime updateDate;
135
-
136
-    /**
137
-     * 户号树信息
138
-     */
139
-    private Integer treeStatus;
140
     
140
     
141
-    /**
142
-     * 1代表的是资料库信息
143
-     */
144
-    private String ownerStatus;
145
     /**
141
     /**
146
      * 身份
142
      * 身份
147
      */
143
      */

+ 93
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpRoomNo.java Parādīt failu

1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 户号信息表
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-04-09
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("tp_room_no")
25
+public class TpRoomNo implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+    
29
+    @TableId(value = "id", type = IdType.AUTO)
30
+    private Integer id;
31
+    
32
+    /**
33
+     * 小区id
34
+     */
35
+    private Integer communityId;
36
+
37
+    /**
38
+     * 期区ID
39
+     */
40
+    private Integer phaseId;
41
+
42
+    /**
43
+     * 期区名称
44
+     */
45
+    private String phaseName;
46
+
47
+    /**
48
+     * 楼栋ID
49
+     */
50
+    private Integer buildingId;
51
+
52
+    /**
53
+     * 楼栋姓名
54
+     */
55
+    private String buildingName;
56
+
57
+    /**
58
+     * 单元ID
59
+     */
60
+    private Integer unitId;
61
+
62
+    /**
63
+     * 单元名称
64
+     */
65
+    private String unitName;
66
+
67
+    /**
68
+     * 楼层ID
69
+     */
70
+    private Integer levelId;
71
+
72
+    /**
73
+     * 楼层名字
74
+     */
75
+    private String levelName;
76
+
77
+    /**
78
+     * 户号
79
+     */
80
+    private String name;
81
+
82
+    /**
83
+     * 排序
84
+     */
85
+    private String sort;
86
+
87
+    /**
88
+     * 创建时间
89
+     */
90
+    private LocalDateTime createDate;
91
+
92
+
93
+}

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java Parādīt failu

653
                 cell = row.createCell(3);
653
                 cell = row.createCell(3);
654
                 cell.setCellValue(buildingOwnerInfo.getLevelName());
654
                 cell.setCellValue(buildingOwnerInfo.getLevelName());
655
                 cell = row.createCell(4);
655
                 cell = row.createCell(4);
656
-                cell.setCellValue(buildingOwnerInfo.getName());
656
+                cell.setCellValue(buildingOwnerInfo.getRoomNoName());
657
                 cell = row.createCell(5);
657
                 cell = row.createCell(5);
658
                 cell.setCellValue(buildingOwnerInfo.getOwnerName());
658
                 cell.setCellValue(buildingOwnerInfo.getOwnerName());
659
                 currentRow ++;
659
                 currentRow ++;

+ 5
- 6
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Parādīt failu

475
         taUserVerify.setLevelId(tpBuildingOwnerInfo.getLevelId());
475
         taUserVerify.setLevelId(tpBuildingOwnerInfo.getLevelId());
476
         taUserVerify.setLevelName(tpBuildingOwnerInfo.getLevelName());
476
         taUserVerify.setLevelName(tpBuildingOwnerInfo.getLevelName());
477
         taUserVerify.setRoomNoId(tpBuildingOwnerInfo.getId());
477
         taUserVerify.setRoomNoId(tpBuildingOwnerInfo.getId());
478
-        taUserVerify.setRoomNoName(tpBuildingOwnerInfo.getName());
478
+        taUserVerify.setRoomNoName(tpBuildingOwnerInfo.getRoomNoName());
479
         taUserVerify.setVerifyStatus("1");
479
         taUserVerify.setVerifyStatus("1");
480
         taUserVerify.setCreateDate(LocalDateTime.now());
480
         taUserVerify.setCreateDate(LocalDateTime.now());
481
         taUserVerify.setVerifyName(userElement.getUserName());
481
         taUserVerify.setVerifyName(userElement.getUserName());
605
                 checkOwnerInfo.setRoleName(ownerRole);
605
                 checkOwnerInfo.setRoleName(ownerRole);
606
                 checkOwnerInfo.setOwnerName(ownerName);
606
                 checkOwnerInfo.setOwnerName(ownerName);
607
                 checkOwnerInfo.setOwnerTel(ownerTel);
607
                 checkOwnerInfo.setOwnerTel(ownerTel);
608
-                checkOwnerInfo.setOwnerStatus("1");
609
                 list.add(checkOwnerInfo);
608
                 list.add(checkOwnerInfo);
610
             }
609
             }
611
         }
610
         }
653
             if (null!=e.getLevelName()&&!"".equals(e.getLevelName())&&isNumeric(e.getLevelName())){
652
             if (null!=e.getLevelName()&&!"".equals(e.getLevelName())&&isNumeric(e.getLevelName())){
654
                 e.setLevelName(e.getLevelName()+"层");
653
                 e.setLevelName(e.getLevelName()+"层");
655
             }
654
             }
656
-            if (null!=e.getName()&&!"".equals(e.getName())&&isNumeric(e.getName())){
657
-                e.setName(e.getName()+"户");
655
+            if (null!=e.getRoomNoName()&&!"".equals(e.getRoomNoName())&&isNumeric(e.getRoomNoName())){
656
+                e.setRoomNoName(e.getRoomNoName()+"户");
658
             }
657
             }
659
             if (null!=e.getPhaseName()&&!"".equals(e.getPhaseName())&&isNumeric(e.getPhaseName())){
658
             if (null!=e.getPhaseName()&&!"".equals(e.getPhaseName())&&isNumeric(e.getPhaseName())){
660
                 e.setPhaseName(e.getPhaseName()+"期");
659
                 e.setPhaseName(e.getPhaseName()+"期");
817
         // 楼层
816
         // 楼层
818
         queryWrapper.eq("level", tpBuildingOwnerInfo.getLevelName());
817
         queryWrapper.eq("level", tpBuildingOwnerInfo.getLevelName());
819
         // 房号
818
         // 房号
820
-        queryWrapper.eq("room_no", tpBuildingOwnerInfo.getName());
819
+        queryWrapper.eq("room_no", tpBuildingOwnerInfo.getRoomNoName());
821
         TpBuildingOwnerInfo selectBuild = tpBuildingOwnerInfoMapper.selectOne(queryWrapper);
820
         TpBuildingOwnerInfo selectBuild = tpBuildingOwnerInfoMapper.selectOne(queryWrapper);
822
 
821
 
823
         return selectBuild;
822
         return selectBuild;
876
                         buildingOwnerInfo.getBuildingName() +
875
                         buildingOwnerInfo.getBuildingName() +
877
                         buildingOwnerInfo.getUnitName() +
876
                         buildingOwnerInfo.getUnitName() +
878
                         buildingOwnerInfo.getLevelName() +
877
                         buildingOwnerInfo.getLevelName() +
879
-                        buildingOwnerInfo.getName();
878
+                        buildingOwnerInfo.getRoleName();
880
 
879
 
881
                 cell = row.createCell(0);
880
                 cell = row.createCell(0);
882
                 cell.setCellValue(address);
881
                 cell.setCellValue(address);

+ 27
- 24
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingTreeServiceImpl.java Parādīt failu

11
 import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
11
 import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
12
 import com.community.huiju.dao.TpLevelMapper;
12
 import com.community.huiju.dao.TpLevelMapper;
13
 import com.community.huiju.dao.TpPhaseMapper;
13
 import com.community.huiju.dao.TpPhaseMapper;
14
+import com.community.huiju.dao.TpRoomNoMapper;
14
 import com.community.huiju.dao.TpUnitMapper;
15
 import com.community.huiju.dao.TpUnitMapper;
15
 import com.community.huiju.model.TaUser;
16
 import com.community.huiju.model.TaUser;
16
 import com.community.huiju.model.TpBuilding;
17
 import com.community.huiju.model.TpBuilding;
17
 import com.community.huiju.model.TpBuildingOwnerInfo;
18
 import com.community.huiju.model.TpBuildingOwnerInfo;
18
 import com.community.huiju.model.TpLevel;
19
 import com.community.huiju.model.TpLevel;
19
 import com.community.huiju.model.TpPhase;
20
 import com.community.huiju.model.TpPhase;
21
+import com.community.huiju.model.TpRoomNo;
20
 import com.community.huiju.model.TpUnit;
22
 import com.community.huiju.model.TpUnit;
21
 import com.community.huiju.service.BuildingTreeServiceI;
23
 import com.community.huiju.service.BuildingTreeServiceI;
22
 import org.apache.ibatis.annotations.Mapper;
24
 import org.apache.ibatis.annotations.Mapper;
58
 	@Autowired
60
 	@Autowired
59
 	private TpLevelMapper tpLevelMapper;
61
 	private TpLevelMapper tpLevelMapper;
60
 	
62
 	
63
+	@Autowired
64
+	private TpRoomNoMapper tpRoomNoMapper;
65
+	
61
 	@Autowired
66
 	@Autowired
62
 	private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
67
 	private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
63
 	
68
 	
145
 				tpBuildingOwnerInfo.setBuildingName(building);
150
 				tpBuildingOwnerInfo.setBuildingName(building);
146
 				tpBuildingOwnerInfo.setUnitName(unit);
151
 				tpBuildingOwnerInfo.setUnitName(unit);
147
 				tpBuildingOwnerInfo.setLevelName(level);
152
 				tpBuildingOwnerInfo.setLevelName(level);
148
-				tpBuildingOwnerInfo.setName(roomNo);
153
+				tpBuildingOwnerInfo.setRoomNoName(roomNo);
149
 				list.add(tpBuildingOwnerInfo);
154
 				list.add(tpBuildingOwnerInfo);
150
 			}
155
 			}
151
 		}
156
 		}
250
 				resultList.add(map);
255
 				resultList.add(map);
251
 			});
256
 			});
252
 		}else if (treeType.equals("roomNo")){
257
 		}else if (treeType.equals("roomNo")){
253
-			QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
258
+			QueryWrapper<TpRoomNo> queryWrapper = new QueryWrapper<>();
254
 			queryWrapper.eq("community_id",communityId);
259
 			queryWrapper.eq("community_id",communityId);
255
 			queryWrapper.eq("level_id",id);
260
 			queryWrapper.eq("level_id",id);
256
 			queryWrapper.orderByAsc("create_date");
261
 			queryWrapper.orderByAsc("create_date");
257
-			List<TpBuildingOwnerInfo> list = tpBuildingOwnerInfoMapper.selectList(queryWrapper);
262
+			List<TpRoomNo> list = tpRoomNoMapper.selectList(queryWrapper);
258
 			list.stream().forEach(e -> {
263
 			list.stream().forEach(e -> {
259
 				Map<String,Object> map = new HashMap<>();
264
 				Map<String,Object> map = new HashMap<>();
260
 				map.put("name",e.getName());
265
 				map.put("name",e.getName());
339
 		 //房间号
344
 		 //房间号
340
 	 	TpLevel selectTpLevel= tpLevelMapper.selectById(id);
345
 	 	TpLevel selectTpLevel= tpLevelMapper.selectById(id);
341
 		if(type.equals("roomNo")){
346
 		if(type.equals("roomNo")){
342
-		 TpBuildingOwnerInfo tpBuildingOwnerInfo= new TpBuildingOwnerInfo();
343
-		tpBuildingOwnerInfo.setCommunityId(selectTpLevel.getCommunityId())
347
+		 TpRoomNo tpRoomNo= new TpRoomNo();
348
+			tpRoomNo.setCommunityId(selectTpLevel.getCommunityId())
344
 							.setPhaseId(selectTpLevel.getPhaseId())
349
 							.setPhaseId(selectTpLevel.getPhaseId())
345
 							.setPhaseName(selectTpLevel.getPhaseName())
350
 							.setPhaseName(selectTpLevel.getPhaseName())
346
 							.setBuildingId(selectTpLevel.getBuildingId())
351
 							.setBuildingId(selectTpLevel.getBuildingId())
350
 							.setLevelId(selectTpLevel.getId())
355
 							.setLevelId(selectTpLevel.getId())
351
 							.setLevelName(selectTpLevel.getName())
356
 							.setLevelName(selectTpLevel.getName())
352
 							.setName(nodeNumber)
357
 							.setName(nodeNumber)
353
-							.setTreeStatus(1)
354
 							.setCreateDate(LocalDateTime.now());
358
 							.setCreateDate(LocalDateTime.now());
355
 
359
 
356
 
360
 
357
-			tpBuildingOwnerInfoMapper.insert(tpBuildingOwnerInfo);
361
+			tpRoomNoMapper.insert(tpRoomNo);
358
 		}
362
 		}
359
 		responseBean.addSuccess("成功");
363
 		responseBean.addSuccess("成功");
360
 		return null;
364
 		return null;
438
 
442
 
439
 			//删除单元-楼层-下的房间
443
 			//删除单元-楼层-下的房间
440
 			TpLevel tpLevelToo= tpLevelMapper.selectById(id);
444
 			TpLevel tpLevelToo= tpLevelMapper.selectById(id);
441
-			QueryWrapper<TpBuildingOwnerInfo> Info = new QueryWrapper<>();
445
+				QueryWrapper<TpRoomNo> Info = new QueryWrapper<>();
442
 			Info.eq("community_id", tpLevelToo.getCommunityId());
446
 			Info.eq("community_id", tpLevelToo.getCommunityId());
443
 			Info.eq("phase_id", tpLevelToo.getPhaseId());
447
 			Info.eq("phase_id", tpLevelToo.getPhaseId());
444
 			Info.eq("building_id",tpLevelToo.getBuildingId());
448
 			Info.eq("building_id",tpLevelToo.getBuildingId());
445
 			Info.eq("unit_id", tpLevelToo.getUnitId());
449
 			Info.eq("unit_id", tpLevelToo.getUnitId());
446
 			Info.eq("level_id", tpLevelToo.getId());
450
 			Info.eq("level_id", tpLevelToo.getId());
447
 			//先删除所有房间
451
 			//先删除所有房间
448
-			tpBuildingOwnerInfoMapper.delete(Info);
452
+			tpRoomNoMapper.delete(Info);
449
 			//再删除所有楼层
453
 			//再删除所有楼层
450
 			tpLevelMapper.delete(tpLevel);
454
 			tpLevelMapper.delete(tpLevel);
451
 			//删除此单元
455
 			//删除此单元
544
 				lastLevelId = tpLevel.getId();
548
 				lastLevelId = tpLevel.getId();
545
 			}
549
 			}
546
 			//插入房间号信息
550
 			//插入房间号信息
547
-			if (!tpBuildingOwnerInfo.getName().equals(lastRoomNoName)){
548
-				TpBuildingOwnerInfo tpBuildingOwnerInfoNew = new TpBuildingOwnerInfo();
549
-				tpBuildingOwnerInfoNew.setCommunityId(communityId);
550
-				tpBuildingOwnerInfoNew.setPhaseId(lastPhaseId);
551
-				tpBuildingOwnerInfoNew.setPhaseName(lastPhaseName);
552
-				tpBuildingOwnerInfoNew.setBuildingId(lastBuildingId);
553
-				tpBuildingOwnerInfoNew.setBuildingName(lastBuildingName);
554
-				tpBuildingOwnerInfoNew.setUnitId(lastUnitId);
555
-				tpBuildingOwnerInfoNew.setUnitName(lastUnitName);
556
-				tpBuildingOwnerInfoNew.setLevelId(lastLevelId);
557
-				tpBuildingOwnerInfoNew.setLevelName(lastLevelName);
558
-				tpBuildingOwnerInfoNew.setName(tpBuildingOwnerInfo.getName());
559
-				tpBuildingOwnerInfoNew.setCreateDate(LocalDateTime.now());
560
-				tpBuildingOwnerInfoNew.setTreeStatus(1);
561
-				tpBuildingOwnerInfoMapper.insert(tpBuildingOwnerInfoNew);
551
+			if (!tpBuildingOwnerInfo.getRoomNoName().equals(lastRoomNoName)){
552
+				TpRoomNo tpRoomNo = new TpRoomNo();
553
+				tpRoomNo.setCommunityId(communityId);
554
+				tpRoomNo.setPhaseId(lastPhaseId);
555
+				tpRoomNo.setPhaseName(lastPhaseName);
556
+				tpRoomNo.setBuildingId(lastBuildingId);
557
+				tpRoomNo.setBuildingName(lastBuildingName);
558
+				tpRoomNo.setUnitId(lastUnitId);
559
+				tpRoomNo.setUnitName(lastUnitName);
560
+				tpRoomNo.setLevelId(lastLevelId);
561
+				tpRoomNo.setLevelName(lastLevelName);
562
+				tpRoomNo.setName(tpBuildingOwnerInfo.getRoomNoName());
563
+				tpRoomNo.setCreateDate(LocalDateTime.now());
564
+				tpRoomNoMapper.insert(tpRoomNo);
562
 			}
565
 			}
563
 		}
566
 		}
564
 	}
567
 	}

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivitySignUpServiceImpl.java Parādīt failu

87
             activitySignUpVO.setPhone(taUser.getLoginName());
87
             activitySignUpVO.setPhone(taUser.getLoginName());
88
             activitySignUpVO.setRoleName(taSysRole.getRoleName());
88
             activitySignUpVO.setRoleName(taSysRole.getRoleName());
89
             activitySignUpVO.setAddress(tpBuildingOwnerInfo.getPhaseName() + tpBuildingOwnerInfo.getBuildingName()
89
             activitySignUpVO.setAddress(tpBuildingOwnerInfo.getPhaseName() + tpBuildingOwnerInfo.getBuildingName()
90
-                    + tpBuildingOwnerInfo.getUnitName() + tpBuildingOwnerInfo.getLevelName() + tpBuildingOwnerInfo.getName());
90
+                    + tpBuildingOwnerInfo.getUnitName() + tpBuildingOwnerInfo.getLevelName() + tpBuildingOwnerInfo.getRoomNoName());
91
 
91
 
92
             return activitySignUpVO;
92
             return activitySignUpVO;
93
         }).collect(Collectors.toList());
93
         }).collect(Collectors.toList());

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpRoomNoMapper.xml Parādīt failu

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpRoomNoMapper">
4
+
5
+</mapper>

+ 1242
- 984
文档/MYSQL/smartCommunity.pdb
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 1238
- 980
文档/MYSQL/smartCommunity.pdm
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu