Browse Source

修复 楼栋下载模板

魏熙美 6 years ago
parent
commit
f02d095b61

+ 12
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java View File

3
 
3
 
4
 import com.community.huiju.model.TpBuilding;
4
 import com.community.huiju.model.TpBuilding;
5
 import org.apache.ibatis.annotations.Mapper;
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
 import java.util.List;
10
 import java.util.List;
8
 
11
 
20
 
23
 
21
     int updateByPrimaryKey(TpBuilding record);
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 View File

2
 
2
 
3
 import com.community.huiju.model.TpPhase;
3
 import com.community.huiju.model.TpPhase;
4
 import org.apache.ibatis.annotations.Mapper;
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
 @Mapper
11
 @Mapper
7
 public interface TpPhaseMapper {
12
 public interface TpPhaseMapper {
16
     int updateByPrimaryKeySelective(TpPhase record);
21
     int updateByPrimaryKeySelective(TpPhase record);
17
 
22
 
18
     int updateByPrimaryKey(TpPhase record);
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 View File

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

+ 30
- 7
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java View File

3
 import com.alibaba.fastjson.JSONObject;
3
 import com.alibaba.fastjson.JSONObject;
4
 import com.community.commom.mode.ResponseBean;
4
 import com.community.commom.mode.ResponseBean;
5
 import com.community.commom.session.UserElement;
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
 import com.community.huiju.service.IBuildingOwnerInfo;
8
 import com.community.huiju.service.IBuildingOwnerInfo;
14
 import com.github.pagehelper.Page;
9
 import com.github.pagehelper.Page;
15
 import com.github.pagehelper.PageHelper;
10
 import com.github.pagehelper.PageHelper;
29
 @Service
24
 @Service
30
 public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
25
 public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
31
 
26
 
27
+    /**
28
+     * 栋
29
+     */
32
     @Autowired
30
     @Autowired
33
     private TpBuildingMapper tpBuildingMapper;
31
     private TpBuildingMapper tpBuildingMapper;
34
 
32
 
33
+    /**
34
+     * 户号 /  楼栋资料库
35
+     */
35
     @Autowired
36
     @Autowired
36
     private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
37
     private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
37
 
38
 
38
     @Autowired
39
     @Autowired
39
     private TaUserVerifyMapper taUserVerifyMapper;
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
     @Override
61
     @Override
42
     public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
62
     public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
43
         ResponseBean responseBean = new ResponseBean();
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
         responseBean.addSuccess(null);
70
         responseBean.addSuccess(null);

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java View File

876
         Long pages = infoIPage.getPages();
876
         Long pages = infoIPage.getPages();
877
 
877
 
878
 
878
 
879
-        // 行数 默认从 第 5 行开始
880
-        int currentRow = 5;
879
+        // 行数 默认从 第 3 行开始
880
+        int currentRow = 3;
881
         // 记录坐标
881
         // 记录坐标
882
         int index = 0;
882
         int index = 0;
883
 
883
 

BIN
CODE/smart-community/property-api/src/main/resources/业主资料库.xlsx View File