Selaa lähdekoodia

修复 楼栋下载模板

魏熙美 6 vuotta sitten
vanhempi
commit
f02d095b61

+ 12
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java Näytä tiedosto

@@ -3,6 +3,9 @@ package com.community.huiju.dao;
3 3
 
4 4
 import com.community.huiju.model.TpBuilding;
5 5
 import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultMap;
8
+import org.apache.ibatis.annotations.Select;
6 9
 
7 10
 import java.util.List;
8 11
 
@@ -20,6 +23,14 @@ public interface TpBuildingMapper {
20 23
 
21 24
     int updateByPrimaryKey(TpBuilding record);
22 25
 
23
-
26
+    /**
27
+     * 根据小区id,期id
28
+     * @param communityId
29
+     * @param phaseId
30
+     * @return
31
+     */
32
+    @ResultMap("BaseResultMap")
33
+    @Select("select * from tp_building where community_id=#{communityId} and phase_id=#{phaseId}")
34
+    List<TpBuilding> selectByCommunityIdAndPhaseId(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId);
24 35
 
25 36
 }

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpPhaseMapper.java Näytä tiedosto

@@ -2,6 +2,11 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpPhase;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.ResultMap;
7
+import org.apache.ibatis.annotations.Select;
8
+
9
+import java.util.List;
5 10
 
6 11
 @Mapper
7 12
 public interface TpPhaseMapper {
@@ -16,4 +21,13 @@ public interface TpPhaseMapper {
16 21
     int updateByPrimaryKeySelective(TpPhase record);
17 22
 
18 23
     int updateByPrimaryKey(TpPhase record);
24
+
25
+    /**
26
+     * 根据小区查询 期
27
+     * @param communityId
28
+     * @return
29
+     */
30
+    @ResultMap("BaseResultMap")
31
+    @Select("select * from tp_phase where community_id = #{communityId}")
32
+    List<TpPhase> selectByCommunityId(@Param("communityId") Integer communityId);
19 33
 }

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java Näytä tiedosto

@@ -26,6 +26,7 @@ public interface IBuildingOwnerInfo {
26 26
 
27 27
     /**
28 28
      * 根据 小区/期/楼栋/单元/楼层/户号
29
+     * 并校验这个用户,是否绑定了这个房产
29 30
      * @param phaseId
30 31
      * @param buildingId
31 32
      * @param unitId

+ 30
- 7
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java Näytä tiedosto

@@ -3,13 +3,8 @@ package com.community.huiju.service.impl;
3 3
 import com.alibaba.fastjson.JSONObject;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6
-import com.community.huiju.dao.TaUserVerifyMapper;
7
-import com.community.huiju.dao.TpBuildingMapper;
8
-import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
9
-import com.community.huiju.model.TaUserVerify;
10
-import com.community.huiju.model.TpBuilding;
11
-import com.community.huiju.model.TpBuildingOwnerInfo;
12
-import com.community.huiju.model.TpTransaction;
6
+import com.community.huiju.dao.*;
7
+import com.community.huiju.model.*;
13 8
 import com.community.huiju.service.IBuildingOwnerInfo;
14 9
 import com.github.pagehelper.Page;
15 10
 import com.github.pagehelper.PageHelper;
@@ -29,19 +24,47 @@ import java.util.Map;
29 24
 @Service
30 25
 public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
31 26
 
27
+    /**
28
+     * 栋
29
+     */
32 30
     @Autowired
33 31
     private TpBuildingMapper tpBuildingMapper;
34 32
 
33
+    /**
34
+     * 户号 /  楼栋资料库
35
+     */
35 36
     @Autowired
36 37
     private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
37 38
 
38 39
     @Autowired
39 40
     private TaUserVerifyMapper taUserVerifyMapper;
40 41
 
42
+    /**
43
+     * 期
44
+     */
45
+    @Autowired
46
+    private TpPhaseMapper tpPhaseMapper;
47
+
48
+    /**
49
+     * 单元
50
+     */
51
+    @Autowired
52
+    private TpUnitMapper tpUnitMapper;
53
+
54
+    /**
55
+     * 楼层
56
+     */
57
+    @Autowired
58
+    private TpLevelMapper tpLevelMapper;
59
+
60
+
41 61
     @Override
42 62
     public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
43 63
         ResponseBean responseBean = new ResponseBean();
44 64
 
65
+        // 查询 期 -> 栋 -> 单元 -> 楼层 -> 户号
66
+        List<TpPhase> phaseList = tpPhaseMapper.selectByCommunityId(communityId);
67
+        List<TpBuilding> buildingList = tpBuildingMapper.selectByCommunityIdAndPhaseId(communityId, phaseId);
45 68
 
46 69
 
47 70
         responseBean.addSuccess(null);

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Näytä tiedosto

@@ -876,8 +876,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
876 876
         Long pages = infoIPage.getPages();
877 877
 
878 878
 
879
-        // 行数 默认从 第 5 行开始
880
-        int currentRow = 5;
879
+        // 行数 默认从 第 3 行开始
880
+        int currentRow = 3;
881 881
         // 记录坐标
882 882
         int index = 0;
883 883
 

BIN
CODE/smart-community/property-api/src/main/resources/业主资料库.xlsx Näytä tiedosto