Merge branch 'master' of http://192.168.31.244:3000/byx/oilSystem
# Conflicts: # fuintAdmin_zt/src/views/system/notify/index.vue
This commit is contained in:
commit
002712b7c6
@ -17,3 +17,12 @@ export function storeAmountIndex(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function selectStoreAmount(query) {
|
||||
return request({
|
||||
url: '/backendApi/store/selectStoreAmount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
@ -101,3 +101,12 @@ export function getOrderNumApi(query) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询店铺列表
|
||||
export function getStorelist(query) {
|
||||
return request({
|
||||
url: '/business/storeInformation/store/selectListDept',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
37
fuintAdmin_zt/src/api/setting/hardware.js
Normal file
37
fuintAdmin_zt/src/api/setting/hardware.js
Normal file
@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getListApi(query) {
|
||||
return request({
|
||||
url: 'hardwareStore',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
export function deleteApi(ids) {
|
||||
return request({
|
||||
url: 'hardwareStore?idList=' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//
|
||||
export function saveApi(data) {
|
||||
return request({
|
||||
url: 'hardwareStore',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存修改信息
|
||||
export function updateApi(data) {
|
||||
return request({
|
||||
url: 'hardwareStore',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
37
fuintAdmin_zt/src/api/setting/message.js
Normal file
37
fuintAdmin_zt/src/api/setting/message.js
Normal file
@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getListApi(query) {
|
||||
return request({
|
||||
url: 'messageTemplate',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
export function deleteApi(ids) {
|
||||
return request({
|
||||
url: 'messageTemplate?idList=' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//
|
||||
export function saveApi(data) {
|
||||
return request({
|
||||
url: 'messageTemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存修改信息
|
||||
export function updateApi(data) {
|
||||
return request({
|
||||
url: 'messageTemplate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
realSrc() {
|
||||
|
||||
let real_src = this.src.split(",")[0];
|
||||
if (isExternal(real_src)) {
|
||||
return real_src;
|
||||
|
@ -88,8 +88,10 @@ export default {
|
||||
value: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
console.log(91111)
|
||||
// 首先将值转为数组
|
||||
const list = Array.isArray(val) ? val : this.value.split(',');
|
||||
console.log(9333)
|
||||
// 然后将数组转为对象数组
|
||||
this.fileList = list.map(item => {
|
||||
if (typeof item === "string") {
|
||||
@ -127,7 +129,8 @@ export default {
|
||||
},
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res) {
|
||||
this.uploadList.push({ name: res.fileName, url: res.fileName });
|
||||
console.log(res,132)
|
||||
this.uploadList.push({ name: res.data.fileName, url: res.data.fileName });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
@ -185,6 +188,7 @@ export default {
|
||||
listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
console.log(list,190)
|
||||
for (let i in list) {
|
||||
strs += list[i].url.replace(this.baseUrl, "") + separator;
|
||||
}
|
||||
|
@ -37,8 +37,8 @@
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="setting = true">
|
||||
<span>布局设置</span>
|
||||
<el-dropdown-item @click.native="prsswrod()">
|
||||
<span>修改密码</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
<span>退出登录</span>
|
||||
@ -59,6 +59,7 @@ import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import FuintDoc from '@/components/Fuint/Doc'
|
||||
import confirmLog from "@/views/coupon/confirmLog/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -95,6 +96,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
prsswrod(){
|
||||
console.log('方法')
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
|
@ -9,8 +9,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<jcindex :id="id" v-if="tabindex == 0"></jcindex>
|
||||
<payment :id="id" :deptId="deptId" v-if="tabindex == 1" ></payment>
|
||||
<way :id="id" v-if="tabindex == 2" ></way>
|
||||
<payment :id="id" :deptId="deptId" v-if="tabindex == 1" ></payment>
|
||||
<way :id="id" :deptId="deptId" v-if="tabindex == 2" ></way>
|
||||
<staff :id="id" v-if="tabindex == 3" ></staff>
|
||||
<allOrder :id="id" v-if="tabindex == 4"></allOrder>
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
},
|
||||
{
|
||||
name:'way',
|
||||
title:'支付方式',
|
||||
title:'付费方式',
|
||||
component:way
|
||||
},
|
||||
{
|
||||
|
@ -3,40 +3,50 @@
|
||||
<el-card >
|
||||
<div class="top-box">
|
||||
<div class="d-s">
|
||||
<el-input v-model="form.name" placeholder="请输入油站名称" style="width: 200px;margin-right: 15px;"></el-input>
|
||||
<el-select v-model="value" placeholder="请选择所属机构" style="width: 200px;margin-right: 15px;">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入油站名称" style="width: 200px;margin-right: 15px;"></el-input>
|
||||
<el-select v-model="queryParams.contractDeptId" placeholder="请选择所属机构" style="width: 200px;margin-right: 15px;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
v-for="item in deptListSelect"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId+''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="value" placeholder="请选择油站状态" style="width: 200px;margin-right: 15px;">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择油站状态" style="width: 200px;margin-right: 15px;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select v-model="value" placeholder="请选择计费方式" style="width: 200px;margin-right: 15px;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-select v-model="queryParams.turnoverType" placeholder="请选择计费方式" style="width: 200px;margin-right: 15px;">
|
||||
<el-option value="1" label="无限制"></el-option>
|
||||
<el-option value="2" label="时间限制"></el-option>
|
||||
<el-option value="3" label="预付费"></el-option>
|
||||
<el-option value="4" label="后付费"></el-option>
|
||||
<el-option value="5" label="年付费"></el-option>
|
||||
<el-option value="6" label="可创建油站站点数量"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
v-model="beginTime"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -51,52 +61,66 @@
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="name"
|
||||
align="center"
|
||||
label="油站名称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="deptName"
|
||||
align="center"
|
||||
label="所属机构"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="leaderName"
|
||||
align="center"
|
||||
width="100"
|
||||
label="油站负责人"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="leaderPhone"
|
||||
align="center"
|
||||
label="联系电话"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="turnoverType"
|
||||
align="center"
|
||||
width="80"
|
||||
label="计费方式"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.turnoverType == 1">无限制</span>
|
||||
<span v-if="scope.row.turnoverType == 2">时间限制</span>
|
||||
<span v-if="scope.row.turnoverType == 3">预付费</span>
|
||||
<span v-if="scope.row.turnoverType == 4">后付费</span>
|
||||
<span v-if="scope.row.turnoverType == 5">年付费</span>
|
||||
<span v-if="scope.row.turnoverType == 6">可创建油站站点数量</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="remind"
|
||||
align="center"
|
||||
label="到期提醒"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.remind || "--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="userTotal"
|
||||
align="center"
|
||||
label="会员人数"
|
||||
width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userTotal || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="status"
|
||||
align="center"
|
||||
width="80"
|
||||
label="油站状态"
|
||||
@ -104,6 +128,8 @@
|
||||
<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>
|
||||
@ -111,7 +137,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="createTime"
|
||||
align="center"
|
||||
label="创建时间"
|
||||
>
|
||||
@ -123,8 +149,8 @@
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;justify-content: center;width: 100%">
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px">进入油站</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px">查看详情</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" v-hasPermi="['Service:enter']" @click="enterThePetrolStation(scope.row)">进入油站</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" @click="godetails(scope.row.id,scope.row.contractDeptId)">查看详情</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -135,70 +161,73 @@
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="1000">
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 20px" v-for="(item,index) in arrlist" :key="index">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{item.storeName || ''}}</span>
|
||||
<!-- <el-card style="margin-top: 20px" v-for="(item,index) in arrlist" :key="index">-->
|
||||
<!-- <div slot="header" class="clearfix">-->
|
||||
<!-- <span>{{item.storeName || ''}}</span>-->
|
||||
|
||||
</div>
|
||||
<div class="box-wrap">
|
||||
<div class="zong-box" v-for="(items,index) in item.storeList" :key="index" >
|
||||
<div class="pur-box" @click="godetails(items.id,items.contractDeptId)">
|
||||
<el-tag type="success" v-if="items.status=='qy'">启用</el-tag>
|
||||
<el-tag type="danger" v-else>禁用</el-tag>
|
||||
<div class="disper-box">
|
||||
<div class="box-img">
|
||||
<img v-if="items.logo" :src="imagePath + items.logo" style="width: 96px;height: 96px">
|
||||
<img v-else src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" style="width: 96px;height: 96px">
|
||||
</div>
|
||||
<div >
|
||||
<div class="title">{{items.name || ''}}</div>
|
||||
<div class="box-hui">
|
||||
<div>注册时间:</div>
|
||||
<div>{{ items.createTime.substring(0,10) || ''}}</div>
|
||||
</div>
|
||||
<div class="box-hui">
|
||||
<div>联系人:</div>
|
||||
<div>{{items.contact || '暂无'}}</div>
|
||||
</div>
|
||||
<div class="box-hui">
|
||||
<div>联系电话:</div>
|
||||
<div>{{items.phone || '暂无'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-wrap">-->
|
||||
<!-- <div class="zong-box" v-for="(items,index) in item.storeList" :key="index" >-->
|
||||
<!-- <div class="pur-box" @click="godetails(items.id,items.contractDeptId)">-->
|
||||
<!-- <el-tag type="success" v-if="items.status=='qy'">启用</el-tag>-->
|
||||
<!-- <el-tag type="danger" v-else>禁用</el-tag>-->
|
||||
<!-- <div class="disper-box">-->
|
||||
<!-- <div class="box-img">-->
|
||||
<!-- <img v-if="items.logo" :src="imagePath + items.logo" style="width: 96px;height: 96px">-->
|
||||
<!-- <img v-else src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" style="width: 96px;height: 96px">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div >-->
|
||||
<!-- <div class="title">{{items.name || ''}}</div>-->
|
||||
<!-- <div class="box-hui">-->
|
||||
<!-- <div>注册时间:</div>-->
|
||||
<!-- <div>{{ items.createTime.substring(0,10) || ''}}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-hui">-->
|
||||
<!-- <div>联系人:</div>-->
|
||||
<!-- <div>{{items.contact || '暂无'}}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-hui">-->
|
||||
<!-- <div>联系电话:</div>-->
|
||||
<!-- <div>{{items.phone || '暂无'}}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
<div class="hui-bottom">
|
||||
<div>
|
||||
<div class="shang-biao">{{item.storeList.length || 0}}</div>
|
||||
<div class="xia-biao">创建门店数(个)</div>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="shang-biao">{{ items.userNum}}</div> -->
|
||||
<div class="shang-biao">{{ items.userNum}}</div>
|
||||
<div class="xia-biao">会员数(人)</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="shang-biao">{{ items.orderNum}}</div>
|
||||
<div class="xia-biao">支付订单(笔)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="hui-bottom">-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="shang-biao">{{item.storeList.length || 0}}</div>-->
|
||||
<!-- <div class="xia-biao">创建门店数(个)</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <!– <div class="shang-biao">{{ items.userNum}}</div> –>-->
|
||||
<!-- <div class="shang-biao">{{ items.userNum}}</div>-->
|
||||
<!-- <div class="xia-biao">会员数(人)</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="shang-biao">{{ items.orderNum}}</div>-->
|
||||
<!-- <div class="xia-biao">支付订单(笔)</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Storelist,getUserNumApi,
|
||||
getOrderNumApi } from "@/api/service/service";
|
||||
import {
|
||||
Storelist, getUserNumApi,
|
||||
getOrderNumApi, getStorelist, singleSignOnApi
|
||||
} from "@/api/service/service";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
export default {
|
||||
name: 'service',
|
||||
dicts: ['zhzt'],
|
||||
@ -254,18 +283,61 @@ export default {
|
||||
arrlist:[],
|
||||
value1:'',
|
||||
queryParams: {
|
||||
storeName: '',
|
||||
name: '',
|
||||
contractDeptId:'',
|
||||
status: '',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
|
||||
},
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
deptListSelect:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getStoreList();
|
||||
this.selectChildByDeptIdApi();
|
||||
},
|
||||
async mounted() {
|
||||
await this.getlist()
|
||||
},
|
||||
methods:{
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
name: '',
|
||||
contractDeptId:'',
|
||||
status: '',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ''
|
||||
this.endTime = ''
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getStoreList();
|
||||
},
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.deptListSelect = res.data
|
||||
})
|
||||
},
|
||||
getStoreList(){
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime)
|
||||
dateRange.push(this.endTime)
|
||||
}
|
||||
getStorelist(this.addDateRange(this.queryParams,dateRange)).then(res => {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
async getlist(){
|
||||
await Storelist(this.queryParams).then(res=>{
|
||||
console.log(res)
|
||||
@ -294,6 +366,19 @@ export default {
|
||||
})
|
||||
|
||||
},
|
||||
enterThePetrolStation(data) {
|
||||
if (data.status === 'jy') {
|
||||
this.$message('该油站已被禁用');
|
||||
|
||||
return
|
||||
}
|
||||
singleSignOnApi(data.id).then(res=>{
|
||||
if (res.code == 200) {
|
||||
window.open(this.pcUrl+'index?entrance='+data.id)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -758,7 +758,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="用户名" prop="accountName">
|
||||
<el-input v-model="form.accountName" placeholder="请输入用户名" maxlength="50" autocomplete="off" />
|
||||
<el-input v-model="form.accountName" placeholder="请输入用户名" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" maxlength="50" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -9,7 +9,7 @@
|
||||
说明:为了保证加油站商户日常在线支付业务的稳定性,目前支持多通道支付,可以有效的避免单支付通道带来不稳定性,从而造成油站不能正常支付问题,加油站一旦出现不能正常支付的情况,可以随时手工切换支付通道,来保证加油站支付收款业务
|
||||
</div>
|
||||
</div>
|
||||
<div class="o-button" @click="addMerchantShow()">新增商户信息</div>
|
||||
<div class="o-button" v-hasPermi="['Merchant:add']" @click="addMerchantShow()">新增商户信息</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="merchantList"
|
||||
@ -79,7 +79,7 @@
|
||||
width="100"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="color: #409EFF;cursor: pointer" @click="editMerchant(scope.row)">修改</div>
|
||||
<div style="color: #409EFF;cursor: pointer" v-hasPermi="['Merchant:edit']" @click="editMerchant(scope.row)">修改</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -91,7 +91,7 @@
|
||||
注意:功能状态启用且通道规则发布生效后当前功能才有效,否则使用系统单商户号模式
|
||||
</div>
|
||||
</div>
|
||||
<div class="o-button" @click="addRules()">新增规则</div>
|
||||
<div class="o-button" v-hasPermi="['payment:add']" @click="addRules()">新增规则</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
@ -193,8 +193,8 @@
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;justify-content: center;width: 100%">
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" @click="editRule(scope.row)">修改</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" @click="deleteRule(scope.row)">删除</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" v-hasPermi="['payment:edit']" @click="editRule(scope.row)">修改</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" v-hasPermi="['payment:delete']" @click="deleteRule(scope.row)">删除</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px" @click="EnableRule(scope.row)">启用</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
<script >
|
||||
import {Userlist} from "@/api/system/Site/site";
|
||||
|
||||
export default {
|
||||
props:['deptId'],
|
||||
data() {
|
||||
return {
|
||||
value: true,
|
||||
storeDeptInfo:{},
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
@ -21,6 +25,16 @@ export default {
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
},
|
||||
methods:{
|
||||
getInfo(){
|
||||
Userlist(this.deptId).then(res => {
|
||||
this.storeDeptInfo = res.data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -29,26 +43,31 @@ export default {
|
||||
<div class="container-app">
|
||||
<div class="d-s">
|
||||
<div class="left-size">机构名称:</div>
|
||||
<div>百业兴连锁加油站</div>
|
||||
<div>{{ storeDeptInfo.deptName || "--" }}</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">负责人姓名:</div>
|
||||
<div>xxxx</div>
|
||||
<div>{{ storeDeptInfo.leaderName || "--" }}</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">负责人电话:</div>
|
||||
<div>15012345678</div>
|
||||
<div>{{ storeDeptInfo.leaderPhone || "--" }}</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">机构类型:</div>
|
||||
<div>连锁店</div>
|
||||
<div v-if="storeDeptInfo.deptType==1">代理商</div>
|
||||
<div v-if="storeDeptInfo.deptType==2">连锁店</div>
|
||||
<div v-if="storeDeptInfo.deptType==3">基本门店</div>
|
||||
<div v-if="storeDeptInfo.deptType==4">三方机构</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">计费方式:</div>
|
||||
<div>年付费</div>
|
||||
<div>预付费</div>
|
||||
<div>后付费</div>
|
||||
<div>无限制</div>
|
||||
<div v-if="storeDeptInfo.turnoverType==1">无限制</div>
|
||||
<div v-if="storeDeptInfo.turnoverType==2">时间限制</div>
|
||||
<div v-if="storeDeptInfo.turnoverType==3">预付费</div>
|
||||
<div v-if="storeDeptInfo.turnoverType==4">后付费</div>
|
||||
<div v-if="storeDeptInfo.turnoverType==5">年付费</div>
|
||||
<div v-if="storeDeptInfo.turnoverType==6">可创建油站站点数量</div>
|
||||
</div>
|
||||
<!-- 年付费 -->
|
||||
<el-table
|
||||
@ -194,19 +213,28 @@ export default {
|
||||
label="创建人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 无限制 -->
|
||||
<!-- 时间限制限制 -->
|
||||
<div class="d-s" v-if="storeDeptInfo.turnoverType==2">
|
||||
<div class="left-size">开始时间:</div>
|
||||
<div>{{ storeDeptInfo.turnoverStartTime }}</div>
|
||||
<div class="left-size">结束时间:</div>
|
||||
<div>{{ storeDeptInfo.turnoverEndTime }}</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">机构状态:</div>
|
||||
<div><el-switch
|
||||
v-model="value"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<div>
|
||||
<el-switch
|
||||
v-model="storeDeptInfo.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">备注:</div>
|
||||
<div>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div>--</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,8 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="bannser">
|
||||
<img src="../../assets/images/banner.png" alt="" >
|
||||
</div>
|
||||
<el-carousel height="230px">
|
||||
<el-carousel-item v-for="(item,index) in bannerList" :key="index">
|
||||
<div class="bannser">
|
||||
|
||||
<!-- <img src="../../assets/images/banner.png" alt="" >-->
|
||||
<img :src="imagePath+item.productImage" alt="" >
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div class="san-box">
|
||||
@ -107,18 +113,12 @@
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
<div id="cccc" style="width: 300px;height: 200px;"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
<div id="cttt" style="width: 340px;height: 200px;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
@ -158,6 +158,7 @@ import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
export default {
|
||||
|
||||
data(){
|
||||
@ -195,6 +196,8 @@ export default {
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -204,11 +207,22 @@ export default {
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
this.selectBannerList()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
},
|
||||
methods:{
|
||||
selectBannerList(){
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页"
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
@ -229,12 +243,13 @@ export default {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart4= echarts.init(document.getElementById('cttt'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#179726',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
@ -431,11 +446,45 @@ export default {
|
||||
}
|
||||
|
||||
};
|
||||
const option4 ={
|
||||
color: ['#f82f2f', '#179627'],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 10
|
||||
},
|
||||
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 40,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
|
||||
data: [
|
||||
{ value: 225, name: '富友占比' },
|
||||
{ value: 735, name: '拉卡拉占比' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
chart.setOption(option)
|
||||
chart1.setOption(option1)
|
||||
chart2.setOption(option2)
|
||||
chart3.setOption(option3)
|
||||
chart4.setOption(option4)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-carousel height="230px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<el-carousel-item v-for="(item,index) in bannerList" :key="index">
|
||||
<div class="bannser">
|
||||
|
||||
<img src="../../assets/images/banner.png" alt="" >
|
||||
<!-- <img src="../../assets/images/banner.png" alt="" >-->
|
||||
<img :src="imagePath+item.productImage" alt="" >
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@ -64,7 +65,7 @@
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-select v-model="value" clearable placeholder="请选择" @change="chooseDept()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
@ -140,7 +141,7 @@
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == timeIndex }" v-for="(item,index) in timeList" :key="index" @click="editColor(index)">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
@ -149,7 +150,8 @@
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
end-placeholder="结束日期"
|
||||
@change="getStoreList()">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||
@ -161,9 +163,10 @@
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectStoreAmount, storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
export default {
|
||||
|
||||
data(){
|
||||
@ -175,7 +178,7 @@ export default {
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
timeIndex:0,
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
@ -201,6 +204,9 @@ export default {
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
storeList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -210,11 +216,68 @@ export default {
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
this.selectBannerList()
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.getStoreList()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
// this.initChart()
|
||||
},
|
||||
methods:{
|
||||
editColor(index){
|
||||
this.timeIndex = index
|
||||
if (this.timeList[index]=='今日'){
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
} else if (this.timeList[index]=='近一周'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
} else if (this.timeList[index]=='近一月'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
} else if (this.timeList[index]=='近一年'){
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
}
|
||||
this.getStoreList()
|
||||
},
|
||||
getStoreList(){
|
||||
selectStoreAmount(this.addDateRange({},this.value2)).then(res => {
|
||||
this.storeList = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
// 选择机构信息
|
||||
chooseDept(){
|
||||
this.options.forEach(item => {
|
||||
if (item.deptId == this.value){
|
||||
this.queryParams.ancestors = item.ancestors
|
||||
}
|
||||
})
|
||||
this.getStoreAmount()
|
||||
},
|
||||
selectBannerList(){
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页"
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
@ -229,14 +292,50 @@ export default {
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
countPercentage(upNum,downNum){
|
||||
let percentage = 0;
|
||||
percentage = (upNum / downNum)*100
|
||||
return percentage.toFixed(2)
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
let dataList = []
|
||||
let allTotal = 0
|
||||
if (this.storeAmount.oilNameList) {
|
||||
this.storeAmount.oilNameList.forEach(item => {
|
||||
allTotal += item.countNum
|
||||
})
|
||||
this.storeAmount.oilNameList.forEach(item => {
|
||||
let data = {value: 0, name: ""}
|
||||
data.value = this.countPercentage(item.countNum, allTotal);
|
||||
data.name = item.oilName + item.oilType + "占比"
|
||||
dataList.push(data)
|
||||
})
|
||||
}
|
||||
|
||||
let storeNameList = []
|
||||
let oilAmountList = []
|
||||
let noOilAmountList = []
|
||||
let rechargeBalanceList = []
|
||||
let consumeBalanceList = []
|
||||
let userBalanceList = []
|
||||
if (this.storeList.length>0) {
|
||||
this.storeList.forEach(item => {
|
||||
storeNameList.push(item.storeName)
|
||||
oilAmountList.push(item.oilAmount)
|
||||
noOilAmountList.push(item.noOilAmount)
|
||||
rechargeBalanceList.push(item.userRechargeBalance)
|
||||
consumeBalanceList.push(item.userConsumeBalance)
|
||||
userBalanceList.push(item.userBalance)
|
||||
})
|
||||
}
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
@ -255,14 +354,15 @@ export default {
|
||||
type: 'pie',
|
||||
roseType: 'area',
|
||||
radius: [5, '80%'],
|
||||
data: [
|
||||
{ value: 36, name: '#98汽油占比' },
|
||||
{ value: 42, name: '0#柴油占比' },
|
||||
{ value: 40, name: '#95汽油占比' },
|
||||
{ value: 38, name: '#92柴油占比' },
|
||||
|
||||
|
||||
],
|
||||
// data: [
|
||||
// { value: 36, name: '#98汽油占比' },
|
||||
// { value: 42, name: '0#柴油占比' },
|
||||
// { value: 40, name: '#95汽油占比' },
|
||||
// { value: 38, name: '#92柴油占比' },
|
||||
//
|
||||
//
|
||||
// ],
|
||||
data: dataList,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
@ -289,8 +389,10 @@ export default {
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
// { value: 28, name: '28%' },
|
||||
// { value: 72, name: '72%' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.oilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.noOilNum)), name: "油品交易占比" },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.noOilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.noOilNum)), name: "非油品交易占比" },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -320,10 +422,14 @@ export default {
|
||||
type: 'pie',
|
||||
radius: [50, '80%'],
|
||||
data: [
|
||||
{ value: 28, name: '会员充值占比' },
|
||||
{ value: 72, name: '积分商城交易占比' },
|
||||
{ value: 28, name: '油品交易占比' },
|
||||
{ value: 72, name: '便利店交易占比' },
|
||||
// { value: 28, name: '会员充值占比' },
|
||||
// { value: 72, name: '积分商城交易占比' },
|
||||
// { value: 28, name: '油品交易占比' },
|
||||
// { value: 72, name: '便利店交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.userNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '会员充值占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.integralNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '积分商城交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.oilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '油品交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.goodNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '便利店交易占比' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -349,12 +455,13 @@ export default {
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['Evaporation', '会员余额', '会员充值金额','会员消费金额','油品交易额','非油品交易额']
|
||||
data: ['Evaporation','油品交易额','非油品交易额', '会员充值金额','会员消费金额', '会员余额']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
||||
// data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
||||
data: storeNameList,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
@ -364,82 +471,25 @@ export default {
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
// min: 0,
|
||||
// max: 10000,
|
||||
// interval: 2000,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
}
|
||||
// {
|
||||
// type: 'value',
|
||||
// name: '',
|
||||
// min: 0,
|
||||
// max: 25,
|
||||
// interval: 5,
|
||||
// axisLabel: {
|
||||
// formatter: '{value} '
|
||||
// }
|
||||
// }
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '会员余额',
|
||||
color: '#D55F5F',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '会员充值金额',
|
||||
color: '#0DC291',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '会员消费金额',
|
||||
color: '#409EFF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '油品交易额',
|
||||
color: '#FF9655',
|
||||
@ -456,9 +506,10 @@ export default {
|
||||
}
|
||||
},
|
||||
barGap: '60%',
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
]
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: oilAmountList
|
||||
},
|
||||
{
|
||||
name: '非油品交易额',
|
||||
@ -475,14 +526,75 @@ export default {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
]
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: noOilAmountList
|
||||
},
|
||||
{
|
||||
name: '会员充值金额',
|
||||
color: '#0DC291',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: rechargeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员消费金额',
|
||||
color: '#409EFF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: consumeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员余额',
|
||||
color: '#D55F5F',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
// ]
|
||||
data: userBalanceList
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
left: '3%',
|
||||
right: '3%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
@ -1,8 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="bannser">
|
||||
<img src="../../assets/images/banner.png" alt="" >
|
||||
</div>
|
||||
<el-carousel height="230px">
|
||||
<el-carousel-item v-for="(item,index) in bannerList" :key="index">
|
||||
<div class="bannser">
|
||||
|
||||
<!-- <img src="../../assets/images/banner.png" alt="" >-->
|
||||
<img :src="imagePath+item.productImage" alt="" >
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div class="san-box">
|
||||
@ -58,7 +64,7 @@
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-select v-model="value" clearable placeholder="请选择" @change="chooseDept()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
@ -113,7 +119,7 @@
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<!-- <div class="h-tt" >活跃油站</div>-->
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
@ -158,6 +164,7 @@ import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
export default {
|
||||
|
||||
data(){
|
||||
@ -195,6 +202,8 @@ export default {
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -204,11 +213,31 @@ export default {
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
this.selectBannerList()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
// this.initChart()
|
||||
},
|
||||
methods:{
|
||||
// 选择机构信息
|
||||
chooseDept(){
|
||||
this.options.forEach(item => {
|
||||
if (item.deptId == this.value){
|
||||
this.queryParams.ancestors = item.ancestors
|
||||
}
|
||||
})
|
||||
this.getStoreAmount()
|
||||
},
|
||||
selectBannerList(){
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页"
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
@ -223,19 +252,40 @@ export default {
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
countPercentage(upNum,downNum){
|
||||
let percentage = 0;
|
||||
percentage = (upNum / downNum)*100
|
||||
return percentage.toFixed(2)
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
let dataList = []
|
||||
let allTotal = 0
|
||||
if (this.storeAmount.oilNameList) {
|
||||
this.storeAmount.oilNameList.forEach(item => {
|
||||
allTotal += item.countNum
|
||||
})
|
||||
this.storeAmount.oilNameList.forEach(item => {
|
||||
let data = {value: 0, name: ""}
|
||||
data.value = this.countPercentage(item.countNum, allTotal);
|
||||
data.name = item.oilName + item.oilType + "占比"
|
||||
dataList.push(data)
|
||||
})
|
||||
}
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
'#b7f1e2',
|
||||
'#fc7150',
|
||||
'#fea500',
|
||||
'#5facfe',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
@ -245,15 +295,21 @@ export default {
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
roseType: 'area',
|
||||
radius: [5, '80%'],
|
||||
// data: [
|
||||
// { value: 36, name: '#98汽油占比' },
|
||||
// { value: 42, name: '0#柴油占比' },
|
||||
// { value: 40, name: '#95汽油占比' },
|
||||
// { value: 38, name: '#92柴油占比' },
|
||||
//
|
||||
//
|
||||
// ],
|
||||
data: dataList,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
borderRadius: 8,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
@ -276,8 +332,10 @@ export default {
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
// { value: 28, name: '28%' },
|
||||
// { value: 72, name: '72%' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.oilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.noOilNum)), name: "油品交易占比" },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.noOilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.noOilNum)), name: "非油品交易占比" },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -292,8 +350,10 @@ export default {
|
||||
};
|
||||
const option2 = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
'#46c2c4',
|
||||
'#6e4dd8',
|
||||
'#214790',
|
||||
'#d55f5f',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
@ -303,10 +363,16 @@ export default {
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
radius: [50, '80%'],
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
// { value: 28, name: '会员充值占比' },
|
||||
// { value: 72, name: '积分商城交易占比' },
|
||||
// { value: 28, name: '油品交易占比' },
|
||||
// { value: 72, name: '便利店交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.userNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '会员充值占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.integralNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '积分商城交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.oilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '油品交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.goodNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '便利店交易占比' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
@ -319,8 +385,8 @@ export default {
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const option3 = {
|
||||
color: ['#FF9655', '#0DC291', '#409EFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
@ -332,25 +398,13 @@ export default {
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['交易金额', '交易笔数', '活跃油站数']
|
||||
data: ['Evaporation','油品交易额','非油品交易额', '会员充值金额','会员消费金额', '会员余额']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
// data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
||||
data: storeNameList,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
@ -360,76 +414,133 @@ export default {
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
// min: 0,
|
||||
// max: 10000,
|
||||
// interval: 2000,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
// {
|
||||
// type: 'value',
|
||||
// name: '',
|
||||
// min: 0,
|
||||
// max: 25,
|
||||
// interval: 5,
|
||||
// axisLabel: {
|
||||
// formatter: '{value} '
|
||||
// }
|
||||
// }
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '活跃油站数',
|
||||
name: '油品交易额',
|
||||
color: '#FF9655',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' ml';
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
//这里设置柱形图圆角 5左上角,右上角,右下角,左下角]
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: '交易金额',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
barGap: '60%',
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: oilAmountList
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
name: '非油品交易额',
|
||||
color: '#55F3FF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
return value;
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: noOilAmountList
|
||||
},
|
||||
{
|
||||
name: '会员充值金额',
|
||||
color: '#0DC291',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: rechargeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员消费金额',
|
||||
color: '#409EFF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: consumeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员余额',
|
||||
color: '#D55F5F',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
// ]
|
||||
data: userBalanceList
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
left: '3%',
|
||||
right: '3%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<!-- 代理-->
|
||||
<agent v-if="power == 1"></agent>
|
||||
<!-- 连锁-->
|
||||
<manage v-if="power == 2"></manage>
|
||||
<!-- 油站-->
|
||||
<shopowner v-if="power == 3"></shopowner>
|
||||
</div>
|
||||
</template>
|
||||
@ -13,7 +16,8 @@ import shopowner from "@/views/homeComponents/shopowner.vue"
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
power:2
|
||||
power:1
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
343
fuintAdmin_zt/src/views/setting/hardware.vue
Normal file
343
fuintAdmin_zt/src/views/setting/hardware.vue
Normal file
@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="90px">
|
||||
<el-form-item label="" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请选择分类" prop="categoryName">
|
||||
<el-select v-model="queryParams.categoryName" style="width: 150px" placeholder="全部">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hardware_type"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请选择状态" prop="status">
|
||||
<el-select v-model="queryParams.status" style="width: 150px" placeholder="全部">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hardware_status"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</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"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增商品</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="name" label="商品名称"></el-table-column>
|
||||
<el-table-column prop="categoryName" label="商品分类"></el-table-column>
|
||||
<el-table-column prop="image" label="商品图片">
|
||||
<template slot-scope="scope">
|
||||
<ImagePreview :src="scope.row.image"></ImagePreview>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="formStore" label="采购商家"></el-table-column>
|
||||
<el-table-column prop="content" label="商品介绍"></el-table-column>
|
||||
<el-table-column prop="status" label="商品状态">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==0">
|
||||
未上架
|
||||
</div>
|
||||
<div v-else>
|
||||
已上架
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="edit(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="del(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
|
||||
<el-form-item label="商品名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类" prop="categoryName">
|
||||
<el-select v-model="form.categoryName" style="width: 150px" placeholder="全部">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hardware_type"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购商家" prop="formStore">
|
||||
<el-input v-model="form.formStore" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="image">
|
||||
<ImageUpload v-model="form.image"></ImageUpload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品介绍" prop="content">
|
||||
<el-input type="textarea" v-model="form.content"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('form')">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {deleteApi, getListApi, saveApi, updateApi} from "@/api/setting/hardware";
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
dicts: ['hardware_type','hardware_status'],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
form: {
|
||||
|
||||
},
|
||||
systemPositionList:[{
|
||||
value: '首页',
|
||||
label: '首页'
|
||||
}, {
|
||||
value: '系统首页',
|
||||
label: '系统首页'
|
||||
},],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
title:"",
|
||||
total:0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
bannerName:'',
|
||||
systemPosition:'',
|
||||
bannerStatus:'',
|
||||
},
|
||||
|
||||
// 上传地址
|
||||
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
|
||||
uploadHeader: { 'Access-Token' : getToken() }, // 上传文件列表
|
||||
uploadFiles: [
|
||||
{name:"nihao",
|
||||
url:'http://localhost:8008/static/uploadImages/20231103/ffbbe7d3ee1441fdaf706802fa0f176a.png'}
|
||||
],
|
||||
// 图片根目录
|
||||
imagePath: process.env.VUE_APP_BASE_API,
|
||||
// 隐藏上传
|
||||
hideUpload: false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "商品名称不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryName: [
|
||||
{ required: true, message: "商品分类不能为空", trigger: "blur" }
|
||||
],
|
||||
formStore: [
|
||||
{ required: true, message: "采购商家不能为空", trigger: "blur" }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: "商品图片不能为空", trigger: "blur" }
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: "商品介绍不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
getListApi(this.queryParams).then(res=>{
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
// 表单验证通过,可以提交数据
|
||||
this.submitDeviceInfo();
|
||||
} else {
|
||||
// 表单验证失败,不执行任何操作
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
submitDeviceInfo() {
|
||||
// 在这里调用接口提交设备信息数据
|
||||
console.log('提交设备信息数据:', this.form);
|
||||
if (this.form.id) {
|
||||
updateApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
|
||||
})
|
||||
}else {
|
||||
saveApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
changeStatus(data){
|
||||
updateApi(data).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改状态成功!'
|
||||
});
|
||||
this.getList()
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 上传封面
|
||||
handleUploadSuccessCover(file) {
|
||||
this.form.productImage = file.data.fileName;
|
||||
this.form.productImage = file.data.fileName;
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
deviceName:'',
|
||||
},
|
||||
this.getList()
|
||||
},
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "新增商品"
|
||||
},
|
||||
edit(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "修改商品"
|
||||
this.form = e
|
||||
},
|
||||
del(e) {
|
||||
this.$confirm('此操作将永久删除该商品, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteApi(e.id).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
clean() {
|
||||
this.form= {
|
||||
id: null, // 自增id
|
||||
bannerName: '', // Banner名称
|
||||
productImage: '', // 商品图片
|
||||
systemPosition: '', // 系统位置
|
||||
sortOrder: null, // 排序号
|
||||
bannerLink: '', // Banner链接
|
||||
bannerStatus: false, // Banner状态
|
||||
note: '', // 备注
|
||||
createByName: '', //
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.common-dialog >>> .el-upload--picture-card {
|
||||
width: 60px;
|
||||
height: 50px;
|
||||
line-height: 60px;
|
||||
}
|
||||
.d-dialog >>> .el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
.d-dialog >>> .avatar-uploader .el-upload {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.d-dialog >>> .el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.list-img{
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
}
|
||||
</style>
|
||||
|
365
fuintAdmin_zt/src/views/setting/message.vue
Normal file
365
fuintAdmin_zt/src/views/setting/message.vue
Normal file
@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
|
||||
<el-form-item label="" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入短信名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请选择接收角色" prop="roleIds">
|
||||
<el-select v-model="queryParams.roleIds" style="width: 150px" placeholder="全部">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hardware_type"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请选择短信模版状态" prop="status">
|
||||
<el-select v-model="queryParams.status" style="width: 150px" placeholder="全部">
|
||||
<el-option
|
||||
v-for="dict in dict.type.message_status"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</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"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增短信模板</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="messageId" label="短信模板ID"></el-table-column>
|
||||
<el-table-column prop="name" label="短信名称"></el-table-column>
|
||||
<el-table-column prop="content" label="短信模板内容"></el-table-column>
|
||||
<!-- <el-table-column prop="image" label="短信图片">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <ImagePreview :src="scope.row.image"></ImagePreview>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="deptIds" label="适用范围"></el-table-column>
|
||||
<!-- <el-table-column prop="roleIds" label="接收角色"></el-table-column>-->
|
||||
|
||||
<el-table-column prop="status" label="短信状态">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==0">
|
||||
停用
|
||||
</div>
|
||||
<div v-else>
|
||||
启用
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="edit(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="del(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="35%" append-to-body>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
|
||||
<el-form-item label="短信模板ID" prop="messageId">
|
||||
<el-input v-model="form.messageId" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="短信名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用范围" prop="storeId">
|
||||
<el-select v-model="form.deptIds" placeholder="请选择所属机构" style="width: 300px" >
|
||||
<el-option
|
||||
v-for="item in deptListSelect"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="即时配送">
|
||||
<el-switch v-model="form.status"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="适用角色" prop="categoryName">-->
|
||||
<!-- <el-select v-model="form.roleIds" style="width: 300px" placeholder="全部">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.role_ids"-->
|
||||
<!-- :key="dict.label"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.label"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="短信内容" prop="content" >
|
||||
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('form')">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {deleteApi, getListApi, saveApi, updateApi} from "@/api/setting/message";
|
||||
import { getToken } from '@/utils/auth'
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
dicts: ['dept_ids','role_ids'],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
form: {},
|
||||
deptListSelect:[],
|
||||
systemPositionList:[{
|
||||
value: '首页',
|
||||
label: '首页'
|
||||
}, {
|
||||
value: '系统首页',
|
||||
label: '系统首页'
|
||||
},],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
title:"",
|
||||
total:0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
bannerName:'',
|
||||
systemPosition:'',
|
||||
bannerStatus:'',
|
||||
},
|
||||
|
||||
// 上传地址
|
||||
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
|
||||
uploadHeader: { 'Access-Token' : getToken() }, // 上传文件列表
|
||||
uploadFiles: [
|
||||
{name:"nihao",
|
||||
url:'http://localhost:8008/static/uploadImages/20231103/ffbbe7d3ee1441fdaf706802fa0f176a.png'}
|
||||
],
|
||||
// 图片根目录
|
||||
imagePath: process.env.VUE_APP_BASE_API,
|
||||
// 隐藏上传
|
||||
hideUpload: false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
messageId: [
|
||||
{ required: true, message: "短信模板id不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "短信名称不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryName: [
|
||||
{ required: true, message: "短信分类不能为空", trigger: "blur" }
|
||||
],
|
||||
formStore: [
|
||||
{ required: true, message: "采购商家不能为空", trigger: "blur" }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: "短信图片不能为空", trigger: "blur" }
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: "短信介绍不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.selectChildByDeptIdApi()
|
||||
},
|
||||
methods: {
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.deptListSelect = res.data
|
||||
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
getListApi(this.queryParams).then(res=>{
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
// 表单验证通过,可以提交数据
|
||||
this.submitDeviceInfo();
|
||||
} else {
|
||||
// 表单验证失败,不执行任何操作
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
submitDeviceInfo() {
|
||||
// 在这里调用接口提交设备信息数据
|
||||
console.log('提交设备信息数据:', this.form);
|
||||
if (this.form.id) {
|
||||
updateApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}else {
|
||||
saveApi(this.form).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
changeStatus(data){
|
||||
updateApi(data).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改状态成功!'
|
||||
});
|
||||
this.getList()
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 上传封面
|
||||
handleUploadSuccessCover(file) {
|
||||
this.form.productImage = file.data.fileName;
|
||||
this.form.productImage = file.data.fileName;
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
deviceName:'',
|
||||
},
|
||||
this.getList()
|
||||
},
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "新增短信"
|
||||
},
|
||||
edit(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "修改短信"
|
||||
this.form = e
|
||||
},
|
||||
del(e) {
|
||||
this.$confirm('此操作将永久删除该短信, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteApi(e.id).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
clean() {
|
||||
this.form= {
|
||||
id: null, // 自增id
|
||||
bannerName: '', // Banner名称
|
||||
productImage: '', // 短信图片
|
||||
systemPosition: '', // 系统位置
|
||||
sortOrder: null, // 排序号
|
||||
bannerLink: '', // Banner链接
|
||||
bannerStatus: false, // Banner状态
|
||||
note: '', // 备注
|
||||
createByName: '', //
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.common-dialog >>> .el-upload--picture-card {
|
||||
width: 60px;
|
||||
height: 50px;
|
||||
line-height: 60px;
|
||||
}
|
||||
.d-dialog >>> .el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
.d-dialog >>> .avatar-uploader .el-upload {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.d-dialog >>> .el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.list-img{
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
}
|
||||
</style>
|
||||
|
0
fuintAdmin_zt/src/views/setting/sysLog.vue
Normal file
0
fuintAdmin_zt/src/views/setting/sysLog.vue
Normal file
@ -27,6 +27,7 @@ export default {
|
||||
</div>
|
||||
<notify-mode v-if="activeindex == 0"></notify-mode>
|
||||
<notify-record v-else></notify-record>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -54,5 +55,10 @@ export default {
|
||||
.container{
|
||||
background: #F4F5F9;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
}
|
||||
.tabder-box{
|
||||
width: 85%;
|
||||
}
|
||||
</style>
|
||||
|
@ -70,7 +70,7 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
* @param allOrderInfo
|
||||
* @return
|
||||
*/
|
||||
Integer selectTotal(@Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||
Integer selectTotal(@Param("allOrderInfo") AllOrderInfo allOrderInfo,@Param("storeIds") List<Integer> storeIds);
|
||||
|
||||
Double selectAllAmount(@Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||
|
||||
|
@ -134,4 +134,6 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
|
||||
List<OilOrderVo> getInfoByOilType(@Param("allOrderInfo") OilOrder oilOrder);
|
||||
List<OilOrderVo> getInfoByOilGun(@Param("allOrderInfo") OilOrder oilOrder);
|
||||
List<OilOrderVo> getInfoByEm(@Param("allOrderInfo") OilOrder oilOrder);
|
||||
|
||||
List<OilOrderVo> selectOilsCount(@Param("oilOrderVo") OilOrderVo oilOrderVo,@Param("storeIds") List<Integer> storeIds);
|
||||
}
|
||||
|
@ -145,6 +145,9 @@
|
||||
<if test="allOrderInfo.payType != null and allOrderInfo.payType != ''">
|
||||
and aoi.pay_type = #{allOrderInfo.payType}
|
||||
</if>
|
||||
<if test="allOrderInfo.status != null and allOrderInfo.status != ''">
|
||||
and aoi.status = #{allOrderInfo.status}
|
||||
</if>
|
||||
<if test="allOrderInfo.params.beginTime != null and allOrderInfo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') >= date_format(#{allOrderInfo.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
|
@ -728,4 +728,23 @@
|
||||
from oil_order;
|
||||
|
||||
</select>
|
||||
<select id="selectOilsCount" resultType="com.fuint.business.order.vo.OilOrderVo">
|
||||
SELECT oo.oils,count(*) countNum,oin.oil_type,oin.oil_name FROM oil_order oo
|
||||
LEFT JOIN oil_name oin ON oo.oils = oin.id
|
||||
<where>
|
||||
<if test="storeIds != null">
|
||||
oo.store_id in
|
||||
<foreach collection="storeIds" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="oilOrderVo.params.beginTime != null and oilOrderVo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') >= date_format(#{oilOrderVo.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="oilOrderVo.params.endTime != null and oilOrderVo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{oilOrderVo.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY oo.oils
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -14,6 +14,7 @@ import com.fuint.system.dept.vo.SysDeptVo;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@Transactional
|
||||
public interface AllOrderInfoService {
|
||||
@ -102,11 +103,20 @@ public interface AllOrderInfoService {
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Integer selectStoreTotal(Map<String,String> map);
|
||||
Integer selectStoreTotal(Map<String,String> map, List<Integer> storeIds);
|
||||
|
||||
/**
|
||||
* 查询某个时间段内油品交易笔数占比
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Integer selectProportion(Map<String,String> map, List<Integer> storeIds,List<String> types);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getAmount(AllOrderInfoVo allOrderInfoVo);
|
||||
|
||||
Double selectAmount(Map<String,String> map, Integer storeId,List<String> types);
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Transactional
|
||||
public interface CardBalanceChangeService extends IService<CardBalanceChange> {
|
||||
/**
|
||||
@ -29,4 +31,12 @@ public interface CardBalanceChangeService extends IService<CardBalanceChange> {
|
||||
* @return
|
||||
*/
|
||||
IPage<CardBalanceChange> getStoreOrdersList(Page page, CardBalanceChange cardBalanceChange);
|
||||
|
||||
/**
|
||||
* 根据店铺id和余额变化类型查询订单总额
|
||||
* @param storeId
|
||||
* @param type 0:-减少 1:增加
|
||||
* @return
|
||||
*/
|
||||
Double selectAllAmount(Map<String, String> map, Integer storeId, String type);
|
||||
}
|
||||
|
@ -226,4 +226,6 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception;
|
||||
|
||||
List<OilOrderVo> selectProportion(Map<String, String> map,List<Integer> storeIds);
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import com.fuint.business.order.vo.Excel.DayExcel;
|
||||
import com.fuint.business.order.vo.Excel.InstituionExcel;
|
||||
import com.fuint.business.order.vo.Excel.OilDepotExcel;
|
||||
import com.fuint.business.order.vo.Excel.TradingExcel;
|
||||
import com.fuint.business.order.vo.OilOrderVo;
|
||||
import com.fuint.business.order.vo.OrderGoodsVo;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilGun;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
@ -1083,14 +1084,38 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectStoreTotal(Map<String, String> map) {
|
||||
public Integer selectStoreTotal(Map<String, String> map,List<Integer> storeIds) {
|
||||
String startTime = map.get("startTime");
|
||||
String endTime = map.get("endTime");
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
|
||||
queryWrapper.apply(true,"create_time BETWEEN '" + startTime + "' and '" + endTime + "'");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(storeIds)){
|
||||
queryWrapper.in("store_id",storeIds);
|
||||
}
|
||||
queryWrapper.groupBy("store_id");
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<AllOrderInfo> allOrderInfos = baseMapper.selectList(queryWrapper);
|
||||
Integer row = 0;
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfos)) row = allOrderInfos.size();
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectProportion(Map<String, String> map,List<Integer> storeIds,List<String> types) {
|
||||
String startTime = map.get("startTime");
|
||||
String endTime = map.get("endTime");
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
|
||||
queryWrapper.apply(true,"create_time BETWEEN '" + startTime + "' and '" + endTime + "'");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(storeIds)){
|
||||
queryWrapper.in("store_id",storeIds);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(types)){
|
||||
queryWrapper.in("type",types);
|
||||
}
|
||||
List<AllOrderInfo> allOrderInfos = baseMapper.selectList(queryWrapper);
|
||||
Integer row = 0;
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfos)) row = allOrderInfos.size();
|
||||
@ -1102,15 +1127,57 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<SysDeptVo> sysDeptVos = deptService.selectChildByDeptId(nowAccountInfo.getDeptId());
|
||||
List<Integer> ids = new ArrayList<>();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getAncestors())){
|
||||
ancestors = allOrderInfoVo.getAncestors();
|
||||
}
|
||||
MtStore store = new MtStore();
|
||||
List<MtStore> mtStores = mtStoreMapper.selectStoreList(store, ancestors);
|
||||
List<Integer> storeIds = new ArrayList<>();
|
||||
for (MtStore mtStore : mtStores) {
|
||||
storeIds.add(mtStore.getId());
|
||||
}
|
||||
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(storeIds)){
|
||||
queryWrapper.in("store_id",storeIds);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getParams())
|
||||
&& ObjectUtil.isNotEmpty(allOrderInfoVo.getParams().get("beginTime"))
|
||||
&& ObjectUtil.isNotEmpty(allOrderInfoVo.getParams().get("endTime"))){
|
||||
queryWrapper.apply(true,"create_time BETWEEN '" + allOrderInfoVo.getParams().get("beginTime") + "' and '" + allOrderInfoVo.getParams().get("endTime") + "'");
|
||||
}
|
||||
|
||||
Integer tradeTotal = ObjectUtil.isNotEmpty(baseMapper.selectTotal(allOrderInfoVo)) ? baseMapper.selectTotal(allOrderInfoVo) : 0;
|
||||
Double tradeAmount = ObjectUtil.isNotEmpty(baseMapper.selectAllAmount(allOrderInfoVo)) ? baseMapper.selectAllAmount(allOrderInfoVo) : 0;
|
||||
Integer tradeTotal = ObjectUtil.isNotEmpty(baseMapper.selectCount(queryWrapper)) ? baseMapper.selectCount(queryWrapper) : 0;
|
||||
List list = this.listObjs(queryWrapper.select("pay_money"));
|
||||
Double tradeAmount = 0.0;
|
||||
if (!list.isEmpty()) {
|
||||
for (Object payMoney: list) {
|
||||
tradeAmount += Double.valueOf(payMoney.toString());
|
||||
}
|
||||
}
|
||||
allOrderInfoVo.setStatus("refund");
|
||||
Integer refundTotal = ObjectUtil.isNotEmpty(baseMapper.selectTotal(allOrderInfoVo)) ? baseMapper.selectTotal(allOrderInfoVo) : 0;
|
||||
Double refundAmount = ObjectUtil.isNotEmpty(baseMapper.selectAllAmount(allOrderInfoVo)) ? baseMapper.selectAllAmount(allOrderInfoVo) : 0;
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfoVo.getStatus())){
|
||||
queryWrapper.eq("status",allOrderInfoVo.getStatus());
|
||||
}
|
||||
Integer refundTotal = ObjectUtil.isNotEmpty(baseMapper.selectCount(queryWrapper)) ? baseMapper.selectCount(queryWrapper) : 0;
|
||||
List list1 = this.listObjs(queryWrapper.select("pay_money"));
|
||||
Double refundAmount = 0.0;
|
||||
if (!list1.isEmpty()) {
|
||||
for (Object payMoney: list1) {
|
||||
refundAmount += Double.valueOf(payMoney.toString());
|
||||
}
|
||||
}
|
||||
|
||||
// Integer tradeTotal = ObjectUtil.isNotEmpty(baseMapper.selectTotal(allOrderInfoVo,storeIds)) ? baseMapper.selectTotal(allOrderInfoVo,storeIds) : 0;
|
||||
// Double tradeAmount = ObjectUtil.isNotEmpty(baseMapper.selectAllAmount(allOrderInfoVo)) ? baseMapper.selectAllAmount(allOrderInfoVo) : 0;
|
||||
// allOrderInfoVo.setStatus("refund");
|
||||
// Integer refundTotal = ObjectUtil.isNotEmpty(baseMapper.selectTotal(allOrderInfoVo,storeIds)) ? baseMapper.selectTotal(allOrderInfoVo,storeIds) : 0;
|
||||
// Double refundAmount = ObjectUtil.isNotEmpty(baseMapper.selectAllAmount(allOrderInfoVo)) ? baseMapper.selectAllAmount(allOrderInfoVo) : 0;
|
||||
Double averagePrice = tradeAmount/tradeTotal;
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@ -1122,17 +1189,50 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
LocalDate date2 = LocalDate.parse(allOrderInfoVo.getParams().get("endTime").toString(), formatter);
|
||||
|
||||
Integer daysBetween = Math.toIntExact(ChronoUnit.DAYS.between(date1, date2));
|
||||
dayTradeAmount = tradeAmount / daysBetween;
|
||||
dayTradeTotal = tradeTotal / daysBetween;
|
||||
if (daysBetween!=0) {
|
||||
dayTradeAmount = tradeAmount / daysBetween;
|
||||
dayTradeTotal = tradeTotal / daysBetween;
|
||||
}
|
||||
map1.put("startTime", allOrderInfoVo.getParams().get("beginTime").toString());
|
||||
map1.put("endTime", allOrderInfoVo.getParams().get("endTime").toString());
|
||||
}
|
||||
Integer storeTotal = selectStoreTotal(map1);
|
||||
Integer storeTotal = selectStoreTotal(map1,storeIds);
|
||||
DecimalFormat df = new DecimalFormat("#.00"); // 格式化字符串,表示两位小数
|
||||
|
||||
// 设置格式化器
|
||||
df.setRoundingMode(RoundingMode.HALF_UP); // 可选,设置四舍五入模式
|
||||
|
||||
List<String> types = new ArrayList<>();
|
||||
// 油品笔数
|
||||
types.add("1");
|
||||
types.add("6");
|
||||
types.add("7");
|
||||
types.add("8");
|
||||
Integer oilNum = selectProportion(map1, storeIds, types);
|
||||
types = new ArrayList<>();
|
||||
// 非油品笔数
|
||||
types.add("2");
|
||||
types.add("3");
|
||||
types.add("4");
|
||||
types.add("5");
|
||||
Integer noOilNum = selectProportion(map1, storeIds, types);
|
||||
types = new ArrayList<>();
|
||||
// 会员充值
|
||||
types.add("3");
|
||||
types.add("5");
|
||||
Integer userNum = selectProportion(map1, storeIds, types);
|
||||
types = new ArrayList<>();
|
||||
// 积分商城
|
||||
types.add("4");
|
||||
Integer integralNum = selectProportion(map1, storeIds, types);
|
||||
types = new ArrayList<>();
|
||||
// 便利店
|
||||
types.add("2");
|
||||
Integer goodNum = selectProportion(map1, storeIds, types);
|
||||
|
||||
// 油品油号信息
|
||||
List<OilOrderVo> oilOrderVos = orderService.selectProportion(map1, storeIds);
|
||||
|
||||
map.put("tradeTotal",tradeTotal);
|
||||
map.put("tradeAmount",tradeAmount > 0 ? df.format(tradeAmount) : 0);
|
||||
map.put("refundTotal",refundTotal);
|
||||
@ -1141,9 +1241,38 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
map.put("dayTradeAmount",dayTradeAmount > 0 ? df.format(dayTradeAmount) : 0);
|
||||
map.put("dayTradeTotal",dayTradeTotal);
|
||||
map.put("storeTotal",storeTotal);
|
||||
map.put("oilNum",oilNum);
|
||||
map.put("noOilNum",noOilNum);
|
||||
map.put("userNum",userNum);
|
||||
map.put("integralNum",integralNum);
|
||||
map.put("goodNum",goodNum);
|
||||
map.put("oilNameList",oilOrderVos);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectAmount(Map<String, String> map, Integer storeId, List<String> types) {
|
||||
String startTime = map.get("startTime");
|
||||
String endTime = map.get("endTime");
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
|
||||
queryWrapper.apply(true,"create_time BETWEEN '" + startTime + "' and '" + endTime + "'");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(storeId)){
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(types)){
|
||||
queryWrapper.in("type",types);
|
||||
}
|
||||
queryWrapper.select("SUM(pay_money) as payMoney");
|
||||
AllOrderInfo allOrderInfo = baseMapper.selectOne(queryWrapper);
|
||||
Double payMoney = 0.0;
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfo) && ObjectUtil.isNotEmpty(allOrderInfo.getPayMoney())){
|
||||
payMoney = allOrderInfo.getPayMoney();
|
||||
}
|
||||
return payMoney;
|
||||
}
|
||||
|
||||
|
||||
private long dayCount(String beginTimeStr, String endTimeStr ) {
|
||||
// 将字符串表示的时间转换成 LocalDate 对象
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -19,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeMapper, CardBalanceChange> implements CardBalanceChangeService {
|
||||
@ -82,4 +85,30 @@ public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeM
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
return page1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectAllAmount(Map<String, String> map, Integer storeId, String type) {
|
||||
String startTime = map.get("startTime");
|
||||
String endTime = map.get("endTime");
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
|
||||
queryWrapper.apply(true,"create_time BETWEEN '" + startTime + "' and '" + endTime + "'");
|
||||
}
|
||||
if (type.equals("1")){
|
||||
queryWrapper.eq("change_type",type);
|
||||
queryWrapper.eq("from_type","余额充值");
|
||||
}else if (type.equals("0")){
|
||||
queryWrapper.eq("change_type",type);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(storeId)){
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
}
|
||||
queryWrapper.select("SUM(balance) as balance");
|
||||
CardBalanceChange cardBalanceChange = baseMapper.selectOne(queryWrapper);
|
||||
Double balance = 0.0;
|
||||
if (ObjectUtil.isNotEmpty(cardBalanceChange) && ObjectUtil.isNotEmpty(cardBalanceChange.getBalance())){
|
||||
balance = cardBalanceChange.getBalance();
|
||||
}
|
||||
return balance;
|
||||
}
|
||||
}
|
||||
|
@ -2576,4 +2576,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
res.put("scanCode",mainScan);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OilOrderVo> selectProportion(Map<String, String> map,List<Integer> storeIds) {
|
||||
String startTime = map.get("startTime");
|
||||
String endTime = map.get("endTime");
|
||||
OilOrderVo oilOrderVo = new OilOrderVo();
|
||||
Map<String , Object> map1 = new HashMap<>();
|
||||
map1.put("beginTime",startTime);
|
||||
map1.put("endTime",endTime);
|
||||
oilOrderVo.setParams(map1);
|
||||
return baseMapper.selectOilsCount(oilOrderVo,storeIds);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.order.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import lombok.Data;
|
||||
|
||||
@ -61,7 +62,8 @@ public class AllOrderInfoVo extends AllOrderInfo {
|
||||
private String userBalanceByAli;
|
||||
private String userBalanceCountByali;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ancestors;
|
||||
|
||||
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ public class OilOrderVo extends OilOrder {
|
||||
private String storeName;
|
||||
private String description;
|
||||
private String oilName;
|
||||
private String oilType;
|
||||
private String gunName;
|
||||
private String realName;
|
||||
private Double sumOilNum;
|
||||
@ -33,6 +34,11 @@ public class OilOrderVo extends OilOrder {
|
||||
private String authCode;
|
||||
@TableField(exist = false)
|
||||
private Double oilCardAmount1;
|
||||
/**
|
||||
* 数量信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer countNum;
|
||||
|
||||
private String sum;
|
||||
private String amount92;
|
||||
|
@ -0,0 +1,105 @@
|
||||
package com.fuint.business.setting.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.setting.entity.HardwareStore;
|
||||
import com.fuint.business.setting.service.HardwareStoreService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 硬件商城(HardwareStore)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 17:30:38
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("hardwareStore")
|
||||
public class HardwareStoreController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private HardwareStoreService hardwareStoreService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param hardwareStore 查询实体
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject selectAll(Page<HardwareStore> page, HardwareStore hardwareStore) {
|
||||
LambdaQueryWrapper<HardwareStore> hardwareStoreQueryWrapper = new LambdaQueryWrapper();
|
||||
if (!StringUtils.isEmpty(hardwareStore.getName())){
|
||||
hardwareStoreQueryWrapper.like(HardwareStore::getName,hardwareStore.getName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(hardwareStore.getStatus())){
|
||||
hardwareStoreQueryWrapper.eq(HardwareStore::getStatus,hardwareStore.getStatus());
|
||||
}
|
||||
if (!StringUtils.isEmpty(hardwareStore.getCategoryName())){
|
||||
hardwareStoreQueryWrapper.eq(HardwareStore::getCategoryName,hardwareStore.getCategoryName());
|
||||
}
|
||||
return getSuccessResult(this.hardwareStoreService.page(page, hardwareStoreQueryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||
return getSuccessResult(this.hardwareStoreService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param hardwareStore 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject insert(@RequestBody HardwareStore hardwareStore) {
|
||||
//获取当前登录用户
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
hardwareStore.setCreateName(nowAccountInfo.getRealName());
|
||||
return getSuccessResult(this.hardwareStoreService.save(hardwareStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param hardwareStore 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject update(@RequestBody HardwareStore hardwareStore) {
|
||||
return getSuccessResult(this.hardwareStoreService.updateById(hardwareStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键结合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.hardwareStoreService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,92 @@
|
||||
package com.fuint.business.setting.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.setting.entity.MessageTemplate;
|
||||
import com.fuint.business.setting.service.MessageTemplateService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (MessageTemplate)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 14:58:50
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("messageTemplate")
|
||||
public class MessageTemplateController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private MessageTemplateService messageTemplateService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param messageTemplate 查询实体
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject selectAll(Page<MessageTemplate> page, MessageTemplate messageTemplate) {
|
||||
return getSuccessResult(this.messageTemplateService.page(page, new QueryWrapper<>(messageTemplate)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||
return getSuccessResult(this.messageTemplateService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param messageTemplate 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject insert(@RequestBody MessageTemplate messageTemplate) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
messageTemplate.setCreateName(nowAccountInfo.getRealName());
|
||||
return getSuccessResult(this.messageTemplateService.save(messageTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param messageTemplate 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject update(@RequestBody MessageTemplate messageTemplate) {
|
||||
return getSuccessResult(this.messageTemplateService.updateById(messageTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键结合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.messageTemplateService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
package com.fuint.business.setting.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.setting.entity.SysLog;
|
||||
import com.fuint.business.setting.service.SysLogService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (SysLog)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 15:37:16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sysLog")
|
||||
public class SysLogController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private SysLogService sysLogService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param sysLog 查询实体
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject selectAll(Page<SysLog> page, SysLog sysLog) {
|
||||
return getSuccessResult(this.sysLogService.page(page, new QueryWrapper<>(sysLog)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||
return getSuccessResult(this.sysLogService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysLog 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject insert(@RequestBody SysLog sysLog) {
|
||||
return getSuccessResult(this.sysLogService.save(sysLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysLog 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject update(@RequestBody SysLog sysLog) {
|
||||
return getSuccessResult(this.sysLogService.updateById(sysLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键结合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.sysLogService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
package com.fuint.business.setting.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 硬件商城(HardwareStore)表实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 17:30:38
|
||||
*/
|
||||
@Data
|
||||
public class HardwareStore extends Model<HardwareStore> {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
//商品名称
|
||||
private String name;
|
||||
//分类
|
||||
private String categoryName;
|
||||
//图片
|
||||
private String image;
|
||||
//采购商家
|
||||
private String formStore;
|
||||
//商品介绍
|
||||
private String content;
|
||||
//状态0未上架1已上架
|
||||
private String status;
|
||||
//创建时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
//创建人
|
||||
private String createBy;
|
||||
//更新时间
|
||||
private Date updateTime;
|
||||
//更新人
|
||||
private String updateBy;
|
||||
//创建人名称
|
||||
private String createName;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
package com.fuint.business.setting.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* (MessageTemplate)表实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 14:58:56
|
||||
*/
|
||||
@Data
|
||||
public class MessageTemplate extends Model<MessageTemplate> {
|
||||
//主键
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
//短信名称
|
||||
private String name;
|
||||
//短信内容
|
||||
private String content;
|
||||
//适用范围
|
||||
private String deptIds;
|
||||
//适用角色
|
||||
private String roleIds;
|
||||
//状态0停用1启用
|
||||
private String status;
|
||||
//创建者名称
|
||||
private String createName;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//创建人
|
||||
private String createBy;
|
||||
//更新时间
|
||||
private Date updateTime;
|
||||
//更新人
|
||||
private String updateBy;
|
||||
//短信模板id
|
||||
private Integer messageId;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,147 @@
|
||||
package com.fuint.business.setting.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* (SysLog)表实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 15:37:16
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SysLog extends Model<SysLog> {
|
||||
|
||||
private Integer id;
|
||||
//ip地址
|
||||
private String ipAddr;
|
||||
//操作内容
|
||||
private String content;
|
||||
//操作模块
|
||||
private String moudle;
|
||||
//1中台端2油站端
|
||||
private String systemName;
|
||||
//机构名称
|
||||
private String deptName;
|
||||
//登录账户
|
||||
private String createAccount;
|
||||
//创建人名称
|
||||
private String createName;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//创建人
|
||||
private String createBy;
|
||||
//更新时间
|
||||
private Date updateTime;
|
||||
//更新人
|
||||
private String updateBy;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIpAddr() {
|
||||
return ipAddr;
|
||||
}
|
||||
|
||||
public void setIpAddr(String ipAddr) {
|
||||
this.ipAddr = ipAddr;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getMoudle() {
|
||||
return moudle;
|
||||
}
|
||||
|
||||
public void setMoudle(String moudle) {
|
||||
this.moudle = moudle;
|
||||
}
|
||||
|
||||
public String getSystemName() {
|
||||
return systemName;
|
||||
}
|
||||
|
||||
public void setSystemName(String systemName) {
|
||||
this.systemName = systemName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getCreateAccount() {
|
||||
return createAccount;
|
||||
}
|
||||
|
||||
public void setCreateAccount(String createAccount) {
|
||||
this.createAccount = createAccount;
|
||||
}
|
||||
|
||||
public String getCreateName() {
|
||||
return createName;
|
||||
}
|
||||
|
||||
public void setCreateName(String createName) {
|
||||
this.createName = createName;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主键值
|
||||
*
|
||||
* @return 主键值
|
||||
*/
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.fuint.business.setting.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.setting.entity.HardwareStore;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* 硬件商城(HardwareStore)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 17:30:38
|
||||
*/
|
||||
@Mapper
|
||||
public interface HardwareStoreMapper extends BaseMapper<HardwareStore> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.fuint.business.setting.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.setting.entity.MessageTemplate;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* (MessageTemplate)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 14:58:51
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageTemplateMapper extends BaseMapper<MessageTemplate> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.fuint.business.setting.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.setting.entity.SysLog;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* (SysLog)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 15:37:16
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysLogMapper extends BaseMapper<SysLog> {
|
||||
//插入数据库日志
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.fuint.business.setting.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.setting.entity.HardwareStore;
|
||||
|
||||
/**
|
||||
* 硬件商城(HardwareStore)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 17:30:39
|
||||
*/
|
||||
public interface HardwareStoreService extends IService<HardwareStore> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.fuint.business.setting.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.setting.entity.MessageTemplate;
|
||||
|
||||
/**
|
||||
* (MessageTemplate)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 14:58:57
|
||||
*/
|
||||
public interface MessageTemplateService extends IService<MessageTemplate> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.fuint.business.setting.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.setting.entity.SysLog;
|
||||
|
||||
/**
|
||||
* (SysLog)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 15:37:16
|
||||
*/
|
||||
public interface SysLogService extends IService<SysLog> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.fuint.business.setting.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.setting.mapper.HardwareStoreMapper;
|
||||
import com.fuint.business.setting.entity.HardwareStore;
|
||||
import com.fuint.business.setting.service.HardwareStoreService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 硬件商城(HardwareStore)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 17:30:39
|
||||
*/
|
||||
@Service("hardwareStoreService")
|
||||
public class HardwareStoreServiceImpl extends ServiceImpl<HardwareStoreMapper, HardwareStore> implements HardwareStoreService {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.fuint.business.setting.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.setting.mapper.MessageTemplateMapper;
|
||||
import com.fuint.business.setting.entity.MessageTemplate;
|
||||
import com.fuint.business.setting.service.MessageTemplateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (MessageTemplate)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 14:58:57
|
||||
*/
|
||||
@Service("messageTemplateService")
|
||||
public class MessageTemplateServiceImpl extends ServiceImpl<MessageTemplateMapper, MessageTemplate> implements MessageTemplateService {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.fuint.business.setting.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.setting.mapper.SysLogMapper;
|
||||
import com.fuint.business.setting.entity.SysLog;
|
||||
import com.fuint.business.setting.service.SysLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (SysLog)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-18 15:37:16
|
||||
*/
|
||||
@Service("sysLogService")
|
||||
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {
|
||||
|
||||
}
|
||||
|
@ -351,7 +351,17 @@ public class BackendStoreController extends BaseController {
|
||||
|
||||
// 中台首页店铺数量查询
|
||||
@GetMapping("/getStoreTotal")
|
||||
public ResponseObject getStoreTotal(LJStore store){
|
||||
public ResponseObject getStoreTotal(MtStore store){
|
||||
return getSuccessResult(storeService.getStoreTotal(store));
|
||||
}
|
||||
|
||||
/**
|
||||
* 中台首页多个店铺信息查询
|
||||
* @param store
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectStoreAmount")
|
||||
public ResponseObject selectStoreAmount(MtStore store){
|
||||
return getSuccessResult(storeService.selectStoreAmount(store));
|
||||
}
|
||||
}
|
||||
|
@ -50,5 +50,5 @@ public interface MtStoreMapper extends BaseMapper<MtStore> {
|
||||
List<MtStore> queryStoresByDeptIds(@Param("list") List<Long> deptIds);
|
||||
List<Long> queryStoresByDeptIdsR(@Param("list") List<Long> deptIds);
|
||||
|
||||
|
||||
List<MtStore> selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr);
|
||||
}
|
||||
|
@ -52,4 +52,29 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectStoreList" resultType="com.fuint.business.store.entity.MtStore">
|
||||
SELECT ms.* FROM mt_store ms
|
||||
LEFT JOIN sys_dept sd ON ms.contract_dept_id = sd.dept_id
|
||||
<where>
|
||||
sd.if_delete = 0 and ms.if_delete = 0
|
||||
<if test="ownDeptStr !=null and ownDeptStr !=''">
|
||||
and sd.ancestors like concat(#{ownDeptStr},'%')
|
||||
</if>
|
||||
<if test="storeVo.name !=null and storeVo.name !=''">
|
||||
and ms.name like concat('%',#{storeVo.name},'%')
|
||||
</if>
|
||||
<if test="storeVo.contractDeptId !=null and storeVo.contractDeptId !=''">
|
||||
and ms.contract_dept_id = #{storeVo.contractDeptId}
|
||||
</if>
|
||||
<if test="storeVo.status !=null and storeVo.status !=''">
|
||||
and ms.status = #{storeVo.status}
|
||||
</if>
|
||||
<if test="storeVo.params.beginTime != null and storeVo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(ms.create_time,'%y%m%d') >= date_format(#{storeVo.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="storeVo.params.endTime != null and storeVo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(ms.create_time,'%y%m%d') <= date_format(#{storeVo.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.store.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.store.vo.StoreAmount;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.common.dto.StoreDto;
|
||||
import com.fuint.framework.exception.BusinessCheckException;
|
||||
@ -117,7 +118,16 @@ public interface StoreService extends IService<MtStore> {
|
||||
|
||||
List<Map<Object,Object>> getByStroeName(MtStore storeName);
|
||||
|
||||
Map<String,Object> getStoreTotal(LJStore store);
|
||||
/**
|
||||
* 查询油站数量数据
|
||||
* @param store
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getStoreTotal(MtStore store);
|
||||
|
||||
List<Integer> getStoreIds(List<SysDeptVo> sysDeptVos);
|
||||
/**
|
||||
* 查询店铺信息
|
||||
* @return
|
||||
*/
|
||||
List<StoreAmount> selectStoreAmount(MtStore store);
|
||||
}
|
||||
|
@ -9,10 +9,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.service.AllOrderInfoService;
|
||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.business.store.vo.StoreAmount;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.dto.StoreDto;
|
||||
import com.fuint.common.enums.StatusEnum;
|
||||
@ -56,6 +59,7 @@ import java.math.BigDecimal;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@ -84,6 +88,15 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
*/
|
||||
@Autowired
|
||||
private MerchantService merchantService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private ISysDeptService deptService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private CardBalanceChangeService cardBalanceChangeService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private UserBalanceService userBalanceService;
|
||||
|
||||
/**
|
||||
* 分页查询店铺列表
|
||||
@ -617,12 +630,23 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getStoreTotal(LJStore store) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("if_delete","0");
|
||||
Integer allTotal = baseMapper.selectCount(queryWrapper);
|
||||
public Map<String, Object> getStoreTotal(MtStore store) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
List<MtStore> mtStores = baseMapper.selectStoreList(store, ancestors);
|
||||
Integer allTotal = mtStores.size();
|
||||
|
||||
List<Integer> storeIds = new ArrayList<>();
|
||||
for (MtStore mtStore : mtStores) {
|
||||
storeIds.add(mtStore.getId());
|
||||
}
|
||||
// 查询过去七天活跃的数据
|
||||
Map<String,String> map1 = new HashMap<>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@ -630,19 +654,26 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
calendar.add(Calendar.DATE, -7); // 减去7天
|
||||
Date sevenDaysAgo = calendar.getTime();
|
||||
String startTime = sdf.format(sevenDaysAgo);
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String endTime = dateFormat.format(new Date());
|
||||
map1.put("startTime",startTime);
|
||||
map1.put("endTime",endTime);
|
||||
Integer weekTotal = allOrderInfoService.selectStoreTotal(map1);
|
||||
Integer weekTotal = allOrderInfoService.selectStoreTotal(map1,storeIds);
|
||||
|
||||
// 查询过去一个月的数据
|
||||
LocalDate now1 = LocalDate.now();
|
||||
LocalDate sevenDaysAgo1 = now1.minusDays(30);
|
||||
QueryWrapper queryWrapperSevenDays1 = new QueryWrapper<>();
|
||||
queryWrapperSevenDays1.eq("if_delete","0");
|
||||
queryWrapperSevenDays1.ge("create_time", sevenDaysAgo1);
|
||||
Integer monthTotal = baseMapper.selectCount(queryWrapperSevenDays1);
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.add(Calendar.DATE, -30); // 减去7天
|
||||
Date sevenDaysAgo2 = calendar2.getTime();
|
||||
String startTime2 = sdf2.format(sevenDaysAgo2);
|
||||
DateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String endTime2 = dateFormat2.format(new Date());
|
||||
map2.put("beginTime",startTime2);
|
||||
map2.put("endTime",endTime2);
|
||||
store.setParams(map2);
|
||||
List<MtStore> mtStores1 = baseMapper.selectStoreList(store, ancestors);
|
||||
Integer monthTotal = mtStores1.size();
|
||||
|
||||
map.put("allTotal",allTotal);
|
||||
map.put("weekTotal",ObjectUtil.isNotEmpty(weekTotal) ? weekTotal : 0);
|
||||
@ -651,14 +682,58 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getStoreIds(List<SysDeptVo> sysDeptVos) {
|
||||
List<Integer> ids = new ArrayList<>();
|
||||
for (SysDeptVo sysDeptVo : sysDeptVos) {
|
||||
|
||||
public List<StoreAmount> selectStoreAmount(MtStore store) {
|
||||
List<StoreAmount> list = new ArrayList<>();
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
List<MtStore> mtStores = baseMapper.selectStoreList(new MtStore(), ancestors);
|
||||
for (MtStore mtStore : mtStores) {
|
||||
StoreAmount storeAmount = new StoreAmount();
|
||||
storeAmount.setStoreId(mtStore.getId());
|
||||
storeAmount.setStoreName(mtStore.getName());
|
||||
list.add(storeAmount);
|
||||
}
|
||||
Map<String, String> map1 = new HashMap<>();
|
||||
if (ObjectUtil.isNotEmpty(store.getParams()) && ObjectUtil.isNotEmpty(store.getParams().get("beginTime"))
|
||||
&& ObjectUtil.isNotEmpty(store.getParams().get("endTime"))) {
|
||||
map1.put("startTime", store.getParams().get("beginTime").toString());
|
||||
map1.put("endTime", store.getParams().get("endTime").toString());
|
||||
}
|
||||
|
||||
for (StoreAmount storeAmount : list) {
|
||||
List<String> types = new ArrayList<>();
|
||||
// 油品金额
|
||||
types.add("1");
|
||||
types.add("6");
|
||||
types.add("7");
|
||||
types.add("8");
|
||||
Double oilNum = allOrderInfoService.selectAmount(map1, storeAmount.getStoreId(), types);
|
||||
storeAmount.setOilAmount(oilNum);
|
||||
types = new ArrayList<>();
|
||||
// 非油品金额
|
||||
types.add("2");
|
||||
types.add("3");
|
||||
types.add("4");
|
||||
types.add("5");
|
||||
Double noOilNum = allOrderInfoService.selectAmount(map1, storeAmount.getStoreId(), types);
|
||||
storeAmount.setNoOilAmount(noOilNum);
|
||||
// 会员充值余额
|
||||
Double rechargeBalance = cardBalanceChangeService.selectAllAmount(map1, storeAmount.getStoreId(), "1");
|
||||
storeAmount.setUserRechargeBalance(rechargeBalance);
|
||||
// 会员消费余额
|
||||
Double consumeBalance = cardBalanceChangeService.selectAllAmount(map1, storeAmount.getStoreId(), "0");
|
||||
storeAmount.setUserConsumeBalance(consumeBalance);
|
||||
// 会员余额
|
||||
Double userBalance = userBalanceService.selectAllBalance(storeAmount.getStoreId());
|
||||
storeAmount.setUserBalance(userBalance);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// 将在部门里面删除的在油站中删除
|
||||
public void beachDelStore() {
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.fuint.business.store.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StoreAmount {
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String storeName;
|
||||
/**
|
||||
* 油品交易金额
|
||||
*/
|
||||
private Double oilAmount;
|
||||
/**
|
||||
* 非油品交易金额
|
||||
*/
|
||||
private Double NoOilAmount;
|
||||
/**
|
||||
* 用户充值余额
|
||||
*/
|
||||
private Double userRechargeBalance;
|
||||
/**
|
||||
* 用户消费余额
|
||||
*/
|
||||
private Double userConsumeBalance;
|
||||
/**
|
||||
* 用户余额
|
||||
*/
|
||||
private Double userBalance;
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package com.fuint.business.storeInformation.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.entity.QRCode;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.storeInformation.vo.LjStoreVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -114,6 +116,14 @@ public class LJStoreController extends BaseController {
|
||||
return getSuccessResult(b);
|
||||
}
|
||||
|
||||
@GetMapping("/selectListDept")
|
||||
public ResponseObject selectListDepts(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
LjStoreVo storeVo){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(storeService.selectListDepts(page,storeVo));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 修改等级规则信息
|
||||
// * @param map
|
||||
|
@ -1,10 +1,15 @@
|
||||
package com.fuint.business.storeInformation.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.vo.LjStoreVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 店铺表 mapper层
|
||||
*/
|
||||
public interface LJStoreMapper extends BaseMapper<LJStore> {
|
||||
IPage<LjStoreVo> selectListDepts(IPage page, @Param("storeVo") LjStoreVo storeVo,@Param("ownDeptStr") String ownDeptStr);
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
<?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.storeInformation.mapper.LJStoreMapper">
|
||||
<select id="selectListDepts" resultType="com.fuint.business.storeInformation.vo.LjStoreVo">
|
||||
SELECT ms.*,sd.dept_name,sd.leader_name,sd.leader_phone,sd.turnover_type,sd.turnover_limit,
|
||||
sd.turnover_start_time,sd.turnover_end_time,sd.rates,sd.prepaid_amount,sd.create_time deptCreateTime,sd.store_num
|
||||
FROM mt_store ms
|
||||
LEFT JOIN sys_dept sd ON ms.contract_dept_id = sd.dept_id
|
||||
<where>
|
||||
sd.if_delete = 0 and ms.if_delete = 0
|
||||
<if test="ownDeptStr !=null and ownDeptStr !=''">
|
||||
and sd.ancestors like concat(#{ownDeptStr},'%')
|
||||
</if>
|
||||
<if test="storeVo.name !=null and storeVo.name !=''">
|
||||
and ms.name like concat('%',#{storeVo.name},'%')
|
||||
</if>
|
||||
<if test="storeVo.contractDeptId !=null and storeVo.contractDeptId !=''">
|
||||
and ms.contract_dept_id = #{storeVo.contractDeptId}
|
||||
</if>
|
||||
<if test="storeVo.status !=null and storeVo.status !=''">
|
||||
and ms.status = #{storeVo.status}
|
||||
</if>
|
||||
<if test="storeVo.turnoverType !=null and storeVo.turnoverType !=''">
|
||||
and sd.turnover_type = #{storeVo.turnoverType}
|
||||
</if>
|
||||
<if test="storeVo.params.beginTime != null and storeVo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(ms.create_time,'%y%m%d') >= date_format(#{storeVo.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="storeVo.params.endTime != null and storeVo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(ms.create_time,'%y%m%d') <= date_format(#{storeVo.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by ms.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@ -1,8 +1,11 @@
|
||||
package com.fuint.business.storeInformation.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.vo.LjStoreVo;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -81,4 +84,12 @@ public interface ILJStoreService extends IService<LJStore> {
|
||||
boolean ifDeleteByDeptId(Long deptId);
|
||||
|
||||
boolean ifRefPass(String refPass);
|
||||
|
||||
/**
|
||||
* 查询店铺机构信息
|
||||
* @param page
|
||||
* @param storeVo
|
||||
* @return
|
||||
*/
|
||||
IPage<LjStoreVo> selectListDepts(IPage page, LjStoreVo storeVo);
|
||||
}
|
||||
|
@ -3,25 +3,35 @@ package com.fuint.business.storeInformation.service.impl;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.service.AllOrderInfoService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNumberService;
|
||||
import com.fuint.business.petrolStationManagement.vo.OilNumberNameVo;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.mapper.LJStoreMapper;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.storeInformation.vo.LjStoreVo;
|
||||
import com.fuint.business.userManager.entity.ChainStoreConfig;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.service.ChainStoreConfigService;
|
||||
import com.fuint.business.userManager.service.LJUserService;
|
||||
import com.fuint.business.userManager.service.UserBalanceService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.system.dept.entity.SysDept;
|
||||
import com.fuint.system.dept.service.ISysDeptService;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@ -33,6 +43,16 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
||||
@Lazy
|
||||
private UserBalanceService userBalanceService;
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private LJUserService userService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private ISysDeptService deptService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private AllOrderInfoService allOrderInfoService;
|
||||
|
||||
/**
|
||||
* 根据id查询店铺信息
|
||||
* @return
|
||||
@ -299,4 +319,61 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<LjStoreVo> selectListDepts(IPage page, LjStoreVo storeVo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
|
||||
}
|
||||
IPage<LjStoreVo> ljStoreVoIPage = baseMapper.selectListDepts(page, storeVo,ancestors);
|
||||
for (LjStoreVo record : ljStoreVoIPage.getRecords()) {
|
||||
record.setUserTotal(userService.selectUserCountByChainStoreId(record.getChainStoreId()));
|
||||
if (ObjectUtil.isNotEmpty(record.getTurnoverType()) && record.getTurnoverType().equals("1")){
|
||||
// 无限制
|
||||
LocalDate givenDate = record.getDeptCreateTime().toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
long daysBetween = ChronoUnit.DAYS.between(givenDate, currentDate);
|
||||
record.setRemind("以免费使用系统"+daysBetween+"天");
|
||||
} else if (ObjectUtil.isNotEmpty(record.getTurnoverType()) && record.getTurnoverType().equals("2")) {
|
||||
// 时间限制
|
||||
LocalDate givenDate = record.getTurnoverEndTime().toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
long daysBetween = ChronoUnit.DAYS.between( currentDate,givenDate);
|
||||
record.setRemind("距系统到期还有"+daysBetween+"天");
|
||||
} else if (ObjectUtil.isNotEmpty(record.getTurnoverType()) && record.getTurnoverType().equals("3")) {
|
||||
// 预付费
|
||||
AllOrderInfo allOrderInfo = new AllOrderInfo();
|
||||
allOrderInfo.setStoreId(record.getId());
|
||||
allOrderInfo.setStatus("paid");
|
||||
String amount = allOrderInfoService.sumPayMoney(allOrderInfo);
|
||||
Double residue = Double.valueOf(record.getTurnoverLimit()) - Double.valueOf(amount)/10000;
|
||||
record.setRemind("还剩余"+residue+"万交易流量");
|
||||
} else if (ObjectUtil.isNotEmpty(record.getTurnoverType()) && record.getTurnoverType().equals("4")) {
|
||||
// 后付费
|
||||
record.setRemind("系统服务费待付"+record.getPrepaidAmount()+"元");
|
||||
} else if (ObjectUtil.isNotEmpty(record.getTurnoverType()) && record.getTurnoverType().equals("5")) {
|
||||
// 年付费
|
||||
LocalDate givenDate = record.getTurnoverEndTime().toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
long daysBetween = ChronoUnit.DAYS.between(currentDate,givenDate);
|
||||
record.setRemind("距系统到期还有"+daysBetween+"天");
|
||||
} else if (ObjectUtil.isNotEmpty(record.getTurnoverType()) && record.getTurnoverType().equals("6")) {
|
||||
// 可创建油站站点数量
|
||||
record.setRemind("可创建油站站点数量为"+record.getStoreNum()+"个");
|
||||
}
|
||||
}
|
||||
return ljStoreVoIPage;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
package com.fuint.business.storeInformation.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class LjStoreVo extends LJStore {
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String leaderName;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String leaderPhone;
|
||||
/**
|
||||
* 设置流水类型
|
||||
* 1:无限制
|
||||
* 2:时间限制
|
||||
* 3:预付费
|
||||
* 4:后付费
|
||||
* 5:年付费
|
||||
* 6:可创建油站站点数量
|
||||
*/
|
||||
private String turnoverType;
|
||||
/**
|
||||
* 流水(可用于预付费和后付费 预付费时用于可跑流量,后付费用实际交易)
|
||||
*/
|
||||
private String turnoverLimit;
|
||||
/**
|
||||
*创建时间
|
||||
*/
|
||||
private Date deptCreateTime;
|
||||
/**
|
||||
*开始时间设置
|
||||
*/
|
||||
private Date turnoverStartTime;
|
||||
/**
|
||||
*结束时间设置
|
||||
*/
|
||||
private Date turnoverEndTime;
|
||||
/**
|
||||
*费率
|
||||
*/
|
||||
private Double rates;
|
||||
/**
|
||||
*油站数
|
||||
*/
|
||||
private Integer storeNum;
|
||||
/**
|
||||
* 预付金额(可用于预付费和后付费 预付费时用于预付金额,后付费用于系统服务费,年付费的总价)
|
||||
*/
|
||||
private Double prepaidAmount;
|
||||
/**
|
||||
* 会员人数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer userTotal;
|
||||
/**
|
||||
* 到期提醒
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String remind;
|
||||
}
|
@ -95,4 +95,10 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
||||
|
||||
List<LJUserVo> getUserCountList(LJUserVo user);
|
||||
|
||||
/**
|
||||
* 根据连锁店id查询会员人数
|
||||
* @param chainStoreId
|
||||
* @return
|
||||
*/
|
||||
Integer selectUserCountByChainStoreId(@Param("chainStoreId") Integer chainStoreId);
|
||||
}
|
||||
|
@ -343,4 +343,11 @@
|
||||
mi.storeId = #{storeId}
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectUserCountByChainStoreId" resultType="java.lang.Integer"
|
||||
parameterType="java.lang.Integer">
|
||||
SELECT count(*) FROM mt_user mu LEFT JOIN mt_user_balance mub ON mub.mt_user_id = mu.id
|
||||
<where>
|
||||
mub.chain_store_id = #{chainStoreId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -178,4 +178,11 @@ public interface LJUserService extends IService<LJUser> {
|
||||
* @return
|
||||
*/
|
||||
LJUser selectUserByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 根据连锁店id查询会员人数
|
||||
* @param chainStoreId
|
||||
* @return
|
||||
*/
|
||||
Integer selectUserCountByChainStoreId(Integer chainStoreId);
|
||||
}
|
||||
|
@ -75,4 +75,5 @@ public interface UserBalanceService extends IService<UserBalance> {
|
||||
|
||||
int addUserBalance(Integer userId, Integer chainStoreId, Double changeBalance);
|
||||
|
||||
Double selectAllBalance(Integer storeId);
|
||||
}
|
||||
|
@ -614,4 +614,9 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
queryWrapper.eq("user_id",userId);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectUserCountByChainStoreId(Integer chainStoreId) {
|
||||
return baseMapper.selectUserCountByChainStoreId(chainStoreId);
|
||||
}
|
||||
}
|
||||
|
@ -174,6 +174,20 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
return baseMapper.addUserBalance(userBalance.getId(), changeBalance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectAllBalance(Integer storeId) {
|
||||
LJStore ljStore = storeService.queryStoreById(storeId);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("chain_store_id",ljStore.getChainStoreId());
|
||||
queryWrapper.select("SUM(card_balance) as cardBalance");
|
||||
UserBalance userBalance = baseMapper.selectOne(queryWrapper);
|
||||
Double cardBalance = 0.0;
|
||||
if (ObjectUtil.isNotEmpty(userBalance) && ObjectUtil.isNotEmpty(userBalance.getCardBalance())){
|
||||
cardBalance = userBalance.getCardBalance();
|
||||
}
|
||||
return cardBalance;
|
||||
}
|
||||
|
||||
@Resource
|
||||
RedisLock redisLock;
|
||||
|
||||
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectDictDataByType" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = 'qy' and dict_type = #{dictType} order by dict_sort asc
|
||||
where dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
|
@ -3,7 +3,7 @@ server.port=8081
|
||||
env.profile=dev
|
||||
|
||||
#env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=D:/code/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=F:/work/oilSystem/fuintBackend/configure/
|
||||
|
||||
|
||||
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
|
||||
|
@ -227,7 +227,7 @@
|
||||
<version>1.4.19</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mvn install:install-file -DgroupId=yly_sdk -DartifactId=yly_sdk -Dversion=2.2 -Dpackaging=jar -Dfile=D:\office\proj\oilSystem\fuintBackend\lib\yly_sdk_2.2.jar-->
|
||||
<!-- mvn install:install-file -DgroupId=yly_sdk -DartifactId=yly_sdk -Dversion=2.2 -Dpackaging=jar -Dfile=F:\work\oilSystem\fuintBackend\lib\yly_sdk_2.2.jar-->
|
||||
|
||||
<dependency>
|
||||
<groupId>yly_sdk</groupId>
|
||||
|
@ -23,7 +23,7 @@ const mutations = {
|
||||
}
|
||||
|
||||
const actions = {
|
||||
// 修改布局设置
|
||||
// 修改
|
||||
changeSetting({ commit }, data) {
|
||||
commit('CHANGE_SETTING', data)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user