bug
This commit is contained in:
parent
dc3716765f
commit
eb9abc6777
BIN
fuintAdmin_zt/src/assets/images/phone.png
Normal file
BIN
fuintAdmin_zt/src/assets/images/phone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
@ -42,7 +42,7 @@
|
|||||||
<div class="right-box">
|
<div class="right-box">
|
||||||
<div class="title_">
|
<div class="title_">
|
||||||
<div>通知中心</div>
|
<div>通知中心</div>
|
||||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
|
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center" @click="goRoute">更多 <i class="el-icon-arrow-right"></i> </div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>-->
|
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>-->
|
||||||
<div class="hang_" v-for="(item,index) in noticeList" :key="index" >【{{ item.notificationType }}】{{ item.templateContent }}</div>
|
<div class="hang_" v-for="(item,index) in noticeList" :key="index" >【{{ item.notificationType }}】{{ item.templateContent }}</div>
|
||||||
@ -124,7 +124,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-box-t">
|
<div class="right-box-t">
|
||||||
<div class="h-tt" >硬件设备</div>
|
<!-- <div class="h-tt" >硬件设备</div>-->
|
||||||
|
<div class="title_">
|
||||||
|
<div>硬件设备</div>
|
||||||
|
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
width="200"
|
||||||
|
trigger="click">
|
||||||
|
<div>
|
||||||
|
联系人:张总<br>
|
||||||
|
联系电话:15666665287
|
||||||
|
</div>
|
||||||
|
<el-button slot="reference" style="border: 0px" type="text"><img src="@/assets/images/phone.png"></el-button>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
||||||
<!-- <div class="r-img">-->
|
<!-- <div class="r-img">-->
|
||||||
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
||||||
@ -241,6 +256,9 @@ export default {
|
|||||||
// this.initChart()
|
// this.initChart()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
goRoute(){
|
||||||
|
this.$router.push("system/notify/page/getNotify")
|
||||||
|
},
|
||||||
getNoticeList(){
|
getNoticeList(){
|
||||||
getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => {
|
getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => {
|
||||||
this.noticeList = res.data.records
|
this.noticeList = res.data.records
|
||||||
@ -341,24 +359,25 @@ export default {
|
|||||||
let tradeAmountList = []
|
let tradeAmountList = []
|
||||||
let tradeNumList = []
|
let tradeNumList = []
|
||||||
if (this.storeList.length>0) {
|
if (this.storeList.length>0) {
|
||||||
for (let i = 0; i < 24; i++) {
|
// for (let i = 0; i < 24; i++) {
|
||||||
let flag = false;
|
// let flag = false;
|
||||||
let hour = i.toString().padStart(2, '0') + ":00"; // 转换为两位数格式
|
// let hour = i.toString().padStart(2, '0') + ":00"; // 转换为两位数格式
|
||||||
this.storeList.forEach(item => {
|
this.storeList.forEach(item => {
|
||||||
if (item.tradeTime == hour){
|
// if (item.tradeTime == hour){
|
||||||
flag = true
|
// flag = true
|
||||||
|
hourList.push(item.tradeTime);
|
||||||
storeNumList.push(item.storeNum)
|
storeNumList.push(item.storeNum)
|
||||||
tradeAmountList.push(item.tradeAmount)
|
tradeAmountList.push(item.tradeAmount)
|
||||||
tradeNumList.push(item.tradeNum)
|
tradeNumList.push(item.tradeNum)
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
hourList.push(hour);
|
// hourList.push(hour);
|
||||||
if (!flag) {
|
// if (!flag) {
|
||||||
storeNumList.push(0)
|
// storeNumList.push(0)
|
||||||
tradeAmountList.push(0)
|
// tradeAmountList.push(0)
|
||||||
tradeNumList.push(0)
|
// tradeNumList.push(0)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}else {
|
}else {
|
||||||
hourList = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
|
hourList = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
|
||||||
storeNumList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
storeNumList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||||
@ -399,8 +418,10 @@ export default {
|
|||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: 1548, name: '非七日活跃' },
|
// { value: 1548, name: '非七日活跃' },
|
||||||
{ value: 775, name: '七日活跃' }
|
// { value: 775, name: '七日活跃' }
|
||||||
|
{ value: Number(this.storeAmount.noWeekStoreTotal), name: '本月新增非七日活跃油站' },
|
||||||
|
{ value: Number(this.storeAmount.weekStoreTotal), name: '本月新增七日活跃油站' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -428,8 +449,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: 1048, name: '本月新增' },
|
// { value: 1048, name: '本月新增' },
|
||||||
{ value: 335, name: '非本月新增' }
|
// { value: 335, name: '非本月新增' }
|
||||||
|
{ value: Number(this.storeAmount.noAddStoreTotal), name: '非本月新增' },
|
||||||
|
{ value: Number(this.storeAmount.addStoreTotal), name: '本月新增' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -491,10 +514,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
data: [
|
data: [
|
||||||
{ value: 50, name: '富友交易金额占比 ' },
|
// { value: 50, name: '富友交易金额占比 ' },
|
||||||
{ value: 50, name: '拉卡拉交易金额占比' }
|
// { value: 50, name: '拉卡拉交易金额占比' }
|
||||||
// { value: this.countPercentage(Number(this.storeAmount.fuYouAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '富友占比' },
|
{ value: this.countPercentage(Number(this.storeAmount.fuYouAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '富友交易金额占比' },
|
||||||
// { value: this.countPercentage(Number(this.storeAmount.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '拉卡拉占比' }
|
{ value: this.countPercentage(Number(this.storeAmount.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '拉卡拉交易金额占比' }
|
||||||
],
|
],
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
@ -633,10 +656,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
data: [
|
data: [
|
||||||
{ value: 50, name: '富友交易金额占比 ' },
|
// { value: 50, name: '7日活跃油站 ' },
|
||||||
{ value: 50, name: '拉卡拉交易金额占比' }
|
// { value: 50, name: '非7日活跃油站' }
|
||||||
// { value: this.countPercentage(Number(this.storeAmount.fuYouAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '富友占比' },
|
{ value: this.countPercentage(Number(this.storeAmount.storeTotal),Number(this.storeAmount.storeTotal) + Number(this.storeAmount.noStoreTotal)), name: '7日活跃油站' },
|
||||||
// { value: this.countPercentage(Number(this.storeAmount.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '拉卡拉占比' }
|
{ value: this.countPercentage(Number(this.storeAmount.noStoreTotal),Number(this.storeAmount.storeTotal) + Number(this.storeAmount.noStoreTotal)), name: '非7日活跃油站' }
|
||||||
],
|
],
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -131,7 +131,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-box-t">
|
<div class="right-box-t">
|
||||||
<div class="h-tt" >硬件设备</div>
|
<!-- <div class="h-tt" >硬件设备</div>-->
|
||||||
|
<div class="title_">
|
||||||
|
<div>硬件设备</div>
|
||||||
|
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
width="200"
|
||||||
|
trigger="click">
|
||||||
|
<div>
|
||||||
|
联系人:张总<br>
|
||||||
|
联系电话:15666665287
|
||||||
|
</div>
|
||||||
|
<el-button slot="reference" style="border: 0px" type="text"><img src="@/assets/images/phone.png"></el-button>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
||||||
<!-- <div class="r-img">-->
|
<!-- <div class="r-img">-->
|
||||||
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
||||||
|
@ -53,5 +53,27 @@ public interface MtStoreMapper extends BaseMapper<MtStore> {
|
|||||||
|
|
||||||
List<MtStore> selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr);
|
List<MtStore> selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询今日时间段内数据信息
|
||||||
|
* @param store
|
||||||
|
* @param storeIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<StoreNumVo> selectStoreNum(@Param("storeVo") MtStore store,@Param("storeIds") List<Integer> storeIds);
|
List<StoreNumVo> selectStoreNum(@Param("storeVo") MtStore store,@Param("storeIds") List<Integer> storeIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询周/月内天数数据信息
|
||||||
|
* @param store
|
||||||
|
* @param storeIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<StoreNumVo> selectStoreNumByDay(@Param("storeVo") MtStore store,@Param("storeIds") List<Integer> storeIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询年内月数数据信息
|
||||||
|
* @param store
|
||||||
|
* @param storeIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<StoreNumVo> selectStoreNumByMonth(@Param("storeVo") MtStore store,@Param("storeIds") List<Integer> storeIds);
|
||||||
}
|
}
|
||||||
|
@ -100,4 +100,48 @@
|
|||||||
tradeTime) t
|
tradeTime) t
|
||||||
GROUP BY t.tradeTime
|
GROUP BY t.tradeTime
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectStoreNumByDay" resultType="com.fuint.business.store.vo.StoreNumVo">
|
||||||
|
SELECT t.tradeTime,count(t.store_id) storeNum,sum(t.tradeNum) tradeNum,sum(t.tradeAmount) tradeAmount
|
||||||
|
FROM (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') AS tradeTime,count(id) tradeNum,SUM(pay_money) AS tradeAmount,store_id
|
||||||
|
FROM all_order_info
|
||||||
|
<where>
|
||||||
|
store_id in
|
||||||
|
<foreach collection="storeIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
<if test="storeVo.params.beginTime != null and storeVo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(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(create_time,'%y%m%d') <= date_format(#{storeVo.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
tradeTime,store_id
|
||||||
|
ORDER BY
|
||||||
|
tradeTime) t
|
||||||
|
GROUP BY t.tradeTime
|
||||||
|
</select>
|
||||||
|
<select id="selectStoreNumByMonth" resultType="com.fuint.business.store.vo.StoreNumVo">
|
||||||
|
SELECT t.tradeTime,count(t.store_id) storeNum,sum(t.tradeNum) tradeNum,sum(t.tradeAmount) tradeAmount
|
||||||
|
FROM (SELECT DATE_FORMAT(create_time, '%Y-%m') AS tradeTime,count(id) tradeNum,SUM(pay_money) AS tradeAmount,store_id
|
||||||
|
FROM all_order_info
|
||||||
|
<where>
|
||||||
|
store_id in
|
||||||
|
<foreach collection="storeIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
<if test="storeVo.params.beginTime != null and storeVo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(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(create_time,'%y%m%d') <= date_format(#{storeVo.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
tradeTime,store_id
|
||||||
|
ORDER BY
|
||||||
|
tradeTime) t
|
||||||
|
GROUP BY t.tradeTime
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -58,6 +58,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
@ -751,7 +752,38 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
|||||||
for (MtStore mtStore : mtStores) {
|
for (MtStore mtStore : mtStores) {
|
||||||
storeIds.add(mtStore.getId());
|
storeIds.add(mtStore.getId());
|
||||||
}
|
}
|
||||||
return baseMapper.selectStoreNum(store,storeIds);
|
List<StoreNumVo> storeNumVos = null;
|
||||||
|
if (ObjectUtil.isNotEmpty(store.getParams()) && ObjectUtil.isNotEmpty(store.getParams().get("beginTime"))
|
||||||
|
&& ObjectUtil.isNotEmpty(store.getParams().get("endTime"))){
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
calendar.set(Calendar.MINUTE, 0);
|
||||||
|
calendar.set(Calendar.SECOND, 0);
|
||||||
|
calendar.set(Calendar.MILLISECOND, 0);
|
||||||
|
|
||||||
|
Date today = calendar.getTime();
|
||||||
|
Calendar calendar1 = Calendar.getInstance();
|
||||||
|
calendar1.add(Calendar.YEAR, -1); // 将年份减去1
|
||||||
|
long oneYearAgo = calendar1.getTimeInMillis();
|
||||||
|
Date yearDay = new Date(oneYearAgo);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!today.after( dateFormat.parse(store.getParams().get("beginTime").toString()) )){
|
||||||
|
storeNumVos = baseMapper.selectStoreNum(store, storeIds);
|
||||||
|
}else {
|
||||||
|
if (yearDay.before(dateFormat.parse(store.getParams().get("beginTime").toString()))){
|
||||||
|
storeNumVos = baseMapper.selectStoreNumByDay(store, storeIds);
|
||||||
|
}else {
|
||||||
|
storeNumVos = baseMapper.selectStoreNumByMonth(store, storeIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return storeNumVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user