diff --git a/xhpc-modules/pom.xml b/xhpc-modules/pom.xml
index 50a08d65..9142499f 100644
--- a/xhpc-modules/pom.xml
+++ b/xhpc-modules/pom.xml
@@ -17,6 +17,7 @@
xhpc-payment
xhpc-order
xhpc-wxma
+ xhpc-invoice
xhpc-modules
diff --git a/xhpc-modules/xhpc-invoice/pom.xml b/xhpc-modules/xhpc-invoice/pom.xml
new file mode 100644
index 00000000..a4ef328e
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/pom.xml
@@ -0,0 +1,136 @@
+
+
+
+ xhpc-modules
+ com.ruoyi
+ 3.0.0
+
+ 4.0.0
+
+ xhpc-invoice
+
+
+ 发票服务
+
+
+
+ 8
+ 8
+
+
+
+
+
+
+ junit
+ junit
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ io.springfox
+ springfox-swagger-ui
+ ${swagger.fox.version}
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+
+ com.ruoyi
+ ruoyi-common-datasource
+
+
+
+
+ com.ruoyi
+ ruoyi-common-datascope
+
+
+
+
+ com.ruoyi
+ ruoyi-common-log
+
+
+
+
+ com.ruoyi
+ ruoyi-common-swagger
+
+
+ com.ruoyi
+ ruoyi-common-core
+
+
+ com.squareup.okhttp3
+ okhttp
+
+
+ com.ruoyi
+ xhpc-common
+ 3.0.0
+ compile
+
+
+
+
+ ${project.artifactId}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.4.0
+
+
+
+ repackage
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/XhpcInvoiceApplication.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/XhpcInvoiceApplication.java
new file mode 100644
index 00000000..51a0ad3d
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/XhpcInvoiceApplication.java
@@ -0,0 +1,37 @@
+package com.xhpc.invoice;
+
+import com.xhpc.common.security.annotation.EnableCustomConfig;
+import com.xhpc.common.security.annotation.EnableRyFeignClients;
+import com.xhpc.common.swagger.annotation.EnableCustomSwagger2;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @author WH
+ * @date 2021/12/7 14:55
+ * @since version-1.0
+ */
+@EnableCustomConfig
+@EnableCustomSwagger2
+@EnableRyFeignClients
+@SpringBootApplication
+@MapperScan("com.xhpc.invoice.mapper")
+public class XhpcInvoiceApplication {
+
+ public static void main(String[] args) {
+
+ SpringApplication.run(XhpcInvoiceApplication.class, args);
+ System.out.println("(♥◠‿◠)ノ゙ 发票模块启动成功 ლ(´ڡ`ლ)゙ \n" +
+ " .-------. ____ __ \n" +
+ " | _ _ \\ \\ \\ / / \n" +
+ " | ( ' ) | \\ _. / ' \n" +
+ " |(_ o _) / _( )_ .' \n" +
+ " | (_,_).' __ ___(_ o _)' \n" +
+ " | |\\ \\ | || |(_,_)' \n" +
+ " | | \\ `' /| `-' / \n" +
+ " | | \\ / \\ / \n" +
+ " ''-' `'-' `-..-' ");
+ }
+
+}
diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/controller/XhpcInvoiceController.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/controller/XhpcInvoiceController.java
new file mode 100644
index 00000000..393b0d3c
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/controller/XhpcInvoiceController.java
@@ -0,0 +1,65 @@
+package com.xhpc.invoice.controller;
+
+import com.xhpc.common.core.web.controller.BaseController;
+import com.xhpc.common.core.web.domain.AjaxResult;
+import com.xhpc.invoice.domain.AllInvoiceOrdersRequest;
+import com.xhpc.invoice.domain.SpecificInvoiceWrap;
+import com.xhpc.invoice.service.XhpcInvoiceService;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Map;
+
+/**
+ * 关于后台处理发票的接口
+ *
+ * @author WH
+ * @date 2021/12/20 10:47
+ * @since version-1.0
+ */
+@RestController
+@RequestMapping("/invoice")
+public class XhpcInvoiceController extends BaseController {
+
+ @Resource
+ XhpcInvoiceService xhpcInvoiceService;
+
+ /**
+ * 用于在财务点击开票时,回显开票数据
+ *
+ * @param invoiceIdMap 一个存储着invoiceId的Map集合
+ * @return specificInvoiceWrap 装着回显数据的包装类
+ * @author WH
+ * @date 2021/12/20 10:48
+ * @since version-1.0
+ */
+ @PostMapping("/selectSpecificInvoice")
+ public AjaxResult selectSpecificInvoice(@RequestBody Map invoiceIdMap) {
+
+ Long invoiceId = Long.valueOf(String.valueOf(invoiceIdMap.get("invoiceId")));
+ SpecificInvoiceWrap specificInvoiceWrap = xhpcInvoiceService.selectSpecificInvoice(invoiceId);
+ if (specificInvoiceWrap == null) {
+ AjaxResult.error("要回显的订单发票id有误");
+ }
+ return AjaxResult.success(specificInvoiceWrap);
+ }
+
+ /**
+ * 用于在后台显示,所有发票信息,包括待开发票和已开发票的信息
+ *
+ * @param requestData 前端传递过来的要查询的参数
+ * @return AllInvoiceOrdersResponse 装着回显数据的包装类
+ * @author WH
+ * @date 2021/12/21 11:33
+ * @since version-1.0
+ */
+ @PostMapping("/selectAllInvoiceOrders")
+ public AjaxResult selectAllInvoiceOrders(@RequestBody AllInvoiceOrdersRequest requestData) {
+
+ return null;
+ }
+
+}
diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/AllInvoiceOrdersRequest.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/AllInvoiceOrdersRequest.java
new file mode 100644
index 00000000..711ab6a3
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/AllInvoiceOrdersRequest.java
@@ -0,0 +1,64 @@
+package com.xhpc.invoice.domain;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * /selectAllInvoiceOrders接口,接收请求的数据的包装类对象
+ *
+ * @author WH
+ * @date 2021/12/21 10:51
+ * @since version-1.0
+ */
+@NoArgsConstructor
+@Data
+public class AllInvoiceOrdersRequest {
+
+ /**
+ * 申请人(手机号)
+ */
+ @JsonProperty("creator")
+ private String creator;
+ /**
+ * 申请人类型(0为c端用户,1为B端用户,2为机构用户)
+ */
+ @JsonProperty("creatorType")
+ private Integer creatorType;
+ /**
+ * 发票状态(0表示未开票,1表示已经开票,2表示开票失败)
+ */
+ @JsonProperty("status")
+ private Integer status;
+ /**
+ * 发票申请起始时间
+ */
+ @JsonProperty("startCreatorTime")
+ private String startCreatorTime;
+ /**
+ * 发票申请终点时间
+ */
+ @JsonProperty("endCreatorTime")
+ private String endCreatorTime;
+ /**
+ * 开票起始时间
+ */
+ @JsonProperty("startInvoicingTime")
+ private String startInvoicingTime;
+ /**
+ * 开票终点时间
+ */
+ @JsonProperty("endInvoicingTime")
+ private String endInvoicingTime;
+ /**
+ * 当前所在页数
+ */
+ @JsonProperty("currentPage")
+ private Integer currentPage;
+ /**
+ * 当前页要显示多少条记录
+ */
+ @JsonProperty("items")
+ private Integer items;
+
+}
diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/AllInvoiceOrdersResponse.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/AllInvoiceOrdersResponse.java
new file mode 100644
index 00000000..f865a59e
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/AllInvoiceOrdersResponse.java
@@ -0,0 +1,89 @@
+package com.xhpc.invoice.domain;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * /selectAllInvoiceOrders接口的响应包装数据类
+ *
+ * @author WH
+ * @date 2021/12/21 10:50
+ * @since version-1.0
+ */
+@NoArgsConstructor
+@Data
+public class AllInvoiceOrdersResponse {
+
+ /**
+ * 历史订单总记录条数
+ */
+ @JsonProperty("totalItems")
+ private Long totalItems;
+ /**
+ * 已开发票的金额
+ */
+ @JsonProperty("invoicedSumMoney")
+ private BigDecimal invoicedSumMoney;
+ /**
+ * 未开发票的金额
+ */
+ @JsonProperty("notInvoiceSumMoney")
+ private BigDecimal notInvoiceSumMoney;
+ /**
+ * 当前页的数据
+ */
+ @JsonProperty("items")
+ private List items;
+
+ @NoArgsConstructor
+ @Data
+ public static class ItemsDTO {
+
+ /**
+ * 发票id
+ */
+ @JsonProperty("invoiceId")
+ private Long invoiceId;
+ /**
+ * 申请人(手机号)
+ */
+ @JsonProperty("creator")
+ private String creator;
+ /**
+ * 申请人类型(0为c端用户,1为B端用户,2为机构用户)
+ */
+ @JsonProperty("creatorType")
+ private Integer creatorType;
+ /**
+ * 发票金额
+ */
+ @JsonProperty("invoiceMoney")
+ private BigDecimal invoiceMoney;
+ /**
+ * 发票状态,0为未开票,1为已经开发票,2为开票失败
+ */
+ @JsonProperty("status")
+ private Integer status;
+ /**
+ * 发票申请时间
+ */
+ @JsonProperty("createTime")
+ private String createTime;
+ /**
+ * 开票时间
+ */
+ @JsonProperty("invoicingTime")
+ private String invoicingTime;
+ /**
+ * 开票人
+ */
+ @JsonProperty("drawer")
+ private String drawer;
+
+ }
+
+}
diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/SpecificInvoiceWrap.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/SpecificInvoiceWrap.java
new file mode 100644
index 00000000..c87fc1a4
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/domain/SpecificInvoiceWrap.java
@@ -0,0 +1,211 @@
+package com.xhpc.invoice.domain;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 用于保存指定发票回显数据的DTO
+ *
+ * @author WH
+ * @date 2021/12/20 10:58
+ * @since version-1.0
+ */
+@NoArgsConstructor
+@Data
+public class SpecificInvoiceWrap {
+
+ /**
+ * 申请人
+ */
+ @JsonProperty("creator")
+ private String creator;
+ /**
+ * 申请人类型,0为c端用户,1为b端用户,2为机构用户
+ */
+ @JsonProperty("creatorType")
+ private Integer creatorType;
+ /**
+ * 发票申请时间
+ */
+ @JsonProperty("invoiceCreateTime")
+ private String invoiceCreateTime;
+ /**
+ * 发票开票状态(0为未开票,1为已开票,2为开票失败)
+ */
+ @JsonProperty("status")
+ private Integer status;
+ /**
+ * 发票id
+ */
+ @JsonProperty("invoiceId")
+ private Long invoiceId;
+ /**
+ * 发票接收邮箱
+ */
+ @JsonProperty("receiveEmail")
+ private String receiveEmail;
+ /**
+ * 发票抬头类型
+ */
+ @JsonProperty("titleType")
+ private Integer titleType;
+ /**
+ * 发票抬头内容
+ */
+ @JsonProperty("titleContent")
+ private String titleContent;
+ /**
+ * 税号
+ */
+ @JsonProperty("dutyNumber")
+ private String dutyNumber;
+ /**
+ * 发票内容
+ */
+ @JsonProperty("invoiceContent")
+ private String invoiceContent;
+ /**
+ * 发票金额
+ */
+ @JsonProperty("invoiceMoney")
+ private BigDecimal invoiceMoney;
+ /**
+ * 发票包含的订单的总电费金额
+ */
+ @JsonProperty("invoiceTotalEletricMoney")
+ private BigDecimal invoiceTotalEletricMoney;
+ /**
+ * 发票包含的订单的总服务费金额
+ */
+ @JsonProperty("invoiceTotalServiceMoney")
+ private BigDecimal invoiceTotalServiceMoney;
+ /**
+ * 公司地址
+ */
+ @JsonProperty("firmAddress")
+ private String firmAddress;
+ /**
+ * 公司电话
+ */
+ @JsonProperty("firmPhone")
+ private String firmPhone;
+ /**
+ * 公司开户行
+ */
+ @JsonProperty("firmBank")
+ private String firmBank;
+ /**
+ * 公司开户行账号
+ */
+ @JsonProperty("firmBankAccount")
+ private String firmBankAccount;
+ /**
+ * 发票是否展示交易日期区间(0,不展示,1展示)
+ */
+ @JsonProperty("isShowDate")
+ private Integer isShowDate;
+ /**
+ * 用户备注
+ */
+ @JsonProperty("userNotes")
+ private String userNotes;
+ /**
+ * 财务备注
+ */
+ @JsonProperty("financeNotes")
+ private String financeNotes;
+ /**
+ * 发票开票时间
+ */
+ @JsonProperty("invoicingTime")
+ private String invoicingTime;
+ /**
+ * 电子发票上传地址
+ */
+ @JsonProperty("electricInvoiceUrl")
+ private String electricInvoiceUrl;
+ /**
+ * 开票人(开这个发票的人)
+ */
+ @JsonProperty("drawer")
+ private String drawer;
+ /**
+ * 该发票所包含的历史订单的开始时间-结束时间
+ */
+ @JsonProperty("historyOrderScope")
+ private String historyOrderScope;
+ /**
+ * 该发票所包含的历史订单对象
+ */
+ @JsonProperty("historyOrders")
+ private HistoryOrdersDTO historyOrders;
+
+ @NoArgsConstructor
+ @Data
+ public static class HistoryOrdersDTO {
+
+ /**
+ * 历史订单总条数
+ */
+ @JsonProperty("totalItems")
+ private Long totalItems;
+ /**
+ * 历史订单对象集合
+ */
+ @JsonProperty("historyOrdersData")
+ private List historyOrdersData;
+
+ @NoArgsConstructor
+ @Data
+ public static class HistoryOrdersDataDTO {
+
+ /**
+ * 历史订单id
+ */
+ @JsonProperty("historyOrderId")
+ private String historyOrderId;
+ /**
+ * 历史订单来源
+ */
+ @JsonProperty("chargingMode")
+ private String chargingMode;
+ /**
+ * 历史订单运营商名称
+ */
+ @JsonProperty("operatorName")
+ private String operatorName;
+ /**
+ * 历史订单电费金额
+ */
+ @JsonProperty("eletricMoney")
+ private BigDecimal eletricMoney;
+ /**
+ * 历史订单服务费金额
+ */
+ @JsonProperty("serviceMoney")
+ private BigDecimal serviceMoney;
+ /**
+ * 历史订单实际价格
+ */
+ @JsonProperty("actPrice")
+ private BigDecimal actPrice;
+ /**
+ * 历史订单序列号
+ */
+ @JsonProperty("historySerialNumber")
+ private String historySerialNumber;
+ /**
+ * 历史订单创建时间
+ */
+ @JsonProperty("historyCreateTime")
+ private String historyCreateTime;
+
+ }
+
+ }
+
+}
diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/mapper/XhpcChargingStationMapper.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/mapper/XhpcChargingStationMapper.java
new file mode 100644
index 00000000..214ef059
--- /dev/null
+++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/mapper/XhpcChargingStationMapper.java
@@ -0,0 +1,270 @@
+package com.xhpc.invoice.mapper;
+
+import com.xhpc.common.domain.XhpcChargingStation;
+import com.xhpc.common.domain.XhpcRate;
+import com.xhpc.common.domain.XhpcRateModel;
+import com.xhpc.common.domain.XhpcRateTime;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 电站Mapper接口
+ *
+ * @author yuyang
+ * @date 2021-07-19
+ */
+public interface XhpcChargingStationMapper {
+
+ /**
+ * 查询电站
+ *
+ * @param chargingStationId 电站ID
+ * @return 电站
+ */
+ XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
+
+
+ /**
+ * 查询电站
+ *
+ * @param chargingStationName 电站名称
+ * @return 电站
+ */
+ XhpcChargingStation selectXhpcChargingStationByName(String chargingStationName);
+
+ /**
+ * 查询电站列表
+ *
+ * @param name 电站名称
+ * @param operatorName 运营商名称
+ * @return 电站集合
+ */
+ List