199 lines
8.5 KiB
XML
199 lines
8.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.project.data.price.mapper.ComputeResidenceSalePriceMapper">
|
|
|
|
<resultMap type="com.ruoyi.project.data.price.domain.ComputeResidenceSaleBasePrice"
|
|
id="MainMappingResult">
|
|
<result property="id" column="sid"/>
|
|
<result property="communityId" column="ProjectID"/>
|
|
<result property="communityName" column="ProjectName"/>
|
|
<result property="communityAddress" column="ProjectAddr"/>
|
|
<result property="countyName" column="county"/>
|
|
<result property="blockName" column="block"/>
|
|
<result property="loopName" column="loop"/>
|
|
<result property="hasIndex" column="isIndxGen"/>
|
|
<result property="isPstCalc" column="isPstCalc"/>
|
|
<result property="status" column="statusRun"/>
|
|
<result property="label" column="ProjectSPLabel"/>
|
|
<result property="propertyType" column="propertyType"/>
|
|
<result property="projectType" column="projectType"/>
|
|
<result property="projectTypeDtl" column="projectTypeDtl"/>
|
|
<result property="propertyLevel" column="projectLevel"/>
|
|
<result property="year" column="year"/>
|
|
<result property="area" column="mainArea"/>
|
|
<result property="yearCoefficient" column="yearCoff"/>
|
|
<result property="areaCoefficient" column="areaCoff"/>
|
|
<result property="comment" column="priceNote"/>
|
|
<result property="basePriceDraft" column="basePriceDft"/>
|
|
<result property="mainPriceDraft" column="mainPriceDft"/>
|
|
<result property="basePrice_1" column="basePrice_1"/>
|
|
<result property="voppat" column="voppat"/>
|
|
<result property="voppa" column="voppa"/>
|
|
<!-- 案例均价 -->
|
|
<result property="priceUnitAdj" column="PriceUnitAdj"/>
|
|
<result property="visitedNum" column="Visited_Num"/>
|
|
<result property="firstVisitTime" column="First_Visit_Time"/>
|
|
<result property="visitedNum15" column="Visited_Num_15"/>
|
|
<result property="visitedNum30" column="Visited_Num_30"/>
|
|
<!-- 上周期 -->
|
|
<result property="priceDealMean_1" column="priceDealMean_1"/>
|
|
<result property="priceDealMax_1" column="priceDealMax_1"/>
|
|
<result property="sumDeal_1" column="sumDeal_1"/>
|
|
<!-- 本周期 -->
|
|
<result property="priceDealMean" column="priceDealMean"/>
|
|
<result property="priceDealMax" column="priceDealMax"/>
|
|
<result property="sumDeal" column="sumDeal"/>
|
|
<!-- 挂牌最低价 -->
|
|
<result property="priceListedMin" column="priceListedMin"/>
|
|
<result property="priceCase1_ToAI_Pst" column="priceCase1_ToAI_Pst"/>
|
|
<result property="priceCase2_ToAI_Pst" column="priceCase2_ToAI_Pst"/>
|
|
<result property="priceCase1_ToLst_Pst" column="priceCase1_ToLst_Pst"/>
|
|
<result property="priceCase2_ToLst_Pst" column="priceCase2_ToLst_Pst"/>
|
|
<result property="priceCase1" column="priceCase1"/>
|
|
<result property="priceCase1AdjPst" column="priceCase1AdjPst"/>
|
|
<result property="sumCase1" column="sumCase1"/>
|
|
<result property="priceCase2" column="priceCase2"/>
|
|
<result property="priceCase2AdjPst" column="priceCase2AdjPst"/>
|
|
<result property="sumCase2" column="sumCase2"/>
|
|
<result property="voppbt" column="voppbt"/>
|
|
<result property="voppb" column="voppb"/>
|
|
<!-- 绑定小区相关信息 -->
|
|
<result property="bindCommunityId" column="bindProjID"/>
|
|
<result property="bindCommunityPst" column="bind_Proj_Pst"/>
|
|
<result property="bindBlockClass" column="bind_Block_Class"/>
|
|
<result property="bindBlockClassPst" column="bind_Block_Class_Pst"/>
|
|
<result property="bindBlockPropertyLevel" column="bind_Block_Plevel"/>
|
|
<result property="bindBlockPropertyLevelPst" column="bind_Block_Plevel_Pst"/>
|
|
<result property="bindBlockProjectType" column="bind_Block_PType"/>
|
|
<result property="bindBlockProjectTypePst" column="bind_Block_Ptype_Pst"/>
|
|
<result property="bindCountyProjectType" column="bind_County_PType"/>
|
|
<result property="bindCountyProjectTypePst" column="bind_County_Ptype_Pst"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectAllField">
|
|
SELECT SID
|
|
,ProjectID
|
|
,ProjectName
|
|
,ProjectAddr
|
|
,County
|
|
,Block
|
|
,"Loop"
|
|
,IsIndxGen
|
|
,IsPstCalc
|
|
,StatusRun
|
|
,ProjectSPLabel
|
|
,PropertyType
|
|
,ProjectType
|
|
,ProjectTypeDtl
|
|
,ProjectLevel
|
|
,Year
|
|
,MainArea
|
|
,AreaCoff
|
|
,YearCoff
|
|
,PriceNote
|
|
,BasePriceDft
|
|
,MainPriceDft
|
|
,BasePrice_1
|
|
,PriceUnitAdj
|
|
,Visited_Num
|
|
,First_Visit_Time
|
|
,Visited_Num_15
|
|
,Visited_Num_30
|
|
,PriceDealMean_1
|
|
,PriceDealMax_1
|
|
,SumDeal_1
|
|
,PriceDealMean
|
|
,PriceDealMax
|
|
,SumDeal
|
|
,PriceListedMin
|
|
,PriceCase1_ToAI_Pst
|
|
,PriceCase2_ToAI_Pst
|
|
,PriceCase1_ToLst_Pst
|
|
,PriceCase2_ToLst_Pst
|
|
,PriceCase1
|
|
,PriceCase1AdjPst
|
|
,SumCase1
|
|
,PriceCase2
|
|
,PriceCase2AdjPst
|
|
,SumCase2
|
|
,VOPPBT
|
|
,VOPPB
|
|
,BindProjID
|
|
,Bind_Proj_Pst
|
|
,Bind_Block_Class
|
|
,Bind_Block_Class_Pst
|
|
,Bind_Block_Plevel
|
|
,Bind_Block_Plevel_Pst
|
|
,Bind_Block_PType
|
|
,Bind_Block_Ptype_Pst
|
|
,Bind_County_PType
|
|
,Bind_County_Ptype_Pst
|
|
,VOPPAT
|
|
,VOPPA
|
|
FROM dbo.DWA_PROJECTBASEPRICE_IMDT_${yearMonth}
|
|
</sql>
|
|
<!-- 分页总数 -->
|
|
<select id="selectPageCount"
|
|
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice" resultType="int">
|
|
select count(1) from dbo.DWA_PROJECTBASEPRICE_IMDT_${yearMonth}
|
|
<where>
|
|
<if test="communityId != null">
|
|
AND ProjectID = #{communityId}
|
|
</if>
|
|
<if test="nameOrAddress != null">
|
|
AND (ProjectName like concat('%', #{nameOrAddress}, '%') or ProjectAddr like concat('%',
|
|
#{nameOrAddress}, '%'))
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- 分页列表 -->
|
|
<select id="selectPageList"
|
|
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceSaleBasePrice"
|
|
resultMap="MainMappingResult">
|
|
<include refid="selectAllField"/>
|
|
<where>
|
|
<if test="communityId != null">
|
|
AND ProjectID = #{communityId}
|
|
</if>
|
|
<if test="nameOrAddress != null">
|
|
AND (ProjectName like concat('%', #{nameOrAddress}, '%') or ProjectAddr like concat('%',
|
|
#{nameOrAddress}, '%'))
|
|
</if>
|
|
</where>
|
|
order by ProjectID ASC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only
|
|
</select>
|
|
|
|
<!-- -->
|
|
<select id="selectComputeResidenceRentBasePriceById" parameterType="String" resultMap="MainMappingResult">
|
|
<include refid="selectAllField"/>
|
|
where id = #{id}
|
|
</select>
|
|
<!-- 获取表名 -->
|
|
<select id="yearMonthList" resultType="com.ruoyi.project.common.VueSelectModel">
|
|
SELECT top 12 right(name,6) as value, right(name,6) as label
|
|
FROM sys.tables
|
|
where name like 'DWA_PROJECTBASEPRICE_IMDT_%'
|
|
order by cast(right(name,6) as int) desc
|
|
</select>
|
|
<!-- 区域涨跌幅 -->
|
|
<select id="getBlockChange" resultType="com.ruoyi.project.data.price.domain.DistrictBlockChange">
|
|
select Block as name
|
|
, avg(VOPPA) as value
|
|
from dbo.DWA_PROJECTBASEPRICE_IMDT_${yearMonth}
|
|
where Block is not null
|
|
group by Block
|
|
order by avg(VOPPA)
|
|
</select>
|
|
<!--区域涨跌幅-->
|
|
<select id="getCountyChange" resultType="com.ruoyi.project.data.price.domain.DistrictBlockChange">
|
|
select left(County,2) as name
|
|
, avg(VOPPA) as value
|
|
from dbo.DWA_PROJECTBASEPRICE_IMDT_${yearMonth}
|
|
where County is not null
|
|
group by left(County,2)
|
|
order by avg(VOPPA)
|
|
</select>
|
|
|
|
</mapper> |