diff --git a/sql/v2.1.sql b/sql/v2.1.sql
index 15caf122..c00c916c 100644
--- a/sql/v2.1.sql
+++ b/sql/v2.1.sql
@@ -687,7 +687,7 @@ CREATE TABLE `t_iccard_client_users`
`corpNo` VARCHAR(10) NOT NULL DEFAULT '0' COMMENT '所属运营商前缀' COLLATE 'utf8mb4_bin',
`corpName` VARCHAR(50) NOT NULL DEFAULT '0' COMMENT '所属运营商名称' COLLATE 'utf8mb4_bin',
`usersTime` DATETIME NULL DEFAULT NULL COMMENT '添加日期',
- `status` smallint(4) DEFAULT '0' COMMENT '状态(0-正常,1-冻结)',
+ `status` smallint(4) DEFAULT '0' COMMENT '状态(0-正常,1-冻结)',
PRIMARY KEY (`usersID`),
UNIQUE INDEX `usersName` (`usersName`)
) COMMENT ='发卡客户端用户表'
@@ -808,8 +808,8 @@ CREATE TABLE `xhpc_activity_cash`
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`receive_count` int(9) DEFAULT '0' COMMENT '领取次数',
- `auto_receive` smallint(2) DEFAULT '0' COMMENT '是否自动领取(0-否,1-是)',
- `auto_status` smallint(2) DEFAULT '0' COMMENT '是否自动发送完成(0-未完成,1-已完成)',
+ `auto_receive` smallint(2) DEFAULT '0' COMMENT '是否自动领取(0-否,1-是)',
+ `auto_status` smallint(2) DEFAULT '0' COMMENT '是否自动发送完成(0-未完成,1-已完成)',
`amount` decimal(4, 2) DEFAULT '0' COMMENT '红包金额',
`app_user_list` text COMMENT 'C端用户ID(-1表示全部)',
`com_user_list` text COMMENT '社区用户ID列表(-1表示全部)',
@@ -881,7 +881,8 @@ CREATE TABLE `xhpc_activity_formula`
`activity_id` int(11) DEFAULT NULL COMMENT '活动ID',
`start_time` time DEFAULT NULL COMMENT '开始时间',
`end_time` time DEFAULT NULL COMMENT '结束时间',
- `service_price` decimal(10, 2) DEFAULT NULL COMMENT '服务费',
+ `power_price` decimal(10, 2) DEFAULT NULL COMMENT '电费',
+ `service_price` decimal(10, 2) DEFAULT null COMMENT '服务费',
`compute_formula` varchar(200) DEFAULT NULL COMMENT '计算公式',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
@@ -912,6 +913,7 @@ CREATE TABLE `xhpc_activity_internet`
`internet_name` varchar(64) DEFAULT NULL COMMENT '流量方名称',
`compute_type` smallint(4) DEFAULT NULL COMMENT '计算类型(1-总金额,2-服务费,3-电量)',
`compute_formula` varchar(200) DEFAULT NULL COMMENT '默认计算公式',
+ `power_price` decimal(10, 2) DEFAULT NULL COMMENT '默认电费',
`service_price` decimal(10, 2) DEFAULT NULL COMMENT '默认服务费',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
@@ -941,3 +943,129 @@ CREATE TABLE `xhpc_activity_record`
PRIMARY KEY (`activity_record_id`)
) ENGINE=InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET=utf8mb4 COMMENT='活动参与领取表';
+
+CREATE TABLE `xhpc_clearing_bank`
+(
+ `clearing_bank_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '提现银行记录ID',
+ `operator_id` bigint(20) DEFAULT NULL COMMENT '运营商ID',
+ `operator_name` varchar(200) DEFAULT NULL COMMENT '运营商名称',
+ `area_code` int(10) DEFAULT NULL COMMENT '地址code',
+ `bank_name` varchar(200) DEFAULT NULL COMMENT '开户行名称',
+ `operator_account` varchar(200) DEFAULT NULL COMMENT '运营商收款账户名称',
+ `bank_no` varchar(64) DEFAULT NULL COMMENT '收款卡号',
+ `address` varchar(200) DEFAULT NULL COMMENT '地址',
+ `contact_name` varchar(64) DEFAULT NULL COMMENT '联系人',
+ `contact_phone` varchar(16) DEFAULT NULL COMMENT '联系电话',
+ `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+ `status` int(6) DEFAULT NULL COMMENT '状态(1-正常)',
+ `del_flag` int(6) DEFAULT NULL COMMENT '是否删除(0-正常,2-已删除)',
+ `tenant_id` varchar(16) DEFAULT NULL COMMENT '租户ID',
+ `create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `update_by` varchar(64) DEFAULT NULL COMMENT '更新人',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`clearing_bank_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='清分提现银行账户信息表';
+
+
+
+CREATE TABLE `xhpc_clearing_checkout`
+(
+ `clearing_checkout_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '结算记录ID',
+ `clearing_bank_id` bigint(20) DEFAULT NULL COMMENT '收款账号信息',
+ `apply_amount` decimal(10, 2) DEFAULT NULL COMMENT '申请金额',
+ `handling_fee` decimal(10, 2) DEFAULT NULL COMMENT '手续费',
+ `bank_fee` decimal(10, 2) DEFAULT NULL COMMENT '银行手续费',
+ `received_amount` decimal(10, 2) DEFAULT NULL COMMENT '到账金额',
+ `status` int(6) DEFAULT NULL COMMENT '状态(0-已审核待清分,1-提现中,2-审核失败,3-审核成功,4-转账失败,5-转账成功,6-提现完成)',
+ `del_flag` int(2) DEFAULT '0' COMMENT '删除标识(0-正常,2-删除)',
+ `operator_id` bigint(20) DEFAULT NULL COMMENT '运营商ID',
+ `tenant_id` varchar(16) DEFAULT NULL COMMENT '租户ID',
+ `create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `update_by` varchar(64) DEFAULT NULL COMMENT '更新人',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `check_by` varchar(64) DEFAULT NULL COMMENT '审核人',
+ `check_time` datetime DEFAULT NULL COMMENT '审核时间',
+ PRIMARY KEY (`clearing_checkout_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='清分提现订单表';
+
+
+
+CREATE TABLE `xhpc_clearing_history_order`
+(
+ `clearing_order_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '清分订单id',
+ `charging_station_id` bigint(20) DEFAULT NULL COMMENT '电站id',
+ `charge_order_id` bigint(20) DEFAULT NULL COMMENT '充电订单id',
+ `user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+ `terminal_id` bigint(20) DEFAULT NULL COMMENT '终端id',
+ `serial_number` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '订单编号',
+ `internet_serial_number` varchar(30) DEFAULT NULL COMMENT '流量方订单号',
+ `power_price_total` decimal(10, 2) DEFAULT NULL COMMENT '总电费',
+ `service_price_total` decimal(10, 2) DEFAULT NULL COMMENT '总服务费',
+ `total_price` decimal(10, 2) DEFAULT '0.00' COMMENT '订单总价',
+ `promotion_discount` decimal(10, 2) DEFAULT '0.00' COMMENT '电站活动抵扣--抵扣的总金额',
+ `act_price` decimal(10, 2) DEFAULT '0.00' COMMENT '实际价格-用户支付的钱',
+ `act_power_price` decimal(10, 2) DEFAULT '0.00' COMMENT '实收电费-运营商电费',
+ `act_service_price` decimal(10, 2) DEFAULT '0.00' COMMENT '实收服务费-运营商服务费',
+ `internet_commission` decimal(10, 2) DEFAULT '0.00' COMMENT '流量方总金额抽成',
+ `internet_svc_commission` decimal(10, 2) DEFAULT '0.00' COMMENT '流量方服务费抽成',
+ `platform_commission` decimal(10, 2) DEFAULT '0.00' COMMENT '平台总金额抽成',
+ `platform_svc_commisssion` decimal(10, 2) DEFAULT '0.00' COMMENT '平台服务费抽成',
+ `operation_commission` decimal(10, 2) DEFAULT '0.00' COMMENT '运维总抽成',
+ `operation_svc_commission` decimal(10, 2) DEFAULT '0.00' COMMENT '运维服务费抽成',
+ `start_soc` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '开始充电soc',
+ `end_soc` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '结束时soc',
+ `reconciliation_status` int(10) DEFAULT NULL COMMENT '对账状态(0待确认 1已确认,2待提交,3待审核)',
+ `sorting_status` int(10) DEFAULT '0' COMMENT '清分状态(0待清分 1清分在途,2已提现,3待提交,4待审核)',
+ `type` tinyint(2) DEFAULT NULL COMMENT '1 自动结算 2 平台结算',
+ `status` int(10) DEFAULT '0' COMMENT '状态(0正常 1停用)',
+ `del_flag` int(2) DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `create_by` varchar(30) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建者',
+ `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+ `update_by` varchar(30) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新者',
+ `remark` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注',
+ `state` int(2) DEFAULT '0' COMMENT '0未统计 1小时统计 2 其他统计',
+ `vin_normal` varchar(100) DEFAULT NULL COMMENT 'VIN 码',
+ `search_value` varchar(255) DEFAULT NULL,
+ `operator_id_evcs` varchar(50) DEFAULT NULL COMMENT '运营商在EVCS分配的唯一OperatorID',
+ `charge_model_evcs` int(11) DEFAULT NULL COMMENT '终端客户开启充电方式',
+ `connector_power_evcs` double DEFAULT NULL COMMENT '接口额定功率',
+ `meter_value_end_evcs` double DEFAULT NULL COMMENT '电表总起值',
+ `meter_value_start_evcs` double DEFAULT NULL COMMENT '电表总结束值',
+ `operator_id3rdpty_evcs` varchar(50) DEFAULT NULL COMMENT '流量方OperatorID',
+ `start_time` datetime DEFAULT NULL,
+ `end_time` datetime DEFAULT NULL COMMENT '结束时间',
+ `stop_reason_evcs` int(11) DEFAULT NULL,
+ `total_power` double(10, 4) DEFAULT NULL COMMENT '电量',
+ `user_name_evcs` varchar(100) DEFAULT NULL,
+ `phone` varchar(50) DEFAULT NULL,
+ `evcs_order_no` varchar(255) DEFAULT NULL COMMENT '互联网订单流水号',
+ `confirm_Result` int(4) DEFAULT '-1' COMMENT '-1:未推送/推送失败 0:成功 1:争议交易 2~99:自定义',
+ `rate_model_id` bigint(20) DEFAULT NULL,
+ `charging_mode` varchar(255) DEFAULT NULL COMMENT '充电方式',
+ `internet_degree_commission` decimal(10,2) DEFAULT NULL COMMENT '流量方电量抽成',
+ `source` int(10) DEFAULT NULL COMMENT '订单来源(0 C端用户 1 流量方用户 2社区用户 3B端用户)',
+ `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户id',
+ `operator_id` bigint(20) DEFAULT NULL COMMENT '运营商ID',
+ `operator_name` varchar(200) DEFAULT NULL COMMENT '运营商名称',
+ `clearing_checkout_id` bigint(20) DEFAULT NULL COMMENT '清算记录ID',
+ `check_status` int(4) DEFAULT NULL COMMENT '审核状态(0-未审核,1-审核不通过,2-审核通过)',
+ `check_by` varchar(64) DEFAULT NULL COMMENT '审核人',
+ `check_time` datetime DEFAULT NULL COMMENT '审核时间',
+ PRIMARY KEY (`clearing_order_id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='历史订单清分审核表';
+
+
+CREATE TABLE `xhpc_clearing_receipt`
+(
+ `clearing_receipt_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '回执图片ID',
+ `type` int(4) DEFAULT NULL COMMENT '文件类型(1-图片,2-Excel)',
+ `name` varchar(100) DEFAULT NULL COMMENT '文件名称',
+ `url` varchar(200) DEFAULT NULL COMMENT '文件地址',
+ `clearing_checkout_ids` varchar(200) DEFAULT NULL COMMENT '提现单ID',
+ `create_time` datetime DEFAULT NULL COMMENT '上传时间',
+ `create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
+ PRIMARY KEY (`clearing_receipt_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='清分银行回执信息表';
\ No newline at end of file
diff --git a/xhpc-modules/pom.xml b/xhpc-modules/pom.xml
index bb11e8aa..1c0579c5 100644
--- a/xhpc-modules/pom.xml
+++ b/xhpc-modules/pom.xml
@@ -26,6 +26,7 @@
xhpc-tenant
xhpc-activity
xhpc-log
+ xhpc-clearing
xhpc-modules
diff --git a/xhpc-modules/xhpc-clearing/.gitignore b/xhpc-modules/xhpc-clearing/.gitignore
new file mode 100644
index 00000000..54283dd4
--- /dev/null
+++ b/xhpc-modules/xhpc-clearing/.gitignore
@@ -0,0 +1,35 @@
+HELP.md
+target/
+.mvn/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea/
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/xhpc-modules/xhpc-clearing/pom.xml b/xhpc-modules/xhpc-clearing/pom.xml
new file mode 100644
index 00000000..4e532491
--- /dev/null
+++ b/xhpc-modules/xhpc-clearing/pom.xml
@@ -0,0 +1,136 @@
+
+
+
+ com.ruoyi
+ xhpc-modules
+ 3.0.0
+
+ 4.0.0
+
+ xhpc-clearing
+
+
+ 清分服务
+
+
+ 8
+ 8
+
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+
+
+ org.mybatis
+ mybatis
+ 3.5.6
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+
+
+
+
+ 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
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+
+ com.ruoyi
+ ruoyi-common-datasource
+
+
+
+
+ com.ruoyi
+ ruoyi-common-core
+
+
+
+ com.ruoyi
+ xhpc-common
+ 3.0.0
+ compile
+
+
+
+ org.apache.ant
+ ant
+ 1.10.12
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.10.2
+ compile
+
+
+ com.ruoyi
+ ruoyi-common-log
+
+
+
+
+
+ ${project.artifactId}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.4.0
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/XhpcClearingApplication.java b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/XhpcClearingApplication.java
new file mode 100644
index 00000000..63d2d8cf
--- /dev/null
+++ b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/XhpcClearingApplication.java
@@ -0,0 +1,28 @@
+package com.xhpc;
+
+import com.xhpc.common.security.annotation.EnableCustomConfig;
+import com.xhpc.common.security.annotation.EnableRyFeignClients;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+
+@EnableConfigurationProperties
+@ConfigurationPropertiesScan(basePackages = {"com.xhpc.clearing.config"})
+@EnableScheduling
+@EnableCustomConfig
+@EnableRyFeignClients
+@EnableFeignClients
+@SpringBootApplication
+@MapperScan("com.xhpc.clearing.mapper")
+public class XhpcClearingApplication {
+
+ public static void main(String[] args) {
+
+ SpringApplication.run(XhpcClearingApplication.class, args);
+ }
+}
diff --git a/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/config/AliOSSProperties.java b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/config/AliOSSProperties.java
new file mode 100644
index 00000000..c8decbc0
--- /dev/null
+++ b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/config/AliOSSProperties.java
@@ -0,0 +1,24 @@
+package com.xhpc.clearing.config;
+
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+
+/**
+ * 支付宝支付配置类
+ */
+@Data
+@ConfigurationProperties(prefix = "oss")
+public class AliOSSProperties {
+
+ private boolean enabled;
+ private String name;
+ private boolean tenantMode;
+ private String endpoint;
+ private String accessKey;
+ private String secretKey;
+ private String bucketName;
+ private String region;
+ private String domain;
+}
diff --git a/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/controller/XhpcClearingBankController.java b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/controller/XhpcClearingBankController.java
new file mode 100644
index 00000000..91e372c0
--- /dev/null
+++ b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/controller/XhpcClearingBankController.java
@@ -0,0 +1,95 @@
+package com.xhpc.clearing.controller;
+
+
+import com.xhpc.clearing.domain.XhpcClearingBankDomain;
+import com.xhpc.clearing.service.XhpcClearingBankService;
+import com.xhpc.common.core.domain.R;
+import com.xhpc.common.core.web.controller.BaseController;
+import com.xhpc.common.core.web.page.TableDataInfo;
+import com.xhpc.common.log.annotation.Log;
+import com.xhpc.common.log.enums.BusinessType;
+import com.xhpc.common.util.LogUserUtils;
+import com.xhpc.system.api.model.LoginUser;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/clearing/bank")
+public class XhpcClearingBankController extends BaseController {
+
+ @Resource
+ XhpcClearingBankService bankService;
+
+ @Resource
+ LogUserUtils logUserUtils;
+
+
+ @GetMapping("/getPage")
+ public TableDataInfo getPage(HttpServletRequest request,
+ String status) {
+
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ startPage();
+ Map params = new HashMap<>();
+ params.put("tenantId", loginUser.getTenantId());
+ params.put("status", status);
+ return getDataTable(bankService.getPage(params));
+ }
+
+
+ @GetMapping("/detail")
+ public R getDetail(@RequestParam("bankId") Long bankId) {
+
+ return R.ok(bankService.getDomainByPk(bankId));
+ }
+
+ @Log(title = "清分管理-发送绑定银行卡验证短信", businessType = BusinessType.INSERT)
+ @PostMapping("/sendBindSms")
+ public R sendBindBankSms(String phone){
+
+ return R.ok(bankService.sendBindBankSms(phone));
+ }
+
+
+ @Log(title = "清分管理-发送提现到银行卡验证短信", businessType = BusinessType.INSERT)
+ @PostMapping("/sendCashSms")
+ public R sendCashSms(String phone){
+
+ return R.ok(bankService.sendCashSms(phone));
+ }
+
+
+ @Log(title = "清分管理-增加清分转账银行信息", businessType = BusinessType.INSERT)
+ @PostMapping("/")
+ public R insertDomain(HttpServletRequest request, @RequestBody XhpcClearingBankDomain domain) {
+
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ domain.setCreateBy(loginUser.getUserid().toString());
+ domain.setUpdateBy(loginUser.getUserid().toString());
+ domain.setTenantId(loginUser.getTenantId());
+ return R.ok(bankService.insertDomain(domain));
+ }
+
+
+ @Log(title = "清分管理-更新清分转账银行信息", businessType = BusinessType.UPDATE)
+ @PutMapping("/detail")
+ public R updateDomain(HttpServletRequest request, @RequestBody XhpcClearingBankDomain domain) {
+
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ domain.setUpdateBy(loginUser.getUserid().toString());
+ return R.ok(bankService.updateDomain(domain));
+ }
+
+
+ @Log(title = "清分管理-删除现金红包活动", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{bankId}")
+ public R deleteDomainByPk(@PathVariable("bankId") Long bankId) {
+
+ return R.ok(bankService.deleteByPk(bankId));
+ }
+
+}
diff --git a/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/controller/XhpcClearingCheckoutController.java b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/controller/XhpcClearingCheckoutController.java
new file mode 100644
index 00000000..a3ae6054
--- /dev/null
+++ b/xhpc-modules/xhpc-clearing/src/main/java/com/xhpc/clearing/controller/XhpcClearingCheckoutController.java
@@ -0,0 +1,125 @@
+package com.xhpc.clearing.controller;
+
+
+import com.xhpc.clearing.domain.XhpcClearingCheckoutDomain;
+import com.xhpc.clearing.service.XhpcClearingCheckoutService;
+import com.xhpc.clearing.vo.ClearingReceiptVo;
+import com.xhpc.common.core.domain.R;
+import com.xhpc.common.core.web.controller.BaseController;
+import com.xhpc.common.core.web.page.TableDataInfo;
+import com.xhpc.common.log.annotation.Log;
+import com.xhpc.common.log.enums.BusinessType;
+import com.xhpc.common.util.LogUserUtils;
+import com.xhpc.system.api.model.LoginUser;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/clearing/checkout")
+public class XhpcClearingCheckoutController extends BaseController {
+
+ @Resource
+ XhpcClearingCheckoutService checkoutService;
+
+ @Resource
+ LogUserUtils logUserUtils;
+
+
+ @GetMapping("/getPage")
+ public TableDataInfo getPage(HttpServletRequest request,
+ String status,
+ String operatorId,
+ String startTime,
+ String endTime) {
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ startPage();
+ Map params = new HashMap<>();
+ params.put("tenantId", loginUser.getTenantId());
+ params.put("status", status);
+ params.put("operatorId", operatorId);
+ params.put("startTime", startTime);
+ params.put("endTime", endTime);
+ return getDataTable(checkoutService.getPage(params));
+ }
+
+
+ @GetMapping("/detail")
+ public R getDetail(@RequestParam("checkoutId") Long checkoutId) {
+ return R.ok(checkoutService.getDomainByPk(checkoutId));
+ }
+
+
+ @GetMapping("/temp")
+ public R getTmpCheckoutData(HttpServletRequest request) {
+
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ return R.ok(checkoutService.getTmpCheckoutData(loginUser.getSysUser().getOperatorId()));
+ }
+
+
+ @Log(title = "清分管理-新增提现申请", businessType = BusinessType.INSERT)
+ @PostMapping("/")
+ public R insertDomain(HttpServletRequest request, @RequestBody XhpcClearingCheckoutDomain domain) {
+
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ domain.setCreateBy(loginUser.getUserid().toString());
+ domain.setUpdateBy(loginUser.getUserid().toString());
+ domain.setTenantId(loginUser.getTenantId());
+
+ return R.ok(checkoutService.insertDomain(domain));
+ }
+
+
+ /**
+ * 导出银行转账单
+ *
+ * @param response
+ * @throws IOException
+ */
+ @Log(title = "清分管理-导出待提现订单", businessType = BusinessType.INSERT)
+ @PostMapping("/bankExport")
+ public void getBankExport(HttpServletResponse response, String checkoutIds) throws IOException {
+
+ checkoutService.bankExport(response, checkoutIds);
+ }
+
+
+ /**
+ * 导出提现单订单记录
+ *
+ * @param response
+ * @throws IOException
+ */
+ @Log(title = "清分管理-导出提现记录", businessType = BusinessType.INSERT)
+ @PostMapping("/orderExport")
+ public void getOrderExport(HttpServletResponse response, String checkoutIds) throws IOException {
+
+ checkoutService.orderExport(response, checkoutIds);
+ }
+
+
+ @Log(title = "清分管理-导入银行回执", businessType = BusinessType.INSERT)
+ @PostMapping("/importReceipt")
+ public R importReceipt(HttpServletRequest request, @RequestBody ClearingReceiptVo receiptVo) throws Exception {
+
+ LoginUser loginUser = logUserUtils.getLogUser(request);
+ receiptVo.setCreateBy(loginUser.getUserid().toString());
+ return R.ok(checkoutService.insertReceipt(receiptVo));
+ }
+
+
+ @GetMapping("/getListPage")
+ public TableDataInfo getListPage(String phone, String transactionNumber, @RequestParam("status") Integer status, String chargingStationName, Long operatorId, Integer source, String beginStartTime, String beginEndTime, @RequestParam("userId") Long userId, Integer type,
+ String affiliationOrganization, String evcsOrderNo, String plateNum, Integer internetId, String internetSerialNumber, String terminalName, String vinCode, String overStartTime, String overEndTime, Long personnelId, Integer confirmResult, Integer checkoutId) {
+ List