数据平台接口迁移
This commit is contained in:
@ -153,7 +153,13 @@
|
||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||
where id = #{id}
|
||||
</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_IMDT_%'
|
||||
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-->
|
||||
|
@ -0,0 +1,79 @@
|
||||
<?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.basis.mapper.LianJiaCommunityDictMapper">
|
||||
|
||||
<select id="selectPageOfList" resultType="com.ruoyi.project.data.basis.domain.LianJiaCommunityDict">
|
||||
SELECT id
|
||||
,lianjia_community_id AS lianJiaCommunityid
|
||||
,lianjia_community_name as lianJiaCommunityName
|
||||
,lianjia_community_address as lianJiaCommunityAddress
|
||||
,lianjia_url as lianJiaUrl
|
||||
,lianjia_community_url as lianJiaCommunityUrl
|
||||
,community_id as communityId
|
||||
,building_id as buildingId
|
||||
,clean_community_name as cleanCommunityName
|
||||
,clean_community_address as cleanCommunityAddress
|
||||
,clean_building_address as cleanBuildingAddress
|
||||
,enable
|
||||
,create_time as createTime
|
||||
FROM lianjia_dictionary
|
||||
<where>
|
||||
<if test="lianJiaCommunityId != null">
|
||||
lianjia_community_id = #{lianJiaCommunityId}
|
||||
</if>
|
||||
<if test="enable != null">
|
||||
AND enable = #{enable}
|
||||
</if>
|
||||
<if test="communityId != null">
|
||||
AND community_id = #{communityId}
|
||||
</if>
|
||||
<if test="buildingId != null">
|
||||
AND building_id = #{buildingId}
|
||||
</if>
|
||||
<if test="lianJiaUrl != null">
|
||||
AND lianjia_url = #{lianJiaUrl}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only
|
||||
</select>
|
||||
|
||||
<select id="selectPageOfTotal" resultType="int">
|
||||
select count(1) from lianjia_dictionary
|
||||
<where>
|
||||
<if test="lianJiaCommunityId != null">
|
||||
lianjia_community_id = #{lianJiaCommunityId}
|
||||
</if>
|
||||
<if test="enable != null">
|
||||
AND enable = #{enable}
|
||||
</if>
|
||||
<if test="communityId != null">
|
||||
AND community_id = #{communityId}
|
||||
</if>
|
||||
<if test="buildingId != null">
|
||||
AND building_id = #{buildingId}
|
||||
</if>
|
||||
<if test="lianJiaUrl != null">
|
||||
AND lianjia_url = #{lianJiaUrl}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectById" resultType="com.ruoyi.project.data.basis.domain.LianJiaCommunityDict">
|
||||
SELECT id
|
||||
,lianjia_community_id AS lianJiaCommunityid
|
||||
,lianjia_community_name as lianJiaCommunityName
|
||||
,lianjia_community_address as lianJiaCommunityAddress
|
||||
,lianjia_url as lianJiaUrl
|
||||
,lianjia_community_url as lianJiaCommunityUrl
|
||||
,community_id as communityId
|
||||
,building_id as buildingId
|
||||
,clean_community_name as cleanCommunityName
|
||||
,clean_community_address as cleanCommunityAddress
|
||||
,clean_building_address as cleanBuildingAddress
|
||||
,enable
|
||||
,create_time as createTime
|
||||
FROM lianjia_dictionary
|
||||
where id=#{id}
|
||||
</select>
|
||||
</mapper>
|
@ -7,79 +7,151 @@
|
||||
<resultMap type="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
||||
id="OfficeBasePriceUltimateResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="yearMonth" column="ITEM_YEARMONTH"/>
|
||||
<result property="buildingId" column="ITEM_BUILDINGID_P"/>
|
||||
<result property="communityId" column="ITEM_PROJECTID_P"/>
|
||||
<result property="mainPrice" column="ITEM_MAINPRICE"/>
|
||||
<result property="mainPriceRent" column="ITEM_MAINPRICERENT"/>
|
||||
<result property="mainPricePst" column="ITEM_MAINPRICEPST"/>
|
||||
<result property="mainPriceRentPst" column="ITEM_MAINPRICERENTPST"/>
|
||||
<result property="mainPriceType" column="ITEM_MAINPRICETYPE"/>
|
||||
<result property="mainPriceRentType" column="ITEM_MAINPRICERENTTYPE"/>
|
||||
<result property="updateDate" column="ITEM_MODIFYDATE"/>
|
||||
<result property="status" column="ITEM_STATUS"/>
|
||||
<result property="isStandardBuilding" column="ITEM_BUILDINGSTD"/>
|
||||
<result property="adjustPriceComment" column="ITEM_ADJEVD"/>
|
||||
<result property="yearMonth" column="yearMonth"/>
|
||||
<result property="buildingId" column="BuildingID_P"/>
|
||||
<result property="communityId" column="ProjectID_P"/>
|
||||
<result property="mainPrice" column="MainPrice"/>
|
||||
<result property="mainPriceRent" column="MainPriceRent"/>
|
||||
<result property="mainPricePst" column="MainPricePst"/>
|
||||
<result property="mainPriceRentPst" column="MainPriceRentPst"/>
|
||||
<result property="mainPriceType" column="MainPriceType"/>
|
||||
<result property="mainPriceRentType" column="MainPriceRentType"/>
|
||||
<result property="updateDate" column="ModifyDate"/>
|
||||
<result property="status" column="Status"/>
|
||||
<result property="isStandardBuilding" column="BuildingStd"/>
|
||||
<result property="adjustPriceComment" column="AdjEvd"/>
|
||||
<result property="areaCoefficient" column="AreaCoff"/>
|
||||
<result property="yearCoefficient" column="YearCoff"/>
|
||||
<result property="buildingCoefficient" column="BuildingCoff"/>
|
||||
|
||||
<result property="communityName" column="ProjectName"/>
|
||||
<result property="communityAddress" column="ProjectAddr"/>
|
||||
<result property="buildingAddress" column="BuildingAddr"/>
|
||||
<result property="countyName" column="County"/>
|
||||
<result property="loopName" column="Loop"/>
|
||||
<result property="blockName" column="Block"/>
|
||||
<result property="streetName" column="Street"/>
|
||||
<result property="year" column="year"/>
|
||||
<result property="avgArea" column="AvgArea"/>
|
||||
<result property="totalFloorSum" column="TotalFloorSum"/>
|
||||
<result property="upperFloorSum" column="UpperFloorSum"/>
|
||||
<result property="officeClass" column="OfficeClass"/>
|
||||
<result property="officeLevel" column="Grade"/>
|
||||
<result property="mainPrice_1" column="mainPrice_1"/>
|
||||
<result property="mainPriceRent_1" column="mainPriceRent_1"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOfficeBasePriceUltimateVo">
|
||||
select ITEM_YEARMONTH,ITEM_BUILDINGID,ITEM_UNIFIEDID,ITEM_PROJECTID,ITEM_BUILDINGID_P,ITEM_PROJECTID_P,ITEM_MAINPRICE,ITEM_MAINPRICERENT,ITEM_MAINPRICEPST,ITEM_MAINPRICERENTPST,ITEM_MAINPRICETYPE,ITEM_MAINPRICERENTTYPE,ITEM_MODIFYDATE,ITEM_STATUS,ITEM_BUILDINGSTD,ITEM_ADJEVD,ID from TLK_计价办公核准基价
|
||||
SELECT a.ID
|
||||
,a.BuildingID_P
|
||||
,a.ProjectID_P
|
||||
,a.MainPrice
|
||||
,a.MainPriceRent
|
||||
,a.MainPricePst
|
||||
,a.MainPriceRentPst
|
||||
,a.MainPriceType
|
||||
,a.MainPriceRentType
|
||||
,a.ModifyDate
|
||||
,a.Status
|
||||
,a.BuildingStd
|
||||
,a.AdjEvd
|
||||
,b.AreaCoff
|
||||
,b.YearCoff
|
||||
,b.BuildingCoff
|
||||
,b.ProjectName
|
||||
,b.ProjectAddr
|
||||
,b.BuildingAddr
|
||||
,b.County
|
||||
,b.Loop
|
||||
,b.Block
|
||||
,b.Street
|
||||
,b.Year
|
||||
,b.AvgArea
|
||||
,b.TotalFloorSum
|
||||
,b.UpperFloorSum
|
||||
,b.OfficeClass
|
||||
,b.Grade
|
||||
,c.MainPrice AS mainPrice_1
|
||||
,c.MainPriceRent as mainPriceRent_1
|
||||
, ${yearMonth} as yearMonth
|
||||
FROM ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a
|
||||
left join DIM_OFFICE_PROJECT_BUILDING_201909 b on a.BuildingID_P=b.BuildingID_P
|
||||
left join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} c on a.BuildingID_P = c.BuildingID_P
|
||||
WHERE b.EffDate <![CDATA[ <= ]]> getdate() AND b.ExpirDate <![CDATA[ > ]]> getdate() AND A.STATUS=1 AND
|
||||
c.Status=1
|
||||
</sql>
|
||||
|
||||
<select id="selectOfficeBasePriceUltimateListCount" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice" resultType="int">
|
||||
select count(1) from TLK_计价办公核准基价
|
||||
<select id="getCount" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice" resultType="int">
|
||||
select count(1) FROM ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a
|
||||
left join DIM_OFFICE_PROJECT_BUILDING_201909 b on a.BuildingID_P=b.BuildingID_P
|
||||
left join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} c on a.BuildingID_P = c.BuildingID_P
|
||||
WHERE b.EffDate <![CDATA[ <= ]]> getdate() AND b.ExpirDate <![CDATA[ > ]]> getdate() AND A.STATUS=1 AND
|
||||
c.Status=1
|
||||
<where>
|
||||
<if test="yearMonth != null">
|
||||
AND ITEM_YEARMONTH = #{yearMonth}
|
||||
</if>
|
||||
<if test="communityId != null">
|
||||
AND ITEM_PROJECTID_P = #{communityId}
|
||||
AND a.PROJECTID_P = #{communityId}
|
||||
</if>
|
||||
<if test="buildingId != null">
|
||||
AND ITEM_BUILDINGID_P = #{buildingId}
|
||||
AND a.BUILDINGID_P = #{buildingId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND ITEM_STATUS = #{status}
|
||||
AND a.STATUS = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOfficeBasePriceUltimateList" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
||||
<select id="getList" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
||||
resultMap="OfficeBasePriceUltimateResult">
|
||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||
<where>
|
||||
<if test="yearMonth != null">
|
||||
AND ITEM_YEARMONTH = #{yearMonth}
|
||||
</if>
|
||||
<if test="communityId != null">
|
||||
AND ITEM_PROJECTID_P = #{communityId}
|
||||
AND a.PROJECTID_P = #{communityId}
|
||||
</if>
|
||||
<if test="buildingId != null">
|
||||
AND ITEM_BUILDINGID_P = #{buildingId}
|
||||
AND a.BUILDINGID_P = #{buildingId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND a.STATUS = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by ITEM_YEARMONTH DESC,ID DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
|
||||
order by a.BUILDINGID_P ASC,a.ID DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
|
||||
</select>
|
||||
|
||||
<select id="selectOfficeBasePriceUltimateById" parameterType="String" resultMap="OfficeBasePriceUltimateResult">
|
||||
<select id="getById" parameterType="String" resultMap="OfficeBasePriceUltimateResult">
|
||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- <insert id="insertOfficeBasePriceUltimate" parameterType="OfficeBasePriceUltimate" useGeneratedKeys="true"-->
|
||||
<!-- keyProperty="id">-->
|
||||
<!-- insert into office_base_price_ultimate-->
|
||||
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
|
||||
<!-- </trim>-->
|
||||
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
|
||||
<!-- </trim>-->
|
||||
<!-- </insert>-->
|
||||
|
||||
<update id="updateOfficeBasePriceUltimate" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">
|
||||
update TLK_计价办公核准基价 set ITEM_YEARMONTH=ITEM_YEARMONTH
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
</trim>
|
||||
where id = #{id}
|
||||
<insert id="copyCreate">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into
|
||||
dbo.ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}(BuildingID,UnifiedID,ProjectID,BuildingID_P,ProjectID_P,MainPrice,MainPriceRent,MainPricePst,MainPriceRentPst,MainPriceType,MainPriceRentType,ModifyDate,Status,BuildingStd,AdjEvd)
|
||||
select BuildingID,UnifiedID,ProjectID,BuildingID_P,ProjectID_P,MainPrice,MainPriceRent,MainPricePst,MainPriceRentPst,MainPriceType,MainPriceRentType,ModifyDate,0,BuildingStd,AdjEvd
|
||||
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
||||
where id=#{id}
|
||||
</insert>
|
||||
<!-- 更新 -->
|
||||
<update id="update">
|
||||
update a set ModifyDate=getdate(), mainPrice=#{mainPrice}, mainPriceRent=#{mainPriceRent},
|
||||
mainPricePst = #{mainPrice} * 1.0 / b.mainPrice, mainPriceRentPst = #{mainPriceRentPst} * 1.0 / b.mainPriceRentPst
|
||||
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} b on
|
||||
a.BuildingID_p=b.BuildingID_P
|
||||
where a.Status=1 and b.Status=1 and a.id=#{id}
|
||||
</update>
|
||||
|
||||
<!-- 获取表名 -->
|
||||
<select id="getYearMonthList" resultType="com.ruoyi.project.common.VueSelectModel">
|
||||
SELECT right(name,6) as value, right(name,6) as label
|
||||
FROM sys.tables
|
||||
where name like 'ODS_OFFICE_BUILDING_PRICE_INFO_%'
|
||||
order by cast(right(name,6) as int) desc
|
||||
</select>
|
||||
<!-- -->
|
||||
<select id="getByBuildingId" resultType="com.ruoyi.project.data.price.controller.UltimateOfficeBasePriceController">
|
||||
select id,MainPrice,MainPriceRent
|
||||
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
||||
where BuildingID_P=#{buildingI}
|
||||
</select>
|
||||
</mapper>
|
25
ruoyi/src/main/resources/mybatis/system/UploadFileMapper.xml
Normal file
25
ruoyi/src/main/resources/mybatis/system/UploadFileMapper.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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.system.mapper.UploadFileMapper">
|
||||
|
||||
<resultMap type="SysUserRole" id="SysUserRoleResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
</resultMap>
|
||||
<insert id="insert" parameterType="com.ruoyi.project.system.domain.UploadFile">
|
||||
insert into sys_file(fk, save_file_name, file_name, module_name, create_by, create_time)
|
||||
value (#{fk},#{saveFileName},#{fileName},#{moduleName},#{createBy},now());
|
||||
</insert>
|
||||
|
||||
<delete id="delete" parameterType="Long">
|
||||
delete from sys_file where id=#{id};
|
||||
</delete>
|
||||
|
||||
<select id="getByFk" parameterType="com.ruoyi.project.system.domain.UploadFile">
|
||||
select fk, save_file_name as saveFileName, file_name as fileName, module_name as moduleName, create_by as
|
||||
createBy, create_time as createTime
|
||||
from sys_file where fk=#{fk}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user