feature(优化作价平台):
1. 接入es提升查询效率 2. 配置一套module,查询买卖成交案例 3. 配置住宅租赁汇总案例module 3. 新增菜单icon
This commit is contained in:
parent
4728593c7b
commit
57a78e5c86
@ -53,38 +53,25 @@
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="width: 100%;">
|
||||
<el-table-column label="成交id" align="center" prop="dealId" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="成交类型" align="center" prop="dealType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="案例地理位置(区域、板块、环线)" align="center" prop="location" />
|
||||
<el-table-column label="案例小区名称" align="center" prop="caseCommunityName" />
|
||||
<el-table-column label="案例签约日期" align="center" prop="caseContractDate" />
|
||||
<el-table-column label="案例面积" align="center" prop="caseArea" width="180">
|
||||
<!-- <template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.loginTime) }}</span>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<!-- :show-overflow-tooltip="true" -->
|
||||
<el-table-column label="成交id" align="center" prop="dealId" width="120" />
|
||||
<el-table-column label="成交类型" align="center" prop="dealType" width="100" />
|
||||
<el-table-column label="案例位置" align="center" prop="location" width="200" />
|
||||
<el-table-column label="案例小区名称" align="center" prop="caseCommunityName" width="200" />
|
||||
<el-table-column label="案例地址" align="center" prop="caseAddress" width="300" />
|
||||
<el-table-column label="案例签约日期" align="center" prop="caseContractDate" width="100" />
|
||||
<el-table-column label="案例面积" align="center" prop="caseArea" width="180" />
|
||||
<el-table-column label="案例楼层" align="center" prop="caseFloor" />
|
||||
<el-table-column label="案例户型" align="center" prop="caseApartmentLayout" />
|
||||
<el-table-column label="案例总价(万元)" align="center" prop="caseTotalPrice" />
|
||||
<el-table-column label="案例单价(元/㎡)" align="center" prop="caseUnitPrice" />
|
||||
<el-table-column label="案例房屋类型" align="center" prop="caseHouseType" />
|
||||
<el-table-column label="案例房屋性质" align="center" prop="caseHouseProperty" />
|
||||
<el-table-column label="案例月份" align="center" prop="caseYearMonth" />
|
||||
|
||||
<el-table-column label="标准小区ID" align="center" prop="communityId" />
|
||||
<el-table-column
|
||||
label="标准楼栋ID"
|
||||
align="center"
|
||||
prop="buildingId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="标准单套ID" align="center" prop="condoId" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="清洗物业类型"
|
||||
align="center"
|
||||
prop="propertyType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="标准小区ID" align="center" prop="communityId" width="100" />
|
||||
<el-table-column label="标准楼栋ID" align="center" prop="buildingId" width="100" />
|
||||
<el-table-column label="标准单套ID" align="center" prop="condoId" width="100" />
|
||||
<el-table-column label="清洗物业类型" align="center" prop="propertyType" width="100" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -120,7 +107,7 @@ export default {
|
||||
caseCommunityName: undefined,
|
||||
caseAddress: undefined,
|
||||
pageIndex: 1,
|
||||
pageSize: 20
|
||||
pageSize: 10
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -132,7 +119,15 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
var arr = [];
|
||||
for (var i = 0; i < response.rows.length; i++) {
|
||||
var v = response.rows[i];
|
||||
v["location"] =
|
||||
v["caseDistrict"] + "/" + v["caseBlock"] + "/" + v["caseLoop"];
|
||||
arr.push(v);
|
||||
}
|
||||
console.log(arr);
|
||||
this.dataList = arr;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -145,6 +140,8 @@ export default {
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dealIdList = [];
|
||||
this.address = undefined;
|
||||
this.handleQuery();
|
||||
},
|
||||
dealIdChange(val) {
|
||||
|
@ -1,11 +1,19 @@
|
||||
package com.ruoyi.project.data.cases.controller;
|
||||
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.framework.web.page.TableSupport;
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalNewHouseCase;
|
||||
import com.ruoyi.project.data.cases.service.IAggregateResidenceRentCaseService;
|
||||
import com.ruoyi.project.data.cases.service.IOriginalNewHouseCaseService;
|
||||
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -26,6 +34,8 @@ public class CasesController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IOriginalNewHouseCaseService originalNewHouseCaseService;
|
||||
@Autowired
|
||||
private IAggregateResidenceRentCaseService aggregateResidenceRentCaseService;
|
||||
|
||||
/**
|
||||
* 一手房成交案例
|
||||
@ -38,4 +48,47 @@ public class CasesController extends BaseController {
|
||||
originalNewHouseCaseService.selectList(originalNewHouseCase);
|
||||
return getDataTable(list, total);
|
||||
}
|
||||
|
||||
/**
|
||||
* 住宅租赁案例汇总
|
||||
*
|
||||
* @param queryModel
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cases:aggregateResidenceRentCase:list')")
|
||||
@GetMapping("/residence/aggregate-rent-case/list")
|
||||
public TableDataInfo aggregateResidenceRentCaseList(AggregateResidenceRentCase queryModel) {
|
||||
int pageIndex = ServletUtils.getParameterToInt("pageIndex");
|
||||
int pageSize = ServletUtils.getParameterToInt(TableSupport.PAGE_SIZE);
|
||||
queryModel.setOffset(pageIndex <= 1 ? 0 : (pageIndex - 1) * pageSize);
|
||||
queryModel.setLimit(pageSize);
|
||||
|
||||
int total = aggregateResidenceRentCaseService.pageCount(queryModel);
|
||||
List<AggregateResidenceRentCase> list =
|
||||
aggregateResidenceRentCaseService.pageList(queryModel);
|
||||
return getDataTable(list, total);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('cases:aggregateResidenceRentCase:list')")
|
||||
@GetMapping("/residence/aggregate-rent-case/yearmonth")
|
||||
public AjaxResult yearMonthList() {
|
||||
List<VueSelectModel> list = aggregateResidenceRentCaseService.yearMonthList();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出 住宅租赁基价列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cases:aggregateResidenceRentCase:export')")
|
||||
@Log(title = "住宅租赁汇总案例", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/residence/aggregate-rent-case/export")
|
||||
public AjaxResult export(AggregateResidenceRentCase queryModel) {
|
||||
int total = aggregateResidenceRentCaseService.pageCount(queryModel);
|
||||
queryModel.setOffset(0);
|
||||
queryModel.setLimit(total);
|
||||
List<AggregateResidenceRentCase> list =
|
||||
aggregateResidenceRentCaseService.pageList(queryModel);
|
||||
ExcelUtil<AggregateResidenceRentCase> util = new ExcelUtil<>(AggregateResidenceRentCase.class);
|
||||
return util.exportExcel(list, "住宅租赁汇总案例" + queryModel.getYearMonth());
|
||||
}
|
||||
}
|
||||
|
@ -1,234 +1,293 @@
|
||||
package com.ruoyi.project.data.cases.domain;
|
||||
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 租赁汇总案例
|
||||
* 住宅租赁汇总案例
|
||||
*
|
||||
* @author lihe
|
||||
*/
|
||||
public class CleanResidenceRentAggregationCase {
|
||||
public class AggregateResidenceRentCase extends BaseEntity {
|
||||
|
||||
private Integer yearMonth;
|
||||
/**
|
||||
* 案例单套ID
|
||||
*/
|
||||
@Excel(name = "案例单套ID")
|
||||
private String householdsIdSRC;
|
||||
/**
|
||||
* 案例小区ID
|
||||
*/
|
||||
@Excel(name = "案例小区ID")
|
||||
private String projectIdSRC;
|
||||
/**
|
||||
* 小区ID
|
||||
*/
|
||||
@Excel(name = "小区ID")
|
||||
private String communityId;
|
||||
|
||||
@Excel(name = "楼栋ID")
|
||||
private String buildingId;
|
||||
/**
|
||||
* WHEN A.RentType=1 THEN ''整租''
|
||||
* WHEN A.RentType=2 THEN ''散租''
|
||||
* WHEN A.RentType=3 THEN ''分租''
|
||||
*/
|
||||
@Excel(name = "1=整租,2=散租,3=分租")
|
||||
private Integer rentType;
|
||||
/**
|
||||
* 室
|
||||
*/
|
||||
@Excel(name = "室")
|
||||
private Integer roomNum;
|
||||
/**
|
||||
* 厅
|
||||
*/
|
||||
@Excel(name = "厅")
|
||||
private Integer hallNum;
|
||||
/**
|
||||
* 卫
|
||||
*/
|
||||
@Excel(name = "卫")
|
||||
private Integer bashRoomNum;
|
||||
/**
|
||||
* 面积
|
||||
*/
|
||||
@Excel(name = "面积")
|
||||
private BigDecimal area;
|
||||
/**
|
||||
* 朝向
|
||||
*/
|
||||
@Excel(name = "朝向")
|
||||
private String toward;
|
||||
/**
|
||||
* UpperFloorSum 总层数
|
||||
*/
|
||||
@Excel(name = "总层数")
|
||||
private String totalFloor;
|
||||
/**
|
||||
* UpperFloorNum 所在层
|
||||
*/
|
||||
@Excel(name = "所在层")
|
||||
private String currentFloor;
|
||||
/**
|
||||
* 有无电梯
|
||||
*/
|
||||
@Excel(name = "有无电梯")
|
||||
private Boolean elevator;
|
||||
/**
|
||||
* 装修类型
|
||||
*/
|
||||
@Excel(name = "装修类型")
|
||||
private String decoration;
|
||||
/**
|
||||
* 建成年代
|
||||
*/
|
||||
@Excel(name = "建成年代")
|
||||
private Integer year;
|
||||
/**
|
||||
* 房屋面积系数
|
||||
*/
|
||||
@Excel(name = "房屋面积系数")
|
||||
private BigDecimal areaCoefficient;
|
||||
/**
|
||||
* 朝向系数
|
||||
*/
|
||||
@Excel(name = "朝向系数")
|
||||
private BigDecimal towardCoefficient;
|
||||
/**
|
||||
* 楼层系数
|
||||
*/
|
||||
@Excel(name = "楼层系数")
|
||||
private BigDecimal floorCoefficient;
|
||||
/**
|
||||
* 装修系数
|
||||
*/
|
||||
@Excel(name = "装修系数")
|
||||
private Integer decorationCoefficient;
|
||||
/**
|
||||
* 建成年代系数
|
||||
*/
|
||||
@Excel(name = "建成年代系数")
|
||||
private BigDecimal yearCoefficient;
|
||||
/**
|
||||
* 楼栋系数
|
||||
*/
|
||||
@Excel(name = "楼栋系数")
|
||||
private BigDecimal buildingCoefficient;
|
||||
/**
|
||||
* 室厅修正系数
|
||||
*/
|
||||
@Excel(name = "室厅修正系数")
|
||||
private BigDecimal roomTypeCoefficient;
|
||||
/**
|
||||
* 总价(元)
|
||||
*/
|
||||
@Excel(name = "总价(元)")
|
||||
private BigDecimal totalPrice;
|
||||
/**
|
||||
* 单价(元每平方米)
|
||||
*/
|
||||
@Excel(name = "单价(元/㎡)")
|
||||
private BigDecimal unitPrice;
|
||||
/**
|
||||
* 散租单价
|
||||
*/
|
||||
@Excel(name = "散租单价")
|
||||
private BigDecimal priceScatterRent;
|
||||
/**
|
||||
* 整租单价
|
||||
*/
|
||||
@Excel(name = "整租单价")
|
||||
private BigDecimal priceEntireRent;
|
||||
/**
|
||||
* 合租单间价
|
||||
*/
|
||||
@Excel(name = "合租单间价")
|
||||
private BigDecimal priceShareRent0;
|
||||
/**
|
||||
* 合租折算价
|
||||
*/
|
||||
@Excel(name = "合租折算价")
|
||||
private BigDecimal priceShareRent;
|
||||
/**
|
||||
* 带看总次数
|
||||
*/
|
||||
@Excel(name = "带看总次数")
|
||||
private Integer visitedNum;
|
||||
/**
|
||||
* 首次带看时间
|
||||
*/
|
||||
@Excel(name = "首次带看时间")
|
||||
private Date firstVisitedDate;
|
||||
/**
|
||||
* 15天内带看总次数
|
||||
*/
|
||||
@Excel(name = "15天内带看总次数")
|
||||
private Integer visitedNum15;
|
||||
/**
|
||||
* 30天内带看总次数
|
||||
*/
|
||||
@Excel(name = "30天内带看总次数")
|
||||
private Integer visitedNum30;
|
||||
/**
|
||||
* 案例状态
|
||||
*/
|
||||
@Excel(name = "案例状态")
|
||||
private Integer status;
|
||||
/**
|
||||
* 最近一次挂牌总价调整幅度
|
||||
*/
|
||||
@Excel(name = "最近一次挂牌总价调整幅度")
|
||||
private BigDecimal adjustedValue;
|
||||
/**
|
||||
* 最近一次挂牌总价调整比例
|
||||
*/
|
||||
@Excel(name = "最近一次挂牌总价调整比例")
|
||||
private BigDecimal adjustedPst;
|
||||
/**
|
||||
* 累计挂牌总价调整幅度
|
||||
*/
|
||||
@Excel(name = "累计挂牌总价调整幅度")
|
||||
private BigDecimal adjustedCumValue;
|
||||
/**
|
||||
* 累计挂牌总价调整比例
|
||||
*/
|
||||
@Excel(name = "累计挂牌总价调整比例")
|
||||
private BigDecimal adjustedCumPst;
|
||||
/**
|
||||
* 累计挂牌总价绝对调整幅度
|
||||
*/
|
||||
@Excel(name = "累计挂牌总价绝对调整幅度")
|
||||
private BigDecimal adjustedCumValueAbs;
|
||||
/**
|
||||
* 累计挂牌总价绝对调整比例
|
||||
*/
|
||||
@Excel(name = "累计挂牌总价绝对调整比例")
|
||||
private BigDecimal adjustedCumPstAbs;
|
||||
/**
|
||||
* 累计挂牌总价调价次数
|
||||
*/
|
||||
@Excel(name = "累计挂牌总价调价次数")
|
||||
private BigDecimal adjustedCumNum;
|
||||
/**
|
||||
* 首次挂牌总价
|
||||
*/
|
||||
@Excel(name = "首次挂牌总价(元)")
|
||||
private BigDecimal priceTotalIn;
|
||||
/**
|
||||
* 下架时挂牌总价
|
||||
*/
|
||||
@Excel(name = "下架时挂牌总价(元)")
|
||||
private BigDecimal priceTotalOut;
|
||||
/**
|
||||
* 首次挂牌日期
|
||||
*/
|
||||
@Excel(name = "首次挂牌日期")
|
||||
private Date priceDateIn;
|
||||
/**
|
||||
* 下架日期
|
||||
*/
|
||||
@Excel(name = "下架日期")
|
||||
private Date priceDateOut;
|
||||
/**
|
||||
* 案例来源
|
||||
*/
|
||||
@Excel(name = "案例来源")
|
||||
private String origin;
|
||||
/**
|
||||
* 案例URL
|
||||
*/
|
||||
@Excel(name = "案例URL")
|
||||
private String urlHouseholds;
|
||||
/**
|
||||
* 案例小区URL
|
||||
*/
|
||||
@Excel(name = "案例小区URL")
|
||||
private String urlProjects;
|
||||
/**
|
||||
* 案例名称
|
||||
*/
|
||||
@Excel(name = "案例名称")
|
||||
private String caseName;
|
||||
/**
|
||||
* 0=成交
|
||||
* 1=挂牌
|
||||
*/
|
||||
@Excel(name = "0=成交,1=挂牌")
|
||||
private Integer caseType;
|
||||
/**
|
||||
* 平均租金(上周期)
|
||||
*/
|
||||
@Excel(name = "平均租金(上周期)")
|
||||
private BigDecimal rentPrice_1;
|
||||
/**
|
||||
* 案例涨跌幅
|
||||
*/
|
||||
@Excel(name = "案例涨跌幅")
|
||||
private BigDecimal range;
|
||||
/**
|
||||
* 涨跌类型
|
||||
*/
|
||||
@Excel(name = "涨跌类型")
|
||||
private Integer rangeFlag;
|
||||
/**
|
||||
* 平均租金
|
||||
*/
|
||||
@Excel(name = "平均租金")
|
||||
private BigDecimal rentPrice;
|
||||
/**
|
||||
* 整租比
|
||||
*/
|
||||
@Excel(name = "整租比")
|
||||
private BigDecimal entireRentRatio;
|
||||
/**
|
||||
* 分租比
|
||||
*/
|
||||
@Excel(name = "分租比")
|
||||
private BigDecimal shareRentRatio;
|
||||
|
||||
public Integer getYearMonth() {
|
@ -0,0 +1,48 @@
|
||||
package com.ruoyi.project.data.cases.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 汇总案例查询
|
||||
*
|
||||
* @author lihe
|
||||
*/
|
||||
@DS("compute")
|
||||
public interface AggregateResidenceRentCaseMapper {
|
||||
|
||||
/**
|
||||
* 获取每月汇总案例列表
|
||||
*
|
||||
* @param yearMonth
|
||||
* @return
|
||||
*/
|
||||
List<AggregateResidenceRentCase> getMonthly(@Param("yearMonth") Integer yearMonth);
|
||||
|
||||
/**
|
||||
* 分页总数
|
||||
*
|
||||
* @param aggregateResidenceRentCase
|
||||
* @return
|
||||
*/
|
||||
int selectPageCount(AggregateResidenceRentCase aggregateResidenceRentCase);
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param aggregateResidenceRentCase
|
||||
* @return
|
||||
*/
|
||||
List<AggregateResidenceRentCase> selectPageList(AggregateResidenceRentCase aggregateResidenceRentCase);
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VueSelectModel> yearMonthList();
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package com.ruoyi.project.data.cases.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalResidenceSaleOpeningCase;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalResidenceSaleOpeningCaseQueryModel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 汇总案例查询
|
||||
*
|
||||
* @author lihe
|
||||
*/
|
||||
@DS("compute")
|
||||
public interface ResidenceRentAggregationCaseMapper {
|
||||
|
||||
/**
|
||||
* 获取每月汇总案例列表
|
||||
*
|
||||
* @param yearMonth
|
||||
* @return
|
||||
*/
|
||||
List<CleanResidenceRentAggregationCase> getMonthly(@Param("yearMonth") Integer yearMonth);
|
||||
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package com.ruoyi.project.data.cases.mapper.sync;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalResidenceRentOpeningCase;
|
||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||
import com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase;
|
||||
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lihe
|
||||
*/
|
||||
@ -24,10 +24,12 @@ public interface SyncResidenceRentCaseMapper {
|
||||
/**
|
||||
* 插入案例汇总表
|
||||
*
|
||||
* @param cleanResidenceRentAggregationCase
|
||||
* @param aggregateResidenceRentCase
|
||||
* @return
|
||||
*/
|
||||
int insertAggregationCaseTable(CleanResidenceRentAggregationCase cleanResidenceRentAggregationCase);
|
||||
int insertAggregationCaseTable(AggregateResidenceRentCase aggregateResidenceRentCase);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 创建最终价格表
|
||||
|
@ -0,0 +1,38 @@
|
||||
package com.ruoyi.project.data.cases.service;
|
||||
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 住宅租赁汇总案例Service
|
||||
*
|
||||
* @author lihe
|
||||
*/
|
||||
public interface IAggregateResidenceRentCaseService {
|
||||
|
||||
/**
|
||||
* 分页总数
|
||||
*
|
||||
* @param aggregateResidenceRentCase
|
||||
* @return
|
||||
*/
|
||||
int pageCount(AggregateResidenceRentCase aggregateResidenceRentCase);
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param aggregateResidenceRentCase
|
||||
* @return
|
||||
*/
|
||||
List<AggregateResidenceRentCase> pageList(AggregateResidenceRentCase aggregateResidenceRentCase);
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VueSelectModel> yearMonthList();
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.data.cases.service;
|
||||
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalNewHouseCase;
|
||||
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
||||
|
||||
@ -26,4 +27,11 @@ public interface IOriginalNewHouseCaseService {
|
||||
*/
|
||||
int selectCount(OriginalNewHouseCase originalNewHouseCase);
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VueSelectModel> selectYearMonth();
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,55 @@
|
||||
package com.ruoyi.project.data.cases.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.LoadUtil;
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalResidenceRentClosingCase;
|
||||
import com.ruoyi.project.data.cases.domain.OtherResidenceRentClosingCase;
|
||||
import com.ruoyi.project.data.cases.mapper.AggregateResidenceRentCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.OriginalResidenceRentClosingCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.DownloadOriginalResidenceRentClosingCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.DownloadOtherResidenceRentClosingCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.SyncResidenceRentCaseMapper;
|
||||
import com.ruoyi.project.data.cases.service.IAggregateResidenceRentCaseService;
|
||||
import com.ruoyi.project.data.cases.service.IOriginalResidenceRentClosingCaseService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 住宅租赁汇总案例Service
|
||||
*
|
||||
* @author lihe
|
||||
*/
|
||||
@Service
|
||||
@DS("compute")
|
||||
public class AggregateResidenceRentCaseServiceImpl implements IAggregateResidenceRentCaseService {
|
||||
|
||||
@Autowired
|
||||
private AggregateResidenceRentCaseMapper aggregateResidenceRentCaseMapper;
|
||||
|
||||
@Override
|
||||
public int pageCount(AggregateResidenceRentCase aggregateResidenceRentCase) {
|
||||
return aggregateResidenceRentCaseMapper.selectPageCount(aggregateResidenceRentCase);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AggregateResidenceRentCase> pageList(AggregateResidenceRentCase aggregateResidenceRentCase) {
|
||||
return aggregateResidenceRentCaseMapper.selectPageList(aggregateResidenceRentCase);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VueSelectModel> yearMonthList() {
|
||||
return aggregateResidenceRentCaseMapper.yearMonthList();
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.ruoyi.project.data.cases.service.impl;
|
||||
|
||||
import com.ruoyi.common.constant.LabelConstants;
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalNewHouseCase;
|
||||
import com.ruoyi.project.data.cases.mapper.OriginalNewHouseCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.DownloadOriginalNewHouseCaseMapper;
|
||||
@ -35,4 +36,9 @@ public class OriginalNewHouseCaseServiceImpl implements IOriginalNewHouseCaseSer
|
||||
public int selectCount(OriginalNewHouseCase originalNewHouseCase) {
|
||||
return originalNewHouseCaseMapper.pageCount(originalNewHouseCase);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VueSelectModel> selectYearMonth() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,11 @@ package com.ruoyi.project.data.cases.service.impl;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.LoadUtil;
|
||||
import com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase;
|
||||
import com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase;
|
||||
import com.ruoyi.project.data.cases.domain.OriginalResidenceRentClosingCase;
|
||||
import com.ruoyi.project.data.cases.domain.OtherResidenceRentClosingCase;
|
||||
import com.ruoyi.project.data.cases.mapper.OriginalResidenceRentClosingCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.ResidenceRentAggregationCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.AggregateResidenceRentCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.DownloadOriginalResidenceRentClosingCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.DownloadOtherResidenceRentClosingCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.SyncResidenceRentCaseMapper;
|
||||
@ -20,11 +20,8 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@ -46,7 +43,7 @@ public class OriginalResidenceRentClosingCaseServiceImpl implements IOriginalRes
|
||||
@Autowired
|
||||
private SyncResidenceRentCaseMapper syncResidenceRentCaseMapper;
|
||||
@Autowired
|
||||
private ResidenceRentAggregationCaseMapper residenceRentAggregationCaseMapper;
|
||||
private AggregateResidenceRentCaseMapper aggregateResidenceRentCaseMapper;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -145,10 +142,10 @@ public class OriginalResidenceRentClosingCaseServiceImpl implements IOriginalRes
|
||||
public void pushAggregateCase(Integer yearMonth, Integer currentPriceTableRoute) {
|
||||
// 案例同步
|
||||
syncResidenceRentCaseMapper.createAggregationCaseTable(currentPriceTableRoute);
|
||||
List<CleanResidenceRentAggregationCase> list = residenceRentAggregationCaseMapper.getMonthly(yearMonth);
|
||||
list.parallelStream().forEach(cleanResidenceRentAggregationCase -> {
|
||||
cleanResidenceRentAggregationCase.setYearMonth(currentPriceTableRoute);
|
||||
syncResidenceRentCaseMapper.insertAggregationCaseTable(cleanResidenceRentAggregationCase);
|
||||
List<AggregateResidenceRentCase> list = aggregateResidenceRentCaseMapper.getMonthly(yearMonth);
|
||||
list.parallelStream().forEach(aggregateResidenceRentCase -> {
|
||||
aggregateResidenceRentCase.setYearMonth(currentPriceTableRoute);
|
||||
syncResidenceRentCaseMapper.insertAggregationCaseTable(aggregateResidenceRentCase);
|
||||
});
|
||||
logger.info("推送案例汇总数据完成");
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ public interface ComputeResidenceRentPriceMapper {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param ComputeResidenceRentBasePrice
|
||||
* @return
|
||||
*/
|
||||
@ -40,6 +41,8 @@ public interface ComputeResidenceRentPriceMapper {
|
||||
int updateComputeResidenceRentBasePrice(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<VueSelectModel> yearMonthList();
|
||||
|
@ -6,13 +6,9 @@ import com.microsoft.sqlserver.jdbc.SQLServerDataTable;
|
||||
import com.microsoft.sqlserver.jdbc.SQLServerException;
|
||||
import com.ruoyi.common.utils.LoadUtil;
|
||||
import com.ruoyi.project.common.VueSelectModel;
|
||||
import com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase;
|
||||
import com.ruoyi.project.data.cases.domain.OfficeAggregationCase;
|
||||
import com.ruoyi.project.data.cases.mapper.ResidenceRentAggregationCaseMapper;
|
||||
import com.ruoyi.project.data.cases.mapper.sync.SyncResidenceRentCaseMapper;
|
||||
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
||||
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
||||
import com.ruoyi.project.data.price.mapper.ArtificialResidenceRentPriceMapper;
|
||||
import com.ruoyi.project.data.price.mapper.UltimateResidenceRentPriceMapper;
|
||||
|
@ -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.ResidenceRentAggregationCaseMapper">
|
||||
<resultMap id="AggregationCaseResultMapping" type="com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase">
|
||||
<mapper namespace="com.ruoyi.project.data.cases.mapper.AggregateResidenceRentCaseMapper">
|
||||
<resultMap id="AggregationCaseResultMapping" type="com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase">
|
||||
<result property="householdsIdSRC" column="HouseholdsID_SRC"/>
|
||||
<result property="projectIdSRC" column="ProjectID_SRC"/>
|
||||
<result property="communityId" column="ProjectID"/>
|
||||
@ -61,8 +61,7 @@
|
||||
<result property="shareRentRatio" column="ShareRentRatio"/>
|
||||
<result property="yearMonth" column="yearMonth"/>
|
||||
</resultMap>
|
||||
<!-- 汇总案例 -->
|
||||
<select id="getMonthly" resultMap="AggregationCaseResultMapping">
|
||||
<sql id="selectAll">
|
||||
SELECT HouseholdsID_SRC
|
||||
,ProjectID_SRC
|
||||
,ProjectID
|
||||
@ -120,5 +119,46 @@
|
||||
,ShareRentRatio
|
||||
,${yearMonth} as yearMonth
|
||||
FROM dbo.DW_HOUSINGCASE_RENT_COMM_${yearMonth}
|
||||
</sql>
|
||||
<!-- 汇总案例 -->
|
||||
<select id="getMonthly" resultMap="AggregationCaseResultMapping">
|
||||
<include refid="selectAll"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectPageCount"
|
||||
parameterType="com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase" resultType="int">
|
||||
<bind name="tableName" value="'DW_HOUSINGCASE_RENT_COMM_' + yearMonth"/>
|
||||
select count(1)
|
||||
from ${tableName}
|
||||
<where>
|
||||
<if test="caseName != null">
|
||||
caseName=#{caseName}
|
||||
</if>
|
||||
<if test="caseType != null">
|
||||
AND CaseType=#{caseType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPageList"
|
||||
parameterType="com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase" resultMap="AggregationCaseResultMapping">
|
||||
<include refid="selectAll"></include>
|
||||
<where>
|
||||
<if test="caseName != null">
|
||||
caseName=#{caseName}
|
||||
</if>
|
||||
<if test="caseType != null">
|
||||
AND CaseType=#{caseType}
|
||||
</if>
|
||||
</where>
|
||||
order by ID ASC OFFSET #{offset} rows fetch next #{limit} 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 'DW_HOUSINGCASE_RENT_COMM_%' and name not like '%_bak'
|
||||
order by cast(right(name,6) as int) desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -111,7 +111,7 @@
|
||||
|
||||
CREATE TABLE ${targetTableName}
|
||||
(
|
||||
ID int NOT NULL IDENTITY(1, 1),
|
||||
ID int NOT NULL IDENTITY(1, 1) primary key,
|
||||
HouseholdsID_SRC nvarchar (64) NOT NULL,
|
||||
ProjectID_SRC nvarchar (64) NOT NULL,
|
||||
ProjectID nvarchar (32) NULL,
|
||||
|
@ -68,7 +68,7 @@
|
||||
)
|
||||
</update>
|
||||
|
||||
<insert id="insertAggregationCaseTable" parameterType="com.ruoyi.project.data.cases.domain.CleanResidenceRentAggregationCase">
|
||||
<insert id="insertAggregationCaseTable" parameterType="com.ruoyi.project.data.cases.domain.AggregateResidenceRentCase">
|
||||
insert into dbo.DW_HOUSINGCASE_RENT_COMM_${yearMonth}
|
||||
(
|
||||
HouseholdsID_SRC
|
||||
|
@ -35,6 +35,9 @@
|
||||
<if test="dealId != null">
|
||||
ITEM_DEALID=#{dealId}
|
||||
</if>
|
||||
<if test="caseCommunityName != null">
|
||||
AND ITEM_RANAME like concat('%',#{caseCommunityName},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by ITEM_DEALID ASC offset #{offset} rows fetch next #{limit} rows only
|
||||
</select>
|
||||
@ -46,6 +49,9 @@
|
||||
<if test="dealId != null">
|
||||
ITEM_DEALID=#{dealId}
|
||||
</if>
|
||||
<if test="caseCommunityName != null">
|
||||
AND ITEM_RANAME like concat('%',#{caseCommunityName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user