Compare commits
24 Commits
dev_bl_eem
...
dev
| Author | SHA1 | Date |
|---|---|---|
|
|
bde7a2669c | 1 day ago |
|
|
9e0bf9b7ee | 4 weeks ago |
|
|
440eab0f8c | 1 month ago |
|
|
455bc79c5a | 2 months ago |
|
|
364886f4cc | 2 months ago |
|
|
668f8e3fb2 | 2 months ago |
|
|
1150bf4cac | 2 months ago |
|
|
e43244596a | 2 months ago |
|
|
cc19ab5afd | 2 months ago |
|
|
7dd7b9866d | 2 months ago |
|
|
4a00010e3e | 2 months ago |
|
|
a12030c83c | 2 months ago |
|
|
9854414719 | 3 months ago |
|
|
63985b2bd8 | 3 months ago |
|
|
beb4bc866e | 3 months ago |
|
|
837e662c8d | 3 months ago |
|
|
2ceb622eb6 | 3 months ago |
|
|
4fd5c674b5 | 4 months ago |
|
|
1871e06353 | 6 months ago |
|
|
fc98e3bd6d | 10 months ago |
|
|
c83403c4cd | 1 year ago |
|
|
5210bcdd58 | 1 year ago |
|
|
ebabe3d17a | 1 year ago |
|
|
c4eaa3b97b | 1 year ago |
229 changed files with 3410 additions and 12950 deletions
Binary file not shown.
@ -1,357 +0,0 @@ |
|||||||
# 项目信息管理 API 接口文档 |
|
||||||
|
|
||||||
## 基础信息 |
|
||||||
|
|
||||||
- **模块名称**: 项目信息管理 |
|
||||||
- **基础路径**: `/project/info` |
|
||||||
- **权限标识前缀**: `project:info` |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
## 1. 查询项目信息列表 |
|
||||||
|
|
||||||
### 接口描述 |
|
||||||
分页查询项目信息列表,支持按项目名称、项目负责人模糊查询,以及按安装日期范围查询。 |
|
||||||
|
|
||||||
### 请求信息 |
|
||||||
- **接口路径**: `/project/info/list` |
|
||||||
- **请求方式**: `GET` |
|
||||||
- **权限要求**: `project:info:list` |
|
||||||
|
|
||||||
### 请求参数 |
|
||||||
|
|
||||||
| 参数名 | 类型 | 必填 | 说明 | 示例值 | |
|
||||||
|--------|------|------|------|--------| |
|
||||||
| pageNum | Integer | 否 | 页码,默认1 | 1 | |
|
||||||
| pageSize | Integer | 否 | 每页条数,默认10 | 10 | |
|
||||||
| projectName | String | 否 | 项目名称(模糊查询) | 豪生酒店 | |
|
||||||
| projectManager | String | 否 | 项目负责人(模糊查询) | 张三 | |
|
||||||
| params[beginTime] | String | 否 | 安装日期开始时间(格式:yyyy-MM-dd) | 2025-01-01 | |
|
||||||
| params[endTime] | String | 否 | 安装日期结束时间(格式:yyyy-MM-dd) | 2025-12-31 | |
|
||||||
|
|
||||||
### 请求示例 |
|
||||||
``` |
|
||||||
GET /project/info/list?pageNum=1&pageSize=10&projectName=豪生&projectManager=张¶ms[beginTime]=2025-01-01¶ms[endTime]=2025-12-31 |
|
||||||
``` |
|
||||||
|
|
||||||
### 响应参数 |
|
||||||
|
|
||||||
| 参数名 | 类型 | 说明 | |
|
||||||
|--------|------|------| |
|
||||||
| code | Integer | 状态码(200成功) | |
|
||||||
| msg | String | 返回消息 | |
|
||||||
| total | Long | 总记录数 | |
|
||||||
| rows | Array | 数据列表 | |
|
||||||
|
|
||||||
**rows数组元素结构**: |
|
||||||
|
|
||||||
| 参数名 | 类型 | 说明 | |
|
||||||
|--------|------|------| |
|
||||||
| id | String | 项目ID(UUID) | |
|
||||||
| projectCode | String | 用户项目编码 | |
|
||||||
| projectName | String | 项目名称 | |
|
||||||
| projectAddress | String | 项目地址 | |
|
||||||
| installDate | String | 安装日期(yyyy-MM-dd HH:mm:ss) | |
|
||||||
| acceptanceDate | String | 验收日期(yyyy-MM-dd HH:mm:ss) | |
|
||||||
| onlineDate | String | 上线日期(yyyy-MM-dd HH:mm:ss) | |
|
||||||
| deviceCount | Integer | 设备数量 | |
|
||||||
| onlineDeviceCount | Integer | 在线设备数量 | |
|
||||||
| offlineDeviceCount | Integer | 离线设备数量 | |
|
||||||
| gatewayCount | Integer | 网关数量 | |
|
||||||
| onlineGatewayCount | Integer | 在线网关数量 | |
|
||||||
| offlineGatewayCount | Integer | 离线网关数量 | |
|
||||||
| projectManager | String | 项目负责人 | |
|
||||||
| electricityPrice | BigDecimal | 电单价 | |
|
||||||
| createBy | String | 创建者 | |
|
||||||
| createTime | String | 创建时间 | |
|
||||||
| updateBy | String | 更新者 | |
|
||||||
| updateTime | String | 更新时间 | |
|
||||||
| remark | String | 备注 | |
|
||||||
|
|
||||||
### 响应示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"code": 200, |
|
||||||
"msg": "查询成功", |
|
||||||
"total": 2, |
|
||||||
"rows": [ |
|
||||||
{ |
|
||||||
"id": "550e8400-e29b-41d4-a716-446655440000", |
|
||||||
"projectCode": "PROJ2025001", |
|
||||||
"projectName": "梅州豪生酒店节能改造项目", |
|
||||||
"projectAddress": "广东省梅州市梅江区江南街道", |
|
||||||
"installDate": "2025-03-15 10:00:00", |
|
||||||
"acceptanceDate": "2025-06-20 14:30:00", |
|
||||||
"onlineDate": "2025-07-01 09:00:00", |
|
||||||
"deviceCount": 150, |
|
||||||
"onlineDeviceCount": 145, |
|
||||||
"offlineDeviceCount": 5, |
|
||||||
"gatewayCount": 10, |
|
||||||
"onlineGatewayCount": 10, |
|
||||||
"offlineGatewayCount": 0, |
|
||||||
"projectManager": "张三", |
|
||||||
"electricityPrice": 0.85, |
|
||||||
"createBy": "admin", |
|
||||||
"createTime": "2025-03-10 08:30:00", |
|
||||||
"updateBy": "admin", |
|
||||||
"updateTime": "2025-07-01 10:00:00", |
|
||||||
"remark": "一期工程项目" |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
## 2. 查询项目详情 |
|
||||||
|
|
||||||
### 接口描述 |
|
||||||
根据项目ID查询单个项目的详细信息。 |
|
||||||
|
|
||||||
### 请求信息 |
|
||||||
- **接口路径**: `/project/info/{id}` |
|
||||||
- **请求方式**: `GET` |
|
||||||
- **权限要求**: `project:info:query` |
|
||||||
|
|
||||||
### 路径参数 |
|
||||||
|
|
||||||
| 参数名 | 类型 | 必填 | 说明 | 示例值 | |
|
||||||
|--------|------|------|------|--------| |
|
||||||
| id | String | 是 | 项目ID(UUID) | 550e8400-e29b-41d4-a716-446655440000 | |
|
||||||
|
|
||||||
### 请求示例 |
|
||||||
``` |
|
||||||
GET /project/info/550e8400-e29b-41d4-a716-446655440000 |
|
||||||
``` |
|
||||||
|
|
||||||
### 响应参数 |
|
||||||
同列表查询的单条记录结构 |
|
||||||
|
|
||||||
### 响应示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"code": 200, |
|
||||||
"msg": "操作成功", |
|
||||||
"data": { |
|
||||||
"id": "550e8400-e29b-41d4-a716-446655440000", |
|
||||||
"projectCode": "PROJ2025001", |
|
||||||
"projectName": "梅州豪生酒店节能改造项目", |
|
||||||
"projectAddress": "广东省梅州市梅江区江南街道", |
|
||||||
"installDate": "2025-03-15 10:00:00", |
|
||||||
"acceptanceDate": "2025-06-20 14:30:00", |
|
||||||
"onlineDate": "2025-07-01 09:00:00", |
|
||||||
"deviceCount": 150, |
|
||||||
"onlineDeviceCount": 145, |
|
||||||
"offlineDeviceCount": 5, |
|
||||||
"gatewayCount": 10, |
|
||||||
"onlineGatewayCount": 10, |
|
||||||
"offlineGatewayCount": 0, |
|
||||||
"projectManager": "张三", |
|
||||||
"electricityPrice": 0.85, |
|
||||||
"createBy": "admin", |
|
||||||
"createTime": "2025-03-10 08:30:00", |
|
||||||
"updateBy": "admin", |
|
||||||
"updateTime": "2025-07-01 10:00:00", |
|
||||||
"remark": "一期工程项目" |
|
||||||
} |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
## 3. 新增项目信息 |
|
||||||
|
|
||||||
### 接口描述 |
|
||||||
创建新的项目信息记录。 |
|
||||||
|
|
||||||
### 请求信息 |
|
||||||
- **接口路径**: `/project/info` |
|
||||||
- **请求方式**: `POST` |
|
||||||
- **权限要求**: `project:info:add` |
|
||||||
- **Content-Type**: `application/json` |
|
||||||
|
|
||||||
### 请求参数(Body) |
|
||||||
|
|
||||||
| 参数名 | 类型 | 必填 | 说明 | 示例值 | |
|
||||||
|--------|------|------|------|--------| |
|
||||||
| projectCode | String | 是 | 用户项目编码 | PROJ2025002 | |
|
||||||
| projectName | String | 是 | 项目名称 | 某某酒店项目 | |
|
||||||
| projectAddress | String | 否 | 项目地址 | 广东省深圳市南山区 | |
|
||||||
| installDate | String | 否 | 安装日期(yyyy-MM-dd HH:mm:ss) | 2025-08-01 10:00:00 | |
|
||||||
| acceptanceDate | String | 否 | 验收日期(yyyy-MM-dd HH:mm:ss) | 2025-10-01 14:30:00 | |
|
||||||
| onlineDate | String | 否 | 上线日期(yyyy-MM-dd HH:mm:ss) | 2025-10-15 09:00:00 | |
|
||||||
| deviceCount | Integer | 否 | 设备数量,默认0 | 100 | |
|
||||||
| onlineDeviceCount | Integer | 否 | 在线设备数量,默认0 | 95 | |
|
||||||
| offlineDeviceCount | Integer | 否 | 离线设备数量,默认0 | 5 | |
|
||||||
| gatewayCount | Integer | 否 | 网关数量,默认0 | 8 | |
|
||||||
| onlineGatewayCount | Integer | 否 | 在线网关数量,默认0 | 8 | |
|
||||||
| offlineGatewayCount | Integer | 否 | 离线网关数量,默认0 | 0 | |
|
||||||
| projectManager | String | 否 | 项目负责人 | 李四 | |
|
||||||
| electricityPrice | BigDecimal | 否 | 电单价 | 0.75 | |
|
||||||
| remark | String | 否 | 备注 | 二期工程 | |
|
||||||
|
|
||||||
### 请求示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"projectCode": "PROJ2025002", |
|
||||||
"projectName": "深圳某某酒店节能改造项目", |
|
||||||
"projectAddress": "广东省深圳市南山区科技园", |
|
||||||
"installDate": "2025-08-01 10:00:00", |
|
||||||
"acceptanceDate": "2025-10-01 14:30:00", |
|
||||||
"onlineDate": "2025-10-15 09:00:00", |
|
||||||
"deviceCount": 100, |
|
||||||
"onlineDeviceCount": 95, |
|
||||||
"offlineDeviceCount": 5, |
|
||||||
"gatewayCount": 8, |
|
||||||
"onlineGatewayCount": 8, |
|
||||||
"offlineGatewayCount": 0, |
|
||||||
"projectManager": "李四", |
|
||||||
"electricityPrice": 0.75, |
|
||||||
"remark": "二期工程" |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
### 响应参数 |
|
||||||
|
|
||||||
| 参数名 | 类型 | 说明 | |
|
||||||
|--------|------|------| |
|
||||||
| code | Integer | 状态码(200成功) | |
|
||||||
| msg | String | 返回消息 | |
|
||||||
| data | Object | 返回数据(包含新增记录的ID) | |
|
||||||
|
|
||||||
### 响应示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"code": 200, |
|
||||||
"msg": "操作成功", |
|
||||||
"data": { |
|
||||||
"id": "660e8400-e29b-41d4-a716-446655440001" |
|
||||||
} |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
## 4. 修改项目信息 |
|
||||||
|
|
||||||
### 接口描述 |
|
||||||
更新已存在的项目信息记录。 |
|
||||||
|
|
||||||
### 请求信息 |
|
||||||
- **接口路径**: `/project/info` |
|
||||||
- **请求方式**: `PUT` |
|
||||||
- **权限要求**: `project:info:edit` |
|
||||||
- **Content-Type**: `application/json` |
|
||||||
|
|
||||||
### 请求参数(Body) |
|
||||||
|
|
||||||
| 参数名 | 类型 | 必填 | 说明 | 示例值 | |
|
||||||
|--------|------|------|------|--------| |
|
||||||
| id | String | 是 | 项目ID(UUID) | 550e8400-e29b-41d4-a716-446655440000 | |
|
||||||
| projectCode | String | 否 | 用户项目编码 | PROJ2025001 | |
|
||||||
| projectName | String | 否 | 项目名称 | 梅州豪生酒店节能改造项目(修改后) | |
|
||||||
| projectAddress | String | 否 | 项目地址 | 广东省梅州市梅江区江南街道(修改后) | |
|
||||||
| installDate | String | 否 | 安装日期 | 2025-03-15 10:00:00 | |
|
||||||
| acceptanceDate | String | 否 | 验收日期 | 2025-06-20 14:30:00 | |
|
||||||
| onlineDate | String | 否 | 上线日期 | 2025-07-01 09:00:00 | |
|
||||||
| deviceCount | Integer | 否 | 设备数量 | 160 | |
|
||||||
| onlineDeviceCount | Integer | 否 | 在线设备数量 | 155 | |
|
||||||
| offlineDeviceCount | Integer | 否 | 离线设备数量 | 5 | |
|
||||||
| gatewayCount | Integer | 否 | 网关数量 | 12 | |
|
||||||
| onlineGatewayCount | Integer | 否 | 在线网关数量 | 12 | |
|
||||||
| offlineGatewayCount | Integer | 否 | 离线网关数量 | 0 | |
|
||||||
| projectManager | String | 否 | 项目负责人 | 王五 | |
|
||||||
| electricityPrice | BigDecimal | 否 | 电单价 | 0.90 | |
|
||||||
| remark | String | 否 | 备注 | 一期工程扩建 | |
|
||||||
|
|
||||||
### 请求示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"id": "550e8400-e29b-41d4-a716-446655440000", |
|
||||||
"projectCode": "PROJ2025001", |
|
||||||
"projectName": "梅州豪生酒店节能改造项目(扩建)", |
|
||||||
"projectAddress": "广东省梅州市梅江区江南街道", |
|
||||||
"deviceCount": 160, |
|
||||||
"onlineDeviceCount": 155, |
|
||||||
"offlineDeviceCount": 5, |
|
||||||
"gatewayCount": 12, |
|
||||||
"onlineGatewayCount": 12, |
|
||||||
"offlineGatewayCount": 0, |
|
||||||
"projectManager": "王五", |
|
||||||
"electricityPrice": 0.90, |
|
||||||
"remark": "一期工程扩建" |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
### 响应示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"code": 200, |
|
||||||
"msg": "操作成功" |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
## 5. 删除项目信息 |
|
||||||
|
|
||||||
### 接口描述 |
|
||||||
批量删除项目信息记录。 |
|
||||||
|
|
||||||
### 请求信息 |
|
||||||
- **接口路径**: `/project/info/{ids}` |
|
||||||
- **请求方式**: `DELETE` |
|
||||||
- **权限要求**: `project:info:remove` |
|
||||||
|
|
||||||
### 路径参数 |
|
||||||
|
|
||||||
| 参数名 | 类型 | 必填 | 说明 | 示例值 | |
|
||||||
|--------|------|------|------|--------| |
|
||||||
| ids | String[] | 是 | 项目ID数组(多个ID用逗号分隔) | 550e8400-e29b-41d4-a716-446655440000,660e8400-e29b-41d4-a716-446655440001 | |
|
||||||
|
|
||||||
### 请求示例 |
|
||||||
``` |
|
||||||
DELETE /project/info/550e8400-e29b-41d4-a716-446655440000,660e8400-e29b-41d4-a716-446655440001 |
|
||||||
``` |
|
||||||
|
|
||||||
### 响应示例 |
|
||||||
```json |
|
||||||
{ |
|
||||||
"code": 200, |
|
||||||
"msg": "操作成功" |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
--- |
|
||||||
|
|
||||||
## 通用说明 |
|
||||||
|
|
||||||
### 状态码说明 |
|
||||||
|
|
||||||
| 状态码 | 说明 | |
|
||||||
|--------|------| |
|
||||||
| 200 | 操作成功 | |
|
||||||
| 401 | 未授权,需要登录 | |
|
||||||
| 403 | 无权限访问 | |
|
||||||
| 404 | 资源不存在 | |
|
||||||
| 500 | 服务器内部错误 | |
|
||||||
|
|
||||||
### 日期格式 |
|
||||||
所有日期时间字段统一使用格式:`yyyy-MM-dd HH:mm:ss` |
|
||||||
|
|
||||||
### 注意事项 |
|
||||||
1. 所有写操作(新增、修改、删除)都需要相应的权限 |
|
||||||
2. ID由系统自动生成UUID,无需前端传入 |
|
||||||
3. 新增和修改操作会自动记录创建人/更新人和时间 |
|
||||||
4. 列表查询支持分页,默认每页10条 |
|
||||||
5. 查询条件可以组合使用,未传递的条件不参与过滤 |
|
||||||
6. 数值类型字段(设备数量、网关数量等)默认为0 |
|
||||||
7. 电单价保留4位小数精度 |
|
||||||
|
|
||||||
### 权限配置 |
|
||||||
在系统中需要配置以下权限菜单: |
|
||||||
- `project:info:list` - 项目信息查询 |
|
||||||
- `project:info:query` - 项目详情查询 |
|
||||||
- `project:info:add` - 项目新增 |
|
||||||
- `project:info:edit` - 项目修改 |
|
||||||
- `project:info:remove` - 项目删除 |
|
||||||
@ -1,55 +0,0 @@ |
|||||||
package com.mh.web.controller.comprehensive; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.vo.EnergyQueryVO; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.report.IComprehensiveReportService; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Classname CompreReportController |
|
||||||
* Todo: 综合报表 |
|
||||||
* @Date 2025-10-05 13:59 |
|
||||||
* @Created by LJF |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/compre") |
|
||||||
public class CompreReportController extends BaseController { |
|
||||||
|
|
||||||
private final IComprehensiveReportService proOverviewService; |
|
||||||
|
|
||||||
public CompreReportController(IComprehensiveReportService proOverviewService) { |
|
||||||
this.proOverviewService = proOverviewService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/report") |
|
||||||
public TableDataInfo report(@RequestBody EnergyQueryVO vo) { |
|
||||||
TableDataInfo dataTable = getDataTable(proOverviewService.report(vo)); |
|
||||||
// 优化分页逻辑,防止出现数组越界异常
|
|
||||||
List<?> rows = dataTable.getRows(); |
|
||||||
int total = rows.size(); |
|
||||||
// 如果 pageNum 小于等于0,则返回全部
|
|
||||||
if (vo.getPageNum() <= 0) { |
|
||||||
return dataTable; |
|
||||||
} |
|
||||||
int pageNum = vo.getPageNum() <= 0 ? 1 : vo.getPageNum(); |
|
||||||
int pageSize = vo.getPageSize() <= 0 ? 10 : vo.getPageSize(); |
|
||||||
|
|
||||||
// 计算起始索引和结束索引
|
|
||||||
int startIndex = (pageNum - 1) * pageSize; |
|
||||||
int endIndex = Math.min(startIndex + pageSize, total); |
|
||||||
|
|
||||||
// 边界检查
|
|
||||||
if (startIndex >= total || startIndex < 0) { |
|
||||||
dataTable.setRows(List.of()); // 返回空列表而不是抛出异常
|
|
||||||
} else { |
|
||||||
dataTable.setRows(rows.subList(startIndex, endIndex)); |
|
||||||
} |
|
||||||
|
|
||||||
return dataTable; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,58 @@ |
|||||||
|
package com.mh.web.controller.energy; |
||||||
|
|
||||||
|
import com.mh.common.core.controller.BaseController; |
||||||
|
import com.mh.common.core.page.PageDomain; |
||||||
|
import com.mh.common.core.page.TableDataInfo; |
||||||
|
import com.mh.common.core.page.TableSupport; |
||||||
|
import com.mh.system.service.energy.IEnergyQueryService; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author LJF |
||||||
|
* @version 1.0 |
||||||
|
* @project EEMCS |
||||||
|
* @description 中央热水收益分析 |
||||||
|
* @date 2026-05-13 08:37:12 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping("/hot_water_revenue") |
||||||
|
public class HowWaterRevenueEnergyController extends BaseController { |
||||||
|
|
||||||
|
private final IEnergyQueryService energyQueryService; |
||||||
|
|
||||||
|
public HowWaterRevenueEnergyController(IEnergyQueryService iEnergyQueryService) { |
||||||
|
this.energyQueryService = iEnergyQueryService; |
||||||
|
} |
||||||
|
|
||||||
|
@GetMapping(value = "/energySum") |
||||||
|
public TableDataInfo queryEnergySum(@RequestParam(value = "buildingId", required = false) String buildingId, |
||||||
|
@RequestParam(value = "startDate", required = false) String startDate, |
||||||
|
@RequestParam(value = "endDate", required = false) String endDate, |
||||||
|
@RequestParam(value = "type", required = true) Integer type) { |
||||||
|
startPage(); |
||||||
|
List<?> result = energyQueryService.queryRevenueEnergyDataSumList(buildingId, startDate, endDate, type); |
||||||
|
return getDataTable(result); |
||||||
|
} |
||||||
|
|
||||||
|
@GetMapping("/query") |
||||||
|
public TableDataInfo queryEnergy(@RequestParam(value = "buildingId", required = false) String buildingId, |
||||||
|
@RequestParam(value = "startDate", required = false) String startDate, |
||||||
|
@RequestParam(value = "endDate", required = false) String endDate, |
||||||
|
@RequestParam(value = "type") int type) { |
||||||
|
startPage(); |
||||||
|
List<?> result = energyQueryService.queryRevenueEnergyDataList(buildingId, startDate, endDate, type); |
||||||
|
TableDataInfo dataTable = getDataTable(result); |
||||||
|
// 或者总条数数据
|
||||||
|
PageDomain pageDomain = TableSupport.buildPageRequest(); |
||||||
|
pageDomain.setPageNum(0); |
||||||
|
List<?> result1 = energyQueryService.queryRevenueEnergyDataList(buildingId, startDate, endDate, type); |
||||||
|
dataTable.setTotal(result1.size()); |
||||||
|
return dataTable; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -1,45 +0,0 @@ |
|||||||
package com.mh.web.controller.monitor; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
import jakarta.annotation.Resource; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestParam; |
|
||||||
import org.springframework.web.bind.annotation.RestController; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 热回收系统工业流程图 |
|
||||||
* @date 2026-01-28 13:48:13 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/device/ers") |
|
||||||
public class ERSMonitorController extends BaseController { |
|
||||||
|
|
||||||
@Resource |
|
||||||
private ICollectionParamsManageService iCollectionParamsManageService; |
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('device:cpm:list')") |
|
||||||
@GetMapping("/monitor/list") |
|
||||||
public TableDataInfo list(@RequestParam(name = "systemType") String systemType) |
|
||||||
{ |
|
||||||
List<DeviceMonitorDTO> list = iCollectionParamsManageService.selectMonitorListBySystemType(systemType); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@GetMapping("/monitor/totalDatas") |
|
||||||
public TableDataInfo totalERSDatas(@RequestParam(name = "systemType") String systemType) |
|
||||||
{ |
|
||||||
List<?> list = iCollectionParamsManageService.totalERSDatas(systemType); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,70 +0,0 @@ |
|||||||
package com.mh.web.controller.monitor; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestParam; |
|
||||||
import org.springframework.web.bind.annotation.RestController; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 三台采暖泵的监测 |
|
||||||
* @date 2025-09-12 09:36:33 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/device") |
|
||||||
public class HeatingPumpMonitorController extends BaseController { |
|
||||||
|
|
||||||
private final ICollectionParamsManageService collectionParamsManageService; |
|
||||||
|
|
||||||
public HeatingPumpMonitorController(ICollectionParamsManageService collectionParamsManageService) { |
|
||||||
this.collectionParamsManageService = collectionParamsManageService; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 alarmList 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询报警 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/heatPump/alarmList") |
|
||||||
public TableDataInfo list(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<?> list = collectionParamsManageService.selectHeatPumpAlarmListByParams(systemType, type, "14", "5"); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 运行热泵统计 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询报警 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/heatPump/online") |
|
||||||
public TableDataInfo online(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<?> list = collectionParamsManageService.selectHeatPumpOnlineByParams(systemType, type); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 采暖泵 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询动画界面数据 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/heatPump/list") |
|
||||||
public TableDataInfo heatPumpList(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<DeviceMonitorDTO> list = collectionParamsManageService.selectHotWaterBoilerListByParams(systemType, type, "14"); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,76 +0,0 @@ |
|||||||
package com.mh.web.controller.monitor; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.overview.HomeService; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.RestController; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 新增首页监控 |
|
||||||
* @date 2026-06-05 10:14:39 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/home") |
|
||||||
public class HomeController extends BaseController { |
|
||||||
|
|
||||||
@Autowired |
|
||||||
HomeService homeService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 主界面图表 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@GetMapping("/charts") |
|
||||||
public TableDataInfo getHomeCharts(){ |
|
||||||
return homeService.getHomeCharts(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 查询日供冷量、月供冷量、年供冷量 |
|
||||||
* 日、月、年、累计EER |
|
||||||
* 累计供冷量 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@GetMapping("/statical") |
|
||||||
public TableDataInfo getStatisticalData(){ |
|
||||||
return homeService.getStatisticalData(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 查询能耗系数 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@GetMapping("/getCoe") |
|
||||||
public TableDataInfo getCoe(){ |
|
||||||
return homeService.getCoe(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 查询系统运行时长 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@GetMapping("/getRunTime") |
|
||||||
public TableDataInfo getRunTime(){ |
|
||||||
return homeService.getRunTime(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取实时功率 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@GetMapping("/getCurrentRate") |
|
||||||
public TableDataInfo getCurrentRate(){ |
|
||||||
return homeService.getCurrentRate(); |
|
||||||
} |
|
||||||
|
|
||||||
@GetMapping("/getWeatherData") |
|
||||||
public TableDataInfo getWeatherData() { |
|
||||||
return homeService.getWeatherData(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,57 +0,0 @@ |
|||||||
package com.mh.web.controller.monitor; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestParam; |
|
||||||
import org.springframework.web.bind.annotation.RestController; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 蒸汽热水锅炉监测 |
|
||||||
* @date 2025-09-12 09:36:33 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/device") |
|
||||||
public class SteamBoilerMonitorController extends BaseController { |
|
||||||
|
|
||||||
private final ICollectionParamsManageService collectionParamsManageService; |
|
||||||
|
|
||||||
public SteamBoilerMonitorController(ICollectionParamsManageService collectionParamsManageService) { |
|
||||||
this.collectionParamsManageService = collectionParamsManageService; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 steamBoiler 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询动画界面数据,1:代表查询模拟量监测数据,2:代表查询继电器数据,3:查询端口输入数据,4:代表查询报警数据 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/steamBoiler/list") |
|
||||||
public TableDataInfo list(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type") String type) { |
|
||||||
List<CollectionParamsManage> list = collectionParamsManageService.selectSteamBoilerListByParams(systemType, type); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 热水锅炉 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询动画界面数据 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/hotWaterBoiler/list") |
|
||||||
public TableDataInfo hotWaterBoilerList(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<DeviceMonitorDTO> list = collectionParamsManageService.selectHotWaterBoilerListByParams(systemType, type, "13"); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,85 +0,0 @@ |
|||||||
package com.mh.web.controller.project; |
|
||||||
|
|
||||||
import com.mh.common.annotation.Log; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.entity.ProjectInfo; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.enums.BusinessType; |
|
||||||
import com.mh.system.service.project.IProjectInfoService; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import org.springframework.validation.annotation.Validated; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.util.Date; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author EEMCS |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 项目信息管理 |
|
||||||
* @date 2026-06-11 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/project/info") |
|
||||||
public class ProjectInfoController extends BaseController { |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private IProjectInfoService projectInfoService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取项目信息列表 |
|
||||||
*/ |
|
||||||
@PreAuthorize("@ss.hasPermi('project:info:list')") |
|
||||||
@GetMapping("/list") |
|
||||||
public TableDataInfo list(ProjectInfo projectInfo) { |
|
||||||
startPage(); |
|
||||||
List<ProjectInfo> list = projectInfoService.selectProjectInfoList(projectInfo); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 根据项目ID获取详细信息 |
|
||||||
*/ |
|
||||||
@PreAuthorize("@ss.hasPermi('project:info:query')") |
|
||||||
@GetMapping(value = "/{id}") |
|
||||||
public AjaxResult getInfo(@PathVariable String id) { |
|
||||||
return success(projectInfoService.selectProjectInfoById(id)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 新增项目信息 |
|
||||||
*/ |
|
||||||
@PreAuthorize("@ss.hasPermi('project:info:add')") |
|
||||||
@Log(title = "项目信息管理", businessType = BusinessType.INSERT) |
|
||||||
@PostMapping |
|
||||||
public AjaxResult add(@Validated @RequestBody ProjectInfo projectInfo) { |
|
||||||
projectInfo.setCreateBy(getUsername()); |
|
||||||
projectInfo.setCreateTime(new Date()); |
|
||||||
return toAjax(projectInfoService.insertProjectInfo(projectInfo)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改项目信息 |
|
||||||
*/ |
|
||||||
@PreAuthorize("@ss.hasPermi('project:info:edit')") |
|
||||||
@Log(title = "项目信息管理", businessType = BusinessType.UPDATE) |
|
||||||
@PutMapping |
|
||||||
public AjaxResult edit(@Validated @RequestBody ProjectInfo projectInfo) { |
|
||||||
projectInfo.setUpdateBy(getUsername()); |
|
||||||
projectInfo.setUpdateTime(new Date()); |
|
||||||
return toAjax(projectInfoService.updateProjectInfo(projectInfo)); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 删除项目信息 |
|
||||||
*/ |
|
||||||
@PreAuthorize("@ss.hasPermi('project:info:remove')") |
|
||||||
@Log(title = "项目信息管理", businessType = BusinessType.DELETE) |
|
||||||
@DeleteMapping("/{ids}") |
|
||||||
public AjaxResult remove(@PathVariable String[] ids) { |
|
||||||
return toAjax(projectInfoService.deleteProjectInfoByIds(ids)); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,96 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.dto.ReportHeatingRunParamDTO; |
|
||||||
import com.mh.common.core.domain.dto.ReportSteamRunParamDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportHeatingRunParamHis; |
|
||||||
import com.mh.common.core.domain.entity.ReportSteamRunParamHis; |
|
||||||
import com.mh.common.core.page.PageDomain; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.core.page.TableSupport; |
|
||||||
import com.mh.common.utils.file.handle.ExcelFillCellMergeHandler; |
|
||||||
import com.mh.common.utils.file.handle.ReportSysParamHandler; |
|
||||||
import com.mh.common.utils.file.handle.RowHeightStyleHandler; |
|
||||||
import com.mh.common.utils.sql.SqlUtil; |
|
||||||
import com.mh.system.service.report.IReportHeatingService; |
|
||||||
import com.mh.system.service.report.IReportSteamService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.nio.charset.StandardCharsets; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project eemcs |
|
||||||
* @description 采暖系统运行参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportHeating") |
|
||||||
@Slf4j |
|
||||||
public class ReportHeatingController extends BaseController { |
|
||||||
|
|
||||||
private final IReportHeatingService reportHeatingService; |
|
||||||
|
|
||||||
private ReportHeatingController(IReportHeatingService reportHeatingService) { |
|
||||||
this.reportHeatingService = reportHeatingService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportHeatingRunParamHis reportHeatingRunParamHis) { |
|
||||||
if (reportHeatingRunParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportHeatingRunParamHis.getPageNum(), reportHeatingRunParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportHeatingRunParamHis> list = reportHeatingService.selectHeatingList(reportHeatingRunParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportHeatingRunParamHis reportHeatingRunParamHis) { |
|
||||||
return toAjax(reportHeatingService.updateRunParams(reportHeatingRunParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportHeatingRunParamHis reportSteamRunParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "采暖系统运行记录表.xlsx"; |
|
||||||
String headTitle = "采暖系统运行记录表"; |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportHeatingRunParamHis> list = reportHeatingService.selectHeatingList(reportSteamRunParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, StandardCharsets.UTF_8) + "\""); |
|
||||||
response.setCharacterEncoding(String.valueOf(StandardCharsets.UTF_8)); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
List<ReportHeatingRunParamDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
ReportHeatingRunParamDTO deviceInfoDTO = new ReportHeatingRunParamDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), ReportHeatingRunParamDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler(headTitle)) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,131 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.alibaba.excel.ExcelWriter; |
|
||||||
import com.alibaba.excel.write.metadata.WriteSheet; |
|
||||||
import com.alibaba.excel.write.metadata.fill.FillWrapper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.WeatherDataDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportMeterReadingsHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.utils.DateUtils; |
|
||||||
import com.mh.system.service.device.ICoolingSystemMonitorService; |
|
||||||
import com.mh.system.service.report.IMeterReadingsHisService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import org.apache.poi.ss.usermodel.*; |
|
||||||
import org.springframework.core.io.ClassPathResource; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream; |
|
||||||
import java.io.File; |
|
||||||
import java.io.IOException; |
|
||||||
import java.io.InputStream; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.HashMap; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 每日抄表记录查询 |
|
||||||
* @date 2025-10-21 16:04:09 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportMeterReadings") |
|
||||||
public class ReportMeterReadingsController extends BaseController { |
|
||||||
|
|
||||||
private final IMeterReadingsHisService meterReadingsHisService; |
|
||||||
|
|
||||||
private final ICoolingSystemMonitorService coolingSystemMonitorService; |
|
||||||
|
|
||||||
public ReportMeterReadingsController(IMeterReadingsHisService meterReadingsHisService, ICoolingSystemMonitorService coolingSystemMonitorService) { |
|
||||||
this.meterReadingsHisService = meterReadingsHisService; |
|
||||||
this.coolingSystemMonitorService = coolingSystemMonitorService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportMeterReadingsHis todayTimestamp) |
|
||||||
{ |
|
||||||
List<ReportMeterReadingsHis> list = meterReadingsHisService.selectList(todayTimestamp); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportMeterReadingsHis reportMeterReadingsHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "节能岛改造每日能耗统计表"+ DateUtils.dateToString(reportMeterReadingsHis.getTodayTimestamp(), "yyyyMMdd")+".xlsx"; |
|
||||||
// 读取资源文件
|
|
||||||
ClassPathResource classPathResource = new ClassPathResource(File.separator + "节能岛改造每日能耗统计表.xlsx"); |
|
||||||
// 获取数据
|
|
||||||
List<ReportMeterReadingsHis> list = meterReadingsHisService.selectList(reportMeterReadingsHis); |
|
||||||
// 组织并填充模板数据
|
|
||||||
ByteArrayOutputStream byteArrayOutputStream = compositeFill(classPathResource.getInputStream(), reportMeterReadingsHis.getTodayTimestamp(), list); |
|
||||||
|
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
|
|
||||||
// 将文件内容写入响应输出流,浏览器可以直接触发下载
|
|
||||||
response.getOutputStream().write(byteArrayOutputStream.toByteArray()); |
|
||||||
response.getOutputStream().flush(); |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
private ByteArrayOutputStream compositeFill(InputStream templateInputStream, Date todayTimestamp, List<ReportMeterReadingsHis> list) throws IOException { |
|
||||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); |
|
||||||
// 使用EasyExcel的模板填充功能,在这里指定合并单元格,这里应该是easyExcel的bug,第一列无法合并,其他列都可以,所以第一列单独用原生poi进行合并
|
|
||||||
try (ExcelWriter excelWriter = EasyExcel.write(byteArrayOutputStream).withTemplate(templateInputStream) |
|
||||||
.build()) { |
|
||||||
WriteSheet writeSheet = EasyExcel.writerSheet().build(); |
|
||||||
// 防止上面两个表格覆盖下面两个表格,每一行都采用新增一行的方式
|
|
||||||
// FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
|
|
||||||
// 使用模板填充,必须使用FillWrapper,这是官方要求,并且每行两个表格只能有一个表格设置增行,否则会存在一个表格有空行,这里是造的测试数据
|
|
||||||
for (int i = 0; i < list.size(); i++) { |
|
||||||
excelWriter.fill(new FillWrapper("data"+(i+1), List.of(list.get(i))), writeSheet); |
|
||||||
} |
|
||||||
|
|
||||||
// 设置表格外的填充数据,例如总计、日期等数据
|
|
||||||
HashMap<String, Object> map = new HashMap<>(); |
|
||||||
|
|
||||||
List<WeatherDataDTO> weatherTemp = (List<WeatherDataDTO>) coolingSystemMonitorService.getWeatherTemp(DateUtils.dateToString(todayTimestamp, "yyyy-MM-dd"), DateUtils.dateToString(todayTimestamp, "yyyy-MM-dd")); |
|
||||||
if (!weatherTemp.isEmpty()) { |
|
||||||
String maxTemp = weatherTemp.getFirst().getMaxTemp(); |
|
||||||
map.put("maxTemp", maxTemp); |
|
||||||
String minTemp = weatherTemp.getFirst().getMinTemp(); |
|
||||||
map.put("minTemp", minTemp); |
|
||||||
} |
|
||||||
|
|
||||||
map.put("date", DateUtils.dateToString(todayTimestamp, "yyyy年MM月dd日")); |
|
||||||
excelWriter.fill(map, writeSheet); |
|
||||||
|
|
||||||
// 2. 获取 Workbook 并计算公式
|
|
||||||
Workbook workbook = excelWriter.writeContext() |
|
||||||
.writeWorkbookHolder() |
|
||||||
.getWorkbook(); |
|
||||||
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); |
|
||||||
for (Row row : workbook.getSheetAt(0)) { |
|
||||||
for (Cell cell : row) { |
|
||||||
if (cell.getCellType() == CellType.FORMULA) { |
|
||||||
evaluator.evaluateFormulaCell(cell); // 单元格级计算
|
|
||||||
// evaluator.evaluateAll(); // 全工作簿计算(推荐)
|
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
// 3. 强制刷新计算结果
|
|
||||||
workbook.setForceFormulaRecalculation(true); |
|
||||||
excelWriter.finish(); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
// 合并单元格,由于easyExcel自带的OnceAbsoluteMergeStrategy合并策略bug,这里需要用poi合并一下
|
|
||||||
return byteArrayOutputStream; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,156 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.dto.ReportSteamRunParamDTO; |
|
||||||
import com.mh.common.core.domain.dto.ThreeFloorReportHotWaterDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportSteamRunParamHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.utils.file.handle.ExcelFillCellMergeHandler; |
|
||||||
import com.mh.common.utils.file.handle.ReportSysParamHandler; |
|
||||||
import com.mh.common.utils.file.handle.RowHeightStyleHandler; |
|
||||||
import com.mh.system.service.report.IReportSteamService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project eemcs |
|
||||||
* @description 蒸汽系统运行参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportSteam") |
|
||||||
@Slf4j |
|
||||||
public class ReportSteamController extends BaseController { |
|
||||||
|
|
||||||
private final IReportSteamService reportSteamService; |
|
||||||
|
|
||||||
private ReportSteamController(IReportSteamService reportSteamService) { |
|
||||||
this.reportSteamService = reportSteamService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis) { |
|
||||||
if (reportSteamRunParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportSteamRunParamHis.getPageNum(), reportSteamRunParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportSteamRunParamHis> list = reportSteamService.selectList(reportSteamRunParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis) { |
|
||||||
return toAjax(reportSteamService.updateRunParams(reportSteamRunParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "蒸汽机运行记录表.xlsx"; |
|
||||||
String headTitle = "蒸汽机运行记录表"; |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportSteamRunParamHis> list = reportSteamService.selectList(reportSteamRunParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
List<ReportSteamRunParamDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
ReportSteamRunParamDTO deviceInfoDTO = new ReportSteamRunParamDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
// 单独处理运行状态
|
|
||||||
// 0:上电延时
|
|
||||||
// 1:关机
|
|
||||||
// 2:待机
|
|
||||||
// 3:前清扫
|
|
||||||
// 4:预点火
|
|
||||||
// 5:点火
|
|
||||||
// 6:传火
|
|
||||||
// 7:工作
|
|
||||||
// 8:后清扫
|
|
||||||
// 9:故障
|
|
||||||
// 10:小火保持
|
|
||||||
// 11:自检
|
|
||||||
// 12:检漏
|
|
||||||
// 13:开点火器
|
|
||||||
// 14:启动等待中
|
|
||||||
switch (info.getCurStatus()) { |
|
||||||
case 0: |
|
||||||
deviceInfoDTO.setCurStatus("上电延时"); |
|
||||||
break; |
|
||||||
case 1: |
|
||||||
deviceInfoDTO.setCurStatus("关机"); |
|
||||||
break; |
|
||||||
case 2: |
|
||||||
deviceInfoDTO.setCurStatus("待机"); |
|
||||||
break; |
|
||||||
case 3: |
|
||||||
deviceInfoDTO.setCurStatus("前清扫"); |
|
||||||
break; |
|
||||||
case 4: |
|
||||||
deviceInfoDTO.setCurStatus("预点火"); |
|
||||||
break; |
|
||||||
case 5: |
|
||||||
deviceInfoDTO.setCurStatus("点火"); |
|
||||||
break; |
|
||||||
case 6: |
|
||||||
deviceInfoDTO.setCurStatus("传火"); |
|
||||||
break; |
|
||||||
case 7: |
|
||||||
deviceInfoDTO.setCurStatus("工作"); |
|
||||||
break; |
|
||||||
case 8: |
|
||||||
deviceInfoDTO.setCurStatus("后清扫"); |
|
||||||
break; |
|
||||||
case 9: |
|
||||||
deviceInfoDTO.setCurStatus("故障"); |
|
||||||
break; |
|
||||||
case 10: |
|
||||||
deviceInfoDTO.setCurStatus("小火保持"); |
|
||||||
break; |
|
||||||
case 11: |
|
||||||
deviceInfoDTO.setCurStatus("自检"); |
|
||||||
break; |
|
||||||
case 12: |
|
||||||
deviceInfoDTO.setCurStatus("检漏"); |
|
||||||
break; |
|
||||||
case 13: |
|
||||||
deviceInfoDTO.setCurStatus("开点火器"); |
|
||||||
break; |
|
||||||
case 14: |
|
||||||
deviceInfoDTO.setCurStatus("启动等待中"); |
|
||||||
break; |
|
||||||
default: |
|
||||||
deviceInfoDTO.setCurStatus("未知"); |
|
||||||
break; |
|
||||||
} |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), ReportSteamRunParamDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler(headTitle)) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,100 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.dto.MaglevReportSysParamDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportSysRunParamHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.utils.StringUtils; |
|
||||||
import com.mh.common.utils.file.handle.ExcelFillCellMergeHandler; |
|
||||||
import com.mh.common.utils.file.handle.ReportSysParamHandler; |
|
||||||
import com.mh.common.utils.file.handle.RowHeightStyleHandler; |
|
||||||
import com.mh.system.service.report.IReportSysService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 系统参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportSys") |
|
||||||
@Slf4j |
|
||||||
public class ReportSysController extends BaseController { |
|
||||||
|
|
||||||
private final IReportSysService reportSysService; |
|
||||||
|
|
||||||
private ReportSysController(IReportSysService reportSysService) { |
|
||||||
this.reportSysService = reportSysService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportSysRunParamHis reportSysRunParamHis) |
|
||||||
{ |
|
||||||
if (reportSysRunParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportSysRunParamHis.getPageNum(), reportSysRunParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportSysRunParamHis> list = reportSysService.selectList(reportSysRunParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportSysRunParamHis reportSysRunParamHis) |
|
||||||
{ |
|
||||||
return toAjax(reportSysService.updateSysRunParams(reportSysRunParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportSysRunParamHis reportSysRunParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "系统参数运行日志报表.xlsx"; |
|
||||||
String deviceNum = (String) reportSysRunParamHis.getParams().get("deviceNum"); |
|
||||||
if (!StringUtils.isBlank(deviceNum)) { |
|
||||||
if ("2".equals(deviceNum)) { |
|
||||||
fileName = "变频螺杆主机系统参数报表.xlsx"; |
|
||||||
} else { |
|
||||||
fileName = "磁悬浮主机系统参数报表.xlsx"; |
|
||||||
} |
|
||||||
} |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportSysRunParamHis> list = reportSysService.selectList(reportSysRunParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
int headSize = 3; |
|
||||||
List<MaglevReportSysParamDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
MaglevReportSysParamDTO deviceInfoDTO = new MaglevReportSysParamDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), MaglevReportSysParamDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler("磁悬浮水冷冷水机组数据运行记录表")) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
Binary file not shown.
@ -1,40 +0,0 @@ |
|||||||
package com.mh.web.controller.ai; |
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; |
|
||||||
import org.springframework.boot.test.context.SpringBootTest; |
|
||||||
import org.springframework.test.web.servlet.MockMvc; |
|
||||||
|
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; |
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; |
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; |
|
||||||
|
|
||||||
@SpringBootTest |
|
||||||
@AutoConfigureMockMvc |
|
||||||
public class AiFileControllerTest { |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private MockMvc mockMvc; |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testGetFileDownload() throws Exception { |
|
||||||
// 测试GET请求下载文件
|
|
||||||
mockMvc.perform(get("/ai/files/测试文件.txt")) |
|
||||||
.andExpect(status().isNotFound()); // 文件不存在返回404
|
|
||||||
} |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testPostDeviceAnalyzeExport() throws Exception { |
|
||||||
// 测试POST请求设备分析导出
|
|
||||||
mockMvc.perform(post("/ai/files/设备分析报表.xlsx")) |
|
||||||
.andExpect(status().isNotFound()); // 文件不存在返回404
|
|
||||||
} |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testChineseFileNameHandling() throws Exception { |
|
||||||
// 测试中文文件名处理
|
|
||||||
mockMvc.perform(get("/ai/files/能耗报表_2026-02-27.docx")) |
|
||||||
.andExpect(status().isNotFound()); // 文件不存在返回404,但不应出现映射冲突
|
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,52 +0,0 @@ |
|||||||
package com.mh.web.controller.ai; |
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test; |
|
||||||
|
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.nio.charset.StandardCharsets; |
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue; |
|
||||||
|
|
||||||
public class FileNameEncodingTest { |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testChineseFileNameEncoding() throws Exception { |
|
||||||
String chineseFileName = "能耗报表_2026-02-27.docx"; |
|
||||||
|
|
||||||
// 测试RFC 5987格式编码
|
|
||||||
String encodedFileName = URLEncoder.encode(chineseFileName, StandardCharsets.UTF_8.toString()); |
|
||||||
String disposition = String.format("attachment; filename*=UTF-8''%s", encodedFileName); |
|
||||||
|
|
||||||
System.out.println("原始文件名: " + chineseFileName); |
|
||||||
System.out.println("编码后文件名: " + encodedFileName); |
|
||||||
System.out.println("完整Content-Disposition头: " + disposition); |
|
||||||
|
|
||||||
// 验证编码后的字符串不包含中文字符
|
|
||||||
assertTrue(encodedFileName.matches("[A-Za-z0-9%_-]+")); |
|
||||||
// 验证包含预期的编码字符
|
|
||||||
assertTrue(encodedFileName.contains("%")); |
|
||||||
} |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testDifferentChineseFileNames() throws Exception { |
|
||||||
String[] testFiles = { |
|
||||||
"系统报表.xlsx", |
|
||||||
"数据分析报告.pdf", |
|
||||||
"能耗统计_2026年2月.docx", |
|
||||||
"设备运行状态.csv" |
|
||||||
}; |
|
||||||
|
|
||||||
for (String fileName : testFiles) { |
|
||||||
String encoded = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString()); |
|
||||||
String disposition = String.format("attachment; filename*=UTF-8''%s", encoded); |
|
||||||
|
|
||||||
System.out.println("文件名: " + fileName); |
|
||||||
System.out.println("编码: " + encoded); |
|
||||||
System.out.println("Disposition: " + disposition); |
|
||||||
System.out.println("---"); |
|
||||||
|
|
||||||
// 验证编码正确
|
|
||||||
assertTrue(encoded.matches("[A-Za-z0-9%_-]+")); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,15 +0,0 @@ |
|||||||
package com.mh.common.constant; |
|
||||||
|
|
||||||
import java.text.SimpleDateFormat; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Author : Rainbow |
|
||||||
* @date : 2023/7/10 |
|
||||||
*/ |
|
||||||
public class DateConstant { |
|
||||||
public final static SimpleDateFormat DAY_SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
||||||
public final static SimpleDateFormat MONTH = new SimpleDateFormat("yyyy-MM"); |
|
||||||
public final static SimpleDateFormat DAY = new SimpleDateFormat("yyyy-MM-dd"); |
|
||||||
public final static SimpleDateFormat MONTH_SDF = new SimpleDateFormat("yyyy-MM-dd"); |
|
||||||
public final static SimpleDateFormat YEAR_SDF = new SimpleDateFormat("yyyy"); |
|
||||||
} |
|
||||||
@ -1,74 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 综合系统能耗查询DTO |
|
||||||
* @date 2025-10-09 10:17:26 |
|
||||||
*/ |
|
||||||
public class CompreReportDTO { |
|
||||||
|
|
||||||
private String time; |
|
||||||
|
|
||||||
private String electValue; |
|
||||||
|
|
||||||
private String coldValue; |
|
||||||
|
|
||||||
private String hotValue; |
|
||||||
|
|
||||||
private String steamValue; |
|
||||||
|
|
||||||
public String getTime() { |
|
||||||
return time; |
|
||||||
} |
|
||||||
|
|
||||||
public void setTime(String time) { |
|
||||||
this.time = time; |
|
||||||
} |
|
||||||
|
|
||||||
public String getElectValue() { |
|
||||||
return electValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setElectValue(String electValue) { |
|
||||||
this.electValue = electValue; |
|
||||||
} |
|
||||||
|
|
||||||
public String getColdValue() { |
|
||||||
return coldValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setColdValue(String coldValue) { |
|
||||||
this.coldValue = coldValue; |
|
||||||
} |
|
||||||
|
|
||||||
public String getHotValue() { |
|
||||||
return hotValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setHotValue(String hotValue) { |
|
||||||
this.hotValue = hotValue; |
|
||||||
} |
|
||||||
|
|
||||||
public String getSteamValue() { |
|
||||||
return steamValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setSteamValue(String steamValue) { |
|
||||||
this.steamValue = steamValue; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", CompreReportDTO.class.getSimpleName() + "[", "]") |
|
||||||
.add("time='" + time + "'") |
|
||||||
.add("electValue='" + electValue + "'") |
|
||||||
.add("coldValue='" + coldValue + "'") |
|
||||||
.add("hotValue='" + hotValue + "'") |
|
||||||
.add("steamValue='" + steamValue + "'") |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -0,0 +1,77 @@ |
|||||||
|
package com.mh.common.core.domain.dto; |
||||||
|
|
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.StringJoiner; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author LJF |
||||||
|
* @version 1.0 |
||||||
|
* @project EEMCS |
||||||
|
* @description 热水收益总的收益情况 |
||||||
|
* @date 2026-05-13 09:33:27 |
||||||
|
*/ |
||||||
|
@Setter |
||||||
|
@Getter |
||||||
|
public class HotWaterRevenueSumDTO { |
||||||
|
|
||||||
|
/** |
||||||
|
* 时间 |
||||||
|
*/ |
||||||
|
private String curDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 建筑id |
||||||
|
*/ |
||||||
|
private String buildingId; |
||||||
|
|
||||||
|
// 电表用量
|
||||||
|
private BigDecimal totalUseEleAmount; |
||||||
|
|
||||||
|
// 电量单价
|
||||||
|
private BigDecimal electPrice; |
||||||
|
|
||||||
|
// 用电金额
|
||||||
|
private BigDecimal totalUseEle; |
||||||
|
|
||||||
|
// 水表用量
|
||||||
|
private BigDecimal totalUseWaterAmount; |
||||||
|
|
||||||
|
// 水价
|
||||||
|
private BigDecimal waterPrice; |
||||||
|
|
||||||
|
// 用水金额
|
||||||
|
private BigDecimal totalUseWater; |
||||||
|
|
||||||
|
// 平均电表用量
|
||||||
|
private BigDecimal avgUseEle; |
||||||
|
|
||||||
|
// 平均水表用量
|
||||||
|
private BigDecimal avgUseWater; |
||||||
|
|
||||||
|
// 单耗
|
||||||
|
private BigDecimal unitConsumption; |
||||||
|
|
||||||
|
// 收益总额
|
||||||
|
private BigDecimal totalIncome; |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
return new StringJoiner(", ", HotWaterRevenueSumDTO.class.getSimpleName() + "[", "]") |
||||||
|
.add("curDate='" + curDate + "'") |
||||||
|
.add("buildingId='" + buildingId + "'") |
||||||
|
.add("totalUseEleAmount=" + totalUseEleAmount) |
||||||
|
.add("electPrice=" + electPrice) |
||||||
|
.add("totalUseEle=" + totalUseEle) |
||||||
|
.add("totalUseWaterAmount=" + totalUseWaterAmount) |
||||||
|
.add("waterPrice=" + waterPrice) |
||||||
|
.add("totalUseWater=" + totalUseWater) |
||||||
|
.add("avgUseEle=" + avgUseEle) |
||||||
|
.add("avgUseWater=" + avgUseWater) |
||||||
|
.add("unitConsumption=" + unitConsumption) |
||||||
|
.add("totalIncome=" + totalIncome) |
||||||
|
.toString(); |
||||||
|
} |
||||||
|
} |
||||||
@ -1,284 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnore; |
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
//import java.math.String;
|
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 磁悬浮主机系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(25) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class MaglevReportSysParamDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 班次
|
|
||||||
// */
|
|
||||||
// @ColumnWidth(10)
|
|
||||||
// @ExcelProperty(value = {"${deviceType}", "班次", "班次"}, index = 1)
|
|
||||||
// private String classes;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水进水温度℃ |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "冷冻水进水温度℃"}, index = 1) |
|
||||||
private BigDecimal tempInChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水出水温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "冷冻水出水温度℃"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设计流量% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "设计流量%"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal designFlow; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "蒸发器压力kpa"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressEvapSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器饱和温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "蒸发器饱和温度℃"}, index = 5) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempEvapSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 趋近温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "趋近温度℃"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempEvapApproaching; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水进水温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷却水进水温度℃"}, index = 7) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempInCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水出水温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷却水出水温度℃"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷凝器压力kpa"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressCondenserSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器饱和温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷凝器饱和温度℃"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempCondenserSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器趋近温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "趋近温度℃"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempCondenserApproaching; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水设定值 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "冷冻水设定值℃"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal setChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷水机需求% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "冷水机需求%"}, index = 13) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal setLoad; |
|
||||||
|
|
||||||
/** |
|
||||||
* 总电流A |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "总电流A"}, index = 14) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal currentTotal; |
|
||||||
|
|
||||||
/** |
|
||||||
* 总输入功率kw |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "总输入功率kw"}, index = 15) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal inputPowerTotal; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比 |
|
||||||
*/ |
|
||||||
// @ExcelProperty(value = {"${deviceType}", "系统", "压缩比"}, index = 16)
|
|
||||||
// @ColumnWidth(10)
|
|
||||||
// private BigDecimal ratioComp;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比1 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "1#压缩机压缩比"}, index = 16) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal ratioCompOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比2 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "2#压缩机压缩比"}, index = 17) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal ratioCompTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比3 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "3#压缩机压缩比"}, index = 18) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal ratioCompThree; |
|
||||||
|
|
||||||
/** |
|
||||||
* 膨胀阀开度% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "膨胀阀开度%"}, index = 19) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal openExv; |
|
||||||
|
|
||||||
/** |
|
||||||
* 运行中的压缩机数量 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "运行中的压缩机数量"}, index = 20) |
|
||||||
@ColumnWidth(10) |
|
||||||
private Integer runCompNum; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水泵频率hz |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水泵频率hz"}, index = 21) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal frequencyChiller; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水进水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水进水压力kpa"}, index = 22) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressInChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水出水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水出水压力kpa"}, index = 23) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressOutChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水泵频率hz |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水泵频率hz"}, index = 24) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal frequencyCooling; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水进水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水进水压力kpa"}, index = 25) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressInCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水出水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水出水压力kpa"}, index = 26) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressOutCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却塔频率hz |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔频率hz"}, index = 27) |
|
||||||
private BigDecimal frequencyCoolingTower; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却塔运行数量(原注释可能有误,根据列名调整) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔运行数量"}, index = 28) |
|
||||||
private Integer runCoolingTower; |
|
||||||
|
|
||||||
/** |
|
||||||
* 室外温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "室外温度℃", "室外温度℃"}, index = 29) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutdoor; |
|
||||||
|
|
||||||
/** |
|
||||||
* 室外湿度% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "室外湿度%", "室外湿度%"}, index = 30) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal humidityOutdoor; |
|
||||||
|
|
||||||
/** |
|
||||||
* 恒压补水罐压力 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "恒压补水罐压力MPa", "恒压补水罐压力MPa"}, index = 31) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressConstantWaterTank; |
|
||||||
|
|
||||||
/** |
|
||||||
* 巡查记录人 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 32) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,179 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 采暖系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(20) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class ReportHeatingRunParamDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "运行状态"}, index = 1) |
|
||||||
private String runStatusBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "设定温度(℃)"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempSetBoilerOne; |
|
||||||
/** |
|
||||||
* 出水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "出水温度(℃)"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 回水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "回水温度(℃)"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempInBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 炉水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "炉水温度(℃)"}, index = 5) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempWaterBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 烟道温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "烟道温度(℃)"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempFlueGasBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "运行状态"}, index = 7) |
|
||||||
private String runStatusBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "设定温度(℃)"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempSetBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 出水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "出水温度(℃)"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 回水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "回水温度(℃)"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempInBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 炉水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "炉水温度(℃)"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempWaterBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 烟道温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "烟道温度(℃)"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempFlueGasBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖泵", "运行状态"}, index = 13) |
|
||||||
private String runStatusPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 频率 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖泵", "频率(Hz)"}, index = 14) |
|
||||||
private BigDecimal frequencyPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖泵", "运行状态"}, index = 15) |
|
||||||
private String runStatusPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 频率 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖泵", "频率(Hz)"}, index = 16) |
|
||||||
private BigDecimal frequencyPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号采暖泵", "运行状态"}, index = 17) |
|
||||||
private String runStatusPumpThree; |
|
||||||
|
|
||||||
/** |
|
||||||
* 频率 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号采暖泵", "频率(Hz)"}, index = 18) |
|
||||||
private BigDecimal frequencyPumpThree; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 19) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 20) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String remark; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,135 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 蒸汽机系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(20) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class ReportSteamRunParamDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "当前状态", "当前状态"}, index = 1) |
|
||||||
private String curStatus; |
|
||||||
|
|
||||||
/** |
|
||||||
* 火焰强度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "火焰强度", "火焰强度"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal flameIntensity; |
|
||||||
|
|
||||||
/** |
|
||||||
* 烟气温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "烟气温度(℃)", "烟气温度(℃)"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempFlueGas; |
|
||||||
|
|
||||||
/** |
|
||||||
* 火焰百分比(%) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "火焰百分比(%)", "火焰百分比(%)"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal percentFlameIntensity; |
|
||||||
|
|
||||||
/** |
|
||||||
* 液位(%) |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "液位(%)", "液位(%)"}, index = 5) |
|
||||||
private BigDecimal waterLevel; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸汽温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸汽温度(℃)", "蒸汽温度(℃)"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempCur; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前压力(Mpa) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "当前压力(Mpa)", "当前压力(Mpa)"}, index = 7) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressCur; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压力设定值(Mpa) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "压力设定值(Mpa)", "压力设定值(Mpa)"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressSet; |
|
||||||
|
|
||||||
// 启动压差(Mpa)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "启动压差(Mpa)", "启动压差(Mpa)"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressStartDiff; |
|
||||||
|
|
||||||
// 停止压差(Mpa)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "停止压差(Mpa)", "停止压差(Mpa)"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressShutdownDiff; |
|
||||||
|
|
||||||
// 瞬时压力(Mpa)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "瞬时压力(Mpa)", "瞬时压力(Mpa)"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressInstance; |
|
||||||
|
|
||||||
// 瞬时流量(t/h)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "瞬时流量(t/h)", "瞬时流量(t/h)"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal flowInstance; |
|
||||||
|
|
||||||
// 累积流量(t)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "累积流量(t)", "累积流量(t)"}, index = 13) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal flowTotal; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 14) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 15) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String remark; |
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,70 @@ |
|||||||
|
package com.mh.common.core.domain.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author LJF |
||||||
|
* @version 1.0 |
||||||
|
* @project EEMCS |
||||||
|
* @description 热水Sum基础类 |
||||||
|
* @date 2026-05-13 09:50:45 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class EnergyBaseSum { |
||||||
|
|
||||||
|
private String id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 时间 |
||||||
|
*/ |
||||||
|
private String curDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 建筑id |
||||||
|
*/ |
||||||
|
private String buildingId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 补水 |
||||||
|
*/ |
||||||
|
private BigDecimal fillWater; |
||||||
|
|
||||||
|
/** |
||||||
|
* 补水与昨日比 |
||||||
|
*/ |
||||||
|
private String fillWaterP; |
||||||
|
|
||||||
|
/** |
||||||
|
* 用水 |
||||||
|
*/ |
||||||
|
private BigDecimal waterValue; |
||||||
|
|
||||||
|
/** |
||||||
|
* 用水与昨日比 |
||||||
|
*/ |
||||||
|
private String waterP; |
||||||
|
|
||||||
|
/** |
||||||
|
* 用电量 |
||||||
|
*/ |
||||||
|
private BigDecimal electValue; |
||||||
|
|
||||||
|
/** |
||||||
|
* 用电与昨日比 |
||||||
|
*/ |
||||||
|
private String electP; |
||||||
|
|
||||||
|
/** |
||||||
|
* 单耗 |
||||||
|
*/ |
||||||
|
private BigDecimal electWater; |
||||||
|
|
||||||
|
/** |
||||||
|
* 单耗与昨日比 |
||||||
|
*/ |
||||||
|
private String electWaterP; |
||||||
|
} |
||||||
@ -1,15 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import lombok.Data; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Author : Rainbow |
|
||||||
* @date : 2023/7/11 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
public class HistoryEntity { |
|
||||||
private int id; |
|
||||||
private String name; |
|
||||||
private String date; |
|
||||||
private double value; |
|
||||||
} |
|
||||||
@ -1,274 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author EEMCS |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 项目信息管理 |
|
||||||
* @date 2026-06-11 |
|
||||||
*/ |
|
||||||
@TableName("project_info") |
|
||||||
public class ProjectInfo extends BaseEntity { |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
private String id; |
|
||||||
|
|
||||||
/** |
|
||||||
* 用户项目编码 |
|
||||||
*/ |
|
||||||
private String projectCode; |
|
||||||
|
|
||||||
/** |
|
||||||
* 项目名称 |
|
||||||
*/ |
|
||||||
private String projectName; |
|
||||||
|
|
||||||
/** |
|
||||||
* 项目地址 |
|
||||||
*/ |
|
||||||
private String projectAddress; |
|
||||||
|
|
||||||
/** |
|
||||||
* 安装日期 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date installDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 验收日期 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date acceptanceDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 上线日期 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date onlineDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备数量 |
|
||||||
*/ |
|
||||||
private Integer deviceCount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 在线设备数量 |
|
||||||
*/ |
|
||||||
private Integer onlineDeviceCount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 离线设备数量 |
|
||||||
*/ |
|
||||||
private Integer offlineDeviceCount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 网关数量 |
|
||||||
*/ |
|
||||||
private Integer gatewayCount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 在线网关数量 |
|
||||||
*/ |
|
||||||
private Integer onlineGatewayCount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 离线网关数量 |
|
||||||
*/ |
|
||||||
private Integer offlineGatewayCount; |
|
||||||
|
|
||||||
/** |
|
||||||
* 项目负责人 |
|
||||||
*/ |
|
||||||
private String projectManager; |
|
||||||
|
|
||||||
/** |
|
||||||
* 电单价 |
|
||||||
*/ |
|
||||||
private BigDecimal electricityPrice; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** 请求参数 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
public String getId() { |
|
||||||
return id; |
|
||||||
} |
|
||||||
|
|
||||||
public void setId(String id) { |
|
||||||
this.id = id; |
|
||||||
} |
|
||||||
|
|
||||||
public String getProjectCode() { |
|
||||||
return projectCode; |
|
||||||
} |
|
||||||
|
|
||||||
public void setProjectCode(String projectCode) { |
|
||||||
this.projectCode = projectCode; |
|
||||||
} |
|
||||||
|
|
||||||
public String getProjectName() { |
|
||||||
return projectName; |
|
||||||
} |
|
||||||
|
|
||||||
public void setProjectName(String projectName) { |
|
||||||
this.projectName = projectName; |
|
||||||
} |
|
||||||
|
|
||||||
public String getProjectAddress() { |
|
||||||
return projectAddress; |
|
||||||
} |
|
||||||
|
|
||||||
public void setProjectAddress(String projectAddress) { |
|
||||||
this.projectAddress = projectAddress; |
|
||||||
} |
|
||||||
|
|
||||||
public Date getInstallDate() { |
|
||||||
return installDate; |
|
||||||
} |
|
||||||
|
|
||||||
public void setInstallDate(Date installDate) { |
|
||||||
this.installDate = installDate; |
|
||||||
} |
|
||||||
|
|
||||||
public Date getAcceptanceDate() { |
|
||||||
return acceptanceDate; |
|
||||||
} |
|
||||||
|
|
||||||
public void setAcceptanceDate(Date acceptanceDate) { |
|
||||||
this.acceptanceDate = acceptanceDate; |
|
||||||
} |
|
||||||
|
|
||||||
public Date getOnlineDate() { |
|
||||||
return onlineDate; |
|
||||||
} |
|
||||||
|
|
||||||
public void setOnlineDate(Date onlineDate) { |
|
||||||
this.onlineDate = onlineDate; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getDeviceCount() { |
|
||||||
return deviceCount; |
|
||||||
} |
|
||||||
|
|
||||||
public void setDeviceCount(Integer deviceCount) { |
|
||||||
this.deviceCount = deviceCount; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getOnlineDeviceCount() { |
|
||||||
return onlineDeviceCount; |
|
||||||
} |
|
||||||
|
|
||||||
public void setOnlineDeviceCount(Integer onlineDeviceCount) { |
|
||||||
this.onlineDeviceCount = onlineDeviceCount; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getOfflineDeviceCount() { |
|
||||||
return offlineDeviceCount; |
|
||||||
} |
|
||||||
|
|
||||||
public void setOfflineDeviceCount(Integer offlineDeviceCount) { |
|
||||||
this.offlineDeviceCount = offlineDeviceCount; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getGatewayCount() { |
|
||||||
return gatewayCount; |
|
||||||
} |
|
||||||
|
|
||||||
public void setGatewayCount(Integer gatewayCount) { |
|
||||||
this.gatewayCount = gatewayCount; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getOnlineGatewayCount() { |
|
||||||
return onlineGatewayCount; |
|
||||||
} |
|
||||||
|
|
||||||
public void setOnlineGatewayCount(Integer onlineGatewayCount) { |
|
||||||
this.onlineGatewayCount = onlineGatewayCount; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getOfflineGatewayCount() { |
|
||||||
return offlineGatewayCount; |
|
||||||
} |
|
||||||
|
|
||||||
public void setOfflineGatewayCount(Integer offlineGatewayCount) { |
|
||||||
this.offlineGatewayCount = offlineGatewayCount; |
|
||||||
} |
|
||||||
|
|
||||||
public String getProjectManager() { |
|
||||||
return projectManager; |
|
||||||
} |
|
||||||
|
|
||||||
public void setProjectManager(String projectManager) { |
|
||||||
this.projectManager = projectManager; |
|
||||||
} |
|
||||||
|
|
||||||
public BigDecimal getElectricityPrice() { |
|
||||||
return electricityPrice; |
|
||||||
} |
|
||||||
|
|
||||||
public void setElectricityPrice(BigDecimal electricityPrice) { |
|
||||||
this.electricityPrice = electricityPrice; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String getSearchValue() { |
|
||||||
return searchValue; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void setSearchValue(String searchValue) { |
|
||||||
this.searchValue = searchValue; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public Map<String, Object> getParams() { |
|
||||||
return params; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void setParams(Map<String, Object> params) { |
|
||||||
this.params = params; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new ToStringBuilder(this) |
|
||||||
.append("id", id) |
|
||||||
.append("projectCode", projectCode) |
|
||||||
.append("projectName", projectName) |
|
||||||
.append("projectAddress", projectAddress) |
|
||||||
.append("installDate", installDate) |
|
||||||
.append("acceptanceDate", acceptanceDate) |
|
||||||
.append("onlineDate", onlineDate) |
|
||||||
.append("deviceCount", deviceCount) |
|
||||||
.append("onlineDeviceCount", onlineDeviceCount) |
|
||||||
.append("offlineDeviceCount", offlineDeviceCount) |
|
||||||
.append("gatewayCount", gatewayCount) |
|
||||||
.append("onlineGatewayCount", onlineGatewayCount) |
|
||||||
.append("offlineGatewayCount", offlineGatewayCount) |
|
||||||
.append("projectManager", projectManager) |
|
||||||
.append("electricityPrice", electricityPrice) |
|
||||||
.append("searchValue", searchValue) |
|
||||||
.append("params", params) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,217 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalDate; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 采暖系统运行记录表 |
|
||||||
* @date 2025-10-21 10:26:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName("report_heating_run_param_his") // 指定数据库表名
|
|
||||||
public class ReportHeatingRunParamHis extends BaseEntity { |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
private String id; |
|
||||||
|
|
||||||
// 日期
|
|
||||||
@TableField("cur_date") // 字段映射(可选,若字段名与属性名不一致时需指定)
|
|
||||||
private LocalDate curDate; |
|
||||||
|
|
||||||
// 时间
|
|
||||||
@TableField("cur_time") |
|
||||||
private String curTime; // 字符串类型直接映射
|
|
||||||
|
|
||||||
// 班次
|
|
||||||
@TableField("classes") |
|
||||||
private String classes; |
|
||||||
|
|
||||||
// 锅炉1状态
|
|
||||||
@TableField("cur_status_boiler_one") |
|
||||||
private Integer curStatusBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1出水温度(℃)
|
|
||||||
@TableField("temp_out_boiler_one") |
|
||||||
private BigDecimal tempOutBoilerOne; // 精度要求高时使用BigDecimal
|
|
||||||
|
|
||||||
// 锅炉1设定温度(℃)
|
|
||||||
@TableField("temp_set_boiler_one") |
|
||||||
private BigDecimal tempSetBoilerOne; // 精度要求高时使用BigDecimal
|
|
||||||
|
|
||||||
// 锅炉1回水温度(℃)
|
|
||||||
@TableField("temp_in_boiler_one") |
|
||||||
private BigDecimal tempInBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1炉水温度(℃)
|
|
||||||
@TableField("temp_water_boiler_one") |
|
||||||
private BigDecimal tempWaterBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1烟道温度(℃)
|
|
||||||
@TableField("temp_flue_gas_boiler_one") |
|
||||||
private BigDecimal tempFlueGasBoilerOne; |
|
||||||
|
|
||||||
// 锅炉2状态
|
|
||||||
@TableField("cur_status_boiler_two") |
|
||||||
private Integer curStatusBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2设定温度(℃)
|
|
||||||
@TableField("temp_set_boiler_two") |
|
||||||
private BigDecimal tempSetBoilerTwo; // 精度要求高时使用BigDecimal
|
|
||||||
|
|
||||||
// 锅炉2出水温度(℃)
|
|
||||||
@TableField("temp_out_boiler_two") |
|
||||||
private BigDecimal tempOutBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2回水温度(℃)
|
|
||||||
@TableField("temp_in_boiler_two") |
|
||||||
private BigDecimal tempInBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2炉水温度(℃)
|
|
||||||
@TableField("temp_water_boiler_two") |
|
||||||
private BigDecimal tempWaterBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2烟道温度(℃)
|
|
||||||
@TableField("temp_flue_gas_boiler_two") |
|
||||||
private BigDecimal tempFlueGasBoilerTwo; |
|
||||||
|
|
||||||
// 采暖泵1状态
|
|
||||||
@TableField("cur_status_pump_one") |
|
||||||
private Integer curStatusPumpOne; |
|
||||||
|
|
||||||
// 采暖泵1状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusPumpOne; |
|
||||||
|
|
||||||
// 采暖泵1频率(Hz)
|
|
||||||
@TableField("frequency_pump_one") |
|
||||||
private BigDecimal frequencyPumpOne; |
|
||||||
|
|
||||||
// 采暖泵2状态
|
|
||||||
@TableField("cur_status_pump_two") |
|
||||||
private Integer curStatusPumpTwo; |
|
||||||
|
|
||||||
// 采暖泵2状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusPumpTwo; |
|
||||||
|
|
||||||
// 采暖泵2频率(Hz)
|
|
||||||
@TableField("frequency_pump_two") |
|
||||||
private BigDecimal frequencyPumpTwo; |
|
||||||
|
|
||||||
// 采暖泵3状态
|
|
||||||
@TableField("cur_status_pump_three") |
|
||||||
private Integer curStatusPumpThree; |
|
||||||
|
|
||||||
// 采暖泵3状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusPumpThree; |
|
||||||
|
|
||||||
// 采暖泵3频率(Hz)
|
|
||||||
@TableField("frequency_pump_three") |
|
||||||
private BigDecimal frequencyPumpThree; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@TableField("recorder") |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注
|
|
||||||
@TableField("remark") |
|
||||||
private String remark; |
|
||||||
|
|
||||||
// 创建时间(自动填充)
|
|
||||||
@TableField(value = "create_date", fill = FieldFill.INSERT) // 插入时自动填充
|
|
||||||
private LocalDateTime createDate; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** |
|
||||||
* 请求参数 |
|
||||||
*/ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
/** 创建者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String createBy; |
|
||||||
|
|
||||||
/** 创建时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String updateBy; |
|
||||||
|
|
||||||
/** 更新时间 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date updateTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageNum; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageSize; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportHeatingRunParamHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("curDate=" + curDate) |
|
||||||
.add("curTime='" + curTime + "'") |
|
||||||
.add("classes='" + classes + "'") |
|
||||||
.add("curStatusBoilerOne=" + curStatusBoilerOne) |
|
||||||
.add("tempOutBoilerOne=" + tempOutBoilerOne) |
|
||||||
.add("tempInBoilerOne=" + tempInBoilerOne) |
|
||||||
.add("tempWaterBoilerOne=" + tempWaterBoilerOne) |
|
||||||
.add("tempFlueGasBoilerOne=" + tempFlueGasBoilerOne) |
|
||||||
.add("curStatusBoilerTwo=" + curStatusBoilerTwo) |
|
||||||
.add("tempOutBoilerTwo=" + tempOutBoilerTwo) |
|
||||||
.add("tempInBoilerTwo=" + tempInBoilerTwo) |
|
||||||
.add("tempWaterBoilerTwo=" + tempWaterBoilerTwo) |
|
||||||
.add("tempFlueGasBoilerTwo=" + tempFlueGasBoilerTwo) |
|
||||||
.add("curStatusPumpOne=" + curStatusPumpOne) |
|
||||||
.add("frequencyPumpOne=" + frequencyPumpOne) |
|
||||||
.add("curStatusPumpTwo=" + curStatusPumpTwo) |
|
||||||
.add("frequencyPumpTwo=" + frequencyPumpTwo) |
|
||||||
.add("curStatusPumpThree=" + curStatusPumpThree) |
|
||||||
.add("frequencyPumpThree=" + frequencyPumpThree) |
|
||||||
.add("recorder='" + recorder + "'") |
|
||||||
.add("remark='" + remark + "'") |
|
||||||
.add("createDate=" + createDate) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,114 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 设备抄表记录表 |
|
||||||
* @date 2025-10-21 10:26:12 |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class ReportMeterReadingsHis { |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
private String id; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备类型 |
|
||||||
*/ |
|
||||||
private String mtType; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备位置 |
|
||||||
*/ |
|
||||||
private String location; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备编号 |
|
||||||
*/ |
|
||||||
private String mtNum; |
|
||||||
|
|
||||||
/** |
|
||||||
* 昨日抄表读数 |
|
||||||
*/ |
|
||||||
private BigDecimal yesterdayReading; |
|
||||||
|
|
||||||
/** |
|
||||||
* 昨日抄表时间 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date yesterdayTimestamp; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日抄表读数 |
|
||||||
*/ |
|
||||||
private BigDecimal todayReading; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日抄表时间 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date todayTimestamp; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备倍率 |
|
||||||
*/ |
|
||||||
private int mtRatio; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日总读数*设备倍率 |
|
||||||
*/ |
|
||||||
private BigDecimal total; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日单价 |
|
||||||
*/ |
|
||||||
private BigDecimal unitPrice; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日金额 |
|
||||||
*/ |
|
||||||
private BigDecimal cost; |
|
||||||
|
|
||||||
/** |
|
||||||
* 记录创建时间 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 排序序号 |
|
||||||
*/ |
|
||||||
private int sortOrder; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportMeterReadingsHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("mtType='" + mtType + "'") |
|
||||||
.add("location='" + location + "'") |
|
||||||
.add("mtNum='" + mtNum + "'") |
|
||||||
.add("yesterdayReading=" + yesterdayReading) |
|
||||||
.add("yesterdayTimestamp=" + yesterdayTimestamp) |
|
||||||
.add("todayReading=" + todayReading) |
|
||||||
.add("todayTimestamp=" + todayTimestamp) |
|
||||||
.add("mtRatio=" + mtRatio) |
|
||||||
.add("total=" + total) |
|
||||||
.add("unitPrice=" + unitPrice) |
|
||||||
.add("cost=" + cost) |
|
||||||
.add("createTime=" + createTime) |
|
||||||
.add("sortOrder=" + sortOrder) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,170 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.io.Serial; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalDate; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 生活热水供水热泵运行情况 |
|
||||||
* @date 2025-10-22 17:40:03 |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@TableName("report_steam_run_param_his") |
|
||||||
public class ReportSteamRunParamHis extends BaseEntity implements Serializable { |
|
||||||
|
|
||||||
// 主键
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.AUTO) |
|
||||||
private Long id; |
|
||||||
|
|
||||||
// 记录日期
|
|
||||||
private LocalDate curDate; |
|
||||||
|
|
||||||
// 记录时间(varchar格式)
|
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// 班次
|
|
||||||
private String classes; |
|
||||||
|
|
||||||
// 蒸汽机状态字
|
|
||||||
private Integer curStatus; |
|
||||||
|
|
||||||
// 运行状态
|
|
||||||
// @JsonIgnore
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatus; |
|
||||||
|
|
||||||
// 火焰强度
|
|
||||||
private BigDecimal flameIntensity; |
|
||||||
|
|
||||||
// 烟气温度(℃)
|
|
||||||
private BigDecimal tempFlueGas; |
|
||||||
|
|
||||||
// 火焰百分比(%)
|
|
||||||
private BigDecimal percentFlameIntensity; |
|
||||||
|
|
||||||
// 液位(%)
|
|
||||||
private BigDecimal waterLevel; |
|
||||||
|
|
||||||
// 蒸汽温度(℃)
|
|
||||||
private BigDecimal tempCur; |
|
||||||
|
|
||||||
// 当前压力(Mpa)
|
|
||||||
private BigDecimal pressCur; |
|
||||||
|
|
||||||
// 压力设定值(Mpa)
|
|
||||||
private BigDecimal pressSet; |
|
||||||
|
|
||||||
// 启动压差(Mpa)
|
|
||||||
private BigDecimal pressStartDiff; |
|
||||||
|
|
||||||
// 停止压差(Mpa)
|
|
||||||
private BigDecimal pressShutdownDiff; |
|
||||||
|
|
||||||
// 瞬时压力(Mpa)
|
|
||||||
private BigDecimal pressInstance; |
|
||||||
|
|
||||||
// 瞬时流量(t/h)
|
|
||||||
private BigDecimal flowInstance; |
|
||||||
|
|
||||||
// 累积流量(t)
|
|
||||||
private BigDecimal flowTotal; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
private String remark; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** |
|
||||||
* 请求参数 |
|
||||||
*/ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
/** 创建者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String createBy; |
|
||||||
|
|
||||||
/** 创建时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String updateBy; |
|
||||||
|
|
||||||
/** 更新时间 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date updateTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageNum; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageSize; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportSteamRunParamHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("curDate=" + curDate) |
|
||||||
.add("curTime='" + curTime + "'") |
|
||||||
.add("classes='" + classes + "'") |
|
||||||
.add("curStatus=" + curStatus) |
|
||||||
.add("flameIntensity=" + flameIntensity) |
|
||||||
.add("tempFlueGas=" + tempFlueGas) |
|
||||||
.add("percentFlameIntensity=" + percentFlameIntensity) |
|
||||||
.add("waterLevel=" + waterLevel) |
|
||||||
.add("tempCur=" + tempCur) |
|
||||||
.add("pressCur=" + pressCur) |
|
||||||
.add("pressSet=" + pressSet) |
|
||||||
.add("pressStartDiff=" + pressStartDiff) |
|
||||||
.add("pressShutdownDiff=" + pressShutdownDiff) |
|
||||||
.add("pressInstance=" + pressInstance) |
|
||||||
.add("flowInstance=" + flowInstance) |
|
||||||
.add("flowTotal=" + flowTotal) |
|
||||||
.add("recorder='" + recorder + "'") |
|
||||||
.add("remark='" + remark + "'") |
|
||||||
.add("searchValue='" + searchValue + "'") |
|
||||||
.add("params=" + params) |
|
||||||
.add("createBy='" + createBy + "'") |
|
||||||
.add("createTime=" + createTime) |
|
||||||
.add("updateBy='" + updateBy + "'") |
|
||||||
.add("updateTime=" + updateTime) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,30 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class AxisLine { |
|
||||||
private boolean show; |
|
||||||
private LineStyle lineStyle; |
|
||||||
private String color = ""; |
|
||||||
|
|
||||||
public AxisLine(boolean show, LineStyle lineStyle) { |
|
||||||
this.show = show; |
|
||||||
this.lineStyle = lineStyle; |
|
||||||
} |
|
||||||
|
|
||||||
public AxisLine(boolean show, LineStyle lineStyle, String color) { |
|
||||||
this.show = show; |
|
||||||
this.lineStyle = lineStyle; |
|
||||||
this.color = color; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,45 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : 基础数据获取实体类 |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-13 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class BaseChartEntity { |
|
||||||
|
|
||||||
private String chartTime; |
|
||||||
private String indexName; |
|
||||||
private String indexType; |
|
||||||
private String displayType; |
|
||||||
private int indexId; |
|
||||||
private int width; |
|
||||||
private String chartName; |
|
||||||
private String timeName; |
|
||||||
private int chartId; |
|
||||||
private String unit; |
|
||||||
private double data; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return "BaseChartEntity{" + |
|
||||||
"chartTime='" + chartTime + '\'' + |
|
||||||
", indexName='" + indexName + '\'' + |
|
||||||
", indexType='" + indexType + '\'' + |
|
||||||
", displayType='" + displayType + '\'' + |
|
||||||
", indexId=" + indexId + |
|
||||||
", width=" + width + |
|
||||||
", chartName='" + chartName + '\'' + |
|
||||||
", timeName='" + timeName + '\'' + |
|
||||||
", chartId=" + chartId + |
|
||||||
", unit='" + unit + '\'' + |
|
||||||
", data=" + data + |
|
||||||
'}'; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,54 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONType; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title :图表实体类 |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@JSONType(orders = {"title","feature","legend","xAxis","yAxis","series","timeName"}) |
|
||||||
public class ChartEntity { |
|
||||||
|
|
||||||
private Title title; |
|
||||||
private Feature feature; |
|
||||||
private Legend legend; |
|
||||||
private ToolTip toolTip; |
|
||||||
private XAxis xAxis; |
|
||||||
private List<YAxis> yAxis; |
|
||||||
private List<Series> series; |
|
||||||
|
|
||||||
public ChartEntity() { |
|
||||||
} |
|
||||||
|
|
||||||
public ChartEntity(Title title, Feature feature, Legend legend, XAxis xAxis, List<YAxis> yAxis, List<Series> series) { |
|
||||||
this.title = title; |
|
||||||
this.feature = feature; |
|
||||||
this.legend = legend; |
|
||||||
this.xAxis = xAxis; |
|
||||||
this.yAxis = yAxis; |
|
||||||
this.series = series; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return "ChartEntity{" + |
|
||||||
"title=" + title + |
|
||||||
", feature=" + feature + |
|
||||||
", legend=" + legend + |
|
||||||
", xAxis=" + xAxis + |
|
||||||
", yAxis=" + yAxis + |
|
||||||
", series=" + series + |
|
||||||
'}'; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@ -1,17 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Data; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author 铭汉科技——LJF |
|
||||||
* @date 2023-03-23 15:25 |
|
||||||
* @Description |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
public class ChartParams { |
|
||||||
private String beginTime; |
|
||||||
private String endTime; |
|
||||||
private String dayType; |
|
||||||
private String charType; |
|
||||||
private String chooseId; |
|
||||||
} |
|
||||||
@ -1,31 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONType; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Getter |
|
||||||
@Setter |
|
||||||
@JSONType(orders = {"state","tile","icon","name"}) |
|
||||||
public class Feature { |
|
||||||
private boolean[] state; |
|
||||||
private String[] title; |
|
||||||
private String[] icon; |
|
||||||
private String[] name; |
|
||||||
private String[] yAxisName; |
|
||||||
|
|
||||||
public Feature(boolean[] state, String[] title, String[] icon, String[] name, String[] yAxisName) { |
|
||||||
this.state = state; |
|
||||||
this.title = title; |
|
||||||
this.icon = icon; |
|
||||||
this.name = name; |
|
||||||
this.yAxisName = yAxisName; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,35 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.util.Arrays; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-17 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class GetChartParams { |
|
||||||
|
|
||||||
private int chartId; |
|
||||||
private int[] chooseIndexId; |
|
||||||
private String beginTime; |
|
||||||
private String endTime; |
|
||||||
private String type; // 'today' 'yesterday' 'twentyFourHour' 'thisWeek' 'fourWeek' 'twelveMonth' 'fourYear'
|
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return "GetChartParams{" + |
|
||||||
"chartId=" + chartId + |
|
||||||
", chooseIndexId=" + Arrays.toString(chooseIndexId) + |
|
||||||
", beginTime='" + beginTime + '\'' + |
|
||||||
", endTime='" + endTime + '\'' + |
|
||||||
", type='" + type + '\'' + |
|
||||||
'}'; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,30 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONType; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@JSONType(orders = {"data","width","indexId"}) |
|
||||||
public class Legend { |
|
||||||
private String[] data; |
|
||||||
private int width; |
|
||||||
private int[] indexId; |
|
||||||
|
|
||||||
public Legend() { |
|
||||||
} |
|
||||||
|
|
||||||
public Legend(String[] data, int width, int[] indexId) { |
|
||||||
this.data = data; |
|
||||||
this.width = width; |
|
||||||
this.indexId = indexId; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,21 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class LineStyle { |
|
||||||
private String color; |
|
||||||
|
|
||||||
public LineStyle(String color) { |
|
||||||
this.color = color; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,38 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONType; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@JSONType(orders = {"name","type","yAxisIndex","data","sampling"}) |
|
||||||
public class Series { |
|
||||||
private String name; |
|
||||||
private String type; |
|
||||||
private int yAxisIndex = 0; |
|
||||||
private Double[] data; |
|
||||||
private String sampling = "average"; |
|
||||||
|
|
||||||
public Series(String name, String type, int yAxisIndex, Double[] data) { |
|
||||||
this.name = name; |
|
||||||
this.type = type; |
|
||||||
this.yAxisIndex = yAxisIndex; |
|
||||||
this.data = data; |
|
||||||
} |
|
||||||
|
|
||||||
public Series(String name, String type, int yAxisIndex, Double[] data, String sampling) { |
|
||||||
this.name = name; |
|
||||||
this.type = type; |
|
||||||
this.yAxisIndex = yAxisIndex; |
|
||||||
this.data = data; |
|
||||||
this.sampling = sampling; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,21 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class SplitLine { |
|
||||||
private boolean show; |
|
||||||
|
|
||||||
public SplitLine(boolean show) { |
|
||||||
this.show = show; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,25 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONType; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@JSONType(orders = {"state","name"}) |
|
||||||
public class Title { |
|
||||||
private boolean state; |
|
||||||
private String name; |
|
||||||
|
|
||||||
public Title(boolean state, String name) { |
|
||||||
this.state = state; |
|
||||||
this.name = name; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,16 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Data; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Author : Rainbow |
|
||||||
* @date : 2023/7/11 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
public class ToolTip { |
|
||||||
private String trigger; |
|
||||||
|
|
||||||
public ToolTip(String trigger) { |
|
||||||
this.trigger = trigger; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,37 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description :单位实体类 |
|
||||||
* @updateTime 2020-07-13 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class Unit { |
|
||||||
|
|
||||||
private int id; |
|
||||||
private String unitName; |
|
||||||
private String unit; |
|
||||||
private String icon; |
|
||||||
private String grade; |
|
||||||
private String indexName; |
|
||||||
private String otherName; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return "Unit{" + |
|
||||||
"id=" + id + |
|
||||||
", unitName='" + unitName + '\'' + |
|
||||||
", unit='" + unit + '\'' + |
|
||||||
", icon='" + icon + '\'' + |
|
||||||
", grade='" + grade + '\'' + |
|
||||||
", indexName='" + indexName + '\'' + |
|
||||||
", otherName='" + otherName + '\'' + |
|
||||||
'}'; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,21 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class XAxis { |
|
||||||
private String[] data; |
|
||||||
|
|
||||||
public XAxis(String[] data) { |
|
||||||
this.data = data; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,31 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity.chart; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONType; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @title : |
|
||||||
* @description : |
|
||||||
* @updateTime 2020-07-10 |
|
||||||
* @throws : |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@JSONType(orders = {"type","name","splitLine","axisLine","show"}) |
|
||||||
public class YAxis { |
|
||||||
private String type; |
|
||||||
private String name; |
|
||||||
private SplitLine splitLine; |
|
||||||
private AxisLine axisLine; |
|
||||||
private boolean show; |
|
||||||
|
|
||||||
public YAxis(String type, String name, SplitLine splitLine, AxisLine axisLine, boolean show) { |
|
||||||
this.type = type; |
|
||||||
this.name = name; |
|
||||||
this.splitLine = splitLine; |
|
||||||
this.axisLine = axisLine; |
|
||||||
this.show = show; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,53 +0,0 @@ |
|||||||
package com.mh.common.core.domain.vo; |
|
||||||
|
|
||||||
import lombok.Data; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 辅助计算类 |
|
||||||
* @date 2026-01-28 14:27:20 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
public class CollectionParamsManageDataVO { |
|
||||||
|
|
||||||
// getter方法
|
|
||||||
private String deviceName; |
|
||||||
private String mtNum; |
|
||||||
private Integer orderNum; |
|
||||||
private String systemType; |
|
||||||
private String deviceType; |
|
||||||
private String otherName; |
|
||||||
private String paramType; |
|
||||||
private BigDecimal curValue; |
|
||||||
private Date curTime; |
|
||||||
private Integer grade; |
|
||||||
private Integer status; |
|
||||||
|
|
||||||
// 构造函数
|
|
||||||
public CollectionParamsManageDataVO(Map<String, Object> map) { |
|
||||||
this.deviceName = (String) map.get("device_name"); |
|
||||||
this.mtNum = (String) map.get("mt_num"); |
|
||||||
this.orderNum = map.get("order_num") instanceof Integer ? |
|
||||||
(Integer) map.get("order_num") : |
|
||||||
(map.get("order_num") != null ? Integer.valueOf(map.get("order_num").toString()) : null); |
|
||||||
this.systemType = (String) map.get("system_type"); |
|
||||||
this.deviceType = (String) map.get("device_type"); |
|
||||||
this.otherName = (String) map.get("other_name"); |
|
||||||
this.paramType = (String) map.get("param_type"); |
|
||||||
this.curValue = map.get("cur_value") instanceof BigDecimal ? |
|
||||||
(BigDecimal) map.get("cur_value") : |
|
||||||
(map.get("cur_value") != null ? new BigDecimal(map.get("cur_value").toString()) : BigDecimal.ZERO); |
|
||||||
this.curTime = (Date) map.get("cur_time"); |
|
||||||
this.grade = map.get("grade") instanceof Integer ? |
|
||||||
(Integer) map.get("grade") : |
|
||||||
(map.get("grade") != null ? Integer.valueOf(map.get("grade").toString()) : null); |
|
||||||
this.status = (Integer) map.get("status"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,74 +0,0 @@ |
|||||||
package com.mh.common.model.request; |
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON; |
|
||||||
import com.alibaba.fastjson2.JSONArray; |
|
||||||
import com.alibaba.fastjson2.JSONObject; |
|
||||||
|
|
||||||
import java.util.ArrayList; |
|
||||||
import java.util.List; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 昆仑通态触摸屏数据转换 |
|
||||||
* @date 2026-02-02 15:29:47 |
|
||||||
*/ |
|
||||||
public class AdvantechJsonParser { |
|
||||||
|
|
||||||
/** |
|
||||||
* 将JSON字符串解析为 AdvantechReceiver<AdvantechDatas<Number>> |
|
||||||
* @param json 原始MQTT JSON |
|
||||||
* @param defaultQuality quality默认值(如192表示Good),传null则不设置 |
|
||||||
* @return 解析后的接收对象 |
|
||||||
*/ |
|
||||||
public static AdvantechReceiver<AdvantechDatas<Number>> parse( |
|
||||||
String json, |
|
||||||
Number defaultQuality) { |
|
||||||
|
|
||||||
JSONObject root = JSON.parseObject(json); |
|
||||||
AdvantechReceiver<AdvantechDatas<Number>> receiver = new AdvantechReceiver<>(); |
|
||||||
|
|
||||||
// 1. 提取ts(保留原始字符串格式)
|
|
||||||
// "2026-02-02T18:33:57.712049"时间格式是这个,转成yyyy-MM-dd HH:mm:ss
|
|
||||||
root.put("ts", root.getString("ts").replace("T", " ").substring(0, 19)); |
|
||||||
receiver.setTs(root.getString("ts")); |
|
||||||
|
|
||||||
// 2. 解析d数组:展开所有键值对 → AdvantechDatas
|
|
||||||
List<AdvantechDatas<Number>> dataList = new ArrayList<>(); |
|
||||||
JSONArray dArray = root.getJSONArray("d"); |
|
||||||
|
|
||||||
if (dArray != null) { |
|
||||||
for (int i = 0; i < dArray.size(); i++) { |
|
||||||
JSONObject item = dArray.getJSONObject(i); |
|
||||||
if (item == null || item.isEmpty()) continue; |
|
||||||
|
|
||||||
for (Map.Entry<String, Object> entry : item.entrySet()) { |
|
||||||
String tag = entry.getKey(); |
|
||||||
Object val = entry.getValue(); |
|
||||||
|
|
||||||
if (val instanceof Number) { |
|
||||||
AdvantechDatas<Number> data = new AdvantechDatas<>(); |
|
||||||
data.setTag(tag); |
|
||||||
data.setValue((Number) val); |
|
||||||
if (defaultQuality != null) { |
|
||||||
data.setQuality(defaultQuality); |
|
||||||
} |
|
||||||
dataList.add(data); |
|
||||||
} |
|
||||||
// 非数值字段自动跳过(可扩展日志)
|
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
receiver.setD(dataList); |
|
||||||
return receiver; |
|
||||||
} |
|
||||||
|
|
||||||
// 便捷重载:不设置quality
|
|
||||||
public static AdvantechReceiver<AdvantechDatas<Number>> parse(String json) { |
|
||||||
return parse(json, 0); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package com.mh.common.model.response; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author LJF |
||||||
|
* @version 1.0 |
||||||
|
* @project EEMCS |
||||||
|
* @description 定义统一的数据解析结果对象 |
||||||
|
* @date 2026-04-28 11:41:34 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class ParseResult { |
||||||
|
|
||||||
|
private boolean success; |
||||||
|
private BigDecimal value; |
||||||
|
private String tagName; |
||||||
|
private int quality; |
||||||
|
private String errorMessage; |
||||||
|
|
||||||
|
public static ParseResult success(BigDecimal value, String tagName) { |
||||||
|
ParseResult result = new ParseResult(); |
||||||
|
result.setSuccess(true); |
||||||
|
result.setValue(value); |
||||||
|
result.setTagName(tagName); |
||||||
|
result.setQuality(0); |
||||||
|
return result; |
||||||
|
} |
||||||
|
|
||||||
|
public static ParseResult fail(String errorMessage) { |
||||||
|
ParseResult result = new ParseResult(); |
||||||
|
result.setSuccess(false); |
||||||
|
result.setErrorMessage(errorMessage); |
||||||
|
return result; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -1,79 +0,0 @@ |
|||||||
package com.mh.common.utils; |
|
||||||
|
|
||||||
import java.util.ArrayList; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Author : Rainbow |
|
||||||
* @date : 2023/7/10 |
|
||||||
*/ |
|
||||||
public class TableUtils { |
|
||||||
/** |
|
||||||
* 主机 |
|
||||||
*/ |
|
||||||
public final static String CHILLER = "chiller"; |
|
||||||
/** |
|
||||||
* 电表等参数 |
|
||||||
*/ |
|
||||||
public final static String DEVICE = "device"; |
|
||||||
|
|
||||||
/** |
|
||||||
* 返回表明列表 |
|
||||||
* |
|
||||||
* @param dateType 分钟、小时、日月年 |
|
||||||
* @param dataType 主机参数、电表等参数 |
|
||||||
* @param startTime 开始时间 |
|
||||||
* @param endTime 结束时间 |
|
||||||
* @return 表名集合 |
|
||||||
*/ |
|
||||||
public static List<String> getTableName(String dateType, String dataType, String startTime, String endTime) { |
|
||||||
int start = Integer.parseInt(startTime.substring(0, 4)); |
|
||||||
int end = Integer.parseInt(endTime.substring(0, 4)); |
|
||||||
if (end < start) { |
|
||||||
throw new RuntimeException("时间不正确"); |
|
||||||
} |
|
||||||
List<String> tabNames = new ArrayList<>(); |
|
||||||
StringBuilder tableName = new StringBuilder(); |
|
||||||
for (int i = start; i <= end; i++) { |
|
||||||
//清空
|
|
||||||
tableName.setLength(0); |
|
||||||
switch (dataType){ |
|
||||||
case CHILLER: |
|
||||||
tableName.append("chillers_data_").append(dateType).append(i); |
|
||||||
break; |
|
||||||
case DEVICE: |
|
||||||
tableName.append("data_").append(dateType).append(i); |
|
||||||
break; |
|
||||||
default: |
|
||||||
break; |
|
||||||
} |
|
||||||
tabNames.add(tableName.toString()); |
|
||||||
} |
|
||||||
return tabNames; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 返回表名字 |
|
||||||
* |
|
||||||
* @param dateType 分钟、小时、日月年 |
|
||||||
* @param dataType 主机参数、电表等参数 |
|
||||||
* @param date 时间 |
|
||||||
* @return 一个表名 |
|
||||||
*/ |
|
||||||
public static String getTableName(String dateType, String dataType, String date) { |
|
||||||
StringBuilder tableName = new StringBuilder(); |
|
||||||
switch (dataType) { |
|
||||||
case CHILLER: |
|
||||||
tableName.append("chillers_data_"); |
|
||||||
break; |
|
||||||
case DEVICE: |
|
||||||
tableName.append("data_"); |
|
||||||
break; |
|
||||||
default: |
|
||||||
break; |
|
||||||
} |
|
||||||
|
|
||||||
tableName.append(dateType).append(date.substring(0, 4)); |
|
||||||
return tableName.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,49 +0,0 @@ |
|||||||
package com.mh.common.utils.file.handle; |
|
||||||
|
|
||||||
import com.alibaba.excel.metadata.Head; |
|
||||||
import com.alibaba.excel.write.handler.CellWriteHandler; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteTableHolder; |
|
||||||
import org.apache.commons.collections4.CollectionUtils; |
|
||||||
import org.apache.poi.ss.usermodel.Row; |
|
||||||
import org.springframework.util.PropertyPlaceholderHelper; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
import java.util.Properties; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 报表handle |
|
||||||
* @date 2024-05-31 17:36:38 |
|
||||||
*/ |
|
||||||
public class ReportDayAndMonthParamHandler implements CellWriteHandler { |
|
||||||
|
|
||||||
private final String title; |
|
||||||
|
|
||||||
private final String value; |
|
||||||
|
|
||||||
PropertyPlaceholderHelper placeholderHelper = new PropertyPlaceholderHelper("${", "}"); |
|
||||||
|
|
||||||
public ReportDayAndMonthParamHandler(String value, String title) { |
|
||||||
this.title = title; |
|
||||||
this.value = value; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, |
|
||||||
Row row, Head head, Integer integer, Integer integer1, Boolean aBoolean) { |
|
||||||
if (head != null) { |
|
||||||
List<String> headNameList = head.getHeadNameList(); |
|
||||||
if (CollectionUtils.isNotEmpty(headNameList)) { |
|
||||||
Properties properties = new Properties(); |
|
||||||
properties.setProperty(title, value); |
|
||||||
for (int i = 0; i < headNameList.size(); i++) { |
|
||||||
headNameList.set(i, placeholderHelper.replacePlaceholders(headNameList.get(i), properties)); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue