数据平台前后端分离
This commit is contained in:
parent
83cb560f6a
commit
23db85a2c1
@ -10,7 +10,7 @@ const service = axios.create({
|
|||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
// 超时
|
// 超时
|
||||||
timeout: 10000
|
timeout: 30 * 1000
|
||||||
})
|
})
|
||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
|
@ -42,16 +42,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['system:ultimate:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -72,11 +62,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="dataList">
|
||||||
<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" width="110" />
|
||||||
<el-table-column label="楼栋ID" align="center" prop="buildingId" />
|
<el-table-column label="楼栋ID" align="center" prop="buildingId" width="110" />
|
||||||
<el-table-column label="项目名称" align="center" prop="communityName" />
|
<el-table-column label="项目名称" align="center" prop="communityName" />
|
||||||
<el-table-column label="办公项目地址" align="center" prop="communityAddress" />
|
<el-table-column label="办公项目地址" align="center" prop="communityAddress" />
|
||||||
<el-table-column label="楼栋地址" align="center" prop="buildingAddress" />
|
<el-table-column label="楼栋地址" align="center" prop="buildingAddress" />
|
||||||
@ -104,7 +94,12 @@
|
|||||||
/>
|
/>
|
||||||
<el-table-column label="价格更改说明" align="center" prop="adjustPriceComment" />
|
<el-table-column label="价格更改说明" align="center" prop="adjustPriceComment" />
|
||||||
<el-table-column label="更新日期" align="center" prop="updateDate" :formatter="dateFormatter" />
|
<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"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -113,13 +108,6 @@
|
|||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:user:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<!-- <el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['system:user:remove']"
|
|
||||||
>删除</el-button>-->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -134,52 +122,149 @@
|
|||||||
|
|
||||||
<!-- 添加或修改办公基价对话框 -->
|
<!-- 添加或修改办公基价对话框 -->
|
||||||
<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="updateRules" label-width="160px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="小区ID">
|
<el-form-item label="小区ID">
|
||||||
<el-input v-model="form.communityId" disabled="true" readonly />
|
<el-input v-model="form.communityId" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="楼栋ID">
|
<el-form-item label="楼栋ID">
|
||||||
<el-input v-model="form.buildingId" disabled="true" readonly />
|
<el-input v-model="form.buildingId" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主力基价(元/㎡)">
|
<el-form-item label="项目名称">
|
||||||
<el-input v-model="form.mainPrice" />
|
<el-input v-model="form.communityName" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主力租金(元/月·㎡)">
|
<el-form-item label="办公项目地址">
|
||||||
<el-input v-model="form.mainPriceRent" />
|
<el-input v-model="form.communityAddress" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<!-- <el-col :span="24">
|
||||||
|
<el-form-item label="楼栋地址">
|
||||||
|
<el-input v-model="form.buildingAddress" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>-->
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="楼栋地址">
|
||||||
|
<el-input v-model="form.complexRegion" disabled 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.year" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="年份修正系数">
|
||||||
|
<el-input v-model="form.yearCoefficient" disabled 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.avgArea" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="面积修正系数">
|
||||||
|
<el-input v-model="form.areaCoefficient" disabled 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.complexFloorInfo" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="办公分类-办公等级">
|
||||||
|
<el-input v-model="form.complexOfficeInfo" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主力基价涨跌幅">
|
<el-form-item label="主力基价涨跌幅">
|
||||||
<el-input v-model="form.mainPricePst" />
|
<el-input v-model="form.mainPricePst" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主力租金涨跌幅">
|
<el-form-item label="主力租金涨跌幅">
|
||||||
<el-input v-model="form.mainPriceRentPst" />
|
<el-input v-model="form.mainPriceRentPst" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主力基价类型">
|
<el-form-item label="主力基价类型">
|
||||||
<el-input v-model="form.mainPriceType" />
|
<el-input v-model="form.mainPriceType" disabled readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主力租金类型">
|
<el-form-item label="主力租金类型">
|
||||||
<el-input v-model="form.mainPriceRentType" />
|
<el-input v-model="form.mainPriceRentType" disabled 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.buildingCoefficient" disabled readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否标准楼栋">
|
||||||
|
<el-input
|
||||||
|
v-model="form.standardBuilding"
|
||||||
|
disabled
|
||||||
|
readonly
|
||||||
|
:formatter="yesOrNotFormatter"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主力基价(上期)" prop="mainPrice_1">
|
||||||
|
<el-input v-model="form.mainPrice_1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主力租金(上期)" prop="mainPriceRent_1">
|
||||||
|
<el-input v-model="form.mainPriceRent_1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主力基价(元/㎡)" prop="mainPrice">
|
||||||
|
<el-input v-model="form.mainPrice" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主力租金(元/月·㎡)" prop="mainPriceRent">
|
||||||
|
<el-input v-model="form.mainPriceRent" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="更改价格说明">
|
||||||
|
<el-input v-model="form.adjustPriceComment" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -190,7 +275,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog
|
||||||
|
:title="upload.title"
|
||||||
|
:visible.sync="upload.open"
|
||||||
|
width="80%"
|
||||||
|
top="10vh"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
@ -241,6 +332,19 @@ export default {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var checkPrice = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("请输入价格"));
|
||||||
|
} else if (value === "" || isNaN(parseFloat(value))) {
|
||||||
|
callback(new Error("请输入价格"));
|
||||||
|
} else {
|
||||||
|
if (value <= 0) {
|
||||||
|
callback(new Error("请输入合理价格"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -254,7 +358,7 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 办公基价表格数据
|
// 办公基价表格数据
|
||||||
ultimateList: [],
|
dataList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -293,6 +397,28 @@ export default {
|
|||||||
{ validator: checkYearMonth, trigger: "blur" },
|
{ validator: checkYearMonth, trigger: "blur" },
|
||||||
{ validator: checkYearMonth, trigger: "change" }
|
{ validator: checkYearMonth, trigger: "change" }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
updateRules: {
|
||||||
|
yearMonth: [
|
||||||
|
{ validator: checkYearMonth, trigger: "blur" },
|
||||||
|
{ validator: checkYearMonth, trigger: "change" }
|
||||||
|
],
|
||||||
|
mainPrice: [
|
||||||
|
{ validator: checkPrice, trigger: "blur" },
|
||||||
|
{ validator: checkPrice, trigger: "change" }
|
||||||
|
],
|
||||||
|
mainPriceRent: [
|
||||||
|
{ validator: checkPrice, trigger: "blur" },
|
||||||
|
{ validator: checkPrice, trigger: "change" }
|
||||||
|
],
|
||||||
|
mainPrice_1: [
|
||||||
|
{ validator: checkPrice, trigger: "blur" },
|
||||||
|
{ validator: checkPrice, trigger: "change" }
|
||||||
|
],
|
||||||
|
mainPriceRent_1: [
|
||||||
|
{ validator: checkPrice, trigger: "blur" },
|
||||||
|
{ validator: checkPrice, trigger: "change" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -375,7 +501,25 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
const yearMonth = row.yearMonth;
|
const yearMonth = row.yearMonth;
|
||||||
|
console.log(yearMonth);
|
||||||
getById(yearMonth, id).then(response => {
|
getById(yearMonth, id).then(response => {
|
||||||
|
// 复合信息
|
||||||
|
response.data.complexRegion =
|
||||||
|
response.data.countyName +
|
||||||
|
"-" +
|
||||||
|
response.data.blockName +
|
||||||
|
"-" +
|
||||||
|
response.data.loopName +
|
||||||
|
"-" +
|
||||||
|
response.data.streetName +
|
||||||
|
"-" +
|
||||||
|
response.data.buildingAddress;
|
||||||
|
// 办公信息
|
||||||
|
response.data.complexOfficeInfo =
|
||||||
|
response.data.officeClass + "-" + response.data.officeLevel;
|
||||||
|
// 层数信息
|
||||||
|
response.data.complexFloorInfo =
|
||||||
|
response.data.upperFloorSum + "-" + response.data.totalFloorSum;
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改办公基价";
|
this.title = "修改办公基价";
|
||||||
|
@ -76,15 +76,15 @@ public class UltimateOfficeBasePriceController extends BaseController {
|
|||||||
return AjaxResult.success(officeBasePriceUltimateService.getById(yearMonth, 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.update(officeBasePriceUltimate));
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出办公基价列表
|
* 导出办公基价列表
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.ruoyi.project.data.price.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class OfficeBasePriceModifyModel {
|
||||||
|
private Integer id;
|
||||||
|
private Integer yearMonth;
|
||||||
|
private BigDecimal mainPrice;
|
||||||
|
private BigDecimal mainPricePst;
|
||||||
|
private BigDecimal mainPriceRent;
|
||||||
|
private BigDecimal mainPriceRentPst;
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
public OfficeBasePriceModifyModel(Integer id, Integer yearMonth) {
|
||||||
|
this.id = id;
|
||||||
|
this.yearMonth = yearMonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getYearMonth() {
|
||||||
|
return yearMonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMainPrice() {
|
||||||
|
return mainPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainPrice(BigDecimal mainPrice) {
|
||||||
|
this.mainPrice = mainPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMainPricePst() {
|
||||||
|
return mainPricePst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainPricePst(BigDecimal mainPricePst) {
|
||||||
|
this.mainPricePst = mainPricePst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMainPriceRent() {
|
||||||
|
return mainPriceRent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainPriceRent(BigDecimal mainPriceRent) {
|
||||||
|
this.mainPriceRent = mainPriceRent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMainPriceRentPst() {
|
||||||
|
return mainPriceRentPst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainPriceRentPst(BigDecimal mainPriceRentPst) {
|
||||||
|
this.mainPriceRentPst = mainPriceRentPst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComment() {
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComment(String comment) {
|
||||||
|
this.comment = comment;
|
||||||
|
}
|
||||||
|
}
|
@ -34,13 +34,13 @@ public class UltimateOfficeBasePrice extends BaseEntity {
|
|||||||
private String communityAddress;
|
private String communityAddress;
|
||||||
@Excel(name = "楼栋地址")
|
@Excel(name = "楼栋地址")
|
||||||
private String buildingAddress;
|
private String buildingAddress;
|
||||||
@Excel(name = "楼栋地址")
|
@Excel(name = "区域")
|
||||||
private String countyName;
|
private String countyName;
|
||||||
@Excel(name = "板块地址")
|
@Excel(name = "板块")
|
||||||
private String blockName;
|
private String blockName;
|
||||||
@Excel(name = "街道地址")
|
@Excel(name = "街道")
|
||||||
private String streetName;
|
private String streetName;
|
||||||
@Excel(name = "环线地址")
|
@Excel(name = "环线")
|
||||||
private String loopName;
|
private String loopName;
|
||||||
@Excel(name = "建成年代")
|
@Excel(name = "建成年代")
|
||||||
private Integer year;
|
private Integer year;
|
||||||
|
@ -5,6 +5,7 @@ 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.common.VueSelectModel;
|
||||||
|
import com.ruoyi.project.data.price.domain.OfficeBasePriceModifyModel;
|
||||||
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
import com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -21,7 +22,14 @@ public interface UltimateOfficeBasePriceMapper {
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
UltimateOfficeBasePrice getById(Integer yearMonth, Integer id);
|
UltimateOfficeBasePrice getById(Integer yearMonth, Integer lastYearMonth, Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param yearMonth
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
UltimateOfficeBasePrice getByRouteId(Integer yearMonth, Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param yearMonth
|
* @param yearMonth
|
||||||
@ -47,16 +55,12 @@ public interface UltimateOfficeBasePriceMapper {
|
|||||||
Integer getCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
Integer getCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新当期基价
|
||||||
*
|
*
|
||||||
* @param yearMonth
|
* @param officeBasePriceModifyModel
|
||||||
* @param id
|
|
||||||
* @param mainPrice
|
|
||||||
* @param mainPriceRent
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int update(Integer yearMonth, Integer lastYearMonth, int id, BigDecimal mainPrice, BigDecimal mainPriceRent);
|
int updateBasePrice(OfficeBasePriceModifyModel officeBasePriceModifyModel);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年月
|
* 年月
|
||||||
@ -65,13 +69,4 @@ public interface UltimateOfficeBasePriceMapper {
|
|||||||
*/
|
*/
|
||||||
List<VueSelectModel> getYearMonthList();
|
List<VueSelectModel> getYearMonthList();
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新
|
|
||||||
*
|
|
||||||
* @param yearMonth
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int copyCreate(Integer yearMonth, Integer id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,29 +24,27 @@ public interface IUltimateOfficeBasePriceService {
|
|||||||
int selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
int selectOfficeBasePriceUltimateListCount(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
UltimateOfficeBasePrice getById(Integer yearMonth, Integer id);
|
UltimateOfficeBasePrice getById(Integer yearMonth, Integer id);
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// *
|
* 可能修改当期的价格、也可能修改往期
|
||||||
// * @param officeBasePriceUltimate
|
*
|
||||||
// * @return
|
* @param officeBasePriceUltimate
|
||||||
// */
|
* @return
|
||||||
// int updateOfficeBasePriceUltimate(UltimateOfficeBasePrice officeBasePriceUltimate);
|
*/
|
||||||
|
int update(UltimateOfficeBasePrice officeBasePriceUltimate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param officeBasePriceUltimates
|
* @param officeBasePriceUltimates
|
||||||
* @param operName
|
* @param operName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String batchImport(Integer yearMonth, List<UltimateOfficeBasePrice> officeBasePriceUltimates,String operName);
|
String batchImport(Integer yearMonth, List<UltimateOfficeBasePrice> officeBasePriceUltimates, String operName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<VueSelectModel> getYearMonthList();
|
List<VueSelectModel> getYearMonthList();
|
||||||
|
@ -7,6 +7,7 @@ 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.common.VueSelectModel;
|
||||||
|
import com.ruoyi.project.data.price.domain.OfficeBasePriceModifyModel;
|
||||||
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;
|
||||||
@ -56,7 +57,8 @@ public class UltimateOfficeBasePriceServiceImpl implements IUltimateOfficeBasePr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UltimateOfficeBasePrice getById(Integer yearMonth, Integer id) {
|
public UltimateOfficeBasePrice getById(Integer yearMonth, Integer id) {
|
||||||
return officeBasePriceUltimateMapper.getById(yearMonth, id);
|
Integer lastYearMonth = getLastYearMonth(yearMonth);
|
||||||
|
return officeBasePriceUltimateMapper.getById(yearMonth, lastYearMonth, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -72,32 +74,29 @@ public class UltimateOfficeBasePriceServiceImpl implements IUltimateOfficeBasePr
|
|||||||
StringBuilder failureMsg = new StringBuilder();
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
Integer lastYearMonth = getLastYearMonth(yearMonth);
|
Integer lastYearMonth = getLastYearMonth(yearMonth);
|
||||||
|
|
||||||
for (UltimateOfficeBasePrice officeBasePriceUltimate : officeBasePriceUltimates) {
|
for (UltimateOfficeBasePrice inputModel : officeBasePriceUltimates) {
|
||||||
try {
|
try {
|
||||||
// 验证是否存在这个用户
|
// 验证是否存在这个用户
|
||||||
UltimateOfficeBasePrice officeBasePriceUltimateInDb =
|
UltimateOfficeBasePrice currentUltimateOfficeBasePrice =
|
||||||
officeBasePriceUltimateMapper.getById(yearMonth, officeBasePriceUltimate.getId());
|
officeBasePriceUltimateMapper.getById(yearMonth, lastYearMonth,
|
||||||
|
inputModel.getId());
|
||||||
UltimateOfficeBasePrice lastUltimateOfficeBasePrice =
|
UltimateOfficeBasePrice lastUltimateOfficeBasePrice =
|
||||||
officeBasePriceUltimateMapper.getByBuildingId(lastYearMonth,
|
officeBasePriceUltimateMapper.getByBuildingId(lastYearMonth,
|
||||||
officeBasePriceUltimate.getBuildingId());
|
inputModel.getBuildingId());
|
||||||
if (!StringUtils.isNotNull(officeBasePriceUltimateInDb)) {
|
if (!StringUtils.isNotNull(currentUltimateOfficeBasePrice)) {
|
||||||
if (officeBasePriceUltimateInDb.getMainPrice().subtract(officeBasePriceUltimate.getMainPrice()).compareTo(BigDecimal.ZERO) != 0
|
if (currentUltimateOfficeBasePrice.getMainPrice().subtract(inputModel.getMainPrice()).compareTo(BigDecimal.ZERO) != 0
|
||||||
|| officeBasePriceUltimateInDb.getMainPriceRent().subtract(officeBasePriceUltimate.getMainPriceRent()).compareTo(BigDecimal.ZERO) != 0) {
|
|| currentUltimateOfficeBasePrice.getMainPriceRent().subtract(inputModel.getMainPriceRent()).compareTo(BigDecimal.ZERO) != 0) {
|
||||||
int id = officeBasePriceUltimateMapper.copyCreate(yearMonth, officeBasePriceUltimate.getId());
|
updateBasePrice(inputModel, currentUltimateOfficeBasePrice, lastUltimateOfficeBasePrice);
|
||||||
|
|
||||||
officeBasePriceUltimateMapper.update(yearMonth, lastYearMonth, id,
|
|
||||||
officeBasePriceUltimate.getMainPrice(),
|
|
||||||
officeBasePriceUltimate.getMainPriceRent());
|
|
||||||
successNum++;
|
successNum++;
|
||||||
successMsg.append("<br/>" + successNum + "、ID= " + officeBasePriceUltimate.getId() + " 更新成功");
|
successMsg.append("<br/>" + successNum + "、ID= " + inputModel.getId() + " 更新成功");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
failureNum++;
|
failureNum++;
|
||||||
failureMsg.append("<br/>" + failureNum + "、ID= " + officeBasePriceUltimate.getId() + " 失败");
|
failureMsg.append("<br/>" + failureNum + "、ID= " + inputModel.getId() + " 失败");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failureNum++;
|
failureNum++;
|
||||||
String msg = "<br/>" + failureNum + "、ID= " + officeBasePriceUltimate.getId() + " 导入失败:";
|
String msg = "<br/>" + failureNum + "、ID= " + inputModel.getId() + " 导入失败:";
|
||||||
failureMsg.append(msg + e.getMessage());
|
failureMsg.append(msg + e.getMessage());
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
}
|
}
|
||||||
@ -115,4 +114,78 @@ public class UltimateOfficeBasePriceServiceImpl implements IUltimateOfficeBasePr
|
|||||||
public List<VueSelectModel> getYearMonthList() {
|
public List<VueSelectModel> getYearMonthList() {
|
||||||
return officeBasePriceUltimateMapper.getYearMonthList();
|
return officeBasePriceUltimateMapper.getYearMonthList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param officeBasePriceUltimate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int update(UltimateOfficeBasePrice officeBasePriceUltimate) {
|
||||||
|
// 当期价格
|
||||||
|
Integer lastYearMonth = getLastYearMonth(officeBasePriceUltimate.getYearMonth());
|
||||||
|
UltimateOfficeBasePrice ultimateOfficeBasePrice =
|
||||||
|
officeBasePriceUltimateMapper.getByRouteId(officeBasePriceUltimate.getYearMonth(),
|
||||||
|
officeBasePriceUltimate.getId());
|
||||||
|
// 上期价格
|
||||||
|
UltimateOfficeBasePrice lastUltimateOfficeBasePrice =
|
||||||
|
officeBasePriceUltimateMapper.getByBuildingId(lastYearMonth,
|
||||||
|
officeBasePriceUltimate.getBuildingId());
|
||||||
|
|
||||||
|
updateBasePrice(officeBasePriceUltimate, ultimateOfficeBasePrice, lastUltimateOfficeBasePrice);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基价更新
|
||||||
|
*
|
||||||
|
* @param inputModel
|
||||||
|
* @param currentUltimateOfficeBasePrice
|
||||||
|
* @param lastUltimateOfficeBasePrice
|
||||||
|
*/
|
||||||
|
private void updateBasePrice(UltimateOfficeBasePrice inputModel,
|
||||||
|
UltimateOfficeBasePrice currentUltimateOfficeBasePrice,
|
||||||
|
UltimateOfficeBasePrice lastUltimateOfficeBasePrice) {
|
||||||
|
// 上期价格比较
|
||||||
|
if (StringUtils.isNotNull(lastUltimateOfficeBasePrice) &&
|
||||||
|
StringUtils.isNotNull(lastUltimateOfficeBasePrice.getMainPrice()) &&
|
||||||
|
StringUtils.isNotNull(lastUltimateOfficeBasePrice.getMainPriceRent()) &&
|
||||||
|
(lastUltimateOfficeBasePrice.getMainPrice().compareTo(inputModel.getMainPrice_1()) != 0 ||
|
||||||
|
lastUltimateOfficeBasePrice.getMainPriceRent().compareTo(inputModel.getMainPriceRent_1()) != 0)) {
|
||||||
|
OfficeBasePriceModifyModel officeBasePriceModifyModel =
|
||||||
|
new OfficeBasePriceModifyModel(lastUltimateOfficeBasePrice.getId(),
|
||||||
|
lastUltimateOfficeBasePrice.getYearMonth());
|
||||||
|
officeBasePriceModifyModel.setMainPrice(inputModel.getMainPrice_1());
|
||||||
|
officeBasePriceModifyModel.setMainPricePst(lastUltimateOfficeBasePrice.getMainPricePst());
|
||||||
|
officeBasePriceModifyModel.setMainPriceRent(inputModel.getMainPriceRent_1());
|
||||||
|
officeBasePriceModifyModel.setMainPriceRentPst(lastUltimateOfficeBasePrice.getMainPriceRentPst());
|
||||||
|
// 上期价格
|
||||||
|
officeBasePriceUltimateMapper.updateBasePrice(officeBasePriceModifyModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 本期价格比较
|
||||||
|
if (StringUtils.isNotNull(currentUltimateOfficeBasePrice) &&
|
||||||
|
StringUtils.isNotNull(currentUltimateOfficeBasePrice.getMainPrice()) &&
|
||||||
|
StringUtils.isNotNull(currentUltimateOfficeBasePrice.getMainPriceRent()) &&
|
||||||
|
(currentUltimateOfficeBasePrice.getMainPrice().compareTo(inputModel.getMainPrice()) != 0 ||
|
||||||
|
currentUltimateOfficeBasePrice.getMainPriceRent().compareTo(inputModel.getMainPriceRent()) != 0)) {
|
||||||
|
OfficeBasePriceModifyModel officeBasePriceModifyModel = new OfficeBasePriceModifyModel(inputModel.getId()
|
||||||
|
, inputModel.getYearMonth());
|
||||||
|
officeBasePriceModifyModel.setMainPrice(inputModel.getMainPrice());
|
||||||
|
BigDecimal mainPricePst =
|
||||||
|
inputModel.getMainPrice().divide(lastUltimateOfficeBasePrice.getMainPrice(), 4);
|
||||||
|
officeBasePriceModifyModel.setMainPricePst(mainPricePst);
|
||||||
|
officeBasePriceModifyModel.setMainPriceRent(inputModel.getMainPriceRent());
|
||||||
|
BigDecimal mainPriceRentPst =
|
||||||
|
inputModel.getMainPriceRent().divide(lastUltimateOfficeBasePrice.getMainPriceRent(),
|
||||||
|
4);
|
||||||
|
officeBasePriceModifyModel.setMainPriceRentPst(mainPriceRentPst);
|
||||||
|
if(StringUtils.isNotNull(inputModel.getAdjustPriceComment()))
|
||||||
|
officeBasePriceModifyModel.setComment(inputModel.getAdjustPriceComment());
|
||||||
|
// 上期价格
|
||||||
|
officeBasePriceUltimateMapper.updateBasePrice(officeBasePriceModifyModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,16 +33,13 @@ spring:
|
|||||||
testOnReturn: false
|
testOnReturn: false
|
||||||
webStatFilter:
|
webStatFilter:
|
||||||
enabled: true
|
enabled: true
|
||||||
filter:
|
filters: stat,wall
|
||||||
|
wall:
|
||||||
|
multiStatementAllow: true
|
||||||
stat:
|
stat:
|
||||||
enabled: true
|
|
||||||
# 慢SQL记录
|
|
||||||
log-slow-sql: true
|
log-slow-sql: true
|
||||||
slow-sql-millis: 1000
|
slow-sql-millis: 1000
|
||||||
merge-sql: true
|
merge-sql: true
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
<result property="areaCoefficient" column="AreaCoff"/>
|
<result property="areaCoefficient" column="AreaCoff"/>
|
||||||
<result property="yearCoefficient" column="YearCoff"/>
|
<result property="yearCoefficient" column="YearCoff"/>
|
||||||
<result property="buildingCoefficient" column="BuildingCoff"/>
|
<result property="buildingCoefficient" column="BuildingCoff"/>
|
||||||
|
|
||||||
<result property="communityName" column="ProjectName"/>
|
<result property="communityName" column="ProjectName"/>
|
||||||
<result property="communityAddress" column="ProjectAddr"/>
|
<result property="communityAddress" column="ProjectAddr"/>
|
||||||
<result property="buildingAddress" column="BuildingAddr"/>
|
<result property="buildingAddress" column="BuildingAddr"/>
|
||||||
@ -41,7 +40,7 @@
|
|||||||
<result property="mainPriceRent_1" column="mainPriceRent_1"/>
|
<result property="mainPriceRent_1" column="mainPriceRent_1"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOfficeBasePriceUltimateVo">
|
<sql id="getById">
|
||||||
SELECT a.ID
|
SELECT a.ID
|
||||||
,a.BuildingID_P
|
,a.BuildingID_P
|
||||||
,a.ProjectID_P
|
,a.ProjectID_P
|
||||||
@ -77,17 +76,14 @@
|
|||||||
FROM ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a
|
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 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
|
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
|
WHERE b.EffDate <![CDATA[ <= ]]> getdate() AND b.ExpirDate <![CDATA[ > ]]> getdate() AND c.Status=1
|
||||||
c.Status=1
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getCount" 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 ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a
|
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 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
|
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
|
WHERE b.EffDate <![CDATA[ <= ]]> getdate() AND b.ExpirDate <![CDATA[ > ]]> getdate() AND c.Status=1
|
||||||
c.Status=1
|
|
||||||
<where>
|
|
||||||
<if test="communityId != null">
|
<if test="communityId != null">
|
||||||
AND a.PROJECTID_P = #{communityId}
|
AND a.PROJECTID_P = #{communityId}
|
||||||
</if>
|
</if>
|
||||||
@ -97,13 +93,11 @@
|
|||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
AND a.STATUS = #{status}
|
AND a.STATUS = #{status}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getList" 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="getById"/>
|
||||||
<where>
|
|
||||||
<if test="communityId != null">
|
<if test="communityId != null">
|
||||||
AND a.PROJECTID_P = #{communityId}
|
AND a.PROJECTID_P = #{communityId}
|
||||||
</if>
|
</if>
|
||||||
@ -113,32 +107,50 @@
|
|||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
AND a.STATUS = #{status}
|
AND a.STATUS = #{status}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
|
||||||
order by a.BUILDINGID_P ASC,a.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="getById" parameterType="String" resultMap="OfficeBasePriceUltimateResult">
|
<select id="getById" resultMap="OfficeBasePriceUltimateResult">
|
||||||
<include refid="selectOfficeBasePriceUltimateVo"/>
|
<include refid="getById"/>
|
||||||
where id = #{id}
|
<if test="id != null">
|
||||||
|
AND a.id=#{id}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="copyCreate">
|
<!-- 更新基价 -->
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
<update id="updateBasePrice" parameterType="com.ruoyi.project.data.price.domain.OfficeBasePriceModifyModel">
|
||||||
SELECT LAST_INSERT_ID()
|
update ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} set Status=0 where id=#{id};
|
||||||
</selectKey>
|
insert into ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}(BuildingID
|
||||||
insert into
|
,UnifiedID
|
||||||
dbo.ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}(BuildingID,UnifiedID,ProjectID,BuildingID_P,ProjectID_P,MainPrice,MainPriceRent,MainPricePst,MainPriceRentPst,MainPriceType,MainPriceRentType,ModifyDate,Status,BuildingStd,AdjEvd)
|
,ProjectID
|
||||||
select BuildingID,UnifiedID,ProjectID,BuildingID_P,ProjectID_P,MainPrice,MainPriceRent,MainPricePst,MainPriceRentPst,MainPriceType,MainPriceRentType,ModifyDate,0,BuildingStd,AdjEvd
|
,BuildingID_P
|
||||||
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
,ProjectID_P
|
||||||
where id=#{id}
|
,MainPrice
|
||||||
</insert>
|
,MainPriceRent
|
||||||
<!-- 更新 -->
|
,MainPricePst
|
||||||
<update id="update">
|
,MainPriceRentPst
|
||||||
update a set ModifyDate=getdate(), mainPrice=#{mainPrice}, mainPriceRent=#{mainPriceRent},
|
,MainPriceType
|
||||||
mainPricePst = #{mainPrice} * 1.0 / b.mainPrice, mainPriceRentPst = #{mainPriceRentPst} * 1.0 / b.mainPriceRentPst
|
,MainPriceRentType
|
||||||
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} a join ODS_OFFICE_BUILDING_PRICE_INFO_${lastYearMonth} b on
|
,ModifyDate
|
||||||
a.BuildingID_p=b.BuildingID_P
|
,Status
|
||||||
where a.Status=1 and b.Status=1 and a.id=#{id}
|
,BuildingStd
|
||||||
|
,AdjEvd)
|
||||||
|
select BuildingID
|
||||||
|
,UnifiedID
|
||||||
|
,ProjectID
|
||||||
|
,BuildingID_P
|
||||||
|
,ProjectID_P
|
||||||
|
,#{mainPrice}
|
||||||
|
,#{mainPriceRent}
|
||||||
|
,#{mainPricePst}
|
||||||
|
,#{mainPriceRentPst}
|
||||||
|
,MainPriceType
|
||||||
|
,MainPriceRentType
|
||||||
|
,getdate()
|
||||||
|
,1
|
||||||
|
,BuildingStd
|
||||||
|
,#{comment}
|
||||||
|
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth} where id=#{id};
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 获取表名 -->
|
<!-- 获取表名 -->
|
||||||
@ -149,9 +161,39 @@
|
|||||||
order by cast(right(name,6) as int) desc
|
order by cast(right(name,6) as int) desc
|
||||||
</select>
|
</select>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<select id="getByBuildingId" resultType="com.ruoyi.project.data.price.controller.UltimateOfficeBasePriceController">
|
<select id="getByBuildingId" resultType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">
|
||||||
select id,MainPrice,MainPriceRent
|
select ID
|
||||||
|
,BuildingID_P as buildingId
|
||||||
|
,ProjectID_P as communityId
|
||||||
|
,MainPrice as mainPrice
|
||||||
|
,MainPriceRent as mainPriceRent
|
||||||
|
,MainPricePst as mainPricePst
|
||||||
|
,MainPriceRentPst as mainPriceRentPst
|
||||||
|
,MainPriceType as mainPriceType
|
||||||
|
,MainPriceRentType as mainPriceRentType
|
||||||
|
,Status as status
|
||||||
|
,BuildingStd as isStandardBuilding
|
||||||
|
,AdjEvd as adjustPriceComment
|
||||||
|
,${yearMonth} as yearMonth
|
||||||
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
from ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
||||||
where BuildingID_P=#{buildingI}
|
where BuildingID_P=#{buildingId} AND status= 1
|
||||||
|
</select>
|
||||||
|
<!-- 查询价格 -->
|
||||||
|
<select id="getByRouteId" resultType="com.ruoyi.project.data.price.domain.UltimateOfficeBasePrice">
|
||||||
|
SELECT ID
|
||||||
|
,BuildingID_P as buildingId
|
||||||
|
,ProjectID_P as communityId
|
||||||
|
,MainPrice as mainPrice
|
||||||
|
,MainPriceRent as mainPriceRent
|
||||||
|
,MainPricePst as mainPricePst
|
||||||
|
,MainPriceRentPst as mainPriceRentPst
|
||||||
|
,MainPriceType as mainPriceType
|
||||||
|
,MainPriceRentType as mainPriceRentType
|
||||||
|
,Status as status
|
||||||
|
,BuildingStd as isStandardBuilding
|
||||||
|
,AdjEvd as adjustPriceComment
|
||||||
|
,${yearMonth} as yearMonth
|
||||||
|
FROM dbo.ODS_OFFICE_BUILDING_PRICE_INFO_${yearMonth}
|
||||||
|
WHERE ID=#{id}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user