This commit is contained in:
ds 2024-11-16 10:44:58 +08:00
parent d9711844e8
commit b600d44f73
12 changed files with 88 additions and 32 deletions

View File

@ -17,7 +17,7 @@
</div> </div>
<div class="d-s"style="margin-right: 20px"> <div class="d-s"style="margin-right: 20px">
<img src="../../assets/images/tzzx.png" style="width: 28px;height: 28px;margin-right: 5px"> <img src="../../assets/images/tzzx.png" style="width: 28px;height: 28px;margin-right: 5px">
<div>通知中心</div> <div @click="goRoute">通知中心</div>
</div> </div>
<el-dropdown class="d-s" trigger="click"> <el-dropdown class="d-s" trigger="click">
<div class="d-s"> <div class="d-s">
@ -154,6 +154,9 @@ export default {
} }
}, },
methods: { methods: {
goRoute(){
this.$router.push("/notify")
},
handleClose(done) { handleClose(done) {
this.$confirm('确认关闭?') this.$confirm('确认关闭?')
.then(_ => { .then(_ => {

View File

@ -118,6 +118,11 @@ export const constantRoutes = [
name: 'notify', name: 'notify',
component: () => import('@/views/notificationList/index') component: () => import('@/views/notificationList/index')
}, },
{
path: '/role',
name: 'role',
component: () => import('@/views/Site/index'),
},
] ]
} }
] ]

View File

@ -52,7 +52,12 @@ export default {
}, },
methods: { methods: {
goback(){ goback(){
this.$router.go(-1) this.$router.push({
name: 'role',
query: {
activeName: 'duty'
}
})
}, },
// //
getMenuTreeselect() { getMenuTreeselect() {

View File

@ -65,11 +65,7 @@
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="storeName" label="机构名称" width="150" align="center"></el-table-column> <el-table-column prop="storeName" label="机构名称" width="150" align="center"></el-table-column>
<el-table-column prop="paidInfo" label="累计交易金额 (元)" width="150" align="center"> <el-table-column prop="amountTotal" label="累计交易金额 (元)" width="150" align="center"></el-table-column>
<template>
{{this.orderStatistics.paidInfo}}
</template>
</el-table-column>
<el-table-column prop="count" label="累计交易笔数" width="130" align="center"></el-table-column> <el-table-column prop="count" label="累计交易笔数" width="130" align="center"></el-table-column>
<el-table-column prop="exchangeQuantity" label="兑换商品数量" width="130" align="center"></el-table-column> <el-table-column prop="exchangeQuantity" label="兑换商品数量" width="130" align="center"></el-table-column>
<el-table-column prop="integral" label="累计消费积分" width="130" align="center"></el-table-column> <el-table-column prop="integral" label="累计消费积分" width="130" align="center"></el-table-column>
@ -77,7 +73,7 @@
<el-table-column prop="giftName" label="商品名称" width="130" align="center"></el-table-column> <el-table-column prop="giftName" label="商品名称" width="130" align="center"></el-table-column>
<el-table-column prop="exchangeQuantityBy" label="兑换数量 (件)" width="130" <el-table-column prop="exchangeQuantityBy" label="兑换数量 (件)" width="130"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="paidInfo" label="销售金额 (元)" width="130" align="center"></el-table-column> <el-table-column prop="paidInfoBy" label="销售金额 (元)" width="130" align="center"></el-table-column>
<el-table-column prop="integralBy" label="消费积分" width="130" align="center"></el-table-column> <el-table-column prop="integralBy" label="消费积分" width="130" align="center"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="statDate" label="统计日期" align="center"> <el-table-column prop="statDate" label="统计日期" align="center">

View File

@ -51,7 +51,8 @@
<div class="left-box-t"> <div class="left-box-t">
<div class="d-s"> <div class="d-s">
<div class="h-tt" >数据看板</div> <div class="h-tt" >数据看板</div>
<div class="q-anniu">近一周</div> <div class="anniu-h1" @click="getStoreAmount1" :class="{ 'anniu-act': isDisabled }">近一周</div>
<div class="anniu-h1" @click="customize" :class="{ 'anniu-act': !isDisabled }">自定义</div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-date-picker <el-date-picker
v-model="value1" v-model="value1"
@ -60,6 +61,7 @@
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:disabled="isDisabled"
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="getStoreAmount"> @change="getStoreAmount">
</el-date-picker> </el-date-picker>
@ -203,6 +205,7 @@ export default {
], ],
timeIndex:0, timeIndex:0,
disabled:true, disabled:true,
isDisabled:true,
options: [{ options: [{
value: '选项1', value: '选项1',
label: '黄金糕' label: '黄金糕'
@ -264,6 +267,9 @@ export default {
// this.initChart() // this.initChart()
}, },
methods:{ methods:{
customize(){
this.isDisabled = false;
},
goRoute(){ goRoute(){
this.$router.push("/notify") this.$router.push("/notify")
}, },
@ -355,6 +361,16 @@ export default {
this.initChart() this.initChart()
}) })
}, },
getStoreAmount1(){
this.isDisabled = true;
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
storeAmountIndex1(this.addDateRange(this.queryParams,this.value1)).then(res => {
this.storeAmount = res.data
this.initChart()
})
},
countPercentage(upNum,downNum){ countPercentage(upNum,downNum){
let percentage = 0; let percentage = 0;
percentage = (upNum / downNum)*100 percentage = (upNum / downNum)*100
@ -884,6 +900,18 @@ export default {
color: #777777; color: #777777;
margin-right: 20px; margin-right: 20px;
} }
.anniu-h1{
width: 80px;
height: 26px;
background: #FAFAFA;
border-radius: 4px 4px 4px 4px;
border: 1px solid #DDDDDD;
display: flex;
align-items: center;
justify-content: center;
color: #777777;
margin-right: 20px;
}
.anniu-act{ .anniu-act{
background: #FF9655 !important; background: #FF9655 !important;
border: 1px solid #FF9655 !important; border: 1px solid #FF9655 !important;

View File

@ -693,7 +693,7 @@
<select id="queryByPageFenxiByZtDz" resultType="com.fuint.business.integral.vo.IntegralOrdersVO"> <select id="queryByPageFenxiByZtDz" resultType="com.fuint.business.integral.vo.IntegralOrdersVO">
select select
store_id storeId, store_id storeId,
sum(paid_info) paidInfo, COALESCE(SUM(amount), 0) amountTotal,
count(*) count, count(*) count,
sum(exchange_quantity) exchangeQuantity, sum(exchange_quantity) exchangeQuantity,
sum(integral) integral sum(integral) integral
@ -719,7 +719,7 @@
<select id="getInfoByStoreId" resultType="com.fuint.business.integral.vo.IntegralOrdersVO"> <select id="getInfoByStoreId" resultType="com.fuint.business.integral.vo.IntegralOrdersVO">
select ig.gift_name giftName, select ig.gift_name giftName,
sum(io.exchange_quantity) exchangeQuantityBy, sum(io.exchange_quantity) exchangeQuantityBy,
sum(io.paid_info) paidInfoBy, COALESCE(sum(io.amount),0) paidInfoBy,
sum(io.integral) integralBy sum(io.integral) integralBy
from integral_orders io from integral_orders io
left join integral_gift ig on io.gift_id = ig.id left join integral_gift ig on io.gift_id = ig.id

View File

@ -31,4 +31,6 @@ public class IntegralOrdersVO extends IntegralOrders {
// private String integrals; // private String integrals;
// private String amount; // private String amount;
private String realName; private String realName;
//总金额
private String amountTotal;
} }

View File

@ -114,6 +114,8 @@ public class LJOrder extends BaseEntity implements Serializable {
private Long deptId; private Long deptId;
@TableField(exist = false) @TableField(exist = false)
private List<Long> storeIds; private List<Long> storeIds;
@TableField(exist = false)
private String storeName;
@TableField(exist = false) @TableField(exist = false)

View File

@ -256,42 +256,45 @@
</if> </if>
</select> </select>
<select id="selectOrderListByZtDz" resultType="com.fuint.business.order.entity.LJOrder"> <select id="selectOrderListByZtDz" resultType="com.fuint.business.order.entity.LJOrder">
<include refid="selectOrders"></include> select mo.*,
ms.name storeName
from mt_order mo
left join mt_store ms on mo.store_id = ms.id
<where> <where>
<if test="order.storeIds != null"> <if test="order.storeIds != null">
and store_id in and mo.store_id in
<foreach collection="order.storeIds" item="item" open="(" close=")" separator=","> <foreach collection="order.storeIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="order.staffId != null and order.staffId != ''"> <if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId} and mo.staff_id = #{order.staffId}
</if> </if>
<if test="order.userId != null and order.userId != ''"> <if test="order.userId != null and order.userId != ''">
and user_id = #{order.userId} and mo.user_id = #{order.userId}
</if> </if>
<if test="order.status != null and order.status != ''"> <if test="order.status != null and order.status != ''">
and status = #{order.status} and mo.status = #{order.status}
</if> </if>
<if test="order.terminal != null and order.terminal != ''"> <if test="order.terminal != null and order.terminal != ''">
and terminal = #{order.terminal} and mo.terminal = #{order.terminal}
</if> </if>
<if test="order.payType != null and order.payType != ''"> <if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType} and mo.pay_type = #{order.payType}
</if> </if>
<if test="order.orderNo != null and order.orderNo != ''"> <if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%') and mo.order_no like concat('%', #{order.orderNo}, '%')
</if> </if>
<if test="order.payUser != null and order.payUser != ''"> <if test="order.payUser != null and order.payUser != ''">
and pay_user like concat('%', #{order.payUser}, '%') and mo.pay_user like concat('%', #{order.payUser}, '%')
</if> </if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 --> <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') and date_format(mo.create_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if> </if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 --> <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') and date_format(mo.create_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if> </if>
order by create_time desc order by mo.create_time desc
</where> </where>
</select> </select>
<select id="selectOrderFenxiListByZtDz" resultType="com.fuint.business.order.vo.LJOrderVo"> <select id="selectOrderFenxiListByZtDz" resultType="com.fuint.business.order.vo.LJOrderVo">

View File

@ -725,8 +725,9 @@
from oil_order from oil_order
<where> <where>
order_status = 'paid'
<if test="order.storeIds != null"> <if test="order.storeIds != null">
store_id in and store_id in
<foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")"> <foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -752,8 +753,9 @@
from oil_order from oil_order
<where> <where>
order_status = 'paid'
<if test="order.storeIds != null"> <if test="order.storeIds != null">
store_id in and store_id in
<foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")"> <foreach collection="order.storeIds" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>

View File

@ -84,8 +84,6 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
item.setCvsGoodsName(item.getCvsGoodsName()+cvsGoods.getName()+","); item.setCvsGoodsName(item.getCvsGoodsName()+cvsGoods.getName()+",");
} }
} }
item.getGoodsName().substring(0,item.getGoodsName().length()-2);
item.getCvsGoodsName().substring(0,item.getCvsGoodsName().length()-2);
} }
} }

