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

View File

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

View File

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

View File

@ -65,11 +65,7 @@
style="width: 100%">
<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="paidInfo" label="累计交易金额 (元)" width="150" align="center">
<template>
{{this.orderStatistics.paidInfo}}
</template>
</el-table-column>
<el-table-column prop="amountTotal" label="累计交易金额 (元)" width="150" 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="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="exchangeQuantityBy" label="兑换数量 (件)" width="130"
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>
<el-table-column prop="statDate" label="统计日期" align="center">

View File

@ -51,7 +51,8 @@
<div class="left-box-t">
<div class="d-s">
<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">
<el-date-picker
v-model="value1"
@ -60,6 +61,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:disabled="isDisabled"
:picker-options="pickerOptions"
@change="getStoreAmount">
</el-date-picker>
@ -203,6 +205,7 @@ export default {
],
timeIndex:0,
disabled:true,
isDisabled:true,
options: [{
value: '选项1',
label: '黄金糕'
@ -264,6 +267,9 @@ export default {
// this.initChart()
},
methods:{
customize(){
this.isDisabled = false;
},
goRoute(){
this.$router.push("/notify")
},
@ -355,6 +361,16 @@ export default {
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){
let percentage = 0;
percentage = (upNum / downNum)*100
@ -884,6 +900,18 @@ export default {
color: #777777;
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{
background: #FF9655 !important;
border: 1px solid #FF9655 !important;

View File

@ -693,7 +693,7 @@
<select id="queryByPageFenxiByZtDz" resultType="com.fuint.business.integral.vo.IntegralOrdersVO">
select
store_id storeId,
sum(paid_info) paidInfo,
COALESCE(SUM(amount), 0) amountTotal,
count(*) count,
sum(exchange_quantity) exchangeQuantity,
sum(integral) integral
@ -719,7 +719,7 @@
<select id="getInfoByStoreId" resultType="com.fuint.business.integral.vo.IntegralOrdersVO">
select ig.gift_name giftName,
sum(io.exchange_quantity) exchangeQuantityBy,
sum(io.paid_info) paidInfoBy,
COALESCE(sum(io.amount),0) paidInfoBy,
sum(io.integral) integralBy
from integral_orders io
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 amount;
private String realName;
//总金额
private String amountTotal;
}

View File

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

View File

@ -256,42 +256,45 @@
</if>
</select>
<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>
<if test="order.storeIds != null">
and store_id in
and mo.store_id in
<foreach collection="order.storeIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
and mo.staff_id = #{order.staffId}
</if>
<if test="order.userId != null and order.userId != ''">
and user_id = #{order.userId}
and mo.user_id = #{order.userId}
</if>
<if test="order.status != null and order.status != ''">
and status = #{order.status}
and mo.status = #{order.status}
</if>
<if test="order.terminal != null and order.terminal != ''">
and terminal = #{order.terminal}
and mo.terminal = #{order.terminal}
</if>
<if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType}
and mo.pay_type = #{order.payType}
</if>
<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 test="order.payUser != null and order.payUser != ''">
and pay_user like concat('%', #{order.payUser}, '%')
and mo.pay_user like concat('%', #{order.payUser}, '%')
</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')
and date_format(mo.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')
and date_format(mo.create_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
order by create_time desc
order by mo.create_time desc
</where>
</select>
<select id="selectOrderFenxiListByZtDz" resultType="com.fuint.business.order.vo.LJOrderVo">

View File

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

View File

@ -84,8 +84,6 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
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.TokenUtil;
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.system.dept.mapper.SysDeptMapper;
import org.json.JSONObject;
@ -109,6 +111,9 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
@Autowired
private CardCouponUserMapper cardCouponUserMapper;
@Autowired
private MtUserMapper mtUserMapper;
@Override
@ -129,6 +134,13 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
if (ObjectUtil.isNotEmpty(ljStore)) {
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());
if (ObjectUtil.isNotEmpty(ljUserGrade)) {
@ -151,7 +163,7 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
record.setLeijiMoneyRef(leiJiInfo.get("s3").toString());
record.setLeijiNumRef(leiJiInfo.get("s3c").toString());
// 囤油卡余额查询
BigDecimal bigDecimal = mtUserFuelMapper.selectSumFuelAmountByMtUserId(user.getMtUserId());
BigDecimal bigDecimal = mtUserFuelMapper.selectSumFuelAmountByMtUserId(record.getMtUserId());
record.setFuelAmount(bigDecimal);
}