feature (住宅租赁基价作价): 推送住宅租赁基价作价
1. 创建汇总案例表 2. 推送汇总案例数据 3. 创建价格表(备份上期价格表) 4. 推送价格数据
This commit is contained in:
@ -0,0 +1,124 @@
|
||||
<?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.cases.mapper.ResidenceRentAggregationCaseMapper">
|
||||
<resultMap id="AggregationCaseResultMapping" type="com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase">
|
||||
<result property="householdsIdSRC" column="HouseholdsID_SRC"/>
|
||||
<result property="projectIdSRC" column="ProjectID_SRC"/>
|
||||
<result property="communityId" column="ProjectID"/>
|
||||
<result property="buildingId" column="BuildingID"/>
|
||||
<result property="rentType" column="RentType"/>
|
||||
<result property="roomNum" column="Room"/>
|
||||
<result property="hallNum" column="Hall"/>
|
||||
<result property="bashRoomNum" column="Bashroom"/>
|
||||
<result property="area" column="Area"/>
|
||||
<result property="toward" column="Towards"/>
|
||||
<result property="totalFloor" column="UpperFloorSum"/>
|
||||
<result property="currentFloor" column="UpperFloorNum"/>
|
||||
<result property="elevator" column="Elevator"/>
|
||||
<result property="decoration" column="Decoration"/>
|
||||
<result property="year" column="Year"/>
|
||||
<result property="areaCoefficient" column="AreaCoff"/>
|
||||
<result property="towardCoefficient" column="TowardsCoff"/>
|
||||
<result property="floorCoefficient" column="FloorCoff"/>
|
||||
<result property="decorationCoefficient" column="DecorationRng"/>
|
||||
<result property="yearCoefficient" column="YearCoff"/>
|
||||
<result property="buildingCoefficient" column="BuildingCoff"/>
|
||||
<result property="roomTypeCoefficient" column="RoomTypeCoff"/>
|
||||
<result property="totalPrice" column="PriceTotal"/>
|
||||
<result property="unitPrice" column="PriceUnit"/>
|
||||
<result property="priceScatterRent" column="PriceScatterRent"/>
|
||||
<result property="priceEntireRent" column="PriceEntireRent"/>
|
||||
<result property="priceShareRent0" column="PriceShareRent0"/>
|
||||
<result property="priceShareRent" column="PriceShareRent"/>
|
||||
<result property="visitedNum" column="Visited_Num"/>
|
||||
<result property="firstVisitedDate" column="First_Visit_Time" jdbcType="DATE"/>
|
||||
<result property="visitedNum15" column="Visited_Num_15"/>
|
||||
<result property="visitedNum30" column="Visited_Num_30"/>
|
||||
<result property="status" column="Status"/>
|
||||
<result property="adjustedValue" column="AdjustedValue"/>
|
||||
<result property="adjustedPst" column="AdjustedPst"/>
|
||||
<result property="adjustedCumValue" column="AdjustedCumValue"/>
|
||||
<result property="adjustedCumPst" column="AdjustedCumPst"/>
|
||||
<result property="adjustedCumValueAbs" column="AdjustedCumValueAbs"/>
|
||||
<result property="adjustedCumPstAbs" column="AdjustedCumPstAbs"/>
|
||||
<result property="adjustedCumNum" column="AdjustedCumNum"/>
|
||||
<result property="priceTotalIn" column="PriceTotalIn"/>
|
||||
<result property="priceTotalOut" column="PriceTotalOut"/>
|
||||
<result property="priceDateIn" column="PriceDateIn" jdbcType="DATE"/>
|
||||
<result property="priceDateOut" column="PriceDateOut" jdbcType="DATE"/>
|
||||
<result property="origin" column="Origin"/>
|
||||
<result property="urlHouseholds" column="UrlHouseholds"/>
|
||||
<result property="urlProjects" column="UrlProjects"/>
|
||||
<result property="caseName" column="CaseName"/>
|
||||
<result property="caseType" column="CaseType"/>
|
||||
<result property="rentPrice_1" column="RentPrice_1"/>
|
||||
<result property="range" column="Range"/>
|
||||
<result property="rangeFlag" column="RangeFlag"/>
|
||||
<result property="rentPrice" column="RentPrice"/>
|
||||
<result property="entireRentRatio" column="EntireRentRatio"/>
|
||||
<result property="shareRentRatio" column="ShareRentRatio"/>
|
||||
<result property="yearMonth" column="yearMonth"/>
|
||||
</resultMap>
|
||||
<!-- 汇总案例 -->
|
||||
<select id="getOfficeAggregationCases" resultMap="AggregationCaseResultMapping">
|
||||
SELECT HouseholdsID_SRC
|
||||
,ProjectID_SRC
|
||||
,ProjectID
|
||||
,BuildingID
|
||||
,RentType
|
||||
,Room
|
||||
,Hall
|
||||
,Bashroom
|
||||
,Area
|
||||
,Towards
|
||||
,UpperFloorSum
|
||||
,UpperFloorNum
|
||||
,Elevator
|
||||
,Decoration
|
||||
,Year
|
||||
,AreaCoff
|
||||
,TowardsCoff
|
||||
,FloorCoff
|
||||
,DecorationRng
|
||||
,YearCoff
|
||||
,BuildingCoff
|
||||
,RoomTypeCoff
|
||||
,PriceTotal
|
||||
,PriceUnit
|
||||
,PriceScatterRent
|
||||
,PriceEntireRent
|
||||
,PriceShareRent0
|
||||
,PriceShareRent
|
||||
,Visited_Num
|
||||
,First_Visit_Time
|
||||
,Visited_Num_15
|
||||
,Visited_Num_30
|
||||
,Status
|
||||
,AdjustedValue
|
||||
,AdjustedPst
|
||||
,AdjustedCumValue
|
||||
,AdjustedCumPst
|
||||
,AdjustedCumValueAbs
|
||||
,AdjustedCumPstAbs
|
||||
,AdjustedCumNum
|
||||
,PriceTotalIn
|
||||
,PriceTotalOut
|
||||
,PriceDateIn
|
||||
,PriceDateOut
|
||||
,Origin
|
||||
,UrlHouseholds
|
||||
,UrlProjects
|
||||
,CaseName
|
||||
,CaseType
|
||||
,RentPrice_1
|
||||
,Range
|
||||
,RangeFlag
|
||||
,RentPrice
|
||||
,EntireRentRatio
|
||||
,ShareRentRatio
|
||||
,${yearMonth} as yearMonth
|
||||
FROM dbo.DW_HOUSINGCASE_RENT_COMM_${yearMonth}
|
||||
</select>
|
||||
</mapper>
|
@ -2,8 +2,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.cases.mapper.sync.SyncOriginalResidenceRentAggregationCaseMapper">
|
||||
<update id="createTable">
|
||||
<mapper namespace="com.ruoyi.project.data.cases.mapper.sync.SyncResidenceRentCaseMapper">
|
||||
<update id="createAggregationCaseTable">
|
||||
<bind name="targetTableName" value="'dbo.DW_HOUSINGCASE_RENT_COMM_' + yearMonth"/>
|
||||
IF OBJECT_ID(#{targetTableName}, 'U') IS NOT NULL
|
||||
drop table ${targetTableName};
|
||||
@ -68,7 +68,7 @@
|
||||
)
|
||||
</update>
|
||||
|
||||
<insert id="insert" parameterType="com.ruoyi.project.data.cases.domain.OriginalResidenceSaleOpeningCase">
|
||||
<insert id="insertAggregationCaseTable" parameterType="com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase">
|
||||
insert into dbo.DW_HOUSINGCASE_RENT_COMM_${yearMonth}
|
||||
(
|
||||
HouseholdsID_SRC
|
||||
@ -128,27 +128,74 @@
|
||||
, ShareRentRatio
|
||||
) values
|
||||
(
|
||||
#{caseLianJiaId},
|
||||
#{caseLianJiaCommunityId},
|
||||
#{caseTitle},
|
||||
#{caseApartmentLayout},
|
||||
#{caseArea},
|
||||
#{caseToward},
|
||||
#{caseStorey},
|
||||
#{caseLastDeal,jdbcType=DATE},
|
||||
#{caseElevator},
|
||||
#{caseDecoration},
|
||||
#{caseYear},
|
||||
#{caseAddress},
|
||||
#{casePrice},
|
||||
#{caseCommunityName},
|
||||
#{caseVisitedNum},
|
||||
#{caseFirstVisitTime,jdbcType=DATE},
|
||||
#{caseVisitedNum15},
|
||||
#{caseVisitedNum30},
|
||||
#{caseUrl},
|
||||
#{caseCommunityUrl},
|
||||
#{caseGetDate,jdbcType=DATE}
|
||||
#{householdsIdSRC},
|
||||
#{projectIdSRC},
|
||||
#{communityId},
|
||||
#{buildingId},
|
||||
#{rentType},
|
||||
#{roomNum},
|
||||
#{hallNum},
|
||||
#{bashRoomNum},
|
||||
#{area},
|
||||
#{toward},
|
||||
#{totalFloor},
|
||||
#{currentFloor},
|
||||
#{elevator},
|
||||
#{decoration},
|
||||
#{year},
|
||||
#{areaCoefficient},
|
||||
#{towardCoefficient},
|
||||
#{floorCoefficient},
|
||||
#{decorationCoefficient},
|
||||
#{yearCoefficient},
|
||||
#{buildingCoefficient},
|
||||
#{roomTypeCoefficient},
|
||||
#{totalPrice},
|
||||
#{unitPrice},
|
||||
#{priceScatterRent},
|
||||
#{priceEntireRent},
|
||||
#{priceShareRent0},
|
||||
#{priceShareRent},
|
||||
#{visitedNum},
|
||||
#{firstVisitedDate,jdbcType=DATE},
|
||||
#{visitedNum15},
|
||||
#{visitedNum30},
|
||||
#{status},
|
||||
#{adjustedValue},
|
||||
#{adjustedPst},
|
||||
#{adjustedCumValue},
|
||||
#{adjustedCumPst},
|
||||
#{adjustedCumValueAbs},
|
||||
#{adjustedCumPstAbs},
|
||||
#{adjustedCumNum},
|
||||
#{priceTotalIn},
|
||||
#{priceTotalOut},
|
||||
#{priceDateIn,jdbcType=DATE},
|
||||
#{priceDateOut,jdbcType=DATE},
|
||||
#{origin},
|
||||
#{urlHouseholds},
|
||||
#{urlProjects},
|
||||
#{caseName},
|
||||
#{caseType},
|
||||
#{rentPrice_1},
|
||||
#{range},
|
||||
#{rangeFlag},
|
||||
#{rentPrice},
|
||||
#{entireRentRatio},
|
||||
#{shareRentRatio}
|
||||
)
|
||||
</insert>
|
||||
<!--备份表-->
|
||||
<update id="dumpPriceTable">
|
||||
<bind name="backUpTableName" value="'dbo.ODS_PROJECT_RENT_PRICE_INFO_' + yearMonth+'_'+operateDate+'_bak'"/>
|
||||
<bind name="targetTableName" value="'dbo.ODS_PROJECT_RENT_PRICE_INFO_' + yearMonth"/>
|
||||
IF OBJECT_ID(#{backUpTableName}, 'U') IS NOT NULL
|
||||
drop table ${backUpTableName}
|
||||
select * into ${backUpTableName} from ${targetTableName}
|
||||
</update>
|
||||
<update id="clearPriceTable">
|
||||
<bind name="targetTableName" value="'dbo.ODS_PROJECT_RENT_PRICE_INFO_' + yearMonth"/>
|
||||
IF OBJECT_ID(#{targetTableName}, 'U') IS NOT NULL
|
||||
truncate table ${targetTableName}
|
||||
</update>
|
||||
</mapper>
|
@ -111,4 +111,57 @@
|
||||
where name like 'ODS_PROJECT_RENT_PRICE_INFO_%' and name not like '%_bak'
|
||||
order by cast(right(name,6) as int) desc
|
||||
</select>
|
||||
<resultMap id="ultimatePriceMapping" type="com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice">
|
||||
<result property="id" column="id"/>
|
||||
<result property="communityId" column="projectID"/>
|
||||
<result property="priceType" column="priceType"/>
|
||||
<result property="basePrice_1" column="basePrice_1"/>
|
||||
<result property="rentPrice" column="rentPrice"/>
|
||||
<result property="sumCase1" column="sumCase1"/>
|
||||
<result property="voppa" column="voppa"/>
|
||||
<result property="voppat" column="voppat"/>
|
||||
<result property="gf_1Room" column="gf_1Room"/>
|
||||
<result property="gf_2Room" column="gf_2Room"/>
|
||||
<result property="gy_2Room" column="gy_2Room"/>
|
||||
<result property="gy_3Room" column="gy_3Room"/>
|
||||
<result property="one_Room" column="one_Room"/>
|
||||
<result property="two_Room" column="two_Room"/>
|
||||
<result property="three_Room" column="three_Room"/>
|
||||
<result property="entireRentRatio" column="entireRentRatio"/>
|
||||
<result property="entireRentNum" column="entireRentNum"/>
|
||||
<result property="shareRentRatio" column="shareRentRatio"/>
|
||||
<result property="shareRentNum" column="shareRentNum"/>
|
||||
<result property="saleRentRatio" column="saleRentRatio"/>
|
||||
<result property="modifyDate" column="modifyDate" jdbcType="DATE"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="adjEvd" column="adjEvd"/>
|
||||
<result property="yearMonth" column="yearMonth"/>
|
||||
</resultMap>
|
||||
<select id="getMonthly" resultMap="ultimatePriceMapping">
|
||||
SELECT ID
|
||||
,ProjectID
|
||||
,PriceType
|
||||
,BasePrice_1
|
||||
,RentPrice
|
||||
,SumCase1
|
||||
,VOPPAT
|
||||
,VOPPA
|
||||
,GF_1Room
|
||||
,GF_2Room
|
||||
,GY_2Room
|
||||
,GY_3Room
|
||||
,One_Room
|
||||
,Two_Room
|
||||
,Three_Room
|
||||
,EntireRentRatio
|
||||
,EntireRentNum
|
||||
,ShareRentRatio
|
||||
,ShareRentNum
|
||||
,SaleRentRatio
|
||||
,ModifyDate
|
||||
,Status
|
||||
,AdjEvd
|
||||
,${yearMonth} as yearMonth
|
||||
FROM dbo.ODS_PROJECT_RENT_PRICE_INFO_${yearMonth}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user