|
@@ -200,6 +200,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
200
|
200
|
if (treeType.equals("phase")){
|
201
|
201
|
QueryWrapper<TpPhase> queryWrapper = new QueryWrapper<>();
|
202
|
202
|
queryWrapper.eq("community_id",communityId);
|
|
203
|
+ queryWrapper.orderByAsc("create_date");
|
203
|
204
|
List<TpPhase> list = tpPhaseMapper.selectList(queryWrapper);
|
204
|
205
|
list.stream().forEach(e -> {
|
205
|
206
|
Map<String,Object> map = new HashMap<>();
|
|
@@ -212,6 +213,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
212
|
213
|
QueryWrapper<TpBuilding> queryWrapper = new QueryWrapper<>();
|
213
|
214
|
queryWrapper.eq("community_id",communityId);
|
214
|
215
|
queryWrapper.eq("phase_id",id);
|
|
216
|
+ queryWrapper.orderByAsc("create_date");
|
215
|
217
|
List<TpBuilding> list = tpBuildingMapper.selectList(queryWrapper);
|
216
|
218
|
list.stream().forEach(e -> {
|
217
|
219
|
Map<String,Object> map = new HashMap<>();
|
|
@@ -224,6 +226,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
224
|
226
|
QueryWrapper<TpUnit> queryWrapper = new QueryWrapper<>();
|
225
|
227
|
queryWrapper.eq("community_id",communityId);
|
226
|
228
|
queryWrapper.eq("building_id",id);
|
|
229
|
+ queryWrapper.orderByAsc("create_date");
|
227
|
230
|
List<TpUnit> list = tpUnitMapper.selectList(queryWrapper);
|
228
|
231
|
list.stream().forEach(e -> {
|
229
|
232
|
Map<String,Object> map = new HashMap<>();
|
|
@@ -236,6 +239,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
236
|
239
|
QueryWrapper<TpLevel> queryWrapper = new QueryWrapper<>();
|
237
|
240
|
queryWrapper.eq("community_id",communityId);
|
238
|
241
|
queryWrapper.eq("unit_id",id);
|
|
242
|
+ queryWrapper.orderByAsc("create_date");
|
239
|
243
|
List<TpLevel> list = tpLevelMapper.selectList(queryWrapper);
|
240
|
244
|
list.stream().forEach(e -> {
|
241
|
245
|
Map<String,Object> map = new HashMap<>();
|
|
@@ -248,6 +252,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
248
|
252
|
QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
|
249
|
253
|
queryWrapper.eq("community_id",communityId);
|
250
|
254
|
queryWrapper.eq("level_id",id);
|
|
255
|
+ queryWrapper.orderByAsc("create_date");
|
251
|
256
|
List<TpBuildingOwnerInfo> list = tpBuildingOwnerInfoMapper.selectList(queryWrapper);
|
252
|
257
|
list.stream().forEach(e -> {
|
253
|
258
|
Map<String,Object> map = new HashMap<>();
|
|
@@ -280,6 +285,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
280
|
285
|
TpPhase tpPhase = new TpPhase();
|
281
|
286
|
tpPhase.setName(tpBuildingOwnerInfo.getPhaseName());
|
282
|
287
|
tpPhase.setCommunityId(communityId);
|
|
288
|
+ tpPhase.setCreateDate(LocalDateTime.now());
|
283
|
289
|
tpPhaseMapper.insert(tpPhase);
|
284
|
290
|
//重置Last
|
285
|
291
|
lastPhaseName = tpBuildingOwnerInfo.getPhaseName();
|
|
@@ -296,6 +302,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
296
|
302
|
tpBuilding.setPhaseId(lastPhaseId);
|
297
|
303
|
tpBuilding.setPhaseName(lastPhaseName);
|
298
|
304
|
tpBuilding.setName(tpBuildingOwnerInfo.getBuildingName());
|
|
305
|
+ tpBuilding.setCreateDate(LocalDateTime.now());
|
299
|
306
|
tpBuildingMapper.insert(tpBuilding);
|
300
|
307
|
lastBuildingName = tpBuildingOwnerInfo.getBuildingName();
|
301
|
308
|
lastBuildingId = tpBuilding.getId();
|
|
@@ -309,6 +316,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
309
|
316
|
tpUnit.setBuildingId(lastBuildingId);
|
310
|
317
|
tpUnit.setBuildingName(lastBuildingName);
|
311
|
318
|
tpUnit.setName(tpBuildingOwnerInfo.getUnitName());
|
|
319
|
+ tpUnit.setCreateDate(LocalDateTime.now());
|
312
|
320
|
tpUnitMapper.insert(tpUnit);
|
313
|
321
|
lastUnitName = tpBuildingOwnerInfo.getUnitName();
|
314
|
322
|
lastUnitId = tpUnit.getId();
|
|
@@ -324,6 +332,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
324
|
332
|
tpLevel.setUnitId(lastUnitId);
|
325
|
333
|
tpLevel.setUnitName(lastUnitName);
|
326
|
334
|
tpLevel.setName(tpBuildingOwnerInfo.getLevelName());
|
|
335
|
+ tpLevel.setCreateDate(LocalDateTime.now());
|
327
|
336
|
tpLevelMapper.insert(tpLevel);
|
328
|
337
|
lastLevelName = tpBuildingOwnerInfo.getLevelName();
|
329
|
338
|
lastLevelId = tpLevel.getId();
|
|
@@ -341,6 +350,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
|
341
|
350
|
tpBuildingOwnerInfoNew.setLevelId(lastLevelId);
|
342
|
351
|
tpBuildingOwnerInfoNew.setLevelName(lastLevelName);
|
343
|
352
|
tpBuildingOwnerInfoNew.setName(tpBuildingOwnerInfo.getName());
|
|
353
|
+ tpBuildingOwnerInfoNew.setCreateDate(LocalDateTime.now());
|
344
|
354
|
tpBuildingOwnerInfoMapper.insert(tpBuildingOwnerInfoNew);
|
345
|
355
|
}
|
346
|
356
|
}
|