添加写字楼租金走势

This commit is contained in:
majintao
2025-03-05 11:34:33 +08:00
parent 03dcd0bc16
commit 0c7aa269a6
3 changed files with 74 additions and 9 deletions
@@ -23,7 +23,7 @@ public interface OfficeService {
* @param endDate
* @return
*/
List<OfficeRentStat> findOfficeRentStat(final String city, final String region, final Integer startDate, final Integer endDate);
List<OfficeRentStat> findOfficeRentStat(final String city, final String region,final String name, final String cat, final Integer startDate, final Integer endDate);
/**
* 租金评估
@@ -34,7 +34,6 @@ public class OfficeServiceImpl implements OfficeService {
private SeawaterService seawaterService;
@Override
public OfficeEvaluationDto evaluateRent(District district, Evaluation evaluation) {
if (null == evaluation.getFloor() || 0 == evaluation.getFloor() || null == evaluation.getHeight() || 0 == evaluation.getHeight()) {
@@ -55,7 +54,7 @@ public class OfficeServiceImpl implements OfficeService {
return officeEvaluationDto;
}
// 所在楼层
// 所在楼层
// 总楼层
private static final Map<String, String> FITMENT_MAP = new HashMap<String, String>() {
{
@@ -224,6 +223,7 @@ public class OfficeServiceImpl implements OfficeService {
/**
* 根据均价查询样本
*
* @param avgPrice
* @param evaluation
* @return
@@ -253,6 +253,7 @@ public class OfficeServiceImpl implements OfficeService {
/**
* 基准价*楼层系数*装修系数*朝向系数
*
* @param seawaters
* @param evaluation
* @return
@@ -403,26 +404,33 @@ public class OfficeServiceImpl implements OfficeService {
return "";
}
public List<OfficeRentStat> findOfficeRentStat(final String city, final String region, final Integer startDate, final Integer endDate) {
return CacheUtils.getValue(this.getClass(), "findOfficeRentStat", city + region + startDate + endDate,
public List<OfficeRentStat> findOfficeRentStat(final String city, final String region, final String name, final String cat, final Integer startDate, final Integer endDate) {
return CacheUtils.getValue(this.getClass(), "findOfficeRentStat", city + region + name + startDate + endDate,
CacheUtils.CachePolicyEnum.MIDDLE, new Closure<List<OfficeRentStat>, String>() {
public List<OfficeRentStat> execute(String input) {
return doFindRegionBlockStat(city, region, startDate, endDate);
return doFindRegionBlockStat(city, region, name, cat, startDate, endDate);
}
});
}
public List<OfficeRentStat> doFindRegionBlockStat(final String city, final String region, Integer startDate, Integer endDate) {
public List<OfficeRentStat> doFindRegionBlockStat(final String city, final String region, final String name, final String cat, Integer startDate, Integer endDate) {
if (startDate == null) {
throw new IllegalArgumentException("开始日期不能为空");
}
if (endDate == null) {
throw new IllegalArgumentException("结束日期不能为空");
}
if (StringUtils.isBlank(cat)) {
throw new IllegalArgumentException("cat不能为空");
}
List<QueryParam> params = new ArrayList<QueryParam>();
params.add(new QueryParam("city", city));
params.add(new QueryParam("district", region));
if (StringUtils.isNotBlank(name)) {
params.add(new QueryParam("name", name));
}
params.add(new QueryParam("cat", cat));
if (startDate != null) {
params.add(new QueryParam("date", QueryParam.GREATER_THAN_EQUAL_OPERATOR, startDate));