|
@@ -5,8 +5,10 @@ import com.community.commom.constant.Constant;
|
5
|
5
|
import com.community.commom.mode.ResponseBean;
|
6
|
6
|
import com.community.commom.session.UserElement;
|
7
|
7
|
import com.community.commom.utils.AccountValidatorUtil;
|
|
8
|
+import com.community.huiju.dao.TpPhaseMapper;
|
8
|
9
|
import com.community.huiju.model.TaUser;
|
9
|
10
|
import com.community.huiju.model.TpBuildingOwnerInfo;
|
|
11
|
+import com.community.huiju.model.TpPhase;
|
10
|
12
|
import com.community.huiju.service.BuildingTreeServiceI;
|
11
|
13
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
12
|
14
|
import org.apache.poi.ss.usermodel.Row;
|
|
@@ -15,6 +17,7 @@ import org.apache.poi.ss.usermodel.Workbook;
|
15
|
17
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
16
|
18
|
import org.slf4j.Logger;
|
17
|
19
|
import org.slf4j.LoggerFactory;
|
|
20
|
+import org.springframework.beans.factory.annotation.Autowired;
|
18
|
21
|
import org.springframework.stereotype.Service;
|
19
|
22
|
import org.springframework.web.multipart.MultipartFile;
|
20
|
23
|
|
|
@@ -33,6 +36,8 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
33
|
36
|
|
34
|
37
|
public static final Logger logger = LoggerFactory.getLogger(BuildingOwnerInfoServiceImpl.class);
|
35
|
38
|
|
|
39
|
+ @Autowired
|
|
40
|
+ private TpPhaseMapper tpPhaseMapper;
|
36
|
41
|
/**
|
37
|
42
|
* 获取整个小区的基础数据
|
38
|
43
|
*
|
|
@@ -148,13 +153,20 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
148
|
153
|
Map<String,Object> map = (Map<String, Object>) responseBean.getData();
|
149
|
154
|
List<TpBuildingOwnerInfo> list = (List<TpBuildingOwnerInfo>) map.get("list");
|
150
|
155
|
|
151
|
|
- for (int i = 0; i < list.size(); i++){
|
152
|
|
- //拆分数据
|
153
|
|
- if (i == 0){
|
154
|
|
-
|
155
|
|
- }
|
156
|
|
- }
|
|
156
|
+ //入库
|
|
157
|
+ Integer communityId = userElement.getCommunityId();
|
|
158
|
+
|
|
159
|
+ //保存数据到表中--拆分数据
|
|
160
|
+ String state = saveBuildingTreeData(communityId,list);
|
157
|
161
|
responseBean.addSuccess("success");
|
158
|
162
|
return responseBean;
|
159
|
163
|
}
|
|
164
|
+
|
|
165
|
+ private String saveBuildingTreeData(Integer communityId, List<TpBuildingOwnerInfo> list) {
|
|
166
|
+ String lastPhaseName = "";
|
|
167
|
+ for (int i = 0; i < list.size(); i++){
|
|
168
|
+
|
|
169
|
+ }
|
|
170
|
+ return "";
|
|
171
|
+ }
|
160
|
172
|
}
|