From eb9abc67774ade61862f02221391365b595b2ad5 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Mon, 29 Jul 2024 16:13:24 +0800 Subject: [PATCH] bug --- fuintAdmin_zt/src/assets/images/phone.png | Bin 0 -> 1298 bytes .../src/views/homeComponents/agent.vue | 77 ++++++++++++------ .../src/views/homeComponents/manage.vue | 17 +++- .../business/store/mapper/MtStoreMapper.java | 22 +++++ .../store/mapper/xml/MtStoreMapper.xml | 44 ++++++++++ .../store/service/impl/StoreServiceImpl.java | 36 +++++++- 6 files changed, 166 insertions(+), 30 deletions(-) create mode 100644 fuintAdmin_zt/src/assets/images/phone.png diff --git a/fuintAdmin_zt/src/assets/images/phone.png b/fuintAdmin_zt/src/assets/images/phone.png new file mode 100644 index 0000000000000000000000000000000000000000..acacad1100867901f6b1a396ae8fdfc98878c3c2 GIT binary patch literal 1298 zcmV+t1?~EYP)Px(%t=H+R7gvuR#`}#R}}t^<8Cxk6p4yxv7jPtXa#rFxT7fI5)mb!wif!}TSDne zOG{r`+S0zHXsjWLt>g0GilTy`B7^~j`XDr8EojubjC);AJ(u~X<2d8k_Q1g0``>%M zvwZivm+(K0nJWQ&4&W{k?K^Wv&K5ZO&dhNDz6FqCUh|NMzH;X8Ujs680Dvz5G}v)| zhlp0L1HCaIGrI%$0Kj(_CDdt7cXoE*;^G1?FE8kHx=sKUM8u9jodPnm3xF&DKLH4~ zb~HUbjoH~*HRbB+iiCs&L_|cy`S|!4{u3ZGM*;Z340y@M^71nJ`udQcpO2uRAgr#g zVtjlYAt53285tRG6Vb6fP`ep2^BVvj0eEWS8Jhd_9svCXSh&nBE-qqdXb3SeF-S~I#M#-I z#kl}BH8r8Gu1@vN+GO9<)D-UDzyFy|r~C8@AT!?q&;lS&`?$Nii?+5lWM^k1ARqw! z{rxJ->gs9`k;<^Sxf!*!wO0VQx3{6!>rr1{FKgc-qTj4RiJ4~ryrWGrGhV)YiItTV zWM*dK`Sa&O1f-{@!^6V^Zfa&l7nNJ~r8 zFpL1CwC6IR0m|w>WGqgkKhiIw(FlKke+B64>#Is@ZBkkxPfbmYQW_acB}4$i!osYV zen><=S^&*V{TRTP@?ZKOK-SsVvQ5ULqob>U*4w@(qQ*-~!^|ZBy6pjq2nbQ++@+?b zqNk@viFRROp~_AGU%YsM+}vCQ1_s)5Aw9fn3n)T81;C z!NGx|zK}`4W@cs-qf1Iku4_fd6)k1vcL6B1KRi5Chgc%MckiCkQ(@rJ(vlKv8H*hq z9VrbhD=SmwwPSw)r~=UMNW332b3<=$uga#Vs7RI1o=JA??d^z+j6__VJOZwmJU_k` z!dzmh4Jm?5Cew0PSC@-0PAKol1_lOHxg|TBpauYZL`1(^?{# zO6G%ugAm;eX6k~>eBsIgHbPp%>9p-7z> z>;%C30Dd8&BS#gv_K7huF_AGpKR+f!5QYk2*4Eb4FC`^KU0r5z_(nv7h&G&^;cEez zS$BANIBGN+(_X)Rt$Gw39E|YraE+lN`i(^Nt1}?&`%NBEZ^|WL<4_by%GZD03(Z~- zP61^TGt1MkQH~sdPvik?j}SM>@}_{d&9Cf7MD*uP96MU`H>&mu4=epA-~a#s07*qo IM6N<$f|W>EkpKVy literal 0 HcmV?d00001 diff --git a/fuintAdmin_zt/src/views/homeComponents/agent.vue b/fuintAdmin_zt/src/views/homeComponents/agent.vue index 7582196ae..f38904645 100644 --- a/fuintAdmin_zt/src/views/homeComponents/agent.vue +++ b/fuintAdmin_zt/src/views/homeComponents/agent.vue @@ -42,7 +42,7 @@
通知中心
-
更多
+
更多
【{{ item.notificationType }}】{{ item.templateContent }}
@@ -124,7 +124,22 @@
-
硬件设备
+ +
+
硬件设备
+
+ +
+ 联系人:张总
+ 联系电话:15666665287 +
+ +
+
+
@@ -241,6 +256,9 @@ export default { // this.initChart() }, methods:{ + goRoute(){ + this.$router.push("system/notify/page/getNotify") + }, getNoticeList(){ getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => { this.noticeList = res.data.records @@ -341,24 +359,25 @@ export default { let tradeAmountList = [] let tradeNumList = [] if (this.storeList.length>0) { - for (let i = 0; i < 24; i++) { - let flag = false; - let hour = i.toString().padStart(2, '0') + ":00"; // 转换为两位数格式 + // for (let i = 0; i < 24; i++) { + // let flag = false; + // let hour = i.toString().padStart(2, '0') + ":00"; // 转换为两位数格式 this.storeList.forEach(item => { - if (item.tradeTime == hour){ - flag = true + // if (item.tradeTime == hour){ + // flag = true + hourList.push(item.tradeTime); storeNumList.push(item.storeNum) tradeAmountList.push(item.tradeAmount) tradeNumList.push(item.tradeNum) - } + // } }) - hourList.push(hour); - if (!flag) { - storeNumList.push(0) - tradeAmountList.push(0) - tradeNumList.push(0) - } - } + // hourList.push(hour); + // if (!flag) { + // storeNumList.push(0) + // tradeAmountList.push(0) + // tradeNumList.push(0) + // } + // } }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'] 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 }, data: [ - { value: 1548, name: '非七日活跃' }, - { value: 775, name: '七日活跃' } + // { value: 1548, name: '非七日活跃' }, + // { value: 775, name: '七日活跃' } + { value: Number(this.storeAmount.noWeekStoreTotal), name: '本月新增非七日活跃油站' }, + { value: Number(this.storeAmount.weekStoreTotal), name: '本月新增七日活跃油站' } ] }, { @@ -428,8 +449,10 @@ export default { } }, data: [ - { value: 1048, name: '本月新增' }, - { value: 335, name: '非本月新增' } + // { value: 1048, name: '本月新增' }, + // { value: 335, name: '非本月新增' } + { value: Number(this.storeAmount.noAddStoreTotal), name: '非本月新增' }, + { value: Number(this.storeAmount.addStoreTotal), name: '本月新增' }, ] } ] @@ -491,10 +514,10 @@ export default { }, data: [ - { 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.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), 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.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '拉卡拉交易金额占比' } ], label: { show: true, @@ -633,10 +656,10 @@ export default { }, data: [ - { 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.laKaLaAmount),Number(this.storeAmount.fuYouAmount) + Number(this.storeAmount.laKaLaAmount)), name: '拉卡拉占比' } + // { value: 50, name: '7日活跃油站 ' }, + // { value: 50, name: '非7日活跃油站' } + { value: this.countPercentage(Number(this.storeAmount.storeTotal),Number(this.storeAmount.storeTotal) + Number(this.storeAmount.noStoreTotal)), name: '7日活跃油站' }, + { value: this.countPercentage(Number(this.storeAmount.noStoreTotal),Number(this.storeAmount.storeTotal) + Number(this.storeAmount.noStoreTotal)), name: '非7日活跃油站' } ], label: { show: true, diff --git a/fuintAdmin_zt/src/views/homeComponents/manage.vue b/fuintAdmin_zt/src/views/homeComponents/manage.vue index 6665ac0ff..12b5ab6b4 100644 --- a/fuintAdmin_zt/src/views/homeComponents/manage.vue +++ b/fuintAdmin_zt/src/views/homeComponents/manage.vue @@ -131,7 +131,22 @@
-
硬件设备
+ +
+
硬件设备
+
+ +
+ 联系人:张总
+ 联系电话:15666665287 +
+ +
+
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/MtStoreMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/MtStoreMapper.java index b5cd6fc88..23c1095a9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/MtStoreMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/MtStoreMapper.java @@ -53,5 +53,27 @@ public interface MtStoreMapper extends BaseMapper { List selectStoreList(@Param("storeVo") MtStore store,@Param("ownDeptStr") String ownDeptStr); + /** + * 查询今日时间段内数据信息 + * @param store + * @param storeIds + * @return + */ List selectStoreNum(@Param("storeVo") MtStore store,@Param("storeIds") List storeIds); + + /** + * 查询周/月内天数数据信息 + * @param store + * @param storeIds + * @return + */ + List selectStoreNumByDay(@Param("storeVo") MtStore store,@Param("storeIds") List storeIds); + + /** + * 查询年内月数数据信息 + * @param store + * @param storeIds + * @return + */ + List selectStoreNumByMonth(@Param("storeVo") MtStore store,@Param("storeIds") List storeIds); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/xml/MtStoreMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/xml/MtStoreMapper.xml index dbac0907f..3a88fd08f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/xml/MtStoreMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/mapper/xml/MtStoreMapper.xml @@ -100,4 +100,48 @@ tradeTime) t GROUP BY t.tradeTime + + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java index d5ecf4bb7..f0812ba30 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java @@ -58,6 +58,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; import java.text.DateFormat; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.temporal.ChronoUnit; @@ -737,7 +738,7 @@ public class StoreServiceImpl extends ServiceImpl implem } @Override - public List getStoreAmountByTime(MtStore store) { + public List getStoreAmountByTime(MtStore store){ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId()); String ancestors = sysDept.getAncestors(); @@ -751,7 +752,38 @@ public class StoreServiceImpl extends ServiceImpl implem for (MtStore mtStore : mtStores) { storeIds.add(mtStore.getId()); } - return baseMapper.selectStoreNum(store,storeIds); + List 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