|
@@ -66,7 +66,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
66
|
66
|
|
67
|
67
|
@Autowired
|
68
|
68
|
private TaBuildingRoomMapper taBuildingRoomMapper;
|
69
|
|
-
|
|
69
|
+
|
70
|
70
|
@Autowired
|
71
|
71
|
private TaBuildingMapper taBuildingMapper;
|
72
|
72
|
|
|
@@ -83,8 +83,6 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
83
|
83
|
/**
|
84
|
84
|
* 分页获取房源列表
|
85
|
85
|
*
|
86
|
|
- * @param pageNum 页码
|
87
|
|
- * @param pageSize 分页大小
|
88
|
86
|
* @param salesBatchId 销售批次ID
|
89
|
87
|
* @param startPrice
|
90
|
88
|
* @param endPrice
|
|
@@ -92,12 +90,14 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
92
|
90
|
* @return
|
93
|
91
|
*/
|
94
|
92
|
@Override
|
95
|
|
- public IPage<TaHousingResourcesPO> listHousingResources(Integer pageNum, Integer pageSize, String salesBatchId, String startPrice, String endPrice, String apartmentId) {
|
96
|
|
- logger.info("listHousingResources 接收参数:pageNum:{},pageSize:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{}",
|
97
|
|
- pageNum, pageSize, salesBatchId, startPrice, endPrice, apartmentId);
|
|
93
|
+ public List<TaHousingResourcesPO> listHousingResources(Integer orgId, String salesBatchId, String startPrice, String endPrice, String apartmentId) {
|
|
94
|
+ logger.info("listHousingResources 接收参数:orgId:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{}",
|
|
95
|
+ orgId, salesBatchId, startPrice, endPrice, apartmentId);
|
|
96
|
+
|
|
97
|
+ List<TaHousingResourcesPO> resourcesPOList =
|
|
98
|
+ taHousingResourcesMapper.listHousingResources(orgId, salesBatchId, startPrice, endPrice, apartmentId);
|
98
|
99
|
|
99
|
|
- IPage<TaHousingResourcesPO> iPage = new Page<>(pageNum, pageSize);
|
100
|
|
- return taHousingResourcesMapper.listHousingResources(iPage, salesBatchId, startPrice, endPrice, apartmentId);
|
|
100
|
+ return resourcesPOList;
|
101
|
101
|
}
|
102
|
102
|
|
103
|
103
|
/**
|
|
@@ -167,7 +167,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
167
|
167
|
List<TaBuildingImg> taBuildingImgList = new ArrayList<>();
|
168
|
168
|
List<TaApartmentImg> buildingImg;
|
169
|
169
|
QueryWrapper<TaBuildingImg> buildingImgQueryWrapper;
|
170
|
|
- QueryWrapper<TaApartmentImg> apartmentImgQueryWrapper = new QueryWrapper<>();
|
|
170
|
+ QueryWrapper<TaApartmentImg> apartmentImgQueryWrapper = new QueryWrapper<>();
|
171
|
171
|
apartmentImgQueryWrapper.eq("apartment_id", resourcesPO.getApartmentId());
|
172
|
172
|
buildingImg = taApartmentImgMapper.selectList(apartmentImgQueryWrapper);
|
173
|
173
|
for (TaApartmentImg apartmentImg : buildingImg) {
|
|
@@ -176,7 +176,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
176
|
176
|
buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
|
177
|
177
|
taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
|
178
|
178
|
}
|
179
|
|
- if(CollectionUtils.isNotEmpty(taBuildingImgList)){
|
|
179
|
+ if (CollectionUtils.isNotEmpty(taBuildingImgList)) {
|
180
|
180
|
resourcesPO.setBuildingImgList(taBuildingImgList);
|
181
|
181
|
}
|
182
|
182
|
|
|
@@ -194,19 +194,19 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
194
|
194
|
StringBuffer result = new StringBuffer();
|
195
|
195
|
//校验期
|
196
|
196
|
String termResult = checckedTerm(taHousingResources);
|
197
|
|
- result.append(termResult.equals("notExist") ? "期名" + taHousingResources.getTermName() + "不存在,会直接新建。" : termResult );
|
|
197
|
+ result.append(termResult.equals("notExist") ? "期名" + taHousingResources.getTermName() + "不存在,会直接新建。" : termResult);
|
198
|
198
|
//校验栋
|
199
|
199
|
String blockResult = checkedBlock(taHousingResources);
|
200
|
|
- result.append(blockResult.equals("notExist") ? "楼栋名" + taHousingResources.getBlockName() + "不存在,会直接新建。" : blockResult );
|
|
200
|
+ result.append(blockResult.equals("notExist") ? "楼栋名" + taHousingResources.getBlockName() + "不存在,会直接新建。" : blockResult);
|
201
|
201
|
//校验单元
|
202
|
202
|
String unitResult = checkedUnit(taHousingResources);
|
203
|
|
- result.append(unitResult.equals("notExist") ? "单元名" + taHousingResources.getUnitName() + "不存在,会直接新建。" : unitResult );
|
|
203
|
+ result.append(unitResult.equals("notExist") ? "单元名" + taHousingResources.getUnitName() + "不存在,会直接新建。" : unitResult);
|
204
|
204
|
//校验楼层
|
205
|
205
|
String floorResult = checkedFloor(taHousingResources);
|
206
|
|
- result.append(floorResult.equals("notExist") ? "楼层名" + taHousingResources.getFloorName() + "不存在,会直接新建。" : floorResult );
|
|
206
|
+ result.append(floorResult.equals("notExist") ? "楼层名" + taHousingResources.getFloorName() + "不存在,会直接新建。" : floorResult);
|
207
|
207
|
//校验房号
|
208
|
208
|
String roomResult = checkedRoom(taHousingResources);
|
209
|
|
- result.append(roomResult.equals("notExist") ? "房号" + taHousingResources.getRoomName() + "不存在,会直接新建。" : roomResult );
|
|
209
|
+ result.append(roomResult.equals("notExist") ? "房号" + taHousingResources.getRoomName() + "不存在,会直接新建。" : roomResult);
|
210
|
210
|
return result;
|
211
|
211
|
}
|
212
|
212
|
|
|
@@ -230,35 +230,35 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
230
|
230
|
String roomResult = checkedRoom(taHousingResources);
|
231
|
231
|
|
232
|
232
|
//创建期
|
233
|
|
- if (!roomResult.equals("notExist")){
|
234
|
|
- return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!",ResponseBean.ERROR_UNAVAILABLE);
|
|
233
|
+ if (!roomResult.equals("notExist")) {
|
|
234
|
+ return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!", ResponseBean.ERROR_UNAVAILABLE);
|
235
|
235
|
}
|
236
|
236
|
|
237
|
237
|
//期不存在就添加
|
238
|
|
- if (termResult.equals("notExist")){
|
|
238
|
+ if (termResult.equals("notExist")) {
|
239
|
239
|
addTerm(taHousingResources);
|
240
|
240
|
}
|
241
|
241
|
|
242
|
242
|
//楼栋不存在就添加
|
243
|
|
- if (blockResult.equals("notExist")){
|
|
243
|
+ if (blockResult.equals("notExist")) {
|
244
|
244
|
addBlock(taHousingResources);
|
245
|
245
|
}
|
246
|
246
|
|
247
|
247
|
//单元不存在就添加
|
248
|
|
- if (unitResult.equals("notExist")){
|
|
248
|
+ if (unitResult.equals("notExist")) {
|
249
|
249
|
addUnit(taHousingResources);
|
250
|
250
|
}
|
251
|
251
|
|
252
|
252
|
//楼层不存在就添加
|
253
|
|
- if (floorResult.equals("notExist")){
|
|
253
|
+ if (floorResult.equals("notExist")) {
|
254
|
254
|
addFloor(taHousingResources);
|
255
|
255
|
}
|
256
|
256
|
|
257
|
257
|
//房间号不存在就添加
|
258
|
|
- if (roomResult.equals("notExist")){
|
|
258
|
+ if (roomResult.equals("notExist")) {
|
259
|
259
|
addRoom(taHousingResources);
|
260
|
260
|
}
|
261
|
|
-
|
|
261
|
+
|
262
|
262
|
// 获取楼盘名称
|
263
|
263
|
TaBuilding taBuilding = taBuildingMapper.selectById(taHousingResources.getBuildingId());
|
264
|
264
|
taHousingResources.setBuildingName(taBuilding.getBuildingName());
|
|
@@ -317,15 +317,15 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
317
|
317
|
taHousingResources.setFloorId(oldTaHousingResources.getFloorId());
|
318
|
318
|
taHousingResources.setRoomId(oldTaHousingResources.getRoomId());
|
319
|
319
|
//只允许编辑房间名
|
320
|
|
- if (!oldTaHousingResources.getRoomName().equals(taHousingResources.getRoomName())){
|
|
320
|
+ if (!oldTaHousingResources.getRoomName().equals(taHousingResources.getRoomName())) {
|
321
|
321
|
//校验房号
|
322
|
322
|
String roomResult = checkedRoom(taHousingResources);
|
323
|
323
|
|
324
|
324
|
//房间号不存在就更新
|
325
|
|
- if (roomResult.equals("notExist")){
|
|
325
|
+ if (roomResult.equals("notExist")) {
|
326
|
326
|
updateRoom(taHousingResources);
|
327
|
|
- }else{
|
328
|
|
- return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!",ResponseBean.ERROR_UNAVAILABLE);
|
|
327
|
+ } else {
|
|
328
|
+ return ResponseBean.error("房间名" + taHousingResources.getRoomName() + "存在。请修改房间名!", ResponseBean.ERROR_UNAVAILABLE);
|
329
|
329
|
}
|
330
|
330
|
|
331
|
331
|
}
|
|
@@ -390,32 +390,32 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
390
|
390
|
Integer heat = Integer.valueOf(String.valueOf(row.getCell(6).getNumericCellValue()).substring(0,1));
|
391
|
391
|
Integer status = row.getCell(7).getStringCellValue().trim().equals("是") ? 1 : 0;
|
392
|
392
|
|
393
|
|
- int currentRow = j+1;
|
394
|
|
- if (StringUtils.isEmpty(termName)){
|
|
393
|
+ int currentRow = j + 1;
|
|
394
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(termName)) {
|
395
|
395
|
responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
|
396
|
396
|
return responseBean;
|
397
|
397
|
}
|
398
|
|
- if (StringUtils.isEmpty(blockName)){
|
|
398
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(blockName)) {
|
399
|
399
|
responseBean.addError("第" + currentRow + "行" + "楼栋不能为空!");
|
400
|
400
|
return responseBean;
|
401
|
401
|
}
|
402
|
|
- if (StringUtils.isEmpty(unitName)){
|
|
402
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(unitName)) {
|
403
|
403
|
responseBean.addError("第" + currentRow + "行" + "单元不能为空!");
|
404
|
404
|
return responseBean;
|
405
|
405
|
}
|
406
|
|
- if (StringUtils.isEmpty(floorName)){
|
|
406
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(floorName)) {
|
407
|
407
|
responseBean.addError("第" + currentRow + "行" + "层不能为空!");
|
408
|
408
|
return responseBean;
|
409
|
409
|
}
|
410
|
|
- if (StringUtils.isEmpty(roomName)){
|
|
410
|
+ if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(roomName)) {
|
411
|
411
|
responseBean.addError("第" + currentRow + "行" + "房号不能为空!");
|
412
|
412
|
return responseBean;
|
413
|
413
|
}
|
414
|
414
|
|
415
|
415
|
String houseInfo = termName + blockName + unitName + floorName + roomName;
|
416
|
|
- if (temHousingList.contains(houseInfo)){
|
417
|
|
- logger.info("存在重复房源:{}",houseInfo);
|
418
|
|
- responseBean.addError("第"+ currentRow +"行存在重复房源");
|
|
416
|
+ if (temHousingList.contains(houseInfo)) {
|
|
417
|
+ logger.info("存在重复房源:{}", houseInfo);
|
|
418
|
+ responseBean.addError("第" + currentRow + "行存在重复房源");
|
419
|
419
|
return responseBean;
|
420
|
420
|
}
|
421
|
421
|
|
|
@@ -451,9 +451,9 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
451
|
451
|
}
|
452
|
452
|
}
|
453
|
453
|
//构建分页
|
454
|
|
- Map<String,Object> data = new HashMap<String, Object>();
|
455
|
|
- data.put("list",list);
|
456
|
|
- data.put("total",list.size());
|
|
454
|
+ Map<String, Object> data = new HashMap<String, Object>();
|
|
455
|
+ data.put("list", list);
|
|
456
|
+ data.put("total", list.size());
|
457
|
457
|
|
458
|
458
|
responseBean.addSuccess(data);
|
459
|
459
|
return responseBean;
|
|
@@ -605,15 +605,15 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
605
|
605
|
|
606
|
606
|
//校验房号
|
607
|
607
|
private String checkedRoom(TaHousingResources taHousingResources) {
|
608
|
|
- if (StringUtils.isEmpty(taHousingResources.getRoomName())){
|
|
608
|
+ if (StringUtils.isEmpty(taHousingResources.getRoomName())) {
|
609
|
609
|
return "请输入房号。";
|
610
|
|
- }else{
|
|
610
|
+ } else {
|
611
|
611
|
//查询房号
|
612
|
612
|
TaBuildingRoom taBuildingRoom = selectRoom(taHousingResources);
|
613
|
|
- if (null != taBuildingRoom){
|
|
613
|
+ if (null != taBuildingRoom) {
|
614
|
614
|
taHousingResources.setRoomId(taBuildingRoom.getRoomId());
|
615
|
615
|
return "房间名" + taHousingResources.getRoomName() + "存在。不允许保存,请修改!";
|
616
|
|
- }else{
|
|
616
|
+ } else {
|
617
|
617
|
return "notExist";
|
618
|
618
|
}
|
619
|
619
|
}
|
|
@@ -622,35 +622,35 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
622
|
622
|
//查询房间号
|
623
|
623
|
private TaBuildingRoom selectRoom(TaHousingResources taHousingResources) {
|
624
|
624
|
QueryWrapper<TaBuildingRoom> queryWrapper = new QueryWrapper<>();
|
625
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
626
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
627
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
628
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
629
|
|
- queryWrapper.eq("block_id",taHousingResources.getBlockId());
|
630
|
|
- queryWrapper.eq("unit_id",taHousingResources.getUnitId());
|
631
|
|
- queryWrapper.eq("floor_id",taHousingResources.getFloorId());
|
632
|
|
- queryWrapper.eq("room_name",taHousingResources.getRoomName());
|
|
625
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
626
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
627
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
628
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
629
|
+ queryWrapper.eq("block_id", taHousingResources.getBlockId());
|
|
630
|
+ queryWrapper.eq("unit_id", taHousingResources.getUnitId());
|
|
631
|
+ queryWrapper.eq("floor_id", taHousingResources.getFloorId());
|
|
632
|
+ queryWrapper.eq("room_name", taHousingResources.getRoomName());
|
633
|
633
|
return taBuildingRoomMapper.selectOne(queryWrapper);
|
634
|
634
|
}
|
635
|
635
|
|
636
|
636
|
//校验楼层
|
637
|
637
|
private String checkedFloor(TaHousingResources taHousingResources) {
|
638
|
|
- if (StringUtils.isEmpty(taHousingResources.getFloorName())){
|
|
638
|
+ if (StringUtils.isEmpty(taHousingResources.getFloorName())) {
|
639
|
639
|
return "请输入楼层名。";
|
640
|
|
- }else{
|
|
640
|
+ } else {
|
641
|
641
|
QueryWrapper<TaBuildingFloor> queryWrapper = new QueryWrapper<>();
|
642
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
643
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
644
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
645
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
646
|
|
- queryWrapper.eq("block_id",taHousingResources.getBlockId());
|
647
|
|
- queryWrapper.eq("unit_id",taHousingResources.getUnitId());
|
648
|
|
- queryWrapper.eq("floor_name",taHousingResources.getFloorName());
|
|
642
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
643
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
644
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
645
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
646
|
+ queryWrapper.eq("block_id", taHousingResources.getBlockId());
|
|
647
|
+ queryWrapper.eq("unit_id", taHousingResources.getUnitId());
|
|
648
|
+ queryWrapper.eq("floor_name", taHousingResources.getFloorName());
|
649
|
649
|
TaBuildingFloor taBuildingFloor = taBuildingFloorMapper.selectOne(queryWrapper);
|
650
|
|
- if (null != taBuildingFloor){
|
|
650
|
+ if (null != taBuildingFloor) {
|
651
|
651
|
taHousingResources.setFloorId(taBuildingFloor.getFloorId());
|
652
|
652
|
return "楼层名" + taHousingResources.getFloorName() + "存在。";
|
653
|
|
- }else{
|
|
653
|
+ } else {
|
654
|
654
|
return "notExist";
|
655
|
655
|
}
|
656
|
656
|
}
|
|
@@ -658,21 +658,21 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
658
|
658
|
|
659
|
659
|
//校验单元
|
660
|
660
|
private String checkedUnit(TaHousingResources taHousingResources) {
|
661
|
|
- if (StringUtils.isEmpty(taHousingResources.getUnitName())){
|
|
661
|
+ if (StringUtils.isEmpty(taHousingResources.getUnitName())) {
|
662
|
662
|
return "请输入单元名。";
|
663
|
|
- }else{
|
|
663
|
+ } else {
|
664
|
664
|
QueryWrapper<TaBuildingUnit> queryWrapper = new QueryWrapper<>();
|
665
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
666
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
667
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
668
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
669
|
|
- queryWrapper.eq("block_id",taHousingResources.getBlockId());
|
670
|
|
- queryWrapper.eq("unit_name",taHousingResources.getUnitName());
|
|
665
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
666
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
667
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
668
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
669
|
+ queryWrapper.eq("block_id", taHousingResources.getBlockId());
|
|
670
|
+ queryWrapper.eq("unit_name", taHousingResources.getUnitName());
|
671
|
671
|
TaBuildingUnit taBuildingUnit = taBuildingUnitMapper.selectOne(queryWrapper);
|
672
|
|
- if (null != taBuildingUnit){
|
|
672
|
+ if (null != taBuildingUnit) {
|
673
|
673
|
taHousingResources.setUnitId(taBuildingUnit.getUnitId());
|
674
|
674
|
return "单元名" + taHousingResources.getUnitName() + "存在。";
|
675
|
|
- }else{
|
|
675
|
+ } else {
|
676
|
676
|
return "notExist";
|
677
|
677
|
}
|
678
|
678
|
}
|
|
@@ -680,20 +680,20 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
680
|
680
|
|
681
|
681
|
//校验楼盘
|
682
|
682
|
private String checkedBlock(TaHousingResources taHousingResources) {
|
683
|
|
- if (StringUtils.isEmpty(taHousingResources.getBlockName())){
|
|
683
|
+ if (StringUtils.isEmpty(taHousingResources.getBlockName())) {
|
684
|
684
|
return "请输入楼栋名。";
|
685
|
|
- }else{
|
|
685
|
+ } else {
|
686
|
686
|
QueryWrapper<TaBuildingBlock> queryWrapper = new QueryWrapper<>();
|
687
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
688
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
689
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
690
|
|
- queryWrapper.eq("term_id",taHousingResources.getTermId());
|
691
|
|
- queryWrapper.eq("block_name",taHousingResources.getBlockName());
|
|
687
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
688
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
689
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
690
|
+ queryWrapper.eq("term_id", taHousingResources.getTermId());
|
|
691
|
+ queryWrapper.eq("block_name", taHousingResources.getBlockName());
|
692
|
692
|
TaBuildingBlock taBuildingBlock = taBuildingBlockMapper.selectOne(queryWrapper);
|
693
|
|
- if (null != taBuildingBlock){
|
|
693
|
+ if (null != taBuildingBlock) {
|
694
|
694
|
taHousingResources.setBlockId(taBuildingBlock.getBlockId());
|
695
|
695
|
return "楼栋名" + taHousingResources.getBlockName() + "存在。";
|
696
|
|
- }else{
|
|
696
|
+ } else {
|
697
|
697
|
return "notExist";
|
698
|
698
|
}
|
699
|
699
|
}
|
|
@@ -701,19 +701,19 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
|
701
|
701
|
|
702
|
702
|
//校验期
|
703
|
703
|
private String checckedTerm(TaHousingResources taHousingResources) {
|
704
|
|
- if (StringUtils.isEmpty(taHousingResources.getTermName())){
|
|
704
|
+ if (StringUtils.isEmpty(taHousingResources.getTermName())) {
|
705
|
705
|
return "请输入期名。";
|
706
|
|
- }else{
|
|
706
|
+ } else {
|
707
|
707
|
QueryWrapper<TaBuildingTerm> queryWrapper = new QueryWrapper<>();
|
708
|
|
- queryWrapper.eq("org_id",taHousingResources.getOrgId());
|
709
|
|
- queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
|
710
|
|
- queryWrapper.eq("building_id",taHousingResources.getBuildingId());
|
711
|
|
- queryWrapper.eq("term_name",taHousingResources.getTermName());
|
|
708
|
+ queryWrapper.eq("org_id", taHousingResources.getOrgId());
|
|
709
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
710
|
+ queryWrapper.eq("building_id", taHousingResources.getBuildingId());
|
|
711
|
+ queryWrapper.eq("term_name", taHousingResources.getTermName());
|
712
|
712
|
TaBuildingTerm taBuildingTerm = taBuildingTermMapper.selectOne(queryWrapper);
|
713
|
|
- if (null != taBuildingTerm){
|
|
713
|
+ if (null != taBuildingTerm) {
|
714
|
714
|
taHousingResources.setTermId(taBuildingTerm.getTermId());
|
715
|
715
|
return "期名" + taHousingResources.getTermName() + "存在。";
|
716
|
|
- }else{
|
|
716
|
+ } else {
|
717
|
717
|
return "notExist";
|
718
|
718
|
}
|
719
|
719
|
}
|