View File

@ -46,6 +46,8 @@ import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.RedisLock; import com.fuint.common.util.RedisLock;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.repository.mapper.MtUserGradeMapper; import com.fuint.repository.mapper.MtUserGradeMapper;
import com.fuint.repository.mapper.MtUserMapper;
import com.fuint.repository.model.MtUser;
import com.fuint.repository.model.MtUserGrade; import com.fuint.repository.model.MtUserGrade;
import com.fuint.system.dept.mapper.SysDeptMapper; import com.fuint.system.dept.mapper.SysDeptMapper;
import org.json.JSONObject; import org.json.JSONObject;
@ -109,6 +111,9 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
@Autowired @Autowired
private CardCouponUserMapper cardCouponUserMapper; private CardCouponUserMapper cardCouponUserMapper;
@Autowired
private MtUserMapper mtUserMapper;
@Override @Override
@ -129,6 +134,13 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
if (ObjectUtil.isNotEmpty(ljStore)) { if (ObjectUtil.isNotEmpty(ljStore)) {
record.setStoreName(ljStore.getName()); record.setStoreName(ljStore.getName());
} }
// 会员卡号
MtUser mtUser = mtUserMapper.selectById(record.getMtUserId());
if (ObjectUtil.isNotEmpty(mtUser)) {
record.setPhysicalCard(mtUser.getUserNo());
} else {
record.setPhysicalCard("--");
}
// 会员等级 // 会员等级
LJUserGrade ljUserGrade = ljUserGradeMapper.selectById(record.getGradeId()); LJUserGrade ljUserGrade = ljUserGradeMapper.selectById(record.getGradeId());
if (ObjectUtil.isNotEmpty(ljUserGrade)) { if (ObjectUtil.isNotEmpty(ljUserGrade)) {
@ -151,7 +163,7 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
record.setLeijiMoneyRef(leiJiInfo.get("s3").toString()); record.setLeijiMoneyRef(leiJiInfo.get("s3").toString());
record.setLeijiNumRef(leiJiInfo.get("s3c").toString()); record.setLeijiNumRef(leiJiInfo.get("s3c").toString());
// 囤油卡余额查询 // 囤油卡余额查询
BigDecimal bigDecimal = mtUserFuelMapper.selectSumFuelAmountByMtUserId(user.getMtUserId()); BigDecimal bigDecimal = mtUserFuelMapper.selectSumFuelAmountByMtUserId(record.getMtUserId());
record.setFuelAmount(bigDecimal); record.setFuelAmount(bigDecimal);
} }