feat(energy): Energy 模块优化完成

后端优化:
- 创建加氢站表,删除 energy_station_config
- 简化事件驱动(7个→3个)
- 合并导入流程(自动匹配+生成明细)
- 优化审核流程(审核+扣款合并+批量审核)
- 修复跨模块依赖(创建 Asset API 接口层)

前端优化:
- 简化导入交互(3步→1步)
- 批量审核功能
- 快速生成账单(本月/上月)
- 批量价格配置(前端完成)

技术改进:
- 微服务架构规范(API 优先)
- 事务一致性保证
- 用户体验优化
This commit is contained in:
kkfluous
2026-03-16 13:22:25 +08:00
parent 2f38a703f9
commit b40f521c03
27 changed files with 722 additions and 66 deletions

View File

@@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.asset.api.contract;
import cn.iocoder.yudao.module.asset.api.contract.dto.ContractRespDTO;
/**
* 合同 API 接口
*
* @author 芋道源码
*/
public interface ContractApi {
/**
* 查询客户的生效中合同
*
* @param customerId 客户ID
* @return 合同信息
*/
ContractRespDTO getActiveByCustomerId(Long customerId);
}

View File

@@ -0,0 +1,45 @@
package cn.iocoder.yudao.module.asset.api.contract.dto;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 合同响应 DTO
*
* @author 芋道源码
*/
@Data
public class ContractRespDTO implements Serializable {
/**
* 合同ID
*/
private Long id;
/**
* 合同编号
*/
private String contractNo;
/**
* 客户ID
*/
private Long customerId;
/**
* 合同状态
*/
private Integer contractStatus;
/**
* 开始日期
*/
private LocalDateTime startDate;
/**
* 结束日期
*/
private LocalDateTime endDate;
}

View File

@@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.asset.api.customer;
import cn.iocoder.yudao.module.asset.api.customer.dto.CustomerRespDTO;
/**
* 客户 API 接口
*
* @author 芋道源码
*/
public interface CustomerApi {
/**
* 通过名称模糊查询客户
*
* @param name 客户名称
* @return 客户信息
*/
CustomerRespDTO getByNameLike(String name);
}

View File

@@ -0,0 +1,39 @@
package cn.iocoder.yudao.module.asset.api.customer.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 客户响应 DTO
*
* @author 芋道源码
*/
@Data
public class CustomerRespDTO implements Serializable {
/**
* 客户ID
*/
private Long id;
/**
* 客户名称
*/
private String customerName;
/**
* 客户编码
*/
private String customerCode;
/**
* 客户类型
*/
private Integer customerType;
/**
* 客户状态
*/
private Integer status;
}

View File

@@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.asset.api.station;
import cn.iocoder.yudao.module.asset.api.station.dto.HydrogenStationRespDTO;
/**
* 加氢站 API 接口
*
* @author 芋道源码
*/
public interface HydrogenStationApi {
/**
* 获取加氢站信息
*
* @param id 加氢站ID
* @return 加氢站信息
*/
HydrogenStationRespDTO getStation(Long id);
}

View File

@@ -0,0 +1,39 @@
package cn.iocoder.yudao.module.asset.api.station.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 加氢站响应 DTO
*
* @author 芋道源码
*/
@Data
public class HydrogenStationRespDTO implements Serializable {
/**
* 站点ID
*/
private Long id;
/**
* 站点名称
*/
private String name;
/**
* 是否自动扣款
*/
private Boolean autoDeduct;
/**
* 站点编码
*/
private String code;
/**
* 站点状态
*/
private Integer status;
}

View File

@@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.asset.api.vehicle;
import cn.iocoder.yudao.module.asset.api.vehicle.dto.VehicleRespDTO;
/**
* 车辆 API 接口
*
* @author 芋道源码
*/
public interface VehicleApi {
/**
* 通过车牌号查询车辆
*
* @param vehicleNo 车牌号
* @return 车辆信息
*/
VehicleRespDTO getByVehicleNo(String vehicleNo);
}

View File

@@ -0,0 +1,39 @@
package cn.iocoder.yudao.module.asset.api.vehicle.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 车辆响应 DTO
*
* @author 芋道源码
*/
@Data
public class VehicleRespDTO implements Serializable {
/**
* 车辆ID
*/
private Long id;
/**
* 车牌号
*/
private String plateNo;
/**
* 客户ID
*/
private Long customerId;
/**
* 车辆类型
*/
private Integer vehicleType;
/**
* 车辆状态
*/
private Integer status;
}