bug (住宅租赁):修复导入bug
1. 添加面积字段 2. 删除插入自定义表多余字段 3. 去掉人工修正租赁基价id自增 4. 添加创建租赁视图
This commit is contained in:
parent
257ac863f8
commit
c0cc060384
@ -7,6 +7,5 @@ create type [dbo].[DWA_PROJECTBASEPRICE_RENT_MANU_Table] as table(
|
|||||||
, RentPrice_1 decimal(18, 2)
|
, RentPrice_1 decimal(18, 2)
|
||||||
, VOPPAT varchar(64)
|
, VOPPAT varchar(64)
|
||||||
, VOPPA decimal(18, 6)
|
, VOPPA decimal(18, 6)
|
||||||
, ModifyDate date
|
|
||||||
)
|
)
|
||||||
go
|
go
|
@ -62,4 +62,10 @@ public interface SyncResidenceRentCaseMapper {
|
|||||||
*/
|
*/
|
||||||
int insertUltimatePriceTable(UltimateResidenceRentBasePrice ultimateOfficeBasePrice);
|
int insertUltimatePriceTable(UltimateResidenceRentBasePrice ultimateOfficeBasePrice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param yearMonth
|
||||||
|
* @param lastYearMonth
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int createView(@Param("yearMonth") Integer yearMonth, @Param("lastYearMonth") Integer lastYearMonth);
|
||||||
}
|
}
|
||||||
|
@ -237,9 +237,9 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
ultimateResidenceRentBasePrice.setPageIndex(pageIndex <= 1 ? 0 : (pageIndex - 1) * pageSize);
|
ultimateResidenceRentBasePrice.setPageIndex(pageIndex <= 1 ? 0 : (pageIndex - 1) * pageSize);
|
||||||
ultimateResidenceRentBasePrice.setPageSize(pageSize);
|
ultimateResidenceRentBasePrice.setPageSize(pageSize);
|
||||||
|
|
||||||
int total = ultimateResidenceRentBasePriceService.selectCount(ultimateResidenceRentBasePrice);
|
int total = ultimateResidenceRentBasePriceService.selectPageCount(ultimateResidenceRentBasePrice);
|
||||||
List<UltimateResidenceRentBasePrice> list =
|
List<UltimateResidenceRentBasePrice> list =
|
||||||
ultimateResidenceRentBasePriceService.selectList(ultimateResidenceRentBasePrice);
|
ultimateResidenceRentBasePriceService.selectPageList(ultimateResidenceRentBasePrice);
|
||||||
list.forEach(x -> x.setYearMonth(ultimateResidenceRentBasePrice.getYearMonth()));
|
list.forEach(x -> x.setYearMonth(ultimateResidenceRentBasePrice.getYearMonth()));
|
||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
@ -251,11 +251,11 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
@Log(title = "审核住宅租赁基价", businessType = BusinessType.EXPORT)
|
@Log(title = "审核住宅租赁基价", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/ultimate/export")
|
@GetMapping("/ultimate/export")
|
||||||
public AjaxResult ultimateResidenceRentBasePriceExport(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
public AjaxResult ultimateResidenceRentBasePriceExport(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
||||||
int total = ultimateResidenceRentBasePriceService.selectCount(ultimateResidenceRentBasePrice);
|
int total = ultimateResidenceRentBasePriceService.selectPageCount(ultimateResidenceRentBasePrice);
|
||||||
ultimateResidenceRentBasePrice.setPageIndex(0);
|
ultimateResidenceRentBasePrice.setPageIndex(0);
|
||||||
ultimateResidenceRentBasePrice.setPageSize(total);
|
ultimateResidenceRentBasePrice.setPageSize(total);
|
||||||
List<UltimateResidenceRentBasePrice> list =
|
List<UltimateResidenceRentBasePrice> list =
|
||||||
ultimateResidenceRentBasePriceService.selectList(ultimateResidenceRentBasePrice);
|
ultimateResidenceRentBasePriceService.selectPageList(ultimateResidenceRentBasePrice);
|
||||||
ExcelUtil<UltimateResidenceRentBasePrice> util = new ExcelUtil<>(UltimateResidenceRentBasePrice.class);
|
ExcelUtil<UltimateResidenceRentBasePrice> util = new ExcelUtil<>(UltimateResidenceRentBasePrice.class);
|
||||||
return util.exportExcel(list, "核准住宅租赁基价");
|
return util.exportExcel(list, "核准住宅租赁基价");
|
||||||
}
|
}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
package com.ruoyi.project.data.price.controller;
|
|
||||||
|
|
||||||
public class UltimateResidenceSaleBasePriceController {
|
|
||||||
}
|
|
@ -58,9 +58,15 @@ public class ComputeResidenceRentBasePrice extends BaseEntity {
|
|||||||
private BigDecimal rentPriceDft;
|
private BigDecimal rentPriceDft;
|
||||||
@Excel(name = "主力面积租金(草稿)")
|
@Excel(name = "主力面积租金(草稿)")
|
||||||
private BigDecimal mainRentPriceDft;
|
private BigDecimal mainRentPriceDft;
|
||||||
|
@Excel(name = "主力面积(㎡)")
|
||||||
|
private BigDecimal area;
|
||||||
|
|
||||||
@Excel(name = "上月AI租金")
|
@Excel(name = "上月AI租金")
|
||||||
private BigDecimal rentPrice_1;
|
private BigDecimal rentPrice_1;
|
||||||
|
@Excel(name = "价格涨跌幅类型-调整后")
|
||||||
|
private String voppat;
|
||||||
|
@Excel(name = "价格涨跌幅-调整后")
|
||||||
|
private BigDecimal voppa;
|
||||||
@Excel(name = "成交均价(上周期)")
|
@Excel(name = "成交均价(上周期)")
|
||||||
private BigDecimal priceDealMean_1;
|
private BigDecimal priceDealMean_1;
|
||||||
@Excel(name = "成交最大价(上周期)")
|
@Excel(name = "成交最大价(上周期)")
|
||||||
@ -141,10 +147,7 @@ public class ComputeResidenceRentBasePrice extends BaseEntity {
|
|||||||
private String bind_MixProject_PType;
|
private String bind_MixProject_PType;
|
||||||
@Excel(name = "绑定混合小区涨跌幅")
|
@Excel(name = "绑定混合小区涨跌幅")
|
||||||
private BigDecimal bind_MixProject_Pst;
|
private BigDecimal bind_MixProject_Pst;
|
||||||
@Excel(name = "价格涨跌幅类型-调整后")
|
|
||||||
private String voppat;
|
|
||||||
@Excel(name = "价格涨跌幅-调整后")
|
|
||||||
private BigDecimal voppa;
|
|
||||||
|
|
||||||
public Integer getYearMonth() {
|
public Integer getYearMonth() {
|
||||||
return yearMonth;
|
return yearMonth;
|
||||||
@ -641,4 +644,12 @@ public class ComputeResidenceRentBasePrice extends BaseEntity {
|
|||||||
public void setVoppa(BigDecimal voppa) {
|
public void setVoppa(BigDecimal voppa) {
|
||||||
this.voppa = voppa;
|
this.voppa = voppa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArea(BigDecimal area) {
|
||||||
|
this.area = area;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import java.math.BigDecimal;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 住宅销售基价
|
||||||
*
|
*
|
||||||
|
* @author lihe
|
||||||
*/
|
*/
|
||||||
public class UltimateResidenceSaleBasePrice extends BaseEntity {
|
public class UltimateResidenceSaleBasePrice extends BaseEntity {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public interface IUltimateResidenceRentPriceService {
|
|||||||
* @param ultimateResidenceRentBasePrice
|
* @param ultimateResidenceRentBasePrice
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<UltimateResidenceRentBasePrice> selectList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
List<UltimateResidenceRentBasePrice> selectPageList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ public interface IUltimateResidenceRentPriceService {
|
|||||||
* @param ultimateResidenceRentBasePrice
|
* @param ultimateResidenceRentBasePrice
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int selectCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
int selectPageCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取表名
|
* 获取表名
|
||||||
|
@ -198,7 +198,7 @@ public class ArtificialResidenceRentPriceServiceImpl implements IArtificialResid
|
|||||||
Integer lastPriceTableRoute = new Integer(String.format("%d%02d", calendar.get(Calendar.YEAR),
|
Integer lastPriceTableRoute = new Integer(String.format("%d%02d", calendar.get(Calendar.YEAR),
|
||||||
calendar.get(Calendar.MONTH) + 1));
|
calendar.get(Calendar.MONTH) + 1));
|
||||||
|
|
||||||
// pushData(yearMonth, lastYearMonth, lastPriceTableRoute);
|
pushData(yearMonth, lastYearMonth, lastPriceTableRoute);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("住宅租赁基价人工修正异常", e);
|
log.error("住宅租赁基价人工修正异常", e);
|
||||||
}
|
}
|
||||||
@ -248,6 +248,8 @@ public class ArtificialResidenceRentPriceServiceImpl implements IArtificialResid
|
|||||||
ultimateResidenceRentBasePrice.setYearMonth(lastPriceTableRoute);
|
ultimateResidenceRentBasePrice.setYearMonth(lastPriceTableRoute);
|
||||||
syncResidenceRentCaseMapper.insertUltimatePriceTable(ultimateResidenceRentBasePrice);
|
syncResidenceRentCaseMapper.insertUltimatePriceTable(ultimateResidenceRentBasePrice);
|
||||||
});
|
});
|
||||||
|
// 生成视图
|
||||||
|
syncResidenceRentCaseMapper.createView(currentPriceTableRoute, lastPriceTableRoute);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("推送住宅租赁数据失败", e);
|
log.error("推送住宅租赁数据失败", e);
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,12 @@ public class UltimateResidenceRentPriceServiceImpl implements IUltimateResidence
|
|||||||
private UltimateResidenceRentPriceMapper ultimateResidenceRentPriceMapper;
|
private UltimateResidenceRentPriceMapper ultimateResidenceRentPriceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UltimateResidenceRentBasePrice> selectList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
public List<UltimateResidenceRentBasePrice> selectPageList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
||||||
return ultimateResidenceRentPriceMapper.selectPageList(ultimateResidenceRentBasePrice);
|
return ultimateResidenceRentPriceMapper.selectPageList(ultimateResidenceRentBasePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int selectCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
public int selectPageCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
||||||
return ultimateResidenceRentPriceMapper.selectPageCount(ultimateResidenceRentBasePrice);
|
return ultimateResidenceRentPriceMapper.selectPageCount(ultimateResidenceRentBasePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
MainCoff_Rent decimal (7, 4) NULL,
|
MainCoff_Rent decimal (7, 4) NULL,
|
||||||
RentPriceDft decimal (18, 2) NULL,
|
RentPriceDft decimal (18, 2) NULL,
|
||||||
MainRentPriceDft decimal (18, 2) NULL,
|
MainRentPriceDft decimal (18, 2) NULL,
|
||||||
|
area decimal(18,2) null,
|
||||||
RentPrice_1 decimal (18, 2) NULL,
|
RentPrice_1 decimal (18, 2) NULL,
|
||||||
PriceDealMean_1 decimal (18, 2) NULL,
|
PriceDealMean_1 decimal (18, 2) NULL,
|
||||||
PriceDealMax_1 decimal (18, 2) NULL,
|
PriceDealMax_1 decimal (18, 2) NULL,
|
||||||
|
@ -198,4 +198,38 @@
|
|||||||
IF OBJECT_ID(#{targetTableName}, 'U') IS NOT NULL
|
IF OBJECT_ID(#{targetTableName}, 'U') IS NOT NULL
|
||||||
truncate table ${targetTableName}
|
truncate table ${targetTableName}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="createView">
|
||||||
|
CREATE VIEW ODS_PROJECT_RENT_PRICE_INFO_#lastYearMonth#_VIEW AS
|
||||||
|
SELECT A.ProjectID AS "小区ID",
|
||||||
|
B.ProjectName AS "小区名称",
|
||||||
|
B.ProjectAddr AS "小区地址",
|
||||||
|
B.County AS "区域",
|
||||||
|
B.Block AS "板块",
|
||||||
|
B.Loop AS "环线",
|
||||||
|
B.InterCommunity AS "国际社区分",
|
||||||
|
B.MagnetSchool AS "重点小学名称",
|
||||||
|
B.ProjectLevel AS "物业档次",
|
||||||
|
B.RoomNum AS "室数量-AI",
|
||||||
|
A.BasePrice_1 AS "标准基价-#yearMonth#",
|
||||||
|
A.RentPrice AS "平均租金-#yearMonth#",
|
||||||
|
A.SumCase1 AS "散租挂牌案例",
|
||||||
|
A.VOPPA AS "租金涨跌幅-#yearMonth#",
|
||||||
|
A.GF_1Room AS "租金-工房1室",
|
||||||
|
A.GF_2Room AS "租金-工房2室",
|
||||||
|
A.GY_2Room AS "租金-公寓2室",
|
||||||
|
A.GY_3Room AS "租金-公寓3室",
|
||||||
|
A.One_Room AS "1房",
|
||||||
|
A.Two_Room AS "2房",
|
||||||
|
A.Three_Room AS "3房",
|
||||||
|
A.EntireRentRatio AS "整租比-#yearMonth#",
|
||||||
|
A.EntireRentNum AS "整租案例",
|
||||||
|
A.ShareRentRatio AS "分租比-#yearMonth#",
|
||||||
|
A.ShareRentNum AS "分租案例",
|
||||||
|
A.SaleRentRatio AS "租售比-#yearMonth#"
|
||||||
|
FROM ODS_PROJECT_RENT_PRICE_INFO_#lastYearMonth# A
|
||||||
|
LEFT JOIN ODS_PROJECT_INFO_202007 B
|
||||||
|
ON A.ProjectID = B.ProjectID AND B.EffDate
|
||||||
|
<![CDATA[ <= ]]> GETDATE() and B.ExpirDate <![CDATA[ > ]]> GETDATE() and A.Status=1
|
||||||
|
WHERE B.ProjectID IS NOT NULL
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
@ -635,6 +635,7 @@ insert into dbo.DWA_PROJECTBASEPRICE_RENT_IMDT_#yearMonth#
|
|||||||
,MainCoff_Rent
|
,MainCoff_Rent
|
||||||
,RentPriceDft
|
,RentPriceDft
|
||||||
,MainRentPriceDft
|
,MainRentPriceDft
|
||||||
|
,area
|
||||||
,RentPrice_1
|
,RentPrice_1
|
||||||
,PriceDealMean_1
|
,PriceDealMean_1
|
||||||
,PriceDealMax_1
|
,PriceDealMax_1
|
||||||
@ -694,6 +695,7 @@ select A.ProjectID
|
|||||||
, isnull(D.MainCoff_Rent, 1)
|
, isnull(D.MainCoff_Rent, 1)
|
||||||
, A.RentPrice_1 * (1 + isnull(C.VOPPA, 0)) as RentPriceDft
|
, A.RentPrice_1 * (1 + isnull(C.VOPPA, 0)) as RentPriceDft
|
||||||
, A.RentPrice_1 * (1 + isnull(C.VOPPA, 0)) * isnull(D.MainCoff_Rent, 1) as MainRentPriceDft
|
, A.RentPrice_1 * (1 + isnull(C.VOPPA, 0)) * isnull(D.MainCoff_Rent, 1) as MainRentPriceDft
|
||||||
|
, D.MainArea
|
||||||
, A.RentPrice_1
|
, A.RentPrice_1
|
||||||
, A.PriceDealMean_1
|
, A.PriceDealMean_1
|
||||||
, A.PriceDealMax_1
|
, A.PriceDealMax_1
|
||||||
|
@ -73,7 +73,7 @@ select a.ProjectID, a.PriceType, a.BasePrice_1, b.RentPrice, a.SumCase1, b.VOPPA
|
|||||||
a.ShareRentRatio*b.RentPrice/a.RentPrice as ShareRentRatio,
|
a.ShareRentRatio*b.RentPrice/a.RentPrice as ShareRentRatio,
|
||||||
a.ShareRentNum,
|
a.ShareRentNum,
|
||||||
a.SaleRentRatio*b.RentPrice/a.RentPrice as SaleRentRatio,
|
a.SaleRentRatio*b.RentPrice/a.RentPrice as SaleRentRatio,
|
||||||
b.ModifyDate, 1 as Status,
|
getdate(), 1 as Status,
|
||||||
case when RentPriceChg=0 then '' else 'RentPriceChg|' end +
|
case when RentPriceChg=0 then '' else 'RentPriceChg|' end +
|
||||||
case when VOPPATChg=0 then '' else 'VOPPATChg|' end +
|
case when VOPPATChg=0 then '' else 'VOPPATChg|' end +
|
||||||
case when VOPPAChg=0 then '' else 'VOPPAChg|' end as AdjEvd
|
case when VOPPAChg=0 then '' else 'VOPPAChg|' end as AdjEvd
|
||||||
@ -107,7 +107,8 @@ select a.ProjectID, a.PriceType, a.BasePrice_1, b.RentPrice_1, a.SumCase1, a.VOP
|
|||||||
a.ShareRentRatio*b.RentPrice_1/a.RentPrice as ShareRentRatio,
|
a.ShareRentRatio*b.RentPrice_1/a.RentPrice as ShareRentRatio,
|
||||||
a.ShareRentNum,
|
a.ShareRentNum,
|
||||||
a.SaleRentRatio*b.RentPrice_1/a.RentPrice as SaleRentRatio,
|
a.SaleRentRatio*b.RentPrice_1/a.RentPrice as SaleRentRatio,
|
||||||
b.ModifyDate, 1 as Status,
|
getdate(),
|
||||||
|
1 as Status,
|
||||||
'RentPrice_1Chg|' as AdjEvd
|
'RentPrice_1Chg|' as AdjEvd
|
||||||
into #InfoChgLst
|
into #InfoChgLst
|
||||||
from ODS_PROJECT_RENT_PRICE_INFO_#lastYearMonth# a
|
from ODS_PROJECT_RENT_PRICE_INFO_#lastYearMonth# a
|
||||||
@ -127,7 +128,7 @@ select * from #InfoChgLst;
|
|||||||
|
|
||||||
drop table #InfoChg, #InfoChgCurr, #InfoChgLst
|
drop table #InfoChg, #InfoChgCurr, #InfoChgLst
|
||||||
|
|
||||||
更新上月价格
|
-- 更新上月价格
|
||||||
update a
|
update a
|
||||||
set a.ITEM_MAINAREAPRICE = b.RentPrice
|
set a.ITEM_MAINAREAPRICE = b.RentPrice
|
||||||
from obpm_LianCheng_Data.dbo.TLK_基价信息 a
|
from obpm_LianCheng_Data.dbo.TLK_基价信息 a
|
||||||
@ -179,7 +180,7 @@ select newid()
|
|||||||
, 'BclzHtmfLQoAA5ICTb5'
|
, 'BclzHtmfLQoAA5ICTb5'
|
||||||
, newid()
|
, newid()
|
||||||
, ProjectID
|
, ProjectID
|
||||||
, 2
|
, 1
|
||||||
, 2
|
, 2
|
||||||
, RentPrice
|
, RentPrice
|
||||||
, '#priceDate#'
|
, '#priceDate#'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user