10.25
This commit is contained in:
parent
bd5bba3198
commit
3937a4d0f2
@ -2,37 +2,53 @@
|
||||
<div class="app-container">
|
||||
<div class="card-change">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="" prop="tankName">
|
||||
<el-form-item label="" prop="gunName">
|
||||
<el-input
|
||||
v-model="queryParams.tankName"
|
||||
v-model="queryParams.gunName"
|
||||
placeholder="油枪名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="" prop="tankName">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.tankName"-->
|
||||
<!-- placeholder="油品油号"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 240px;"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="" prop="numberId">
|
||||
<el-select v-model="queryParams.numberId" placeholder="请选择油品油号" >
|
||||
<el-option
|
||||
v-for="option in selectOilTypeByPrice"
|
||||
:key="option.numberId"
|
||||
:label="option.oilType +' '+option.oilName"
|
||||
:value="option.numberId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right;margin-right: 0px ">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="gunAdd()"
|
||||
v-hasPermi="['oilConfig:oilGun:list:add']"
|
||||
|
||||
>新增油枪</el-button>
|
||||
>新增油枪
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div>
|
||||
<el-table ref="tables"
|
||||
v-loading="loading"
|
||||
:data="gunList"
|
||||
@ -40,7 +56,7 @@
|
||||
:default-sort="defaultSort">
|
||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="油枪名称" align="center" prop="gunName"/>
|
||||
<el-table-column label="油罐名称" align="center" prop="tankName"/>
|
||||
<el-table-column label="所属油罐" align="center" prop="tankName"/>
|
||||
<el-table-column label="油品-油号" align="center" prop="oilNumber"></el-table-column>
|
||||
<el-table-column label="关联员工" align="center" prop="tankName">
|
||||
<template slot-scope="scope">
|
||||
@ -50,27 +66,28 @@
|
||||
<el-table-column label="设备ID" align="center" prop="deviceName"/>
|
||||
<el-table-column label="设备枪号" align="center" prop="oilMachineGunNumber"/>
|
||||
<el-table-column label="状态" align="center" prop="status"/>
|
||||
<el-table-column label="操作人" align="center" prop="createBy"/>
|
||||
<el-table-column label="操作人" align="center" prop="realName"/>
|
||||
<el-table-column label="操作时间" align="center" prop="createTime"/>
|
||||
<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="gunEdit(scope.row)"
|
||||
v-hasPermi="['oilConfig:oilGun:list:update']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-copy-document"
|
||||
v-hasPermi="['oilConfig:oilGun:list:del']"
|
||||
@click="delGun(scope.row)"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -89,7 +106,8 @@
|
||||
<el-form-item label="油枪名称" prop="gunName">
|
||||
|
||||
<el-input style="width: 300px" placeholder="请输入内容" v-model="gunForm.gunName" class="input-with-select">
|
||||
<el-select style="width: 110px" v-model="gunForm.select" slot="append" placeholder="选择油枪" @change="chooseName">
|
||||
<el-select style="width: 110px" v-model="gunForm.select" slot="append" placeholder="选择油枪"
|
||||
@change="chooseName">
|
||||
<el-option
|
||||
v-for="option in 50"
|
||||
:key="option"
|
||||
@ -131,7 +149,6 @@
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="gunForm.status">
|
||||
<el-radio
|
||||
@ -156,7 +173,9 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="设备枪号" prop="name">
|
||||
<el-input style="width: 300px" v-model="gunForm.oilMachineGunNumber"></el-input>
|
||||
<div style="font-size: 12px;color: #999999">请确保输入的集线器正确的枪号,否则出现设备显示屏与一件加油页面显示数据不一致。例如:0001,0002···</div>
|
||||
<div style="font-size: 12px;color: #999999">
|
||||
请确保输入的集线器正确的枪号,否则出现设备显示屏与一件加油页面显示数据不一致。例如:0001,0002···
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="dialogVisible = false,getList()">取 消</el-button>
|
||||
@ -184,6 +203,7 @@ import {
|
||||
import {cleanTankApi} from "@/api/oilConfig/oilTank";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
import {getOilNameListApi} from "@/api/oilPrice";
|
||||
|
||||
export default {
|
||||
name: 'oilqiang',
|
||||
@ -192,10 +212,12 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
tankName: '',
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
selectOilTypeByPrice:[],
|
||||
total: '',
|
||||
staffIds: [],
|
||||
staffList: [],
|
||||
@ -206,8 +228,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
title: "",
|
||||
dialogVisible: false,
|
||||
loading: false,
|
||||
list:[
|
||||
],
|
||||
list: [],
|
||||
|
||||
// 判断当前窗口是新增还是修改该
|
||||
judgement: false,
|
||||
@ -264,6 +285,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
await this_.getList()
|
||||
await this_.getStaffList()
|
||||
await this_.getyouji()
|
||||
await this_.getOilNameList()
|
||||
},
|
||||
watch: {
|
||||
dialogVisible: function (newValue, oldValue) {
|
||||
@ -273,14 +295,24 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
getOilNameList() {
|
||||
var this_ = this
|
||||
getOilNameListApi().then(response => {
|
||||
var list = response.data
|
||||
this_.selectOilTypeByPrice = list
|
||||
});
|
||||
},
|
||||
handleIsopenSelect() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getList() {
|
||||
this.gunList = []
|
||||
// getGunApi().then(response => {
|
||||
getGunListpageApi(this.queryParams).then(response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getGunListpageApi(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||
this.gunList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
})
|
||||
@ -359,6 +391,8 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
this.beginTime = ''
|
||||
this.endTime = ''
|
||||
this.getList();
|
||||
},
|
||||
submitForm() {
|
||||
@ -478,6 +512,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
.app-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bor-bai {
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
@ -489,16 +524,19 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
|
||||
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.wrap-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.oil-box {
|
||||
|
||||
}
|
||||
@ -508,6 +546,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
@ -515,22 +554,26 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
.box-card {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.conten-box {
|
||||
width: 100%;
|
||||
border: 1px solid #ebeef5;
|
||||
margin: 20px 0px;
|
||||
}
|
||||
|
||||
.conten-top {
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
padding: 18px 20px;
|
||||
}
|
||||
|
||||
.conten-bottom {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 20px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.cardbox {
|
||||
height: 87px;
|
||||
width: 278px;
|
||||
@ -552,6 +595,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
border-color: #FF9655;
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.cardbox-rd {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
@ -560,6 +604,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
height: 50px;
|
||||
|
||||
}
|
||||
|
||||
.act-cardbox {
|
||||
margin-right: 35px;
|
||||
height: 87px;
|
||||
@ -579,7 +624,6 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cardboxb {
|
||||
position: absolute;
|
||||
/*width: 50px;*/
|
||||
@ -600,6 +644,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
.actcolor {
|
||||
color: #FF9655 !important;
|
||||
}
|
||||
|
||||
.cardbox-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -611,6 +656,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
font-family: Source Han Sans CN;
|
||||
//font-weight: 400;
|
||||
}
|
||||
|
||||
.cardbox-title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -622,6 +668,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
|
||||
|
||||
}
|
||||
|
||||
.cardbox-gunName {
|
||||
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
||||
font-weight: 400;
|
||||
@ -632,6 +679,7 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
//font-style: normal;
|
||||
//text-transform: none;
|
||||
}
|
||||
|
||||
.cardbox-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -640,10 +688,12 @@ import {getListByPageApi} from "@/api/seeting/youqiji";
|
||||
color: #5b5e62;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.box-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@ -13,7 +13,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="oilNumber">
|
||||
<el-select v-model="queryParams.oilNumber" placeholder="请选择油品油号" style="width:300px" @change="chooseOilNumber()" :disabled="disableInput">
|
||||
<el-select v-model="queryParams.oilNumber" placeholder="请选择油品油号" style="width:300px"
|
||||
@change="chooseOilNumber()" :disabled="disableInput">
|
||||
<el-option
|
||||
v-for="option in selectOilTypeByPrice"
|
||||
:key="option.numberId"
|
||||
@ -43,16 +44,16 @@
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="tankAdd"
|
||||
v-hasPermi="['oilConfig:oilTank:list:add']"
|
||||
>新增油罐</el-button>
|
||||
>新增油罐
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- 列表-->
|
||||
|
||||
<div style="height: 70vh;overflow: auto">
|
||||
<el-table ref="tables"
|
||||
v-loading="loading"
|
||||
:data="tankList"
|
||||
@ -61,17 +62,16 @@
|
||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="油罐名称" align="center" prop="tankName"/>
|
||||
<el-table-column label="油品-油号" align="center" prop="oilNumber"/>
|
||||
<!-- <el-table-column label="当前数据" align="center">-->
|
||||
<el-table-column label="油罐容量" align="center" prop="tankVolume"/>
|
||||
<el-table-column label="下限预警" align="center" prop="lowerWarning"/>
|
||||
<el-table-column label="油品密度" align="center" prop="oilDensity"/>
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="存油数量" align="center" prop="storedQuantity"/>
|
||||
<el-table-column label="存油总价(元)" align="center" prop="totalPrice"/>
|
||||
<el-table-column label="成本价(元/升)" align="center" prop="discountedPrice"/>
|
||||
<el-table-column label="油罐状态" align="center" prop="discountedPrice">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
disabled
|
||||
v-model="scope.row.status"
|
||||
active-value="启用"
|
||||
inactive-value="禁用"
|
||||
@ -82,7 +82,7 @@
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" align="center" prop="createName"/>
|
||||
<el-table-column label="操作人" align="center" prop="realName"/>
|
||||
|
||||
<el-table-column label="操作时间" align="center" prop="updateTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
@ -94,23 +94,22 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oilConfig:oilTank:list:update']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-copy-document"
|
||||
@click="handleClean(scope.row)"
|
||||
v-hasPermi="['oilConfig:oilTank:list:del']"
|
||||
>初始化</el-button>
|
||||
<!-- v-hasPermi="['']"-->
|
||||
>初始化
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -122,12 +121,13 @@
|
||||
|
||||
<!-- 新增/修改-->
|
||||
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="tankForm" :rules="rules" label-width="120px">
|
||||
<el-form ref="form" :model="tankForm" :rules="rules" label-width="80px">
|
||||
<el-form-item label="油罐名称" prop="tankName">
|
||||
<el-input v-model="tankForm.tankName" placeholder="请输入油罐名称" style="width:300px" />
|
||||
<el-input v-model="tankForm.tankName" placeholder="请输入油罐名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="油品油号" prop="oilNumber">
|
||||
<el-select v-model="tankForm.numberId" placeholder="请选择油品油号" style="width:300px" @change="chooseOilNumber()" :disabled="disableInput">
|
||||
<el-select v-model="tankForm.numberId" placeholder="请选择油品油号" style="width:100%"
|
||||
@change="chooseOilNumber()" :disabled="disableInput">
|
||||
<el-option
|
||||
v-for="option in selectOilTypeByPrice"
|
||||
:key="option.numberId"
|
||||
@ -137,23 +137,27 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="油罐体积" prop="tankVolume">
|
||||
<el-input v-model="tankForm.tankVolume" placeholder="请输入油罐体积" maxlength="30" @change="changeNumber" style="width:300px" :disabled="disableInput">
|
||||
<el-input v-model="tankForm.tankVolume" placeholder="请输入油罐体积" maxlength="30" @change="changeNumber"
|
||||
:disabled="disableInput">
|
||||
<template slot="append">{{ tankForm.unit }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="下限预警" prop="lowerWarning">
|
||||
<el-input v-model="tankForm.lowerWarning" placeholder="小于预警值将进行提示" style="width:300px" maxlength="30">
|
||||
<el-input v-model="tankForm.lowerWarning" placeholder="小于预警值将进行提示"
|
||||
maxlength="30">
|
||||
<template slot="append">{{ tankForm.unit }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<template v-if="title == '修改油罐'">
|
||||
<el-form-item label="油品密度" prop="oilDensity">
|
||||
<el-input v-model="tankForm.oilDensity" placeholder="请输入油品密度" style="width:300px" :disabled="true" maxlength="30" @input="getSecondName()">
|
||||
<el-input v-model="tankForm.oilDensity" placeholder="请输入油品密度" :disabled="true"
|
||||
maxlength="30" @input="getSecondName()">
|
||||
<template slot="append">g/ml</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="存油数量" prop="storedQuantity">
|
||||
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" style="width:300px" maxlength="30" :disabled="true" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() " >
|
||||
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" maxlength="30"
|
||||
:disabled="true" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() ">
|
||||
<template slot="append">{{ tankForm.unit }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -163,7 +167,8 @@
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="折合单价" prop="discountedPrice">
|
||||
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30" style="width:300px" :disabled="true">
|
||||
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30"
|
||||
:disabled="true">
|
||||
<template slot="append">元{{ tankForm.unit ? "/" + tankForm.unit : '' }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -192,7 +197,7 @@
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="备注信息">
|
||||
<el-input type="textarea" style="width:300px" v-model="tankForm.remarks"></el-input>
|
||||
<el-input type="textarea" v-model="tankForm.remarks"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -214,7 +219,6 @@ import { BigNumber } from 'bignumber.js';
|
||||
import {changeAccountStatus} from "@/api/system/account";
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'oilTank',
|
||||
dicts: ['zhzt'],
|
||||
@ -407,8 +411,6 @@ export default {
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -480,9 +482,6 @@ export default {
|
||||
var this_ = this
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (this_.tankForm.totalPrice != null && this_.tankForm.storedQuantity != null) {
|
||||
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
||||
this_.tankForm.totalPrice = 0
|
||||
@ -560,6 +559,7 @@ export default {
|
||||
height: 100vh;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 44px;
|
||||
}
|
||||
|
||||
@ -60,6 +60,9 @@ public class OilGun extends BaseEntity {
|
||||
private String staffList;
|
||||
private String deviceId;
|
||||
private String deviceName;
|
||||
// 创建人
|
||||
@TableField(exist = false)
|
||||
private String realName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.petrolStationManagement.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
@ -78,6 +79,11 @@ public class OilTank extends BaseEntity {
|
||||
* 关联油号表ID
|
||||
*/
|
||||
private Integer numberId;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String realName;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
<result property="numberId" column="number_id" jdbcType="INTEGER"/>
|
||||
<result property="tankName" column="tank_name" jdbcType="VARCHAR"/>
|
||||
<result property="oilNumber" column="oil_number" jdbcType="VARCHAR"/>
|
||||
<result property="realName" column="real_name" jdbcType="VARCHAR"/>
|
||||
<result property="oilMachineGunNumber" column="oil_machine_gun_number" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
@ -53,16 +54,26 @@
|
||||
<select id="queryAllByLimit2" resultMap="OilGunMap">
|
||||
select
|
||||
og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by,
|
||||
og.update_by, ot.oil_number, ot.number_id,
|
||||
ot.tank_name,og.staff_status,og.staff_list,og.device_id,og.device_name
|
||||
og.update_by,og.oil_machine_gun_number, ot.oil_number, ot.number_id,
|
||||
ot.tank_name,og.staff_status,og.staff_list,og.device_id,og.device_name,ms.real_name
|
||||
from oil_gun og
|
||||
left join oil_tank ot on og.tank_id = ot.id
|
||||
LEFT JOIN mt_staff ms ON og.create_by = ms.id
|
||||
<where>
|
||||
og.store_id = #{oilGun.storeId} and og.status = '启用'
|
||||
|
||||
<if test="oilGun.numberId != null">
|
||||
and ot.number_id = #{oilGun.numberId}
|
||||
</if>
|
||||
<if test="oilGun.gunName != null">
|
||||
and og.gun_name LIKE CONCAT('%', #{oilGun.gunName}, '%')
|
||||
</if>
|
||||
<if test="oilGun.params.beginTime != null and oilGun.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(og.create_time,'%y%m%d') >= date_format(#{oilGun.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="oilGun.params.endTime != null and oilGun.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(og.create_time,'%y%m%d') <= date_format(#{oilGun.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -198,9 +209,9 @@
|
||||
values (#{gunName}, #{tankId}, #{status}, #{storeId},
|
||||
#{createTime}, #{createTime}, #{createBy},
|
||||
#{updateBy}, #{numberId}, #{oilMachineGunNumber},
|
||||
#{staffStatus}
|
||||
#{staffList}
|
||||
#{deviceId}
|
||||
#{staffStatus},
|
||||
#{staffList},
|
||||
#{deviceId},
|
||||
#{deviceName})
|
||||
</insert>
|
||||
|
||||
|
||||
@ -34,72 +34,70 @@
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="OilTankMap">
|
||||
select
|
||||
id, tank_name, oil_number, tank_volume, lower_warning, oil_density, stored_quantity, total_price, discounted_price, status, remarks, store_id, number_id, create_time, update_time, create_by, update_by, inventory_statistics, unit
|
||||
from oil_tank
|
||||
SELECT ot.*,ms.real_name FROM oil_tank ot LEFT JOIN mt_staff ms ON ot.create_by = ms.id
|
||||
<where>
|
||||
<if test="oilTank.id != null">
|
||||
and id = #{oilTank.id}
|
||||
and ot.id = #{oilTank.id}
|
||||
</if>
|
||||
<if test="oilTank.tankName != null and oilTank.tankName != ''">
|
||||
and tank_name LIKE CONCAT('%', #{oilTank.tankName}, '%')
|
||||
and ot.tank_name LIKE CONCAT('%', #{oilTank.tankName}, '%')
|
||||
</if>
|
||||
<if test="oilTank.oilNumber != null and oilTank.oilNumber != ''">
|
||||
and oil_number = #{oilTank.oilNumber}
|
||||
and ot.oil_number = #{oilTank.oilNumber}
|
||||
</if>
|
||||
<if test="oilTank.tankVolume != null">
|
||||
and tank_volume = #{oilTank.tankVolume}
|
||||
and ot.tank_volume = #{oilTank.tankVolume}
|
||||
</if>
|
||||
<if test="oilTank.lowerWarning != null">
|
||||
and lower_warning = #{oilTank.lowerWarning}
|
||||
and ot.lower_warning = #{oilTank.lowerWarning}
|
||||
</if>
|
||||
<if test="oilTank.oilDensity != null">
|
||||
and oil_density = #{oilTank.oilDensity}
|
||||
and ot.oil_density = #{oilTank.oilDensity}
|
||||
</if>
|
||||
<if test="oilTank.storedQuantity != null">
|
||||
and stored_quantity = #{oilTank.storedQuantity}
|
||||
and ot.stored_quantity = #{oilTank.storedQuantity}
|
||||
</if>
|
||||
<if test="oilTank.totalPrice != null">
|
||||
and total_price = #{oilTank.otalPrice}
|
||||
and ot.total_price = #{oilTank.otalPrice}
|
||||
</if>
|
||||
<if test="oilTank.discountedPrice != null">
|
||||
and discounted_price = #{oilTank.discountedPrice}
|
||||
and ot.discounted_price = #{oilTank.discountedPrice}
|
||||
</if>
|
||||
<if test="oilTank.status != null and oilTank.status != ''">
|
||||
and status = #{oilTank.status}
|
||||
and ot.status = #{oilTank.status}
|
||||
</if>
|
||||
<if test="oilTank.remarks != null and oilTank.remarks != ''">
|
||||
and remarks = #{oilTank.remarks}
|
||||
and ot.remarks = #{oilTank.remarks}
|
||||
</if>
|
||||
<if test="oilTank.storeId != null">
|
||||
and store_id = #{oilTank.storeId}
|
||||
and ot.store_id = #{oilTank.storeId}
|
||||
</if>
|
||||
<if test="oilTank.numberId != null">
|
||||
and number_id = #{oilTank.numberId}
|
||||
and ot.number_id = #{oilTank.numberId}
|
||||
</if>
|
||||
<if test="oilTank.createTime != null">
|
||||
and create_time = #{oilTank.createTime}
|
||||
and ot.create_time = #{oilTank.createTime}
|
||||
</if>
|
||||
<if test="oilTank.updateTime != null">
|
||||
and update_time = #{oilTank.updateTime}
|
||||
and ot.update_time = #{oilTank.updateTime}
|
||||
</if>
|
||||
<if test="oilTank.createBy != null">
|
||||
and create_by = #{oilTank.createBy}
|
||||
and ot.create_by = #{oilTank.createBy}
|
||||
</if>
|
||||
<if test="oilTank.updateBy != null">
|
||||
and update_by = #{oilTank.updateBy}
|
||||
and ot.update_by = #{oilTank.updateBy}
|
||||
</if>
|
||||
<if test="oilTank.inventoryStatistics != null and oilTank.inventoryStatistics != ''">
|
||||
and inventory_statistics = #{oilTank.inventoryStatistics}
|
||||
and ot.inventory_statistics = #{oilTank.inventoryStatistics}
|
||||
</if>
|
||||
<if test="oilTank.params.beginTime != null and oilTank.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(update_time,'%y%m%d') >= date_format(#{oilTank.params.beginTime},'%y%m%d')
|
||||
and date_format(ot.update_time,'%y%m%d') >= date_format(#{oilTank.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="oilTank.params.endTime != null and oilTank.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(update_time,'%y%m%d') <= date_format(#{oilTank.params.endTime},'%y%m%d')
|
||||
and date_format(ot.update_time,'%y%m%d') <= date_format(#{oilTank.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY update_time DESC
|
||||
ORDER BY ot.update_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="OilTankMap">
|
||||
|
||||
@ -141,7 +141,7 @@ public class OilGunServiceImpl implements OilGunService {
|
||||
if (i > 0) {
|
||||
return false;
|
||||
}
|
||||
oilGun.setCreateBy(accountInfo.getId().toString());
|
||||
// oilGun.setCreateBy(accountInfo.getId().toString());
|
||||
|
||||
return oilGunDao.insert(oilGun) > 0;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ import java.util.List;
|
||||
public class OilGunVO extends OilGun {
|
||||
private List<OilGun> oilGunList;
|
||||
private OilGun oilGun;
|
||||
public Integer numberId; //id(主键)
|
||||
private Integer numberId; //id(主键)
|
||||
private String oilType; // 油品类型
|
||||
private String oilName; //油品名称
|
||||
private Double oilPrice; //油品单价
|
||||
|
||||
Loading…
Reference in New Issue
Block a user