13 changed files with 513 additions and 173 deletions
@ -1,105 +0,0 @@
|
||||
package com.air.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.baomidou.mybatisplus.extension.activerecord.Model; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
@Data |
||||
@TableName("measure_data") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "测算数据") |
||||
public class MeasureData extends Model<MeasureData> { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
|
||||
@TableId |
||||
@ApiModelProperty(value = "测算数据id") |
||||
private Long measureDataId; |
||||
|
||||
@ApiModelProperty(value = "土地编号") |
||||
private String annoId; |
||||
|
||||
@ApiModelProperty(value = "起拍楼面价") |
||||
private Integer purchasePrice; |
||||
|
||||
@ApiModelProperty(value = "住宅定价") |
||||
private Integer housingPrice; |
||||
|
||||
@ApiModelProperty(value = "商业定价") |
||||
private Integer commercePrice; |
||||
|
||||
@ApiModelProperty(value = "车位定价") |
||||
private Integer parkingPrice; |
||||
|
||||
@ApiModelProperty(value = "车位配比(个/100㎡)") |
||||
private Integer parkingAllocation; |
||||
|
||||
@ApiModelProperty(value = "单车指标") |
||||
private Integer singleIndicator; |
||||
|
||||
@ApiModelProperty(value = "单方成本") |
||||
private Integer singlePrimeCost; |
||||
|
||||
@ApiModelProperty(value = "管理费率") |
||||
private Integer manageFeeRate; |
||||
|
||||
@ApiModelProperty(value = "销售费率") |
||||
private Integer salesRate; |
||||
|
||||
@ApiModelProperty(value = "财务费率") |
||||
private Integer financialRates; |
||||
|
||||
@ApiModelProperty(value = "净利率") |
||||
private Integer netProfitRatio; |
||||
|
||||
@ApiModelProperty(value = "预测楼面价") |
||||
private Integer forecastGfa; |
||||
|
||||
@ApiModelProperty(value = "预测溢价率") |
||||
private Integer projectedPremiumRate; |
||||
|
||||
@ApiModelProperty(value = "成交楼面价") |
||||
private Integer transactionFloorPrice; |
||||
|
||||
@ApiModelProperty(value = "实际溢价率") |
||||
private Integer realPremiumRate; |
||||
|
||||
@ApiModelProperty(value = "是否准确") |
||||
private String isAccuracy; |
||||
|
||||
@ApiModelProperty(value = "误差绝对值") |
||||
private Integer errorAbsoluteValue; |
||||
|
||||
@ApiModelProperty(value = "状态") |
||||
private String statusCd; |
||||
|
||||
@ApiModelProperty(value = "状态时间") |
||||
private LocalDateTime statusDate; |
||||
|
||||
@ApiModelProperty(value = "创建人") |
||||
private String createUserId; |
||||
|
||||
@ApiModelProperty(value = "创建时间") |
||||
private LocalDateTime createDate; |
||||
|
||||
@ApiModelProperty(value = "修改人") |
||||
private String updateUserId; |
||||
|
||||
@ApiModelProperty(value = "修改时间") |
||||
private LocalDateTime updateDate; |
||||
|
||||
@ApiModelProperty(value = "备注") |
||||
private String remark; |
||||
} |
@ -1,14 +0,0 @@
|
||||
package com.air.mapper; |
||||
|
||||
import com.air.entity.MeasureData; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
public interface MeasureDataMapper extends BaseMapper<MeasureData> { |
||||
|
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.air.measuredata.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 测算结果统计 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
@Data |
||||
@ApiModel(value = "测算结果统计") |
||||
public class MeasureStatisticsDto { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "测算宗数") |
||||
private Integer totle; |
||||
|
||||
@ApiModelProperty(value = "准确率") |
||||
private BigDecimal precision; |
||||
|
||||
@ApiModelProperty(value = "预测误差") |
||||
private BigDecimal error; |
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.air.measuredata.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 测算趋势统计 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
@Data |
||||
@ApiModel(value = "测算趋势统计") |
||||
public class MeasureTrendDto { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "溢价率差异值") |
||||
private BigDecimal premiumSpread; |
||||
|
||||
@ApiModelProperty(value = "平均差异值") |
||||
private BigDecimal average; |
||||
|
||||
@ApiModelProperty(value = "我的净利率") |
||||
private BigDecimal interestRate; |
||||
} |
@ -0,0 +1,183 @@
|
||||
package com.air.measuredata.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.baomidou.mybatisplus.extension.activerecord.Model; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
@Data |
||||
@TableName("measure_data") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "测算数据") |
||||
public class MeasureData extends Model<MeasureData> { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@TableId |
||||
@ApiModelProperty(value = "测算数据id") |
||||
private Long measureDataId; |
||||
|
||||
@ApiModelProperty(value = "已挂牌地块标识") |
||||
private Long landListedId; |
||||
|
||||
@ApiModelProperty(value = "土地编号") |
||||
private String annoId; |
||||
|
||||
@ApiModelProperty(value = "住宅定价") |
||||
private BigDecimal housingPrice; |
||||
|
||||
@ApiModelProperty(value = "商业定价") |
||||
private BigDecimal commercePrice; |
||||
|
||||
@ApiModelProperty(value = "商务定价") |
||||
private BigDecimal businessPrice; |
||||
|
||||
@ApiModelProperty(value = "车位配比(个/100㎡)") |
||||
private BigDecimal parkingAllocation; |
||||
|
||||
@ApiModelProperty(value = "单车指标") |
||||
private BigDecimal singleIndicator; |
||||
|
||||
@ApiModelProperty(value = "车位可售") |
||||
private BigDecimal parkingSaleRate; |
||||
|
||||
@ApiModelProperty(value = "单方成本") |
||||
private BigDecimal singlePrimeCost; |
||||
|
||||
@ApiModelProperty(value = "车位定价") |
||||
private BigDecimal parkingPrice; |
||||
|
||||
@ApiModelProperty(value = "商业配比") |
||||
private BigDecimal commerceRate; |
||||
|
||||
@ApiModelProperty(value = "商务配比") |
||||
private BigDecimal businessRate; |
||||
|
||||
@ApiModelProperty(value = "管理费率") |
||||
private BigDecimal manageFeeRate; |
||||
|
||||
@ApiModelProperty(value = "销售费率") |
||||
private BigDecimal salesRate; |
||||
|
||||
@ApiModelProperty(value = "财务费率") |
||||
private BigDecimal financialRate; |
||||
|
||||
@ApiModelProperty(value = "前融比例") |
||||
private BigDecimal financingRate; |
||||
|
||||
@ApiModelProperty(value = "前融利率") |
||||
private BigDecimal financingInterest; |
||||
|
||||
@ApiModelProperty(value = "前融周期") |
||||
private Integer financingPeriod; |
||||
|
||||
@ApiModelProperty(value = "开发贷比例") |
||||
private BigDecimal loansRate; |
||||
|
||||
@ApiModelProperty(value = "开发贷利率") |
||||
private BigDecimal loansInterest; |
||||
|
||||
@ApiModelProperty(value = "开发贷周期") |
||||
private Integer loansPeriod; |
||||
|
||||
@ApiModelProperty(value = "无偿移交住宅计容占比") |
||||
private BigDecimal freeHousingRate; |
||||
|
||||
@ApiModelProperty(value = "无偿移交商业计容占比") |
||||
private BigDecimal freeCommerceRate; |
||||
|
||||
@ApiModelProperty(value = "无偿移交商务计容占比") |
||||
private BigDecimal freeBusinessRate; |
||||
|
||||
@ApiModelProperty(value = "自持住宅计容占比") |
||||
private BigDecimal selfHousingRate; |
||||
|
||||
@ApiModelProperty(value = "住宅可售数量") |
||||
private Integer selfHousingAmount; |
||||
|
||||
@ApiModelProperty(value = "住宅可售价格") |
||||
private BigDecimal selfHousingPrice; |
||||
|
||||
@ApiModelProperty(value = "自持商业计容占比") |
||||
private BigDecimal selfCommerceRate; |
||||
|
||||
@ApiModelProperty(value = "商业可售数量") |
||||
private Integer selfCommerceAamount; |
||||
|
||||
@ApiModelProperty(value = "商业可售价格") |
||||
private BigDecimal selfCommercePrice; |
||||
|
||||
@ApiModelProperty(value = "自持商务计容占比") |
||||
private BigDecimal selfBusinessRate; |
||||
|
||||
@ApiModelProperty(value = "商务可售数量") |
||||
private Integer selfBusinessAmount; |
||||
|
||||
@ApiModelProperty(value = "商务可售价格") |
||||
private BigDecimal selfBusinessPrice; |
||||
|
||||
@ApiModelProperty(value = "起拍楼面价") |
||||
private BigDecimal floorPrice; |
||||
|
||||
@ApiModelProperty(value = "土地总价") |
||||
private BigDecimal landTotalPrice; |
||||
|
||||
@ApiModelProperty(value = "净利率") |
||||
private BigDecimal netProfitRatio; |
||||
|
||||
@ApiModelProperty(value = "溢价率") |
||||
private BigDecimal premiumRate; |
||||
|
||||
@ApiModelProperty(value = "预测楼面价") |
||||
private BigDecimal forecastFloorPrice; |
||||
|
||||
@ApiModelProperty(value = "预测土地总价") |
||||
private BigDecimal forecastLandTotalPrice; |
||||
|
||||
@ApiModelProperty(value = "预测净利率") |
||||
private BigDecimal forecastNetProfitRatio; |
||||
|
||||
@ApiModelProperty(value = "预测溢价率") |
||||
private BigDecimal forecastPremiumRate; |
||||
|
||||
@ApiModelProperty(value = "成交楼面价") |
||||
private BigDecimal transactionFloorPrice; |
||||
|
||||
@ApiModelProperty(value = "是否准确") |
||||
private Long accuracy; |
||||
|
||||
@ApiModelProperty(value = "误差绝对值") |
||||
private BigDecimal errorAbsoluteValue; |
||||
|
||||
@ApiModelProperty(value = "状态") |
||||
private String statusCd; |
||||
|
||||
@ApiModelProperty(value = "状态时间") |
||||
private LocalDateTime statusDate; |
||||
|
||||
@ApiModelProperty(value = "创建人") |
||||
private String createUserId; |
||||
|
||||
@ApiModelProperty(value = "创建时间") |
||||
private LocalDateTime createDate; |
||||
|
||||
@ApiModelProperty(value = "修改人") |
||||
private String updateUserId; |
||||
|
||||
@ApiModelProperty(value = "修改时间") |
||||
private LocalDateTime updateDate; |
||||
|
||||
@ApiModelProperty(value = "备注") |
||||
private String remark; |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.air.measuredata.mapper; |
||||
|
||||
import com.air.measuredata.entity.MeasureData; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.apache.ibatis.annotations.Select; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
public interface MeasureDataMapper extends BaseMapper<MeasureData> { |
||||
|
||||
@Select("select sum(error_absolute_value) from measure_data") |
||||
BigDecimal getErrorAbsoluteValueSum(); |
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.air.measuredata.serivce; |
||||
|
||||
import com.air.measuredata.dto.MeasureStatisticsDto; |
||||
import com.air.measuredata.dto.MeasureTrendDto; |
||||
import com.air.measuredata.entity.MeasureData; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021-05-18 09:40:33 |
||||
*/ |
||||
public interface MeasureDataService extends IService<MeasureData> { |
||||
|
||||
MeasureStatisticsDto statistics(); |
||||
|
||||
MeasureTrendDto trend(); |
||||
|
||||
} |
@ -0,0 +1,54 @@
|
||||
package com.air.measuredata.serivce.impl; |
||||
|
||||
import com.air.measuredata.dto.MeasureStatisticsDto; |
||||
import com.air.measuredata.dto.MeasureTrendDto; |
||||
import com.air.measuredata.entity.MeasureData; |
||||
import com.air.measuredata.mapper.MeasureDataMapper; |
||||
import com.air.measuredata.serivce.MeasureDataService; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.time.LocalDate; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021-05-18 09:40:33 |
||||
*/ |
||||
@Service |
||||
public class MeasureDataServiceImpl extends ServiceImpl<MeasureDataMapper, MeasureData> implements MeasureDataService { |
||||
|
||||
@Override |
||||
public MeasureStatisticsDto statistics() { |
||||
MeasureStatisticsDto statisticsDto = new MeasureStatisticsDto(); |
||||
//总宗数
|
||||
BigDecimal totle = new BigDecimal(this.count()); |
||||
if (totle.intValue() == 0){ |
||||
return statisticsDto; |
||||
} |
||||
//测试正确数
|
||||
int precisionSum = this.count(Wrappers.<MeasureData>query().lambda().eq(MeasureData::getAccuracy, 1)); |
||||
//准确率
|
||||
BigDecimal precision = new BigDecimal(precisionSum).divide(totle).setScale(2, BigDecimal.ROUND_HALF_UP); |
||||
//误差之和
|
||||
BigDecimal absoluteValueSum = baseMapper.getErrorAbsoluteValueSum(); |
||||
//预测误差
|
||||
BigDecimal error = absoluteValueSum.divide(totle).setScale(2, BigDecimal.ROUND_HALF_UP); |
||||
statisticsDto.setTotle(totle.intValue()); |
||||
statisticsDto.setPrecision(precision); |
||||
statisticsDto.setError(error); |
||||
return statisticsDto; |
||||
} |
||||
|
||||
@Override |
||||
public MeasureTrendDto trend() { |
||||
MeasureTrendDto trendDto = new MeasureTrendDto(); |
||||
//统计时间
|
||||
LocalDate startTime = LocalDate.now().minusYears(1); |
||||
return trendDto; |
||||
} |
||||
} |
@ -0,0 +1,154 @@
|
||||
package com.air.measuredata.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021/5/18 |
||||
**/ |
||||
@Data |
||||
@ApiModel(value = "测算数据") |
||||
public class MeasureDataVo { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "测算数据id") |
||||
private Long measureDataId; |
||||
|
||||
@ApiModelProperty(value = "已挂牌地块标识") |
||||
private Long landListedId; |
||||
|
||||
@ApiModelProperty(value = "土地编号") |
||||
private String annoId; |
||||
|
||||
@ApiModelProperty(value = "住宅定价") |
||||
private BigDecimal housingPrice; |
||||
|
||||
@ApiModelProperty(value = "商业定价") |
||||
private BigDecimal commercePrice; |
||||
|
||||
@ApiModelProperty(value = "商务定价") |
||||
private BigDecimal businessPrice; |
||||
|
||||
@ApiModelProperty(value = "车位配比(个/100㎡)") |
||||
private BigDecimal parkingAllocation; |
||||
|
||||
@ApiModelProperty(value = "单车指标") |
||||
private BigDecimal singleIndicator; |
||||
|
||||
@ApiModelProperty(value = "车位可售") |
||||
private BigDecimal parkingSaleRate; |
||||
|
||||
@ApiModelProperty(value = "单方成本") |
||||
private BigDecimal singlePrimeCost; |
||||
|
||||
@ApiModelProperty(value = "车位定价") |
||||
private BigDecimal parkingPrice; |
||||
|
||||
@ApiModelProperty(value = "商业配比") |
||||
private BigDecimal commerceRate; |
||||
|
||||
@ApiModelProperty(value = "商务配比") |
||||
private BigDecimal businessRate; |
||||
|
||||
@ApiModelProperty(value = "管理费率") |
||||
private BigDecimal manageFeeRate; |
||||
|
||||
@ApiModelProperty(value = "销售费率") |
||||
private BigDecimal salesRate; |
||||
|
||||
@ApiModelProperty(value = "财务费率") |
||||
private BigDecimal financialRate; |
||||
|
||||
@ApiModelProperty(value = "前融比例") |
||||
private BigDecimal financingRate; |
||||
|
||||
@ApiModelProperty(value = "前融利率") |
||||
private BigDecimal financingInterest; |
||||
|
||||
@ApiModelProperty(value = "前融周期") |
||||
private Integer financingPeriod; |
||||
|
||||
@ApiModelProperty(value = "开发贷比例") |
||||
private BigDecimal loansRate; |
||||
|
||||
@ApiModelProperty(value = "开发贷利率") |
||||
private BigDecimal loansInterest; |
||||
|
||||
@ApiModelProperty(value = "开发贷周期") |
||||
private Integer loansPeriod; |
||||
|
||||
@ApiModelProperty(value = "无偿移交住宅计容占比") |
||||
private BigDecimal freeHousingRate; |
||||
|
||||
@ApiModelProperty(value = "无偿移交商业计容占比") |
||||
private BigDecimal freeCommerceRate; |
||||
|
||||
@ApiModelProperty(value = "无偿移交商务计容占比") |
||||
private BigDecimal freeBusinessRate; |
||||
|
||||
@ApiModelProperty(value = "自持住宅计容占比") |
||||
private BigDecimal selfHousingRate; |
||||
|
||||
@ApiModelProperty(value = "住宅可售数量") |
||||
private Integer selfHousingAmount; |
||||
|
||||
@ApiModelProperty(value = "住宅可售价格") |
||||
private BigDecimal selfHousingPrice; |
||||
|
||||
@ApiModelProperty(value = "自持商业计容占比") |
||||
private BigDecimal selfCommerceRate; |
||||
|
||||
@ApiModelProperty(value = "商业可售数量") |
||||
private Integer selfCommerceAamount; |
||||
|
||||
@ApiModelProperty(value = "商业可售价格") |
||||
private BigDecimal selfCommercePrice; |
||||
|
||||
@ApiModelProperty(value = "自持商务计容占比") |
||||
private BigDecimal selfBusinessRate; |
||||
|
||||
@ApiModelProperty(value = "商务可售数量") |
||||
private Integer selfBusinessAmount; |
||||
|
||||
@ApiModelProperty(value = "商务可售价格") |
||||
private BigDecimal selfBusinessPrice; |
||||
|
||||
@ApiModelProperty(value = "起拍楼面价") |
||||
private BigDecimal floorPrice; |
||||
|
||||
@ApiModelProperty(value = "土地总价") |
||||
private BigDecimal landTotalPrice; |
||||
|
||||
@ApiModelProperty(value = "净利率") |
||||
private BigDecimal netProfitRatio; |
||||
|
||||
@ApiModelProperty(value = "溢价率") |
||||
private BigDecimal premiumRate; |
||||
|
||||
@ApiModelProperty(value = "预测楼面价") |
||||
private BigDecimal forecastFloorPrice; |
||||
|
||||
@ApiModelProperty(value = "预测土地总价") |
||||
private BigDecimal forecastLandTotalPrice; |
||||
|
||||
@ApiModelProperty(value = "预测净利率") |
||||
private BigDecimal forecastNetProfitRatio; |
||||
|
||||
@ApiModelProperty(value = "预测溢价率") |
||||
private BigDecimal forecastPremiumRate; |
||||
|
||||
@ApiModelProperty(value = "成交楼面价") |
||||
private BigDecimal transactionFloorPrice; |
||||
|
||||
@ApiModelProperty(value = "是否准确") |
||||
private Long accuracy; |
||||
|
||||
@ApiModelProperty(value = "误差绝对值") |
||||
private BigDecimal errorAbsoluteValue; |
||||
} |
@ -1,14 +0,0 @@
|
||||
package com.air.service; |
||||
|
||||
import com.air.entity.MeasureData; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021-05-18 09:40:33 |
||||
*/ |
||||
public interface MeasureDataService extends IService<MeasureData> { |
||||
|
||||
} |
@ -1,18 +0,0 @@
|
||||
package com.air.service.impl; |
||||
|
||||
import com.air.entity.MeasureData; |
||||
import com.air.mapper.MeasureDataMapper; |
||||
import com.air.service.MeasureDataService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 测算数据 |
||||
* |
||||
* @author peihao |
||||
* @date 2021-05-18 09:40:33 |
||||
*/ |
||||
@Service |
||||
public class MeasureDataServiceImpl extends ServiceImpl<MeasureDataMapper, MeasureData> implements MeasureDataService { |
||||
|
||||
} |
Loading…
Reference in new issue