This commit is contained in:
cun-nan 2024-08-01 16:28:38 +08:00
parent ca6d897805
commit 8f1776420e
18 changed files with 1134 additions and 11 deletions

View File

@ -282,7 +282,7 @@ export default {
background-size: cover;
background-repeat: no-repeat;
background: #FFFFFF;
box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.1);
//box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.1);
box-sizing: border-box;
padding: 20px;
display: flex;

View File

@ -0,0 +1,106 @@
<template>
<div class="app-center">
<div class="app-top">
<el-card :body-style="{ padding: '0px' }">
<div class="box">
<div class="nbox" :class="pointerClass" @click="updateRedio('打印机配置')">
<div class="fount-box" :style="{ color: radio1 === '打印机配置' ? '#FF770F' : '#999999' }">打印机配置</div>
<div class="heng-box" v-if="radio1 == '打印机配置'"></div>
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
</div>
<div class="nbox" :class="pointerClass" @click="updateRedio('油机汽机配置')">
<div class="fount-box" :style="{ color: radio1 === '油机汽机配置' ? '#FF770F' : '#999999' }">油机汽机配置</div>
<div class="heng-box" v-if="radio1 == '油机汽机配置'"></div>
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
</div>
<div class="nbox" :class="pointerClass" @click="updateRedio('参数配置')">
<div class="fount-box" :style="{ color: radio1 === '参数配置' ? '#FF770F' : '#999999' }">参数配置</div>
<div class="heng-box" v-if="radio1 == '参数配置'"></div>
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
</div>
</div>
</el-card>
</div>
<printList v-if="radio1 === '打印机配置'"></printList>
<oilEngineList v-if="radio1 === '油机汽机配置'"></oilEngineList>
</div>
</template>
<script>
import printList from "@/views/staff/device/tab/printList.vue";
import oilEngineList from "@/views/staff/device/tab/oilEngineList.vue";
export default {
data(){
return{
radio1:'打印机配置',
pointerClass() {
return 'pointer-cursor';
}
}
},
components:{
printList,
oilEngineList,
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
updateRedio(data) {
console.log(this.radio1)
this.radio1 = data
}
}
}
</script>
<style lang="scss" scoped>
.app-center{
width: 100%;
height: 100vh;
box-sizing: border-box;
//padding: 10px;
background: #f6f8f9;
}
.app-top{
width: 100%;
//margin-bottom: 20px;
height: 50px;
box-sizing: border-box;
padding: 0px;
}
.el-card__body, .el-main {
padding: 0px;
}
.box{
cursor: pointer;
margin-top: 10px ;
margin-left: 50px;
//height: 40px;
display: flex;
background-color: #FFFFFF;
align-items: center;
//border: 1px solid #EBEEF5;
}
.nbox{
margin-right: 30px;
}
.fount-box{
font-size: 14px;
color: #999999
}
.fount-box2{
font-size: 14px;
color: #999999
}
.heng-box{
background-color: #FF770F;
width: 100%;
height: 2px;
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,339 @@
<!-- 收银台订单-->
<template>
<div style="padding-top: 15px; padding-right: 40px; background: #f6f8f9;">
<el-card class="box-card" shadow="never">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="" prop="deptId" style="width: 180px">
<el-input
v-model="queryParams.realName"
placeholder="请选择设备类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="deptId" style="width: 180px">
<el-select
v-model="queryParams.deptId"
clearable
placeholder="请输入设备名称"
>
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="status" style="width: 180px">
<el-select
v-model="queryParams.status"
clearable
placeholder="请选择设备状态"
>
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item style="float: right">
<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" @click="handleAdd">新增设备</el-button>
</el-form-item>
</el-form>
<!-- </el-card>-->
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
<div class="table-box">
<el-table
:data="orderList"
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="storeName" align="center" label="设备类型"></el-table-column>
<el-table-column prop="storeName" align="center" label="设备名称"></el-table-column>
<el-table-column prop="payMoney" align="center" label="设备ID"></el-table-column>
<el-table-column prop="count" align="center" label="创建人"></el-table-column>
<el-table-column prop="refMoney" align="center" label="创建时间"></el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-card>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="设备名称" prop="realName">
<el-input v-model="form.realName" placeholder="请输入设备名称" maxlength="30" style="width: 270px"/>
</el-form-item>
<el-form-item label="品牌" prop="pinpai">
<el-input v-model="form.pinpai" placeholder="请输入品牌名称" maxlength="30" style="width: 270px"/>
</el-form-item>
<el-form-item label="设备功能" prop="gongneng">
<!-- <el-checkbox-group v-model="form.gongneng">-->
<el-checkbox v-model="form.gongneng" label="打印小票"></el-checkbox>
<el-checkbox v-model="form.gongneng" label="语音播报"></el-checkbox>
<!-- </el-checkbox-group>-->
</el-form-item>
<el-form-item label="设备终端号" prop="zhongduan">
<el-input v-model="form.zhongduan" placeholder="请输入设备终端号" />
</el-form-item>
<el-form-item label="密钥" prop="miyao">
<el-input v-model="form.miyao" placeholder="请输入密钥" />
</el-form-item>
<el-form-item label="关联员工" prop="staffId">
<el-input v-model="form.staffId" placeholder="请输入关联员工" />
</el-form-item>
<el-form-item label="用户状态" prop="status">
<el-switch
v-model="form.status"
active-value="qy"
inactive-value="jy"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item label="备注" >
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
</el-form-item>
</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>
</div>
</template>
<script>
import {delStaff} from "@/api/staff/staff";
export default {
dicts: ['zhzt'],
data() {
return {
loading: false,
open:false,
title:'',
//
dateRange: [],
beginTime: "",
endTime: "",
//
orderList: [],
deptList: [],
form:{},
//
queryParams: {
page: 1,
pageSize: 10,
},
total: 0,
//
rules: {
realName: [
{required: true, message: "设备名称不能为空", trigger: "blur"},
],
pinpai: [
{required: true, message: "品牌不能为空", trigger: "blur"},
],
gongneng: [
{required: true, message: "设备功能不能为空", trigger: "blur"}
],
zhongduan: [
{required: true, message: "设备终端号不能为空", trigger: "blur"}
],
miyao: [
{required: true, message: "密钥不能为空", trigger: "blur"}
],
staffId: [
{required: true, message: "关联员工不能为空", trigger: "blur"}
],
status: [
{required: true, message: "状态不能为空", trigger: "blur"}
]
}
}
},
created() {
this.getList();
},
methods: {
getDeptList() {
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
// this.deptList = response.data.records;
// })
},
//
getList() {
},
//
cancel() {
this.open = false;
this.reset();
},
//
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (!this.form.id) {
} else {
}
}
});
},
//
handleAdd() {
this.reset();
this.open = true;
this.title = "新增员工";
},
//
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
//
resetQuery() {
this.dateRange = [];
this.queryParams = {
page: 1,
pageSize: 10,
}
this.handleQuery();
},
//
handleUpdate(row) {
this.reset();
this.open = true;
},
//
reset() {
this.resetForm("form");
},
//
handleDelete(row) {
const name = row.realName || this.id;
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
return delStaff(row.id);
}).then(() => {
this.queryParams.page = 1
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
}
</script>
<style scoped>
.box-card {
width: 100%;
margin: 0px 20px 20px 20px;
border: none;
box-shadow: none;
}
.el-form--inline .el-form-item {
margin-right: 20px;
}
.table-box {
width: 100%;
height: 46vh;
overflow: auto;
}
.wrap-boxs {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15px;
}
.k_ {
width: 250px;
height: 75px;
margin-right: 20px;
box-sizing: border-box;
padding: 15px 10px;
padding-top: 5px;
color: #333333;
}
.size_ {
font-weight: 400;
font-size: 14px;
color: #333333;
margin-bottom: 20px;
}
.title_ {
font-weight: 600;
font-size: 24px;
color: #333333;
}
.d-s {
display: flex;
align-items: center;
}
.anniu-h {
width: 80px;
height: 26px;
background: #FAFAFA;
border-radius: 4px 4px 4px 4px;
border: 1px solid #DDDDDD;
display: flex;
align-items: center;
justify-content: center;
color: #777777;
margin-right: 20px;
}
.anniu-act {
background: #FF9655 !important;
border: 1px solid #FF9655 !important;
color: #fff;
}
</style>

View File

@ -0,0 +1,364 @@
<!-- 收银台订单-->
<template>
<div style="padding-top: 15px; padding-right: 40px; background: #f6f8f9;">
<el-card class="box-card" shadow="never">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="" prop="deptId" style="width: 180px">
<el-input
v-model="queryParams.realName"
placeholder="请输入配置名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="deptId" style="width: 180px">
<el-select
v-model="queryParams.deptId"
clearable
placeholder="请选择设备功能"
>
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="deptId" style="width: 180px">
<el-select
v-model="queryParams.deptId"
clearable
placeholder="请选择关联员工"
>
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="status" style="width: 180px">
<el-select
v-model="queryParams.status"
clearable
placeholder="请选择设备状态"
>
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item style="float: right">
<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" @click="handleAdd">新增设备</el-button>
</el-form-item>
</el-form>
<!-- </el-card>-->
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
<div class="table-box">
<el-table
:data="orderList"
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="storeName" align="center" label="设备名称"></el-table-column>
<el-table-column prop="parentName" align="center" label="品牌"></el-table-column>
<el-table-column prop="payMoney" align="center" label="设备功能"></el-table-column>
<el-table-column prop="count" align="center" label="所属机构"></el-table-column>
<el-table-column prop="refMoney" align="center" label="关联员工"></el-table-column>
<el-table-column prop="refCount" align="center" label="设备编号"></el-table-column>
<el-table-column align="center" prop="date" label="密钥"></el-table-column>
<el-table-column align="center" prop="date" label="设备状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="qy"
inactive-value="jy"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column align="center" prop="date" label="备注"></el-table-column>
<el-table-column align="center" prop="date" label="创建时间"></el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-card>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="设备名称" prop="realName">
<el-input v-model="form.realName" placeholder="请输入设备名称" maxlength="30" style="width: 270px"/>
</el-form-item>
<el-form-item label="品牌" prop="pinpai">
<el-input v-model="form.pinpai" placeholder="请输入品牌名称" maxlength="30" style="width: 270px"/>
</el-form-item>
<el-form-item label="设备功能" prop="gongneng">
<!-- <el-checkbox-group v-model="form.gongneng">-->
<el-checkbox v-model="form.gongneng" label="打印小票"></el-checkbox>
<el-checkbox v-model="form.gongneng" label="语音播报"></el-checkbox>
<!-- </el-checkbox-group>-->
</el-form-item>
<el-form-item label="设备终端号" prop="zhongduan">
<el-input v-model="form.zhongduan" placeholder="请输入设备终端号" />
</el-form-item>
<el-form-item label="密钥" prop="miyao">
<el-input v-model="form.miyao" placeholder="请输入密钥" />
</el-form-item>
<el-form-item label="关联员工" prop="staffId">
<el-input v-model="form.staffId" placeholder="请输入关联员工" />
</el-form-item>
<el-form-item label="用户状态" prop="status">
<el-switch
v-model="form.status"
active-value="qy"
inactive-value="jy"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item label="备注" >
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
</el-form-item>
</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>
</div>
</template>
<script>
import {delStaff} from "@/api/staff/staff";
export default {
dicts: ['zhzt'],
data() {
return {
loading: false,
open:false,
title:'',
//
dateRange: [],
beginTime: "",
endTime: "",
//
orderList: [],
deptList: [],
form:{},
//
queryParams: {
page: 1,
pageSize: 10,
},
total: 0,
//
rules: {
realName: [
{required: true, message: "设备名称不能为空", trigger: "blur"},
],
pinpai: [
{required: true, message: "品牌不能为空", trigger: "blur"},
],
gongneng: [
{required: true, message: "设备功能不能为空", trigger: "blur"}
],
zhongduan: [
{required: true, message: "设备终端号不能为空", trigger: "blur"}
],
miyao: [
{required: true, message: "密钥不能为空", trigger: "blur"}
],
staffId: [
{required: true, message: "关联员工不能为空", trigger: "blur"}
],
status: [
{required: true, message: "状态不能为空", trigger: "blur"}
]
}
}
},
created() {
this.getList();
},
methods: {
getDeptList() {
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
// this.deptList = response.data.records;
// })
},
//
getList() {
},
//
cancel() {
this.open = false;
this.reset();
},
//
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (!this.form.id) {
} else {
}
}
});
},
//
handleAdd() {
this.reset();
this.open = true;
this.title = "新增员工";
},
//
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
//
resetQuery() {
this.dateRange = [];
this.queryParams = {
page: 1,
pageSize: 10,
}
this.handleQuery();
},
//
handleUpdate(row) {
this.reset();
this.open = true;
},
//
reset() {
this.resetForm("form");
},
//
handleDelete(row) {
const name = row.realName || this.id;
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
return delStaff(row.id);
}).then(() => {
this.queryParams.page = 1
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
}
</script>
<style scoped>
.box-card {
width: 100%;
margin: 0px 20px 20px 20px;
border: none;
box-shadow: none;
}
.el-form--inline .el-form-item {
margin-right: 20px;
}
.table-box {
width: 100%;
height: 46vh;
overflow: auto;
}
.wrap-boxs {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15px;
}
.k_ {
width: 250px;
height: 75px;
margin-right: 20px;
box-sizing: border-box;
padding: 15px 10px;
padding-top: 5px;
color: #333333;
}
.size_ {
font-weight: 400;
font-size: 14px;
color: #333333;
margin-bottom: 20px;
}
.title_ {
font-weight: 600;
font-size: 24px;
color: #333333;
}
.d-s {
display: flex;
align-items: center;
}
.anniu-h {
width: 80px;
height: 26px;
background: #FAFAFA;
border-radius: 4px 4px 4px 4px;
border: 1px solid #DDDDDD;
display: flex;
align-items: center;
justify-content: center;
color: #777777;
margin-right: 20px;
}
.anniu-act {
background: #FF9655 !important;
border: 1px solid #FF9655 !important;
color: #fff;
}
</style>

View File

@ -12,10 +12,16 @@
<!-- 上传图片-->
<div style="display: flex">
<div style="display: flex">
<span style="margin-right: 10px">店铺logo</span>
<imgUpload1 v-if="flag" :imgUrl="store.logo" :limit="1" @input="getImgUrl"></imgUpload1>
</div>
<div style="display: flex">
<span style="margin-right: 10px">营业执照</span>
<imgUpload1 v-if="flag" :imgUrl="store.license" :limit="1" @input="getLicenseUrl"></imgUpload1>
</div>
</div>
<!-- 上传图片-->
<div style="display: flex; margin-top: 20px ">
<span style="margin-right: 20px">门头照</span>
@ -164,6 +170,11 @@ export default {
this.store.logo = "/static" + list[list.length - 1]
},
// url
getLicenseUrl(val) {
let list = val.split("/static")
this.store.license = "/static" + list[list.length - 1]
},
// url
getDoorImgUrl(val) {
let list = val.split(",")
let doorUrl = []

View File

@ -96,7 +96,6 @@ export default {
<style scoped>
.app-center{
width: 100%;
box-sizing: border-box;
//padding: 10px;
}

View File

@ -311,7 +311,8 @@ export default {
let queryParams = {
pageNo:1,
pageSize:10,
system_position:"系统首页"
system_position:"系统首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
this.bannerList = res.data.records

View File

@ -323,7 +323,8 @@ export default {
let queryParams = {
pageNo:1,
pageSize:10,
system_position:"系统首页"
system_position:"系统首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
this.bannerList = res.data.records

View File

@ -274,7 +274,8 @@ export default {
let queryParams = {
pageNo:1,
pageSize:10,
system_position:"系统首页"
system_position:"系统首页",
bannerStatus:true
}
getBannerListApi(queryParams).then(res=>{
this.bannerList = res.data.records

View File

@ -0,0 +1,80 @@
package com.fuint.business.deviceManage.controller;
import com.fuint.business.deviceManage.entity.OilParameterConfig;
import com.fuint.business.deviceManage.service.OilParameterConfigService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 油机汽机配置(OilParameterConfig)表控制层
*
* @author makejava
* @since 2024-07-31 14:59:04
*/
@RestController
@RequestMapping("oilParameterConfig")
public class OilParameterConfigController extends BaseController {
/**
* 服务对象
*/
@Resource
private OilParameterConfigService oilParameterConfigService;
/**
* 根据店铺id查询油站参数配置信息
* @return
*/
@GetMapping
private ResponseObject selectInfo(){
return getSuccessResult(oilParameterConfigService.selectOneByStoreId());
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("{id}")
public ResponseObject queryById(@PathVariable("id") Integer id) {
return getSuccessResult(oilParameterConfigService.queryById(id));
}
/**
* 新增数据
*
* @param oilParameterConfig 实体
* @return 新增结果
*/
@PostMapping
public ResponseObject add(@RequestBody OilParameterConfig oilParameterConfig) {
return getSuccessResult(oilParameterConfigService.insert(oilParameterConfig));
}
/**
* 编辑数据
*
* @param oilParameterConfig 实体
* @return 编辑结果
*/
@PutMapping
public ResponseObject edit(@RequestBody OilParameterConfig oilParameterConfig) {
return getSuccessResult(oilParameterConfigService.update(oilParameterConfig));
}
/**
* 删除数据
*
* @param id 主键
* @return 删除是否成功
*/
@DeleteMapping("{id}")
public ResponseObject deleteById(@PathVariable Integer id) {
return getSuccessResult(oilParameterConfigService.deleteById(id));
}
}

View File

@ -0,0 +1,65 @@
package com.fuint.business.deviceManage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 油站参数配置(OilParameterConfig)实体类
*
* @author makejava
* @since 2024-08-01 09:02:35
*/
@Data
@TableName("oil_parameter_config")
@ApiModel(value = "OilParameterConfig", description = "油站参数配置")
public class OilParameterConfig extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 所属连锁店id
*/
private Integer chainStoreId;
/**
* 所属店铺id
*/
private Integer storeId;
/**
* 加油数量保留两位小数后面余数部分规则数据字典
*/
private String refuelRule;
/**
* 金额保留两位小数后面余数部分规则数据字典
*/
private String amountRule;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
}

View File

@ -0,0 +1,7 @@
package com.fuint.business.deviceManage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.deviceManage.entity.OilParameterConfig;
public interface OilParameterConfigMapper extends BaseMapper<OilParameterConfig> {
}

View File

@ -4,7 +4,21 @@
<select id="queryPage" resultType="com.fuint.business.deviceManage.entity.OilEngineConfig">
SELECT * FROM oil_engine_config
ORDER BY create_time DESC
<where>
<if test="entity.deviceType != null and entity.deviceType != ''">
and device_type = #{entity.deviceType}
</if>
<if test="entity.deviceName != null and entity.deviceName != ''">
and device_name like concat('%', #{entity.deviceName}, '%')
</if>
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{entity.params.beginTime},'%y%m%d')
</if>
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{entity.params.endTime},'%y%m%d')
</if>
</where>
ORDER BY create_time DESC
</select>
</mapper>

View File

@ -0,0 +1,6 @@
<?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.fuint.business.deviceManage.mapper.OilParameterConfigMapper">
</mapper>

View File

@ -3,7 +3,6 @@ package com.fuint.business.deviceManage.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.deviceManage.entity.OilEngineConfig;
import org.springframework.data.domain.PageRequest;
/**
* 油机汽机配置(OilEngineConfig)表服务接口

View File

@ -0,0 +1,53 @@
package com.fuint.business.deviceManage.service;
import com.fuint.business.deviceManage.entity.OilParameterConfig;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
/**
* 油站参数配置(OilParameterConfig)表服务接口
*
* @author makejava
* @since 2024-08-01 09:02:35
*/
public interface OilParameterConfigService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
OilParameterConfig queryById(Integer id);
/**
* 新增数据
*
* @param oilParameterConfig 实例对象
* @return 实例对象
*/
int insert(OilParameterConfig oilParameterConfig);
/**
* 修改数据
*
* @param oilParameterConfig 实例对象
* @return 实例对象
*/
int update(OilParameterConfig oilParameterConfig);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
int deleteById(Integer id);
/**
* 根据店铺id查询油站参数配置信息
* @return
*/
OilParameterConfig selectOneByStoreId();
}

View File

@ -7,10 +7,6 @@ import com.fuint.business.deviceManage.entity.OilEngineConfig;
import com.fuint.business.deviceManage.mapper.OilEngineConfigMapper;
import com.fuint.business.deviceManage.service.OilEngineConfigService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import javax.annotation.Resource;
/**
* 油机汽机配置(OilEngineConfig)表服务实现类

View File

@ -0,0 +1,81 @@
package com.fuint.business.deviceManage.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.deviceManage.entity.OilParameterConfig;
import com.fuint.business.deviceManage.mapper.OilParameterConfigMapper;
import com.fuint.business.deviceManage.service.OilParameterConfigService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
/**
* 油站参数配置(OilParameterConfig)表服务实现类
*
* @author makejava
* @since 2024-08-01 09:02:35
*/
@Service("oilParameterConfigService")
public class OilParameterConfigServiceImpl extends ServiceImpl<OilParameterConfigMapper,OilParameterConfig> implements OilParameterConfigService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public OilParameterConfig queryById(Integer id) {
return baseMapper.selectById(id);
}
/**
* 新增数据
*
* @param oilParameterConfig 实例对象
* @return 实例对象
*/
@Override
public int insert(OilParameterConfig oilParameterConfig) {
return baseMapper.insert(oilParameterConfig);
}
/**
* 修改数据
*
* @param oilParameterConfig 实例对象
* @return 实例对象
*/
@Override
public int update(OilParameterConfig oilParameterConfig) {
return baseMapper.updateById(oilParameterConfig);
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public int deleteById(Integer id) {
return baseMapper.deleteById(id);
}
@Override
public OilParameterConfig selectOneByStoreId() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
OilParameterConfig oilParameterConfig = baseMapper.selectOne(queryWrapper);
if (ObjectUtil.isEmpty(oilParameterConfig)){
OilParameterConfig oilParameterConfig1 = new OilParameterConfig();
oilParameterConfig1.setStoreId(nowAccountInfo.getStoreId());
oilParameterConfig1.setChainStoreId(nowAccountInfo.getChainStoreId());
baseMapper.insert(oilParameterConfig);
oilParameterConfig = baseMapper.selectOne(queryWrapper);
}
return oilParameterConfig;
}
}