feat(每月作价):迁移住宅租赁基价

1. 计算、修正、最终租赁基价页面查询;
2. 导入、导出、修改、从作价数据导入;
3. 页面功能划分优化;
4. 修改路由规则
This commit is contained in:
purple
2020-06-22 18:09:42 +08:00
parent 0cb32a7463
commit 5e11233226
26 changed files with 934 additions and 586 deletions

View File

@ -14,24 +14,70 @@
<result property="rentPrice_1" column="rentPrice_1"/>
<result property="voppat" column="voppat"/>
<result property="voppa" column="voppa"/>
<result property="yearMonth" column="yearMonth"/>
</resultMap>
<select id="selectArtificialResidenceRentBasePriceListCount"
<select id="selectById" resultMap="MainMappingResult">
select * from DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth} where id=#{id};
</select>
<select id="selectPageCount"
parameterType="com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice" resultType="int">
select count(1) from DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
select count(1) from DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}
<where>
<if test="communityId != null">
AND ProjectID = #{communityId}
ProjectID like concat('%',#{communityId},'%')
</if>
</where>
</select>
<!-- 分页 -->
<select id="selectArtificialResidenceRentBasePriceList"
<select id="selectPageList"
parameterType="com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice"
resultMap="MainMappingResult">
<![CDATA[ SELECT ID,ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA ]]>
FROM dbo.DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}
order by ProjectID ASC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only
SELECT ID,ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA
FROM dbo.DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}
<where>
<if test="communityId != null">
ProjectID like concat('%',#{communityId},'%')
</if>
</where>
order by ProjectID ASC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only
</select>
<!-- 获取表名 -->
<select id="yearMonthList" resultType="com.ruoyi.project.common.VueSelectModel">
SELECT right(name,6) as value, right(name,6) as label
FROM sys.tables
where name like 'DWA_PROJECTBASEPRICE_RENT_MANU_%' and name not like '%_bak'
order by cast(right(name,6) as int) desc
</select>
<!-- 从计算作价中同步数据到人工修正表 -->
<update id="importBySync">
insert into dbo.DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}
(ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA,ModifyDate)
SELECT ProjectID,MainCoff_Rent,RentPriceDft,MainRentPriceDft,RentPrice_1,VOPPAT,VOPPA,getdate()
from dbo.DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth};
</update>
<!-- 清空人工修正表-->
<update id="clearData">
truncate table DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth};
</update>
<!-- 更新人工修正租赁基价-->
<update id="update" parameterType="com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice">
update dbo.DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}
set RentPrice=#{rentPrice},MainRentPrice=#{mainRentPrice},VOPPAT=#{voppat},VOPPA=#{voppa},RentPrice_1=#{rentPrice_1}
,ModifyDate=getdate()
where ID=#{id}
</update>
<!-- 创建存储过程-->
<update id="prepareBachImport" parameterType="int">
create procedure dbo.BatchImportOfArtificialResidenceRent @table DWA_PROJECTBASEPRICE_RENT_MANU_Table readonly
as
begin
insert into dbo.DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}(ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA,ModifyDate )
select ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA,ModifyDate
from @table;
end;
</update>
</mapper>

View File

@ -130,7 +130,7 @@
FROM dbo.DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
</sql>
<select id="selectComputeResidenceRentBasePriceListCount"
<select id="selectPageCount"
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice" resultType="int">
select count(1) from DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
<where>
@ -140,7 +140,7 @@
</where>
</select>
<!-- 分页 -->
<select id="selectComputeResidenceRentBasePriceList"
<select id="selectPageList"
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice"
resultMap="MainMappingResult">
<![CDATA[ SELECT ID,ProjectID,ProjectName,ProjectAddr,County,Block,[Loop] as loopLine,IsIndxGen,IsPstCalc,StatusRun,PropertyType,ProjectType,ProjectTypeDtl,ProjectLevel,PropertyDevPeriod,BindClassID,MainCoff_Rent,RentPriceDft,MainRentPriceDft,RentPrice_1,PriceDealMean_1,PriceDealMax_1,SumDeal_1,PriceDeal_1_ToAI_Pst,PriceDealMean,PriceDealMax,SumDeal,PriceDeal_ToAI_Pst,PriceDeal_ToLst_Pst,PriceCaseOff,PriceCaseOff_ToLst_Pst,PriceListedMin,PriceLstMn_ToAI_Pst,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,Bind_MixProject_PType,Bind_MixProject_Pst,VOPPAT,VOPPA ]]>
@ -149,7 +149,7 @@
</select>
<!-- -->
<select id="selectComputeResidenceRentBasePriceById" parameterType="String" resultMap="MainMappingResult">
<select id="selectById" parameterType="String" resultMap="MainMappingResult">
<include refid="selectOfficeBasePriceUltimateVo"/>
where id = #{id}
</select>
@ -161,11 +161,4 @@
order by cast(right(name,6) as int) desc
</select>
<!-- <update id="updateComputeResidenceRentBasePrice" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">-->
<!-- update TLK_计价办公核准基价 set ITEM_YEARMONTH=ITEM_YEARMONTH-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- </trim>-->
<!-- where id = #{id}-->
<!-- </update>-->
</mapper>

View File

@ -37,7 +37,7 @@
from ODS_PROJECT_RENT_PRICE_INFO_${yearMonth}
</sql>
<select id="selectCountByRoute" parameterType="com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice" resultType="int">
<select id="selectPageCount" parameterType="com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice" resultType="int">
select count(1) from ODS_PROJECT_RENT_PRICE_INFO_${yearMonth}
<where>
<if test="communityId != null">
@ -49,7 +49,7 @@
</where>
</select>
<select id="selectListByRoute" parameterType="com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice"
<select id="selectPageList" parameterType="com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice"
resultMap="MappingResult">
<include refid="selectAllColumn"/>
<where>
@ -62,4 +62,11 @@
</where>
order by ProjectID ASC, status DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
</select>
<select id="yearMonthList" resultType="com.ruoyi.project.common.VueSelectModel">
SELECT right(name,6) as value, right(name,6) as label
FROM sys.tables
where name like 'ODS_PROJECT_RENT_PRICE_INFO_%' and name not like '%_bak'
order by cast(right(name,6) as int) desc
</select>
</mapper>