From 606d9a91c5457ff4f11f1a527a9eaaa9167ef961 Mon Sep 17 00:00:00 2001 From: nixj Date: Tue, 7 May 2024 14:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90add=E3=80=91=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/aggregates/order/OrderDetail.java | 5 ++- .../manage/controller/ManageController.java | 11 +++++ .../manage/entity/ConsumptionDetailExcel.java | 41 +++++++++++++++++++ .../chint/manage/service/ManageService.java | 8 ++++ .../service/impl/ManageServiceImpl.java | 12 ++++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/chint/manage/controller/ManageController.java create mode 100644 src/main/java/com/chint/manage/entity/ConsumptionDetailExcel.java create mode 100644 src/main/java/com/chint/manage/service/ManageService.java create mode 100644 src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java diff --git a/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java b/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java index e18d02ea..d3abde33 100644 --- a/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java +++ b/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java @@ -41,7 +41,10 @@ public class OrderDetail implements Serializable { private String travelOrderNo; private String orderNo; private String supplierName; - private Integer productType; // 商品类型 + /** + * 商品类型 0-火车 1飞机 2酒店 3打车 4其他 + */ + private Integer productType; private Integer quantity; // 数量 private String price; // 价格 private CurrencyType currencyType; //货币类型 diff --git a/src/main/java/com/chint/manage/controller/ManageController.java b/src/main/java/com/chint/manage/controller/ManageController.java new file mode 100644 index 00000000..aab08ca1 --- /dev/null +++ b/src/main/java/com/chint/manage/controller/ManageController.java @@ -0,0 +1,11 @@ +package com.chint.manage.controller; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@RestController +@RequestMapping("/manage") +public class ManageController { +} diff --git a/src/main/java/com/chint/manage/entity/ConsumptionDetailExcel.java b/src/main/java/com/chint/manage/entity/ConsumptionDetailExcel.java new file mode 100644 index 00000000..0e69f9f2 --- /dev/null +++ b/src/main/java/com/chint/manage/entity/ConsumptionDetailExcel.java @@ -0,0 +1,41 @@ +package com.chint.manage.entity; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.HeadFontStyle; +import com.alibaba.excel.annotation.write.style.HeadStyle; +import com.alibaba.excel.enums.poi.FillPatternTypeEnum; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +/** + * 消费明细 + * @Author:nxj + * @Date:2024/5/7 14:17 + */ +@Data +@NoArgsConstructor +@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL) // 设置表头背景为无色 +@HeadFontStyle(fontHeightInPoints = 10) +@ColumnWidth(16) +public class ConsumptionDetailExcel { + @ExcelProperty("出行人姓名") + private String supplierName; + @ExcelProperty("出发时间") + private String startTime; + @ExcelProperty("到达时间") + private String arriveTime; + @ExcelProperty("出发城市") + private String fromCity; + @ExcelProperty("到达城市") + private String toCity; + @ExcelProperty("出发站") + private String fromStationName; + @ExcelProperty("到达站") + private String toStationName; + @ExcelProperty("订单总额(含前收服务费)") + private String payAmount; + +} diff --git a/src/main/java/com/chint/manage/service/ManageService.java b/src/main/java/com/chint/manage/service/ManageService.java new file mode 100644 index 00000000..91829fb0 --- /dev/null +++ b/src/main/java/com/chint/manage/service/ManageService.java @@ -0,0 +1,8 @@ +package com.chint.manage.service; +/** + * + * @Author:nxj + * @Date:2024/5/7 14:18 + */ +public interface ManageService { +} diff --git a/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java new file mode 100644 index 00000000..888c461a --- /dev/null +++ b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java @@ -0,0 +1,12 @@ +package com.chint.manage.service.impl; + +import com.chint.manage.service.ManageService; +import org.springframework.stereotype.Component; +/** + * + * @Author:nxj + * @Date:2024/5/7 14:18 + */ +@Component +public class ManageServiceImpl implements ManageService { +}