数据统计
-
+
{{sjtjTitle}}
@@ -377,11 +377,7 @@ export default {
goList() {
this.$router.push('/notificationList/index')
},
- editColor(command,index){
- // console.log("command",command)
- // console.log("index",index.$attrs.index)
- index = index.$attrs.index
- // this.timeIndex = command
+ editShow(command){
this.disabled = true
if (command=='今日'){
let start = new Date();
@@ -389,62 +385,75 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- if (index == "1"){
- this.countValue = [start,new Date()]
- }else if (index == "2") {
this.showValue = [start,new Date()]
- }else if (index == "3") {
- this.value2 = [start,new Date()]
- }else if (index == "4") {
- this.value1 = [start,new Date()];
- }
} else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
- if (index == "1"){
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "3") {
- this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "4") {
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }
} else if (command=='近一月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- if (index == "1"){
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "3") {
- this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "4") {
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }
} else if (command=='近一年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- if (index == "1"){
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "3") {
- this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }else if (index == "4") {
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- }
}else if (command=='自定义'){
this.disabled = false
}
- if (index == "1") {
- this.getDataCount()
- }else if (index == "2") {
this.getDataShow()
- }else if (index == "3") {
- this.getStoreList()
+ },
+ editCount(command){
+ this.disabled = true
+ if (command=='今日'){
+ let start = new Date();
+ start.setHours(0)
+ start.setMinutes(0)
+ start.setSeconds(0)
+ start.setMilliseconds(0)
+ this.showValue = [start,new Date()]
+ } else if (command=='近一周'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='近一月'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='近一年'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ }else if (command=='自定义'){
+ this.disabled = false
}
+ this.getDataCount()
+ },
+ editColor(command){
+ this.disabled = true
+ if (command=='今日'){
+ let start = new Date();
+ start.setHours(0)
+ start.setMinutes(0)
+ start.setSeconds(0)
+ start.setMilliseconds(0)
+ this.value2 = [start,new Date()]
+ } else if (command=='近一周'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
+ this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='近一月'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
+ this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='近一年'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
+ this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ }else if (command=='自定义'){
+ this.disabled = false
+ }
+ this.getStoreList()
},
// 获取员工排行信息
getEmployeList() {
From 2b4777998c086fb86ddccf61ddbbf4b9b43c8bb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 09:27:42 +0800
Subject: [PATCH 04/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/views/shopowner.vue | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue
index 3e582b2e9..c64dff22f 100644
--- a/fuintAdmin/src/views/shopowner.vue
+++ b/fuintAdmin/src/views/shopowner.vue
@@ -373,6 +373,30 @@ export default {
sjkbStoreAmount(e){
console.log(e)
this.sjkbTitle = e
+ let command = e
+ if (command=='今日'){
+ let start = new Date();
+ start.setHours(0)
+ start.setMinutes(0)
+ start.setSeconds(0)
+ start.setMilliseconds(0)
+ this.showValue = [start,new Date()]
+ } else if (command=='近一周'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
+ this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本月'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
+ this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本年'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
+ this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ }else if (command=='自定义'){
+ this.disabled = false
+ }
+ this.getStoreAmount()
},
goList() {
this.$router.push('/notificationList/index')
From ea55404cb20983759c02d491817afadd26e93b4d Mon Sep 17 00:00:00 2001
From: "DESKTOP-369JRHT\\12997" <9>
Date: Wed, 16 Oct 2024 09:39:01 +0800
Subject: [PATCH 05/17] 10.16
---
fuintAdmin/src/views/shopowner.vue | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue
index 9df367751..499004a08 100644
--- a/fuintAdmin/src/views/shopowner.vue
+++ b/fuintAdmin/src/views/shopowner.vue
@@ -53,11 +53,6 @@
class="el-icon-arrow-down el-icon--right">
{{item}}
-
-
-
-
-
自定义
@@ -838,7 +833,6 @@ export default {
xAxis: [
{
type: 'category',
- // data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
data: showTimes,
axisPointer: {
type: 'shadow'
@@ -849,9 +843,6 @@ export default {
{
type: 'value',
name: '金额(元)',
- // min: 0,
- // max: 10000,
- // interval: 2000,
axisLabel: {
formatter: '{value}'
}
From 9ad6fcb18d551281b0b05717e7f1e11c8cda3189 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 09:44:17 +0800
Subject: [PATCH 06/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/FleetInfoServiceImpl.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
index 1e3edd103..353559f07 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
@@ -415,6 +415,7 @@ public class FleetInfoServiceImpl extends ServiceImpl
()
.eq(AllOrderInfo::getId, orderId));
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
if (ObjectUtil.isEmpty(allOrderInfo)) {
throw new RuntimeException("订单不存在");
}
@@ -432,6 +433,14 @@ public class FleetInfoServiceImpl extends ServiceImpl()
+ .eq(FleetMember::getId, fleetConsumeRecord.getFleetMemberId()));
+ //判断成员的余额是否足够支付
+ if (money > fleetMember.getRemainingCreditLimit()) {
+ throw new RuntimeException("支付金额超过当前余额");
+ }
+
//更新时间
DateTime now = DateUtil.date();
@@ -444,13 +453,22 @@ public class FleetInfoServiceImpl extends ServiceImpl
Date: Wed, 16 Oct 2024 11:21:02 +0800
Subject: [PATCH 07/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/views/shopowner.vue | 159 +++++++++++++----------------
1 file changed, 73 insertions(+), 86 deletions(-)
diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue
index 7d2a723fb..fbd5c910a 100644
--- a/fuintAdmin/src/views/shopowner.vue
+++ b/fuintAdmin/src/views/shopowner.vue
@@ -146,10 +146,11 @@
{{ypjyTitle}}
- 近一周
- 本月
- 本季度
- 本年
+
+
+
+
+ {{item}}
自定义
@@ -175,10 +176,7 @@
{{ygphTitle}}
- 近一周
- 本月
- 本季度
- 本年
+ {{item}}
@@ -220,10 +218,11 @@
{{sjtjTitle}}
- 近一周
- 本月
- 本季度
- 本年
+
+
+
+
+ {{item}}
@@ -267,10 +266,10 @@ export default {
data() {
return {
amountList:[
- "今日 " ,
- "昨日 " ,
- "本周 " ,
- "本月 " ,
+ "今日" ,
+ "昨日" ,
+ "本周" ,
+ "本月" ,
"本季度" ,
"本年"
@@ -376,7 +375,7 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.showValue = [start,new Date()]
- } else if (command=='近一周'){
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
@@ -396,8 +395,11 @@ export default {
goList() {
this.$router.push('/notificationList/index')
},
- editShow(command){
+ editShow(e){
this.disabled = true
+ console.log(e)
+ this.ypjyTitle = e
+ let command = e
if (command=='今日'){
let start = new Date();
start.setHours(0)
@@ -405,44 +407,48 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.showValue = [start,new Date()]
- } else if (command=='近一周'){
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一月'){
+ this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一年'){
+ this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
this.getDataShow()
},
- editCount(command){
+ editCount(e){
this.disabled = true
+ this.sjtjTitle = e
+ console.log("e",e)
+ let command = e
if (command=='今日'){
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.showValue = [start,new Date()]
- } else if (command=='近一周'){
+ this.countValue = [start,new Date()]
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一月'){
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本月'){
+ console.log('进入了人本月')
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一年'){
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
@@ -450,6 +456,7 @@ export default {
},
editColor(command){
this.disabled = true
+ this.ygphTitle = command
if (command=='今日'){
let start = new Date();
start.setHours(0)
@@ -457,7 +464,7 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.value2 = [start,new Date()]
- } else if (command=='近一周'){
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
@@ -640,53 +647,38 @@ export default {
// 首页数据统计
const times = this.dataCount.oilData.map(item => item.time);
const count = [];
- for (let i = 0; i < this.dataCount.oilNames.length; i++) {
- let a = {
- name: this.dataCount.oilNames[i],
- color: color[i],
- type: 'bar',
- tooltip: {
- valueFormatter: function (value) {
- return value;
- }
- },
- barWidth: 13,
- itemStyle: {
- normal: {
- barBorderRadius: [50, 50, 0, 0]
- }
- },
- barGap: '60%',
- data: this.dataCount.oilData.map(item => item.money[i])
+ let c = ['product', ...this.dataCount.oilNames]
+ let countType = []
+ count.push(c)
+ this.dataCount.oilNames.forEach(item => {
+ let type={
+ type: 'bar'
}
+ countType.push(type)
+ })
+ this.dataCount.oilData.forEach(item => {
+ let a =[item.time, ...item.money]
+ console.log("a",a)
count.push(a)
- }
+ })
// 首页数据展示
const showTimes = this.dataShows.oilData.map(item => item.day);
const showCount = [];
- for (let i = 0; i < this.dataShows.oilNames.length; i++) {
- let a = {
- name: this.dataShows.oilNames[i],
- color: color[i],
- type: 'bar',
- tooltip: {
- valueFormatter: function (value) {
- return value;
- }
- },
- barWidth: 13,
- itemStyle: {
- normal: {
- barBorderRadius: [50, 50, 0, 0]
- }
- },
- barGap: '60%',
- data: this.dataShows.oilData.map(item => item.oilPrices[i])
- // data: oilAmountList
+ let cshow = ['product', ...this.dataCount.oilNames]
+ showCount.push(cshow)
+ let showCountType = []
+ this.dataCount.oilNames.forEach(item => {
+ let type={
+ type: 'bar'
}
+ showCountType.push(type)
+ })
+ this.dataCount.oilData.forEach(item => {
+ let a =[item.time, ...item.money]
+ console.log("a",a)
showCount.push(a)
- }
+ })
const option = {
color: [
@@ -726,18 +718,6 @@ export default {
name: '',
type: 'pie',
radius: '80%',
- // data: [
- // // { value: 28, name: '28%' },
- // // { value: 72, name: '72%' },
- // {
- // value: this.countPercentage(Number(this.storeAmount.oilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
- // name: "油品交易占比"
- // },
- // {
- // value: this.countPercentage(Number(this.storeAmount.noOilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
- // name: "非油品交易占比"
- // },
- //
// ],
data: this.dataAnalysisIfOilList,
emphasis: {
@@ -839,8 +819,11 @@ export default {
}
],
+ dataset: {
+ source: count
+ },
- series: count,
+ series: countType,
grid: {
left: '3%',
right: '3%',
@@ -848,6 +831,7 @@ export default {
containLabel: true
}
};
+ console.log("option3",option3)
const option4 = {
tooltip: {
trigger: 'axis',
@@ -881,7 +865,10 @@ export default {
}
}
],
- series: showCount,
+ dataset: {
+ source: showCount
+ },
+ series: showCountType,
grid: {
left: '3%',
right: '3%',
From 1da831fd2bd26deb1484e46a2be04cb9f058d294 Mon Sep 17 00:00:00 2001
From: cun-nan <19819293608@163.com>
Date: Wed, 16 Oct 2024 11:31:40 +0800
Subject: [PATCH 08/17] 10.16
---
.../fleet/controller/FleetInfoController.java | 2 +-
.../fleet/service/FleetInfoService.java | 2 +-
.../service/impl/FleetInfoServiceImpl.java | 7 ++-
.../service/impl/OilOrderServiceImpl.java | 6 +-
.../service/impl/LJUserServiceImpl.java | 7 ++-
.../views/cashier/NewComponents/newHome.vue | 27 +++++++--
.../newHomeComponents/carCard.vue | 55 +++++++++++++++++++
gasStation-uni/config.js | 4 +-
8 files changed, 97 insertions(+), 13 deletions(-)
create mode 100644 fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java
index 56770b4b0..dfbcd4052 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java
@@ -93,7 +93,7 @@ public class FleetInfoController extends BaseController {
*/
@GetMapping("/getFleetInfoByStoreId")
public ResponseObject getFleetInfoByStoreId(@Param("storeId")Integer storeId){
- return getSuccessResult(fleetInfoService.queryByStoreId(storeId));
+ return getSuccessResult(fleetInfoService.queryByStoreId(storeId,null));
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java
index fced3df7c..e57dc21e7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java
@@ -68,7 +68,7 @@ public interface FleetInfoService {
* @param storeId
* @return
*/
- List queryByStoreId(Integer storeId);
+ List queryByStoreId(Integer storeId,Integer userId);
/**
* 新增车队信息(小程序)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
index 353559f07..a3b9de855 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
@@ -233,12 +233,15 @@ public class FleetInfoServiceImpl extends ServiceImpl queryByStoreId(Integer storeId) {
+ public List queryByStoreId(Integer storeId,Integer userId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ if (ObjectUtil.isEmpty(userId)){
+ userId = nowAccountInfo.getId();
+ }
//查询当前登录人的车队信息
List fleetMembers = fleetMemberMapper.selectList(new LambdaQueryWrapper()
.eq(FleetMember::getStoreId, storeId)
- .eq(FleetMember::getUserId, nowAccountInfo.getId()));
+ .eq(FleetMember::getUserId, userId));
//获取所在车队的id集合
List fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
if (CollUtil.isEmpty(fleetIds)) {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
index 15162d936..f7c93fc68 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
@@ -22,6 +22,7 @@ import com.fuint.business.convenienceSore.entity.LJGoods;
import com.fuint.business.convenienceSore.entity.SaleDetail;
import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.convenienceSore.service.SaleDetailService;
+import com.fuint.business.fleet.service.FleetInfoService;
import com.fuint.business.integral.service.IntegralSettingsService;
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
@@ -198,6 +199,8 @@ public class OilOrderServiceImpl extends ServiceImpl i
private IMtUserFuelService userFuelService;
@Autowired
private CardValueRuleService cardValueRuleService;
+ @Autowired
+ private FleetInfoService fleetInfoService;
@Override
public IPage selectOilOrderList(Page page, OilOrder order) {
@@ -487,7 +490,8 @@ public class OilOrderServiceImpl extends ServiceImpl i
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId, transactionType, oilGunId);
if (ObjectUtil.isEmpty(merchantConfig) && !payType.equals("CASH") && !payType.equals("after_pay") &&
- !map.get("allAmount").equals("0")) {
+ !map.get("allAmount").equals("0") && !payType.equals("card_value") && !payType.equals("fule_card")
+ && !payType.equals("car_card_value")) {
orders.put("error", "请先配置支付通道");
return orders;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java
index bce6aede6..d774af90a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java
@@ -350,7 +350,7 @@ public class LJUserServiceImpl extends ServiceImpl impleme
List list = userFuelService.list(queryWrapper);
ljUserVo.setUserFuels(list);
//判断当前用户是否存在车队
- List fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId);
+ List fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId,null);
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
ljUserVo.setFleetInfoUniVos(fleetInfoUniVos);
}
@@ -381,6 +381,11 @@ public class LJUserServiceImpl extends ServiceImpl impleme
queryWrapper.eq(MtUserFuel::getStoreId,nowAccountInfo.getStoreId()).eq(MtUserFuel::getMtUserId,it.getId());
List list = userFuelService.list(queryWrapper);
it.setUserFuels(list);
+ //判断当前用户是否存在车队
+ List fleetInfoUniVos = fleetInfoService.queryByStoreId(nowAccountInfo.getStoreId(),it.getId());
+ if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
+ it.setFleetInfoUniVos(fleetInfoUniVos);
+ }
});
return ljUserVos;
}
diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue
index 80fc3ea87..85435a146 100644
--- a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue
+++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue
@@ -15,10 +15,12 @@
placement="bottom"
trigger="hover">
储值卡:¥{{ chooseVipUser.cardBalance || 0 }}
- 储值卡:¥1000.00
- 储值卡:¥1000.00
- 储值卡:¥1000.00
- 储值卡:¥1000.00
+
+
囤油卡:¥{{ item.fuelAmount }}
+
+
+
车队卡:¥{{ item.totalBalance }}
+
@@ -533,6 +535,18 @@
+
+
+
+
+
+
@@ -543,6 +557,7 @@ import pickUp from './newHomeComponents/pickUpTheOrder.vue'
import accountPending from './newHomeComponents/accountPending.vue'
import memberRecharge from './newHomeComponents/memberRecharge.vue'
import refuelingAmount from './newHomeComponents/refuelingAmount.vue'
+import carCard from "./newHomeComponents/carCard.vue";
import {
cashRegisterList,
cashRegisterGoodsList,
@@ -569,6 +584,7 @@ export default {
dicts: ['CardCoupon_type'],
data() {
return {
+ dialogVisible:false,
isClickable: false, // 默认不可点击
payForm: {
realyPayBills: 0.00,
@@ -787,7 +803,8 @@ export default {
pickUp,
accountPending,
memberRecharge,
- refuelingAmount
+ refuelingAmount,
+ carCard
},
created() {
//初始化 油枪 商品
diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue
new file mode 100644
index 000000000..acec171f4
--- /dev/null
+++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+ 车队卡支付时,必须选择车队卡名称后才能进行支付。
+
+
+
+ 元
+
+
+
+
+ 元
+
+
+
+
+
+
+
+
+
diff --git a/gasStation-uni/config.js b/gasStation-uni/config.js
index c7170c716..88bdc848c 100644
--- a/gasStation-uni/config.js
+++ b/gasStation-uni/config.js
@@ -5,8 +5,8 @@ module.exports = {
// baseUrl: 'https://www.tuofeng.cc/oilAdmin/',
// baseUrl: 'https://oilapi.youkerr.com/oilAdmin/',
// baseUrl: 'https://8q4f124343.yicp.fun/',
- baseUrl: 'http://47.94.122.58:8080/',
- // baseUrl: 'http://localhost:8080/',
+ // baseUrl: 'http://47.94.122.58:8080/',
+ baseUrl: 'http://localhost:8080/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息
From e677e8cc5d4c7bfaa6a90b5f09e205a5718332e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 11:43:39 +0800
Subject: [PATCH 09/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/views/shopowner.vue | 74 +++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 16 deletions(-)
diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue
index fbd5c910a..69d59cf92 100644
--- a/fuintAdmin/src/views/shopowner.vue
+++ b/fuintAdmin/src/views/shopowner.vue
@@ -374,7 +374,11 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.showValue = [start,new Date()]
+ this.value1 = [parseTime(new Date()),parseTime(new Date())]
+ }else if (command=='昨日'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
+ this.value1 = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
} else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
@@ -383,7 +387,14 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='本年'){
+ }else if (command=='本季度'){
+ let nowDate = new Date();
+ let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
+ let quarterEndMonth = quarterStartMonth + 2;
+ let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
+ let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
+ this.value1 = [parseTime(startDate), parseTime(endDate)];
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
@@ -406,7 +417,11 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.showValue = [start,new Date()]
+ this.showValue = [parseTime(new Date()),parseTime(new Date())]
+ }else if (command=='昨日'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
+ this.showValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
} else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
@@ -415,7 +430,14 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='本年'){
+ }else if (command=='本季度'){
+ let nowDate = new Date();
+ let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
+ let quarterEndMonth = quarterStartMonth + 2;
+ let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
+ let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
+ this.showValue = [parseTime(startDate), parseTime(endDate)];
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
@@ -435,16 +457,27 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.countValue = [start,new Date()]
+ // this.countValue = [start,new Date()]
+ this.countValue = [parseTime(new Date()),parseTime(new Date())]
+ }else if (command=='昨日'){
+ let nowDate = new Date();
+ let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
+ this.countValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
} else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本月'){
- console.log('进入了人本月')
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ }else if (command=='本季度'){
+ let nowDate = new Date();
+ let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
+ let quarterEndMonth = quarterStartMonth + 2;
+ let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
+ let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
+ this.countValue = [parseTime(startDate), parseTime(endDate)];
} else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
@@ -468,14 +501,21 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一月'){
+ } else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一年'){
+ }else if (command=='本季度'){
+ let nowDate = new Date();
+ let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
+ let quarterEndMonth = quarterStartMonth + 2;
+ let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
+ let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
+ this.value2 = [parseTime(startDate), parseTime(endDate)];
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
@@ -658,27 +698,30 @@ export default {
})
this.dataCount.oilData.forEach(item => {
let a =[item.time, ...item.money]
- console.log("a",a)
count.push(a)
})
// 首页数据展示
const showTimes = this.dataShows.oilData.map(item => item.day);
const showCount = [];
- let cshow = ['product', ...this.dataCount.oilNames]
+ let cshow = ['product', ...this.dataShows.oilNames]
showCount.push(cshow)
let showCountType = []
- this.dataCount.oilNames.forEach(item => {
+ console.log("看看执行")
+ this.dataShows.oilNames.forEach(item => {
let type={
type: 'bar'
}
showCountType.push(type)
})
- this.dataCount.oilData.forEach(item => {
- let a =[item.time, ...item.money]
- console.log("a",a)
+ console.log(this.dataShows.oilData)
+ this.dataShows.oilData.forEach(item => {
+ let a =[item.day, ...item.oilPrices]
showCount.push(a)
+ console.log("showCount",a)
})
+ console.log("showCount",showCount)
+ console.log("showCountType",showCountType)
const option = {
color: [
@@ -831,7 +874,6 @@ export default {
containLabel: true
}
};
- console.log("option3",option3)
const option4 = {
tooltip: {
trigger: 'axis',
From 5c3391599e9becae40162fd8117b671f019343ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 12:38:22 +0800
Subject: [PATCH 10/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/FleetMemberServiceImpl.java | 7 ++--
.../service/impl/AllOrderInfoServiceImpl.java | 36 +++++++++++++++++--
2 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java
index a19879f47..7f8b542a9 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java
@@ -128,18 +128,17 @@ public class FleetMemberServiceImpl extends ServiceImpl
()
.eq(FleetMember::getMobile, fleetMember.getMobile())
- .eq(FleetMember::getFleetId, fleetMember.getFleetId())
.last("limit 1"));
if (ObjectUtil.isNotEmpty(fleetMember2)) {
- throw new RuntimeException("该用户已加入该车队");
+ throw new RuntimeException("该用户已绑定车队");
}
// if (ObjectUtil.isNotEmpty(fleetMember1)) {
// return 0;
// }
-// LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile());
+
//判断当前车队成员否存在账号
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper()
.eq(MtUser::getMobile, fleetMember.getMobile())
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java
index 0e48a7c43..d7aba0d1f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java
@@ -1873,12 +1873,16 @@ public class AllOrderInfoServiceImpl extends ServiceImpl oilNumbers = oilNumberMapper.selectAllOil(nowAccountInfo.getStoreId());
List oilNames = oilNumbers.stream().map(oil -> oil.getOilNames() + oil.getOilType()).collect(Collectors.toList());
homeDataShowVo.setOilNames(oilNames);
- //判断开始时间减去结束时间是否大于等于一年
+ //判断开始时间减去结束时间是否大于等于60天
List days = getAllDatesBetween(startTime, endTime);
Integer type = 0;
if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) >= 60) {
days = getAllDatesBetweenYear(startTime, endTime);
type = 1;
+ //判断是否小于等于1天
+ } else if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) <= 1) {
+ days = getAllDatesBetweenDay(DateUtil.beginOfDay(DateUtil.parse(startTime)).toString(), DateUtil.endOfDay(DateUtil.parse(endTime)).toString());
+ type = 2;
}
//根据开始时间与结束时间获取所有天数
//查询所有订单
@@ -1898,6 +1902,10 @@ public class AllOrderInfoServiceImpl extends ServiceImpl dateList = new ArrayList<>();
while (!startDate.isAfter(endDate)) {
dateList.add(startDate.format(formatter));
- startDate = startDate.plusDays(30);
+ startDate = startDate.plusMonths(1);
}
return dateList;
}
+ public List getAllDatesBetweenDay(String startTime, String endTime) {
+
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+ LocalDateTime startDate = LocalDateTime.parse(startTime, formatter);
+ LocalDateTime endDate = LocalDateTime.parse(endTime, formatter);
+
+ List dateList = new ArrayList<>();
+ while (!startDate.isAfter(endDate)) {
+ dateList.add(startDate.format(formatter));
+ startDate = startDate.plusHours(1);
+ }
+
+
+ return dateList;
+ }
+
/**
* 计算指定支付时间范围和油品名称下的累计支付金额
*
@@ -2085,6 +2109,9 @@ public class AllOrderInfoServiceImpl extends ServiceImpl= 60) {
allDatesBetween = getAllDatesBetweenYear(startTime, endTime);
type = 1;
+ } else if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) <= 1) {
+ allDatesBetween = getAllDatesBetweenDay(DateUtil.beginOfDay(DateUtil.parse(startTime)).toString(), DateUtil.endOfDay(DateUtil.parse(endTime)).toString());
+ type = 2;
}
List oilNames = new ArrayList<>();
@@ -2105,6 +2132,11 @@ public class AllOrderInfoServiceImpl extends ServiceImpl
Date: Wed, 16 Oct 2024 13:11:01 +0800
Subject: [PATCH 11/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/order/service/impl/AllOrderInfoServiceImpl.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java
index d7aba0d1f..ec53dc94c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java
@@ -1903,7 +1903,8 @@ public class AllOrderInfoServiceImpl extends ServiceImpl
Date: Wed, 16 Oct 2024 13:28:52 +0800
Subject: [PATCH 12/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/FleetMemberController.java | 10 +
.../fleet/service/FleetMemberService.java | 7 +
.../service/impl/FleetMemberServiceImpl.java | 43 ++
.../pagesMy/fleetMember/addMember.vue | 505 +++++++++---------
4 files changed, 317 insertions(+), 248 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java
index b6cf39bf3..d2d2cbcc0 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java
@@ -92,6 +92,16 @@ public class FleetMemberController extends BaseController {
public ResponseObject add(@RequestBody FleetMember fleetMember) {
return getSuccessResult(fleetMemberService.insert(fleetMember));
}
+ /**
+ * 新增数据(小程序)
+ *
+ * @param fleetMember 实体
+ * @return 新增结果
+ */
+ @PostMapping("addUni")
+ public ResponseObject addUni(@RequestBody FleetMember fleetMember) {
+ return getSuccessResult(fleetMemberService.insertUni(fleetMember));
+ }
/**
* 编辑数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java
index 6934d28e9..fa3b5eb6f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java
@@ -49,6 +49,13 @@ public interface FleetMemberService {
* @return 实例对象
*/
int insert(FleetMember fleetMember);
+ /**
+ * 新增数据
+ *
+ * @param fleetMember 实例对象
+ * @return 实例对象
+ */
+ int insertUni(FleetMember fleetMember);
/**
* 新增数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java
index 7f8b542a9..7a153b6a9 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java
@@ -167,6 +167,49 @@ public class FleetMemberServiceImpl extends ServiceImpl()
+ .eq(FleetMember::getMobile, fleetMember.getMobile())
+ .last("limit 1"));
+ if (ObjectUtil.isNotEmpty(fleetMember2)) {
+// throw new RuntimeException("该用户已绑定车队");
+ return 0;
+ }
+
+ //判断当前车队成员否存在账号
+ MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper()
+ .eq(MtUser::getMobile, fleetMember.getMobile())
+ .last("limit 1"));
+ if (ObjectUtil.isEmpty(mtUser)) {
+ //注册用户
+ mtUser = new MtUser();
+ mtUser.setUserNo(editUserNo());
+ mtUser.setMobile(fleetMember.getMobile());
+ mtUser.setName(fleetMember.getName());
+ mtUser.setDescription("车队成员自动注册");
+ mtUser.setCreateTime(DateUtil.date());
+ mtUserMapper.insert(mtUser);
+
+ createVaseInfo(mtUser, nowAccountInfo.getStoreId().toString(), null, null);
+ }
+
+ fleetMember.setUserId(mtUser.getId());
+ fleetMember.setCarNum(mtUser.getCarNo());
+ fleetMember.setStoreId(nowAccountInfo.getStoreId());
+ fleetMember.setChainStoreId(nowAccountInfo.getChainStoreId());
+ return baseMapper.insert(fleetMember);
+ }
+
@Override
public int insertFleetMember(FleetMemberVo fleetMember) {
FleetMember fleetMember1 = queryByMobile(fleetMember);
diff --git a/gasStation-uni/pagesMy/fleetMember/addMember.vue b/gasStation-uni/pagesMy/fleetMember/addMember.vue
index 78a916890..ae39909ae 100644
--- a/gasStation-uni/pagesMy/fleetMember/addMember.vue
+++ b/gasStation-uni/pagesMy/fleetMember/addMember.vue
@@ -1,272 +1,281 @@
-
-
-
- *姓名
-
-
-
-
-
- *手机号
-
-
-
-
-
- 会员卡号
-
-
-
-
-
- 车牌号
-
-
-
-
-
- *副卡类型
-
- 共享副卡-不限额
- 共享副卡-限额
- 独立副卡
-
-
-
-
- *是否开启消费通知
-
-
-
-
-
- *是否启用
-
-
-
-
-
-
-
- 注:
-
-
- 共享副卡-不限额:副卡与主卡共享钱包,同步余额。
- 共享副卡-限额:副卡与主卡共享钱包,副卡可设置限额。
- 独立副卡:副卡与主卡独立钱包,独立余额。
-
-
+
+
+
+ *姓名
+
+
+
+
+
+ *手机号
+
+
+
+
+
+ 会员卡号
+
+
+
+
+
+ 车牌号
+
+
+
+
+
+ *副卡类型
+
+ 共享副卡-不限额
+ 共享副卡-限额
+ 独立副卡
+
+
+
+
+ *是否开启消费通知
+
+
+
+
+
+ *是否启用
+
+
+
+
+
+
+
+
+
+ 注:
+
+
+ 共享副卡-不限额:副卡与主卡共享钱包,同步余额。
+ 共享副卡-限额:副卡与主卡共享钱包,副卡可设置限额。
+ 独立副卡:副卡与主卡独立钱包,独立余额。
+
+
- 保存
+ 保存
-
-
-
+
+
+
-
+
\ No newline at end of file
+.but-sub {
+ width: 305px;
+ height: 40px;
+ line-height: 40px;
+ margin: 0 auto;
+ background-color: #FF9655;
+ color: white;
+ border-radius: 50px;
+ text-align: center;
+ position: absolute;
+ bottom: 40px;
+ left: 11%;
+}
+
From e28039b063ecf9517cc055a12b9a489b14fd1178 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 13:58:42 +0800
Subject: [PATCH 13/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/FleetInfoServiceImpl.java | 24 +++++++++++--------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
index a3b9de855..c269bbea3 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
@@ -428,20 +428,24 @@ public class FleetInfoServiceImpl extends ServiceImpl()
- .eq(FleetInfo::getId, fleetConsumeRecord.getFleetId()));
- //判断支付金额是否超过当前余额
- if (money > fleetInfo.getTotalBalance()){
- throw new RuntimeException("支付金额超过当前余额");
- }
-
+ //根据用户id,查询车队信息
//查找车队成员
FleetMember fleetMember = fleetMemberMapper.selectOne(new LambdaQueryWrapper()
- .eq(FleetMember::getId, fleetConsumeRecord.getFleetMemberId()));
+ .eq(FleetMember::getUserId, allOrderInfo.getUserId())
+ .orderBy(true,true,FleetMember::getCreateTime)
+ .last("limit 1"));
+ // 获取当前车队卡
+ FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper()
+ .eq(FleetInfo::getId, fleetMember.getFleetId()));
+ //判断支付金额是否超过当前余额
+ if (money > fleetInfo.getTotalBalance()){
+ throw new RuntimeException("支付金额超过当前车队余额");
+ }
+
+
//判断成员的余额是否足够支付
if (money > fleetMember.getRemainingCreditLimit()) {
- throw new RuntimeException("支付金额超过当前余额");
+ throw new RuntimeException("支付金额超过当前剩余额度");
}
//更新时间
From b78e2a0f1d1ea2abc93c08f1d2eb3b99863026c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 14:03:35 +0800
Subject: [PATCH 14/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fleet/service/impl/FleetInfoServiceImpl.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
index c269bbea3..6160fb432 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
@@ -524,6 +524,15 @@ public class FleetInfoServiceImpl extends ServiceImpl()
+ .eq(FleetMember::getUserId, allOrderInfo.getUserId()));
+ fleetMember.setRemainingCreditLimit(fleetMember.getRemainingCreditLimit() + refundMoney);
+ fleetMember.setUsedCreditLimit(fleetMember.getUsedCreditLimit() - refundMoney);
+ fleetMember.setUpdateBy(nowAccountInfo.getStaffId().toString());
+ fleetMember.setUpdateTime(DateUtil.date());
+ //更新余额
+ fleetMemberMapper.updateById(fleetMember);
//将车队订单表改为退款
fleetConsumeRecord.setOrderStatus("refund");
fleetConsumeRecord.setUpdateTime(DateUtil.date());
From 4bcc6fbe0242586ea65f9ce76463807acd0f7f94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 14:05:40 +0800
Subject: [PATCH 15/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/FleetInfoServiceImpl.java | 69 +++++++++----------
1 file changed, 33 insertions(+), 36 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
index 6160fb432..c900e76cd 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java
@@ -212,7 +212,7 @@ public class FleetInfoServiceImpl extends ServiceImpl queryByStoreId(Integer storeId,Integer userId) {
+ public List queryByStoreId(Integer storeId, Integer userId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
- if (ObjectUtil.isEmpty(userId)){
+ if (ObjectUtil.isEmpty(userId)) {
userId = nowAccountInfo.getId();
}
//查询当前登录人的车队信息
@@ -386,7 +386,7 @@ public class FleetInfoServiceImpl extends ServiceImpl 0) {
return fleetInfo.getId();
- }else {
+ } else {
throw new RuntimeException("编辑失败");
}
}
@@ -432,13 +432,13 @@ public class FleetInfoServiceImpl extends ServiceImpl()
.eq(FleetMember::getUserId, allOrderInfo.getUserId())
- .orderBy(true,true,FleetMember::getCreateTime)
+ .orderBy(true, true, FleetMember::getCreateTime)
.last("limit 1"));
// 获取当前车队卡
FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper()
.eq(FleetInfo::getId, fleetMember.getFleetId()));
//判断支付金额是否超过当前余额
- if (money > fleetInfo.getTotalBalance()){
+ if (money > fleetInfo.getTotalBalance()) {
throw new RuntimeException("支付金额超过当前车队余额");
}
@@ -510,36 +510,33 @@ public class FleetInfoServiceImpl extends ServiceImpl()
- .eq(FleetInfo::getId, fleetConsumeRecord.getFleetId()));
- //计算赠送金额与充值金额比例
- double recharge = fleetInfo.getRechargeAmount() / fleetInfo.getTotalBalance();
- double give = fleetInfo.getGiveAmount() / fleetInfo.getTotalBalance();
- fleetInfo.setTotalBalance(fleetInfo.getTotalBalance() + refundMoney);
- fleetInfo.setRechargeAmount(fleetInfo.getRechargeAmount() + (refundMoney * recharge));
- fleetInfo.setGiveAmount(fleetInfo.getGiveAmount() + (refundMoney * give));
- //将退款金额修改回去
- baseMapper.updateById(fleetInfo);
- //修改车队成员的余额
- FleetMember fleetMember = fleetMemberMapper.selectOne(new LambdaQueryWrapper()
- .eq(FleetMember::getUserId, allOrderInfo.getUserId()));
- fleetMember.setRemainingCreditLimit(fleetMember.getRemainingCreditLimit() + refundMoney);
- fleetMember.setUsedCreditLimit(fleetMember.getUsedCreditLimit() - refundMoney);
- fleetMember.setUpdateBy(nowAccountInfo.getStaffId().toString());
- fleetMember.setUpdateTime(DateUtil.date());
- //更新余额
- fleetMemberMapper.updateById(fleetMember);
- //将车队订单表改为退款
- fleetConsumeRecord.setOrderStatus("refund");
- fleetConsumeRecord.setUpdateTime(DateUtil.date());
- fleetConsumeRecord.setUpdateBy(nowAccountInfo.getStaffId().toString());
- return fleetConsumeRecordMapper.updateById(fleetConsumeRecord);
- }
- return 0;
+ //退款金额
+ Double refundMoney = fleetConsumeRecord.getNetReceiptsAmount();
+ //获取当前车队卡
+ FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper()
+ .eq(FleetInfo::getId, fleetConsumeRecord.getFleetId()));
+ //计算赠送金额与充值金额比例
+ double recharge = fleetInfo.getRechargeAmount() / fleetInfo.getTotalBalance();
+ double give = fleetInfo.getGiveAmount() / fleetInfo.getTotalBalance();
+ fleetInfo.setTotalBalance(fleetInfo.getTotalBalance() + refundMoney);
+ fleetInfo.setRechargeAmount(fleetInfo.getRechargeAmount() + (refundMoney * recharge));
+ fleetInfo.setGiveAmount(fleetInfo.getGiveAmount() + (refundMoney * give));
+ //将退款金额修改回去
+ baseMapper.updateById(fleetInfo);
+ //修改车队成员的余额
+ FleetMember fleetMember = fleetMemberMapper.selectOne(new LambdaQueryWrapper()
+ .eq(FleetMember::getUserId, allOrderInfo.getUserId()));
+ fleetMember.setRemainingCreditLimit(fleetMember.getRemainingCreditLimit() + refundMoney);
+ fleetMember.setUsedCreditLimit(fleetMember.getUsedCreditLimit() - refundMoney);
+ fleetMember.setUpdateBy(nowAccountInfo.getStaffId().toString());
+ fleetMember.setUpdateTime(DateUtil.date());
+ //更新余额
+ fleetMemberMapper.updateById(fleetMember);
+ //将车队订单表改为退款
+ fleetConsumeRecord.setOrderStatus("refund");
+ fleetConsumeRecord.setUpdateTime(DateUtil.date());
+ fleetConsumeRecord.setUpdateBy(nowAccountInfo.getStaffId().toString());
+ return fleetConsumeRecordMapper.updateById(fleetConsumeRecord);
}
From cf5d8d46f71d0eed77d82702d30b339d418afd98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Wed, 16 Oct 2024 15:09:44 +0800
Subject: [PATCH 16/17] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/views/shopowner.vue | 164 ++++++++++++------
.../business/member/mapper/LJStaffMapper.java | 2 +-
.../member/mapper/xml/LJStaffMapper.xml | 6 +-
.../order/controller/OilOrderController.java | 4 +-
.../order/service/OilOrderService.java | 2 +-
.../service/impl/OilOrderServiceImpl.java | 4 +-
6 files changed, 121 insertions(+), 61 deletions(-)
diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue
index 69d59cf92..654bffe7c 100644
--- a/fuintAdmin/src/views/shopowner.vue
+++ b/fuintAdmin/src/views/shopowner.vue
@@ -266,9 +266,9 @@ export default {
data() {
return {
amountList:[
- "今日" ,
- "昨日" ,
- "本周" ,
+ // "今日" ,
+ // "昨日" ,
+ "近一周" ,
"本月" ,
"本季度" ,
"本年"
@@ -348,7 +348,7 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.value2 = [start, new Date()];
+ this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)]
this.getStoreList()
this.getHardwareList()
this.getNoticeList()
@@ -379,25 +379,19 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
- } else if (command=='本周'){
+ } else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本月'){
- let nowDate = new Date();
- let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getMonthStartAndToday();
+ this.value1 = [parseTime(startTime),parseTime(endTime)]
}else if (command=='本季度'){
- let nowDate = new Date();
- let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
- let quarterEndMonth = quarterStartMonth + 2;
- let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
- let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
- this.value1 = [parseTime(startDate), parseTime(endDate)];
+ const [startTime, endTime] = this.getQuarterStartAndEnd();
+ this.value1 = [parseTime(startTime), parseTime(endTime)];
} else if (command=='本年'){
- let nowDate = new Date();
- let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getYearStartAndEnd();
+ this.value1 = [parseTime(startTime),parseTime(endTime)]
}else if (command=='自定义'){
this.disabled = false
}
@@ -422,25 +416,21 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
this.showValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
- } else if (command=='本周'){
+ } else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getMonthStartAndToday();
+ this.showValue = [parseTime(startTime),parseTime(endTime)]
}else if (command=='本季度'){
- let nowDate = new Date();
- let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
- let quarterEndMonth = quarterStartMonth + 2;
- let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
- let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
- this.showValue = [parseTime(startDate), parseTime(endDate)];
+ const [startTime, endTime] = this.getQuarterStartAndEnd();
+ this.showValue = [parseTime(startTime), parseTime(endTime)];
} else if (command=='本年'){
- let nowDate = new Date();
- let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getYearStartAndEnd();
+ this.showValue = [parseTime(startTime),parseTime(endTime)]
}else if (command=='自定义'){
this.disabled = false
}
@@ -463,25 +453,21 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 1 * 24 * 60 * 60 * 1000)
this.countValue = [parseTime(oneWeekAgo),parseTime(oneWeekAgo)]
- } else if (command=='本周'){
+ } else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getMonthStartAndToday();
+ this.countValue = [parseTime(startTime),parseTime(endTime)]
}else if (command=='本季度'){
- let nowDate = new Date();
- let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
- let quarterEndMonth = quarterStartMonth + 2;
- let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
- let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
- this.countValue = [parseTime(startDate), parseTime(endDate)];
+ const [startTime, endTime] = this.getQuarterStartAndEnd();
+ this.countValue = [parseTime(startTime), parseTime(endTime)];
} else if (command=='本年'){
- let nowDate = new Date();
- let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getYearStartAndEnd();
+ this.countValue = [parseTime(startTime),parseTime(endTime)]
}else if (command=='自定义'){
this.disabled = false
}
@@ -497,34 +483,108 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.value2 = [start,new Date()]
- } else if (command=='本周'){
+ } else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getMonthStartAndToday();
+ this.value2 = [parseTime(startTime),parseTime(endTime)]
}else if (command=='本季度'){
- let nowDate = new Date();
- let quarterStartMonth = Math.floor((nowDate.getMonth() + 1) / 3) * 3 - 2;
- let quarterEndMonth = quarterStartMonth + 2;
- let startDate = new Date(nowDate.getFullYear(), quarterStartMonth, 1);
- let endDate = new Date(nowDate.getFullYear(), quarterEndMonth + 1, 0);
- this.value2 = [parseTime(startDate), parseTime(endDate)];
+ const [startTime, endTime] = this.getQuarterStartAndEnd();
+ this.value2 = [parseTime(startTime), parseTime(endTime)];
} else if (command=='本年'){
- let nowDate = new Date();
- let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ const [startTime, endTime] = this.getYearStartAndEnd();
+ this.value2 = [parseTime(startTime),parseTime(endTime)]
}else if (command=='自定义'){
this.disabled = false
}
- this.getStoreList()
+ this.getEmployeList()
+ },
+ getMonthStartAndToday() {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = now.getMonth();
+
+ // 获取当前月的第一天
+ const monthStart = new Date(year, month, 1);
+
+ // 获取当前月的最后一天
+ const monthEnd = new Date(year, month + 1, 0);
+
+ // 格式化输出
+ const format = (date) => {
+ const year = date.getFullYear();
+ const month = ('0' + (date.getMonth() + 1)).slice(-2);
+ const day = ('0' + date.getDate()).slice(-2);
+ return `${year}-${month}-${day}`;
+ };
+
+ const startTime = format(monthStart);
+ const endTime = format(monthEnd);
+
+ return [startTime, endTime];
+ },
+ getQuarterStartAndEnd() {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = now.getMonth();
+
+ // 计算当前季度的起始月份
+ const quarterStartMonth = Math.floor(month / 3) * 3;
+
+ // 获取当前季度的第一天
+ const quarterStart = new Date(year, quarterStartMonth, 1);
+
+ // 获取当前季度的最后一天
+ const quarterEnd = new Date(year, quarterStartMonth + 3, 0);
+
+ // 格式化输出
+ const format = (date) => {
+ const year = date.getFullYear();
+ const month = ('0' + (date.getMonth() + 1)).slice(-2);
+ const day = ('0' + date.getDate()).slice(-2);
+ return `${year}-${month}-${day}`;
+ };
+
+ const startTime = format(quarterStart);
+ const endTime = format(quarterEnd);
+
+ return [startTime, endTime];
+ },
+ getYearStartAndEnd() {
+ const now = new Date();
+ const year = now.getFullYear();
+
+ // 获取当前年的第一天
+ const yearStart = new Date(year, 0, 1);
+
+ // 获取当前年的最后一天
+ const yearEnd = new Date(year, 11, 31);
+
+ // 格式化输出
+ const format = (date) => {
+ const year = date.getFullYear();
+ const month = ('0' + (date.getMonth() + 1)).slice(-2);
+ const day = ('0' + date.getDate()).slice(-2);
+ return `${year}-${month}-${day}`;
+ };
+
+ const startTime = format(yearStart);
+ const endTime = format(yearEnd);
+
+ return [startTime, endTime];
},
// 获取员工排行信息
getEmployeList() {
this.employeLoading = true
- employeeSalesApi().then(res => {
+ let data = {
+ startTime: this.value2[0],
+ endTime: this.value2[1]
+ }
+ employeeSalesApi(data).then(res => {
if (res.code == 200) {
if (res.data.length >= 10) {
this.employeList = res.data.slice(0, 10);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/LJStaffMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/LJStaffMapper.java
index 272d0187c..7e4529a14 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/LJStaffMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/LJStaffMapper.java
@@ -38,7 +38,7 @@ public interface LJStaffMapper extends BaseMapper {
*/
int auditPrem(@Param("id")Integer id,@Param("auditPrem") String auditPrem);
- List