|
@@ -63,7 +63,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
63
|
63
|
|
64
|
64
|
@Autowired
|
65
|
65
|
private TaBuildingRoomMapper taBuildingRoomMapper;
|
66
|
|
-
|
|
66
|
+
|
67
|
67
|
@Autowired
|
68
|
68
|
private TaBuildingMapper taBuildingMapper;
|
69
|
69
|
|
|
@@ -80,8 +80,6 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
80
|
80
|
/**
|
81
|
81
|
* 分页获取房源列表
|
82
|
82
|
*
|
83
|
|
- * @param pageNum 页码
|
84
|
|
- * @param pageSize 分页大小
|
85
|
83
|
* @param salesBatchId 销售批次ID
|
86
|
84
|
* @param startPrice
|
87
|
85
|
* @param endPrice
|
|
@@ -89,12 +87,14 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
89
|
87
|
* @return
|
90
|
88
|
*/
|
91
|
89
|
@Override
|
92
|
|
- public IPage<TaHousingResourcesPO> listHousingResources(Integer pageNum, Integer pageSize, String salesBatchId, String startPrice, String endPrice, String apartmentId) {
|
93
|
|
- logger.info("listHousingResources 接收参数:pageNum:{},pageSize:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{}",
|
94
|
|
- pageNum, pageSize, salesBatchId, startPrice, endPrice, apartmentId);
|
|
90
|
+ public List<TaHousingResourcesPO> listHousingResources(Integer orgId, String salesBatchId, String startPrice, String endPrice, String apartmentId) {
|
|
91
|
+ logger.info("listHousingResources 接收参数:orgId:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{}",
|
|
92
|
+ orgId, salesBatchId, startPrice, endPrice, apartmentId);
|
|
93
|
+
|
|
94
|
+ List<TaHousingResourcesPO> resourcesPOList =
|
|
95
|
+ taHousingResourcesMapper.listHousingResources(orgId, salesBatchId, startPrice, endPrice, apartmentId);
|
95
|
96
|
|
96
|
|
- IPage<TaHousingResourcesPO> iPage = new Page<>(pageNum, pageSize);
|
97
|
|
- return taHousingResourcesMapper.listHousingResources(iPage, salesBatchId, startPrice, endPrice, apartmentId);
|
|
97
|
+ return resourcesPOList;
|
98
|
98
|
}
|
99
|
99
|
|
100
|
100
|
/**
|
|
@@ -164,7 +164,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
164
|
164
|
List<TaBuildingImg> taBuildingImgList = new ArrayList<>();
|
165
|
165
|
List<TaApartmentImg> buildingImg;
|
166
|
166
|
QueryWrapper<TaBuildingImg> buildingImgQueryWrapper;
|
167
|
|
- QueryWrapper<TaApartmentImg> apartmentImgQueryWrapper = new QueryWrapper<>();
|
|
167
|
+ QueryWrapper<TaApartmentImg> apartmentImgQueryWrapper = new QueryWrapper<>();
|
168
|
168
|
apartmentImgQueryWrapper.eq("apartment_id", resourcesPO.getApartmentId());
|
169
|
169
|
buildingImg = taApartmentImgMapper.selectList(apartmentImgQueryWrapper);
|
170
|
170
|
for (TaApartmentImg apartmentImg : buildingImg) {
|
|
@@ -173,7 +173,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
173
|
173
|
buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
|
174
|
174
|
taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
|
175
|
175
|
}
|
176
|
|
- if(CollectionUtils.isNotEmpty(taBuildingImgList)){
|
|
176
|
+ if (CollectionUtils.isNotEmpty(taBuildingImgList)) {
|
177
|
177
|
resourcesPO.setBuildingImgList(taBuildingImgList);
|
178
|
178
|
}
|
179
|
179
|
|
|
@@ -191,19 +191,19 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
191
|
191
|
StringBuffer result = new StringBuffer();
|
192
|
192
|
//校验期
|
193
|
193
|
String termResult = checckedTerm(taHousingResources);
|
194
|
|
- result.append(termResult.equals("notExist") ? "期名" + taHousingResources.getTermName() + "不存在,会直接新建。" : termResult );
|
|
194
|
+ result.append(termResult.equals("notExist") ? "期名" + taHousingResources.getTermName() + "不存在,会直接新建。" : termResult);
|
195
|
195
|
//校验栋
|
196
|
196
|
String blockResult = checkedBlock(taHousingResources);
|
197
|
|
- result.append(blockResult.equals("notExist") ? "楼栋名" + taHousingResources.getBlockName() + "不存在,会直接新建。" : blockResult );
|
|
197
|
+ result.append(blockResult.equals("notExist") ? "楼栋名" + taHousingResources.getBlockName() + "不存在,会直接新建。" : blockResult);
|
198
|
198
|
//校验单元
|
199
|
199
|
String unitResult = checkedUnit(taHousingResources);
|
200
|
|
- result.append(unitResult.equals("notExist") ? "单元名" + taHousingResources.getUnitName() + "不存在,会直接新建。" : unitResult );
|
|
200
|
+ result.append(unitResult.equals("notExist") ? "单元名" + taHousingResources.getUnitName() + "不存在,会直接新建。" : unitResult);
|
201
|
201
|
//校验楼层
|
202
|
202
|
String floorResult = checkedFloor(taHousingResources);
|
203
|
|
- result.append(floorResult.equals("notExist") ? "楼层名" + taHousingResources.getFloorName() + "不存在,会直接新建。" : floorResult );
|
|
203
|
+ result.append(floorResult.equals("notExist") ? "楼层名" + taHousingResources.getFloorName() + "不存在,会直接新建。" : floorResult);
|
204
|
204
|
//校验房号
|
205
|
205
|
String roomResult = checkedRoom(taHousingResources);
|
206
|
|
- result.append(roomResult.equals("notExist") ? "房号" + taHousingResources.getRoomName() + "不存在,会直接新建。" : roomResult );
|
|
206
|
+ result.append(roomResult.equals("notExist") ? "房号" + taHousingResources.getRoomName() + "不存在,会直接新建。" : roomResult);
|
207
|
207
|
return result;
|
208
|
208
|
}
|
209
|
209
|
|
|
@@ -227,35 +227,35 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
227
|
227
|
String roomResult = checkedRoom(taHousingResources);
|
228
|
228
|
|
229
|
229
|
//创建期
|
230
|
|
- if (!roomResult.equals("notExist")){
|
231
|
|
- return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!",ResponseBean.ERROR_UNAVAILABLE);
|
|
230
|
+ if (!roomResult.equals("notExist")) {
|
|
231
|
+ return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!", ResponseBean.ERROR_UNAVAILABLE);
|
232
|
232
|
}
|
233
|
233
|
|
234
|
234
|
//期不存在就添加
|
235
|
|
- if (termResult.equals("notExist")){
|
|
235
|
+ if (termResult.equals("notExist")) {
|
236
|
236
|
addTerm(taHousingResources);
|
237
|
237
|
}
|
238
|
238
|
|
239
|
239
|
//楼栋不存在就添加
|
240
|
|
- if (blockResult.equals("notExist")){
|
|
240
|
+ if (blockResult.equals("notExist")) {
|
241
|
241
|
addBlock(taHousingResources);
|
242
|
242
|
}
|
243
|
243
|
|
244
|
244
|
//单元不存在就添加
|
245
|
|
- if (unitResult.equals("notExist")){
|
|
245
|
+ if (unitResult.equals("notExist")) {
|
246
|
246
|
addUnit(taHousingResources);
|
247
|
247
|
}
|
248
|
248
|
|
249
|
249
|
//楼层不存在就添加
|
250
|
|
- if (floorResult.equals("notExist")){
|
|
250
|
+ if (floorResult.equals("notExist")) {
|
251
|
251
|
addFloor(taHousingResources);
|
252
|
252
|
}
|
253
|
253
|
|
254
|
254
|
//房间号不存在就添加
|
255
|
|
- if (roomResult.equals("notExist")){
|
|
255
|
+ if (roomResult.equals("notExist")) {
|
256
|
256
|
addRoom(taHousingResources);
|
257
|
257
|
}
|
258
|
|
-
|
|
258
|
+
|
259
|
259
|
// 获取楼盘名称
|
260
|
260
|
TaBuilding taBuilding = taBuildingMapper.selectById(taHousingResources.getBuildingId());
|
261
|
261
|
taHousingResources.setBuildingName(taBuilding.getBuildingName());
|
|
@@ -314,15 +314,15 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
314
|
314
|
taHousingResources.setFloorId(oldTaHousingResources.getFloorId());
|
315
|
315
|
taHousingResources.setRoomId(oldTaHousingResources.getRoomId());
|
316
|
316
|
//只允许编辑房间名
|
317
|
|
- if (!oldTaHousingResources.getRoomName().equals(taHousingResources.getRoomName())){
|
|
317
|
+ if (!oldTaHousingResources.getRoomName().equals(taHousingResources.getRoomName())) {
|
318
|
318
|
//校验房号
|
319
|
319
|
String roomResult = checkedRoom(taHousingResources);
|
320
|
320
|
|
321
|
321
|
//房间号不存在就更新
|
322
|
|
- if (roomResult.equals("notExist")){
|
|
322
|
+ if (roomResult.equals("notExist")) {
|
323
|
323
|
updateRoom(taHousingResources);
|
324
|
|
- }else{
|
325
|
|
- return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!",ResponseBean.ERROR_UNAVAILABLE);
|
|
324
|
+ } else {
|
|
325
|
+ return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!", ResponseBean.ERROR_UNAVAILABLE);
|
326
|
326
|
}
|
327
|
327
|
|
328
|
328
|
}
|
|
@@ -384,32 +384,32 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
384
|
384
|
String heat = row.getCell(6).getStringCellValue().trim();
|
385
|
385
|
Integer status = row.getCell(7).getStringCellValue().trim().equals("是") ? 1 : 0;
|
386
|
386
|
|
387
|
|
- int currentRow = j+1;
|
388
|
|
- if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(termName)){
|
|
387
|
+ int currentRow = j + 1;
|
|
388
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(termName)) {
|
389
|
389
|
responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
|
390
|
390
|
return responseBean;
|
391
|
391
|
}
|
392
|
|
- if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(blockName)){
|
|
392
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(blockName)) {
|
393
|
393
|
responseBean.addError("第" + currentRow + "行" + "楼栋不能为空!");
|
394
|
394
|
return responseBean;
|
395
|
395
|
}
|
396
|
|
- if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(unitName)){
|
|
396
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(unitName)) {
|
397
|
397
|
responseBean.addError("第" + currentRow + "行" + "单元不能为空!");
|
398
|
398
|
return responseBean;
|
399
|
399
|
}
|
400
|
|
- if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(floorName)){
|
|
400
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(floorName)) {
|
401
|
401
|
responseBean.addError("第" + currentRow + "行" + "层不能为空!");
|
402
|
402
|
return responseBean;
|
403
|
403
|
}
|
404
|
|
- if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(roomName)){
|
|
404
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(roomName)) {
|
405
|
405
|
responseBean.addError("第" + currentRow + "行" + "房号不能为空!");
|
406
|
406
|
return responseBean;
|
407
|
407
|
}
|
408
|
408
|
|
409
|
409
|
String houseInfo = termName + blockName + unitName + floorName + roomName;
|
410
|
|
- if (temHousingList.contains(houseInfo)){
|
411
|
|
- logger.info("存在重复房源:{}",houseInfo);
|
412
|
|
- responseBean.addError("第"+ currentRow +"行存在重复房源");
|
|
410
|
+ if (temHousingList.contains(houseInfo)) {
|
|
411
|
+ logger.info("存在重复房源:{}", houseInfo);
|
|
412
|
+ responseBean.addError("第" + currentRow + "行存在重复房源");
|
413
|
413
|
return responseBean;
|
414
|
414
|
}
|
415
|
415
|
|
|
@@ -425,9 +425,9 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
425
|
425
|
}
|
426
|
426
|
}
|
427
|
427
|
//构建分页
|
428
|
|
- Map<String,Object> data = new HashMap<String, Object>();
|
429
|
|
- data.put("list",list);
|
430
|
|
- data.put("total",list.size());
|
|
428
|
+ Map<String, Object> data = new HashMap<String, Object>();
|
|
429
|
+ data.put("list", list);
|
|
430
|
+ data.put("total", list.size());
|
431
|
431
|
|
432
|
432
|
responseBean.addSuccess(data);
|
433
|
433
|
return responseBean;
|
|
@@ -550,15 +550,15 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
550
|
550
|
|
551
|
551
|
//校验房号
|
552
|
552
|
private String checkedRoom(TaHousingResources taHousingResources) {
|
553
|
|
- if (StringUtils.isEmpty(taHousingResources.getRoomName())){
|
|
553
|
+ if (StringUtils.isEmpty(taHousingResources.getRoomName())) {
|
554
|
554
|
return "请输入房号。";
|
555
|
|
- }else{
|
|
555
|
+ } else {
|
556
|
556
|
//查询房号
|
557
|
557
|
TaBuildingRoom taBuildingRoom = selectRoom(taHousingResources);
|
558
|
|
- if (null != taBuildingRoom){
|
|
558
|
+ if (null != taBuildingRoom) {
|
559
|
559
|
taHousingResources.setRoomId(taBuildingRoom.getRoomId());
|
560
|
560
|
return "房间名" + taHousingResources.getRoomName() + "存在。不允许保存,请修改!";
|
561
|
|
- }else{
|
|
561
|
+ } else {
|
562
|
562
|
return "notExist";
|
563
|
563
|
}
|
564
|
564
|
}
|
|
@@ -567,35 +567,35 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
567
|
567
|
//查询房间号
|
568
|
568
|
private TaBuildingRoom selectRoom(TaHousingResources taHousingResources) {
|
569
|
569
|
QueryWrapper<TaBuildingRoom> queryWrapper = new QueryWrapper<>();
|
570
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
571
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
572
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
573
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
574
|
|
- queryWrapper.eq("block_id",taHousingResources.getBlockId());
|
575
|
|
- queryWrapper.eq("unit_id",taHousingResources.getUnitId());
|
576
|
|
- queryWrapper.eq("floor_id",taHousingResources.getFloorId());
|
577
|
|
- queryWrapper.eq("room_name",taHousingResources.getRoomName());
|
|
570
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
571
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
572
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
573
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
574
|
+ queryWrapper.eq("block_id", taHousingResources.getBlockId());
|
|
575
|
+ queryWrapper.eq("unit_id", taHousingResources.getUnitId());
|
|
576
|
+ queryWrapper.eq("floor_id", taHousingResources.getFloorId());
|
|
577
|
+ queryWrapper.eq("room_name", taHousingResources.getRoomName());
|
578
|
578
|
return taBuildingRoomMapper.selectOne(queryWrapper);
|
579
|
579
|
}
|
580
|
580
|
|
581
|
581
|
//校验楼层
|
582
|
582
|
private String checkedFloor(TaHousingResources taHousingResources) {
|
583
|
|
- if (StringUtils.isEmpty(taHousingResources.getFloorName())){
|
|
583
|
+ if (StringUtils.isEmpty(taHousingResources.getFloorName())) {
|
584
|
584
|
return "请输入楼层名。";
|
585
|
|
- }else{
|
|
585
|
+ } else {
|
586
|
586
|
QueryWrapper<TaBuildingFloor> queryWrapper = new QueryWrapper<>();
|
587
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
588
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
589
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
590
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
591
|
|
- queryWrapper.eq("block_id",taHousingResources.getBlockId());
|
592
|
|
- queryWrapper.eq("unit_id",taHousingResources.getUnitId());
|
593
|
|
- queryWrapper.eq("floor_name",taHousingResources.getFloorName());
|
|
587
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
588
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
589
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
590
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
591
|
+ queryWrapper.eq("block_id", taHousingResources.getBlockId());
|
|
592
|
+ queryWrapper.eq("unit_id", taHousingResources.getUnitId());
|
|
593
|
+ queryWrapper.eq("floor_name", taHousingResources.getFloorName());
|
594
|
594
|
TaBuildingFloor taBuildingFloor = taBuildingFloorMapper.selectOne(queryWrapper);
|
595
|
|
- if (null != taBuildingFloor){
|
|
595
|
+ if (null != taBuildingFloor) {
|
596
|
596
|
taHousingResources.setFloorId(taBuildingFloor.getFloorId());
|
597
|
597
|
return "楼层名" + taHousingResources.getFloorName() + "存在。";
|
598
|
|
- }else{
|
|
598
|
+ } else {
|
599
|
599
|
return "notExist";
|
600
|
600
|
}
|
601
|
601
|
}
|
|
@@ -603,21 +603,21 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
603
|
603
|
|
604
|
604
|
//校验单元
|
605
|
605
|
private String checkedUnit(TaHousingResources taHousingResources) {
|
606
|
|
- if (StringUtils.isEmpty(taHousingResources.getUnitName())){
|
|
606
|
+ if (StringUtils.isEmpty(taHousingResources.getUnitName())) {
|
607
|
607
|
return "请输入单元名。";
|
608
|
|
- }else{
|
|
608
|
+ } else {
|
609
|
609
|
QueryWrapper<TaBuildingUnit> queryWrapper = new QueryWrapper<>();
|
610
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
611
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
612
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
613
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
614
|
|
- queryWrapper.eq("block_id",taHousingResources.getBlockId());
|
615
|
|
- queryWrapper.eq("unit_name",taHousingResources.getUnitName());
|
|
610
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
611
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
612
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
613
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
614
|
+ queryWrapper.eq("block_id", taHousingResources.getBlockId());
|
|
615
|
+ queryWrapper.eq("unit_name", taHousingResources.getUnitName());
|
616
|
616
|
TaBuildingUnit taBuildingUnit = taBuildingUnitMapper.selectOne(queryWrapper);
|
617
|
|
- if (null != taBuildingUnit){
|
|
617
|
+ if (null != taBuildingUnit) {
|
618
|
618
|
taHousingResources.setUnitId(taBuildingUnit.getUnitId());
|
619
|
619
|
return "单元名" + taHousingResources.getUnitName() + "存在。";
|
620
|
|
- }else{
|
|
620
|
+ } else {
|
621
|
621
|
return "notExist";
|
622
|
622
|
}
|
623
|
623
|
}
|
|
@@ -625,20 +625,20 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
625
|
625
|
|
626
|
626
|
//校验楼盘
|
627
|
627
|
private String checkedBlock(TaHousingResources taHousingResources) {
|
628
|
|
- if (StringUtils.isEmpty(taHousingResources.getBlockName())){
|
|
628
|
+ if (StringUtils.isEmpty(taHousingResources.getBlockName())) {
|
629
|
629
|
return "请输入楼栋名。";
|
630
|
|
- }else{
|
|
630
|
+ } else {
|
631
|
631
|
QueryWrapper<TaBuildingBlock> queryWrapper = new QueryWrapper<>();
|
632
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
633
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
634
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
635
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
636
|
|
- queryWrapper.eq("block_name",taHousingResources.getBlockName());
|
|
632
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
633
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
634
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
635
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
636
|
+ queryWrapper.eq("block_name", taHousingResources.getBlockName());
|
637
|
637
|
TaBuildingBlock taBuildingBlock = taBuildingBlockMapper.selectOne(queryWrapper);
|
638
|
|
- if (null != taBuildingBlock){
|
|
638
|
+ if (null != taBuildingBlock) {
|
639
|
639
|
taHousingResources.setBlockId(taBuildingBlock.getBlockId());
|
640
|
640
|
return "楼栋名" + taHousingResources.getBlockName() + "存在。";
|
641
|
|
- }else{
|
|
641
|
+ } else {
|
642
|
642
|
return "notExist";
|
643
|
643
|
}
|
644
|
644
|
}
|
|
@@ -646,19 +646,19 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
646
|
646
|
|
647
|
647
|
//校验期
|
648
|
648
|
private String checckedTerm(TaHousingResources taHousingResources) {
|
649
|
|
- if (StringUtils.isEmpty(taHousingResources.getTermName())){
|
|
649
|
+ if (StringUtils.isEmpty(taHousingResources.getTermName())) {
|
650
|
650
|
return "请输入期名。";
|
651
|
|
- }else{
|
|
651
|
+ } else {
|
652
|
652
|
QueryWrapper<TaBuildingTerm> queryWrapper = new QueryWrapper<>();
|
653
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
654
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
655
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
656
|
|
- queryWrapper.eq("term_name",taHousingResources.getTermName());
|
|
653
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
654
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
655
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
656
|
+ queryWrapper.eq("term_name", taHousingResources.getTermName());
|
657
|
657
|
TaBuildingTerm taBuildingTerm = taBuildingTermMapper.selectOne(queryWrapper);
|
658
|
|
- if (null != taBuildingTerm){
|
|
658
|
+ if (null != taBuildingTerm) {
|
659
|
659
|
taHousingResources.setTermId(taBuildingTerm.getTermId());
|
660
|
660
|
return "期名" + taHousingResources.getTermName() + "存在。";
|
661
|
|
- }else{
|
|
661
|
+ } else {
|
662
|
662
|
return "notExist";
|
663
|
663
|
}
|
664
|
664
|
}
|