no message

This commit is contained in:
DESKTOP-369JRHT\12997 2024-07-27 16:13:58 +08:00
parent c95bb0e869
commit 71eb36e1a4
24 changed files with 544 additions and 266 deletions

View File

@ -163,6 +163,14 @@ export function getFenxiByDailiTypeApi(query) {
})
}
export function getFenxiByDailiTypeByDataApi(query) {
return request({
url: 'business/allOrderInfo/getFenxiByDailiTypeBydata',
method: 'get',
params: query
})
}
export function getFenxiByDailgetFenxiByDailiTypeiByDataApi(query) {
return request({
url: 'business/allOrderInfo/getFenxiByDailiBydata',

View File

@ -23,6 +23,13 @@ export function selectyDutyIdsApi(query) {
params: query
})
}
export function getByRoleIdApi(query) {
return request({
url: '/backendApi/account/getByRoleId',
method: 'get',
params: query
})
}
// 根据id删除角色信息
export function dutyDelete(id) {

View File

@ -1,8 +1,13 @@
<template>
<div class="app-container">
<el-row>
<div class="app-container" style="padding: 0px">
<div class="tab-box">
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index,handleClick1" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
</div>
<el-row style="padding: 20px">
<el-col :span="6">
<el-card style="margin-right: 20px">
<el-card style="margin-right: 5px">
<div class="left-box">
<div class="title-h">组织架构</div>
@ -32,179 +37,161 @@
<el-col :span="18">
<el-card style="margin-bottom: 20px;">
<el-tabs v-model="activeName" @tab-click="handleClick">
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
<!-- 用户信息 -->
<el-tab-pane label="用户信息" name="list">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="" prop="accountName">
<el-input
v-model="queryParams.accountName"
placeholder="用户名"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="accountName">
<el-input
v-model="queryParams.realName"
placeholder="真实姓名"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="accountStatus">
<el-select
v-model="queryParams.deptId"
placeholder="所属机构"
clearable
style="width: 240px"
>
<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="" prop="accountStatus">
<el-select
v-model="queryParams.accountStatus"
placeholder="用户状态"
clearable
style="width: 240px"
>
<el-option key="1" label="启用" value="1"/>
<el-option key="0" label="禁用" value="0"/>
</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-form-item>-->
<!-- </el-form>-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button
type="warning"
size="mini"
@click="handleAdd"
v-hasPermi="['user:add']"
>新增用户
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- >新增用户-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-card>-->
<!-- <el-card >-->
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
<el-table-column label="用户角色" align="center" key="roleName" prop="roleName" />
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
<template slot-scope="scope">
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" key="accountStatus" v-if="columns[2].visible">
<template slot-scope="scope">
<el-switch
v-model="scope.row.accountStatus"
:active-value="1"
:inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createDate" v-if="columns[3].visible" width="160">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="200px"
class-name="small-padding fixed-width"
<!-- <el-tab-pane label="用户信息" name="list">-->
<template v-if="activeindex == 1">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="" prop="accountName111">
<el-input
v-model="queryParams.accountName"
placeholder="用户名"
clearable
style="width: 180px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="accountName111">
<el-input
v-model="queryParams.realName"
placeholder="真实姓名"
clearable
style="width: 180px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="accountStatus111">
<el-select
v-model="queryParams.deptId"
placeholder="所属机构"
clearable
style="width: 180px"
>
<!-- v-hasPermi="['system:account:edit']" -->
<!-- v-hasPermi="['system:account:delete']" -->
<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="" prop="accountStatus">
<el-select
v-model="queryParams.accountStatus"
placeholder="用户状态"
clearable
style="width: 180px"
>
<el-option key="1" label="启用" value="1"/>
<el-option key="0" label="禁用" value="0"/>
</el-select>
</el-form-item>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['user:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['user:delete']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="handleResetPwd(scope.row)"
v-hasPermi="['user:delete']"
>重置密码</el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" >-->
<!-- <span class="el-dropdown-link" v-hasPermi="['user:password']">-->
<!-- <i class="el-icon-d-arrow-right el-icon&#45;&#45;right"></i>更多-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['user:password']"-->
<!-- >重置密码</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
<!-- <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-form-item>-->
<!-- </el-form>-->
<el-form-item style="float: right; margin-right: 0px">
<el-button type="primary" icon="el-icon-search" size="" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="" @click="resetQuery">重置</el-button>
<el-button
type="warning"
size=""
@click="handleAdd"
v-hasPermi="['user:add']"
>新增用户
</el-button>
</el-form-item>
</el-form>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
<el-table-column label="用户角色" align="center" key="roleName" prop="roleName" />
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
<template slot-scope="scope">
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" key="accountStatus" v-if="columns[2].visible">
<template slot-scope="scope">
<el-switch
v-model="scope.row.accountStatus"
:active-value="1"
:inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createDate" v-if="columns[3].visible" width="160">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="200px"
class-name="small-padding fixed-width"
>
<!-- v-hasPermi="['system:account:edit']" -->
<!-- v-hasPermi="['system:account:delete']" -->
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['user:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['user:delete']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="handleResetPwd(scope.row)"
v-hasPermi="['user:delete']"
>重置密码</el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" >-->
<!-- <span class="el-dropdown-link" v-hasPermi="['user:password']">-->
<!-- <i class="el-icon-d-arrow-right el-icon&#45;&#45;right"></i>更多-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['user:password']"-->
<!-- >重置密码</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- tab第一张-->
</el-tab-pane>
</template>
<!-- </el-tab-pane>-->
<!-- 机构信息 -->
<el-tab-pane label="机构信息" name="info">
<!-- <el-tab-pane label="机构信息" name="info">-->
<template v-if="activeindex == 0">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
<el-form-item label="父级节点" prop="name" v-if="ruleForm.parentId != 0">
<el-cascader :disabled="isTopDept" :options="Thetree" disabled style="width: 300px"
v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
@ -508,13 +495,14 @@
</template>
</el-form>
</el-tab-pane>
</template>
<!-- </el-tab-pane>-->
<!-- 角色信息 -->
<el-tab-pane label="角色信息" name="duty">
<!-- <el-tab-pane label="角色信息" name="duty">-->
<template v-if="activeindex == 2">
<el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="" prop="dutyName">
<el-form-item label="" prop="dutyName11">
<el-input
v-model="queryParams1.dutyName"
placeholder="角色名称"
@ -522,7 +510,7 @@
@keyup.enter.native="handleQuery1"
/>
</el-form-item>
<el-form-item label="" prop="status">
<el-form-item label="" prop="status11">
<el-select
v-model="queryParams1.status"
placeholder="角色状态"
@ -532,7 +520,7 @@
<el-option label="禁用" value="D"></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="accountStatus">
<el-form-item label="" prop="accountStatus11">
<el-select
v-model="queryParams1.deptId"
placeholder="所属机构"
@ -547,28 +535,29 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item style="float: right">
<el-form-item style="float: right;margin-right: 0px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">查询</el-button>
<el-button icon="el-icon-refresh" @click="reset2">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
size="mini"
v-hasPermi="['role:add']"
@click="handleAdd1"
>新增角色
</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
</el-col>
</el-row>
<el-table ref="tables"
v-loading="loading"
border
:data="dutyList">
<el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
<el-table-column label="角色名称" align="center" prop="dutyName" />
@ -627,10 +616,10 @@
:limit.sync="queryParams1.pageSize"
@pagination="getDutyList"
/>
</template>
<!-- </el-tab-pane>-->
</el-tab-pane>
</el-tabs>
<!-- </el-tabs>-->
</el-card>
</el-col>
</el-row>
@ -1096,8 +1085,21 @@ export default {
trigger: "blur"
}
],
oldValue:''
}
oldValue:'',
},
activeindex:0,
tablist:[
{
name:'机构信息',
},
{
name:'用户信息',
},
{
name:'角色信息',
},
]
};
},
watch: {
@ -1127,9 +1129,25 @@ export default {
this.getList();
this.selectChildByDeptIdApi();
console.log("activeName",this.$route.query.activeName)
if (this.$route.query.activeName){
this.activeName = this.$route.query.activeName
if (this.activeName == 'list'){
this.activeindex = 0
}
if (this.activeName == 'info'){
this.activeindex = 1
}
if (this.activeName == 'duty'){
this.activeindex = 2
}
this.handleClick()
this.handleClick1()
}else {
this.activeindex = 0
this.handleClick1()
}
if (this.$route.fullPath) {
@ -1384,6 +1402,7 @@ export default {
//
initPage() {
this.activeName= 'list',
this.activeindex= 0,
this.userList= 'list',
// this.cleanUp()
this.getList()
@ -1563,6 +1582,15 @@ export default {
this.getDutyList()
}
},
handleClick1() {
console.log("1",this.activeName)
if (this.activeindex== 0){
this.onlyGetUser()
}
if (this.activeindex== 3){
this.getDutyList()
}
},
//
//
append(data) {
@ -1570,6 +1598,7 @@ export default {
//
this.cleanRuleForm()
this.activeName = 'info'
this.activeindex = 1
this.pdinfo = 1
this.timeFrame = []
this.beginTime = ""
@ -2174,5 +2203,29 @@ export default {
margin-right: 10px;
}
.tab-box{
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;
padding: 0px 50px;
}
.f-box{
height: 40px;
color: #999999;
margin-right: 50px;
display: flex;
align-items: center;
}
.active{
color: #FF9655 !important;
border-bottom: 2px solid #FF9655 !important;
}
.tabder-box{
width: 85%;
}
</style>

View File

@ -42,19 +42,19 @@
<div class="wrap-boxs">
<div class="k_" id="k_1">
<div class="size_" style="margin-bottom: 0px">活跃油站汇总总数/合作油站汇总总数</div>
<div class="title_">{{ orderStatistics.sumnum }}/0</div>
<div class="title_">{{ orderStatistics.storeId?orderStatistics.storeId:0 }}/{{orderStatistics.sumOil}}</div>
</div>
<div class="k_" id="k_2">
<div class="size_" style="margin-bottom: 0px">交易金额汇总数万元/交易笔数</div>
<div class="title_">{{ orderStatistics.tongjMoney }}</div>
<div class="title_">{{ orderStatistics.payMoney?orderStatistics.payMoney:0 }}/{{orderStatistics.count}}</div>
</div>
<div class="k_" id="k_3">
<div class="size_">退款金额/退款笔数</div>
<div class="title_">{{ orderStatistics.tongjXfMoney }}</div>
<div class="title_">{{ orderStatistics.refMoney?orderStatistics.refMoney:0 }}/{{orderStatistics.refCount}}</div>
</div>
<div class="k_" id="k_4">
<div class="size_">新增油站数万元</div>
<div class="title_">0</div>
<div class="size_">新增油站数</div>
<div class="title_">{{ orderStatistics.storeId?orderStatistics.storeId:0 }}</div>
</div>
</div>
</el-card>
@ -93,8 +93,8 @@
<script>
import {
exportExcelTradingApi, getFenxiByDailiTypeApi,
import {
exportExcelTradingApi, getFenxiByDailiTypeApi, getFenxiByDailiTypeByDataApi,
getRunningWaterByTissueApi,
getTissueByDataApi,
getTradingPageApi
@ -146,10 +146,13 @@ export default {
deptId: "",
},
orderStatistics: {
sumnum: '', //
balanceSum: '', //
tongjMoney: '', //
tongjXfMoney: '', //
count:'0',
payMoney:'0',
refCount:'0',
refMoney:'0',
storeId:'0',
sumOil:'0',
sumOil2:'0',
},
total: 0,
}
@ -223,7 +226,8 @@ export default {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getFenXiUserbalanceDataApi(this.addDateRange(this.queryParams, this.value2)).then(res => {
// getFenXiUserbalanceDataApi
getFenxiByDailiTypeByDataApi(this.addDateRange(this.queryParams, this.value2)).then(res => {
this.orderStatistics = res.data
console.log("res.data1111", res.data)
})

View File

@ -1,11 +1,17 @@
<template>
<div class="app-container">
<div class="app-container" style="padding: 0px">
<el-card >
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="中台系统" name="first"></el-tab-pane>
<el-tab-pane label="油站系统" name="second"></el-tab-pane>
</el-tabs>
<div class="tab-box">
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index,handleClick2()" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
</div>
<el-card style="margin: 20px">
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
<!-- <el-tab-pane label="中台系统" name="first"></el-tab-pane>-->
<!-- <el-tab-pane label="油站系统" name="second"></el-tab-pane>-->
<!-- </el-tabs>-->
@ -154,6 +160,18 @@ export default {
dicts: ['hardware_type','hardware_status'],
data() {
return {
activeindex:0,
tablist:[
{
name:'中台系统',
},
{
name:'油站系统',
},
],
tableData: [],
activeName:'first',
form: {
@ -229,6 +247,16 @@ export default {
}
this.getList()
},
handleClick2() {
console.log("111111111111111")
if (this.activeindex == 0){
this.queryParams.systemName ='1'
}else {
this.queryParams.systemName ='2'
}
this.getList()
},
getList(){
getListApi(this.queryParams).then(res=>{
@ -369,5 +397,28 @@ export default {
width: 98px;
height: 98px;
}
.tabder-box{
width: 85%;
}
.tab-box{
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;
padding: 0px 50px;
}
.f-box{
height: 40px;
color: #999999;
margin-right: 50px;
display: flex;
align-items: center;
}
.active{
color: #FF9655 !important;
border-bottom: 2px solid #FF9655 !important;
}
</style>

View File

@ -56,7 +56,7 @@ export default {
background: #F4F5F9;
height: 100vh;
box-sizing: border-box;
padding: 20px;
//padding: 20px;
}
.tabder-box{
width: 85%;

View File

@ -45,25 +45,25 @@
>新增通知模板</el-button>
</el-form-item>
</el-form>
</el-card>
<!-- 列表信息-->
<el-card style="margin-top: 20px" >
<el-table :data="tableData" style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="notificationName" label="通知名称"></el-table-column>
<el-table-column prop="notificationType" label="通知类型"></el-table-column>
<el-table-column prop="templateContent" label="模板内容"></el-table-column>
<el-table-column prop="recipientRolesName" label="接收角色">
<!-- </el-card>-->
<!-- &lt;!&ndash; 列表信息&ndash;&gt;-->
<!-- <el-card style="margin-top: 20px" >-->
<el-table :data="tableData" style="width: 100%" border>
<el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column align="center" prop="notificationName" label="通知名称"></el-table-column>
<el-table-column align="center" prop="notificationType" label="通知类型"></el-table-column>
<el-table-column align="center" prop="templateContent" label="模板内容"></el-table-column>
<el-table-column align="center" prop="recipientRolesName" label="接收角色">
</el-table-column>
<el-table-column prop="templateStatus" label="模板状态">
<el-table-column align="center" prop="templateStatus" label="模板状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.templateStatus" @change="clickSwitch(scope.row)" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</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">
<el-table-column align="center" prop="createName" label="创建人"></el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
<el-table-column align="center" label="操作" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -181,6 +181,7 @@ export default {
recipientRoles: [],
dutyList: [],
templateStatus: true,
type: 0,
conditions: [
{ field: '', operator: '', value: '' }
]

View File

@ -45,22 +45,21 @@
>新增通知</el-button>
</el-form-item>
</el-form>
</el-card>
<!-- -->
<!-- 列表信息-->
<el-card style="margin-top: 20px" >
<el-table :data="tableData" style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="notificationName" label="通知名称"></el-table-column>
<el-table-column prop="notificationType" label="通知类型"></el-table-column>
<el-table-column prop="templateContent" label="通知内容"></el-table-column>
<el-table-column prop="recipientRolesName" label="接收角色"></el-table-column>
<el-table-column prop="sendStatus" label="通知状态"></el-table-column>
<el-table-column prop="createByName" label="创建人"></el-table-column>
<el-table-column prop="createTime" 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">
<!-- </el-card>-->
<!-- &lt;!&ndash; &ndash;&gt;-->
<!-- &lt;!&ndash; 列表信息&ndash;&gt;-->
<!-- <el-card style="margin-top: 20px" >-->
<el-table :data="tableData" style="width: 100%" border>
<el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column align="center" prop="notificationName" label="通知名称"></el-table-column>
<el-table-column align="center" prop="notificationType" label="通知类型"></el-table-column>
<el-table-column align="center" prop="templateContent" label="通知内容"></el-table-column>
<el-table-column align="center" prop="recipientRolesName" label="接收角色"></el-table-column>
<el-table-column align="center" prop="sendStatus" label="通知状态"></el-table-column>
<el-table-column align="center" prop="createByName" label="创建人"></el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
<el-table-column align="center" 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"
@ -119,13 +118,13 @@
<!-- 接收角色 -->
<el-form-item label="接收角色" :required="true">
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色">
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" @change="getUserByRoles">
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="接收用户" :required="true">
<div style="border: 1px solid #DCDFE6;;width: 100%;height: 100px; border-radius: 4px;">
<div @click="clickAdd" style=" display: flex;margin: 10px">
<div style="border: 1px solid #DCDFE6;width: 100%;height: 100px; border-radius: 4px; flex-wrap: wrap;overflow-y: scroll;">
<div @click="clickAdd" style=" display: flex;margin: 10px;">
<div style="height: 32px;display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */ ">
@ -177,9 +176,9 @@
import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/app";
import {listUser} from "@/api/system/Site/site";
import {dutyList} from "@/api/duty/duty";
import {dutyList, getByRoleIdApi} from "@/api/duty/duty";
import {getNotificationlogList, saveSysNotificationApi, updateSysNotificationApi} from "@/api/sys/sysNotificationlog";
import {getSendNotifyApi, getSysNotifyList} from "@/api/sys/sysNotify";
import {getSendNotifyApi, getSysNotifyList, saveSysNotifyApi, updateSysNotifyApi} from "@/api/sys/sysNotify";
export default {
name: "notify-record",
@ -193,7 +192,6 @@ export default {
templateContent: '',
recipientRoles: [],
templateStatus: true,
// conditions: [
// { field: '', operator: '', value: '' }
// ],
@ -261,6 +259,26 @@ export default {
})
},
getUserByRoles() {
if (this.form.recipientRoles.length === 0) {
this.form.recipientRoles = []
return
}
console.log("123",this.form.recipientRoles)
this.form.recipientUser = []
let ids = this.form.recipientRoles.join(',')
getByRoleIdApi({roleIds:ids}).then(res=>{
const getUsertList = res.data;
// recipientUser
this.form.recipientUser = []
getUsertList.forEach(item => {
this.form.recipientUser.push({
id: item.acctId,
userName: item.accountName,
})
})
})
},
handleQuery(){
this.getList()
@ -283,18 +301,17 @@ export default {
userEnter1(){
//
console.log('提交设备信息数据:', this.form);
JSON.stringify(this.form.recipientUser)
this.form.recipientUser = JSON.stringify(this.form.recipientUser)
this.form.recipientRoles = JSON.stringify(this.form.recipientRoles)
if (this.form.id) {
updateSysNotificationApi(this.form).then(res=>{
updateSysNotifyApi(this.form).then(res=>{
if(res.code === 200) {
this.getList()
this.open = false
}
})
}else {
saveSysNotificationApi(this.form).then(res=>{
saveSysNotifyApi(this.form).then(res=>{
if(res.code === 200) {
this.getList()
this.open = false
@ -311,6 +328,7 @@ export default {
this.title = "编辑设备"
this.form = e
this.form.recipientUser = JSON.parse(this.form.recipientUser)
this.form.recipientRoles = JSON.parse(this.form.recipientRoles)
this.getDutyList()
console.log('提交设备信息数据:', this.deviceInfo);

View File

@ -259,6 +259,11 @@ public class AllOrderInfoController extends BaseController {
IPage<AllOrderInfoVo> list = allOrderInfoService.getFenxiByDailiType(page, allOrderInfo);
return getSuccessResult(list);
}
@GetMapping("/getFenxiByDailiTypeBydata")
public ResponseObject getFenxiByDailiTypeBydata(AllOrderInfoVo allOrderInfo){
return getSuccessResult(allOrderInfoService.getFenxiByDailiTypeBydata(allOrderInfo));
}
@GetMapping("/getFenxiByDailiBydata")
public ResponseObject getFenxiByDailiBydata(AllOrderInfoVo allOrderInfo){
return getSuccessResult(allOrderInfoService.getFenxiByDailiBydata(allOrderInfo));

View File

@ -26,6 +26,8 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
IPage<AllOrderInfoVo> getFenxiByDailiType(@Param("page") Page page, @Param("order") AllOrderInfo allOrderInfo);
List<allorderVOo> getFenxiByDaili2(@Param("allOrderInfo") AllOrderInfo allOrderInfo);
Map<String, Object> getFenxiByDailiBydata(@Param("order") AllOrderInfo allOrderInfo);
Map<String, Object> getFenxiByDailiTypeBydata(@Param("order") AllOrderInfo allOrderInfo);
List<AllOrderInfoVo> getFenxiByDaili2ByData(@Param("order") AllOrderInfo allOrderInfo);
String sumPayMoney(@Param("allOrderInfo") AllOrderInfo allOrderInfo);

View File

@ -628,6 +628,29 @@
from all_order_info
group by store_id
</select>
<select id="getFenxiByDailiTypeBydata" resultType="java.util.Map">
SELECT
count(distinct store_id) storeId,
SUM(pay_money) payMoney,
count(*) count,
sum(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) refMoney,
count(CASE WHEN status = 'refund' THEN pay_money ELSE 0 END) refCount
from all_order_info
<where>
<if test="order.storeIds != null">
store_id in
<foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
</select>
<!-- SUM(CASE WHEN transaction_type = 'sale' THEN amount ELSE 0 END) AS total_sales-->
<!-- COUNT(CASE WHEN pay_type = 'WECHAT' THEN 0 END) AS wechat, &#45;&#45; 微信-->

View File

@ -30,6 +30,7 @@ public interface AllOrderInfoService {
IPage<AllOrderInfoVo> getFenxiByDaili(Page page, AllOrderInfo allOrderInfo);
IPage<AllOrderInfoVo> getFenxiByDailiType(Page page, AllOrderInfo allOrderInfo);
Map<String, Object> getFenxiByDailiTypeBydata(AllOrderInfo allOrderInfo);
Map<String, Object> getFenxiByDailiBydata(AllOrderInfo allOrderInfo);
/**
* 统计总的金额

View File

@ -51,6 +51,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yaml.snakeyaml.reader.StreamReader;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@ -176,6 +177,24 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
return fenxiByDaili;
}
// getFenxiByDailiBydata
@Override
public Map<String, Object> getFenxiByDailiTypeBydata(AllOrderInfo allOrderInfo) {
if (ObjectUtil.isEmpty(allOrderInfo.getDeptId())) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
allOrderInfo.setDeptId(nowAccountInfo.getDeptId());
}
List<Long> strings = sysDeptMapper.selectChildByDeptIdR(allOrderInfo.getDeptId());
List<Long> longs = mtStoreMapper.queryStoresByDeptIdsR(strings);
allOrderInfo.setStoreIds(longs);
Map<String, Object> fenxiByDailiTypeBydata = allOrderInfoMapper.getFenxiByDailiTypeBydata(allOrderInfo);
SysDept sysDept = sysDeptMapper.selectOilNum(allOrderInfo.getDeptId());
SysDept sysDept2 = sysDeptMapper.selectOilNum2(allOrderInfo);
fenxiByDailiTypeBydata.put("sumOil",sysDept.getValidNum());
fenxiByDailiTypeBydata.put("sumOil2",sysDept2.getValidNum());
return fenxiByDailiTypeBydata;
}
@Override
public Map<String, Object> getFenxiByDailiBydata(AllOrderInfo allOrderInfo) {
if (ObjectUtil.isEmpty(allOrderInfo.getDeptId())) {

View File

@ -14,6 +14,7 @@ import io.lettuce.core.dynamic.annotation.Param;
import javax.annotation.Resource;
import java.util.List;
/**
* 存储通知信息的表(SysNotify)表控制层
@ -119,5 +120,6 @@ public class SysNotifyController extends BaseController {
return getSuccessResult(this.sysNotifyService.deleteById(id));
}
}

View File

@ -40,6 +40,7 @@ public class SysNotify extends BaseEntity {
* 接收角色字符长度最多255不能为空
*/
private String recipientRoles;
private String recipientUser;
@TableField(exist = false)
private String recipientRolesName;
@TableField(exist = false)

View File

@ -3,6 +3,8 @@ package com.fuint.business.sys.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -247,24 +249,49 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
private TAccountMapper tAccountMapper;
public void sendNotifyOne(Integer id) {
SysNotify sysNotify = baseMapper.queryById(id);
String recipientRoles = sysNotify.getRecipientRoles();
String[] array = recipientRoles.split("[\\[\\], ]");
// 根据dutyId查询员工id
List<TAccount> accountByRolsIds = tAccountMapper.getAccountByRolsIds(Arrays.asList(array));
for (TAccount account : accountByRolsIds) {
// 发送通知
SysNotificationlog sysNotificationlog = new SysNotificationlog();
sysNotificationlog.setNotifyId(sysNotify.getId());
sysNotificationlog.setSentTo(account.getAcctId().toString());
sysNotificationlog.setDeptId(account.getDeptId());
sysNotificationlog.setContent(sysNotify.getTemplateContent());
SysNotificationlog insert = sysNotificationlogService.insert(sysNotificationlog);
// 发送成功修改状态
SysNotify sysNotify1 = new SysNotify();
sysNotify1.setId(id);
sysNotify1.setType(1);
this.baseMapper.updateById(sysNotify1);
// String recipientRoles = sysNotify.getRecipientRoles();
// String[] array = recipientRoles.split("[\\[\\], ]");
JSONArray jsonArray = JSONArray.parseArray(sysNotify.getRecipientUser());
// 遍历 JSON 数组中的每个对象
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject userObject = jsonArray.getJSONObject(i);
Integer userId = userObject.getInteger("id");
// 根据 userId 查询员工信息
TAccount account = tAccountMapper.selectById(userId);
if (account != null) {
// 发送通知
SysNotificationlog sysNotificationlog = new SysNotificationlog();
sysNotificationlog.setNotifyId(sysNotify.getId());
sysNotificationlog.setSentTo(account.getAcctId().toString());
sysNotificationlog.setDeptId(account.getDeptId());
sysNotificationlog.setContent(sysNotify.getTemplateContent());
SysNotificationlog insert = sysNotificationlogService.insert(sysNotificationlog);
// 发送成功修改状态
SysNotify sysNotify1 = new SysNotify();
sysNotify1.setId(id);
sysNotify1.setType(1);
this.baseMapper.updateById(sysNotify1);
}
}
// 根据dutyId查询员工id
// List<TAccount> accountByRolsIds = tAccountMapper.getAccountByRolsIds(Arrays.asList(array));
// for (TAccount account : accountByRolsIds) {
// // 发送通知
// SysNotificationlog sysNotificationlog = new SysNotificationlog();
// sysNotificationlog.setNotifyId(sysNotify.getId());
// sysNotificationlog.setSentTo(account.getAcctId().toString());
// sysNotificationlog.setDeptId(account.getDeptId());
// sysNotificationlog.setContent(sysNotify.getTemplateContent());
// SysNotificationlog insert = sysNotificationlogService.insert(sysNotificationlog);
// // 发送成功修改状态
// SysNotify sysNotify1 = new SysNotify();
// sysNotify1.setId(id);
// sysNotify1.setType(1);
// this.baseMapper.updateById(sysNotify1);
// }
}
private void sendNotification(SysNotify sysNotify,TAccount account) {

View File

@ -29,6 +29,7 @@ public interface AccountService extends IService<TAccount> {
*/
PaginationResponse<AccountDto> getAccountListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;
IPage<TAccount> listAccount(Page page,TAccount accountInfo);
List<TAccount> getByRoleId(List<Long> roleIds);
/**
* 根据用户名获取用户对象
@ -44,7 +45,7 @@ public interface AccountService extends IService<TAccount> {
* @param id
* @return
*/
TAccount getAccountInfoById(Integer id);
TAccount getAccountInfoById(Integer id);
/**
* 新增账户

View File

@ -168,6 +168,13 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
IPage<TAccount> tAccountIPage = baseMapper.listAccount(page, accountInfo, sysDept.getAncestors());
return tAccountIPage;
}
@Override
public List<TAccount> getByRoleId(List<Long> roleIds) {
return baseMapper.getByRoleId(roleIds);
}
@Override
public AccountInfo getAccountByName(String userName) {
Map<String, Object> param = new HashMap();

View File

@ -3,6 +3,7 @@ package com.fuint.system.dept.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.vo.AllOrderInfoVo;
import com.fuint.system.dept.entity.SysDept;
import com.fuint.system.dept.vo.SysDeptVo;
@ -41,6 +42,9 @@ public interface SysDeptMapper extends BaseMapper<SysDept>
* @return 部门信息
*/
public SysDept selectDeptById(Long deptId);
public SysDept selectOilNum(Long deptId);
public SysDept selectOilNum2(@Param("order") AllOrderInfo allOrderInfo);
public SysDeptVo selectDeptByIdVo(Long deptId);
/**

View File

@ -152,9 +152,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_dept d
where d.dept_id = #{deptId}
</select>
<select id="selectOilNum" resultType="com.fuint.system.dept.entity.SysDept">
select count(*) validNum
from sys_dept
where
status = 'qy'
and find_in_set(#{deptId}, ancestors)
and dept_type = '3'
</select>
<select id="selectOilNum2" resultType="com.fuint.system.dept.entity.SysDept">
select count(*) validNum
from sys_dept
where
status = 'qy'
and find_in_set(#{order.deptId}, ancestors)
and dept_type = '3'
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</select>
<update id="updateStatusByTurnoverTime" >
<update id="updateStatusByTurnoverTime" >
update sys_dept set status = 'jy' where turnover_time > NOW() and turnoverType = 2
</update>
<update id="updateStatusById">

View File

@ -28,6 +28,7 @@ public interface ISysDeptService extends IService<SysDept>
List<SysDept> selectDeptByDeptId(Long parentId);
List<SysDept> selectDeptListss(Long parentId);
List<SysDept> selectDeptListsss(Long parentId);
// 根据父级id查询所有deptId
/**

View File

@ -320,4 +320,12 @@ public class BackendAccountController extends BaseController {
return getSuccessResult(true);
}
// 根据角色id查找用户信息
@GetMapping("getByRoleId")
public ResponseObject getByRoleId(@RequestParam("roleIds") List<Long> roleIds) {
return getSuccessResult(this.tAccountService.getByRoleId(roleIds));
}
}

View File

@ -29,4 +29,5 @@ public interface TAccountMapper extends BaseMapper<TAccount> {
List<TAccount> getDeptByRolsIds(@Param("list") List<String> rolsIds,@Param("turnoverType") Long turnoverType);
List<TAccount> getByRoleId(List<Long> roleIds);
}

View File

@ -97,4 +97,16 @@
where role_ids = #{rolsId}
group by dept_id
</select>
<select id="getByRoleId" resultType="com.fuint.repository.model.TAccount">
SELECT
ta.*
FROM
`t_account` ta
<where>
ta.role_ids in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</where>
</select>
</mapper>