From 25e3e85f3d9c0f4a33ac46b576997e70ce6eb2d7 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期四, 16 一月 2025 10:43:35 +0800
Subject: [PATCH] 增加了一个打印信息
---
zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
index 3907ded..d2a16a8 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
@@ -4,7 +4,6 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.domain.TravelCount;
@@ -17,7 +16,6 @@
import org.springframework.transaction.annotation.Transactional;
import java.text.DecimalFormat;
-import java.util.Date;
import java.util.List;
/**
@@ -38,7 +36,7 @@
private TravelCountService travelCountService;
@Override
- public AjaxResult selectDataList(Long userId, Integer pageNum, Integer pageSize, TravelCount travelCount, @JsonFormat(pattern = "yyyy-MM-dd") Date happenStartTime, @JsonFormat(pattern = "yyyy-MM-dd") Date happenEndTime) {
+ public AjaxResult selectDataList(Long userId, Integer pageNum, Integer pageSize, TravelCount travelCount, String happenStartTime, String happenEndTime) {
//璁剧疆鏌ヨ鏉′欢
LambdaQueryWrapper<TravelCount> lqw = new LambdaQueryWrapper<>();
lqw.eq(TravelCount::getUid,userId);
@@ -58,8 +56,7 @@
if(happenEndTime!=null){
lqw.lt(TravelCount::getEndTime,happenEndTime);
}
-
-
+ lqw.orderByDesc(TravelCount::getCreateTime);
Page<TravelCount> resultPage = page(new Page<>(pageNum, pageSize), lqw);
resultPage.getRecords().forEach(this::inputTotalData);
@@ -94,20 +91,21 @@
double eatTotal = 0;
double stayTotal = 0;
double travelTotal = 0;
-
+ double shopTotal = 0;
//鎶婃墍鏈夎缁嗘暟鎹殑璐圭敤鍊肩疮鍔犺捣鏉�
for (TravelDetail detail : travelDetailList) {
entranceTotal+=detail.getEntrance();
eatTotal+=detail.getEat();
stayTotal+=detail.getStay();
travelTotal+=detail.getTravel();
+ shopTotal += detail.getShop();
}
travelCount.setEntranceTotal(entranceTotal);
travelCount.setEatTotal(eatTotal);
travelCount.setStayTotal(stayTotal);
travelCount.setTravelTotal(travelTotal);
-
+ travelCount.setShopTotal(shopTotal);
DecimalFormat df = new DecimalFormat("0.00");
travelCount.setTotalPrice(Double.parseDouble(df.format(entranceTotal+eatTotal+travelCount.getGroupTotal()+stayTotal+travelTotal)));
}
--
Gitblit v1.9.1