数据平台接口迁移
This commit is contained in:
parent
a2e2ae9baa
commit
83cb560f6a
@ -34,3 +34,10 @@ export function export2File(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getYearMonthList() {
|
||||||
|
return request({
|
||||||
|
url: '/data/rentprice/residence/compute/yearmonth',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
36
ruoyi-ui/src/api/data/lianJiaCommunity.js
Normal file
36
ruoyi-ui/src/api/data/lianJiaCommunity.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询链家小区列表
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/data/adrdict/lianjia/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询链家小区详细
|
||||||
|
export function get(id) {
|
||||||
|
return request({
|
||||||
|
url: '/data/adrdict/lianjia/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改链家小区
|
||||||
|
export function update(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/adrdict/lianjia',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出链家小区
|
||||||
|
export function export2File(query) {
|
||||||
|
return request({
|
||||||
|
url: '/data/adrdict/lianjia/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询【请填写功能名称】列表
|
// 查询办公基价列表
|
||||||
export function listUltimate(query) {
|
export function list(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/compute/price/office/list',
|
url: '/data/compute/price/office/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@ -9,25 +9,16 @@ export function listUltimate(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询【请填写功能名称】详细
|
// 查询办公基价详细
|
||||||
export function getUltimate(id) {
|
export function getById(yearMonth, id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/compute/price/office/' + id,
|
url: '/data/compute/price/office/' + yearMonth + '/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 新增【请填写功能名称】
|
// 修改办公基价
|
||||||
// export function addUltimate(data) {
|
export function update(data) {
|
||||||
// return request({
|
|
||||||
// url: '/data/compute/price/office',
|
|
||||||
// method: 'post',
|
|
||||||
// data: data
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 修改【请填写功能名称】
|
|
||||||
export function updateUltimate(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/data/compute/price/office',
|
url: '/data/compute/price/office',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
@ -35,19 +26,19 @@ export function updateUltimate(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 删除【请填写功能名称】
|
// 导出办公基价
|
||||||
// export function delUltimate(id) {
|
export function export2File(query) {
|
||||||
// return request({
|
|
||||||
// url: '/data/compute/price/office/' + id,
|
|
||||||
// method: 'delete'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 导出【请填写功能名称】
|
|
||||||
export function exportUltimate(query) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/data/compute/price/office/export',
|
url: '/data/compute/price/office/export',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 年月
|
||||||
|
export function getYearMonthList() {
|
||||||
|
return request({
|
||||||
|
url: '/data/compute/price/office/yearmonth',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
36
ruoyi-ui/src/api/data/ultimateResidenceRentPrice.js
Normal file
36
ruoyi-ui/src/api/data/ultimateResidenceRentPrice.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询最终住宅租赁基价列表
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rentprice/residence/ultimate/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询最终住宅租赁基价详细
|
||||||
|
export function get(id) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rentprice/residence/ultimate/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改最终住宅租赁基价
|
||||||
|
export function update(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rentprice/residence/ultimate',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出最终住宅租赁基价
|
||||||
|
export function export2File(query) {
|
||||||
|
return request({
|
||||||
|
url: '/data/rentprice/residence/ultimate/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
430
ruoyi-ui/src/views/data/basis/LianJiaCommunity.vue
Normal file
430
ruoyi-ui/src/views/data/basis/LianJiaCommunity.vue
Normal file
@ -0,0 +1,430 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="链家小区ID" prop="lianJiaCommunityId" clearable>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.lianJiaCommunityId"
|
||||||
|
placeholder="请输入链家小区ID"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.communityId"
|
||||||
|
placeholder="请输入联城小区ID"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="楼栋ID" prop="buildingId" clearable>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.buildingId"
|
||||||
|
placeholder="请输入楼栋ID"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="案例URL" prop="lianJiaUrl" clearable>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.lianJiaUrl"
|
||||||
|
placeholder="请输入案例URL"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<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-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<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-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:user:export']"
|
||||||
|
>导出</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-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="案例小区ID" align="center" prop="lianJiaCommunityId" />
|
||||||
|
<el-table-column label="案例小区名称" align="center" prop="lianJiaCommunityName" />
|
||||||
|
<el-table-column label="案例小区地址" align="center" prop="lianJiaCommunityAddress" />
|
||||||
|
<el-table-column label="链家小区url" align="center" prop="lianJiaCommunityUrl" width="400">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<a :href="scope.row.lianJiaCommunityUrl" target="_blank">{{scope.row.lianJiaCommunityUrl}}</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="链家案例url" align="center" prop="lianJiaUrl" width="400">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<a :href="scope.row.lianJiaUrl" target="_blank">{{scope.row.lianJiaUrl}}</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="联城小区id" align="center" prop="communityId" />
|
||||||
|
<el-table-column label="联城楼栋id" align="center" prop="buildingId" />
|
||||||
|
<el-table-column label="小区名称(不带特殊符号的)" align="center" prop="cleanCommunityName" />
|
||||||
|
<el-table-column label="小区地址(不带特殊符号的)" align="center" prop="cleanCommunityAddress" />
|
||||||
|
<el-table-column label="楼栋地址(不带特殊符号的)" align="center" prop="cleanBuildingAddress" />
|
||||||
|
<el-table-column label="是否有效" align="center" prop="enable" :formatter="yesOrNotFormatter" />
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageIndex"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@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>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
import { list, get, update, export2File } from "@/api/data/lianJiaCommunity";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "lianJiaCommunity",
|
||||||
|
data() {
|
||||||
|
// 年月
|
||||||
|
var checkYearMonth = (rule, value, callback) => {
|
||||||
|
console.log(value);
|
||||||
|
if (value === "" || !isNaN(parseInt(value))) {
|
||||||
|
callback(new Error("请输入年月"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 办公基价表格数据
|
||||||
|
dataList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
lianJiaCommunityId: undefined,
|
||||||
|
lianJiaUrl: undefined,
|
||||||
|
communityId: undefined,
|
||||||
|
buildingId: undefined,
|
||||||
|
lianJiaUrl: undefined,
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
statusOptions: [
|
||||||
|
{ value: 1, text: "正常" },
|
||||||
|
{ value: 1, text: "失效" }
|
||||||
|
],
|
||||||
|
upload: {
|
||||||
|
// 是否显示弹出层(用户导入)
|
||||||
|
open: false,
|
||||||
|
// 弹出层标题(用户导入)
|
||||||
|
title: "",
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url:
|
||||||
|
process.env.VUE_APP_BASE_API +
|
||||||
|
"/data/rentprice/residence/ultimate/importData"
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {}
|
||||||
|
// 表单校验
|
||||||
|
// rules: {
|
||||||
|
// yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||||
|
if (cellValue) return "是";
|
||||||
|
return "否";
|
||||||
|
},
|
||||||
|
statusFormatter: function(row, column, cellValue, index) {
|
||||||
|
if (cellValue) return "正常";
|
||||||
|
return "失效";
|
||||||
|
},
|
||||||
|
dateFormatter: function(row, column, cellValue, index) {
|
||||||
|
if (cellValue) {
|
||||||
|
return cellValue.substring(0, 10);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
/** 查询办公基价列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
list(this.queryParams).then(response => {
|
||||||
|
this.dataList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
// this.$refs["queryForm"].validate(valid => {
|
||||||
|
// if (valid) {
|
||||||
|
// list(this.queryParams).then(response => {
|
||||||
|
// this.dataList = response.rows;
|
||||||
|
// this.total = response.total;
|
||||||
|
// this.loading = false;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageIndex = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id);
|
||||||
|
this.single = selection.length != 1;
|
||||||
|
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() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(function() {
|
||||||
|
return export2File(queryParams);
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
.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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -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" :rules="rules" ref="queryForm" :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
|
||||||
@ -259,7 +259,8 @@ import {
|
|||||||
list,
|
list,
|
||||||
get,
|
get,
|
||||||
update,
|
update,
|
||||||
export2File
|
export2File,
|
||||||
|
getYearMonthList
|
||||||
} from "@/api/data/computeResidenceRentPrice";
|
} from "@/api/data/computeResidenceRentPrice";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -267,8 +268,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
// 年月
|
// 年月
|
||||||
var checkYearMonth = (rule, value, callback) => {
|
var checkYearMonth = (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();
|
||||||
@ -300,6 +302,7 @@ 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: "失效" }
|
||||||
@ -322,13 +325,18 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
yearMonth: [
|
||||||
|
{ validator: checkYearMonth, trigger: "blur" },
|
||||||
|
{ validator: checkYearMonth, 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) {
|
||||||
@ -346,10 +354,10 @@ export default {
|
|||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
/** 查询办公基价列表 */
|
/** 查询办公基价列表 */
|
||||||
getList() {
|
getList(formName) {
|
||||||
this.loading = true;
|
this.$refs[formName].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;
|
||||||
@ -373,7 +381,7 @@ export default {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageIndex = 1;
|
this.queryParams.pageIndex = 1;
|
||||||
this.getList();
|
this.getList("queryForm");
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
@ -1,14 +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" :inline="true" label-width="100px" :rules="rules">
|
||||||
<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"
|
||||||
type="month"
|
:value="item.value"
|
||||||
placeholder="选择年月"
|
:label="item.label"
|
||||||
@keyup.enter.native="handleQuery"
|
:key="item.value"
|
||||||
></el-date-picker>
|
></el-option>
|
||||||
|
</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
|
||||||
@ -71,11 +72,23 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="ultimateList" @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 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="楼栋ID" align="center" prop="buildingId" />
|
<el-table-column label="楼栋ID" align="center" prop="buildingId" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="communityName" />
|
||||||
|
<el-table-column label="办公项目地址" align="center" prop="communityAddress" />
|
||||||
|
<el-table-column label="楼栋地址" align="center" prop="buildingAddress" />
|
||||||
|
<el-table-column label="区域-板块-环线-街道" align="center" :formatter="regionFormatter" width="300" />
|
||||||
|
<el-table-column label="建成年代" align="center" prop="year" />
|
||||||
|
<el-table-column label="平均面积" align="center" prop="avgArea" />
|
||||||
|
<el-table-column label="总层数" align="center" prop="totalFloorSum" />
|
||||||
|
<el-table-column label="地上层数" align="center" prop="upperFloorSum" />
|
||||||
|
<el-table-column label="办公分类" align="center" prop="officeClass" />
|
||||||
|
<el-table-column label="办公等级" align="center" prop="officeLevel" />
|
||||||
|
<el-table-column label="主力基价(上期)" align="center" prop="mainPrice_1" />
|
||||||
|
<el-table-column label="主力租金(上期)" align="center" prop="mainPriceRent_1" />
|
||||||
<el-table-column label="主力基价" align="center" prop="mainPrice" />
|
<el-table-column label="主力基价" align="center" prop="mainPrice" />
|
||||||
<el-table-column label="主力租金" align="center" prop="mainPriceRent" />
|
<el-table-column label="主力租金" align="center" prop="mainPriceRent" />
|
||||||
<el-table-column label="主力基价涨跌幅" align="center" prop="mainPricePst" />
|
<el-table-column label="主力基价涨跌幅" align="center" prop="mainPricePst" />
|
||||||
@ -208,15 +221,27 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {
|
import {
|
||||||
listUltimate,
|
list,
|
||||||
getUltimate,
|
getById,
|
||||||
updateUltimate,
|
update,
|
||||||
exportUltimate
|
export2File,
|
||||||
|
getYearMonthList
|
||||||
} from "@/api/data/ultimateOfficeBasePrice";
|
} from "@/api/data/ultimateOfficeBasePrice";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Ultimate",
|
name: "Ultimate",
|
||||||
data() {
|
data() {
|
||||||
|
// 年月
|
||||||
|
var checkYearMonth = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("请输入年月"));
|
||||||
|
} else if (value === "" || isNaN(parseInt(value))) {
|
||||||
|
callback(new Error("请输入年月"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@ -234,6 +259,7 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
yearMonthList: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
yearMonth: undefined,
|
yearMonth: undefined,
|
||||||
@ -262,13 +288,33 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {}
|
rules: {
|
||||||
|
yearMonth: [
|
||||||
|
{ validator: checkYearMonth, trigger: "blur" },
|
||||||
|
{ validator: checkYearMonth, trigger: "change" }
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.loading = false;
|
||||||
|
getYearMonthList().then(response => {
|
||||||
|
this.yearMonthList = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
regionFormatter: function(row, column, cellValue, index) {
|
||||||
|
// 区域-板块-环线-街道
|
||||||
|
return (
|
||||||
|
row["countyName"] +
|
||||||
|
"-" +
|
||||||
|
row["blockName"] +
|
||||||
|
"-" +
|
||||||
|
row["loopName"] +
|
||||||
|
"-" +
|
||||||
|
row["streetName"]
|
||||||
|
);
|
||||||
|
},
|
||||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||||
if (cellValue) return "是";
|
if (cellValue) return "是";
|
||||||
return "否";
|
return "否";
|
||||||
@ -285,11 +331,15 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询办公基价列表 */
|
/** 查询办公基价列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.$refs["queryForm"].validate(valid => {
|
||||||
listUltimate(this.queryParams).then(response => {
|
if (valid) {
|
||||||
this.ultimateList = response.rows;
|
this.loading = true;
|
||||||
this.total = response.total;
|
list(this.queryParams).then(response => {
|
||||||
this.loading = false;
|
this.dataList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
@ -320,17 +370,12 @@ 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) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getUltimate(id).then(response => {
|
const yearMonth = row.yearMonth;
|
||||||
|
getById(yearMonth, id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改办公基价";
|
this.title = "修改办公基价";
|
||||||
@ -340,27 +385,15 @@ export default {
|
|||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != undefined) {
|
update(this.form).then(response => {
|
||||||
updateUltimate(this.form).then(response => {
|
if (response.code === 200) {
|
||||||
if (response.code === 200) {
|
this.msgSuccess("修改成功");
|
||||||
this.msgSuccess("修改成功");
|
this.open = false;
|
||||||
this.open = false;
|
this.getList();
|
||||||
this.getList();
|
} else {
|
||||||
} else {
|
this.msgError(response.msg);
|
||||||
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -373,7 +406,7 @@ export default {
|
|||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return exportUltimate(queryParams);
|
return export2File(queryParams);
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
@ -5,6 +5,7 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.yearMonth"
|
v-model="queryParams.yearMonth"
|
||||||
format="yyyyMM"
|
format="yyyyMM"
|
||||||
|
value-format="yyyyMM"
|
||||||
type="month"
|
type="month"
|
||||||
placeholder="选择年月"
|
placeholder="选择年月"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
@ -19,21 +20,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联城楼栋ID" prop="buildingId" clearable>
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.buildingId"
|
|
||||||
placeholder="请输入联城楼栋ID"
|
|
||||||
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>
|
||||||
@ -48,7 +34,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['system:ultimate:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -71,26 +57,39 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="ultimateList" @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 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="楼栋ID" align="center" prop="buildingId" />
|
<el-table-column label="小区名称" align="center" prop="communityName" />
|
||||||
<el-table-column label="主力基价" align="center" prop="mainPrice" />
|
<el-table-column label="小区地址" align="center" prop="communityAddress" />
|
||||||
<el-table-column label="主力租金" align="center" prop="mainPriceRent" />
|
|
||||||
<el-table-column label="主力基价涨跌幅" align="center" prop="mainPricePst" />
|
<el-table-column label="区域" align="center" prop="county" />
|
||||||
<el-table-column label="主力租金涨跌幅" align="center" prop="mainPriceRentPst" />
|
<el-table-column label="板块" align="center" prop="block" />
|
||||||
<el-table-column label="主力基价类型" align="center" prop="mainPriceType" />
|
<el-table-column label="环线" align="center" prop="loop" />
|
||||||
<el-table-column label="主力租金类型" align="center" prop="mainPriceRentType" />
|
<el-table-column label="国际社区分" align="center" prop="loop" />
|
||||||
|
<el-table-column label="重点小学名称" align="center" prop="loop" />
|
||||||
|
<el-table-column label="物业档次" align="center" prop="loop" />
|
||||||
|
<el-table-column label="室数量-AI" align="center" prop="loop" />
|
||||||
|
|
||||||
|
<el-table-column label="标准基价(元/㎡·月)" align="center" prop="rentPrice" />
|
||||||
|
<el-table-column label="平均租金(元/㎡·月)" align="center" prop="rentPrice" />
|
||||||
|
<el-table-column label="散租挂牌案例" align="center" prop="散租挂牌案例" />
|
||||||
|
<el-table-column label="租金涨跌幅" align="center" prop="voppa" />
|
||||||
|
<el-table-column label="租金-工房1室" align="center" prop="gf_1Room" />
|
||||||
|
<el-table-column label="租金-工房2室" align="center" prop="gf_2Room" />
|
||||||
|
<el-table-column label="租金-公寓2室" align="center" prop="gy_2Room" />
|
||||||
|
<el-table-column label="租金-公寓3室" align="center" prop="gy_3Room" />
|
||||||
|
<el-table-column label="租金-1房" align="center" prop="one_Room" />
|
||||||
|
<el-table-column label="租金-2房" align="center" prop="two_Room" />
|
||||||
|
<el-table-column label="租金-3房" align="center" prop="three_Room" />
|
||||||
|
<el-table-column label="整租比" align="center" prop="entireRentRatio" />
|
||||||
|
<el-table-column label="整租案例" align="center" prop="entireRentNum" />
|
||||||
|
<el-table-column label="分租比" align="center" prop="shareRentRatio" />
|
||||||
|
<el-table-column label="分租案例" align="center" prop="shareRentNum" />
|
||||||
|
<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"
|
|
||||||
prop="standardBuilding"
|
|
||||||
:formatter="yesOrNotFormatter"
|
|
||||||
/>
|
|
||||||
<el-table-column label="价格更改说明" align="center" prop="adjustPriceComment" />
|
|
||||||
<el-table-column label="更新日期" align="center" prop="updateDate" :formatter="dateFormatter" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -114,13 +113,13 @@
|
|||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageIndex"
|
||||||
: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-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -201,22 +200,32 @@
|
|||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {
|
import {
|
||||||
listUltimate,
|
list,
|
||||||
getUltimate,
|
get,
|
||||||
updateUltimate,
|
update,
|
||||||
exportUltimate
|
export2File
|
||||||
} from "@/api/data/ultimateOfficeBasePrice";
|
} from "@/api/data/ultimateResidenceRentPrice";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Ultimate",
|
name: "computeResidenceRentBasePrice",
|
||||||
data() {
|
data() {
|
||||||
|
// 年月
|
||||||
|
var checkYearMonth = (rule, value, callback) => {
|
||||||
|
console.log(value);
|
||||||
|
if (value === "" || !isNaN(parseInt(value))) {
|
||||||
|
callback(new Error("请输入年月"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@ -229,7 +238,7 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 办公基价表格数据
|
// 办公基价表格数据
|
||||||
ultimateList: [],
|
dataList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -238,8 +247,8 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
yearMonth: undefined,
|
yearMonth: undefined,
|
||||||
communityId: undefined,
|
communityId: undefined,
|
||||||
buildingId: undefined,
|
communityName: undefined,
|
||||||
pageNum: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
statusOptions: [
|
statusOptions: [
|
||||||
@ -257,16 +266,20 @@ export default {
|
|||||||
headers: { Authorization: "Bearer " + getToken() },
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url:
|
url:
|
||||||
process.env.VUE_APP_BASE_API + "/data/compute/price/office/importData"
|
process.env.VUE_APP_BASE_API +
|
||||||
|
"/data/rentprice/residence/ultimate/importData"
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {}
|
rules: {
|
||||||
|
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.loading = false;
|
||||||
|
// this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||||
@ -286,10 +299,14 @@ export default {
|
|||||||
/** 查询办公基价列表 */
|
/** 查询办公基价列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listUltimate(this.queryParams).then(response => {
|
this.$refs["queryForm"].validate(valid => {
|
||||||
this.ultimateList = response.rows;
|
if (valid) {
|
||||||
this.total = response.total;
|
list(this.queryParams).then(response => {
|
||||||
this.loading = false;
|
this.dataList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
@ -306,7 +323,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageIndex = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
@ -330,7 +347,7 @@ export default {
|
|||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getUltimate(id).then(response => {
|
get(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改办公基价";
|
this.title = "修改办公基价";
|
||||||
@ -341,7 +358,7 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != undefined) {
|
if (this.form.id != undefined) {
|
||||||
updateUltimate(this.form).then(response => {
|
update(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -351,15 +368,15 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUltimate(this.form).then(response => {
|
// addUltimate(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
// if (response.code === 200) {
|
||||||
this.msgSuccess("新增成功");
|
// this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
// this.open = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
} else {
|
// } else {
|
||||||
this.msgError(response.msg);
|
// this.msgError(response.msg);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -367,13 +384,13 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm("是否确认导出所有办公基价数据项?", "警告", {
|
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return exportUltimate(queryParams);
|
return export2File(queryParams);
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.project.common;
|
||||||
|
|
||||||
|
|
||||||
|
public class VueSelectModel<T> {
|
||||||
|
private String label;
|
||||||
|
private T value;
|
||||||
|
|
||||||
|
public VueSelectModel() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public VueSelectModel(String label, T data) {
|
||||||
|
this.label = label;
|
||||||
|
this.value = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(T value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
package com.ruoyi.project.data.basis.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.framework.web.page.TableSupport;
|
||||||
|
import com.ruoyi.project.data.basis.domain.LianJiaCommunityDict;
|
||||||
|
import com.ruoyi.project.data.basis.service.ILianJiaCommunityDictService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 链家id和联城id对应关系
|
||||||
|
* 小区名称和小区地址标准化对应关系
|
||||||
|
* 楼栋名称和楼栋地址标准化对应关系
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/data/adrdict/lianjia")
|
||||||
|
public class AdrDictController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ILianJiaCommunityDictService lianJiaCommunityDictService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param lianJiaCommunityDict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(LianJiaCommunityDict lianJiaCommunityDict) {
|
||||||
|
int pageIndex = ServletUtils.getParameterToInt("pageIndex");
|
||||||
|
int pageSize = ServletUtils.getParameterToInt(TableSupport.PAGE_SIZE);
|
||||||
|
lianJiaCommunityDict.setPageIndex(pageIndex <= 1 ? 0 : (pageIndex - 1) * pageSize);
|
||||||
|
lianJiaCommunityDict.setPageSize(pageSize);
|
||||||
|
|
||||||
|
int total = lianJiaCommunityDictService.selectPageOfTotal(lianJiaCommunityDict);
|
||||||
|
List<LianJiaCommunityDict> list =
|
||||||
|
lianJiaCommunityDictService.selectPageOfList(lianJiaCommunityDict);
|
||||||
|
return getDataTable(list, total);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改 住宅租赁基价
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||||
|
@Log(title = "链家小区", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody LianJiaCommunityDict lianJiaCommunityDict) {
|
||||||
|
return toAjax(lianJiaCommunityDictService.update(lianJiaCommunityDict));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增角色
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
||||||
|
@Log(title = "链家小区", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody LianJiaCommunityDict lianJiaCommunityDict) {
|
||||||
|
return toAjax(lianJiaCommunityDictService.insert(lianJiaCommunityDict));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除角色
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:remove')")
|
||||||
|
@Log(title = "链家小区", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public AjaxResult remove(@PathVariable Integer id) {
|
||||||
|
return toAjax(lianJiaCommunityDictService.delete(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable(value = "id", required = false) Integer id) {
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
ajax.put(AjaxResult.DATA_TAG, lianJiaCommunityDictService.selectById(id));
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,183 @@
|
|||||||
|
package com.ruoyi.project.data.basis.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 链家id和联城小区、楼栋id对应关系
|
||||||
|
*/
|
||||||
|
public class LianJiaCommunityDict extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer pageIndex;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案例id
|
||||||
|
*/
|
||||||
|
private String lianJiaCommunityId;
|
||||||
|
/**
|
||||||
|
* 案例小区名称
|
||||||
|
*/
|
||||||
|
private String lianJiaCommunityName;
|
||||||
|
/**
|
||||||
|
* 案例小区地址
|
||||||
|
*/
|
||||||
|
private String lianJiaCommunityAddress;
|
||||||
|
/**
|
||||||
|
* 链家小区url
|
||||||
|
*/
|
||||||
|
private String lianJiaCommunityUrl;
|
||||||
|
/**
|
||||||
|
* 链家案例url
|
||||||
|
*/
|
||||||
|
private String lianJiaUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联城小区id
|
||||||
|
*/
|
||||||
|
private String communityId;
|
||||||
|
/**
|
||||||
|
* 联城楼栋id
|
||||||
|
*/
|
||||||
|
private String buildingId;
|
||||||
|
/**
|
||||||
|
* 小区名称(不带特殊符号的)
|
||||||
|
*/
|
||||||
|
private String cleanCommunityName;
|
||||||
|
/**
|
||||||
|
* 小区地址(不带特殊符号的)
|
||||||
|
*/
|
||||||
|
private String cleanCommunityAddress;
|
||||||
|
/**
|
||||||
|
* 楼栋地址(不带特殊符号的)
|
||||||
|
*/
|
||||||
|
private String cleanBuildingAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有效
|
||||||
|
*/
|
||||||
|
private Boolean enable;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianJiaCommunityId() {
|
||||||
|
return lianJiaCommunityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLianJiaCommunityId(String lianJiaCommunityId) {
|
||||||
|
this.lianJiaCommunityId = lianJiaCommunityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianJiaCommunityName() {
|
||||||
|
return lianJiaCommunityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLianJiaCommunityName(String lianJiaCommunityName) {
|
||||||
|
this.lianJiaCommunityName = lianJiaCommunityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianJiaCommunityAddress() {
|
||||||
|
return lianJiaCommunityAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLianJiaCommunityAddress(String lianJiaCommunityAddress) {
|
||||||
|
this.lianJiaCommunityAddress = lianJiaCommunityAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianJiaCommunityUrl() {
|
||||||
|
return lianJiaCommunityUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLianJiaCommunityUrl(String lianJiaCommunityUrl) {
|
||||||
|
this.lianJiaCommunityUrl = lianJiaCommunityUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianJiaUrl() {
|
||||||
|
return lianJiaUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLianJiaUrl(String lianJiaUrl) {
|
||||||
|
this.lianJiaUrl = lianJiaUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommunityId() {
|
||||||
|
return communityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommunityId(String communityId) {
|
||||||
|
this.communityId = communityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBuildingId() {
|
||||||
|
return buildingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuildingId(String buildingId) {
|
||||||
|
this.buildingId = buildingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCleanCommunityName() {
|
||||||
|
return cleanCommunityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCleanCommunityName(String cleanCommunityName) {
|
||||||
|
this.cleanCommunityName = cleanCommunityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCleanCommunityAddress() {
|
||||||
|
return cleanCommunityAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCleanCommunityAddress(String cleanCommunityAddress) {
|
||||||
|
this.cleanCommunityAddress = cleanCommunityAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCleanBuildingAddress() {
|
||||||
|
return cleanBuildingAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCleanBuildingAddress(String cleanBuildingAddress) {
|
||||||
|
this.cleanBuildingAddress = cleanBuildingAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPageIndex() {
|
||||||
|
return pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageIndex(Integer pageIndex) {
|
||||||
|
this.pageIndex = pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPageSize() {
|
||||||
|
return pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageSize(Integer pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getEnable() {
|
||||||
|
return enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnable(Boolean enable) {
|
||||||
|
this.enable = enable;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.ruoyi.project.data.basis.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.ruoyi.project.data.basis.domain.LianJiaCommunityDict;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@DS("clean")
|
||||||
|
public interface LianJiaCommunityDictMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insert(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int update(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void delete(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LianJiaCommunityDict> selectPageOfList(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LianJiaCommunityDict selectById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int selectPageOfTotal(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.ruoyi.project.data.basis.service;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.ruoyi.project.data.basis.domain.LianJiaCommunityDict;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ILianJiaCommunityDictService {
|
||||||
|
|
||||||
|
int insert(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
int update(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
int delete(Integer id);
|
||||||
|
/**
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LianJiaCommunityDict> selectPageOfList(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LianJiaCommunityDict selectById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dict
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int selectPageOfTotal(LianJiaCommunityDict dict);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.ruoyi.project.data.basis.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.ruoyi.project.data.basis.domain.LianJiaCommunityDict;
|
||||||
|
import com.ruoyi.project.data.basis.mapper.LianJiaCommunityDictMapper;
|
||||||
|
import com.ruoyi.project.data.basis.service.ILianJiaCommunityDictService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class LianJiaCommunityDictServiceImpl implements ILianJiaCommunityDictService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
@Autowired
|
||||||
|
private LianJiaCommunityDictMapper lianJiaCommunityDictMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(LianJiaCommunityDict dict) {
|
||||||
|
return jdbcTemplate.update("insert into [dbo].[lianjia_dictionary]([lianjia_community_id]," +
|
||||||
|
"[lianjia_community_name]," +
|
||||||
|
"[lianjia_community_address],[lianjia_community_url],[lianjia_community_curl],[community_id]," +
|
||||||
|
"[building_id],[clean_community_name],[clean_community_address],[clean_building_address],[enable]," +
|
||||||
|
"[create_time]) value (?,?,?,?,?,?,?,?,?,?,1,getdate());", new Object[]{dict.getLianJiaCommunityId(),
|
||||||
|
dict.getLianJiaCommunityName(), dict.getLianJiaCommunityAddress(), dict.getLianJiaUrl(),
|
||||||
|
dict.getLianJiaCommunityUrl(), dict.getCommunityId(), dict.getBuildingId(), dict.getCleanCommunityName()
|
||||||
|
, dict.getCleanCommunityAddress(), dict.getCleanBuildingAddress()});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int update(LianJiaCommunityDict dict) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int delete(Integer id) {
|
||||||
|
return jdbcTemplate.update("delete from lianjia_dictionary where id= ? ;", new Object[]{id});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LianJiaCommunityDict> selectPageOfList(LianJiaCommunityDict dict) {
|
||||||
|
return lianJiaCommunityDictMapper.selectPageOfList(dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int selectPageOfTotal(LianJiaCommunityDict dict) {
|
||||||
|
return lianJiaCommunityDictMapper.selectPageOfTotal(dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LianJiaCommunityDict selectById(Integer id) {
|
||||||
|
return lianJiaCommunityDictMapper.selectById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -1,26 +1,33 @@
|
|||||||
package com.ruoyi.project.data.price.controller;
|
package com.ruoyi.project.data.price.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
|
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;
|
||||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
|
import com.ruoyi.framework.config.RuoYiConfig;
|
||||||
import com.ruoyi.framework.security.LoginUser;
|
import com.ruoyi.framework.security.LoginUser;
|
||||||
import com.ruoyi.framework.security.service.TokenService;
|
import com.ruoyi.framework.security.service.TokenService;
|
||||||
import com.ruoyi.framework.web.controller.BaseController;
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
import com.ruoyi.framework.web.page.TableSupport;
|
import com.ruoyi.framework.web.page.TableSupport;
|
||||||
|
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 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.service.IArtificialResidenceRentPriceService;
|
import com.ruoyi.project.data.price.service.IArtificialResidenceRentPriceService;
|
||||||
import com.ruoyi.project.data.price.service.IComputeResidenceRentPriceService;
|
import com.ruoyi.project.data.price.service.IComputeResidenceRentPriceService;
|
||||||
import com.ruoyi.project.data.price.service.IUltimateResidenceRentBasePriceService;
|
import com.ruoyi.project.data.price.service.IUltimateResidenceRentBasePriceService;
|
||||||
|
import com.ruoyi.project.system.domain.UploadFile;
|
||||||
|
import com.ruoyi.project.system.service.IUploadFileService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
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
|
||||||
@ -32,7 +39,8 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
private IArtificialResidenceRentPriceService artificialResidenceRentPriceService;
|
private IArtificialResidenceRentPriceService artificialResidenceRentPriceService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IUltimateResidenceRentBasePriceService ultimateResidenceRentBasePriceService;
|
private IUltimateResidenceRentBasePriceService ultimateResidenceRentBasePriceService;
|
||||||
|
@Autowired
|
||||||
|
private IUploadFileService fileService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TokenService tokenService;
|
private TokenService tokenService;
|
||||||
|
|
||||||
@ -54,6 +62,16 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 年月
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/compute/yearmonth")
|
||||||
|
public AjaxResult yearMonthList() {
|
||||||
|
List<VueSelectModel> list = computeResidenceRentPriceService.getYearMonth();
|
||||||
|
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 住宅租赁基价详细信息
|
* 获取 住宅租赁基价详细信息
|
||||||
@ -61,6 +79,7 @@ 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,15 +119,27 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
@Log(title = "办公基价", businessType = BusinessType.IMPORT)
|
@Log(title = "办公基价", businessType = BusinessType.IMPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
||||||
@PostMapping("/compute/importData")
|
@PostMapping("/compute/importData")
|
||||||
public AjaxResult importData(MultipartFile file) throws Exception {
|
public AjaxResult importData(@RequestParam("id") String id, @RequestParam("module") String module,
|
||||||
|
MultipartFile file) throws Exception {
|
||||||
ExcelUtil<ComputeResidenceRentBasePrice> util = new ExcelUtil<>(ComputeResidenceRentBasePrice.class);
|
ExcelUtil<ComputeResidenceRentBasePrice> util = new ExcelUtil<>(ComputeResidenceRentBasePrice.class);
|
||||||
List<ComputeResidenceRentBasePrice> computeResidenceRentBasePrices = util.importExcel(file.getInputStream());
|
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||||
String operName = loginUser.getUsername();
|
String operName = loginUser.getUsername();
|
||||||
String message = computeResidenceRentPriceService.batchImport(computeResidenceRentBasePrices, operName);
|
// 上传文件路径
|
||||||
return AjaxResult.success(message);
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工修正住宅租赁
|
* 人工修正住宅租赁
|
||||||
@ -132,6 +163,9 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 文件保存
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询 住宅租赁基价列表
|
* 查询 住宅租赁基价列表
|
||||||
*/
|
*/
|
||||||
@ -150,6 +184,10 @@ public class ResidenceRentBasePriceController extends BaseController {
|
|||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人工审核住宅租赁基价导入(模板)
|
||||||
|
* 记录变化的值和变化次数
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 住宅租赁基价详细信息
|
* 获取 住宅租赁基价详细信息
|
||||||
|
@ -6,6 +6,7 @@ import com.ruoyi.common.utils.ServletUtils;
|
|||||||
import com.ruoyi.framework.security.LoginUser;
|
import com.ruoyi.framework.security.LoginUser;
|
||||||
import com.ruoyi.framework.security.service.TokenService;
|
import com.ruoyi.framework.security.service.TokenService;
|
||||||
import com.ruoyi.framework.web.page.TableSupport;
|
import com.ruoyi.framework.web.page.TableSupport;
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
import com.ruoyi.project.data.price.service.IUltimateOfficeBasePriceService;
|
import com.ruoyi.project.data.price.service.IUltimateOfficeBasePriceService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -26,21 +27,21 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Controller
|
* 办公基价Controller
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2020-05-20
|
* @date 2020-05-20
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/data/compute/price/office")
|
@RequestMapping("/data/compute/price/office")
|
||||||
public class ComputeOfficeBasePriceController extends BaseController {
|
public class UltimateOfficeBasePriceController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IUltimateOfficeBasePriceService officeBasePriceUltimateService;
|
private IUltimateOfficeBasePriceService officeBasePriceUltimateService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TokenService tokenService;
|
private TokenService tokenService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询办公基价列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ -55,28 +56,38 @@ public class ComputeOfficeBasePriceController extends BaseController {
|
|||||||
return getDataTable(list, total);
|
return getDataTable(list, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 年月
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||||
|
@GetMapping("/yearmonth")
|
||||||
|
public AjaxResult yearMonthList() {
|
||||||
|
List<VueSelectModel> list = officeBasePriceUltimateService.getYearMonthList();
|
||||||
|
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取【请填写功能名称】详细信息
|
* 获取办公基价详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{yearMonth}/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
public AjaxResult getInfo(@PathVariable("yearMonth") Integer yearMonth, @PathVariable("id") Integer id) {
|
||||||
return AjaxResult.success(officeBasePriceUltimateService.selectOfficeBasePriceUltimateById(id));
|
return AjaxResult.success(officeBasePriceUltimateService.getById(yearMonth, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 修改【请填写功能名称】
|
// * 修改办公基价
|
||||||
*/
|
// */
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||||
@Log(title = "办公基价", businessType = BusinessType.UPDATE)
|
// @Log(title = "办公基价", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
// @PutMapping
|
||||||
public AjaxResult edit(@RequestBody UltimateOfficeBasePrice officeBasePriceUltimate) {
|
// public AjaxResult edit(@RequestBody UltimateOfficeBasePrice officeBasePriceUltimate) {
|
||||||
return toAjax(officeBasePriceUltimateService.updateOfficeBasePriceUltimate(officeBasePriceUltimate));
|
// return toAjax(officeBasePriceUltimateService.updateOfficeBasePriceUltimate(officeBasePriceUltimate));
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出【请填写功能名称】列表
|
* 导出办公基价列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
||||||
@Log(title = "办公基价", businessType = BusinessType.EXPORT)
|
@Log(title = "办公基价", businessType = BusinessType.EXPORT)
|
||||||
@ -100,13 +111,14 @@ public class ComputeOfficeBasePriceController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@Log(title = "办公基价", businessType = BusinessType.IMPORT)
|
@Log(title = "办公基价", businessType = BusinessType.IMPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
||||||
@PostMapping("/importData")
|
@PostMapping("/importData/{yearMonth}")
|
||||||
public AjaxResult importData(MultipartFile file) throws Exception {
|
public AjaxResult importData(@PathVariable("yearMonth") Integer yearMonth, MultipartFile file) throws Exception {
|
||||||
|
// 修改计价
|
||||||
ExcelUtil<UltimateOfficeBasePrice> util = new ExcelUtil<>(UltimateOfficeBasePrice.class);
|
ExcelUtil<UltimateOfficeBasePrice> util = new ExcelUtil<>(UltimateOfficeBasePrice.class);
|
||||||
List<UltimateOfficeBasePrice> officeBasePriceUltimates = util.importExcel(file.getInputStream());
|
List<UltimateOfficeBasePrice> officeBasePriceUltimates = util.importExcel(file.getInputStream());
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||||
String operName = loginUser.getUsername();
|
String operName = loginUser.getUsername();
|
||||||
String message = officeBasePriceUltimateService.batchImport(officeBasePriceUltimates, operName);
|
String message = officeBasePriceUltimateService.batchImport(yearMonth, officeBasePriceUltimates, operName);
|
||||||
return AjaxResult.success(message);
|
return AjaxResult.success(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,9 +19,11 @@ public class UltimateOfficeBasePrice extends BaseEntity {
|
|||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
@Excel(name = "ID")
|
@Excel(name = "ID")
|
||||||
private String id;
|
private Integer id;
|
||||||
@JSONField(serialize = false)
|
// @JSONField(serialize = false)
|
||||||
private Integer yearMonth;
|
private Integer yearMonth;
|
||||||
|
@JSONField(serialize = false)
|
||||||
|
private Integer lastYearMonth;
|
||||||
@Excel(name = "楼栋ID")
|
@Excel(name = "楼栋ID")
|
||||||
private String buildingId;
|
private String buildingId;
|
||||||
@Excel(name = "小区ID")
|
@Excel(name = "小区ID")
|
||||||
@ -83,6 +85,14 @@ public class UltimateOfficeBasePrice extends BaseEntity {
|
|||||||
@Excel(name = "更改价格说明")
|
@Excel(name = "更改价格说明")
|
||||||
private String adjustPriceComment;
|
private String adjustPriceComment;
|
||||||
|
|
||||||
|
public Integer getLastYearMonth() {
|
||||||
|
return lastYearMonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastYearMonth(Integer lastYearMonth) {
|
||||||
|
this.lastYearMonth = lastYearMonth;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getPageIndex() {
|
public Integer getPageIndex() {
|
||||||
return pageIndex;
|
return pageIndex;
|
||||||
}
|
}
|
||||||
@ -99,11 +109,11 @@ public class UltimateOfficeBasePrice extends BaseEntity {
|
|||||||
this.pageSize = pageSize;
|
this.pageSize = pageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(Integer id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.ComputeResidenceRentBasePrice;
|
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -40,4 +41,9 @@ public interface ComputeResidenceRentPriceMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateComputeResidenceRentBasePrice(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
int updateComputeResidenceRentBasePrice(ComputeResidenceRentBasePrice ComputeResidenceRentBasePrice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> yearMonthList();
|
||||||
}
|
}
|
||||||
|
@ -1,46 +1,77 @@
|
|||||||
package com.ruoyi.project.data.price.mapper;
|
package com.ruoyi.project.data.price.mapper;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
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.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Mapper接口
|
* 办公基价Mapper接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2020-05-20
|
* @date 2020-05-20
|
||||||
*/
|
*/
|
||||||
@DS("teemlink")
|
@DS("compute")
|
||||||
public interface UltimateOfficeBasePriceMapper
|
public interface UltimateOfficeBasePriceMapper {
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param yearMonth
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
UltimateOfficeBasePrice selectOfficeBasePriceUltimateById(String id);
|
UltimateOfficeBasePrice getById(Integer yearMonth, Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* @param yearMonth
|
||||||
*
|
* @param buildingId
|
||||||
* @param officeBasePriceUltimate 【请填写功能名称】
|
* @return
|
||||||
* @return 【请填写功能名称】集合
|
|
||||||
*/
|
*/
|
||||||
List<UltimateOfficeBasePrice> selectOfficeBasePriceUltimateList(UltimateOfficeBasePrice officeBasePriceUltimate);
|
UltimateOfficeBasePrice getByBuildingId(Integer yearMonth, String buildingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询办公基价列表
|
||||||
|
*
|
||||||
|
* @param officeBasePriceUltimate 办公基价
|
||||||
|
* @return 办公基价集合
|
||||||
|
*/
|
||||||
|
List<UltimateOfficeBasePrice> getList(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 求和
|
* 求和
|
||||||
|
*
|
||||||
* @param officeBasePriceUltimate
|
* @param officeBasePriceUltimate
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
Integer getCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
* @param officeBasePriceUltimate
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @param id
|
||||||
|
* @param mainPrice
|
||||||
|
* @param mainPriceRent
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateOfficeBasePriceUltimate(UltimateOfficeBasePrice officeBasePriceUltimate);
|
int update(Integer yearMonth, Integer lastYearMonth, int id, BigDecimal mainPrice, BigDecimal mainPriceRent);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年月
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> getYearMonthList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param yearMonth
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int copyCreate(Integer yearMonth, Integer id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
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.ComputeResidenceRentBasePrice;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -47,6 +48,12 @@ public interface IComputeResidenceRentPriceService {
|
|||||||
*/
|
*/
|
||||||
String batchImport(List<ComputeResidenceRentBasePrice> officeBasePriceUltimates, String operName);
|
String batchImport(List<ComputeResidenceRentBasePrice> officeBasePriceUltimates, String operName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取表名
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> getYearMonth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
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.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Service接口
|
* 办公基价Service接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2020-05-20
|
* @date 2020-05-20
|
||||||
@ -13,19 +14,28 @@ import java.util.List;
|
|||||||
public interface IUltimateOfficeBasePriceService {
|
public interface IUltimateOfficeBasePriceService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询办公基价列表
|
||||||
*
|
*
|
||||||
* @param officeBasePriceUltimate 【请填写功能名称】
|
* @param officeBasePriceUltimate 办公基价
|
||||||
* @return 【请填写功能名称】集合
|
* @return 办公基价集合
|
||||||
*/
|
*/
|
||||||
List<UltimateOfficeBasePrice> selectOfficeBasePriceUltimateList(UltimateOfficeBasePrice officeBasePriceUltimate);
|
List<UltimateOfficeBasePrice> selectOfficeBasePriceUltimateList(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
int selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
int selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
UltimateOfficeBasePrice getById(Integer yearMonth, Integer id);
|
||||||
|
|
||||||
UltimateOfficeBasePrice selectOfficeBasePriceUltimateById(String id);
|
// /**
|
||||||
|
// *
|
||||||
int updateOfficeBasePriceUltimate(UltimateOfficeBasePrice officeBasePriceUltimate);
|
// * @param officeBasePriceUltimate
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// int updateOfficeBasePriceUltimate(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -33,7 +43,13 @@ public interface IUltimateOfficeBasePriceService {
|
|||||||
* @param operName
|
* @param operName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String batchImport(List<UltimateOfficeBasePrice> officeBasePriceUltimates,String operName);
|
String batchImport(Integer yearMonth, List<UltimateOfficeBasePrice> officeBasePriceUltimates,String operName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VueSelectModel> getYearMonthList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
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.ComputeResidenceRentBasePrice;
|
||||||
import com.ruoyi.project.data.price.mapper.ComputeResidenceRentPriceMapper;
|
import com.ruoyi.project.data.price.mapper.ComputeResidenceRentPriceMapper;
|
||||||
import com.ruoyi.project.data.price.service.IComputeResidenceRentPriceService;
|
import com.ruoyi.project.data.price.service.IComputeResidenceRentPriceService;
|
||||||
@ -48,4 +49,9 @@ public class ComputeResidenceRentPriceServiceImpl implements IComputeResidenceRe
|
|||||||
public String batchImport(List<ComputeResidenceRentBasePrice> officeBasePriceUltimates, String operName) {
|
public String batchImport(List<ComputeResidenceRentBasePrice> officeBasePriceUltimates, String operName) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VueSelectModel> getYearMonth() {
|
||||||
|
return computeResidenceRentPriceMapper.yearMonthList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
package com.ruoyi.project.data.price.service.impl;
|
package com.ruoyi.project.data.price.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.common.exception.CustomException;
|
import com.ruoyi.common.exception.CustomException;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.project.common.VueSelectModel;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
import com.ruoyi.project.data.price.mapper.UltimateOfficeBasePriceMapper;
|
import com.ruoyi.project.data.price.mapper.UltimateOfficeBasePriceMapper;
|
||||||
import com.ruoyi.project.data.price.service.IUltimateOfficeBasePriceService;
|
import com.ruoyi.project.data.price.service.IUltimateOfficeBasePriceService;
|
||||||
@ -14,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Service业务层处理
|
* 办公基价Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2020-05-20
|
* @date 2020-05-20
|
||||||
@ -27,53 +30,70 @@ public class UltimateOfficeBasePriceServiceImpl implements IUltimateOfficeBasePr
|
|||||||
@Autowired
|
@Autowired
|
||||||
private UltimateOfficeBasePriceMapper officeBasePriceUltimateMapper;
|
private UltimateOfficeBasePriceMapper officeBasePriceUltimateMapper;
|
||||||
|
|
||||||
|
private static Integer getLastYearMonth(Integer yearMonth) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.set(yearMonth / 100, yearMonth % 100, 1);
|
||||||
|
return new Integer(String.format("%d%02d", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) - 1));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询办公基价列表
|
||||||
*
|
*
|
||||||
* @param officeBasePriceUltimate 【请填写功能名称】
|
* @param officeBasePriceUltimate 办公基价
|
||||||
* @return 【请填写功能名称】
|
* @return 办公基价
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<UltimateOfficeBasePrice> selectOfficeBasePriceUltimateList(UltimateOfficeBasePrice officeBasePriceUltimate) {
|
public List<UltimateOfficeBasePrice> selectOfficeBasePriceUltimateList(UltimateOfficeBasePrice officeBasePriceUltimate) {
|
||||||
return officeBasePriceUltimateMapper.selectOfficeBasePriceUltimateList(officeBasePriceUltimate);
|
officeBasePriceUltimate.setLastYearMonth(getLastYearMonth(officeBasePriceUltimate.getYearMonth()));
|
||||||
|
return officeBasePriceUltimateMapper.getList(officeBasePriceUltimate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate) {
|
public int selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate) {
|
||||||
return officeBasePriceUltimateMapper.selectOfficeBasePriceUltimateListCount(officeBasePriceUltimate);
|
officeBasePriceUltimate.setLastYearMonth(getLastYearMonth(officeBasePriceUltimate.getYearMonth()));
|
||||||
|
return officeBasePriceUltimateMapper.getCount(officeBasePriceUltimate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UltimateOfficeBasePrice selectOfficeBasePriceUltimateById(String id) {
|
public UltimateOfficeBasePrice getById(Integer yearMonth, Integer id) {
|
||||||
return officeBasePriceUltimateMapper.selectOfficeBasePriceUltimateById(id);
|
return officeBasePriceUltimateMapper.getById(yearMonth, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int updateOfficeBasePriceUltimate(UltimateOfficeBasePrice officeBasePriceUltimate) {
|
public String batchImport(Integer yearMonth, List<UltimateOfficeBasePrice> officeBasePriceUltimates,
|
||||||
return officeBasePriceUltimateMapper.updateOfficeBasePriceUltimate(officeBasePriceUltimate);
|
String operName) {
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String batchImport(List<UltimateOfficeBasePrice> officeBasePriceUltimates, String operName) {
|
|
||||||
if (StringUtils.isNull(officeBasePriceUltimates) || officeBasePriceUltimates.size() == 0) {
|
if (StringUtils.isNull(officeBasePriceUltimates) || officeBasePriceUltimates.size() == 0) {
|
||||||
throw new CustomException("导入办公数据不能为空!");
|
throw new CustomException("导入办公数据不能为空!");
|
||||||
}
|
}
|
||||||
int successNum = 0;
|
int successNum = 0;
|
||||||
int failureNum = 0;
|
int failureNum = 0;
|
||||||
|
int insertNum = 0;
|
||||||
StringBuilder successMsg = new StringBuilder();
|
StringBuilder successMsg = new StringBuilder();
|
||||||
StringBuilder failureMsg = new StringBuilder();
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
Integer lastYearMonth = getLastYearMonth(yearMonth);
|
||||||
|
|
||||||
for (UltimateOfficeBasePrice officeBasePriceUltimate : officeBasePriceUltimates) {
|
for (UltimateOfficeBasePrice officeBasePriceUltimate : officeBasePriceUltimates) {
|
||||||
try {
|
try {
|
||||||
// 验证是否存在这个用户
|
// 验证是否存在这个用户
|
||||||
UltimateOfficeBasePrice officeBasePriceUltimateInDb =
|
UltimateOfficeBasePrice officeBasePriceUltimateInDb =
|
||||||
officeBasePriceUltimateMapper.selectOfficeBasePriceUltimateById(officeBasePriceUltimate.getId());
|
officeBasePriceUltimateMapper.getById(yearMonth, officeBasePriceUltimate.getId());
|
||||||
if (StringUtils.isNotNull(officeBasePriceUltimateInDb)) {
|
UltimateOfficeBasePrice lastUltimateOfficeBasePrice =
|
||||||
this.updateOfficeBasePriceUltimate(officeBasePriceUltimate);
|
officeBasePriceUltimateMapper.getByBuildingId(lastYearMonth,
|
||||||
successNum++;
|
officeBasePriceUltimate.getBuildingId());
|
||||||
successMsg.append("<br/>" + successNum + "、ID= " + officeBasePriceUltimate.getId() + " 更新成功");
|
if (!StringUtils.isNotNull(officeBasePriceUltimateInDb)) {
|
||||||
|
if (officeBasePriceUltimateInDb.getMainPrice().subtract(officeBasePriceUltimate.getMainPrice()).compareTo(BigDecimal.ZERO) != 0
|
||||||
|
|| officeBasePriceUltimateInDb.getMainPriceRent().subtract(officeBasePriceUltimate.getMainPriceRent()).compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
int id = officeBasePriceUltimateMapper.copyCreate(yearMonth, officeBasePriceUltimate.getId());
|
||||||
|
|
||||||
|
officeBasePriceUltimateMapper.update(yearMonth, lastYearMonth, id,
|
||||||
|
officeBasePriceUltimate.getMainPrice(),
|
||||||
|
officeBasePriceUltimate.getMainPriceRent());
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、ID= " + officeBasePriceUltimate.getId() + " 更新成功");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
failureNum++;
|
failureNum++;
|
||||||
failureMsg.append("<br/>" + failureNum + "、ID= " + officeBasePriceUltimate.getId() + " 已存在");
|
failureMsg.append("<br/>" + failureNum + "、ID= " + officeBasePriceUltimate.getId() + " 失败");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failureNum++;
|
failureNum++;
|
||||||
@ -90,4 +110,9 @@ public class UltimateOfficeBasePriceServiceImpl implements IUltimateOfficeBasePr
|
|||||||
}
|
}
|
||||||
return successMsg.toString();
|
return successMsg.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VueSelectModel> getYearMonthList() {
|
||||||
|
return officeBasePriceUltimateMapper.getYearMonthList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.ruoyi.project.system.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class UploadFile extends BaseEntity {
|
||||||
|
private Long id;
|
||||||
|
private String fk;
|
||||||
|
private String moduleName;
|
||||||
|
private String saveFileName;
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFk() {
|
||||||
|
return fk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFk(String fk) {
|
||||||
|
this.fk = fk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModuleName() {
|
||||||
|
return moduleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModuleName(String moduleName) {
|
||||||
|
this.moduleName = moduleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSaveFileName() {
|
||||||
|
return saveFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaveFileName(String saveFileName) {
|
||||||
|
this.saveFileName = saveFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String fileName) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.project.system.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.project.system.domain.UploadFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface UploadFileMapper {
|
||||||
|
/**
|
||||||
|
* 插入文件记录
|
||||||
|
*
|
||||||
|
* @param uploadFile
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insert(UploadFile uploadFile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上传文件
|
||||||
|
*
|
||||||
|
* @param fk
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<UploadFile> getByFk(String fk);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.project.system.service;
|
||||||
|
|
||||||
|
import com.ruoyi.project.system.domain.UploadFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用文件保存 业务层
|
||||||
|
*
|
||||||
|
* @author purple
|
||||||
|
*/
|
||||||
|
public interface IUploadFileService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 记录上传文件
|
||||||
|
* @param uploadFile
|
||||||
|
*/
|
||||||
|
int insert(UploadFile uploadFile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文件上传
|
||||||
|
* @param fk
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<UploadFile> getByFk(String fk);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.ruoyi.project.system.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.project.system.domain.*;
|
||||||
|
import com.ruoyi.project.system.mapper.*;
|
||||||
|
import com.ruoyi.project.system.service.IUploadFileService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户 业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UploadFileServiceImpl implements IUploadFileService {
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(UploadFileServiceImpl.class);
|
||||||
|
@Autowired
|
||||||
|
private UploadFileMapper fileMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(UploadFile uploadFile) {
|
||||||
|
return fileMapper.insert(uploadFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UploadFile> getByFk(String fk) {
|
||||||
|
return fileMapper.getByFk(fk);
|
||||||
|
}
|
||||||
|
}
|
@ -67,4 +67,9 @@ spring:
|
|||||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
url: jdbc:sqlserver://172.16.30.233:1433;DatabaseName=uv_compute
|
url: jdbc:sqlserver://172.16.30.233:1433;DatabaseName=uv_compute
|
||||||
username: sa
|
username: sa
|
||||||
|
password: Lcdatacenter_888
|
||||||
|
clean:
|
||||||
|
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
url: jdbc:sqlserver://172.16.30.233:1433;DatabaseName=uv_clean
|
||||||
|
username: sa
|
||||||
password: Lcdatacenter_888
|
password: Lcdatacenter_888
|
128
ruoyi/src/main/resources/application-prod.yml
Normal file
128
ruoyi/src/main/resources/application-prod.yml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
# 项目相关配置
|
||||||
|
ruoyi:
|
||||||
|
# 名称
|
||||||
|
name: RuoYi
|
||||||
|
# 版本
|
||||||
|
version: 2.2.0
|
||||||
|
# 版权年份
|
||||||
|
copyrightYear: 2019
|
||||||
|
# 实例演示开关
|
||||||
|
demoEnabled: true
|
||||||
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
|
profile: /opt/uv/data/
|
||||||
|
# 获取ip地址开关
|
||||||
|
addressEnabled: false
|
||||||
|
|
||||||
|
# 开发环境配置
|
||||||
|
server:
|
||||||
|
# 服务器的HTTP端口,默认为8080
|
||||||
|
port: 8080
|
||||||
|
servlet:
|
||||||
|
# 应用的访问路径
|
||||||
|
context-path: /
|
||||||
|
tomcat:
|
||||||
|
# tomcat的URI编码
|
||||||
|
uri-encoding: UTF-8
|
||||||
|
# tomcat最大线程数,默认为200
|
||||||
|
max-threads: 800
|
||||||
|
# Tomcat启动初始化的线程数,默认值25
|
||||||
|
min-spare-threads: 30
|
||||||
|
|
||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.ruoyi: debug
|
||||||
|
org.springframework: warn
|
||||||
|
|
||||||
|
# Spring配置
|
||||||
|
spring:
|
||||||
|
# 资源信息
|
||||||
|
messages:
|
||||||
|
# 国际化资源文件路径
|
||||||
|
basename: i18n/messages
|
||||||
|
profiles:
|
||||||
|
active: druid
|
||||||
|
# 文件上传
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
# 单个文件大小
|
||||||
|
max-file-size: 50MB
|
||||||
|
# 设置总上传的文件大小
|
||||||
|
max-request-size: 50MB
|
||||||
|
# 服务模块
|
||||||
|
devtools:
|
||||||
|
restart:
|
||||||
|
# 热部署开关
|
||||||
|
enabled: true
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: 172.16.30.243
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6030
|
||||||
|
# 密码
|
||||||
|
password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
|
|
||||||
|
# token配置
|
||||||
|
token:
|
||||||
|
# 令牌自定义标识
|
||||||
|
header: Authorization
|
||||||
|
# 令牌秘钥
|
||||||
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
|
# 令牌有效期(默认30分钟)
|
||||||
|
expireTime: 30
|
||||||
|
|
||||||
|
# MyBatis配置
|
||||||
|
mybatis:
|
||||||
|
# 搜索指定包别名
|
||||||
|
typeAliasesPackage: com.ruoyi.project.**.domain
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapperLocations: classpath*:mybatis/**/*Mapper.xml
|
||||||
|
# 加载全局的配置文件
|
||||||
|
configLocation: classpath:mybatis/mybatis-config.xml
|
||||||
|
|
||||||
|
# PageHelper分页插件
|
||||||
|
pagehelper:
|
||||||
|
helperDialect: mysql
|
||||||
|
reasonable: true
|
||||||
|
supportMethodsArguments: true
|
||||||
|
params: count=countSql
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: true
|
||||||
|
# 请求前缀
|
||||||
|
pathMapping: /dev-api
|
||||||
|
|
||||||
|
# 防止XSS攻击
|
||||||
|
xss:
|
||||||
|
# 过滤开关
|
||||||
|
enabled: true
|
||||||
|
# 排除链接(多个用逗号分隔)
|
||||||
|
excludes: /system/notice/*
|
||||||
|
# 匹配链接
|
||||||
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
|
||||||
|
# 代码生成
|
||||||
|
gen:
|
||||||
|
# 作者
|
||||||
|
author: ruoyi
|
||||||
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
|
packageName: com.ruoyi.project.system
|
||||||
|
# 自动去除表前缀,默认是true
|
||||||
|
autoRemovePre: false
|
||||||
|
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||||
|
tablePrefix: sys_
|
@ -46,9 +46,9 @@ spring:
|
|||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 10MB
|
max-file-size: 50MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 20MB
|
max-request-size: 50MB
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
|
@ -153,7 +153,13 @@
|
|||||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</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_IMDT_%'
|
||||||
|
order by cast(right(name,6) as int) desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- <update id="updateComputeResidenceRentBasePrice" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">-->
|
<!-- <update id="updateComputeResidenceRentBasePrice" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">-->
|
||||||
<!-- update TLK_计价办公核准基价 set ITEM_YEARMONTH=ITEM_YEARMONTH-->
|
<!-- update TLK_计价办公核准基价 set ITEM_YEARMONTH=ITEM_YEARMONTH-->
|
||||||
|
@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.project.data.basis.mapper.LianJiaCommunityDictMapper">
|
||||||
|
|
||||||
|
<select id="selectPageOfList" resultType="com.ruoyi.project.data.basis.domain.LianJiaCommunityDict">
|
||||||
|
SELECT id
|
||||||
|
,lianjia_community_id AS lianJiaCommunityid
|
||||||
|
,lianjia_community_name as lianJiaCommunityName
|
||||||
|
,lianjia_community_address as lianJiaCommunityAddress
|
||||||
|
,lianjia_url as lianJiaUrl
|
||||||
|
,lianjia_community_url as lianJiaCommunityUrl
|
||||||
|
,community_id as communityId
|
||||||
|
,building_id as buildingId
|
||||||
|
,clean_community_name as cleanCommunityName
|
||||||
|
,clean_community_address as cleanCommunityAddress
|
||||||
|
,clean_building_address as cleanBuildingAddress
|
||||||
|
,enable
|
||||||
|
,create_time as createTime
|
||||||
|
FROM lianjia_dictionary
|
||||||
|
<where>
|
||||||
|
<if test="lianJiaCommunityId != null">
|
||||||
|
lianjia_community_id = #{lianJiaCommunityId}
|
||||||
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
AND enable = #{enable}
|
||||||
|
</if>
|
||||||
|
<if test="communityId != null">
|
||||||
|
AND community_id = #{communityId}
|
||||||
|
</if>
|
||||||
|
<if test="buildingId != null">
|
||||||
|
AND building_id = #{buildingId}
|
||||||
|
</if>
|
||||||
|
<if test="lianJiaUrl != null">
|
||||||
|
AND lianjia_url = #{lianJiaUrl}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by create_time DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPageOfTotal" resultType="int">
|
||||||
|
select count(1) from lianjia_dictionary
|
||||||
|
<where>
|
||||||
|
<if test="lianJiaCommunityId != null">
|
||||||
|
lianjia_community_id = #{lianJiaCommunityId}
|
||||||
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
AND enable = #{enable}
|
||||||
|
</if>
|
||||||
|
<if test="communityId != null">
|
||||||
|
AND community_id = #{communityId}
|
||||||
|
</if>
|
||||||
|
<if test="buildingId != null">
|
||||||
|
AND building_id = #{buildingId}
|
||||||
|
</if>
|
||||||
|
<if test="lianJiaUrl != null">
|
||||||
|
AND lianjia_url = #{lianJiaUrl}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectById" resultType="com.ruoyi.project.data.basis.domain.LianJiaCommunityDict">
|
||||||
|
SELECT id
|
||||||
|
,lianjia_community_id AS lianJiaCommunityid
|
||||||
|
,lianjia_community_name as lianJiaCommunityName
|
||||||
|
,lianjia_community_address as lianJiaCommunityAddress
|
||||||
|
,lianjia_url as lianJiaUrl
|
||||||
|
,lianjia_community_url as lianJiaCommunityUrl
|
||||||
|
,community_id as communityId
|
||||||
|
,building_id as buildingId
|
||||||
|
,clean_community_name as cleanCommunityName
|
||||||
|
,clean_community_address as cleanCommunityAddress
|
||||||
|
,clean_building_address as cleanBuildingAddress
|
||||||
|
,enable
|
||||||
|
,create_time as createTime
|
||||||
|
FROM lianjia_dictionary
|
||||||
|
where id=#{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -7,79 +7,151 @@
|
|||||||
<resultMap type="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
<resultMap type="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
||||||
id="OfficeBasePriceUltimateResult">
|
id="OfficeBasePriceUltimateResult">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="yearMonth" column="ITEM_YEARMONTH"/>
|
<result property="yearMonth" column="yearMonth"/>
|
||||||
<result property="buildingId" column="ITEM_BUILDINGID_P"/>
|
<result property="buildingId" column="BuildingID_P"/>
|
||||||
<result property="communityId" column="ITEM_PROJECTID_P"/>
|
<result property="communityId" column="ProjectID_P"/>
|
||||||
<result property="mainPrice" column="ITEM_MAINPRICE"/>
|
<result property="mainPrice" column="MainPrice"/>
|
||||||
<result property="mainPriceRent" column="ITEM_MAINPRICERENT"/>
|
<result property="mainPriceRent" column="MainPriceRent"/>
|
||||||
<result property="mainPricePst" column="ITEM_MAINPRICEPST"/>
|
<result property="mainPricePst" column="MainPricePst"/>
|
||||||
<result property="mainPriceRentPst" column="ITEM_MAINPRICERENTPST"/>
|
<result property="mainPriceRentPst" column="MainPriceRentPst"/>
|
||||||
<result property="mainPriceType" column="ITEM_MAINPRICETYPE"/>
|
<result property="mainPriceType" column="MainPriceType"/>
|
||||||
<result property="mainPriceRentType" column="ITEM_MAINPRICERENTTYPE"/>
|
<result property="mainPriceRentType" column="MainPriceRentType"/>
|
||||||
<result property="updateDate" column="ITEM_MODIFYDATE"/>
|
<result property="updateDate" column="ModifyDate"/>
|
||||||
<result property="status" column="ITEM_STATUS"/>
|
<result property="status" column="Status"/>
|
||||||
<result property="isStandardBuilding" column="ITEM_BUILDINGSTD"/>
|
<result property="isStandardBuilding" column="BuildingStd"/>
|
||||||
<result property="adjustPriceComment" column="ITEM_ADJEVD"/>
|
<result property="adjustPriceComment" column="AdjEvd"/>
|
||||||
|
<result property="areaCoefficient" column="AreaCoff"/>
|
||||||
|
<result property="yearCoefficient" column="YearCoff"/>
|
||||||
|
<result property="buildingCoefficient" column="BuildingCoff"/>
|
||||||
|
|
||||||
|
<result property="communityName" column="ProjectName"/>
|
||||||
|
<result property="communityAddress" column="ProjectAddr"/>
|
||||||
|
<result property="buildingAddress" column="BuildingAddr"/>
|
||||||
|
<result property="countyName" column="County"/>
|
||||||
|
<result property="loopName" column="Loop"/>
|
||||||
|
<result property="blockName" column="Block"/>
|
||||||
|
<result property="streetName" column="Street"/>
|
||||||
|
<result property="year" column="year"/>
|
||||||
|
<result property="avgArea" column="AvgArea"/>
|
||||||
|
<result property="totalFloorSum" column="TotalFloorSum"/>
|
||||||
|
<result property="upperFloorSum" column="UpperFloorSum"/>
|
||||||
|
<result property="officeClass" column="OfficeClass"/>
|
||||||
|
<result property="officeLevel" column="Grade"/>
|
||||||
|
<result property="mainPrice_1" column="mainPrice_1"/>
|
||||||
|
<result property="mainPriceRent_1" column="mainPriceRent_1"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOfficeBasePriceUltimateVo">
|
<sql id="selectOfficeBasePriceUltimateVo">
|
||||||
select ITEM_YEARMONTH,ITEM_BUILDINGID,ITEM_UNIFIEDID,ITEM_PROJECTID,ITEM_BUILDINGID_P,ITEM_PROJECTID_P,ITEM_MAINPRICE,ITEM_MAINPRICERENT,ITEM_MAINPRICEPST,ITEM_MAINPRICERENTPST,ITEM_MAINPRICETYPE,ITEM_MAINPRICERENTTYPE,ITEM_MODIFYDATE,ITEM_STATUS,ITEM_BUILDINGSTD,ITEM_ADJEVD,ID from TLK_计价办公核准基价
|
SELECT a.ID
|
||||||
|
,a.BuildingID_P
|
||||||
|
,a.ProjectID_P
|
||||||
|
,a.MainPrice
|
||||||
|
,a.MainPriceRent
|
||||||
|
,a.MainPricePst
|
||||||
|
,a.MainPriceRentPst
|
||||||
|
,a.MainPriceType
|
||||||
|
,a.MainPriceRentType
|
||||||
|
,a.ModifyDate
|
||||||
|
,a.Status
|
||||||
|
,a.BuildingStd
|
||||||
|
,a.AdjEvd
|
||||||
|
,b.AreaCoff
|
||||||
|
,b.YearCoff
|
||||||
|
,b.BuildingCoff
|
||||||
|
,b.ProjectName
|
||||||
|
,b.ProjectAddr
|
||||||
|
,b.BuildingAddr
|
||||||
|
,b.County
|
||||||
|
,b.Loop
|
||||||
|
,b.Block
|
||||||
|
,b.Street
|
||||||
|
,b.Year
|
||||||
|
,b.AvgArea
|
||||||
|
,b.TotalFloorSum
|
||||||
|
,b.UpperFloorSum
|
||||||
|
,b.OfficeClass
|
||||||
|
,b.Grade
|
||||||
|
,c.MainPrice AS mainPrice_1
|
||||||
|
,c.MainPriceRent as mainPriceRent_1
|
||||||
|
, ${yearMonth} as yearMonth
|
||||||
|
FROM ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a
|
||||||
|
left join DIM_OFFICE_PROJECT_BUILDING_201909 b on a.BuildingID_P=b.BuildingID_P
|
||||||
|
left join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} c on a.BuildingID_P = c.BuildingID_P
|
||||||
|
WHERE b.EffDate <![CDATA[ <= ]]> getdate() AND b.ExpirDate <![CDATA[ > ]]> getdate() AND A.STATUS=1 AND
|
||||||
|
c.Status=1
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectOfficeBasePriceUltimateListCount" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice" resultType="int">
|
<select id="getCount" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice" resultType="int">
|
||||||
select count(1) from TLK_计价办公核准基价
|
select count(1) FROM ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a
|
||||||
|
left join DIM_OFFICE_PROJECT_BUILDING_201909 b on a.BuildingID_P=b.BuildingID_P
|
||||||
|
left join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} c on a.BuildingID_P = c.BuildingID_P
|
||||||
|
WHERE b.EffDate <![CDATA[ <= ]]> getdate() AND b.ExpirDate <![CDATA[ > ]]> getdate() AND A.STATUS=1 AND
|
||||||
|
c.Status=1
|
||||||
<where>
|
<where>
|
||||||
<if test="yearMonth != null">
|
|
||||||
AND ITEM_YEARMONTH = #{yearMonth}
|
|
||||||
</if>
|
|
||||||
<if test="communityId != null">
|
<if test="communityId != null">
|
||||||
AND ITEM_PROJECTID_P = #{communityId}
|
AND a.PROJECTID_P = #{communityId}
|
||||||
</if>
|
</if>
|
||||||
<if test="buildingId != null">
|
<if test="buildingId != null">
|
||||||
AND ITEM_BUILDINGID_P = #{buildingId}
|
AND a.BUILDINGID_P = #{buildingId}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
AND ITEM_STATUS = #{status}
|
AND a.STATUS = #{status}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOfficeBasePriceUltimateList" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
<select id="getList" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice"
|
||||||
resultMap="OfficeBasePriceUltimateResult">
|
resultMap="OfficeBasePriceUltimateResult">
|
||||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="yearMonth != null">
|
|
||||||
AND ITEM_YEARMONTH = #{yearMonth}
|
|
||||||
</if>
|
|
||||||
<if test="communityId != null">
|
<if test="communityId != null">
|
||||||
AND ITEM_PROJECTID_P = #{communityId}
|
AND a.PROJECTID_P = #{communityId}
|
||||||
</if>
|
</if>
|
||||||
<if test="buildingId != null">
|
<if test="buildingId != null">
|
||||||
AND ITEM_BUILDINGID_P = #{buildingId}
|
AND a.BUILDINGID_P = #{buildingId}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND a.STATUS = #{status}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by ITEM_YEARMONTH DESC,ID DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
|
order by a.BUILDINGID_P ASC,a.ID DESC OFFSET #{pageIndex} rows fetch next #{pageSize} rows only;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOfficeBasePriceUltimateById" parameterType="String" resultMap="OfficeBasePriceUltimateResult">
|
<select id="getById" parameterType="String" resultMap="OfficeBasePriceUltimateResult">
|
||||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
<include refid="selectOfficeBasePriceUltimateVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- <insert id="insertOfficeBasePriceUltimate" parameterType="OfficeBasePriceUltimate" useGeneratedKeys="true"-->
|
<insert id="copyCreate">
|
||||||
<!-- keyProperty="id">-->
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||||
<!-- insert into office_base_price_ultimate-->
|
SELECT LAST_INSERT_ID()
|
||||||
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
|
</selectKey>
|
||||||
<!-- </trim>-->
|
insert into
|
||||||
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
|
dbo.ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}(BuildingID,UnifiedID,ProjectID,BuildingID_P,ProjectID_P,MainPrice,MainPriceRent,MainPricePst,MainPriceRentPst,MainPriceType,MainPriceRentType,ModifyDate,Status,BuildingStd,AdjEvd)
|
||||||
<!-- </trim>-->
|
select BuildingID,UnifiedID,ProjectID,BuildingID_P,ProjectID_P,MainPrice,MainPriceRent,MainPricePst,MainPriceRentPst,MainPriceType,MainPriceRentType,ModifyDate,0,BuildingStd,AdjEvd
|
||||||
<!-- </insert>-->
|
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
||||||
|
where id=#{id}
|
||||||
<update id="updateOfficeBasePriceUltimate" parameterType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">
|
</insert>
|
||||||
update TLK_计价办公核准基价 set ITEM_YEARMONTH=ITEM_YEARMONTH
|
<!-- 更新 -->
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<update id="update">
|
||||||
</trim>
|
update a set ModifyDate=getdate(), mainPrice=#{mainPrice}, mainPriceRent=#{mainPriceRent},
|
||||||
where id = #{id}
|
mainPricePst = #{mainPrice} * 1.0 / b.mainPrice, mainPriceRentPst = #{mainPriceRentPst} * 1.0 / b.mainPriceRentPst
|
||||||
|
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} b on
|
||||||
|
a.BuildingID_p=b.BuildingID_P
|
||||||
|
where a.Status=1 and b.Status=1 and a.id=#{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!-- 获取表名 -->
|
||||||
|
<select id="getYearMonthList" resultType="com.ruoyi.project.common.VueSelectModel">
|
||||||
|
SELECT right(name,6) as value, right(name,6) as label
|
||||||
|
FROM sys.tables
|
||||||
|
where name like 'ODS_OFFICE_BUILDING_PRICE_INFO_%'
|
||||||
|
order by cast(right(name,6) as int) desc
|
||||||
|
</select>
|
||||||
|
<!-- -->
|
||||||
|
<select id="getByBuildingId" resultType="com.ruoyi.project.data.price.controller.UltimateOfficeBasePriceController">
|
||||||
|
select id,MainPrice,MainPriceRent
|
||||||
|
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
||||||
|
where BuildingID_P=#{buildingI}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
25
ruoyi/src/main/resources/mybatis/system/UploadFileMapper.xml
Normal file
25
ruoyi/src/main/resources/mybatis/system/UploadFileMapper.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.project.system.mapper.UploadFileMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysUserRole" id="SysUserRoleResult">
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="roleId" column="role_id" />
|
||||||
|
</resultMap>
|
||||||
|
<insert id="insert" parameterType="com.ruoyi.project.system.domain.UploadFile">
|
||||||
|
insert into sys_file(fk, save_file_name, file_name, module_name, create_by, create_time)
|
||||||
|
value (#{fk},#{saveFileName},#{fileName},#{moduleName},#{createBy},now());
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="delete" parameterType="Long">
|
||||||
|
delete from sys_file where id=#{id};
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="getByFk" parameterType="com.ruoyi.project.system.domain.UploadFile">
|
||||||
|
select fk, save_file_name as saveFileName, file_name as fileName, module_name as moduleName, create_by as
|
||||||
|
createBy, create_time as createTime
|
||||||
|
from sys_file where fk=#{fk}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -2,12 +2,11 @@ package com.uvaluation.compute;
|
|||||||
|
|
||||||
import com.ruoyi.project.data.price.domain.ComputeResidenceRentBasePrice;
|
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 org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class MapperXmlGeneratorTests {
|
public class MapperXmlGeneratorTests {
|
||||||
|
|
||||||
@ -29,4 +28,13 @@ public class MapperXmlGeneratorTests {
|
|||||||
}
|
}
|
||||||
System.out.println(sb.toString());
|
System.out.println(sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDate(){
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.set(202006 / 100, 202006 % 100, 1);
|
||||||
|
Integer lastYearMonth = new Integer(String.format("%d%02d", calendar.get(Calendar.YEAR),
|
||||||
|
calendar.get(Calendar.MONTH)-1));
|
||||||
|
Assert.assertTrue(Objects.equals(lastYearMonth,202005));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user