数据平台接口迁移

This commit is contained in:
purple
2020-06-02 19:42:11 +08:00
parent a2e2ae9baa
commit 83cb560f6a
35 changed files with 1902 additions and 283 deletions

View File

@ -67,4 +67,9 @@ spring:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://172.16.30.233:1433;DatabaseName=uv_compute
username: sa
password: Lcdatacenter_888
clean:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://172.16.30.233:1433;DatabaseName=uv_clean
username: sa
password: Lcdatacenter_888

View File

@ -0,0 +1,128 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
# 版本
version: 2.2.0
# 版权年份
copyrightYear: 2019
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /opt/uv/data/
# 获取ip地址开关
addressEnabled: false
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8080
servlet:
# 应用的访问路径
context-path: /
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# tomcat最大线程数默认为200
max-threads: 800
# Tomcat启动初始化的线程数默认值25
min-spare-threads: 30
# 日志配置
logging:
level:
com.ruoyi: debug
org.springframework: warn
# Spring配置
spring:
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
# 文件上传
servlet:
multipart:
# 单个文件大小
max-file-size: 50MB
# 设置总上传的文件大小
max-request-size: 50MB
# 服务模块
devtools:
restart:
# 热部署开关
enabled: true
# redis 配置
redis:
# 地址
host: 172.16.30.243
# 端口默认为6379
port: 6030
# 密码
password:
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# token配置
token:
# 令牌自定义标识
header: Authorization
# 令牌秘钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 30
# MyBatis配置
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.ruoyi.project.**.domain
# 配置mapper的扫描找到所有的mapper.xml映射文件
mapperLocations: classpath*:mybatis/**/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
# Swagger配置
swagger:
# 是否开启swagger
enabled: true
# 请求前缀
pathMapping: /dev-api
# 防止XSS攻击
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# 代码生成
gen:
# 作者
author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.project.system
# 自动去除表前缀默认是true
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: sys_

View File

@ -46,9 +46,9 @@ spring:
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
max-file-size: 50MB
# 设置总上传的文件大小
max-request-size: 20MB
max-request-size: 50MB
# 服务模块
devtools:
restart:

View File

@ -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-->

View File

@ -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>

View File

@ -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>

View 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>