|
@@ -9,16 +9,14 @@ import com.huiju.estateagents.base.ResponseBean;
|
9
|
9
|
import com.huiju.estateagents.bo.request.PresecretRecordRequestBO;
|
10
|
10
|
import com.huiju.estateagents.common.CommConstant;
|
11
|
11
|
import com.huiju.estateagents.common.DateUtils;
|
12
|
|
-import com.huiju.estateagents.entity.TaApartmentImg;
|
13
|
|
-import com.huiju.estateagents.entity.TaBuildingImg;
|
14
|
|
-import com.huiju.estateagents.entity.TaPerson;
|
15
|
|
-import com.huiju.estateagents.entity.TaPreselectionRecord;
|
|
12
|
+import com.huiju.estateagents.entity.*;
|
16
|
13
|
import com.huiju.estateagents.mapper.TaApartmentImgMapper;
|
17
|
14
|
import com.huiju.estateagents.mapper.TaBuildingImgMapper;
|
18
|
15
|
import com.huiju.estateagents.mapper.TaHousingResourcesMapper;
|
19
|
16
|
import com.huiju.estateagents.mapper.TaPreselectionRecordMapper;
|
20
|
17
|
import com.huiju.estateagents.po.TaHousingResourcesPO;
|
21
|
18
|
import com.huiju.estateagents.po.TaPreselectionRecordPO;
|
|
19
|
+import com.huiju.estateagents.service.ITaHousingResourcesService;
|
22
|
20
|
import com.huiju.estateagents.service.ITaPreselectionRecordService;
|
23
|
21
|
import org.apache.commons.collections.CollectionUtils;
|
24
|
22
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -65,12 +63,16 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
65
|
63
|
@Autowired
|
66
|
64
|
private TaPersonServiceImpl taPersonService;
|
67
|
65
|
|
|
66
|
+ @Autowired
|
|
67
|
+ private ITaHousingResourcesService taHousingResourcesService;
|
|
68
|
+
|
|
69
|
+
|
68
|
70
|
@Override
|
69
|
|
- public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId,String buildingId,Integer salesBtchId,String apartmentId,String houseLockingStatus,String customerLocked) {
|
|
71
|
+ public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId, String buildingId, Integer salesBtchId, String apartmentId, String houseLockingStatus, String customerLocked) {
|
70
|
72
|
logger.info("listPreselectionRecord 接收参数:pageNum:{},pageSize:{},orgId:{},personId:{}", pageNum, pageSize, orgId, personId);
|
71
|
73
|
|
72
|
74
|
IPage<TaPreselectionRecordPO> iPage = new Page<>(pageNum, pageSize);
|
73
|
|
- iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, orgId, personId,buildingId,salesBtchId,apartmentId,houseLockingStatus,customerLocked);
|
|
75
|
+ iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, orgId, personId, buildingId, salesBtchId, apartmentId, houseLockingStatus, customerLocked);
|
74
|
76
|
|
75
|
77
|
List<TaPreselectionRecordPO> poList = iPage.getRecords();
|
76
|
78
|
if (CollectionUtils.isEmpty(poList)) {
|
|
@@ -96,6 +98,16 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
96
|
98
|
}
|
97
|
99
|
resultList.add(po);
|
98
|
100
|
}
|
|
101
|
+
|
|
102
|
+ // 获取房源信息
|
|
103
|
+ resultList.stream().forEach(record -> {
|
|
104
|
+ QueryWrapper<TaHousingResources> housingQueryWrapper = new QueryWrapper<>();
|
|
105
|
+ housingQueryWrapper.eq("org_id", record.getOrgId());
|
|
106
|
+ housingQueryWrapper.eq("house_id", record.getHouseId());
|
|
107
|
+ housingQueryWrapper.ne("status", -1);
|
|
108
|
+ record.setHousingInfo(taHousingResourcesService.getOne(housingQueryWrapper));
|
|
109
|
+ });
|
|
110
|
+
|
99
|
111
|
iPage.setRecords(resultList);
|
100
|
112
|
return iPage;
|
101
|
113
|
}
|
|
@@ -225,10 +237,10 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
|
225
|
237
|
}
|
226
|
238
|
|
227
|
239
|
@Override
|
228
|
|
- public ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId) {
|
|
240
|
+ public ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId) {
|
229
|
241
|
ResponseBean responseBean = new ResponseBean();
|
230
|
242
|
|
231
|
|
- taPreselectionRecordMapper.batchDeletePreselectRecord(preselectionRecordList, orgId);
|
|
243
|
+ taPreselectionRecordMapper.batchDeletePreselectRecord(preselectionRecordList, orgId, userId);
|
232
|
244
|
responseBean.addSuccess("success");
|
233
|
245
|
return responseBean;
|
234
|
246
|
}
|