feat(每月作价):迁移住宅租赁基价
1. 计算、修正、最终租赁基价页面查询; 2. 导入、导出、修改、从作价数据导入; 3. 页面功能划分优化; 4. 修改路由规则
This commit is contained in:
parent
0cb32a7463
commit
5e11233226
@ -3,8 +3,61 @@ import request from '@/utils/request'
|
|||||||
// 查询人工住宅租赁基价列表
|
// 查询人工住宅租赁基价列表
|
||||||
export function list(query) {
|
export function list(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/artificial/list',
|
url: '/data/rent-price/residence/artificial/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询人工住宅租赁 年月 列表
|
||||||
|
export function getYearMonthList() {
|
||||||
|
return request({
|
||||||
|
url: '/data/rent-price/residence/artificial/yearmonth',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从计算租赁租金同步到人工修正租赁租金
|
||||||
|
* @param {年月} yearMonth
|
||||||
|
*/
|
||||||
|
export function importSync(yearMonth) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rent-price/residence/artificial/importSync/' + yearMonth,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导出
|
||||||
|
* @param {查询条件} query
|
||||||
|
*/
|
||||||
|
export function export2File(query) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rent-price/residence/artificial/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单条数据
|
||||||
|
* @param {id} id
|
||||||
|
*/
|
||||||
|
export function getById(yearMonth, id) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rent-price/residence/artificial/' + yearMonth + '/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人工住宅租赁基价
|
||||||
|
* @param {表单数据} data
|
||||||
|
*/
|
||||||
|
export function update(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rent-price/residence/artificial/',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询【请填写功能名称】列表
|
// 查询计算住宅租赁基价列表
|
||||||
export function list(query) {
|
export function list(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/compute/list',
|
url: '/data/rent-price/residence/compute/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询【请填写功能名称】详细
|
// 查询计算住宅租赁基价详细
|
||||||
export function get(id) {
|
export function get(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/compute/' + id,
|
url: '/data/rent-price/residence/compute/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改【请填写功能名称】
|
// 修改计算住宅租赁基价
|
||||||
export function update(data) {
|
export function update(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/compute',
|
url: '/data/rent-price/residence/compute',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出【请填写功能名称】
|
// 导出计算住宅租赁基价
|
||||||
export function export2File(query) {
|
export function export2File(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/compute/export',
|
url: '/data/rent-price/residence/compute/export',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@ -37,7 +37,7 @@ export function export2File(query) {
|
|||||||
|
|
||||||
export function getYearMonthList() {
|
export function getYearMonthList() {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/compute/yearmonth',
|
url: '/data/rent-price/residence/compute/yearmonth',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 查询最终住宅租赁基价列表
|
// 查询最终住宅租赁基价列表
|
||||||
export function list(query) {
|
export function list(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/ultimate/list',
|
url: '/data/rent-price/residence/ultimate/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@ -12,7 +12,7 @@ export function list(query) {
|
|||||||
// 查询最终住宅租赁基价详细
|
// 查询最终住宅租赁基价详细
|
||||||
export function get(id) {
|
export function get(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/ultimate/' + id,
|
url: '/data/rent-price/residence/ultimate/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ export function get(id) {
|
|||||||
// 修改最终住宅租赁基价
|
// 修改最终住宅租赁基价
|
||||||
export function update(data) {
|
export function update(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/ultimate',
|
url: '/data/rent-price/residence/ultimate',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -29,8 +29,16 @@ export function update(data) {
|
|||||||
// 导出最终住宅租赁基价
|
// 导出最终住宅租赁基价
|
||||||
export function export2File(query) {
|
export function export2File(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rentprice/residence/ultimate/export',
|
url: '/data/rent-price/residence/ultimate/export',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询人工住宅租赁 年月 列表
|
||||||
|
export function getYearMonthList() {
|
||||||
|
return request({
|
||||||
|
url: '/data/rent-price/residence/ultimate/yearmonth',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
<el-form :model="queryParams" ref="queryForm" :rules="rules" :inline="true" label-width="100px">
|
||||||
<el-form-item label="年月" prop="yearMonth" clearable>
|
<el-form-item label="年月" prop="yearMonth">
|
||||||
<el-date-picker
|
<el-select v-model="queryParams.yearMonth" placeholder="请选择年月">
|
||||||
v-model="queryParams.yearMonth"
|
<el-option
|
||||||
format="yyyyMM"
|
v-for="item in yearMonthList"
|
||||||
value-format="yyyyMM"
|
:value="item.value"
|
||||||
type="month"
|
:label="item.label"
|
||||||
placeholder="选择年月"
|
:key="item.value"
|
||||||
@keyup.enter.native="handleQuery"
|
></el-option>
|
||||||
></el-date-picker>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||||
<el-input
|
<el-input
|
||||||
@ -26,16 +26,61 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-bell"
|
||||||
|
size="mini"
|
||||||
|
@click="handleSync"
|
||||||
|
v-hasPermi="['system:user:import']"
|
||||||
|
>从作价导入</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
size="mini"
|
||||||
|
@click="handleImport"
|
||||||
|
v-hasPermi="['system:user:import']"
|
||||||
|
>文件导入</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:user:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column label="年月" align="center" prop="yearMonth" fixed />
|
||||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
<el-table-column label="小区ID" align="center" prop="communityId" fixed />
|
||||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
|
||||||
<el-table-column label="租金主力面积系数" align="center" prop="mainRentCoefficient" />
|
<el-table-column label="租金主力面积系数" align="center" prop="mainRentCoefficient" />
|
||||||
<el-table-column label="平均租金" align="center" prop="rentPrice" />
|
<el-table-column label="平均租金" align="center" prop="rentPrice" />
|
||||||
<el-table-column label="主力面积租金" align="center" prop="mainRentPrice" />
|
<el-table-column label="主力面积租金" align="center" prop="mainRentPrice" />
|
||||||
<el-table-column label="平均租金(上周期)" align="center" prop="rentPrice_1" />
|
<el-table-column label="平均租金(上周期)" align="center" prop="rentPrice_1" />
|
||||||
<el-table-column label="价格涨跌幅类型-调整后" align="center" prop="voppat" />
|
<el-table-column label="价格涨跌幅类型-调整后" align="center" prop="voppat" />
|
||||||
<el-table-column label="价格涨跌幅-调整后" align="center" prop="voppa" />
|
<el-table-column label="价格涨跌幅-调整后" align="center" prop="voppa" />
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@ -45,23 +90,135 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
<!-- 文件上传对话框 -->
|
||||||
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:limit="1"
|
||||||
|
accept=".xlsx, .xls"
|
||||||
|
:headers="upload.headers"
|
||||||
|
:action="upload.url + '/' + queryParams.yearMonth"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
:auto-upload="false"
|
||||||
|
drag
|
||||||
|
>
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">
|
||||||
|
将文件拖到此处,或
|
||||||
|
<em>点击上传</em>
|
||||||
|
</div>
|
||||||
|
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||||
|
<div class="el-upload__tip" slot="tip">
|
||||||
|
<el-alert :title="uploadTips" type="warning" effect="dark" :closable="false"></el-alert>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 修改对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="updateRules" label-width="160px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="小区ID">
|
||||||
|
<el-input v-model="form.communityId" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="租金主力面积系数">
|
||||||
|
<el-input v-model="form.mainRentCoefficient" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="平均租金" prop="rentPrice">
|
||||||
|
<el-input v-model="form.rentPrice" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主力面积租金" prop="mainRentPrice">
|
||||||
|
<el-input v-model="form.mainRentPrice" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="平均租金(上周期)" prop="rentPrice_1">
|
||||||
|
<el-input v-model="form.rentPrice_1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="价格涨跌幅类型-调整后" prop="voppat">
|
||||||
|
<el-input v-model="form.voppat" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="价格涨跌幅-调整后" prop="voppa">
|
||||||
|
<el-input v-model="form.voppa" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="formSubmitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {
|
import {
|
||||||
list
|
getById,
|
||||||
|
list,
|
||||||
|
update,
|
||||||
|
importSync,
|
||||||
|
export2File,
|
||||||
|
getYearMonthList
|
||||||
} from "@/api/data/artificialResidenceRentPrice";
|
} from "@/api/data/artificialResidenceRentPrice";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "artificialResidenceRentBasePrice",
|
name: "artificialResidenceRentBasePrice",
|
||||||
data() {
|
data() {
|
||||||
// 年月
|
// 年月
|
||||||
var checkYearMonth = (rule, value, callback) => {
|
var yearMonthValidator = (rule, value, callback) => {
|
||||||
console.log(value);
|
if (!value) {
|
||||||
if (value === "" || !isNaN(parseInt(value))) {
|
|
||||||
callback(new Error("请输入年月"));
|
callback(new Error("请输入年月"));
|
||||||
|
} else if (value === "" || isNaN(parseInt(value))) {
|
||||||
|
callback(new Error("请输入年月"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 价格判断
|
||||||
|
var priceValidator = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("请输入价格"));
|
||||||
|
} else if (value === "" || isNaN(parseFloat(value))) {
|
||||||
|
callback(new Error("请输入价格"));
|
||||||
|
} else {
|
||||||
|
if (value <= 0) {
|
||||||
|
callback(new Error("请输入合理价格"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var numberValidator = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("请输入数字"));
|
||||||
|
} else if (value === "" || isNaN(parseFloat(value))) {
|
||||||
|
callback(new Error("请输入数字"));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@ -92,10 +249,12 @@ export default {
|
|||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
|
yearMonthList: [],
|
||||||
statusOptions: [
|
statusOptions: [
|
||||||
{ value: 1, text: "正常" },
|
{ value: 1, text: "正常" },
|
||||||
{ value: 1, text: "失效" }
|
{ value: 1, text: "失效" }
|
||||||
],
|
],
|
||||||
|
uploadTips: "",
|
||||||
upload: {
|
upload: {
|
||||||
// 是否显示弹出层(用户导入)
|
// 是否显示弹出层(用户导入)
|
||||||
open: false,
|
open: false,
|
||||||
@ -111,16 +270,45 @@ export default {
|
|||||||
"/data/rentprice/residence/artificial/importData"
|
"/data/rentprice/residence/artificial/importData"
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
url: ""
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
yearMonth: [
|
||||||
|
{ validator: yearMonthValidator, trigger: "blur" },
|
||||||
|
{ validator: yearMonthValidator, trigger: "change" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
updateRules: {
|
||||||
|
yearMonth: [
|
||||||
|
{ validator: yearMonthValidator, trigger: "blur" },
|
||||||
|
{ validator: yearMonthValidator, trigger: "change" }
|
||||||
|
],
|
||||||
|
rentPrice: [
|
||||||
|
{ validator: priceValidator, trigger: "blur" },
|
||||||
|
{ validator: priceValidator, trigger: "change" }
|
||||||
|
],
|
||||||
|
mainPriceRent: [
|
||||||
|
{ validator: priceValidator, trigger: "blur" },
|
||||||
|
{ validator: priceValidator, trigger: "change" }
|
||||||
|
],
|
||||||
|
rentPrice_1: [
|
||||||
|
{ validator: priceValidator, trigger: "blur" },
|
||||||
|
{ validator: priceValidator, trigger: "change" }
|
||||||
|
],
|
||||||
|
voppa: [
|
||||||
|
{ validator: numberValidator, trigger: "blur" },
|
||||||
|
{ validator: numberValidator, trigger: "change" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// this.getList();
|
getYearMonthList().then(response => {
|
||||||
|
this.yearMonthList = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||||
@ -139,9 +327,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询办公基价列表 */
|
/** 查询办公基价列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
|
||||||
this.$refs["queryForm"].validate(valid => {
|
this.$refs["queryForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
list(this.queryParams).then(response => {
|
list(this.queryParams).then(response => {
|
||||||
this.dataList = response.rows;
|
this.dataList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -167,6 +355,70 @@ export default {
|
|||||||
this.queryParams.pageIndex = 1;
|
this.queryParams.pageIndex = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
handleSync() {
|
||||||
|
this.$refs["queryForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
// 清除原有数据,然后导入
|
||||||
|
this.$refs["queryForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("此操作会删除原数据,是否继续?", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return importSync(this.queryParams.yearMonth);
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$refs["queryForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("是否确认导出住宅租赁基价数据项?", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(function() {
|
||||||
|
return export2File(queryParams);
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
.catch(function() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleImport() {
|
||||||
|
this.$refs["queryForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.upload.title = "人工修正住宅租赁基价导入";
|
||||||
|
this.uploadTips = "当前选中的基价月份:" + this.queryParams.yearMonth;
|
||||||
|
this.upload.open = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
const yearMonth = row.yearMonth;
|
||||||
|
getById(yearMonth, id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改住宅租赁基价";
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
@ -177,6 +429,38 @@ export default {
|
|||||||
this.ids = selection.map(item => item.id);
|
this.ids = selection.map(item => item.id);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
this.upload.open = false;
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
// 提交上传文件
|
||||||
|
submitFileForm() {
|
||||||
|
this.$refs.upload.submit();
|
||||||
|
},
|
||||||
|
formSubmitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
update(this.form).then(response => {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!"
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -36,16 +36,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['system:user:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -55,19 +45,9 @@
|
|||||||
v-hasPermi="['system:user:export']"
|
v-hasPermi="['system:user:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="info"
|
|
||||||
icon="el-icon-upload2"
|
|
||||||
size="mini"
|
|
||||||
@click="handleImport"
|
|
||||||
v-hasPermi="['system:user:import']"
|
|
||||||
>导入</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||||
<el-table-column label="小区名称" align="center" prop="communityName" />
|
<el-table-column label="小区名称" align="center" prop="communityName" />
|
||||||
@ -139,24 +119,6 @@
|
|||||||
<el-table-column label="绑定混合小区涨跌幅" align="center" prop="bind_MixProject_Pst" />
|
<el-table-column label="绑定混合小区涨跌幅" align="center" prop="bind_MixProject_Pst" />
|
||||||
<el-table-column label="价格涨跌幅类型-调整后" align="center" prop="voppat" />
|
<el-table-column label="价格涨跌幅类型-调整后" align="center" prop="voppat" />
|
||||||
<el-table-column label="价格涨跌幅-调整后" align="center" prop="voppa" />
|
<el-table-column label="价格涨跌幅-调整后" align="center" prop="voppa" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['system:user:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<!-- <el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['system:user:remove']"
|
|
||||||
>删除</el-button>-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@ -167,89 +129,6 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改办公基价对话框 -->
|
|
||||||
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="小区ID">
|
|
||||||
<el-input v-model="form.communityId" disabled="true" readonly />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="楼栋ID">
|
|
||||||
<el-input v-model="form.buildingId" disabled="true" readonly />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力基价(元/㎡)">
|
|
||||||
<el-input v-model="form.mainPrice" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力租金(元/月·㎡)">
|
|
||||||
<el-input v-model="form.mainPriceRent" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力基价涨跌幅">
|
|
||||||
<el-input v-model="form.mainPricePst" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力租金涨跌幅">
|
|
||||||
<el-input v-model="form.mainPriceRentPst" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力基价类型">
|
|
||||||
<el-input v-model="form.mainPriceType" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力租金类型">
|
|
||||||
<el-input v-model="form.mainPriceRentType" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:limit="1"
|
|
||||||
accept=".xlsx, .xls"
|
|
||||||
:headers="upload.headers"
|
|
||||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
||||||
:disabled="upload.isUploading"
|
|
||||||
:on-progress="handleFileUploadProgress"
|
|
||||||
:on-success="handleFileSuccess"
|
|
||||||
:auto-upload="false"
|
|
||||||
drag
|
|
||||||
>
|
|
||||||
<i class="el-icon-upload"></i>
|
|
||||||
<div class="el-upload__text">
|
|
||||||
将文件拖到此处,或
|
|
||||||
<em>点击上传</em>
|
|
||||||
</div>
|
|
||||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
||||||
</el-upload>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>-->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -355,7 +234,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询办公基价列表 */
|
/** 查询办公基价列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.$refs['queryForm'].validate(valid => {
|
this.$refs["queryForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
list(this.queryParams).then(response => {
|
list(this.queryParams).then(response => {
|
||||||
@ -441,6 +320,8 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
|
this.$refs["queryForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@ -453,6 +334,8 @@ export default {
|
|||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
.catch(function() {});
|
.catch(function() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.upload.title = "办公基价导入";
|
this.upload.title = "办公基价导入";
|
||||||
|
@ -519,7 +519,6 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
const yearMonth = row.yearMonth;
|
const yearMonth = row.yearMonth;
|
||||||
console.log(yearMonth);
|
|
||||||
getById(yearMonth, id).then(response => {
|
getById(yearMonth, id).then(response => {
|
||||||
// 复合信息
|
// 复合信息
|
||||||
response.data.complexRegion =
|
response.data.complexRegion =
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
<el-form :model="queryParams" ref="queryForm" :rules="rules" :inline="true" label-width="100px">
|
||||||
<el-form-item label="年月" prop="yearMonth" clearable>
|
<el-form-item label="年月" prop="yearMonth">
|
||||||
<el-date-picker
|
<el-select v-model="queryParams.yearMonth" placeholder="请选择年月">
|
||||||
v-model="queryParams.yearMonth"
|
<el-option
|
||||||
format="yyyyMM"
|
v-for="item in yearMonthList"
|
||||||
value-format="yyyyMM"
|
:value="item.value"
|
||||||
type="month"
|
:label="item.label"
|
||||||
placeholder="选择年月"
|
:key="item.value"
|
||||||
@keyup.enter.native="handleQuery"
|
></el-option>
|
||||||
></el-date-picker>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
<el-form-item label="小区ID" prop="communityId" clearable>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.communityId"
|
v-model="queryParams.communityId"
|
||||||
placeholder="请输入案例小区名称"
|
placeholder="请输入案例小区名称"
|
||||||
@ -20,6 +20,21 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="名称或地址" prop="nameOrAddress" clearable>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.nameOrAddress"
|
||||||
|
placeholder="请输入小区名称或地址"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-select v-model="queryParams.status" clearable>
|
||||||
|
<el-option label="正常" value="1"></el-option>
|
||||||
|
<el-option label="失效" value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -27,16 +42,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['system:user:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -46,19 +51,9 @@
|
|||||||
v-hasPermi="['system:user:export']"
|
v-hasPermi="['system:user:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="info"
|
|
||||||
icon="el-icon-upload2"
|
|
||||||
size="mini"
|
|
||||||
@click="handleImport"
|
|
||||||
v-hasPermi="['system:user:import']"
|
|
||||||
>导入</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||||
<el-table-column label="小区名称" align="center" prop="communityName" />
|
<el-table-column label="小区名称" align="center" prop="communityName" />
|
||||||
@ -89,25 +84,6 @@
|
|||||||
<el-table-column label="分租案例" align="center" prop="shareRentNum" />
|
<el-table-column label="分租案例" align="center" prop="shareRentNum" />
|
||||||
<el-table-column label="租售比" align="center" prop="saleRentRatio" />
|
<el-table-column label="租售比" align="center" prop="saleRentRatio" />
|
||||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormatter" />
|
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormatter" />
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['system:user:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<!-- <el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['system:user:remove']"
|
|
||||||
>删除</el-button>-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@ -117,90 +93,6 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改办公基价对话框 -->
|
|
||||||
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="小区ID">
|
|
||||||
<el-input v-model="form.communityId" disabled="true" readonly />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="楼栋ID">
|
|
||||||
<el-input v-model="form.buildingId" disabled="true" readonly />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力基价(元/㎡)">
|
|
||||||
<el-input v-model="form.mainPrice" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力租金(元/月·㎡)">
|
|
||||||
<el-input v-model="form.mainPriceRent" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力基价涨跌幅">
|
|
||||||
<el-input v-model="form.mainPricePst" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力租金涨跌幅">
|
|
||||||
<el-input v-model="form.mainPriceRentPst" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力基价类型">
|
|
||||||
<el-input v-model="form.mainPriceType" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="主力租金类型">
|
|
||||||
<el-input v-model="form.mainPriceRentType" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:limit="1"
|
|
||||||
accept=".xlsx, .xls"
|
|
||||||
:headers="upload.headers"
|
|
||||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
||||||
:disabled="upload.isUploading"
|
|
||||||
:on-progress="handleFileUploadProgress"
|
|
||||||
:on-success="handleFileSuccess"
|
|
||||||
:auto-upload="false"
|
|
||||||
drag
|
|
||||||
>
|
|
||||||
<i class="el-icon-upload"></i>
|
|
||||||
<div class="el-upload__text">
|
|
||||||
将文件拖到此处,或
|
|
||||||
<em>点击上传</em>
|
|
||||||
</div>
|
|
||||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
||||||
</el-upload>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>-->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -208,18 +100,18 @@
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {
|
import {
|
||||||
list,
|
list,
|
||||||
get,
|
export2File,
|
||||||
update,
|
getYearMonthList
|
||||||
export2File
|
|
||||||
} from "@/api/data/ultimateResidenceRentPrice";
|
} from "@/api/data/ultimateResidenceRentPrice";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "computeResidenceRentBasePrice",
|
name: "ultimateResidenceRentPrice",
|
||||||
data() {
|
data() {
|
||||||
// 年月
|
// 年月
|
||||||
var checkYearMonth = (rule, value, callback) => {
|
var yearMonthValidator = (rule, value, callback) => {
|
||||||
console.log(value);
|
if (!value) {
|
||||||
if (value === "" || !isNaN(parseInt(value))) {
|
callback(new Error("请输入年月"));
|
||||||
|
} else if (value === "" || isNaN(parseInt(value))) {
|
||||||
callback(new Error("请输入年月"));
|
callback(new Error("请输入年月"));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
@ -247,10 +139,12 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
yearMonth: undefined,
|
yearMonth: undefined,
|
||||||
communityId: undefined,
|
communityId: undefined,
|
||||||
communityName: undefined,
|
nameOrAddress: undefined,
|
||||||
|
status: undefined,
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
|
yearMonthList: [],
|
||||||
statusOptions: [
|
statusOptions: [
|
||||||
{ value: 1, text: "正常" },
|
{ value: 1, text: "正常" },
|
||||||
{ value: 1, text: "失效" }
|
{ value: 1, text: "失效" }
|
||||||
@ -273,13 +167,18 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
yearMonth: [
|
||||||
|
{ validator: yearMonthValidator, trigger: "blur" },
|
||||||
|
{ validator: yearMonthValidator, trigger: "change" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// this.getList();
|
getYearMonthList().then(response => {
|
||||||
|
this.yearMonthList = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||||
@ -298,9 +197,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询办公基价列表 */
|
/** 查询办公基价列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
|
||||||
this.$refs["queryForm"].validate(valid => {
|
this.$refs["queryForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
list(this.queryParams).then(response => {
|
list(this.queryParams).then(response => {
|
||||||
this.dataList = response.rows;
|
this.dataList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -337,50 +236,6 @@ export default {
|
|||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
|
||||||
// handleAdd() {
|
|
||||||
// this.reset();
|
|
||||||
// this.open = true;
|
|
||||||
// this.title = "添加办公基价";
|
|
||||||
// },
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids;
|
|
||||||
get(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改办公基价";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != undefined) {
|
|
||||||
update(this.form).then(response => {
|
|
||||||
if (response.code === 200) {
|
|
||||||
this.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
} else {
|
|
||||||
this.msgError(response.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// addUltimate(this.form).then(response => {
|
|
||||||
// if (response.code === 200) {
|
|
||||||
// this.msgSuccess("新增成功");
|
|
||||||
// this.open = false;
|
|
||||||
// this.getList();
|
|
||||||
// } else {
|
|
||||||
// this.msgError(response.msg);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
@ -396,26 +251,6 @@ export default {
|
|||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
.catch(function() {});
|
.catch(function() {});
|
||||||
},
|
|
||||||
handleImport() {
|
|
||||||
this.upload.title = "办公基价导入";
|
|
||||||
this.upload.open = true;
|
|
||||||
},
|
|
||||||
// 文件上传中处理
|
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
|
||||||
this.upload.isUploading = true;
|
|
||||||
},
|
|
||||||
// 文件上传成功处理
|
|
||||||
handleFileSuccess(response, file, fileList) {
|
|
||||||
this.upload.open = false;
|
|
||||||
this.upload.isUploading = false;
|
|
||||||
this.$refs.upload.clearFiles();
|
|
||||||
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
// 提交上传文件
|
|
||||||
submitFileForm() {
|
|
||||||
this.$refs.upload.submit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,7 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8080`,
|
target: `http://localhost:9700`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
package com.ruoyi.project.data.price.controller;
|
|
||||||
|
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
|
||||||
import com.ruoyi.framework.web.page.TableSupport;
|
|
||||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public class ComputeResidenceSaleBasePriceController {
|
|
||||||
|
|
||||||
}
|
|
@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.project.data.price.controller;
|
package com.ruoyi.project.data.price.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.exception.CustomException;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
@ -26,12 +28,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/data/rentprice/residence")
|
@RequestMapping("/data/rent-price/residence/")
|
||||||
public class ResidenceRentBasePriceController extends BaseController {
|
public class ResidenceRentBasePriceController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IComputeResidenceRentPriceService computeResidenceRentPriceService;
|
private IComputeResidenceRentPriceService computeResidenceRentPriceService;
|
||||||
@ -49,15 +49,15 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
@GetMapping("/compute/list")
|
@GetMapping("/compute/list")
|
||||||
public TableDataInfo list(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
public TableDataInfo computeList(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
||||||
int pageIndex = ServletUtils.getParameterToInt("pageIndex");
|
int pageIndex = ServletUtils.getParameterToInt("pageIndex");
|
||||||
int pageSize = ServletUtils.getParameterToInt(TableSupport.PAGE_SIZE);
|
int pageSize = ServletUtils.getParameterToInt(TableSupport.PAGE_SIZE);
|
||||||
computeResidenceRentBasePrice.setPageIndex(pageIndex <= 1 ? 0 : (pageIndex - 1) * pageSize);
|
computeResidenceRentBasePrice.setPageIndex(pageIndex <= 1 ? 0 : (pageIndex - 1) * pageSize);
|
||||||
computeResidenceRentBasePrice.setPageSize(pageSize);
|
computeResidenceRentBasePrice.setPageSize(pageSize);
|
||||||
|
|
||||||
int total = computeResidenceRentPriceService.selectCount(computeResidenceRentBasePrice);
|
int total = computeResidenceRentPriceService.selectPageCount(computeResidenceRentBasePrice);
|
||||||
List<ComputeResidenceRentBasePrice> list =
|
List<ComputeResidenceRentBasePrice> list =
|
||||||
computeResidenceRentPriceService.selectList(computeResidenceRentBasePrice);
|
computeResidenceRentPriceService.selectPageList(computeResidenceRentBasePrice);
|
||||||
list.forEach(x -> x.setYearMonth(computeResidenceRentBasePrice.getYearMonth()));
|
list.forEach(x -> x.setYearMonth(computeResidenceRentBasePrice.getYearMonth()));
|
||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
@ -67,9 +67,8 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
@GetMapping("/compute/yearmonth")
|
@GetMapping("/compute/yearmonth")
|
||||||
public AjaxResult yearMonthList() {
|
public AjaxResult computeYearMonthList() {
|
||||||
List<VueSelectModel> list = computeResidenceRentPriceService.getYearMonth();
|
List<VueSelectModel> list = computeResidenceRentPriceService.getYearMonth();
|
||||||
|
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,70 +78,59 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||||
@GetMapping(value = "/compute/{id}")
|
@GetMapping(value = "/compute/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||||
|
|
||||||
return AjaxResult.success(computeResidenceRentPriceService.selectById(id));
|
return AjaxResult.success(computeResidenceRentPriceService.selectById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改 住宅租赁基价
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
||||||
@Log(title = "住宅租赁基价", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping(value = "/compute")
|
|
||||||
public AjaxResult edit(@RequestBody ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
|
||||||
return toAjax(computeResidenceRentPriceService.update(computeResidenceRentBasePrice));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出 住宅租赁基价列表
|
* 导出 住宅租赁基价列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
||||||
@Log(title = "办公基价", businessType = BusinessType.EXPORT)
|
@Log(title = "住宅租赁基价", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/compute/export")
|
@GetMapping("/compute/export")
|
||||||
public AjaxResult export(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
public AjaxResult export(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
||||||
int total = computeResidenceRentPriceService.selectCount(computeResidenceRentBasePrice);
|
int total = computeResidenceRentPriceService.selectPageCount(computeResidenceRentBasePrice);
|
||||||
computeResidenceRentBasePrice.setPageIndex(0);
|
computeResidenceRentBasePrice.setPageIndex(0);
|
||||||
computeResidenceRentBasePrice.setPageSize(total);
|
computeResidenceRentBasePrice.setPageSize(total);
|
||||||
List<ComputeResidenceRentBasePrice> list =
|
List<ComputeResidenceRentBasePrice> list =
|
||||||
computeResidenceRentPriceService.selectList(computeResidenceRentBasePrice);
|
computeResidenceRentPriceService.selectPageList(computeResidenceRentBasePrice);
|
||||||
ExcelUtil<ComputeResidenceRentBasePrice> util = new ExcelUtil<>(ComputeResidenceRentBasePrice.class);
|
ExcelUtil<ComputeResidenceRentBasePrice> util = new ExcelUtil<>(ComputeResidenceRentBasePrice.class);
|
||||||
return util.exportExcel(list, "住宅租赁基价");
|
return util.exportExcel(list, "住宅租赁基价");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 办公基价导入
|
|
||||||
*
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Log(title = "办公基价", businessType = BusinessType.IMPORT)
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
||||||
@PostMapping("/compute/importData")
|
|
||||||
public AjaxResult importData(@RequestParam("id") String id, @RequestParam("module") String module,
|
|
||||||
MultipartFile file) throws Exception {
|
|
||||||
ExcelUtil<ComputeResidenceRentBasePrice> util = new ExcelUtil<>(ComputeResidenceRentBasePrice.class);
|
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
||||||
String operName = loginUser.getUsername();
|
|
||||||
// 上传文件路径
|
|
||||||
String filePath = RuoYiConfig.getUploadPath();
|
|
||||||
// 上传并返回新文件名称
|
|
||||||
String fileName = FileUploadUtils.upload(filePath, file);
|
|
||||||
UploadFile uploadFile = new UploadFile();
|
|
||||||
uploadFile.setFk(id);
|
|
||||||
uploadFile.setSaveFileName(fileName);
|
|
||||||
uploadFile.setFileName(file.getOriginalFilename());
|
|
||||||
uploadFile.setModuleName(module);
|
|
||||||
uploadFile.setCreateBy(operName);
|
|
||||||
fileService.insert(uploadFile);
|
|
||||||
|
|
||||||
// List<ComputeResidenceRentBasePrice> computeResidenceRentBasePrices = util.importExcel(file.getInputStream());
|
/**
|
||||||
// String message = computeResidenceRentPriceService.batchImport(computeResidenceRentBasePrices, operName);
|
* 查询 人工修正住宅租赁 表名
|
||||||
return AjaxResult.success("not implement");
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/artificial/yearmonth")
|
||||||
|
public AjaxResult artificialYearMonthList() {
|
||||||
|
List<VueSelectModel> list = artificialResidenceRentPriceService.getYearMonth();
|
||||||
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工修正住宅租赁
|
* 查询 人工修正住宅租赁
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/artificial/{yearMonth}/{id}")
|
||||||
|
public AjaxResult artificialById(@PathVariable("yearMonth") Integer yearMonth, @PathVariable("id") String id) {
|
||||||
|
ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice =
|
||||||
|
artificialResidenceRentPriceService.selectById(yearMonth, id);
|
||||||
|
return AjaxResult.success(artificialResidenceRentBasePrice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改 住宅租赁基价
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||||
|
@Log(title = "人工修正住宅租赁基价", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping(value = "/artificial")
|
||||||
|
public AjaxResult artificialEdit(@RequestBody ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice) {
|
||||||
|
return toAjax(artificialResidenceRentPriceService.update(artificialResidenceRentBasePrice));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 人工修正住宅租赁
|
||||||
*
|
*
|
||||||
* @param artificialResidenceRentBasePrice
|
* @param artificialResidenceRentBasePrice
|
||||||
* @return
|
* @return
|
||||||
@ -162,9 +150,81 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 住宅租赁基价列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
||||||
|
@Log(title = "人工修正住宅租赁基价", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/artificial/export")
|
||||||
|
public AjaxResult artificialExport(ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice) {
|
||||||
|
int total = artificialResidenceRentPriceService.selectCount(artificialResidenceRentBasePrice);
|
||||||
|
artificialResidenceRentBasePrice.setPageIndex(0);
|
||||||
|
artificialResidenceRentBasePrice.setPageSize(total);
|
||||||
|
List<ArtificialResidenceRentBasePrice> list =
|
||||||
|
artificialResidenceRentPriceService.selectList(artificialResidenceRentBasePrice);
|
||||||
|
ExcelUtil<ArtificialResidenceRentBasePrice> util = new ExcelUtil<>(ArtificialResidenceRentBasePrice.class);
|
||||||
|
return util.exportExcel(list, "人工修正住宅租赁基价" + artificialResidenceRentBasePrice.getYearMonth());
|
||||||
|
}
|
||||||
|
|
||||||
// 文件保存
|
/**
|
||||||
|
* 导入 人工修正住宅租赁基价
|
||||||
|
*
|
||||||
|
* @param file
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Log(title = "住宅租赁基价", businessType = BusinessType.IMPORT)
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
||||||
|
@PostMapping("/artificial/import/{yearMonth}")
|
||||||
|
public AjaxResult importData(@PathVariable("yearMonth") Integer yearMonth,
|
||||||
|
MultipartFile file) throws Exception {
|
||||||
|
ExcelUtil<ComputeResidenceRentBasePrice> util = new ExcelUtil<>(ComputeResidenceRentBasePrice.class);
|
||||||
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||||
|
String operName = loginUser.getUsername();
|
||||||
|
// 上传文件路径
|
||||||
|
String filePath = RuoYiConfig.getUploadPath();
|
||||||
|
// 上传并返回新文件名称
|
||||||
|
String fileName = FileUploadUtils.upload(filePath, file);
|
||||||
|
UploadFile uploadFile = new UploadFile();
|
||||||
|
uploadFile.setFk(yearMonth.toString());
|
||||||
|
uploadFile.setSaveFileName(fileName);
|
||||||
|
uploadFile.setFileName(file.getOriginalFilename());
|
||||||
|
uploadFile.setModuleName("人工修正住宅销售基价");
|
||||||
|
uploadFile.setCreateBy(operName);
|
||||||
|
fileService.insert(uploadFile);
|
||||||
|
|
||||||
|
List<ComputeResidenceRentBasePrice> artificialResidenceSaleBasePrices = util.importExcel(file.getInputStream
|
||||||
|
());
|
||||||
|
if (StringUtils.isNull(artificialResidenceSaleBasePrices) || artificialResidenceSaleBasePrices.size() == 0) {
|
||||||
|
throw new CustomException("人工修正住宅销售基价不能为空!");
|
||||||
|
}
|
||||||
|
String message = artificialResidenceRentPriceService.batchImport(yearMonth, artificialResidenceSaleBasePrices);
|
||||||
|
return AjaxResult.success(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步作价数据
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/artificial/importSync/{yearMonth}")
|
||||||
|
public AjaxResult artificialImportBySync(@PathVariable Integer yearMonth) {
|
||||||
|
artificialResidenceRentPriceService.importBySync(yearMonth);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 最终住宅租赁 表名
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/ultimate/yearmonth")
|
||||||
|
public AjaxResult ultimateYearMonthList() {
|
||||||
|
List<VueSelectModel> list = ultimateResidenceRentBasePriceService.getYearMonth();
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询 住宅租赁基价列表
|
* 查询 住宅租赁基价列表
|
||||||
@ -184,30 +244,6 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 人工审核住宅租赁基价导入(模板)
|
|
||||||
* 记录变化的值和变化次数
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 住宅租赁基价详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
|
||||||
@GetMapping(value = "/ultimate/{id}")
|
|
||||||
public AjaxResult ultimateResidenceRentBasePriceGet(@PathVariable("id") Integer id) {
|
|
||||||
return AjaxResult.success(ultimateResidenceRentBasePriceService.selectById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改 住宅租赁基价
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
||||||
@Log(title = "住宅租赁基价", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping(value = "/ultimate")
|
|
||||||
public AjaxResult ultimateResidenceRentBasePriceEdit(@RequestBody UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
|
||||||
return toAjax(ultimateResidenceRentBasePriceService.update(ultimateResidenceRentBasePrice));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出 住宅租赁基价列表
|
* 导出 住宅租赁基价列表
|
||||||
*/
|
*/
|
||||||
@ -223,5 +259,4 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
ExcelUtil<UltimateResidenceRentBasePrice> util = new ExcelUtil<>(UltimateResidenceRentBasePrice.class);
|
ExcelUtil<UltimateResidenceRentBasePrice> util = new ExcelUtil<>(UltimateResidenceRentBasePrice.class);
|
||||||
return util.exportExcel(list, "核准住宅租赁基价");
|
return util.exportExcel(list, "核准住宅租赁基价");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ public class ResidenceSaleBasePriceController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Log(title = "办公基价", businessType = BusinessType.IMPORT)
|
@Log(title = "住宅售价基价", businessType = BusinessType.IMPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
||||||
@PostMapping("/artificial/importData/{yearMonth}")
|
@PostMapping("/artificial/importData/{yearMonth}")
|
||||||
public AjaxResult importData(@PathVariable("yearMonth") Integer yearMonth,
|
public AjaxResult importData(@PathVariable("yearMonth") Integer yearMonth,
|
||||||
|
@ -4,6 +4,7 @@ import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
|||||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工修正住宅租赁对象
|
* 人工修正住宅租赁对象
|
||||||
@ -37,6 +38,20 @@ public class ArtificialResidenceRentBasePrice extends BaseEntity {
|
|||||||
@Excel(name = "价格涨跌幅-调整后")
|
@Excel(name = "价格涨跌幅-调整后")
|
||||||
private BigDecimal voppa;
|
private BigDecimal voppa;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价值时点
|
||||||
|
*/
|
||||||
|
private Date valuePoint;
|
||||||
|
/**
|
||||||
|
* 上期价值时点
|
||||||
|
*/
|
||||||
|
private Date lastValuePoint;
|
||||||
|
/**
|
||||||
|
* 价格id(随机生成)
|
||||||
|
*/
|
||||||
|
private String priceId;
|
||||||
|
|
||||||
|
|
||||||
public Integer getYearMonth() {
|
public Integer getYearMonth() {
|
||||||
return yearMonth;
|
return yearMonth;
|
||||||
}
|
}
|
||||||
@ -124,4 +139,28 @@ public class ArtificialResidenceRentBasePrice extends BaseEntity {
|
|||||||
public void setVoppa(BigDecimal voppa) {
|
public void setVoppa(BigDecimal voppa) {
|
||||||
this.voppa = voppa;
|
this.voppa = voppa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getValuePoint() {
|
||||||
|
return valuePoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValuePoint(Date valuePoint) {
|
||||||
|
this.valuePoint = valuePoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastValuePoint() {
|
||||||
|
return lastValuePoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastValuePoint(Date lastValuePoint) {
|
||||||
|
this.lastValuePoint = lastValuePoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPriceId() {
|
||||||
|
return priceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPriceId(String priceId) {
|
||||||
|
this.priceId = priceId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package com.ruoyi.project.data.price.mapper;
|
package com.ruoyi.project.data.price.mapper;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -14,7 +17,53 @@ import java.util.List;
|
|||||||
@DS("compute")
|
@DS("compute")
|
||||||
public interface ArtificialResidenceRentPriceMapper {
|
public interface ArtificialResidenceRentPriceMapper {
|
||||||
|
|
||||||
List<ArtificialResidenceRentBasePrice> selectArtificialResidenceRentBasePriceList(ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice);
|
/**
|
||||||
|
* 单条记录
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ArtificialResidenceRentBasePrice selectById(@Param("yearMonth") Integer yearMonth, @Param("id") String id);
|
||||||
|
|
||||||
Integer selectArtificialResidenceRentBasePriceListCount(ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice);
|
List<ArtificialResidenceRentBasePrice> selectPageList(ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice);
|
||||||
|
|
||||||
|
Integer selectPageCount(ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> yearMonthList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从作价数据拷贝数据到人工修正
|
||||||
|
* 先删除原数据,然后再插入。
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int importBySync(@Param("yearMonth") Integer yearMonth);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空数据
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int clearData(@Param("yearMonth") Integer yearMonth);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param artificialResidenceRentBasePrice
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int update(ArtificialResidenceRentBasePrice artificialResidenceRentBasePrice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用于批量导入的存储过程
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int prepareBachImport(@Param("yearMonth") Integer yearMonth);
|
||||||
}
|
}
|
@ -56,15 +56,6 @@ public interface ArtificialResidenceSaleBasePriceMapper {
|
|||||||
*/
|
*/
|
||||||
int prepareBachImport(@Param("yearMonth") Integer yearMonth);
|
int prepareBachImport(@Param("yearMonth") Integer yearMonth);
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 修改数据
|
|
||||||
// *
|
|
||||||
// * @param artificialResidenceSaleBasePrice
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// int updatePrice(ArtificialResidenceSaleBasePrice artificialResidenceSaleBasePrice);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表
|
* 分页列表
|
||||||
*
|
*
|
||||||
|
@ -14,12 +14,12 @@ public interface ComputeResidenceRentPriceMapper {
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ComputeResidenceRentBasePrice selectComputeResidenceRentBasePriceById(String id);
|
ComputeResidenceRentBasePrice selectById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
List<ComputeResidenceRentBasePrice> selectComputeResidenceRentBasePriceList(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
List<ComputeResidenceRentBasePrice> selectPageList(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 求和
|
* 求和
|
||||||
@ -27,7 +27,7 @@ public interface ComputeResidenceRentPriceMapper {
|
|||||||
* @param ComputeResidenceRentBasePrice
|
* @param ComputeResidenceRentBasePrice
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer selectComputeResidenceRentBasePriceListCount(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
Integer selectPageCount(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.project.data.price.mapper;
|
package com.ruoyi.project.data.price.mapper;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
||||||
@ -16,20 +17,13 @@ import java.util.List;
|
|||||||
@DS("compute")
|
@DS("compute")
|
||||||
public interface UltimateResidenceRentPriceMapper {
|
public interface UltimateResidenceRentPriceMapper {
|
||||||
|
|
||||||
|
List<UltimateResidenceRentBasePrice> selectPageList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
||||||
|
|
||||||
List<UltimateResidenceRentBasePrice> selectListByRoute(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
Integer selectPageCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
||||||
|
|
||||||
Integer selectCountByRoute(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param id
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
UltimateResidenceRentBasePrice selectByRoute(Integer id);
|
List<VueSelectModel> yearMonthList();
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ultimateResidenceRentBasePrice
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateByRoute(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.ruoyi.project.data.price.service;
|
package com.ruoyi.project.data.price.service;
|
||||||
|
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
||||||
|
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -12,6 +15,15 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface IArtificialResidenceRentPriceService {
|
public interface IArtificialResidenceRentPriceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单条记录
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ArtificialResidenceRentBasePrice selectById(Integer yearMonth, String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询人工修正住宅租赁列表
|
* 查询人工修正住宅租赁列表
|
||||||
*
|
*
|
||||||
@ -26,7 +38,33 @@ public interface IArtificialResidenceRentPriceService {
|
|||||||
*/
|
*/
|
||||||
int selectCount(ArtificialResidenceRentBasePrice officeBasePriceUltimate);
|
int selectCount(ArtificialResidenceRentBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取表名
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> getYearMonth();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param yearMonth
|
||||||
|
*/
|
||||||
|
void importBySync(Integer yearMonth);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
* @param officeBasePriceUltimate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int update(ArtificialResidenceRentBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String batchImport(Integer yearMonth, List<ComputeResidenceRentBasePrice> list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Service接口
|
* Service接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2020-05-20
|
* @date 2020-05-20
|
||||||
@ -16,18 +16,18 @@ import java.util.List;
|
|||||||
public interface IComputeResidenceRentPriceService {
|
public interface IComputeResidenceRentPriceService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询列表
|
||||||
*
|
*
|
||||||
* @param officeBasePriceUltimate 【请填写功能名称】
|
* @param officeBasePriceUltimate
|
||||||
* @return 【请填写功能名称】集合
|
* @return 集合
|
||||||
*/
|
*/
|
||||||
List<ComputeResidenceRentBasePrice> selectList(ComputeResidenceRentBasePrice officeBasePriceUltimate);
|
List<ComputeResidenceRentBasePrice> selectPageList(ComputeResidenceRentBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param officeBasePriceUltimate
|
* @param officeBasePriceUltimate
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int selectCount(ComputeResidenceRentBasePrice officeBasePriceUltimate);
|
int selectPageCount(ComputeResidenceRentBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param id
|
* @param id
|
||||||
@ -35,19 +35,6 @@ public interface IComputeResidenceRentPriceService {
|
|||||||
*/
|
*/
|
||||||
ComputeResidenceRentBasePrice selectById(String id);
|
ComputeResidenceRentBasePrice selectById(String id);
|
||||||
|
|
||||||
/**
|
|
||||||
* @param officeBasePriceUltimate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int update(ComputeResidenceRentBasePrice officeBasePriceUltimate);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param officeBasePriceUltimates
|
|
||||||
* @param operName
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String batchImport(List<ComputeResidenceRentBasePrice> officeBasePriceUltimates, String operName);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取表名
|
* 获取表名
|
||||||
*
|
*
|
||||||
|
@ -1,24 +1,36 @@
|
|||||||
package com.ruoyi.project.data.price.service;
|
package com.ruoyi.project.data.price.service;
|
||||||
|
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
|
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||||
|
import com.ruoyi.project.data.price.domain.ComputeResidenceSaleBasePrice;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ruoyi
|
* 住宅租赁基价
|
||||||
* @date 2020-05-20
|
|
||||||
*/
|
*/
|
||||||
public interface IUltimateResidenceRentBasePriceService {
|
public interface IUltimateResidenceRentBasePriceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ultimateResidenceRentBasePrice
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<UltimateResidenceRentBasePrice> selectList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
List<UltimateResidenceRentBasePrice> selectList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ultimateResidenceRentBasePrice
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int selectCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
int selectCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
||||||
|
|
||||||
UltimateResidenceRentBasePrice selectById(Integer id);
|
/**
|
||||||
|
* 获取表名
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> getYearMonth();
|
||||||
|
|
||||||
int update(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice);
|
|
||||||
|
|
||||||
String batchImport(List<UltimateResidenceRentBasePrice> ultimateResidenceRentBasePrices, String operName);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,22 +1,37 @@
|
|||||||
package com.ruoyi.project.data.price.service.impl;
|
package com.ruoyi.project.data.price.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.microsoft.sqlserver.jdbc.SQLServerCallableStatement;
|
||||||
|
import com.microsoft.sqlserver.jdbc.SQLServerDataTable;
|
||||||
|
import com.microsoft.sqlserver.jdbc.SQLServerException;
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice;
|
||||||
|
import com.ruoyi.project.data.price.domain.ArtificialResidenceSaleBasePrice;
|
||||||
|
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||||
import com.ruoyi.project.data.price.mapper.ArtificialResidenceRentPriceMapper;
|
import com.ruoyi.project.data.price.mapper.ArtificialResidenceRentPriceMapper;
|
||||||
import com.ruoyi.project.data.price.service.IArtificialResidenceRentPriceService;
|
import com.ruoyi.project.data.price.service.IArtificialResidenceRentPriceService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.sql.*;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Service业务层处理
|
* Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2020-05-20
|
* @date 2020-05-20
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@DS("compute")
|
||||||
public class ArtificialResidenceRentPriceServiceImpl implements IArtificialResidenceRentPriceService {
|
public class ArtificialResidenceRentPriceServiceImpl implements IArtificialResidenceRentPriceService {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(ArtificialResidenceRentPriceServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(ArtificialResidenceRentPriceServiceImpl.class);
|
||||||
@ -24,16 +39,134 @@ public class ArtificialResidenceRentPriceServiceImpl implements IArtificialResid
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ArtificialResidenceRentPriceMapper artificialResidenceRentPriceMapper;
|
private ArtificialResidenceRentPriceMapper artificialResidenceRentPriceMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArtificialResidenceRentBasePrice selectById(Integer yearMonth, String id) {
|
||||||
|
ArtificialResidenceRentBasePrice residenceRentBasePrice =
|
||||||
|
artificialResidenceRentPriceMapper.selectById(yearMonth, id);
|
||||||
|
residenceRentBasePrice.setYearMonth(yearMonth);
|
||||||
|
return residenceRentBasePrice;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ArtificialResidenceRentBasePrice> selectList(ArtificialResidenceRentBasePrice
|
public List<ArtificialResidenceRentBasePrice> selectList(ArtificialResidenceRentBasePrice
|
||||||
ArtificialResidenceRentPrice) {
|
ArtificialResidenceRentPrice) {
|
||||||
return artificialResidenceRentPriceMapper.selectArtificialResidenceRentBasePriceList
|
return artificialResidenceRentPriceMapper.selectPageList
|
||||||
(ArtificialResidenceRentPrice);
|
(ArtificialResidenceRentPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int selectCount(ArtificialResidenceRentBasePrice ArtificialResidenceRentPrice) {
|
public int selectCount(ArtificialResidenceRentBasePrice ArtificialResidenceRentPrice) {
|
||||||
return artificialResidenceRentPriceMapper.selectArtificialResidenceRentBasePriceListCount
|
return artificialResidenceRentPriceMapper.selectPageCount
|
||||||
(ArtificialResidenceRentPrice);
|
(ArtificialResidenceRentPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VueSelectModel> getYearMonth() {
|
||||||
|
return artificialResidenceRentPriceMapper.yearMonthList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void importBySync(Integer yearMonth) {
|
||||||
|
artificialResidenceRentPriceMapper.clearData(yearMonth);
|
||||||
|
artificialResidenceRentPriceMapper.importBySync(yearMonth);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int update(ArtificialResidenceRentBasePrice officeBasePriceUltimate) {
|
||||||
|
return artificialResidenceRentPriceMapper.update(officeBasePriceUltimate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量导入
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @param computeResidenceRentBasePrices
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String batchImport(Integer yearMonth, List<ComputeResidenceRentBasePrice> computeResidenceRentBasePrices) {
|
||||||
|
int successNum = computeResidenceRentBasePrices.size();
|
||||||
|
int failureNum = 0;
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.set(yearMonth / 100, (yearMonth % 100) - 1, 1);
|
||||||
|
Date valuePoint = calendar.getTime();
|
||||||
|
calendar.add(Calendar.MONTH, -1);
|
||||||
|
Date lastValuePoint = calendar.getTime();
|
||||||
|
|
||||||
|
artificialResidenceRentPriceMapper.prepareBachImport(yearMonth);
|
||||||
|
CopyOnWriteArrayList<ArtificialResidenceRentBasePrice> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
|
||||||
|
computeResidenceRentBasePrices.parallelStream().forEach(inputModel -> {
|
||||||
|
ArtificialResidenceRentBasePrice artificialResidenceSaleBasePrice =
|
||||||
|
new ArtificialResidenceRentBasePrice();
|
||||||
|
BeanUtils.copyProperties(inputModel,
|
||||||
|
artificialResidenceSaleBasePrice);
|
||||||
|
|
||||||
|
artificialResidenceSaleBasePrice.setYearMonth(yearMonth);
|
||||||
|
artificialResidenceSaleBasePrice.setPriceId(UUID.randomUUID().toString());
|
||||||
|
artificialResidenceSaleBasePrice.setValuePoint(valuePoint);
|
||||||
|
artificialResidenceSaleBasePrice.setLastValuePoint(lastValuePoint);
|
||||||
|
copyOnWriteArrayList.add(artificialResidenceSaleBasePrice);
|
||||||
|
});
|
||||||
|
Date today = new Date();
|
||||||
|
try {
|
||||||
|
// 声明变量
|
||||||
|
// 构造一个
|
||||||
|
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||||
|
String dbURL = "jdbc:sqlserver://172.16.30.233:1433;DatabaseName=uv_compute";
|
||||||
|
String name = "sa";
|
||||||
|
String pwd = "Lcdatacenter_888";
|
||||||
|
Class.forName(driverName);
|
||||||
|
Connection conn = DriverManager.getConnection(dbURL, name, pwd);
|
||||||
|
SQLServerDataTable sourceDataTable = new SQLServerDataTable();
|
||||||
|
sourceDataTable.addColumnMetadata("ProjectID", java.sql.Types.NVARCHAR);
|
||||||
|
sourceDataTable.addColumnMetadata("MainCoff_Rent", java.sql.Types.DECIMAL);
|
||||||
|
sourceDataTable.addColumnMetadata("RentPrice", java.sql.Types.DECIMAL);
|
||||||
|
sourceDataTable.addColumnMetadata("MainRentPrice", java.sql.Types.DECIMAL);
|
||||||
|
sourceDataTable.addColumnMetadata("RentPrice_1", java.sql.Types.DECIMAL);
|
||||||
|
sourceDataTable.addColumnMetadata("VOPPAT", java.sql.Types.NVARCHAR);
|
||||||
|
sourceDataTable.addColumnMetadata("VOPPA", java.sql.Types.DECIMAL);
|
||||||
|
sourceDataTable.addColumnMetadata("ModifyDate", java.sql.Types.DATE);
|
||||||
|
|
||||||
|
copyOnWriteArrayList.forEach(x -> {
|
||||||
|
try {
|
||||||
|
sourceDataTable.addRow(
|
||||||
|
x.getCommunityId(),
|
||||||
|
x.getMainRentCoefficient(),
|
||||||
|
x.getRentPrice(),
|
||||||
|
x.getMainRentPrice(),
|
||||||
|
x.getRentPrice_1(),
|
||||||
|
x.getVoppat(),
|
||||||
|
x.getVoppa(),
|
||||||
|
today
|
||||||
|
);
|
||||||
|
} catch (SQLServerException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Statement statement = conn.createStatement();
|
||||||
|
|
||||||
|
|
||||||
|
try (CallableStatement cs = conn.prepareCall("{CALL dbo.BatchImportOfArtificialResidenceRent (?)}")) {
|
||||||
|
((SQLServerCallableStatement) cs).setStructured(1, "dbo.DWA_PROJECTBASEPRICE_RENT_MANU_Table",
|
||||||
|
sourceDataTable);
|
||||||
|
boolean resultSetReturned = cs.execute();
|
||||||
|
if (resultSetReturned) {
|
||||||
|
try (ResultSet rs = cs.getResultSet()) {
|
||||||
|
rs.next();
|
||||||
|
System.out.println(rs.getInt(1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 删除存储过程,还原环境
|
||||||
|
statement.execute("drop procedure BatchImportOfArtificialResidenceRent");
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder successMsg = new StringBuilder("恭喜您,数据已全部导入成功!共 " + (successNum - failureNum) + " 条");
|
||||||
|
return successMsg.toString();
|
||||||
|
}
|
||||||
}
|
}
|
@ -86,7 +86,6 @@ public class ArtificialResidenceSalePriceServiceImpl implements IArtificialResid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// @Transactional
|
|
||||||
public String batchImport(Integer yearMonth, List<ComputeResidenceSaleBasePrice> list) {
|
public String batchImport(Integer yearMonth, List<ComputeResidenceSaleBasePrice> list) {
|
||||||
|
|
||||||
int successNum = list.size();
|
int successNum = list.size();
|
||||||
|
@ -11,12 +11,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* 【请填写功能名称】Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2020-05-20
|
|
||||||
*/
|
|
||||||
@Service
|
@Service
|
||||||
public class ComputeResidenceRentPriceServiceImpl implements IComputeResidenceRentPriceService {
|
public class ComputeResidenceRentPriceServiceImpl implements IComputeResidenceRentPriceService {
|
||||||
|
|
||||||
@ -26,32 +21,24 @@ public class ComputeResidenceRentPriceServiceImpl implements IComputeResidenceRe
|
|||||||
private ComputeResidenceRentPriceMapper computeResidenceRentPriceMapper;
|
private ComputeResidenceRentPriceMapper computeResidenceRentPriceMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ComputeResidenceRentBasePrice> selectList(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
public List<ComputeResidenceRentBasePrice> selectPageList(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
||||||
return computeResidenceRentPriceMapper.selectComputeResidenceRentBasePriceList(computeResidenceRentBasePrice);
|
return computeResidenceRentPriceMapper.selectPageList(computeResidenceRentBasePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int selectCount(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
public int selectPageCount(ComputeResidenceRentBasePrice computeResidenceRentBasePrice) {
|
||||||
return computeResidenceRentPriceMapper.selectComputeResidenceRentBasePriceListCount(computeResidenceRentBasePrice);
|
return computeResidenceRentPriceMapper.selectPageCount(computeResidenceRentBasePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ComputeResidenceRentBasePrice selectById(String id) {
|
public ComputeResidenceRentBasePrice selectById(String id) {
|
||||||
return computeResidenceRentPriceMapper.selectComputeResidenceRentBasePriceById(id);
|
return computeResidenceRentPriceMapper.selectById(id);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int update(ComputeResidenceRentBasePrice officeBasePriceUltimate) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String batchImport(List<ComputeResidenceRentBasePrice> officeBasePriceUltimates, String operName) {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<VueSelectModel> getYearMonth() {
|
public List<VueSelectModel> getYearMonth() {
|
||||||
return computeResidenceRentPriceMapper.yearMonthList();
|
return computeResidenceRentPriceMapper.yearMonthList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package com.ruoyi.project.data.price.service.impl;
|
package com.ruoyi.project.data.price.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
|
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateResidenceRentBasePrice;
|
||||||
import com.ruoyi.project.data.price.mapper.UltimateResidenceRentPriceMapper;
|
import com.ruoyi.project.data.price.mapper.UltimateResidenceRentPriceMapper;
|
||||||
import com.ruoyi.project.data.price.service.IUltimateResidenceRentBasePriceService;
|
import com.ruoyi.project.data.price.service.IUltimateResidenceRentBasePriceService;
|
||||||
import com.ruoyi.project.system.service.impl.SysUserServiceImpl;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -27,26 +28,18 @@ public class UltimateResidenceRentBasePriceServiceImpl implements IUltimateResid
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UltimateResidenceRentBasePrice> selectList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
public List<UltimateResidenceRentBasePrice> selectList(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
||||||
return ultimateResidenceRentPriceMapper.selectListByRoute(ultimateResidenceRentBasePrice);
|
return ultimateResidenceRentPriceMapper.selectPageList(ultimateResidenceRentBasePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int selectCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
public int selectCount(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
||||||
return ultimateResidenceRentPriceMapper.selectCountByRoute(ultimateResidenceRentBasePrice);
|
return ultimateResidenceRentPriceMapper.selectPageCount(ultimateResidenceRentBasePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UltimateResidenceRentBasePrice selectById(Integer id) {
|
public List<VueSelectModel> getYearMonth() {
|
||||||
return ultimateResidenceRentPriceMapper.selectByRoute(id);
|
return ultimateResidenceRentPriceMapper.yearMonthList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int update(UltimateResidenceRentBasePrice ultimateResidenceRentBasePrice) {
|
|
||||||
return ultimateResidenceRentPriceMapper.updateByRoute(ultimateResidenceRentBasePrice);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String batchImport(List<UltimateResidenceRentBasePrice> ultimateResidenceRentBasePrices, String operName) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -14,24 +14,70 @@
|
|||||||
<result property="rentPrice_1" column="rentPrice_1"/>
|
<result property="rentPrice_1" column="rentPrice_1"/>
|
||||||
<result property="voppat" column="voppat"/>
|
<result property="voppat" column="voppat"/>
|
||||||
<result property="voppa" column="voppa"/>
|
<result property="voppa" column="voppa"/>
|
||||||
|
<result property="yearMonth" column="yearMonth"/>
|
||||||
</resultMap>
|
</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">
|
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>
|
<where>
|
||||||
<if test="communityId != null">
|
<if test="communityId != null">
|
||||||
AND ProjectID = #{communityId}
|
ProjectID like concat('%',#{communityId},'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<select id="selectArtificialResidenceRentBasePriceList"
|
<select id="selectPageList"
|
||||||
parameterType="com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice"
|
parameterType="com.ruoyi.project.data.price.domain.ArtificialResidenceRentBasePrice"
|
||||||
resultMap="MainMappingResult">
|
resultMap="MainMappingResult">
|
||||||
<![CDATA[ SELECT ID,ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA ]]>
|
SELECT ID,ProjectID,MainCoff_Rent,RentPrice,MainRentPrice,RentPrice_1,VOPPAT,VOPPA
|
||||||
FROM dbo.DWA_PROJECTBASEPRICE_RENT_MANU_${yearMonth}
|
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
|
order by ProjectID ASC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only
|
||||||
</select>
|
</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>
|
</mapper>
|
@ -130,7 +130,7 @@
|
|||||||
FROM dbo.DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
|
FROM dbo.DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectComputeResidenceRentBasePriceListCount"
|
<select id="selectPageCount"
|
||||||
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice" resultType="int">
|
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice" resultType="int">
|
||||||
select count(1) from DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
|
select count(1) from DWA_PROJECTBASEPRICE_RENT_IMDT_${yearMonth}
|
||||||
<where>
|
<where>
|
||||||
@ -140,7 +140,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<select id="selectComputeResidenceRentBasePriceList"
|
<select id="selectPageList"
|
||||||
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice"
|
parameterType="com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice"
|
||||||
resultMap="MainMappingResult">
|
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 ]]>
|
<![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>
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<select id="selectComputeResidenceRentBasePriceById" parameterType="String" resultMap="MainMappingResult">
|
<select id="selectById" parameterType="String" resultMap="MainMappingResult">
|
||||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
@ -161,11 +161,4 @@
|
|||||||
order by cast(right(name,6) as int) desc
|
order by cast(right(name,6) as int) desc
|
||||||
</select>
|
</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>
|
</mapper>
|
@ -37,7 +37,7 @@
|
|||||||
from ODS_PROJECT_RENT_PRICE_INFO_${yearMonth}
|
from ODS_PROJECT_RENT_PRICE_INFO_${yearMonth}
|
||||||
</sql>
|
</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}
|
select count(1) from ODS_PROJECT_RENT_PRICE_INFO_${yearMonth}
|
||||||
<where>
|
<where>
|
||||||
<if test="communityId != null">
|
<if test="communityId != null">
|
||||||
@ -49,7 +49,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</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">
|
resultMap="MappingResult">
|
||||||
<include refid="selectAllColumn"/>
|
<include refid="selectAllColumn"/>
|
||||||
<where>
|
<where>
|
||||||
@ -62,4 +62,11 @@
|
|||||||
</where>
|
</where>
|
||||||
order by ProjectID ASC, status DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
|
order by ProjectID ASC, status DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
|
||||||
</select>
|
</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>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user