Compare commits
172 Commits
flowUpdate
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 0110999480 | |||
| b30aadfed9 | |||
| 8c0abc26b8 | |||
| 914a474c43 | |||
| 13a121b9ac | |||
| 22bb8fd998 | |||
| 41541c3735 | |||
| 541d674072 | |||
| c2c6cd16cc | |||
| 1e3767eed4 | |||
| f19dd20995 | |||
| b550753d6f | |||
| 731b8bb1d2 | |||
| a943398499 | |||
| a4b0ec835e | |||
| 61c2cdd56a | |||
| c5bf75a6eb | |||
| 5de6dff86b | |||
| 2cdabd7b20 | |||
| e7ce0875d4 | |||
| e36b76f3dc | |||
| 0f2d1bcc38 | |||
| e134e77d00 | |||
| 4d7df7298a | |||
| 86951d43b4 | |||
| 48117eb5d4 | |||
| be4e5ba049 | |||
| 51a840f750 | |||
| 98db0647ca | |||
| 667a460258 | |||
| 2fd1736766 | |||
| c1f5cc33b0 | |||
| d3a1f667a7 | |||
| f9b8ae5dbb | |||
| 5fc35e1a4c | |||
| bb63e7464d | |||
| dd6402d8b6 | |||
| ebb8f09a75 | |||
| 7bc2f1c832 | |||
| b35f6d6fd2 | |||
| ea626dfeff | |||
| 975d3e6f32 | |||
| 76595c1510 | |||
| de6d100f79 | |||
| aa3628f041 | |||
| 654623ad15 | |||
| deef321c1b | |||
| ffe6642d1c | |||
| 834601daa8 | |||
| 1263b4812d | |||
| dbe8556741 | |||
| 844b3addf3 | |||
| 77532caf47 | |||
| 46ac312ddf | |||
| c45d98856e | |||
| f2c0932e2e | |||
| b8334c7764 | |||
| 48338278f0 | |||
| f5cea23daa | |||
| a29c9c8d4d | |||
| 511bf33914 | |||
| 4450f82717 | |||
| f62c542684 | |||
| bb8c951651 | |||
| 9f5b3918d0 | |||
| 84d9291763 | |||
| fcbc5a30c4 | |||
| 6f4eb21deb | |||
| 6819eb5f80 | |||
| 0f1ad34342 | |||
| 35d1cfc668 | |||
| a6dc40760d | |||
| 2486bb4c6e | |||
| a59a452f89 | |||
| 930bff6cba | |||
| 70c9997c82 | |||
| 0db70d3d73 | |||
| 2884699ff2 | |||
| 849eb802bc | |||
| 4ce8ea6a3a | |||
| 7e1db73fb0 | |||
| 46299e5732 | |||
| 6032869417 | |||
| 955d7e39e6 | |||
| ecc0595ec3 | |||
| 6b22ed8b0a | |||
| 9b7db3214e | |||
| 71b3c77028 | |||
| c7bd709240 | |||
| a80c38f87f | |||
| 7b91443532 | |||
| a9b9e12732 | |||
| 99ecb29f3c | |||
| 4fe7a435c6 | |||
| 18be0f00a3 | |||
| 9dfea176b3 | |||
| 09d3b06e7a | |||
| 8b60d13c0a | |||
| 188172692b | |||
| 556f3b6535 | |||
| 0b81a8dc63 | |||
| 982ec18490 | |||
| 0c38c42bfe | |||
| 2f0b323680 | |||
| 35d2a10c0e | |||
| 9c7f9ad980 | |||
| 79a2dbfcd3 | |||
| b5b7324f7c | |||
| b171ec6af0 | |||
| 85c7ded162 | |||
| b39aa7be71 | |||
| 8ae5614ce9 | |||
| 03cf7ebac7 | |||
| 3efa899a97 | |||
| f0802432ed | |||
| 45702ef838 | |||
| 4e3faa7a23 | |||
| 40559d4d73 | |||
| 7816fec7aa | |||
| 37c95ab0bd | |||
| 3e38cf9abb | |||
| 4aaf384ce8 | |||
| 6a06d8596d | |||
| be89a6fe9e | |||
| 40b51e5e9d | |||
| 4b14ea5c7f | |||
| 07b921d630 | |||
| 13d33e9d53 | |||
| a868c7b5cb | |||
| ebd88a999c | |||
| 97079abdef | |||
| 1e01c53c52 | |||
| 8a27da9975 | |||
| e160cc5ff3 | |||
| c9c81bb761 | |||
| b51a3ccf28 | |||
| 5e9d36400c | |||
| 03177f58f2 | |||
| bfe74bdb4c | |||
| df08eb3dd6 | |||
| 8c292850c2 | |||
| 12d3924e8a | |||
| 9eecf67374 | |||
| d7fd7d6cc4 | |||
| aac6efc568 | |||
| 209e624fc2 | |||
| fe79bf282c | |||
| 6b59d264b4 | |||
| 74785a768e | |||
| 32aafaa2db | |||
| 06617d94a7 | |||
| c0fef2521f | |||
| 04430d8853 | |||
| 875b436eea | |||
| 765490b51c | |||
| e2892b460b | |||
| 15d86526ac | |||
| cdf5f8bf5b | |||
| 9bb41d903e | |||
| d5f1c22bd4 | |||
| d2dcf656df | |||
| 7191a60841 | |||
| 3f21d39653 | |||
| b520ea6afe | |||
| e6283bee1c | |||
| f6e1d0c73e | |||
| c7e06ade6d | |||
| 3d85b10475 | |||
| e26dfc098a | |||
| c3ab46c8c8 | |||
| e37d118d0c | |||
| a6c92e8ba9 |
1
xinnengyuan/.gitignore
vendored
1
xinnengyuan/.gitignore
vendored
@ -54,3 +54,4 @@ docs
|
|||||||
/file
|
/file
|
||||||
.idea/
|
.idea/
|
||||||
chat-memory/
|
chat-memory/
|
||||||
|
queries/
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
<!-- 面向运行时的D-ORM依赖 -->
|
<!-- 面向运行时的D-ORM依赖 -->
|
||||||
<anyline.version>8.7.2-20250101</anyline.version>
|
<anyline.version>8.7.2-20250101</anyline.version>
|
||||||
<!--工作流配置-->
|
<!--工作流配置-->
|
||||||
<warm-flow.version>1.8.2</warm-flow.version>
|
<warm-flow.version>1.7.4</warm-flow.version>
|
||||||
|
|
||||||
<!-- 插件版本 -->
|
<!-- 插件版本 -->
|
||||||
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
|
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
|
||||||
@ -86,6 +86,15 @@
|
|||||||
<activeByDefault>true</activeByDefault>
|
<activeByDefault>true</activeByDefault>
|
||||||
</activation>
|
</activation>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>menu</id>
|
||||||
|
<properties>
|
||||||
|
<profiles.active>menu</profiles.active>
|
||||||
|
<logging.level>info</logging.level>
|
||||||
|
<monitor.username>ruoyi</monitor.username>
|
||||||
|
<monitor.password>123456</monitor.password>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>prod</id>
|
<id>prod</id>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import cn.hutool.captcha.AbstractCaptcha;
|
|||||||
import cn.hutool.captcha.generator.CodeGenerator;
|
import cn.hutool.captcha.generator.CodeGenerator;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -76,7 +78,7 @@ public class CaptchaController {
|
|||||||
SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, map);
|
SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, map);
|
||||||
if (!smsResponse.isSuccess()) {
|
if (!smsResponse.isSuccess()) {
|
||||||
log.error("验证码短信发送异常 => {}", smsResponse);
|
log.error("验证码短信发送异常 => {}", smsResponse);
|
||||||
return R.fail(smsResponse.getData().toString());
|
return R.fail(parseData(smsResponse));
|
||||||
}
|
}
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -140,4 +142,35 @@ public class CaptchaController {
|
|||||||
return R.ok(captchaVo);
|
return R.ok(captchaVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static String parseData(SmsResponse smsResponse ) {
|
||||||
|
try {
|
||||||
|
JSONObject json = JSONUtil.parseObj(smsResponse.getData());
|
||||||
|
// 核心:用 JsonUtil 解析 data,通过键路径 "Response.SendStatusSet[0].Code" 提取字段
|
||||||
|
// 键路径规则:层级用 "." 分隔,列表索引用 "[0]" 表示(第 1 个元素)
|
||||||
|
String code = json.getByPath("Response.SendStatusSet[0].Code", String.class);
|
||||||
|
System.out.println("错误码:" + code); // 输出:FailedOperation.InsufficientBalanceInSmsPackage
|
||||||
|
return convert(code);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return "短信发送未知错误";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String convert(String code) {
|
||||||
|
return switch (code) {
|
||||||
|
case "FailedOperation.InsufficientBalanceInSmsPackage" -> "套餐包余量不足,请购买套餐包";
|
||||||
|
case "InternalError.SendAndRecvFail" -> "短信收发超时,请检查您的网络是否有波动";
|
||||||
|
case "InvalidParameterValue.IncorrectPhoneNumber" -> "手机号格式错误";
|
||||||
|
case "LimitExceeded.AppCountryOrRegionDailyLimit" -> "业务短信国家/地区日下发条数超过设定的上限";
|
||||||
|
case "LimitExceeded.AppDailyLimit" -> "业务短信日下发条数超过设定的上限";
|
||||||
|
case "LimitExceeded.PhoneNumberDailyLimit" -> "单个手机号日下发短信条数超过设定的上限";
|
||||||
|
case "UnauthorizedOperation.ServiceSuspendDueToArrears" -> "欠费被停止服务";
|
||||||
|
case "UnsupportedOperation.UnsupportedRegion" -> "不支持该地区短信下发";
|
||||||
|
default -> "短信发送未知错误";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ spring:
|
|||||||
api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
|
api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
|
||||||
chat:
|
chat:
|
||||||
options:
|
options:
|
||||||
model: qwen-plus
|
model: qwen3-max
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
@ -59,14 +59,14 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://192.168.110.2:13386/xinnengyuandev-update?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://192.168.110.2:13386/xinnengyuandev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: xinnengyuandev-update
|
username: xinnengyuandev
|
||||||
password: cp7cAbWLZnRc6wyp
|
password: StRWCZdZirysNSs2
|
||||||
# url: jdbc:mysql://192.168.110.2:13386/xinnengyuan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.110.2:13386/xinnengyuan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# username: xinnengyuan
|
# username: xinnengyuan
|
||||||
# password: mEZPC5Sdf3r2HENi
|
# password: mEZPC5Sdf3r2HENi
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
# slave:
|
# slave:
|
||||||
# lazy: true
|
# lazy: true
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
@ -368,3 +368,16 @@ drone:
|
|||||||
chat:
|
chat:
|
||||||
server:
|
server:
|
||||||
port: 19099
|
port: 19099
|
||||||
|
# rabbitmq 配置
|
||||||
|
rabbitmq:
|
||||||
|
exchange-name: dev-normal-exchange
|
||||||
|
queue-name: dev-normal-queue
|
||||||
|
routing-key: dev.normal.routing.key
|
||||||
|
delay-exchange-name: dev-delay-queue
|
||||||
|
delay-queue-name: dev-delay-exchange
|
||||||
|
delay-routing-key: dev.delay.routing.key
|
||||||
|
dead-letter-exchange: dev-dlx-exchange
|
||||||
|
dead-letter-queue: dev-dlx-queue
|
||||||
|
dead-letter-routing-key: dev.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
@ -41,10 +41,10 @@ snail-job:
|
|||||||
spring:
|
spring:
|
||||||
ai:
|
ai:
|
||||||
dashscope:
|
dashscope:
|
||||||
api-key: xxx
|
api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
|
||||||
chat:
|
chat:
|
||||||
options:
|
options:
|
||||||
model: qwen-plus
|
model: qwen3-max
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
@ -343,3 +343,16 @@ drone:
|
|||||||
chat:
|
chat:
|
||||||
server:
|
server:
|
||||||
port: 18088
|
port: 18088
|
||||||
|
# rabbitmq 配置
|
||||||
|
rabbitmq:
|
||||||
|
exchange-name: local-normal-exchange
|
||||||
|
queue-name: local-normal-queue
|
||||||
|
routing-key: local.normal.routing.key
|
||||||
|
delay-exchange-name: local-delay-queue
|
||||||
|
delay-queue-name: local-delay-exchange
|
||||||
|
delay-routing-key: local.delay.routing.key
|
||||||
|
dead-letter-exchange: local-dlx-exchange
|
||||||
|
dead-letter-queue: local-dlx-queue
|
||||||
|
dead-letter-routing-key: local.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
358
xinnengyuan/ruoyi-admin/src/main/resources/application-menu.yml
Normal file
358
xinnengyuan/ruoyi-admin/src/main/resources/application-menu.yml
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
# 开发环境配置
|
||||||
|
server:
|
||||||
|
# 服务器的HTTP端口,默认为8080
|
||||||
|
port: 9528
|
||||||
|
--- # 临时文件存储位置 避免临时文件被系统清理报错
|
||||||
|
spring.servlet.multipart.location: /ruoyi/server/temp
|
||||||
|
|
||||||
|
--- # 监控中心配置
|
||||||
|
spring.boot.admin.client:
|
||||||
|
# 增加客户端开关
|
||||||
|
enabled: false
|
||||||
|
url: http://localhost:9090/admin
|
||||||
|
instance:
|
||||||
|
service-host-type: IP
|
||||||
|
metadata:
|
||||||
|
username: ${spring.boot.admin.client.username}
|
||||||
|
userpassword: ${spring.boot.admin.client.password}
|
||||||
|
username: @monitor.username@
|
||||||
|
password: @monitor.password@
|
||||||
|
|
||||||
|
--- # snail-job 配置
|
||||||
|
snail-job:
|
||||||
|
enabled: false
|
||||||
|
# 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
|
||||||
|
group: "ruoyi_group"
|
||||||
|
# SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config`表
|
||||||
|
token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
|
||||||
|
server:
|
||||||
|
host: 127.0.0.1
|
||||||
|
port: 17888
|
||||||
|
# 命名空间UUID 详见 script/sql/ry_job.sql `sj_namespace`表`unique_id`字段
|
||||||
|
namespace: ${spring.profiles.active}
|
||||||
|
# 随主应用端口漂移
|
||||||
|
port: 2${server.port}
|
||||||
|
# 客户端ip指定
|
||||||
|
host:
|
||||||
|
# RPC类型: netty, grpc
|
||||||
|
rpc-type: grpc
|
||||||
|
|
||||||
|
--- # 数据源配置
|
||||||
|
spring:
|
||||||
|
ai:
|
||||||
|
dashscope:
|
||||||
|
api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
|
||||||
|
chat:
|
||||||
|
options:
|
||||||
|
model: qwen3-max
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
|
dynamic:
|
||||||
|
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||||
|
p6spy: false
|
||||||
|
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||||
|
primary: master
|
||||||
|
# 严格模式 匹配不到数据源则报错
|
||||||
|
strict: true
|
||||||
|
datasource:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
type: ${spring.datasource.type}
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
|
url: jdbc:mysql://192.168.110.2:13386/xinnengyuanmenu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
|
username: xinnengyuanmenu
|
||||||
|
password: 2RkXFG8ZE6r5LL7B
|
||||||
|
# # 从库数据源
|
||||||
|
# slave:
|
||||||
|
# lazy: true
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
|
# username:
|
||||||
|
# password:
|
||||||
|
# oracle:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||||
|
# username: ROOT
|
||||||
|
# password: root
|
||||||
|
# postgres:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: org.postgresql.Driver
|
||||||
|
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
# sqlserver:
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||||
|
# username: SA
|
||||||
|
# password: root
|
||||||
|
hikari:
|
||||||
|
# 最大连接池数量
|
||||||
|
maxPoolSize: 20
|
||||||
|
# 最小空闲线程数量
|
||||||
|
minIdle: 10
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
connectionTimeout: 30000
|
||||||
|
# 校验超时时间
|
||||||
|
validationTimeout: 5000
|
||||||
|
# 空闲连接存活最大时间,默认10分钟
|
||||||
|
idleTimeout: 600000
|
||||||
|
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||||
|
maxLifetime: 1800000
|
||||||
|
# 多久检查一次连接的活性
|
||||||
|
keepaliveTime: 30000
|
||||||
|
|
||||||
|
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||||
|
spring.data:
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: 192.168.110.2
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 9287
|
||||||
|
# 数据库索引
|
||||||
|
database: 21
|
||||||
|
# redis 密码必须配置
|
||||||
|
password: syar23rdsaagdrsa
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
# 是否开启ssl
|
||||||
|
ssl.enabled: false
|
||||||
|
|
||||||
|
# redisson 配置
|
||||||
|
redisson:
|
||||||
|
# redis key前缀
|
||||||
|
keyPrefix:
|
||||||
|
# 线程池数量
|
||||||
|
threads: 16
|
||||||
|
# Netty线程池数量
|
||||||
|
nettyThreads: 32
|
||||||
|
# 单节点配置
|
||||||
|
singleServerConfig:
|
||||||
|
# 客户端名称
|
||||||
|
clientName: ${ruoyi.name}
|
||||||
|
# 最小空闲连接数
|
||||||
|
connectionMinimumIdleSize: 32
|
||||||
|
# 连接池大小
|
||||||
|
connectionPoolSize: 64
|
||||||
|
# 连接空闲超时,单位:毫秒
|
||||||
|
idleConnectionTimeout: 10000
|
||||||
|
# 命令等待超时,单位:毫秒
|
||||||
|
timeout: 3000
|
||||||
|
# 发布和订阅连接池大小
|
||||||
|
subscriptionConnectionPoolSize: 50
|
||||||
|
|
||||||
|
--- # mail 邮件发送
|
||||||
|
mail:
|
||||||
|
enabled: false
|
||||||
|
host: smtp.163.com
|
||||||
|
port: 465
|
||||||
|
# 是否需要用户名密码验证
|
||||||
|
auth: true
|
||||||
|
# 发送方,遵循RFC-822标准
|
||||||
|
from: xxx@163.com
|
||||||
|
# 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
|
||||||
|
user: xxx@163.com
|
||||||
|
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||||
|
pass: xxxxxxxxxx
|
||||||
|
# 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
|
||||||
|
starttlsEnable: true
|
||||||
|
# 使用SSL安全连接
|
||||||
|
sslEnable: true
|
||||||
|
# SMTP超时时长,单位毫秒,缺省值不超时
|
||||||
|
timeout: 0
|
||||||
|
# Socket连接超时值,单位毫秒,缺省值不超时
|
||||||
|
connectionTimeout: 0
|
||||||
|
|
||||||
|
--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
|
||||||
|
# https://sms4j.com/doc3/ 差异配置文档地址 支持单厂商多配置,可以配置多个同时使用
|
||||||
|
sms:
|
||||||
|
# 配置源类型用于标定配置来源(interface,yaml)
|
||||||
|
config-type: yaml
|
||||||
|
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
|
||||||
|
restricted: false
|
||||||
|
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
|
||||||
|
minute-max: 1
|
||||||
|
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
|
||||||
|
account-max: 30
|
||||||
|
# 以下配置来自于 org.dromara.sms4j.provider.config.BaseConfig类中
|
||||||
|
blends:
|
||||||
|
# 唯一ID 用于发送短信寻找具体配置 随便定义别用中文即可
|
||||||
|
# 可以同时存在两个相同厂商 例如: ali1 ali2 两个不同的阿里短信账号 也可用于区分租户
|
||||||
|
config1:
|
||||||
|
# 框架定义的厂商名称标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
|
||||||
|
supplier: alibaba
|
||||||
|
# 有些称为accessKey有些称之为apiKey,也有称为sdkKey或者appId。
|
||||||
|
access-key-id: 您的accessKey
|
||||||
|
# 称为accessSecret有些称之为apiSecret
|
||||||
|
access-key-secret: 您的accessKeySecret
|
||||||
|
signature: 您的短信签名
|
||||||
|
sdk-app-id: 您的sdkAppId
|
||||||
|
config2:
|
||||||
|
# 登录
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2491779
|
||||||
|
config3:
|
||||||
|
# 注册
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2491776
|
||||||
|
config4:
|
||||||
|
# 质量工单逾期
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534747
|
||||||
|
config5:
|
||||||
|
# 设计图纸
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534750
|
||||||
|
config6:
|
||||||
|
# 安全工单
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534848
|
||||||
|
|
||||||
|
--- # 三方授权
|
||||||
|
justauth:
|
||||||
|
# 前端外网访问地址
|
||||||
|
address: http://localhost:80
|
||||||
|
type:
|
||||||
|
maxkey:
|
||||||
|
# maxkey 服务器地址
|
||||||
|
# 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
|
||||||
|
server-url: http://sso.maxkey.top
|
||||||
|
client-id: 876892492581044224
|
||||||
|
client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=maxkey
|
||||||
|
topiam:
|
||||||
|
# topiam 服务器地址
|
||||||
|
server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol
|
||||||
|
client-id: 449c4*********937************759
|
||||||
|
client-secret: ac7***********1e0************28d
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=topiam
|
||||||
|
scopes: [ openid, email, phone, profile ]
|
||||||
|
qq:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=qq
|
||||||
|
union-id: false
|
||||||
|
weibo:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=weibo
|
||||||
|
gitee:
|
||||||
|
client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
|
||||||
|
client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=gitee
|
||||||
|
dingtalk:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=dingtalk
|
||||||
|
baidu:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=baidu
|
||||||
|
csdn:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=csdn
|
||||||
|
coding:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=coding
|
||||||
|
coding-group-name: xx
|
||||||
|
oschina:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=oschina
|
||||||
|
alipay_wallet:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet
|
||||||
|
alipay-public-key: MIIB**************DAQAB
|
||||||
|
wechat_open:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=wechat_open
|
||||||
|
wechat_mp:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=wechat_mp
|
||||||
|
wechat_enterprise:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise
|
||||||
|
agent-id: 1000002
|
||||||
|
gitlab:
|
||||||
|
client-id: 10**********6
|
||||||
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
|
redirect-uri: ${justauth.address}/social-callback?source=gitlab
|
||||||
|
# 和风天气 https://dev.qweather.com/
|
||||||
|
weather:
|
||||||
|
key-id: T65EAABUXC
|
||||||
|
project-id: 2JTHPUQ5YY
|
||||||
|
private-key: MC4CAQAwBQYDK2VwBCIEIMAglX7IsxYiTeM+FXXnvCUsIggajeP4s8gAllewm6BN
|
||||||
|
api-host: n35rk53njv.re.qweatherapi.com
|
||||||
|
# dxf转 geojson 执行文件名
|
||||||
|
dxf2GeoJson:
|
||||||
|
file-name: main
|
||||||
|
ys7:
|
||||||
|
app-key: xxx
|
||||||
|
app-secret: xxx
|
||||||
|
job:
|
||||||
|
capture-enabled: false # 控制是否启用萤石抓拍任务
|
||||||
|
device-sync-enabled: false # 控制是否同步萤石设备
|
||||||
|
# 斯巴达算法
|
||||||
|
sparta:
|
||||||
|
url: http://119.3.204.120:8040
|
||||||
|
client-id: test
|
||||||
|
client-secret: 115fcb08fa6742a1b086d9bb80a6ad59
|
||||||
|
# 身份证加密密钥(32 位)
|
||||||
|
id-card:
|
||||||
|
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
||||||
|
recognizer:
|
||||||
|
url: http://192.168.110.5:50071
|
||||||
|
|
||||||
|
qrCode:
|
||||||
|
url: http://xny.yj-3d.com:7788
|
||||||
|
# 无人机大图
|
||||||
|
drone:
|
||||||
|
url: http://192.168.110.2:9512
|
||||||
|
# 聊天服务
|
||||||
|
chat:
|
||||||
|
server:
|
||||||
|
port: 18088
|
||||||
|
# rabbitmq 配置
|
||||||
|
rabbitmq:
|
||||||
|
exchange-name: local-normal-exchange
|
||||||
|
queue-name: local-normal-queue
|
||||||
|
routing-key: local.normal.routing.key
|
||||||
|
delay-exchange-name: local-delay-queue
|
||||||
|
delay-queue-name: local-delay-exchange
|
||||||
|
delay-routing-key: local.delay.routing.key
|
||||||
|
dead-letter-exchange: local-dlx-exchange
|
||||||
|
dead-letter-queue: local-dlx-queue
|
||||||
|
dead-letter-routing-key: local.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
@ -358,3 +358,16 @@ drone:
|
|||||||
chat:
|
chat:
|
||||||
server:
|
server:
|
||||||
port: 19099
|
port: 19099
|
||||||
|
# rabbitmq 配置
|
||||||
|
rabbitmq:
|
||||||
|
exchange-name: prod-normal-exchange
|
||||||
|
queue-name: prod-normal-queue
|
||||||
|
routing-key: prod.normal.routing.key
|
||||||
|
delay-exchange-name: prod-delay-queue
|
||||||
|
delay-queue-name: prod-delay-exchange
|
||||||
|
delay-routing-key: prod.delay.routing.key
|
||||||
|
dead-letter-exchange: prod-dlx-exchange
|
||||||
|
dead-letter-queue: prod-dlx-queue
|
||||||
|
dead-letter-routing-key: prod.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
@ -76,9 +76,9 @@ spring:
|
|||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 200MB
|
max-file-size: 1024MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 200MB
|
max-request-size: 1024MB
|
||||||
mvc:
|
mvc:
|
||||||
# 设置静态资源路径 防止所有请求都去查静态资源
|
# 设置静态资源路径 防止所有请求都去查静态资源
|
||||||
static-path-pattern: /static/**
|
static-path-pattern: /static/**
|
||||||
@ -95,7 +95,13 @@ spring:
|
|||||||
deserialization:
|
deserialization:
|
||||||
# 允许对象忽略json中不存在的属性
|
# 允许对象忽略json中不存在的属性
|
||||||
fail_on_unknown_properties: false
|
fail_on_unknown_properties: false
|
||||||
|
rabbitmq:
|
||||||
|
host: 192.168.110.2
|
||||||
|
port: 5672
|
||||||
|
username: admin
|
||||||
|
password: yuanjiexny
|
||||||
|
publisher-returns: true
|
||||||
|
publisher-confirm-type: correlated
|
||||||
# Sa-Token配置
|
# Sa-Token配置
|
||||||
sa-token:
|
sa-token:
|
||||||
# token名称 (同时也是cookie名称)
|
# token名称 (同时也是cookie名称)
|
||||||
@ -109,7 +115,7 @@ sa-token:
|
|||||||
# token有效期,单位s 默认30天, -1代表永不过期
|
# token有效期,单位s 默认30天, -1代表永不过期
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||||
active-timeout: 86400
|
active-timeout: 2592000
|
||||||
# 同一账号最大登录数量,-1代表不限
|
# 同一账号最大登录数量,-1代表不限
|
||||||
max-login-count: -1
|
max-login-count: -1
|
||||||
|
|
||||||
@ -176,7 +182,7 @@ mybatis-plus:
|
|||||||
# 数据加密
|
# 数据加密
|
||||||
mybatis-encryptor:
|
mybatis-encryptor:
|
||||||
# 是否开启加密
|
# 是否开启加密
|
||||||
enable: false
|
enable: true
|
||||||
# 默认加密算法
|
# 默认加密算法
|
||||||
algorithm: BASE64
|
algorithm: BASE64
|
||||||
# 编码方式 BASE64/HEX。默认BASE64
|
# 编码方式 BASE64/HEX。默认BASE64
|
||||||
@ -305,6 +311,14 @@ springdoc:
|
|||||||
packages-to-scan: org.dromara.ai
|
packages-to-scan: org.dromara.ai
|
||||||
- group: 31.投标管理模块
|
- group: 31.投标管理模块
|
||||||
packages-to-scan: org.dromara.bidding
|
packages-to-scan: org.dromara.bidding
|
||||||
|
- group: 32.设备模块
|
||||||
|
packages-to-scan: org.dromara.device
|
||||||
|
- group: 33.摄像头模块
|
||||||
|
packages-to-scan: org.dromara.other
|
||||||
|
- group: 34.机械模块
|
||||||
|
packages-to-scan: org.dromara.mechanical
|
||||||
|
- group: 35.施工模块
|
||||||
|
packages-to-scan: org.dromara.build
|
||||||
# knife4j的增强配置,不需要增强可以不配
|
# knife4j的增强配置,不需要增强可以不配
|
||||||
knife4j:
|
knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@ -1,14 +1,23 @@
|
|||||||
package org.dromara.test;
|
package org.dromara.test;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.manager.recognizermanager.RecognizerManager;
|
import org.dromara.manager.recognizermanager.RecognizerManager;
|
||||||
import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum;
|
import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum;
|
||||||
import org.dromara.manager.recognizermanager.vo.RecognizeVo;
|
import org.dromara.manager.recognizermanager.vo.RecognizeVo;
|
||||||
|
import org.dromara.progress.domain.PgsProgressPlanDetail;
|
||||||
|
import org.dromara.progress.domain.vo.progressplandetail.PgsProgressPlanDetailFinishedVo;
|
||||||
|
import org.dromara.progress.service.IPgsProgressPlanDetailService;
|
||||||
|
import org.dromara.progress.service.IPgsProgressPlanService;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
@ -21,6 +30,12 @@ public class RecognizerTest {
|
|||||||
@Resource
|
@Resource
|
||||||
private RecognizerManager recognizerManager;
|
private RecognizerManager recognizerManager;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsProgressPlanDetailService progressPlanDetailService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsProgressPlanService progressPlanService;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void test() {
|
void test() {
|
||||||
RecognizeVo recognize = recognizerManager.recognize("http://xny.yj-3d.com:7363/file/tif/20250625160218orthophoto.png", List.of(RecognizerTypeEnum.PANEL));
|
RecognizeVo recognize = recognizerManager.recognize("http://xny.yj-3d.com:7363/file/tif/20250625160218orthophoto.png", List.of(RecognizerTypeEnum.PANEL));
|
||||||
@ -31,4 +46,39 @@ public class RecognizerTest {
|
|||||||
void testChange() {
|
void testChange() {
|
||||||
recognizerManager.convertCoordinate("http://xny.yj-3d.com:9000/xinnengyuan-dev/2025/11/11/d48767a62bc04867a552e06ba6712004.tif", List.of());
|
recognizerManager.convertCoordinate("http://xny.yj-3d.com:9000/xinnengyuan-dev/2025/11/11/d48767a62bc04867a552e06ba6712004.tif", List.of());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void checkNumber() {
|
||||||
|
List<PgsProgressPlanDetail> detailList = progressPlanDetailService.list();
|
||||||
|
List<PgsProgressPlanDetail> planDetailList = detailList.stream()
|
||||||
|
.filter(detail -> StringUtils.isNotBlank(detail.getFinishedDetail()))
|
||||||
|
.toList();
|
||||||
|
Map<String, List<PgsProgressPlanDetail>> collect = planDetailList.stream()
|
||||||
|
.collect(Collectors.groupingBy(PgsProgressPlanDetail::getFinishedDetail));
|
||||||
|
// 遍历分组结果,输出重复项
|
||||||
|
for (Map.Entry<String, List<PgsProgressPlanDetail>> entry : collect.entrySet()) {
|
||||||
|
String fieldValue = entry.getKey();
|
||||||
|
List<PgsProgressPlanDetail> duplicates = entry.getValue();
|
||||||
|
if (duplicates.size() > 1) { // 筛选出有重复的字段值
|
||||||
|
PgsProgressPlanDetail first = duplicates.getFirst();
|
||||||
|
Long id = first.getId();
|
||||||
|
Long planId = first.getProgressPlanId();
|
||||||
|
progressPlanService.removeById(planId);
|
||||||
|
progressPlanDetailService.removeById(id);
|
||||||
|
System.out.println("重复对象的对象:" + duplicates.stream().map(PgsProgressPlanDetail::getId).toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (PgsProgressPlanDetail detail : detailList) {
|
||||||
|
BigDecimal aiFill = detail.getFinishedNumber();
|
||||||
|
String finishedDetail = detail.getFinishedDetail();
|
||||||
|
if (StringUtils.isBlank(finishedDetail)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// log.info("id: {}, finishedDetail: {}", detail.getId(), finishedDetail);
|
||||||
|
List<PgsProgressPlanDetailFinishedVo> finishedVos = JSONUtil.toList(finishedDetail, PgsProgressPlanDetailFinishedVo.class);
|
||||||
|
if (aiFill.compareTo(BigDecimal.valueOf(finishedVos.size())) != 0) {
|
||||||
|
log.info("数量异常:{}:{}", detail.getId(), detail.getProgressCategoryId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,18 @@ public class AsyncConfig implements AsyncConfigurer {
|
|||||||
return executor;
|
return executor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 解压线程池(大文件操作,不需要太多线程)
|
||||||
|
@Bean("unzipExecutor")
|
||||||
|
public Executor unzipExecutor() {
|
||||||
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
|
executor.setCorePoolSize(2);
|
||||||
|
executor.setMaxPoolSize(4);
|
||||||
|
executor.setQueueCapacity(10);
|
||||||
|
executor.setThreadNamePrefix("unzip-");
|
||||||
|
executor.initialize();
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异步执行异常处理
|
* 异步执行异常处理
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
package org.dromara.common.core.domain.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程实例业务扩展对象
|
|
||||||
*
|
|
||||||
* @author may
|
|
||||||
* @date 2025-08-05
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class FlowInstanceBizExtDTO implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程实例ID
|
|
||||||
*/
|
|
||||||
private Long instanceId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务ID
|
|
||||||
*/
|
|
||||||
private String businessId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务编码
|
|
||||||
*/
|
|
||||||
private String businessCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务标题
|
|
||||||
*/
|
|
||||||
private String businessTitle;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.common.core.domain.dto;
|
package org.dromara.common.core.domain.dto;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@ -31,21 +30,11 @@ public class StartProcessDTO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String flowCode;
|
private String flowCode;
|
||||||
|
|
||||||
/**
|
|
||||||
* 办理人(可不填 用于覆盖当前节点办理人)
|
|
||||||
*/
|
|
||||||
private String handler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程变量,前端会提交一个元素{'entity': {业务详情数据对象}}
|
* 流程变量,前端会提交一个元素{'entity': {业务详情数据对象}}
|
||||||
*/
|
*/
|
||||||
private Map<String, Object> variables;
|
private Map<String, Object> variables;
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程业务扩展信息
|
|
||||||
*/
|
|
||||||
private FlowInstanceBizExtDTO bizExt;
|
|
||||||
|
|
||||||
public Map<String, Object> getVariables() {
|
public Map<String, Object> getVariables() {
|
||||||
if (variables == null) {
|
if (variables == null) {
|
||||||
return new HashMap<>(16);
|
return new HashMap<>(16);
|
||||||
@ -53,11 +42,4 @@ public class StartProcessDTO implements Serializable {
|
|||||||
variables.entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
|
variables.entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
|
||||||
return variables;
|
return variables;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlowInstanceBizExtDTO getBizExt() {
|
|
||||||
if (ObjectUtil.isNull(bizExt)) {
|
|
||||||
bizExt = new FlowInstanceBizExtDTO();
|
|
||||||
}
|
|
||||||
return bizExt;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,23 +52,21 @@ public class TaskAssigneeDTO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
public static <T> List<TaskHandler> convertToHandlerList(
|
public static <T> List<TaskHandler> convertToHandlerList(
|
||||||
List<T> sourceList,
|
List<T> sourceList,
|
||||||
Function<T, String> storageId,
|
Function<T, Long> storageId,
|
||||||
Function<T, String> handlerCode,
|
Function<T, String> handlerCode,
|
||||||
Function<T, String> handlerName,
|
Function<T, String> handlerName,
|
||||||
Function<T, String> groupName,
|
Function<T, Long> groupName,
|
||||||
Function<T, Date> createTimeMapper) {
|
Function<T, Date> createTimeMapper) {
|
||||||
return sourceList.stream()
|
return sourceList.stream()
|
||||||
.map(item -> new TaskHandler(
|
.map(item -> new TaskHandler(
|
||||||
storageId.apply(item),
|
String.valueOf(storageId.apply(item)),
|
||||||
handlerCode.apply(item),
|
handlerCode.apply(item),
|
||||||
handlerName.apply(item),
|
handlerName.apply(item),
|
||||||
groupName.apply(item),
|
groupName != null ? String.valueOf(groupName.apply(item)) : null,
|
||||||
createTimeMapper.apply(item)
|
createTimeMapper.apply(item)
|
||||||
)).collect(Collectors.toList());
|
)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|||||||
@ -62,10 +62,4 @@ public class ProcessEvent implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Boolean submit;
|
private Boolean submit;
|
||||||
|
|
||||||
/**
|
|
||||||
* 实例id
|
|
||||||
*/
|
|
||||||
private Long instanceId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程办理监听
|
* 流程办理监听
|
||||||
@ -57,14 +56,4 @@ public class ProcessTaskEvent implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/**
|
|
||||||
* 实例id
|
|
||||||
*/
|
|
||||||
private Long instanceId;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 办理参数
|
|
||||||
*/
|
|
||||||
private Map<String, Object> params;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package org.dromara.common.core.exception;
|
package org.dromara.common.core.exception;
|
||||||
|
|
||||||
import cn.hutool.core.text.StrFormatter;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@ -57,8 +56,4 @@ public final class ServiceException extends RuntimeException {
|
|||||||
this.detailMessage = detailMessage;
|
this.detailMessage = detailMessage;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServiceException(String message, Object... args) {
|
|
||||||
this.message = StrFormatter.format(message, args);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,7 +82,6 @@ public interface WorkflowService {
|
|||||||
* completeTask.getVariables().put("ignore", true);
|
* completeTask.getVariables().put("ignore", true);
|
||||||
*
|
*
|
||||||
* @param completeTask 参数
|
* @param completeTask 参数
|
||||||
* @return 结果
|
|
||||||
*/
|
*/
|
||||||
boolean completeTask(CompleteTaskDTO completeTask);
|
boolean completeTask(CompleteTaskDTO completeTask);
|
||||||
|
|
||||||
@ -91,15 +90,6 @@ public interface WorkflowService {
|
|||||||
*
|
*
|
||||||
* @param taskId 任务ID
|
* @param taskId 任务ID
|
||||||
* @param message 办理意见
|
* @param message 办理意见
|
||||||
* @return 结果
|
|
||||||
*/
|
*/
|
||||||
boolean completeTask(Long taskId, String message);
|
boolean completeTask(Long taskId, String message);
|
||||||
|
|
||||||
/**
|
|
||||||
* 启动流程并办理第一个任务
|
|
||||||
*
|
|
||||||
* @param startProcess 参数
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
boolean startCompleteTask(StartProcessDTO startProcess);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
package org.dromara.common.core.service;
|
||||||
|
|
||||||
|
public interface XzdSjContractInfoService {
|
||||||
|
|
||||||
|
String selectNameByIds(String ids);
|
||||||
|
}
|
||||||
@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -30,10 +31,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
||||||
.filter(function)
|
return collection.stream().filter(function).collect(Collectors.toList());
|
||||||
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,26 +40,13 @@ public class StreamUtils {
|
|||||||
*
|
*
|
||||||
* @param collection 需要查询的集合
|
* @param collection 需要查询的集合
|
||||||
* @param function 过滤方法
|
* @param function 过滤方法
|
||||||
* @return 找到符合条件的第一个元素,没有则返回 Optional.empty()
|
* @return 找到符合条件的第一个元素,没有则返回null
|
||||||
*/
|
*/
|
||||||
public static <E> Optional<E> findFirst(Collection<E> collection, Predicate<E> function) {
|
public static <E> E findFirst(Collection<E> collection, Predicate<E> function) {
|
||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return Optional.empty();
|
return null;
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection.stream().filter(function).findFirst().orElse(null);
|
||||||
.filter(function)
|
|
||||||
.findFirst();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 找到流中满足条件的第一个元素值
|
|
||||||
*
|
|
||||||
* @param collection 需要查询的集合
|
|
||||||
* @param function 过滤方法
|
|
||||||
* @return 找到符合条件的第一个元素,没有则返回 null
|
|
||||||
*/
|
|
||||||
public static <E> E findFirstValue(Collection<E> collection, Predicate<E> function) {
|
|
||||||
return findFirst(collection,function).orElse(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,26 +54,13 @@ public class StreamUtils {
|
|||||||
*
|
*
|
||||||
* @param collection 需要查询的集合
|
* @param collection 需要查询的集合
|
||||||
* @param function 过滤方法
|
* @param function 过滤方法
|
||||||
* @return 找到符合条件的任意一个元素,没有则返回 Optional.empty()
|
* @return 找到符合条件的任意一个元素,没有则返回null
|
||||||
*/
|
*/
|
||||||
public static <E> Optional<E> findAny(Collection<E> collection, Predicate<E> function) {
|
public static <E> Optional<E> findAny(Collection<E> collection, Predicate<E> function) {
|
||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection.stream().filter(function).findAny();
|
||||||
.filter(function)
|
|
||||||
.findAny();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 找到流中任意一个满足条件的元素值
|
|
||||||
*
|
|
||||||
* @param collection 需要查询的集合
|
|
||||||
* @param function 过滤方法
|
|
||||||
* @return 找到符合条件的任意一个元素,没有则返回null
|
|
||||||
*/
|
|
||||||
public static <E> E findAnyValue(Collection<E> collection, Predicate<E> function) {
|
|
||||||
return findAny(collection,function).orElse(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,10 +86,7 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection.stream().map(function).filter(Objects::nonNull).collect(Collectors.joining(delimiter));
|
||||||
.map(function)
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.collect(Collectors.joining(delimiter));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,11 +100,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
||||||
.filter(Objects::nonNull)
|
return collection.stream().filter(Objects::nonNull).sorted(comparing).collect(Collectors.toList());
|
||||||
.sorted(comparing)
|
|
||||||
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -151,9 +118,7 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection.stream().filter(Objects::nonNull).collect(Collectors.toMap(key, Function.identity(), (l, r) -> l));
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.collect(Collectors.toMap(key, Function.identity(), (l, r) -> l));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -172,25 +137,7 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection.stream().filter(Objects::nonNull).collect(Collectors.toMap(key, value, (l, r) -> l));
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.collect(Collectors.toMap(key, value, (l, r) -> l));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 map 中的数据作为新 Map 的 value ,key 不变
|
|
||||||
* @param map 需要处理的map
|
|
||||||
* @param take 取值函数
|
|
||||||
* @param <K> map中的key类型
|
|
||||||
* @param <E> map中的value类型
|
|
||||||
* @param <V> 新map中的value类型
|
|
||||||
* @return 新的map
|
|
||||||
*/
|
|
||||||
public static <K, E, V> Map<K, V> toMap(Map<K, E> map, BiFunction<K, E, V> take) {
|
|
||||||
if (CollUtil.isEmpty(map)) {
|
|
||||||
return MapUtil.newHashMap();
|
|
||||||
}
|
|
||||||
return toMap(map.entrySet(), Map.Entry::getKey, entry -> take.apply(entry.getKey(), entry.getValue()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -207,8 +154,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection
|
||||||
.filter(Objects::nonNull)
|
.stream().filter(Objects::nonNull)
|
||||||
.collect(Collectors.groupingBy(key, LinkedHashMap::new, Collectors.toList()));
|
.collect(Collectors.groupingBy(key, LinkedHashMap::new, Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,8 +175,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection
|
||||||
.filter(Objects::nonNull)
|
.stream().filter(Objects::nonNull)
|
||||||
.collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.groupingBy(key2, LinkedHashMap::new, Collectors.toList())));
|
.collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.groupingBy(key2, LinkedHashMap::new, Collectors.toList())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,11 +193,11 @@ public class StreamUtils {
|
|||||||
* @return 分类后的map
|
* @return 分类后的map
|
||||||
*/
|
*/
|
||||||
public static <E, T, U> Map<T, Map<U, E>> group2Map(Collection<E> collection, Function<E, T> key1, Function<E, U> key2) {
|
public static <E, T, U> Map<T, Map<U, E>> group2Map(Collection<E> collection, Function<E, T> key1, Function<E, U> key2) {
|
||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection) || key1 == null || key2 == null) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection
|
||||||
.filter(Objects::nonNull)
|
.stream().filter(Objects::nonNull)
|
||||||
.collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.toMap(key2, Function.identity(), (l, r) -> l)));
|
.collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.toMap(key2, Function.identity(), (l, r) -> l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +215,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection
|
||||||
|
.stream()
|
||||||
.map(function)
|
.map(function)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
||||||
@ -286,10 +234,11 @@ public class StreamUtils {
|
|||||||
* @return 转化后的Set
|
* @return 转化后的Set
|
||||||
*/
|
*/
|
||||||
public static <E, T> Set<T> toSet(Collection<E> collection, Function<E, T> function) {
|
public static <E, T> Set<T> toSet(Collection<E> collection, Function<E, T> function) {
|
||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection) || function == null) {
|
||||||
return CollUtil.newHashSet();
|
return CollUtil.newHashSet();
|
||||||
}
|
}
|
||||||
return collection.stream()
|
return collection
|
||||||
|
.stream()
|
||||||
.map(function)
|
.map(function)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
@ -309,20 +258,26 @@ public class StreamUtils {
|
|||||||
* @return 合并后的map
|
* @return 合并后的map
|
||||||
*/
|
*/
|
||||||
public static <K, X, Y, V> Map<K, V> merge(Map<K, X> map1, Map<K, Y> map2, BiFunction<X, Y, V> merge) {
|
public static <K, X, Y, V> Map<K, V> merge(Map<K, X> map1, Map<K, Y> map2, BiFunction<X, Y, V> merge) {
|
||||||
if (CollUtil.isEmpty(map1) && CollUtil.isEmpty(map2)) {
|
if (MapUtil.isEmpty(map1) && MapUtil.isEmpty(map2)) {
|
||||||
// 如果两个 map 都为空,则直接返回空的 map
|
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
} else if (CollUtil.isEmpty(map1)) {
|
} else if (MapUtil.isEmpty(map1)) {
|
||||||
// 如果 map1 为空,则直接处理返回 map2
|
map1 = MapUtil.newHashMap();
|
||||||
return toMap(map2.entrySet(), Map.Entry::getKey, entry -> merge.apply(null, entry.getValue()));
|
} else if (MapUtil.isEmpty(map2)) {
|
||||||
} else if (CollUtil.isEmpty(map2)) {
|
map2 = MapUtil.newHashMap();
|
||||||
// 如果 map2 为空,则直接处理返回 map1
|
|
||||||
return toMap(map1.entrySet(), Map.Entry::getKey, entry -> merge.apply(entry.getValue(), null));
|
|
||||||
}
|
}
|
||||||
Set<K> keySet = new HashSet<>();
|
Set<K> key = new HashSet<>();
|
||||||
keySet.addAll(map1.keySet());
|
key.addAll(map1.keySet());
|
||||||
keySet.addAll(map2.keySet());
|
key.addAll(map2.keySet());
|
||||||
return toMap(keySet, key -> key, key -> merge.apply(map1.get(key), map2.get(key)));
|
Map<K, V> map = new HashMap<>();
|
||||||
|
for (K t : key) {
|
||||||
|
X x = map1.get(t);
|
||||||
|
Y y = map2.get(t);
|
||||||
|
V z = merge.apply(x, y);
|
||||||
|
if (z != null) {
|
||||||
|
map.put(t, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -351,14 +351,4 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||||||
return noSpaces.matches("\\d+");
|
return noSpaces.matches("\\d+");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 将可迭代对象中的元素使用逗号拼接成字符串
|
|
||||||
*
|
|
||||||
* @param iterable 可迭代对象,如 List、Set 等
|
|
||||||
* @return 拼接后的字符串
|
|
||||||
*/
|
|
||||||
public static String joinComma(Iterable<?> iterable) {
|
|
||||||
return StringUtils.join(iterable, SEPARATOR);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,146 @@
|
|||||||
|
package org.dromara.common.core.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间戳转换工具类(包含时分秒提取)
|
||||||
|
*/
|
||||||
|
public class TimestampUtils {
|
||||||
|
|
||||||
|
// 默认时区(东八区)
|
||||||
|
private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone("GMT+8");
|
||||||
|
|
||||||
|
// 完整日期格式
|
||||||
|
private static final String FULL_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
|
||||||
|
// 时分秒格式
|
||||||
|
private static final String TIME_FORMAT = "HH:mm:ss";
|
||||||
|
|
||||||
|
// 日期格式
|
||||||
|
private static final String DATE_FORMAT = "yyyy-MM-dd";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将日期字符串转为秒级时间戳(优化版)
|
||||||
|
* 支持格式:"2025-12-03 23:59:59"、"2025-12-03"等
|
||||||
|
* @param dateStr 日期字符串
|
||||||
|
* @return 秒级时间戳
|
||||||
|
*/
|
||||||
|
public static Long parseDateToTimestamp(String dateStr) {
|
||||||
|
if (StrUtil.isBlank(dateStr)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用Hutool的DateUtil进行智能解析(推荐)
|
||||||
|
try {
|
||||||
|
Date date = DateUtil.parse(dateStr);
|
||||||
|
return date.getTime() / 1000L; // 转为秒级时间戳
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format("日期格式错误:%s,支持格式:yyyy-MM-dd HH:mm:ss、yyyy-MM-dd等", dateStr)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将时间戳转换为完整日期格式(yyyy-MM-dd HH:mm:ss)
|
||||||
|
*/
|
||||||
|
public static String formatTimestamp(Object timestamp) {
|
||||||
|
if (timestamp == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String timestampStr = timestamp.toString().trim();
|
||||||
|
if (StrUtil.isBlank(timestampStr)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Long time = parseToMilliseconds(timestampStr);
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(FULL_DATE_FORMAT);
|
||||||
|
sdf.setTimeZone(DEFAULT_TIME_ZONE);
|
||||||
|
return sdf.format(new Date(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提取时间戳中的时分秒部分(HH:mm:ss)
|
||||||
|
*/
|
||||||
|
public static String extractTime(Object timestamp) {
|
||||||
|
if (timestamp == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String timestampStr = timestamp.toString().trim();
|
||||||
|
if (StrUtil.isBlank(timestampStr)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Long time = parseToMilliseconds(timestampStr);
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(TIME_FORMAT);
|
||||||
|
sdf.setTimeZone(DEFAULT_TIME_ZONE);
|
||||||
|
return sdf.format(new Date(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提取时间戳中的日期部分(yyyy-MM-dd)
|
||||||
|
*/
|
||||||
|
public static String extractDate(Object timestamp) {
|
||||||
|
if (timestamp == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String timestampStr = timestamp.toString().trim();
|
||||||
|
if (StrUtil.isBlank(timestampStr)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Long time = parseToMilliseconds(timestampStr);
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
|
||||||
|
sdf.setTimeZone(DEFAULT_TIME_ZONE);
|
||||||
|
return sdf.format(new Date(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析时间戳字符串为毫秒级时间戳
|
||||||
|
*/
|
||||||
|
private static Long parseToMilliseconds(String timestampStr) {
|
||||||
|
try {
|
||||||
|
Long time = Long.parseLong(timestampStr);
|
||||||
|
// 10位秒级时间戳转为13位毫秒级
|
||||||
|
if (timestampStr.length() == 10) {
|
||||||
|
time = time * 1000;
|
||||||
|
}
|
||||||
|
return time;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
throw new IllegalArgumentException("时间戳格式错误:" + timestampStr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取时间戳对应的小时
|
||||||
|
*/
|
||||||
|
public static int getHour(Object timestamp) {
|
||||||
|
String timeStr = extractTime(timestamp);
|
||||||
|
return Integer.parseInt(timeStr.split(":")[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取时间戳对应的分钟
|
||||||
|
*/
|
||||||
|
public static int getMinute(Object timestamp) {
|
||||||
|
String timeStr = extractTime(timestamp);
|
||||||
|
return Integer.parseInt(timeStr.split(":")[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取时间戳对应的秒
|
||||||
|
*/
|
||||||
|
public static int getSecond(Object timestamp) {
|
||||||
|
String timeStr = extractTime(timestamp);
|
||||||
|
return Integer.parseInt(timeStr.split(":")[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -110,15 +110,6 @@ public class SpringDocConfig {
|
|||||||
}
|
}
|
||||||
PlusPaths newPaths = new PlusPaths();
|
PlusPaths newPaths = new PlusPaths();
|
||||||
oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v));
|
oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v));
|
||||||
newPaths.forEach((s, pathItem) -> {
|
|
||||||
// 为所有接口添加鉴权
|
|
||||||
pathItem.readOperations().forEach(operation -> {
|
|
||||||
operation.addSecurityItem(new SecurityRequirement()
|
|
||||||
.addList(HttpHeaders.AUTHORIZATION)
|
|
||||||
.addList("Clientid")
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
openApi.setPaths(newPaths);
|
openApi.setPaths(newPaths);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@ -91,7 +91,7 @@ public class PlusDataPermissionHandler {
|
|||||||
DataPermissionHelper.setVariable("user", currentUser);
|
DataPermissionHelper.setVariable("user", currentUser);
|
||||||
}
|
}
|
||||||
// 如果是超级管理员或租户管理员,则不过滤数据
|
// 如果是超级管理员或租户管理员,则不过滤数据
|
||||||
if (LoginHelper.isSuperAdmin() || LoginHelper.isTenantAdmin()) {
|
if (LoginHelper.isSuperAdmin()) {
|
||||||
return where;
|
return where;
|
||||||
}
|
}
|
||||||
// 构造数据过滤条件的 SQL 片段
|
// 构造数据过滤条件的 SQL 片段
|
||||||
|
|||||||
@ -82,5 +82,10 @@ public interface TransConstant {
|
|||||||
*/
|
*/
|
||||||
String XZD_CBYS_ZJHCB_ID_TO_NAME = "xzd_cbys_zjhcb_id_to_name";
|
String XZD_CBYS_ZJHCB_ID_TO_NAME = "xzd_cbys_zjhcb_id_to_name";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新中大-设计合同信息id转name
|
||||||
|
*/
|
||||||
|
String XZD_SJ_CONTRACT_INFO_ID_TO_NAME = "xzd_sj_contract_info_id_to_name";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.common.translation.core.impl;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.dromara.common.core.service.XzdSjContractInfoService;
|
||||||
|
import org.dromara.common.core.service.XzdSupplierOpenBankService;
|
||||||
|
import org.dromara.common.translation.annotation.TranslationType;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
|
import org.dromara.common.translation.core.TranslationInterface;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TranslationType(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME)
|
||||||
|
public class XzdSjContractInfoImpl implements TranslationInterface<String> {
|
||||||
|
|
||||||
|
private final XzdSjContractInfoService xzdSjContractInfoService;
|
||||||
|
@Override
|
||||||
|
public String translation(Object key, String other) {
|
||||||
|
if (key instanceof String ids) {
|
||||||
|
return xzdSjContractInfoService.selectNameByIds(ids);
|
||||||
|
} else if (key instanceof Long id) {
|
||||||
|
return xzdSjContractInfoService.selectNameByIds(id.toString());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,3 +14,4 @@ org.dromara.common.translation.core.impl.XzdSupplierOpenBankImpl
|
|||||||
org.dromara.common.translation.core.impl.XzdProjectManagerApprovalImpl
|
org.dromara.common.translation.core.impl.XzdProjectManagerApprovalImpl
|
||||||
org.dromara.common.translation.core.impl.XzdCbysZjhcbImpl
|
org.dromara.common.translation.core.impl.XzdCbysZjhcbImpl
|
||||||
org.dromara.common.translation.core.impl.XzdJXHTTranslation
|
org.dromara.common.translation.core.impl.XzdJXHTTranslation
|
||||||
|
org.dromara.common.translation.core.impl.XzdSjContractInfoImpl
|
||||||
|
|||||||
@ -29,6 +29,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||||
|
</dependency>
|
||||||
<!-- TwelveMonkeys ImageIO 扩展 -->
|
<!-- TwelveMonkeys ImageIO 扩展 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.twelvemonkeys.imageio</groupId>
|
<groupId>com.twelvemonkeys.imageio</groupId>
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
public class DashScopeChat {
|
public class DashScopeChat {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SimpleChat simpleChat;
|
private DashScopeSimpleChat dashScopeSimpleChat;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IAIChatMemoryService chatMemoryService;
|
private IAIChatMemoryService chatMemoryService;
|
||||||
@ -66,10 +66,8 @@ public class DashScopeChat {
|
|||||||
.collectList()
|
.collectList()
|
||||||
.flatMapMany(tokens -> {
|
.flatMapMany(tokens -> {
|
||||||
String aiResponse = String.join("", tokens);
|
String aiResponse = String.join("", tokens);
|
||||||
if (isFirst) {
|
// 异步生成标题
|
||||||
// 异步生成标题
|
generateChatTitleAsync(chatId, message, aiResponse, userId);
|
||||||
generateChatTitleAsync(chatId, message, aiResponse, userId);
|
|
||||||
}
|
|
||||||
// 返回完整的流结果
|
// 返回完整的流结果
|
||||||
return Flux.fromIterable(tokens);
|
return Flux.fromIterable(tokens);
|
||||||
});
|
});
|
||||||
@ -100,7 +98,7 @@ public class DashScopeChat {
|
|||||||
用户:%s
|
用户:%s
|
||||||
AI:%s
|
AI:%s
|
||||||
""", userMessage, aiResponse);
|
""", userMessage, aiResponse);
|
||||||
String title = simpleChat.doChat(prompt);
|
String title = dashScopeSimpleChat.doChat(prompt);
|
||||||
log.info("用户:{} 生成标题成功:{} -> {}", userId, chatId, title);
|
log.info("用户:{} 生成标题成功:{} -> {}", userId, chatId, title);
|
||||||
// 保存对话数据
|
// 保存对话数据
|
||||||
AIChatMemory memory = new AIChatMemory();
|
AIChatMemory memory = new AIChatMemory();
|
||||||
|
|||||||
@ -9,11 +9,11 @@ import org.springframework.stereotype.Component;
|
|||||||
* @date 2025-11-04 15:26
|
* @date 2025-11-04 15:26
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SimpleChat {
|
public class DashScopeSimpleChat {
|
||||||
|
|
||||||
private final ChatClient dashScopeChatClient;
|
private final ChatClient dashScopeChatClient;
|
||||||
|
|
||||||
public SimpleChat(ChatClient.Builder chatClientBuilder) {
|
public DashScopeSimpleChat(ChatClient.Builder chatClientBuilder) {
|
||||||
this.dashScopeChatClient = chatClientBuilder
|
this.dashScopeChatClient = chatClientBuilder
|
||||||
// 设置 ChatClient 中 ChatModel 的 Options 参数
|
// 设置 ChatClient 中 ChatModel 的 Options 参数
|
||||||
.defaultOptions(
|
.defaultOptions(
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.bigscreen.domain.bo.DpznglBo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.DpznglAqyVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.DpznglVo;
|
||||||
|
import org.dromara.bigscreen.service.DpzaglService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大屏-质安管理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-11-05
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dpzagl")
|
||||||
|
public class DpzaglController {
|
||||||
|
|
||||||
|
private final DpzaglService dpzaglService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大屏-质安管理-站班会,巡检工单,整改情况
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<DpznglVo> list(DpznglBo bo) {
|
||||||
|
return R.ok(dpzaglService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大屏-质安管理-站班会
|
||||||
|
*/
|
||||||
|
@GetMapping("/listByzbh")
|
||||||
|
public R<DpznglVo> listByzbh(DpznglBo bo) {
|
||||||
|
return R.ok(dpzaglService.listByzbh(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大屏-质安管理-安全员分布情况
|
||||||
|
*/
|
||||||
|
@GetMapping("/listByAqy")
|
||||||
|
public R<List<DpznglAqyVo>> listByAqy(DpznglBo bo) {
|
||||||
|
return R.ok(dpzaglService.listByAqy(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,133 @@
|
|||||||
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.bigscreen.domain.vo.*;
|
||||||
|
import org.dromara.bigscreen.service.IMaterialsManagementService;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.manager.ys7manager.Ys7Manager;
|
||||||
|
import org.dromara.materials.domain.vo.materials.MatMaterialsUseDetailVo;
|
||||||
|
import org.dromara.materials.service.IMatMaterialsService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资管理
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/materialsManagement")
|
||||||
|
public class MaterialsManagementController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMaterialsManagementService materialsManagementService;
|
||||||
|
@Autowired
|
||||||
|
private IBusPurchaseDocService busPurchaseDocService;
|
||||||
|
@Autowired
|
||||||
|
private IBusMrpBaseService busMrpBaseService;
|
||||||
|
@Autowired
|
||||||
|
private IMatMaterialsService materialsService;
|
||||||
|
@Resource
|
||||||
|
private Ys7Manager ys7Manager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存结构分析
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/inventoryStructureAnalysis")
|
||||||
|
public R<InventoryStructureAnalysisVo> inventoryStructureAnalysis(Long projectId) {
|
||||||
|
return R.ok(materialsManagementService.inventoryStructureAnalysis(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购单
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/purchaseNote")
|
||||||
|
public R<List<BusPurchaseDocVo>> purchaseNote(Long projectId) {
|
||||||
|
return R.ok(busPurchaseDocService.purchaseNote(projectId));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取采购单详情
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/purchaseNoteDetail")
|
||||||
|
public R<BusPurchaseDocVo> purchaseNoteDetail(Long id) {
|
||||||
|
return R.ok(busPurchaseDocService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取采购单详情PDF
|
||||||
|
*/
|
||||||
|
@GetMapping("/purchaseNoteDetailPdf")
|
||||||
|
public R<String> purchaseNoteDetailPdf(Long id) {
|
||||||
|
return R.ok(busPurchaseDocService.queryPicBase64ById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计量与到货量对比
|
||||||
|
*/
|
||||||
|
@GetMapping("/designAndArrivalComparison")
|
||||||
|
public R<List<designAndArrivalComparisonVo>> designAndArrivalComparison(Long projectId) {
|
||||||
|
return R.ok(busMrpBaseService.designAndArrivalComparison(projectId));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 物资需求与实际到货对比
|
||||||
|
*/
|
||||||
|
@GetMapping("/wzxqysjdhdb")
|
||||||
|
public R<List<wzxqysjdhdbVo>> wzxqysjdhdb(Long projectId) {
|
||||||
|
return R.ok(busMrpBaseService.wzxqysjdhdb(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消耗趋势对比
|
||||||
|
*/
|
||||||
|
@GetMapping("/xhqsdb")
|
||||||
|
public R<List<xhqsdbVo>> xhqsdb(Long projectId) {
|
||||||
|
return R.ok(materialsManagementService.xhqsdb(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取材料使用详情列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/listUseDetail")
|
||||||
|
public R<List<MatMaterialsUseDetailVo>> listUseDetail(Long projectId) {
|
||||||
|
return R.ok(materialsService.listUseDetail(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库实时监控
|
||||||
|
*/
|
||||||
|
@GetMapping("/warehouseMonitoring")
|
||||||
|
public R<List<WarehouseMonitoringVo>> warehouseMonitoring(Long projectId) {
|
||||||
|
return R.ok(materialsManagementService.warehouseMonitoring(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控以及仓库出入库详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/warehouseInAndOutDetail")
|
||||||
|
public R<List<StockInAndStockOutRecordVo>> warehouseInAndOutDetail(Long projectId, Long warehouseId) {
|
||||||
|
return R.ok(materialsManagementService.warehouseInAndOutDetail(projectId, warehouseId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取YS7摄像头token
|
||||||
|
*/
|
||||||
|
@GetMapping("/get/token")
|
||||||
|
public R<String> getToken() {
|
||||||
|
return R.ok("操作成功", ys7Manager.getToken());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -41,7 +41,6 @@ import org.dromara.patch.service.IPdMasterService;
|
|||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.system.domain.SysMenu;
|
import org.dromara.system.domain.SysMenu;
|
||||||
import org.dromara.system.domain.vo.RouterVo;
|
import org.dromara.system.domain.vo.RouterVo;
|
||||||
import org.dromara.system.mapper.SysRoleMapper;
|
|
||||||
import org.dromara.system.service.impl.SysMenuServiceImpl;
|
import org.dromara.system.service.impl.SysMenuServiceImpl;
|
||||||
import org.dromara.system.service.impl.SysUserServiceImpl;
|
import org.dromara.system.service.impl.SysUserServiceImpl;
|
||||||
import org.dromara.warm.flow.core.FlowEngine;
|
import org.dromara.warm.flow.core.FlowEngine;
|
||||||
@ -97,8 +96,7 @@ public class PersonalHomeController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusProjectService projectService;
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
private final SysRoleMapper roleMapper;
|
private final SysMenuServiceImpl sysMenuService;
|
||||||
private final SysMenuServiceImpl sysMenuService;
|
|
||||||
|
|
||||||
// region AI 模块
|
// region AI 模块
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,80 @@
|
|||||||
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.bigscreen.domain.dto.ProjectImageProgressDetailReq;
|
||||||
|
import org.dromara.bigscreen.domain.progress.DesignProgressVo;
|
||||||
|
import org.dromara.bigscreen.domain.progress.MaterialProgressDetailVo;
|
||||||
|
import org.dromara.bigscreen.domain.progress.MilestoneProgressVo;
|
||||||
|
import org.dromara.bigscreen.domain.progress.ProjectTotalProgressVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.ProjectImageProgressDetailVo;
|
||||||
|
import org.dromara.bigscreen.service.ProgressBigScreenService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度管理大屏接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 11:35
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/progress/big/screen")
|
||||||
|
public class ProgressBigScreenController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProgressBigScreenService progressBigScreenService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目总进度
|
||||||
|
*/
|
||||||
|
@GetMapping("/projectTotalProgress/{projectId}")
|
||||||
|
public R<ProjectTotalProgressVo> getProjectTotalProgress(@NotNull(message = "项目主键不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(progressBigScreenService.getProjectTotalProgress(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取里程碑进度
|
||||||
|
*/
|
||||||
|
@GetMapping("/milestoneProgress/{projectId}")
|
||||||
|
public R<List<MilestoneProgressVo>> getMilestoneProgress(@NotNull(message = "项目主键不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(progressBigScreenService.getMilestoneProgress(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计进度
|
||||||
|
*/
|
||||||
|
@GetMapping("/designProgress/{projectId}")
|
||||||
|
public R<DesignProgressVo> getDesignProgress(@NotNull(message = "项目主键不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(progressBigScreenService.getDesignProgress(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/constructionProgress/detail")
|
||||||
|
public R<List<ProjectImageProgressDetailVo>> getProjectTotalProgressDetail(@Validated ProjectImageProgressDetailReq req) {
|
||||||
|
return R.ok(progressBigScreenService.getProjectTotalProgressDetail(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取材料进度详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/materialProgress/detail")
|
||||||
|
public R<List<MaterialProgressDetailVo>> getMaterialProgressDetail(Long project, String name, String specification) {
|
||||||
|
return R.ok(progressBigScreenService.getMaterialProgressDetail(project, name, specification));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
||||||
|
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.project.domain.vo.project.BusProjectVo;
|
||||||
|
import org.dromara.project.service.IBusProjectService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UE大屏
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-11-04
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/UE/screen")
|
||||||
|
public class UEController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/projectInfo/{projectId}")
|
||||||
|
public R<BusProjectVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(projectService.selectById(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package org.dromara.bigscreen.domain.bo;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DpznglBo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页大小
|
||||||
|
*/
|
||||||
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前页数
|
||||||
|
*/
|
||||||
|
private Integer pageNum = 1;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate endDate;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -27,4 +27,9 @@ public class ProjectImageProgressDetailReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@NotNull(message = "进度名称不能为空")
|
@NotNull(message = "进度名称不能为空")
|
||||||
private String progressName;
|
private String progressName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否查询光伏场区所有数据
|
||||||
|
*/
|
||||||
|
private Boolean isAll = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
package org.dromara.bigscreen.domain.progress;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 17:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DesignProgressMajorVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业名称
|
||||||
|
*/
|
||||||
|
private String majorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成率
|
||||||
|
*/
|
||||||
|
private BigDecimal completionRate;
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
package org.dromara.bigscreen.domain.progress;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 17:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DesignProgressVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 379443600182489913L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总设计任务进度
|
||||||
|
*/
|
||||||
|
private Long totalDesignProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前设计任务进度
|
||||||
|
*/
|
||||||
|
private Long currentDesignProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计任务进度趋势
|
||||||
|
*/
|
||||||
|
private Boolean designProgressTrend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计任务进度环比
|
||||||
|
*/
|
||||||
|
private BigDecimal designProgressRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总设计
|
||||||
|
*/
|
||||||
|
private Long totalDesign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已审核设计
|
||||||
|
*/
|
||||||
|
private Long reviewedDesign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已审核设计进度趋势
|
||||||
|
*/
|
||||||
|
private Boolean reviewedDesignTrend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已审核设计进度环比
|
||||||
|
*/
|
||||||
|
private BigDecimal reviewedDesignRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待审核设计
|
||||||
|
*/
|
||||||
|
private Long pendingDesignReview;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待审核设计进度趋势
|
||||||
|
*/
|
||||||
|
private Boolean pendingDesignReviewTrend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待审核设计进度环比
|
||||||
|
*/
|
||||||
|
private BigDecimal pendingDesignReviewRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已逾期设计
|
||||||
|
*/
|
||||||
|
private Long delayedDesign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已逾期设计进度趋势
|
||||||
|
*/
|
||||||
|
private Boolean delayedDesignTrend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已逾期设计进度环比
|
||||||
|
*/
|
||||||
|
private BigDecimal delayedDesignRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计专业详情
|
||||||
|
*/
|
||||||
|
List<DesignProgressMajorVo> majorList;
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package org.dromara.bigscreen.domain.progress;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-16 17:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MaterialProgressDetailVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -4499381537680421083L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收
|
||||||
|
*/
|
||||||
|
private BigDecimal acceptedQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缺件
|
||||||
|
*/
|
||||||
|
private BigDecimal shortageQuantity;
|
||||||
|
|
||||||
|
// region 接收单数据
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
private String formCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
private String orderingUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
private String supplierUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到货时间
|
||||||
|
*/
|
||||||
|
private LocalDate arrivalDate;
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
package org.dromara.bigscreen.domain.progress;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 16:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MilestoneProgressVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 5731146976460407811L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键 ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前进度
|
||||||
|
*/
|
||||||
|
private BigDecimal currentProgress;
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package org.dromara.bigscreen.domain.progress;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 14:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ProjectTotalProgressDetailVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际进度
|
||||||
|
*/
|
||||||
|
private BigDecimal actualProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划进度
|
||||||
|
*/
|
||||||
|
private BigDecimal planProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成率
|
||||||
|
*/
|
||||||
|
private BigDecimal completionRate;
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package org.dromara.bigscreen.domain.progress;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 14:23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProjectTotalProgressVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -5706098940478706815L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总进度
|
||||||
|
*/
|
||||||
|
private BigDecimal totalProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总计划工期(天)
|
||||||
|
*/
|
||||||
|
private Long totalPlannedDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前计划工期(天)
|
||||||
|
*/
|
||||||
|
private Long currentPlannedDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总完成情况(万元)
|
||||||
|
*/
|
||||||
|
private BigDecimal totalCompletionAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前完成情况(万元)
|
||||||
|
*/
|
||||||
|
private BigDecimal currentCompletionAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
private List<ProjectTotalProgressDetailVo> detailList;
|
||||||
|
}
|
||||||
@ -1,36 +1,37 @@
|
|||||||
package org.dromara.workflow.domain.vo;
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.type.Decimal;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.common.translation.annotation.Translation;
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
import org.dromara.common.translation.constant.TransConstant;
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
|
||||||
* 抄送对象
|
|
||||||
*
|
|
||||||
* @author AprilWind
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class FlowCopyVo implements Serializable {
|
public class DpznglAqyVo implements Serializable {
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名称
|
|
||||||
*/
|
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "userId")
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "userId")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
public FlowCopyVo(Long userId) {
|
/**
|
||||||
this.userId = userId;
|
* 经度
|
||||||
}
|
*/
|
||||||
|
private BigDecimal locLatitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal locLongitude;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在岗
|
||||||
|
*/
|
||||||
|
private String sfzg ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||||
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||||
|
import org.dromara.safety.domain.vo.teammeeting.HseTeamMeetingVo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DpznglVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站班会
|
||||||
|
*/
|
||||||
|
private List<HseTeamMeetingVo> zbhList;
|
||||||
|
|
||||||
|
|
||||||
|
// 质量管理
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量总数
|
||||||
|
*/
|
||||||
|
private Long zlZS;
|
||||||
|
/**
|
||||||
|
* 质量数据
|
||||||
|
*/
|
||||||
|
private List<QltQualityInspectionVo> zlList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量 专项检查
|
||||||
|
*/
|
||||||
|
private Long zxjcZl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量 定期检查
|
||||||
|
*/
|
||||||
|
private Long dqjcZl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量 日常巡检
|
||||||
|
*/
|
||||||
|
private Long rcxjZl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量 整改数量
|
||||||
|
*/
|
||||||
|
private Long zlZgsl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量数据-整改
|
||||||
|
*/
|
||||||
|
private List<QltQualityInspectionVo> zlZgList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 安全管理
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全总数
|
||||||
|
*/
|
||||||
|
private Long aqZS;
|
||||||
|
/**
|
||||||
|
* 安全数据
|
||||||
|
*/
|
||||||
|
private List<HseSafetyInspectionVo> aqList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全 专项检查
|
||||||
|
*/
|
||||||
|
private Long zxjcAq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全定期检查
|
||||||
|
*/
|
||||||
|
private Long dqjcAq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全 日常巡检
|
||||||
|
*/
|
||||||
|
private Long rcxjAq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全 整改数量
|
||||||
|
*/
|
||||||
|
private Long aqZgsl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全数据-整改
|
||||||
|
*/
|
||||||
|
private List<HseSafetyInspectionVo> aqZgList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class InventoryStructureAnalysisVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本月入库总价
|
||||||
|
*/
|
||||||
|
public BigDecimal enterTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上月入库总价
|
||||||
|
*/
|
||||||
|
public BigDecimal oldEnterTotalPrices;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本月出库总价
|
||||||
|
*/
|
||||||
|
public BigDecimal leaveTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上月出库总价
|
||||||
|
*/
|
||||||
|
public BigDecimal oldLeaveTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存总价
|
||||||
|
*/
|
||||||
|
public BigDecimal inventoryTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库总价
|
||||||
|
*/
|
||||||
|
public BigDecimal outTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存逆变器总价
|
||||||
|
*/
|
||||||
|
public BigDecimal inventoryInverterTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存箱变总价
|
||||||
|
*/
|
||||||
|
public BigDecimal inventoryBoxTransformerTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存光伏支架总价
|
||||||
|
*/
|
||||||
|
public BigDecimal inventoryPhotovoltaicSupportTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存环网柜总价
|
||||||
|
*/
|
||||||
|
public BigDecimal inventoryCircuitBreakerTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前库存总价
|
||||||
|
*/
|
||||||
|
public BigDecimal nowInventoryTotalPrices;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -41,6 +41,11 @@ public class ProjectImageProgressDetailVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal totalProgress;
|
private BigDecimal totalProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成率
|
||||||
|
*/
|
||||||
|
private BigDecimal completionRate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 单位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,46 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库出入库列表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StockInAndStockOutRecordVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
public Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料名称
|
||||||
|
*/
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存数量
|
||||||
|
*/
|
||||||
|
public Long inventoryNumber;
|
||||||
|
/**
|
||||||
|
* 出入库数量
|
||||||
|
*/
|
||||||
|
public Long inAndOutNumber;
|
||||||
|
/**
|
||||||
|
* 出入库类型(0、入库,1、出库)
|
||||||
|
*/
|
||||||
|
public String type;
|
||||||
|
/**
|
||||||
|
* 出入库时间
|
||||||
|
*/
|
||||||
|
public Date time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人
|
||||||
|
*/
|
||||||
|
public String operator;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资需求与实际到货对比vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WarehouseMonitoringVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 摄像头id
|
||||||
|
*/
|
||||||
|
public Long cameraId;
|
||||||
|
/**
|
||||||
|
* 仓库id
|
||||||
|
*/
|
||||||
|
public Long warehouseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库名称
|
||||||
|
*/
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 摄像头序列号
|
||||||
|
*/
|
||||||
|
public String cameraSerial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 摄像头名称
|
||||||
|
*/
|
||||||
|
public String cameraName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备在线状态(0离线 1在线)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-关闭,1-开启
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 摄像头最后一张抓图地址
|
||||||
|
*/
|
||||||
|
public String imgUrl;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计量与到货量对比
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class designAndArrivalComparisonVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
public String specification;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
public String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计量
|
||||||
|
*/
|
||||||
|
public BigDecimal designTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到货量
|
||||||
|
*/
|
||||||
|
public BigDecimal arrivalTotalPrices;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资需求与实际到货对比vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class wzxqysjdhdbVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
public String specification;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计量
|
||||||
|
*/
|
||||||
|
public BigDecimal designTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到货量
|
||||||
|
*/
|
||||||
|
public BigDecimal arrivalTotalPrices;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package org.dromara.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资需求与实际到货对比vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class xhqsdbVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
public String specification;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库量
|
||||||
|
*/
|
||||||
|
public BigDecimal outTotalPrices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用量
|
||||||
|
*/
|
||||||
|
public BigDecimal useTotalPrices;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package org.dromara.bigscreen.enums;
|
||||||
|
|
||||||
|
public enum DpEnum {
|
||||||
|
|
||||||
|
ZLGLLX_ZXGL("专项检查", "1"),
|
||||||
|
ZLGLLX_DQJC("定期检查", "2"),
|
||||||
|
ZLGLLX_RCXJ("日常巡检", "3"),
|
||||||
|
ZLGDZT_ZG("工单状态-整改", "1"),
|
||||||
|
RYZT_ZG("人员状态-在岗", "1"),
|
||||||
|
RYZT_LG("工单状态-离岗", "0"),
|
||||||
|
JSLX_AQY("角色类型-安全员", "SAFETY_OFFICER");
|
||||||
|
|
||||||
|
|
||||||
|
private final String TypeName;
|
||||||
|
|
||||||
|
private final String TypeValue;
|
||||||
|
|
||||||
|
public String getTypeName() {
|
||||||
|
return TypeName;
|
||||||
|
}
|
||||||
|
public String getTypeValue() {
|
||||||
|
return TypeValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
DpEnum(String TypeName, String TypeValue) {
|
||||||
|
this.TypeName = TypeName;
|
||||||
|
this.TypeValue = TypeValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package org.dromara.bigscreen.enums;
|
||||||
|
|
||||||
|
public enum WuZhiEnum {
|
||||||
|
|
||||||
|
LBQ("逆变器"),
|
||||||
|
GFZJ("光伏支架"),
|
||||||
|
XB("箱变"),
|
||||||
|
HWG("环网柜");
|
||||||
|
|
||||||
|
|
||||||
|
private final String TypeName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getTypeName() {
|
||||||
|
return TypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
WuZhiEnum(String TypeName) {
|
||||||
|
this.TypeName = TypeName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package org.dromara.bigscreen.service;
|
||||||
|
|
||||||
|
|
||||||
|
import org.dromara.bigscreen.domain.bo.DpznglBo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.DpznglAqyVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.DpznglVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大屏-质安管理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-11-05
|
||||||
|
*/
|
||||||
|
public interface DpzaglService {
|
||||||
|
/**
|
||||||
|
* 查询大屏-质安管理-站班会,巡检工单,整改情况
|
||||||
|
*/
|
||||||
|
DpznglVo queryList(DpznglBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大屏-质安管理-安全员分布情况
|
||||||
|
*/
|
||||||
|
List<DpznglAqyVo> listByAqy(DpznglBo bo);
|
||||||
|
|
||||||
|
DpznglVo listByzbh(DpznglBo bo);
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package org.dromara.bigscreen.service;
|
||||||
|
|
||||||
|
|
||||||
|
import org.dromara.bigscreen.domain.vo.InventoryStructureAnalysisVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.StockInAndStockOutRecordVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.WarehouseMonitoringVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.xhqsdbVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资管理大屏Service接口
|
||||||
|
*/
|
||||||
|
public interface IMaterialsManagementService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存结构分析
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InventoryStructureAnalysisVo inventoryStructureAnalysis(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消耗趋势对比
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<xhqsdbVo> xhqsdb(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库实时监控
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<WarehouseMonitoringVo> warehouseMonitoring(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库出入库详情
|
||||||
|
*
|
||||||
|
* @param projectId
|
||||||
|
* @param warehouseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<StockInAndStockOutRecordVo> warehouseInAndOutDetail(Long projectId, Long warehouseId);
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package org.dromara.bigscreen.service;
|
||||||
|
|
||||||
|
import org.dromara.bigscreen.domain.dto.ProjectImageProgressDetailReq;
|
||||||
|
import org.dromara.bigscreen.domain.progress.DesignProgressVo;
|
||||||
|
import org.dromara.bigscreen.domain.progress.MaterialProgressDetailVo;
|
||||||
|
import org.dromara.bigscreen.domain.progress.MilestoneProgressVo;
|
||||||
|
import org.dromara.bigscreen.domain.progress.ProjectTotalProgressVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.ProjectImageProgressDetailVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.wzxqysjdhdbVo;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 14:18
|
||||||
|
*/
|
||||||
|
public interface ProgressBigScreenService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目总进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 项目总进度
|
||||||
|
*/
|
||||||
|
ProjectTotalProgressVo getProjectTotalProgress(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度详情
|
||||||
|
*
|
||||||
|
* @param req 请求参数
|
||||||
|
* @return 施工进度详情
|
||||||
|
*/
|
||||||
|
List<ProjectImageProgressDetailVo> getProjectTotalProgressDetail(@Validated ProjectImageProgressDetailReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取里程碑进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 里程碑进度
|
||||||
|
*/
|
||||||
|
List<MilestoneProgressVo> getMilestoneProgress(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 设计进度
|
||||||
|
*/
|
||||||
|
DesignProgressVo getDesignProgress(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物料进度详情
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 物料进度详情
|
||||||
|
*/
|
||||||
|
List<MaterialProgressDetailVo> getMaterialProgressDetail(Long projectId, String name, String specification);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物资进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 物资进度
|
||||||
|
*/
|
||||||
|
List<wzxqysjdhdbVo> getMaterialProgress(Long projectId);
|
||||||
|
}
|
||||||
@ -0,0 +1,239 @@
|
|||||||
|
package org.dromara.bigscreen.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.bigscreen.domain.bo.DpznglBo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.DpznglAqyVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.DpznglVo;
|
||||||
|
import org.dromara.bigscreen.enums.DpEnum;
|
||||||
|
import org.dromara.bigscreen.service.DpzaglService;
|
||||||
|
import org.dromara.common.core.service.UserService;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.domain.GeoPoint;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.utils.JtsUtil;
|
||||||
|
import org.dromara.gps.domain.GpsEquipmentSon;
|
||||||
|
import org.dromara.gps.mapper.GpsEquipmentSonMapper;
|
||||||
|
import org.dromara.project.domain.BusProjectPunchrange;
|
||||||
|
import org.dromara.project.mapper.BusUserProjectRelevancyMapper;
|
||||||
|
import org.dromara.project.service.IBusProjectPunchrangeService;
|
||||||
|
import org.dromara.quality.domain.QltQualityInspection;
|
||||||
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
||||||
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||||
|
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||||
|
import org.dromara.safety.domain.HseSafetyInspection;
|
||||||
|
import org.dromara.safety.domain.HseTeamMeeting;
|
||||||
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
||||||
|
import org.dromara.safety.domain.dto.teammeeting.HseTeamMeetingQueryReq;
|
||||||
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||||
|
import org.dromara.safety.domain.vo.teammeeting.HseTeamMeetingVo;
|
||||||
|
import org.dromara.safety.service.IHseSafetyInspectionService;
|
||||||
|
import org.dromara.safety.service.IHseTeamMeetingService;
|
||||||
|
import org.dromara.system.domain.SysRole;
|
||||||
|
import org.dromara.system.domain.SysUserRole;
|
||||||
|
import org.dromara.system.mapper.SysRoleMapper;
|
||||||
|
import org.dromara.system.mapper.SysUserRoleMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大屏-质安管理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-11-05
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class DpzaglServiceImpl implements DpzaglService {
|
||||||
|
|
||||||
|
//站班会
|
||||||
|
private final IHseTeamMeetingService teamMeetingService;
|
||||||
|
//质量-检查工单
|
||||||
|
private final IQltQualityInspectionService qualityInspectionService;
|
||||||
|
|
||||||
|
// 安全工单
|
||||||
|
private final IHseSafetyInspectionService safetyInspectionService;
|
||||||
|
|
||||||
|
|
||||||
|
private final SysRoleMapper sysRoleMapper;
|
||||||
|
|
||||||
|
private final UserService userService;
|
||||||
|
|
||||||
|
|
||||||
|
private final SysUserRoleMapper sysUserRoleMapper;
|
||||||
|
|
||||||
|
|
||||||
|
private final GpsEquipmentSonMapper gpsEquipmentSonMapper;
|
||||||
|
|
||||||
|
private final IBusProjectPunchrangeService busProjectPunchrangeService;
|
||||||
|
|
||||||
|
|
||||||
|
private final BusUserProjectRelevancyMapper busUserProjectRelevancyMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DpznglVo queryList(DpznglBo bo) {
|
||||||
|
DpznglVo dpznglVo = new DpznglVo();
|
||||||
|
PageQuery pageQuery = new PageQuery(bo.getPageSize(),bo.getPageNum());
|
||||||
|
// 质量
|
||||||
|
saveZl(pageQuery,dpznglVo,bo);
|
||||||
|
// 安全
|
||||||
|
saveAq(pageQuery,dpznglVo,bo);
|
||||||
|
|
||||||
|
|
||||||
|
return dpznglVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DpznglAqyVo> listByAqy(DpznglBo bo) {
|
||||||
|
List<DpznglAqyVo> dpznglAqyVos = new ArrayList<>();
|
||||||
|
if (bo == null || bo.getProjectId() == null) throw new RuntimeException("项目不能为空");
|
||||||
|
|
||||||
|
//// 查询该项目下的人员id
|
||||||
|
// List<BusUserProjectRelevancy> busUserProjectRelevancies = busUserProjectRelevancyMapper.selectList(new LambdaQueryWrapper<BusUserProjectRelevancy>().eq(BusUserProjectRelevancy::getProjectId, bo.getProjectId()));
|
||||||
|
// if (busUserProjectRelevancies == null || busUserProjectRelevancies.size() == 0){
|
||||||
|
// return dpznglAqyVos;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 查询拥有安全员的角色
|
||||||
|
List<SysRole> sysRoles = sysRoleMapper.selectList(new LambdaQueryWrapper<SysRole>().eq(SysRole::getRoleIdentity, DpEnum.JSLX_AQY.getTypeValue()));
|
||||||
|
if (sysRoles == null || sysRoles.size() == 0){
|
||||||
|
return dpznglAqyVos;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据角色查询人员
|
||||||
|
List<Long> roles = sysRoles.stream().map(SysRole::getRoleId).collect(Collectors.toList());
|
||||||
|
List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectList(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getRoleId, roles).groupBy(SysUserRole::getUserId));
|
||||||
|
if (sysUserRoles == null && sysUserRoles.size() == 0){
|
||||||
|
return dpznglAqyVos;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询人员的最新经纬度
|
||||||
|
List<Long> collect = sysUserRoles.stream().map(SysUserRole::getUserId).collect(Collectors.toList());
|
||||||
|
if (collect == null || collect.size() == 0){
|
||||||
|
return dpznglAqyVos;
|
||||||
|
}
|
||||||
|
List<GpsEquipmentSon> temp = gpsEquipmentSonMapper.listByAqy(collect,bo.getProjectId());
|
||||||
|
if (temp != null && temp.size() > 0){
|
||||||
|
// 回填数据
|
||||||
|
dpznglAqyVos = temp.stream().map(gpsEquipmentSon -> {
|
||||||
|
DpznglAqyVo dpznglAqyVo = new DpznglAqyVo();
|
||||||
|
dpznglAqyVo.setUserId(gpsEquipmentSon.getUserId());
|
||||||
|
dpznglAqyVo.setLocLatitude(gpsEquipmentSon.getLocLatitude());
|
||||||
|
dpznglAqyVo.setLocLongitude(gpsEquipmentSon.getLocLongitude());
|
||||||
|
return dpznglAqyVo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
// 判断是否离岗
|
||||||
|
judgeFw(dpznglAqyVos,bo.getProjectId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return dpznglAqyVos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void judgeFw(List<DpznglAqyVo> dpznglAqyVos, Long projectId) {
|
||||||
|
// 获取该项目的打卡范围
|
||||||
|
List<BusProjectPunchrange> busProjectPunchranges = busProjectPunchrangeService.getBaseMapper().selectList(new LambdaQueryWrapper<BusProjectPunchrange>().eq(BusProjectPunchrange::getProjectId, projectId));
|
||||||
|
if (busProjectPunchranges == null || busProjectPunchranges.size() == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//判断是否在岗
|
||||||
|
for (DpznglAqyVo dpznglAqyVo : dpznglAqyVos) {
|
||||||
|
dpznglAqyVo.setSfzg(DpEnum.RYZT_LG.getTypeValue());
|
||||||
|
dpznglAqyVo.setUserName(userService.selectNicknameByIds(dpznglAqyVo.getUserId().toString()));
|
||||||
|
for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) {
|
||||||
|
List<String> coordinates = List.of(busProjectPunchrange.getPunchRange());
|
||||||
|
List<GeoPoint> matchingRange = JtsUtil.findMatchingRange(dpznglAqyVo.getLocLatitude().toString(), dpznglAqyVo.getLocLongitude().toString(), coordinates);
|
||||||
|
if (matchingRange != null && matchingRange.size() > 0){
|
||||||
|
dpznglAqyVo.setSfzg(DpEnum.RYZT_ZG.getTypeValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DpznglVo listByzbh(DpznglBo bo) {
|
||||||
|
DpznglVo dpznglVo = new DpznglVo();
|
||||||
|
|
||||||
|
// 站班会
|
||||||
|
HseTeamMeetingQueryReq hseTeamMeetingQueryReq = new HseTeamMeetingQueryReq();
|
||||||
|
// List<HseTeamMeetingVo> hseTeamMeetingVos = teamMeetingService.queryList(hseTeamMeetingQueryReq);
|
||||||
|
List<HseTeamMeeting> hseTeamMeetings = teamMeetingService.getBaseMapper().selectList(new LambdaQueryWrapper<HseTeamMeeting>().eq(HseTeamMeeting::getProjectId, bo.getProjectId()));
|
||||||
|
dpznglVo.setZbhList(MapstructUtils.convert(hseTeamMeetings, HseTeamMeetingVo.class));
|
||||||
|
dpznglVo.getZbhList().forEach(hseTeamMeetingVo -> {if ( hseTeamMeetingVo.getCompereId() != null){hseTeamMeetingVo.setCompereName(userService.selectNicknameByIds(hseTeamMeetingVo.getCompereId().toString()));}});
|
||||||
|
return dpznglVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void saveAq(PageQuery pageQuery, DpznglVo dpznglVo,DpznglBo bo) {
|
||||||
|
|
||||||
|
// 安全 巡检工单,整改情况
|
||||||
|
HseSafetyInspectionQueryReq req = new HseSafetyInspectionQueryReq();
|
||||||
|
// 质量展示数据
|
||||||
|
// TableDataInfo<HseSafetyInspectionVo> anList = safetyInspectionService.queryPageList(req, pageQuery);
|
||||||
|
// 质量展示数据-整改
|
||||||
|
// req.setStatus(DpEnum.ZLGDZT_ZG.getTypeValue());
|
||||||
|
// TableDataInfo<HseSafetyInspectionVo> aqZgList = safetyInspectionService.queryPageList(req, pageQuery);
|
||||||
|
// 安全总数(用于判断巡检类型)
|
||||||
|
List<HseSafetyInspection> list = safetyInspectionService.list(new LambdaQueryWrapper<HseSafetyInspection>().eq(HseSafetyInspection::getProjectId, bo.getProjectId()).ge(bo.getStartDate() != null ,HseSafetyInspection::getCreateTime, bo.getStartDate()).le(bo.getEndDate() != null ,HseSafetyInspection::getCreateTime, bo.getEndDate()));
|
||||||
|
|
||||||
|
// List<HseSafetyInspectionVo> rows = anList.getRows();
|
||||||
|
|
||||||
|
if (list != null && list.size() > 0){
|
||||||
|
dpznglVo.setAqZS(Long.valueOf(list.size()));
|
||||||
|
dpznglVo.setAqList(MapstructUtils.convert(list, HseSafetyInspectionVo.class));
|
||||||
|
dpznglVo.getAqList().forEach(zl ->{zl.setCreatorName(userService.selectNicknameByIds(zl.getCreateBy().toString()));});
|
||||||
|
dpznglVo.setZxjcAq(list.stream().filter(zl -> DpEnum.ZLGLLX_ZXGL.getTypeValue().equals(zl.getCheckType())).count());
|
||||||
|
dpznglVo.setDqjcAq(list.stream().filter(zl -> DpEnum.ZLGLLX_DQJC.getTypeValue().equals(zl.getCheckType())).count());
|
||||||
|
dpznglVo.setRcxjAq(list.stream().filter(zl -> DpEnum.ZLGLLX_RCXJ.getTypeValue().equals(zl.getCheckType())).count());
|
||||||
|
dpznglVo.setAqZgsl(list.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getReviewType())).count());
|
||||||
|
List<HseSafetyInspectionVo> convert = MapstructUtils.convert(list.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getReviewType())).collect(Collectors.toList()), HseSafetyInspectionVo.class);
|
||||||
|
convert.forEach(zl ->{if (zl.getCorrectorId() != null)zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));});
|
||||||
|
dpznglVo.setAqZgList(convert);
|
||||||
|
}
|
||||||
|
// if (aqZgList.getRows() != null && aqZgList.getRows().size() > 0){
|
||||||
|
// aqZgList.getRows().forEach(zl ->{if (zl.getCorrectorId() != null){zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));}});
|
||||||
|
// dpznglVo.setAqZgList(aqZgList.getRows());
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveZl(PageQuery pageQuery,DpznglVo dpznglVo,DpznglBo bo) {
|
||||||
|
|
||||||
|
// 质量 巡检工单,整改情况
|
||||||
|
QltQualityInspectionQueryReq req = new QltQualityInspectionQueryReq();
|
||||||
|
|
||||||
|
//// 质量展示数据
|
||||||
|
// TableDataInfo<QltQualityInspectionVo> zlLists = qualityInspectionService.queryPageList(req, pageQuery);
|
||||||
|
// 质量展示数据-整改
|
||||||
|
// req.setInspectionStatus(DpEnum.ZLGDZT_ZG.getTypeValue());
|
||||||
|
// TableDataInfo<QltQualityInspectionVo> zlZgLists = qualityInspectionService.queryPageList(req, pageQuery);
|
||||||
|
// 质量总数
|
||||||
|
List<QltQualityInspection> zsZl = qualityInspectionService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<QltQualityInspection>().eq(QltQualityInspection::getProjectId, bo.getProjectId())
|
||||||
|
.ge(bo.getStartDate() != null ,QltQualityInspection::getCreateTime, bo.getStartDate()).le(bo.getEndDate() != null ,QltQualityInspection::getCreateTime, bo.getEndDate()));
|
||||||
|
|
||||||
|
|
||||||
|
// List<QltQualityInspectionVo> rows = zlLists.getRows();
|
||||||
|
if (zsZl != null && zsZl.size() > 0){
|
||||||
|
dpznglVo.setZlZS(Long.valueOf(zsZl.size()));
|
||||||
|
dpznglVo.setZlList(MapstructUtils.convert(zsZl, QltQualityInspectionVo.class));
|
||||||
|
dpznglVo.getZlList().forEach(zl ->{zl.setCreateByName(userService.selectNicknameByIds(zl.getCreateBy().toString()));});
|
||||||
|
dpznglVo.setZxjcZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_ZXGL.getTypeValue().equals(zl.getInspectionType())).count());
|
||||||
|
dpznglVo.setDqjcZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_DQJC.getTypeValue().equals(zl.getInspectionType())).count());
|
||||||
|
dpznglVo.setRcxjZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_RCXJ.getTypeValue().equals(zl.getInspectionType())).count());
|
||||||
|
dpznglVo.setZlZgsl(zsZl.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getVerificationType())).count());
|
||||||
|
List<QltQualityInspection> collect = zsZl.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getVerificationType())).collect(Collectors.toList());
|
||||||
|
List<QltQualityInspectionVo> convert = MapstructUtils.convert(collect, QltQualityInspectionVo.class);
|
||||||
|
convert.forEach(zl ->{if (zl.getCorrectorId() != null)zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));});
|
||||||
|
dpznglVo.setZlZgList(convert);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,431 @@
|
|||||||
|
package org.dromara.bigscreen.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.dromara.bigscreen.domain.vo.InventoryStructureAnalysisVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.StockInAndStockOutRecordVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.WarehouseMonitoringVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.xhqsdbVo;
|
||||||
|
import org.dromara.bigscreen.enums.WuZhiEnum;
|
||||||
|
import org.dromara.bigscreen.service.IMaterialsManagementService;
|
||||||
|
import org.dromara.materials.domain.*;
|
||||||
|
import org.dromara.materials.service.*;
|
||||||
|
import org.dromara.other.domain.OthYs7Device;
|
||||||
|
import org.dromara.other.domain.OthYs7DeviceImg;
|
||||||
|
import org.dromara.other.service.IOthYs7DeviceImgService;
|
||||||
|
import org.dromara.other.service.IOthYs7DeviceService;
|
||||||
|
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
||||||
|
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.temporal.TemporalAdjusters;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class MaterialsManagementServiceImpl implements IMaterialsManagementService {
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialReceiveItemService materialReceiveItemService;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialIssueItemService materialIssueItemService;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialsService materialsService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IBusBillofquantitiesLimitListService billofquantitiesLimitListService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialsInventoryService materialsInventoryService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialsUseRecordService matMaterialsUseRecordService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialIssueService materialIssueService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMatWarehouseService warehouseService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatWarehouseCameraService warehouseCameraService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IOthYs7DeviceService othYs7DeviceService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IOthYs7DeviceImgService ys7DeviceImgService;
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialReceiveService materialReceiveService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InventoryStructureAnalysisVo inventoryStructureAnalysis(Long projectId) {
|
||||||
|
InventoryStructureAnalysisVo vo = new InventoryStructureAnalysisVo();
|
||||||
|
// 获取当月第一天
|
||||||
|
LocalDateTime monthStart = LocalDateTime.now()
|
||||||
|
// 调整到当月第一天
|
||||||
|
.with(TemporalAdjusters.firstDayOfMonth())
|
||||||
|
// 重置时分秒毫秒为0
|
||||||
|
.withHour(0)
|
||||||
|
.withMinute(0)
|
||||||
|
.withSecond(0)
|
||||||
|
.withNano(0);
|
||||||
|
// 获取当前时间
|
||||||
|
LocalDateTime currentTime = LocalDateTime.now();
|
||||||
|
// 获取上月第一天
|
||||||
|
LocalDateTime lastMonthFirstDay = LocalDateTime.now()
|
||||||
|
// 先回退一个月
|
||||||
|
.minusMonths(1)
|
||||||
|
// 调整到当月第一天
|
||||||
|
.with(TemporalAdjusters.firstDayOfMonth())
|
||||||
|
// 重置时间为 00:00:00.000000000
|
||||||
|
.withHour(0)
|
||||||
|
.withMinute(0)
|
||||||
|
.withSecond(0);
|
||||||
|
// 获取上月最后一天
|
||||||
|
LocalDateTime lastMonthLastDay = LocalDateTime.now()
|
||||||
|
// 先回退一个月
|
||||||
|
.minusMonths(1)
|
||||||
|
// 调整到当月最后一天
|
||||||
|
.with(TemporalAdjusters.lastDayOfMonth())
|
||||||
|
// 设置时间为 23:59:59.999999999(纳秒最大值,对应毫秒级的999)
|
||||||
|
.withHour(23)
|
||||||
|
.withMinute(59)
|
||||||
|
.withSecond(59);
|
||||||
|
// 获取当月入库数据
|
||||||
|
List<MatMaterialReceiveItem> matMaterialReceiveItems = materialReceiveItemService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterialReceiveItem>()
|
||||||
|
.eq(MatMaterialReceiveItem::getProjectId, projectId)
|
||||||
|
.ne(MatMaterialReceiveItem::getAcceptedQuantity, BigDecimal.ZERO)
|
||||||
|
.between(MatMaterialReceiveItem::getCreateTime, monthStart, currentTime));
|
||||||
|
if (CollUtil.isEmpty(matMaterialReceiveItems)) {
|
||||||
|
vo.setEnterTotalPrices(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
// 计算本月入库金额
|
||||||
|
BigDecimal enterTotalPrices = matMaterialReceiveItems.stream()
|
||||||
|
.map(item -> item.getAcceptedQuantity().multiply(item.getUnitPrice() != null ? item.getUnitPrice() : BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setEnterTotalPrices(enterTotalPrices.setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
// 获取上月入库数据
|
||||||
|
List<MatMaterialReceiveItem> oldMatMaterialReceiveItems = materialReceiveItemService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterialReceiveItem>()
|
||||||
|
.eq(MatMaterialReceiveItem::getProjectId, projectId)
|
||||||
|
.ne(MatMaterialReceiveItem::getAcceptedQuantity, BigDecimal.ZERO)
|
||||||
|
.between(MatMaterialReceiveItem::getCreateTime, lastMonthFirstDay, lastMonthLastDay));
|
||||||
|
if (CollUtil.isEmpty(oldMatMaterialReceiveItems)) {
|
||||||
|
vo.setOldEnterTotalPrices(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
// 计算上月入库金额
|
||||||
|
BigDecimal oldEnterTotalPrices = oldMatMaterialReceiveItems.stream()
|
||||||
|
.map(item -> item.getAcceptedQuantity().multiply(item.getUnitPrice() != null ? item.getUnitPrice() : BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setOldEnterTotalPrices(oldEnterTotalPrices.setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
// 获取当月出库数据
|
||||||
|
List<MatMaterialIssueItem> matMaterialIssueItems = materialIssueItemService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<MatMaterialIssueItem>()
|
||||||
|
.eq(MatMaterialIssueItem::getProjectId, projectId)
|
||||||
|
.ne(MatMaterialIssueItem::getIssuedQuantity, BigDecimal.ZERO)
|
||||||
|
.between(MatMaterialIssueItem::getCreateTime, monthStart, currentTime));
|
||||||
|
|
||||||
|
//计算本月出库金额
|
||||||
|
if (CollUtil.isEmpty(matMaterialIssueItems)) {
|
||||||
|
vo.setLeaveTotalPrices(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
BigDecimal leaveTotalPrices = matMaterialIssueItems.stream()
|
||||||
|
.map(item -> item.getIssuedQuantity().multiply(item.getUnitPrice() != null ? item.getUnitPrice() : BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setLeaveTotalPrices(leaveTotalPrices.setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
// 获取上月出库数据
|
||||||
|
List<MatMaterialIssueItem> oldMatMaterialIssueItems = materialIssueItemService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<MatMaterialIssueItem>()
|
||||||
|
.eq(MatMaterialIssueItem::getProjectId, projectId)
|
||||||
|
.ne(MatMaterialIssueItem::getIssuedQuantity, BigDecimal.ZERO)
|
||||||
|
.between(MatMaterialIssueItem::getCreateTime, lastMonthFirstDay, lastMonthLastDay));
|
||||||
|
//计算上月出库金额
|
||||||
|
if (CollUtil.isEmpty(oldMatMaterialIssueItems)) {
|
||||||
|
vo.setOldLeaveTotalPrices(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
BigDecimal oldLeaveTotalPrices = oldMatMaterialIssueItems.stream()
|
||||||
|
.map(item -> item.getIssuedQuantity().multiply(item.getUnitPrice() != null ? item.getUnitPrice() : BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setOldLeaveTotalPrices(oldLeaveTotalPrices.setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
//获取总入库存金额 入库 * 单价
|
||||||
|
List<MatMaterialReceiveItem> totalMatMaterialReceiveItems = materialReceiveItemService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterialReceiveItem>().eq(MatMaterialReceiveItem::getProjectId, projectId));
|
||||||
|
if (CollUtil.isEmpty(totalMatMaterialReceiveItems)) {
|
||||||
|
vo.setInventoryTotalPrices(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
// 计算总入库存金额
|
||||||
|
BigDecimal inventoryTotalPrices = totalMatMaterialReceiveItems.stream()
|
||||||
|
.map(item -> item.getAcceptedQuantity().multiply(item.getUnitPrice() != null ? item.getUnitPrice() : BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setInventoryTotalPrices(inventoryTotalPrices.setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取总出库金额 出库 * 单价
|
||||||
|
List<MatMaterialIssueItem> totalMatMaterialIssueItems = materialIssueItemService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterialIssueItem>().eq(MatMaterialIssueItem::getProjectId, projectId));
|
||||||
|
if (CollUtil.isEmpty(totalMatMaterialIssueItems)) {
|
||||||
|
vo.setOutTotalPrices(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
// 计算总出库金额
|
||||||
|
BigDecimal outTotalPrices = totalMatMaterialIssueItems.stream()
|
||||||
|
.map(item -> item.getIssuedQuantity().multiply(item.getUnitPrice() != null ? item.getUnitPrice() : BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setOutTotalPrices(outTotalPrices.setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取施工图一览大类名下所有小类名
|
||||||
|
List<BusBillofquantitiesLimitList> limitLists = billofquantitiesLimitListService.getBaseMapper().selectList(new LambdaQueryWrapper<BusBillofquantitiesLimitList>()
|
||||||
|
.eq(BusBillofquantitiesLimitList::getProjectId, projectId)
|
||||||
|
.eq(BusBillofquantitiesLimitList::getPid, "0")
|
||||||
|
.eq(BusBillofquantitiesLimitList::getType, "3")
|
||||||
|
.eq(BusBillofquantitiesLimitList::getName, WuZhiEnum.LBQ.getTypeName()).or()
|
||||||
|
.eq(BusBillofquantitiesLimitList::getName, WuZhiEnum.GFZJ.getTypeName()).or()
|
||||||
|
.eq(BusBillofquantitiesLimitList::getName, WuZhiEnum.XB.getTypeName()).or()
|
||||||
|
.eq(BusBillofquantitiesLimitList::getName, WuZhiEnum.HWG.getTypeName())
|
||||||
|
);
|
||||||
|
List<String> lBQNames = new ArrayList<>();
|
||||||
|
List<String> sFZJNames = new ArrayList<>();
|
||||||
|
List<String> xBNames = new ArrayList<>();
|
||||||
|
List<String> hWGNames = new ArrayList<>();
|
||||||
|
for (BusBillofquantitiesLimitList item : limitLists) {
|
||||||
|
if (item.getName().equals(WuZhiEnum.LBQ.getTypeName())) {
|
||||||
|
lBQNames.add(item.getName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (item.getName().equals(WuZhiEnum.GFZJ.getTypeName())) {
|
||||||
|
sFZJNames.add(item.getName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (item.getName().equals(WuZhiEnum.XB.getTypeName())) {
|
||||||
|
xBNames.add(item.getName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (item.getName().equals(WuZhiEnum.HWG.getTypeName())) {
|
||||||
|
hWGNames.add(item.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取库存逆变器总价
|
||||||
|
BigDecimal inventoryInverterTotalPrices = materialsService.selectTotalPricesByNames(projectId, lBQNames);
|
||||||
|
vo.setInventoryInverterTotalPrices(inventoryInverterTotalPrices);
|
||||||
|
//获取库存箱变总价
|
||||||
|
BigDecimal inventoryBoxTransformerTotalPrices = materialsService.selectTotalPricesByNames(projectId, xBNames);
|
||||||
|
vo.setInventoryBoxTransformerTotalPrices(inventoryBoxTransformerTotalPrices);
|
||||||
|
//获取库存光伏支架总价
|
||||||
|
BigDecimal inventoryPhotovoltaicSupportTotalPrices = materialsService.selectTotalPricesByNames(projectId, sFZJNames);
|
||||||
|
vo.setInventoryPhotovoltaicSupportTotalPrices(inventoryPhotovoltaicSupportTotalPrices);
|
||||||
|
//获取库存环网柜总价
|
||||||
|
BigDecimal inventoryCircuitBreakerTotalPrices = materialsService.selectTotalPricesByNames(projectId, hWGNames);
|
||||||
|
vo.setInventoryCircuitBreakerTotalPrices(inventoryCircuitBreakerTotalPrices);
|
||||||
|
//获取当前库存总价
|
||||||
|
BigDecimal nowInventoryTotalPrices = materialsService.selectTotalPrices(projectId);
|
||||||
|
vo.setNowInventoryTotalPrices(nowInventoryTotalPrices);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消耗趋势对比
|
||||||
|
*
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<xhqsdbVo> xhqsdb(Long projectId) {
|
||||||
|
List<xhqsdbVo> list = new ArrayList<>();
|
||||||
|
//获取出库记录
|
||||||
|
List<MatMaterialIssue> issuesList = materialIssueService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<MatMaterialIssue>()
|
||||||
|
.eq(MatMaterialIssue::getProjectId, projectId)
|
||||||
|
.eq(MatMaterialIssue::getMaterialSource, "1"));
|
||||||
|
if (CollUtil.isEmpty(issuesList)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
Set<Long> issueIds = issuesList.stream().map(MatMaterialIssue::getId).collect(Collectors.toSet());
|
||||||
|
if (CollUtil.isEmpty(issueIds)){
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
//获取领料明细列表
|
||||||
|
List<MatMaterialIssueItem> issueItems = materialIssueItemService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterialIssueItem>()
|
||||||
|
.in(MatMaterialIssueItem::getIssueId, issueIds));
|
||||||
|
if (CollUtil.isEmpty(issueItems)){
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
Set<Long> iIds = issueItems.stream().filter(item -> item.getInventoryId() != null).map(MatMaterialIssueItem::getInventoryId).collect(Collectors.toSet());
|
||||||
|
if (CollUtil.isEmpty(iIds)){
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
//获取出入库表中出库记录
|
||||||
|
List<MatMaterialsInventory> inventories = materialsInventoryService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<MatMaterialsInventory>()
|
||||||
|
.in(MatMaterialsInventory::getId, iIds));
|
||||||
|
if (CollUtil.isEmpty(inventories)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
//获取每个材料的库存数量
|
||||||
|
HashMap<Long, BigDecimal> inventoryHashMap = new HashMap<>();
|
||||||
|
inventories.forEach(item -> {
|
||||||
|
if (inventoryHashMap.containsKey(item.getMaterialsId())){
|
||||||
|
inventoryHashMap.put(item.getMaterialsId(), inventoryHashMap.get(item.getMaterialsId()).add(new BigDecimal(item.getNumber())));
|
||||||
|
}else {
|
||||||
|
inventoryHashMap.put(item.getMaterialsId(), new BigDecimal(item.getNumber()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Set<Long> mids = inventories.stream().filter(item -> item.getMaterialsId() != null).map(MatMaterialsInventory::getMaterialsId).collect(Collectors.toSet());
|
||||||
|
if (CollUtil.isEmpty(mids)){
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
//获取材料名称列表
|
||||||
|
List<MatMaterials> materials = materialsService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterials>()
|
||||||
|
.eq(MatMaterials::getProjectId, projectId)
|
||||||
|
.in(MatMaterials::getId, mids));
|
||||||
|
if (CollUtil.isEmpty(materials)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
//获取材料名称
|
||||||
|
Map<Long, String> map1 = materials.stream()
|
||||||
|
.collect(Collectors.toMap(MatMaterials::getId, MatMaterials::getMaterialsName));
|
||||||
|
//获取所有出入库记录id
|
||||||
|
Set<Long> ids = inventories.stream()
|
||||||
|
.map(MatMaterialsInventory::getId)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
if (CollUtil.isEmpty(ids)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
//根据出入库id获取使用记录
|
||||||
|
List<MatMaterialsUseRecord> useRecords = matMaterialsUseRecordService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<MatMaterialsUseRecord>()
|
||||||
|
.eq(MatMaterialsUseRecord::getProjectId, projectId)
|
||||||
|
.in(MatMaterialsUseRecord::getInventoryId, ids));
|
||||||
|
Map<Long, BigDecimal> map = useRecords.stream()
|
||||||
|
.collect(Collectors.groupingBy(
|
||||||
|
MatMaterialsUseRecord::getInventoryId,
|
||||||
|
Collectors.reducing(BigDecimal.ZERO, MatMaterialsUseRecord::getUseNumber, BigDecimal::add)
|
||||||
|
));
|
||||||
|
inventoryHashMap.forEach((key, value) -> {
|
||||||
|
xhqsdbVo vo = new xhqsdbVo();
|
||||||
|
vo.setName(map1.get(key));
|
||||||
|
vo.setOutTotalPrices( value);
|
||||||
|
vo.setUseTotalPrices(map.getOrDefault(key, BigDecimal.ZERO));
|
||||||
|
list.add(vo);
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WarehouseMonitoringVo> warehouseMonitoring(Long projectId) {
|
||||||
|
List<WarehouseMonitoringVo> list = new ArrayList<>();
|
||||||
|
//根据项目id获取仓库列表
|
||||||
|
List<MatWarehouse> warehouseList = warehouseService.getBaseMapper().selectList(new LambdaQueryWrapper<MatWarehouse>()
|
||||||
|
.eq(MatWarehouse::getProjectId, projectId));
|
||||||
|
//构建仓库id与仓库对象映射
|
||||||
|
if (CollUtil.isEmpty(warehouseList)){
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
Map<Long, MatWarehouse> warehouseMap = warehouseList.stream().collect(Collectors.toMap(MatWarehouse::getId, item -> item));
|
||||||
|
//根据仓库列表获取仓库id
|
||||||
|
Set<Long> warehouseIds = warehouseList.stream().map(MatWarehouse::getId).collect(Collectors.toSet());
|
||||||
|
//根据仓库id获取摄像头id列表
|
||||||
|
List<MatWarehouseCamera> warehouseCameraList = warehouseCameraService.getBaseMapper().selectList(new LambdaQueryWrapper<MatWarehouseCamera>()
|
||||||
|
.in(MatWarehouseCamera::getWarehouseId, warehouseIds));
|
||||||
|
if (CollUtil.isEmpty(warehouseCameraList)){
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
Set<Long> cameraIds = warehouseCameraList.stream().filter(item -> item.getCameraId() != null).map(MatWarehouseCamera::getCameraId).collect(Collectors.toSet());
|
||||||
|
//生成摄像头与仓库关系
|
||||||
|
Map<Long, Long> warehouseCameraMap = warehouseCameraList.stream().collect(Collectors.toMap(MatWarehouseCamera::getCameraId, MatWarehouseCamera::getWarehouseId));
|
||||||
|
//根据摄像头id列表获取摄像头列表
|
||||||
|
List<OthYs7Device> cameraList = othYs7DeviceService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<OthYs7Device>()
|
||||||
|
.in(OthYs7Device::getId, cameraIds));
|
||||||
|
if (CollUtil.isEmpty(cameraList)){
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//获取摄像头最后一张抓拍图片
|
||||||
|
Set<String> deviceSerialSet = cameraList.stream().map(OthYs7Device::getDeviceSerial).collect(Collectors.toSet());
|
||||||
|
List<OthYs7DeviceImg> deviceImgs = ys7DeviceImgService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<OthYs7DeviceImg>()
|
||||||
|
.in(OthYs7DeviceImg::getDeviceSerial, deviceSerialSet));
|
||||||
|
Map<String, String> deviceImgMap = new HashMap<>();
|
||||||
|
if (CollUtil.isNotEmpty(deviceImgs)){
|
||||||
|
//构建摄像头与图片关系
|
||||||
|
deviceImgMap = deviceImgs.stream().collect(Collectors.toMap(OthYs7DeviceImg::getDeviceSerial, OthYs7DeviceImg::getUrl));
|
||||||
|
}
|
||||||
|
//遍历摄像头列表组装返回数据
|
||||||
|
for (OthYs7Device item : cameraList) {
|
||||||
|
WarehouseMonitoringVo vo = new WarehouseMonitoringVo();
|
||||||
|
vo.setCameraId(item.getId());
|
||||||
|
vo.setWarehouseId(warehouseCameraMap.get(item.getId()));
|
||||||
|
vo.setCameraSerial(item.getDeviceSerial());
|
||||||
|
vo.setCameraName(item.getDeviceName());
|
||||||
|
vo.setStatus(item.getStatus());
|
||||||
|
vo.setEnable(item.getEnable());
|
||||||
|
vo.setName(warehouseMap.get(vo.getWarehouseId()).getWarehouseName());
|
||||||
|
vo.setImgUrl(deviceImgMap.get(item.getDeviceSerial()) != null ? deviceImgMap.get(item.getDeviceSerial()) : "");
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库出入库明细
|
||||||
|
*
|
||||||
|
* @param projectId
|
||||||
|
* @param warehouseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<StockInAndStockOutRecordVo> warehouseInAndOutDetail(Long projectId, Long warehouseId) {
|
||||||
|
List<StockInAndStockOutRecordVo> list = new ArrayList<>();
|
||||||
|
//根据项目id和仓库id获取入库列表
|
||||||
|
List<MatMaterials> matMaterials = materialsService.getBaseMapper().selectList(new LambdaQueryWrapper<MatMaterials>()
|
||||||
|
.eq(MatMaterials::getProjectId, projectId)
|
||||||
|
.eq(MatMaterials::getWarehouseId, warehouseId));
|
||||||
|
if (CollUtil.isEmpty(matMaterials)) {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//生成材料id与材料名称关系
|
||||||
|
Map<Long, String> map1 = matMaterials.stream().collect(Collectors.toMap(MatMaterials::getId, MatMaterials::getMaterialsName));
|
||||||
|
//获取入库的材料id列表
|
||||||
|
Set<Long> mIds = matMaterials.stream()
|
||||||
|
.map(MatMaterials::getId)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
if (CollUtil.isEmpty(mIds)){
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//根据材料id列表查询出入库记录表,获取到所有材料的出入库记录
|
||||||
|
List<MatMaterialsInventory> materialsInventoryList = materialsInventoryService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<MatMaterialsInventory>()
|
||||||
|
.in(MatMaterialsInventory::getMaterialsId, mIds)
|
||||||
|
.orderByDesc(MatMaterialsInventory::getCreateTime));
|
||||||
|
if (CollUtil.isEmpty(materialsInventoryList)){
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//遍历出入库记录列表,组装返回数据
|
||||||
|
for (MatMaterialsInventory item : materialsInventoryList) {
|
||||||
|
StockInAndStockOutRecordVo vo = new StockInAndStockOutRecordVo();
|
||||||
|
vo.setId(item.getId());
|
||||||
|
vo.setName(map1.get(item.getMaterialsId()));
|
||||||
|
vo.setInventoryNumber(item.getResidue());
|
||||||
|
vo.setInAndOutNumber(item.getNumber());
|
||||||
|
vo.setType(item.getOutPut());
|
||||||
|
vo.setTime(item.getOutPutTime());
|
||||||
|
vo.setOperator(item.getOperator());
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,403 @@
|
|||||||
|
package org.dromara.bigscreen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.bigscreen.domain.dto.ProjectImageProgressDetailReq;
|
||||||
|
import org.dromara.bigscreen.domain.progress.*;
|
||||||
|
import org.dromara.bigscreen.domain.vo.ProjectImageProgressDetailVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.wzxqysjdhdbVo;
|
||||||
|
import org.dromara.bigscreen.service.ProgressBigScreenService;
|
||||||
|
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
||||||
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
|
import org.dromara.common.core.utils.DateUtils;
|
||||||
|
import org.dromara.common.utils.BigDecimalUtil;
|
||||||
|
import org.dromara.design.domain.DesVolumeCatalog;
|
||||||
|
import org.dromara.design.domain.DesVolumeFile;
|
||||||
|
import org.dromara.design.service.IDesVolumeCatalogService;
|
||||||
|
import org.dromara.design.service.IDesVolumeFileService;
|
||||||
|
import org.dromara.materials.domain.MatMaterialReceive;
|
||||||
|
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
||||||
|
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
||||||
|
import org.dromara.materials.service.IMatMaterialReceiveService;
|
||||||
|
import org.dromara.materials.service.IMatMaterialsService;
|
||||||
|
import org.dromara.progress.constant.PgsProgressCategoryConstant;
|
||||||
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
|
import org.dromara.progress.domain.PgsProgressCategory;
|
||||||
|
import org.dromara.progress.domain.dto.progressplan.PgsProgressPlanQueryReq;
|
||||||
|
import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryValueTotalVo;
|
||||||
|
import org.dromara.progress.domain.vo.progressplan.PgsProgressPlanDateVo;
|
||||||
|
import org.dromara.progress.service.IPgsConstructionSchedulePlanService;
|
||||||
|
import org.dromara.progress.service.IPgsProgressCategoryService;
|
||||||
|
import org.dromara.progress.service.IPgsProgressPlanService;
|
||||||
|
import org.dromara.project.domain.BusProject;
|
||||||
|
import org.dromara.project.service.IBusProjectService;
|
||||||
|
import org.dromara.system.domain.vo.SysDictDataVo;
|
||||||
|
import org.dromara.system.service.ISysDictDataService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-15 14:18
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class ProgressBigScreenServiceImpl implements ProgressBigScreenService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProjectBigScreenService projectBigScreenService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsProgressCategoryService progressCategoryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsProgressPlanService progressPlanService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsConstructionSchedulePlanService constructionSchedulePlanService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDesVolumeCatalogService volumeCatalogService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDesVolumeFileService volumeFileService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysDictDataService dictDataService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialReceiveService materialReceiveService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialReceiveItemService materialReceiveItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBusMrpBaseService mrpBaseService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialsService matMaterialsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目总进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 项目总进度
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProjectTotalProgressVo getProjectTotalProgress(Long projectId) {
|
||||||
|
ProjectTotalProgressVo vo = new ProjectTotalProgressVo();
|
||||||
|
// 获取项目和项目子项
|
||||||
|
BusProject project = projectService.getById(projectId);
|
||||||
|
if (project == null) {
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
List<BusProject> projects = projectService.lambdaQuery()
|
||||||
|
.eq(BusProject::getPId, projectId)
|
||||||
|
.list();
|
||||||
|
projects.add(project);
|
||||||
|
List<Long> projectIds = projects.stream().map(BusProject::getId).toList();
|
||||||
|
// 获取当前项目所有父级类别
|
||||||
|
List<PgsProgressCategory> topList = progressCategoryService.lambdaQuery()
|
||||||
|
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||||
|
.eq(PgsProgressCategory::getParentId, PgsProgressCategoryConstant.TOP_PARENT_ID)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isEmpty(topList)) {
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
List<Long> topIds = topList.stream().map(PgsProgressCategory::getId).toList();
|
||||||
|
List<PgsProgressCategory> children = progressCategoryService.getLeafNodesByTopIds(topIds);
|
||||||
|
BigDecimal completedPercentage = progressCategoryService.getCompletedPercentage(children);
|
||||||
|
vo.setTotalProgress(completedPercentage);
|
||||||
|
// 获取总计划工期
|
||||||
|
PgsProgressPlanQueryReq queryDate = new PgsProgressPlanQueryReq();
|
||||||
|
queryDate.setProjectId(projectId);
|
||||||
|
PgsProgressPlanDateVo dateVo = progressPlanService.queryDate(queryDate);
|
||||||
|
if (dateVo != null && dateVo.getStartDate() != null && dateVo.getEndDate() != null) {
|
||||||
|
LocalDate startDate = dateVo.getStartDate();
|
||||||
|
LocalDate endDate = dateVo.getEndDate();
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
long totalDays = ChronoUnit.DAYS.between(startDate, endDate);
|
||||||
|
vo.setTotalPlannedDuration(totalDays);
|
||||||
|
if (now.isAfter(endDate)) {
|
||||||
|
vo.setCurrentPlannedDuration(totalDays);
|
||||||
|
} else if (now.isBefore(startDate)) {
|
||||||
|
vo.setCurrentPlannedDuration(0L);
|
||||||
|
} else {
|
||||||
|
vo.setCurrentPlannedDuration(ChronoUnit.DAYS.between(startDate, now) + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取整体完成情况
|
||||||
|
PgsProgressCategoryValueTotalVo valueTotal = progressCategoryService.getValueTotal(children, true);
|
||||||
|
vo.setTotalCompletionAmount(valueTotal.getTotalValue().divide(BigDecimal.valueOf(10000), 0, RoundingMode.HALF_UP));
|
||||||
|
vo.setCurrentCompletionAmount(valueTotal.getCurrentValue().divide(BigDecimal.valueOf(10000), 0, RoundingMode.HALF_UP));
|
||||||
|
// 获取详情
|
||||||
|
Map<String, List<PgsProgressCategory>> nameMap = topList.stream()
|
||||||
|
.collect(Collectors.groupingBy(PgsProgressCategory::getName));
|
||||||
|
List<ProjectTotalProgressDetailVo> detailList = new ArrayList<>();
|
||||||
|
for (Map.Entry<String, List<PgsProgressCategory>> entry : nameMap.entrySet()) {
|
||||||
|
ProjectTotalProgressDetailVo detailVo = new ProjectTotalProgressDetailVo();
|
||||||
|
String name = entry.getKey();
|
||||||
|
detailVo.setName(name);
|
||||||
|
List<PgsProgressCategory> value = entry.getValue();
|
||||||
|
List<Long> top = value.stream().map(PgsProgressCategory::getId).toList();
|
||||||
|
List<PgsProgressCategory> nameChildren = progressCategoryService.getLeafNodesByTopIds(top, children);
|
||||||
|
BigDecimal completedTotal = nameChildren.stream().map(PgsProgressCategory::getCompleted)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
BigDecimal planTotal = nameChildren.stream().map(PgsProgressCategory::getPlanTotal)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
BigDecimal total = nameChildren.stream().map(PgsProgressCategory::getTotal)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
detailVo.setActualProgress(completedTotal);
|
||||||
|
detailVo.setPlanProgress(planTotal);
|
||||||
|
detailVo.setCompletionRate(BigDecimalUtil.toPercentage(completedTotal, total));
|
||||||
|
detailList.add(detailVo);
|
||||||
|
}
|
||||||
|
vo.setDetailList(detailList);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度详情
|
||||||
|
*
|
||||||
|
* @param req 请求参数
|
||||||
|
* @return 施工进度详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectImageProgressDetailVo> getProjectTotalProgressDetail(ProjectImageProgressDetailReq req) {
|
||||||
|
req.setIsAll(true);
|
||||||
|
return projectBigScreenService.getProjectImageProgressDetail(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取里程碑进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 里程碑进度
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MilestoneProgressVo> getMilestoneProgress(Long projectId) {
|
||||||
|
List<MilestoneProgressVo> voList = new ArrayList<>();
|
||||||
|
List<PgsConstructionSchedulePlan> planList = constructionSchedulePlanService.lambdaQuery()
|
||||||
|
.eq(PgsConstructionSchedulePlan::getProjectId, projectId)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isEmpty(planList)) {
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
List<PgsConstructionSchedulePlan> topList = planList.stream().filter(plan -> plan.getParentId().equals(0L)).toList();
|
||||||
|
return topList.stream().map(plan -> {
|
||||||
|
MilestoneProgressVo vo = new MilestoneProgressVo();
|
||||||
|
BeanUtils.copyProperties(plan, vo);
|
||||||
|
// 获取子节点
|
||||||
|
List<PgsConstructionSchedulePlan> allChildren = constructionSchedulePlanService.getAllChildren(plan.getId(), planList);
|
||||||
|
long count = allChildren.stream().filter(child -> child.getStatus().equals("4")).count();
|
||||||
|
BigDecimal percentage = BigDecimalUtil.toPercentage(new BigDecimal(count), new BigDecimal(allChildren.size()));
|
||||||
|
vo.setCurrentProgress(percentage);
|
||||||
|
return vo;
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 设计进度
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DesignProgressVo getDesignProgress(Long projectId) {
|
||||||
|
DesignProgressVo vo = new DesignProgressVo();
|
||||||
|
List<DesVolumeCatalog> catalogList = volumeCatalogService.lambdaQuery()
|
||||||
|
.eq(DesVolumeCatalog::getProjectId, projectId).list();
|
||||||
|
if (CollUtil.isEmpty(catalogList)) {
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
LocalDate nowDate = LocalDate.now();
|
||||||
|
long currentDesignProgress = 0L;
|
||||||
|
BigDecimal designProgressThisM = BigDecimal.ZERO;
|
||||||
|
BigDecimal designProgressLastM = BigDecimal.ZERO;
|
||||||
|
long currentDelay = 0L;
|
||||||
|
BigDecimal delayThisD = BigDecimal.ZERO;
|
||||||
|
BigDecimal delayLastD = BigDecimal.ZERO;
|
||||||
|
// 总数量
|
||||||
|
vo.setTotalDesignProgress((long) catalogList.size());
|
||||||
|
LocalDateTime firstDayOfMonth = LocalDateTime.now().withDayOfMonth(1).with(LocalTime.MIN);
|
||||||
|
LocalDateTime lastMonthFirstDay = LocalDateTime.now().minusMonths(1).withDayOfMonth(1).with(LocalTime.MIN);
|
||||||
|
for (DesVolumeCatalog catalog : catalogList) {
|
||||||
|
// 已出图状态
|
||||||
|
if (catalog.getDesignState().equals("1")) {
|
||||||
|
currentDesignProgress++;
|
||||||
|
// 获取当月和上月的完成数量
|
||||||
|
LocalDateTime finishTime = catalog.getFinishTime();
|
||||||
|
if (finishTime != null) {
|
||||||
|
if (finishTime.isAfter(firstDayOfMonth)) {
|
||||||
|
designProgressThisM = designProgressThisM.add(BigDecimal.ONE);
|
||||||
|
} else if (finishTime.isBefore(lastMonthFirstDay)) {
|
||||||
|
designProgressLastM = designProgressLastM.add(BigDecimal.ONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (!catalog.getPlannedCompletion().isAfter(nowDate) && catalog.getDesignState().equals("2")) {
|
||||||
|
currentDelay++;
|
||||||
|
if (catalog.getPlannedCompletion().isEqual(nowDate)) {
|
||||||
|
delayThisD = delayThisD.add(BigDecimal.ONE);
|
||||||
|
} else if (catalog.getPlannedCompletion().isEqual(nowDate.minusDays(1))) {
|
||||||
|
delayLastD = delayLastD.add(BigDecimal.ONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 计算完成情况
|
||||||
|
vo.setCurrentDesignProgress(currentDesignProgress);
|
||||||
|
vo.setDesignProgressTrend(designProgressThisM.compareTo(designProgressLastM) >= 0);
|
||||||
|
vo.setDesignProgressRate(BigDecimalUtil.toLoopPercentage(designProgressThisM, designProgressLastM));
|
||||||
|
// 总逾期数量
|
||||||
|
vo.setDelayedDesign(currentDelay);
|
||||||
|
vo.setDelayedDesignTrend(delayThisD.compareTo(delayLastD) >= 0);
|
||||||
|
vo.setDelayedDesignRate(BigDecimalUtil.toLoopPercentage(delayThisD, delayLastD));
|
||||||
|
// 获取各专业完成情况
|
||||||
|
List<DesignProgressMajorVo> majorList = new ArrayList<>();
|
||||||
|
Map<String, List<DesVolumeCatalog>> specialtyMap = catalogList.stream()
|
||||||
|
.collect(Collectors.groupingBy(DesVolumeCatalog::getSpecialty));
|
||||||
|
List<SysDictDataVo> desUserMajor = dictDataService.selectByDictType("des_user_major");
|
||||||
|
if (CollUtil.isEmpty(desUserMajor)) {
|
||||||
|
log.error("专业字典 des_user_major 数据不存在");
|
||||||
|
} else {
|
||||||
|
Map<String, String> dictMap = desUserMajor.stream()
|
||||||
|
.collect(Collectors.toMap(SysDictDataVo::getDictValue, SysDictDataVo::getDictLabel));
|
||||||
|
specialtyMap.forEach((specialty, list) -> {
|
||||||
|
DesignProgressMajorVo majorVo = new DesignProgressMajorVo();
|
||||||
|
majorVo.setMajorName(dictMap.getOrDefault(specialty, specialty));
|
||||||
|
BigDecimal total = new BigDecimal(list.size());
|
||||||
|
long count = list.stream().filter(catalog -> catalog.getDesignState().equals("1")).count();
|
||||||
|
majorVo.setCompletionRate(BigDecimalUtil.toPercentage(new BigDecimal(count), total));
|
||||||
|
majorList.add(majorVo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vo.setMajorList(majorList);
|
||||||
|
// 审核信息
|
||||||
|
Set<Long> ids = catalogList.stream().map(DesVolumeCatalog::getDesign).collect(Collectors.toSet());
|
||||||
|
List<DesVolumeFile> fileList = volumeFileService.lambdaQuery()
|
||||||
|
.in(DesVolumeFile::getVolumeCatalogId, ids)
|
||||||
|
.list();
|
||||||
|
long reviewedDesign = 0L;
|
||||||
|
BigDecimal reviewedDesignThisM = BigDecimal.ZERO;
|
||||||
|
BigDecimal reviewedDesignLastM = BigDecimal.ZERO;
|
||||||
|
long pendingReviewDesign = 0L;
|
||||||
|
BigDecimal pendingReviewDesignThisD = BigDecimal.ZERO;
|
||||||
|
BigDecimal pendingReviewDesignLastD = BigDecimal.ZERO;
|
||||||
|
for (DesVolumeFile file : fileList) {
|
||||||
|
String status = file.getStatus();
|
||||||
|
if (BusinessStatusEnum.FINISH.getStatus().equals(status)) {
|
||||||
|
reviewedDesign++;
|
||||||
|
// 获取当月和上月的完成数量
|
||||||
|
LocalDateTime finishTime = file.getFinishTime();
|
||||||
|
if (finishTime != null) {
|
||||||
|
if (finishTime.isAfter(firstDayOfMonth)) {
|
||||||
|
reviewedDesignThisM = reviewedDesignThisM.add(BigDecimal.ONE);
|
||||||
|
} else if (finishTime.isBefore(lastMonthFirstDay)) {
|
||||||
|
reviewedDesignLastM = reviewedDesignLastM.add(BigDecimal.ONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (BusinessStatusEnum.WAITING.getStatus().equals(status)) {
|
||||||
|
pendingReviewDesign++;
|
||||||
|
Date createTime = file.getCreateTime();
|
||||||
|
LocalDate createDate = createTime.toInstant()
|
||||||
|
.atZone(ZoneId.systemDefault())
|
||||||
|
.toLocalDate();
|
||||||
|
if (createDate.isEqual(nowDate)) {
|
||||||
|
pendingReviewDesignThisD = pendingReviewDesignThisD.add(BigDecimal.ONE);
|
||||||
|
} else if (createDate.isEqual(nowDate.minusDays(1))) {
|
||||||
|
pendingReviewDesignLastD = pendingReviewDesignLastD.add(BigDecimal.ONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vo.setTotalDesign((long) fileList.size());
|
||||||
|
vo.setReviewedDesign(reviewedDesign);
|
||||||
|
vo.setReviewedDesignTrend(reviewedDesignThisM.compareTo(reviewedDesignLastM) >= 0);
|
||||||
|
vo.setReviewedDesignRate(BigDecimalUtil.toLoopPercentage(reviewedDesignThisM, reviewedDesignLastM));
|
||||||
|
vo.setPendingDesignReview(pendingReviewDesign);
|
||||||
|
vo.setPendingDesignReviewTrend(pendingReviewDesignThisD.compareTo(pendingReviewDesignLastD) >= 0);
|
||||||
|
vo.setPendingDesignReviewRate(BigDecimalUtil.toLoopPercentage(pendingReviewDesignThisD, pendingReviewDesignLastD));
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物料进度详情
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 物料进度详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MaterialProgressDetailVo> getMaterialProgressDetail(Long projectId, String name, String specification) {
|
||||||
|
// 根据名称 规格获取材料
|
||||||
|
List<MatMaterialReceiveItem> itemList = materialReceiveItemService.lambdaQuery()
|
||||||
|
.eq(MatMaterialReceiveItem::getName, name)
|
||||||
|
.eq(MatMaterialReceiveItem::getSpecification, specification)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isEmpty(itemList)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
Set<Long> ids = itemList.stream().map(MatMaterialReceiveItem::getReceiveId).collect(Collectors.toSet());
|
||||||
|
List<MatMaterialReceive> receiveList = materialReceiveService.lambdaQuery()
|
||||||
|
.in(MatMaterialReceive::getId, ids)
|
||||||
|
.list();
|
||||||
|
Map<Long, MatMaterialReceive> receiveMap = receiveList.stream()
|
||||||
|
.collect(Collectors.toMap(MatMaterialReceive::getId, receive -> receive));
|
||||||
|
return itemList.stream().map(item -> {
|
||||||
|
Long receiveId = item.getReceiveId();
|
||||||
|
MatMaterialReceive receive = receiveMap.get(receiveId);
|
||||||
|
if (receive == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MaterialProgressDetailVo vo = new MaterialProgressDetailVo();
|
||||||
|
vo.setId(item.getId());
|
||||||
|
vo.setName(item.getName());
|
||||||
|
vo.setQuantity(item.getQuantity());
|
||||||
|
vo.setAcceptedQuantity(item.getAcceptedQuantity());
|
||||||
|
vo.setShortageQuantity(item.getShortageQuantity());
|
||||||
|
vo.setFormCode(receive.getFormCode());
|
||||||
|
vo.setContractName(receive.getContractName());
|
||||||
|
vo.setOrderingUnit(receive.getOrderingUnit());
|
||||||
|
vo.setSupplierUnit(receive.getSupplierUnit());
|
||||||
|
vo.setArrivalDate(DateUtils.toLocalDate(receive.getCreateTime()));
|
||||||
|
return vo;
|
||||||
|
}).filter(Objects::nonNull).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物资进度
|
||||||
|
*
|
||||||
|
* @param projectId 项目 id
|
||||||
|
* @return 物资进度
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<wzxqysjdhdbVo> getMaterialProgress(Long projectId) {
|
||||||
|
List<wzxqysjdhdbVo> wzxqysjdhdb = mrpBaseService.wzxqysjdhdb(projectId);
|
||||||
|
Map<String, List<wzxqysjdhdbVo>> map = wzxqysjdhdb.stream()
|
||||||
|
.collect(Collectors.groupingBy(o -> o.getName() + o.getSpecification()));
|
||||||
|
List<wzxqysjdhdbVo> wzxqysjdhdbList = new ArrayList<>();
|
||||||
|
map.forEach((k, v) -> {
|
||||||
|
wzxqysjdhdbVo vo = new wzxqysjdhdbVo();
|
||||||
|
vo.setName(v.getFirst().getName());
|
||||||
|
vo.setSpecification(v.getFirst().getSpecification());
|
||||||
|
BigDecimal design = v.stream().map(wzxqysjdhdbVo::getDesignTotalPrices).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setDesignTotalPrices(design);
|
||||||
|
BigDecimal arrival = v.stream().map(wzxqysjdhdbVo::getArrivalTotalPrices).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setArrivalTotalPrices(arrival);
|
||||||
|
wzxqysjdhdbList.add(vo);
|
||||||
|
});
|
||||||
|
return wzxqysjdhdbList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
|||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.dromara.bigscreen.domain.dto.ProjectImageProgressDetailReq;
|
import org.dromara.bigscreen.domain.dto.ProjectImageProgressDetailReq;
|
||||||
@ -370,7 +371,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
// 如果有叶子节点,统计进度和状态;否则初始化为未完成
|
// 如果有叶子节点,统计进度和状态;否则初始化为未完成
|
||||||
if (CollUtil.isNotEmpty(leafNodesByTopIds)) {
|
if (CollUtil.isNotEmpty(leafNodesByTopIds)) {
|
||||||
topVo.setProgressTotal(progressCategoryService.getCompletedPercentage(leafNodesByTopIds));
|
topVo.setProgressTotal(progressCategoryService.getCompletedPercentage(leafNodesByTopIds));
|
||||||
topVo.setValueTotal(progressCategoryService.getValueTotal(leafNodesByTopIds, true));
|
topVo.setValueTotal(progressCategoryService.getValueTotal(leafNodesByTopIds, true).getCurrentValue());
|
||||||
} else {
|
} else {
|
||||||
topVo.setProgressTotal(BigDecimal.ZERO);
|
topVo.setProgressTotal(BigDecimal.ZERO);
|
||||||
topVo.setValueTotal(BigDecimal.ZERO);
|
topVo.setValueTotal(BigDecimal.ZERO);
|
||||||
@ -530,25 +531,38 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
Set<Long> projectIds = subProjects.stream().map(BusProject::getId).collect(Collectors.toSet());
|
Set<Long> projectIds = subProjects.stream().map(BusProject::getId).collect(Collectors.toSet());
|
||||||
projectIds.add(projectId);
|
projectIds.add(projectId);
|
||||||
// 获取对应进度
|
// 获取对应进度
|
||||||
PgsProgressCategory progressCategory = progressCategoryService.lambdaQuery()
|
List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery()
|
||||||
.in(PgsProgressCategory::getProjectId, projectIds)
|
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||||
.eq(PgsProgressCategory::getName, progressName)
|
.eq(PgsProgressCategory::getName, progressName)
|
||||||
.last("limit 1")
|
.list();
|
||||||
.one();
|
if (CollUtil.isEmpty(progressCategoryList)) {
|
||||||
if (progressCategory == null) {
|
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
Long topId = progressCategory.getId();
|
|
||||||
final List<String> gfcqName = List.of("场地平整", "桩基成孔", "桩基浇筑", "支架安装", "组件安装");
|
|
||||||
// 查出所有属于该顶级节点的子孙节点
|
// 查出所有属于该顶级节点的子孙节点
|
||||||
List<PgsProgressCategory> allChildren = progressCategoryService.list(
|
LambdaQueryWrapper<PgsProgressCategory> lqw = new LambdaQueryWrapper<>();
|
||||||
Wrappers.<PgsProgressCategory>lambdaQuery()
|
List<PgsProgressCategory> allChildren;
|
||||||
.in(progressName.equals("光伏场区"), PgsProgressCategory::getName, gfcqName)
|
if (progressName.equals("光伏场区")) {
|
||||||
.and(wrapper ->
|
final List<String> gfcqName = List.of("场地平整", "桩基成孔", "桩基浇筑", "支架安装", "组件安装");
|
||||||
wrapper.like(PgsProgressCategory::getAncestors, "," + topId + ",")
|
List<Long> topIds = progressCategoryList.stream().map(PgsProgressCategory::getId).toList();
|
||||||
.or()
|
// 查出所有属于这些顶级节点的子孙节点
|
||||||
.like(PgsProgressCategory::getAncestors, "," + topId))
|
allChildren = progressCategoryService.list(
|
||||||
);
|
Wrappers.<PgsProgressCategory>lambdaQuery()
|
||||||
|
.in(!req.getIsAll(), PgsProgressCategory::getName, gfcqName)
|
||||||
|
.and(wrapper -> {
|
||||||
|
for (Long topId : topIds) {
|
||||||
|
wrapper.or(q -> q.like(PgsProgressCategory::getAncestors, "," + topId + ","))
|
||||||
|
.or(q -> q.like(PgsProgressCategory::getAncestors, "," + topId));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
PgsProgressCategory first = progressCategoryList.getFirst();
|
||||||
|
lqw.and(wrapper ->
|
||||||
|
wrapper.like(PgsProgressCategory::getAncestors, "," + first.getId() + ",")
|
||||||
|
.or()
|
||||||
|
.like(PgsProgressCategory::getAncestors, "," + first.getId()));
|
||||||
|
allChildren = progressCategoryService.list(lqw);
|
||||||
|
}
|
||||||
if (allChildren.isEmpty()) {
|
if (allChildren.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
@ -556,7 +570,6 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
Set<Long> parentIds = allChildren.stream()
|
Set<Long> parentIds = allChildren.stream()
|
||||||
.map(PgsProgressCategory::getParentId)
|
.map(PgsProgressCategory::getParentId)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
List<PgsProgressCategory> dierList = allChildren.stream()
|
List<PgsProgressCategory> dierList = allChildren.stream()
|
||||||
.filter(item -> !parentIds.contains(item.getId()))
|
.filter(item -> !parentIds.contains(item.getId()))
|
||||||
.toList();
|
.toList();
|
||||||
@ -568,6 +581,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
vo.setPlanProgress(c.getPlanTotal());
|
vo.setPlanProgress(c.getPlanTotal());
|
||||||
vo.setActualProgress(c.getCompleted());
|
vo.setActualProgress(c.getCompleted());
|
||||||
vo.setTotalProgress(c.getTotal());
|
vo.setTotalProgress(c.getTotal());
|
||||||
|
vo.setCompletionRate(BigDecimalUtil.toPercentage(c.getCompleted(), c.getTotal()));
|
||||||
return vo;
|
return vo;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
@ -575,26 +589,48 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
Set<Long> parentIds = allChildren.stream()
|
Set<Long> parentIds = allChildren.stream()
|
||||||
.map(PgsProgressCategory::getParentId)
|
.map(PgsProgressCategory::getParentId)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
List<PgsProgressCategory> dierList = allChildren.stream()
|
List<PgsProgressCategory> dierList = allChildren.stream()
|
||||||
.filter(item -> parentIds.contains(item.getId()))
|
.filter(item -> parentIds.contains(item.getId()))
|
||||||
.toList();
|
.toList();
|
||||||
|
List<ProjectImageProgressDetailVo> detailVoList = new ArrayList<>();
|
||||||
if (CollUtil.isEmpty(dierList)) {
|
if (CollUtil.isEmpty(dierList)) {
|
||||||
return allChildren.stream().map(c -> {
|
// 根据名称进行分类汇总
|
||||||
|
Map<String, List<PgsProgressCategory>> childrenMap = allChildren.stream()
|
||||||
|
.collect(Collectors.groupingBy(PgsProgressCategory::getName));
|
||||||
|
childrenMap.forEach((name, children) -> {
|
||||||
|
if (CollUtil.isEmpty(children)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
||||||
vo.setId(c.getId());
|
String unit = children.stream().map(PgsProgressCategory::getUnit)
|
||||||
vo.setUnit(c.getUnit());
|
.filter(Objects::nonNull)
|
||||||
vo.setProgressName(c.getName());
|
.findFirst().orElse(null);
|
||||||
vo.setPlanProgress(c.getPlanTotal());
|
vo.setUnit(unit);
|
||||||
vo.setActualProgress(c.getCompleted());
|
vo.setProgressName(name);
|
||||||
vo.setTotalProgress(c.getTotal());
|
BigDecimal plan = children.stream().map(PgsProgressCategory::getPlanTotal)
|
||||||
return vo;
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
}).toList();
|
vo.setPlanProgress(plan);
|
||||||
|
BigDecimal completed = children.stream().map(PgsProgressCategory::getCompleted)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setActualProgress(completed);
|
||||||
|
BigDecimal total = children.stream().map(PgsProgressCategory::getTotal)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setTotalProgress(total);
|
||||||
|
vo.setCompletionRate(BigDecimalUtil.toPercentage(completed, total));
|
||||||
|
detailVoList.add(vo);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return dierList.stream().map(c -> {
|
// 根据名称进行分类汇总
|
||||||
|
Map<String, List<PgsProgressCategory>> dierMap = dierList.stream()
|
||||||
|
.collect(Collectors.groupingBy(PgsProgressCategory::getName));
|
||||||
|
dierMap.forEach((name, value) -> {
|
||||||
|
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
||||||
|
Set<Long> parentIdSet = value.stream()
|
||||||
|
.map(PgsProgressCategory::getId)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
// 获取子集
|
// 获取子集
|
||||||
List<PgsProgressCategory> children = allChildren.stream()
|
List<PgsProgressCategory> children = allChildren.stream()
|
||||||
.filter(item -> item.getParentId().equals(c.getId()))
|
.filter(item -> parentIdSet.contains(item.getParentId()))
|
||||||
.toList();
|
.toList();
|
||||||
// 计算
|
// 计算
|
||||||
BigDecimal plan = children.stream().map(PgsProgressCategory::getPlanTotal)
|
BigDecimal plan = children.stream().map(PgsProgressCategory::getPlanTotal)
|
||||||
@ -603,16 +639,19 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
BigDecimal total = children.stream().map(PgsProgressCategory::getTotal)
|
BigDecimal total = children.stream().map(PgsProgressCategory::getTotal)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
|
||||||
vo.setId(c.getId());
|
|
||||||
vo.setUnit(c.getUnit());
|
|
||||||
vo.setProgressName(c.getName());
|
|
||||||
vo.setPlanProgress(plan);
|
vo.setPlanProgress(plan);
|
||||||
vo.setActualProgress(actual);
|
vo.setActualProgress(actual);
|
||||||
vo.setTotalProgress(total);
|
vo.setTotalProgress(total);
|
||||||
return vo;
|
vo.setProgressName(name);
|
||||||
}).toList();
|
String unit = value.stream().map(PgsProgressCategory::getUnit)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.findFirst().orElse(null);
|
||||||
|
vo.setUnit(unit);
|
||||||
|
vo.setCompletionRate(BigDecimalUtil.toPercentage(actual, total));
|
||||||
|
detailVoList.add(vo);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
return detailVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -94,6 +94,7 @@ public class SysRoleWorkServiceImpl extends ServiceImpl<SysRoleWorkMapper, SysRo
|
|||||||
LambdaQueryWrapper<SysRoleWork> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<SysRoleWork> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByDesc(SysRoleWork::getCreateTime);
|
lqw.orderByDesc(SysRoleWork::getCreateTime);
|
||||||
lqw.eq(bo.getRoleId() != null, SysRoleWork::getRoleId, bo.getRoleId());
|
lqw.eq(bo.getRoleId() != null, SysRoleWork::getRoleId, bo.getRoleId());
|
||||||
|
lqw.eq(bo.getProjectId() != null, SysRoleWork::getProjectId, bo.getProjectId());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getLcmc()), SysRoleWork::getLcmc, bo.getLcmc());
|
lqw.eq(StringUtils.isNotBlank(bo.getLcmc()), SysRoleWork::getLcmc, bo.getLcmc());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getLcms()), SysRoleWork::getLcms, bo.getLcms());
|
lqw.eq(StringUtils.isNotBlank(bo.getLcms()), SysRoleWork::getLcms, bo.getLcms());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getLcxq()), SysRoleWork::getLcxq, bo.getLcxq());
|
lqw.eq(StringUtils.isNotBlank(bo.getLcxq()), SysRoleWork::getLcxq, bo.getLcxq());
|
||||||
@ -243,56 +244,52 @@ public class SysRoleWorkServiceImpl extends ServiceImpl<SysRoleWorkMapper, SysRo
|
|||||||
// 获取当前登录用户的所有项目及对应所有角色
|
// 获取当前登录用户的所有项目及对应所有角色
|
||||||
List<SysUserRole> allRoleList = baseMapper.getAllRoleList(userId);
|
List<SysUserRole> allRoleList = baseMapper.getAllRoleList(userId);
|
||||||
|
|
||||||
//初始化
|
|
||||||
// LambdaQueryWrapper<SysRoleWork> lqw = new LambdaQueryWrapper<>();
|
|
||||||
|
|
||||||
List<BusProjectVo> busProjectVoList = new ArrayList<>();
|
List<BusProjectVo> busProjectVoList = new ArrayList<>();
|
||||||
|
|
||||||
//获取到该用户所有有流程的项目 说明在该项目下该用户有角色有所属流程
|
//获取到该用户所有有流程的项目 说明在该项目下该用户有角色有所属流程
|
||||||
for (SysUserRole sysUserRole : allRoleList) {
|
for (SysUserRole sysUserRole : allRoleList) {
|
||||||
// lqw.clear();
|
// 检查该项目下该角色是否有流程配置
|
||||||
// lqw.eq(SysRoleWork::getProjectId,sysUserRole.getProjectId());
|
LambdaQueryWrapper<SysRoleWork> lqw = new LambdaQueryWrapper<>();
|
||||||
// lqw.eq(SysRoleWork::getRoleId, sysUserRole.getRoleId());
|
lqw.eq(SysRoleWork::getRoleId, sysUserRole.getRoleId());
|
||||||
// SysRoleWork one = getOne(lqw);
|
lqw.eq(SysRoleWork::getProjectId, sysUserRole.getProjectId());
|
||||||
// if (one != null){
|
List<SysRoleWork> list = list(lqw);
|
||||||
// //先拿到该项目
|
|
||||||
// BusProjectQueryReq req = new BusProjectQueryReq();
|
// 只有当存在流程配置时才添加项目
|
||||||
// req.setId(sysUserRole.getProjectId());
|
if (list != null && !list.isEmpty()) {
|
||||||
// List<BusProjectVo> vos = projectService.queryList(req);
|
//这个用户的项目 有流程的角色 才会进入这里
|
||||||
// if (vos != null && !vos.isEmpty()){
|
BusProjectQueryReq req = new BusProjectQueryReq();
|
||||||
// if(!busProjectVoList.contains(vos.getFirst())){
|
req.setId(sysUserRole.getProjectId());
|
||||||
// busProjectVoList.add(vos.getFirst());
|
List<BusProjectVo> vos = projectService.queryList(req);
|
||||||
// }
|
//把这个用户有角色并且有流程的项目添加到列表中
|
||||||
// }
|
if (vos != null && !vos.isEmpty()){
|
||||||
// }
|
if(!busProjectVoList.contains(vos.getFirst())){
|
||||||
BusProjectQueryReq req = new BusProjectQueryReq();
|
busProjectVoList.add(vos.getFirst());
|
||||||
req.setId(sysUserRole.getProjectId());
|
}
|
||||||
List<BusProjectVo> vos = projectService.queryList(req);
|
|
||||||
if (vos != null && !vos.isEmpty()){
|
|
||||||
if(!busProjectVoList.contains(vos.getFirst())){
|
|
||||||
busProjectVoList.add(vos.getFirst());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//遍历
|
//遍历反查
|
||||||
List<SysRoleVo> roleVos;
|
List<SysRoleVo> roleVos;
|
||||||
for (BusProjectVo projectVo : busProjectVoList) {
|
for (BusProjectVo projectVo : busProjectVoList) {
|
||||||
roleVos = new ArrayList<>();
|
roleVos = new ArrayList<>();
|
||||||
//通过项目查找所有角色
|
List<SysUserRole> roleList = baseMapper.getRoleList(userId, projectVo.getId());
|
||||||
LambdaQueryWrapper<SysRoleWork> lqw1 = new LambdaQueryWrapper<>();
|
for (SysUserRole userRole : roleList) {
|
||||||
lqw1.eq(SysRoleWork::getProjectId,projectVo.getId());
|
LambdaQueryWrapper<SysRoleWork> lqw = new LambdaQueryWrapper<>();
|
||||||
//获取角色
|
lqw.eq(SysRoleWork::getRoleId, userRole.getRoleId());
|
||||||
List<SysRoleWork> roleWorkList = list(lqw1);
|
lqw.eq(SysRoleWork::getProjectId,projectVo.getId());
|
||||||
for (SysRoleWork sysRoleWork : roleWorkList) {
|
List<SysRoleWork> list = list(lqw);
|
||||||
SysRoleVo sysRoleVo = roleService.selectRoleById(sysRoleWork.getRoleId());
|
for (SysRoleWork roleWork : list) {
|
||||||
if (sysRoleVo != null){
|
SysRoleVo roleVo = roleService.selectRoleById(roleWork.getRoleId());
|
||||||
roleVos.add(sysRoleVo);
|
if (roleVo != null){
|
||||||
|
roleVos.add(roleVo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
projectVo.setRoleVos(roleVos);
|
projectVo.setRoleVos(roleVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return busProjectVoList;
|
return busProjectVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudBoxChangeBo;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.vo.BudBoxChangeVo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.service.IBudBoxChangeService;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/boxChange")
|
||||||
|
public class BudBoxChangeController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudBoxChangeService budBoxChangeService;
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前项目的方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:list")
|
||||||
|
@GetMapping("/list/matrix")
|
||||||
|
public R<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询箱变列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudBoxChangeVo> list(BudBoxChangeBo bo, PageQuery pageQuery) {
|
||||||
|
return budBoxChangeService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出箱变列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:export")
|
||||||
|
@Log(title = "箱变", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudBoxChangeBo bo, HttpServletResponse response) {
|
||||||
|
List<BudBoxChangeVo> list = budBoxChangeService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "箱变", BudBoxChangeVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取箱变详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudBoxChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budBoxChangeService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增箱变
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:add")
|
||||||
|
@Log(title = "箱变", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudBoxChangeBo bo) {
|
||||||
|
return toAjax(budBoxChangeService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改箱变
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:edit")
|
||||||
|
@Log(title = "箱变", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudBoxChangeBo bo) {
|
||||||
|
return toAjax(budBoxChangeService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除箱变
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:remove")
|
||||||
|
@Log(title = "箱变", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budBoxChangeService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,141 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudDesignDrawingBo;
|
||||||
|
import org.dromara.build.domain.dto.BudCreateByLayerReq;
|
||||||
|
import org.dromara.build.domain.dto.BudDesignDrawingQueryBuildReq;
|
||||||
|
import org.dromara.build.domain.dto.BudDesignDrawingUploadReq;
|
||||||
|
import org.dromara.build.domain.vo.BudDesignDrawingByBuildVo;
|
||||||
|
import org.dromara.build.domain.vo.BudDesignDrawingVo;
|
||||||
|
import org.dromara.build.service.IBudDesignDrawingService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.manager.cadmanager.vo.CadLayerListVo;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工设计图
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/designDrawing")
|
||||||
|
public class BudDesignDrawingController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudDesignDrawingService budDesignDrawingService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工设计图列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudDesignDrawingVo> list(BudDesignDrawingBo bo, PageQuery pageQuery) {
|
||||||
|
return budDesignDrawingService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工设计图详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudDesignDrawingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budDesignDrawingService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图层列表
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:query")
|
||||||
|
@GetMapping("/getLayerList/{id}")
|
||||||
|
public R<List<CadLayerListVo>> getLayerList(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budDesignDrawingService.getLayerList(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 CAD 图层信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:query")
|
||||||
|
@GetMapping("/getCadInfo")
|
||||||
|
public R<String> getCadInfo(Long id, String layerName) {
|
||||||
|
return R.ok("操作成功", budDesignDrawingService.getDateByLayerName(id, layerName));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的建筑列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:list")
|
||||||
|
@GetMapping("/buildList")
|
||||||
|
public R<List<BudDesignDrawingByBuildVo>> queryBuildList(BudDesignDrawingQueryBuildReq req) {
|
||||||
|
return R.ok(budDesignDrawingService.queryBuildList(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工设计图
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:add")
|
||||||
|
@Log(title = "施工设计图", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@RequestParam("file") MultipartFile file, @Validated BudDesignDrawingUploadReq req) {
|
||||||
|
return toAjax(budDesignDrawingService.insertByCadFile(file, req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量创建
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:add")
|
||||||
|
@Log(title = "施工设计图", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/layer")
|
||||||
|
public R<Void> addBuildByLayer(@RequestBody @Validated BudCreateByLayerReq req) {
|
||||||
|
return toAjax(budDesignDrawingService.insertByLayers(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工设计图
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:edit")
|
||||||
|
@Log(title = "施工设计图", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudDesignDrawingBo bo) {
|
||||||
|
return toAjax(budDesignDrawingService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除施工设计图
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:remove")
|
||||||
|
@Log(title = "施工设计图", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budDesignDrawingService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudInverterBo;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.vo.BudInverterVo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.service.IBudInverterService;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/inverter")
|
||||||
|
public class BudInverterController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudInverterService budInverterService;
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前项目的方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:list")
|
||||||
|
@GetMapping("/list/matrix")
|
||||||
|
public R<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询逆变器列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudInverterVo> list(BudInverterBo bo, PageQuery pageQuery) {
|
||||||
|
return budInverterService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出逆变器列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:export")
|
||||||
|
@Log(title = "逆变器", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudInverterBo bo, HttpServletResponse response) {
|
||||||
|
List<BudInverterVo> list = budInverterService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "逆变器", BudInverterVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取逆变器详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudInverterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budInverterService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增逆变器
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:add")
|
||||||
|
@Log(title = "逆变器", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudInverterBo bo) {
|
||||||
|
return toAjax(budInverterService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改逆变器
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:edit")
|
||||||
|
@Log(title = "逆变器", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudInverterBo bo) {
|
||||||
|
return toAjax(budInverterService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除逆变器
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:remove")
|
||||||
|
@Log(title = "逆变器", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budInverterService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/matrix")
|
||||||
|
public class BudMatrixController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudMatrixVo> list(BudMatrixBo bo, PageQuery pageQuery) {
|
||||||
|
return budMatrixService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:export")
|
||||||
|
@Log(title = "方阵", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudMatrixBo bo, HttpServletResponse response) {
|
||||||
|
List<BudMatrixVo> list = budMatrixService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "方阵", BudMatrixVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取方阵详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudMatrixVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budMatrixService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增方阵
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:add")
|
||||||
|
@Log(title = "方阵", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudMatrixBo bo) {
|
||||||
|
return toAjax(budMatrixService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改方阵
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:edit")
|
||||||
|
@Log(title = "方阵", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudMatrixBo bo) {
|
||||||
|
return toAjax(budMatrixService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除方阵
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:remove")
|
||||||
|
@Log(title = "方阵", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budMatrixService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.bo.BudPillarPointBo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.domain.vo.BudPillarPointVo;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.build.service.IBudPillarPointService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/pillarPoint")
|
||||||
|
public class BudPillarPointController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudPillarPointService budPillarPointService;
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前项目的方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:list")
|
||||||
|
@GetMapping("/list/matrix")
|
||||||
|
public R<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板桩点列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudPillarPointVo> list(BudPillarPointBo bo, PageQuery pageQuery) {
|
||||||
|
return budPillarPointService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出光伏板桩点列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:export")
|
||||||
|
@Log(title = "光伏板桩点", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudPillarPointBo bo, HttpServletResponse response) {
|
||||||
|
List<BudPillarPointVo> list = budPillarPointService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板桩点", BudPillarPointVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板桩点详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudPillarPointVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budPillarPointService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增光伏板桩点
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:add")
|
||||||
|
@Log(title = "光伏板桩点", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudPillarPointBo bo) {
|
||||||
|
return toAjax(budPillarPointService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改光伏板桩点
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:edit")
|
||||||
|
@Log(title = "光伏板桩点", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudPillarPointBo bo) {
|
||||||
|
return toAjax(budPillarPointService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除光伏板桩点
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:remove")
|
||||||
|
@Log(title = "光伏板桩点", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budPillarPointService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.build.domain.vo.BudRedLineVo;
|
||||||
|
import org.dromara.build.domain.bo.BudRedLineBo;
|
||||||
|
import org.dromara.build.service.IBudRedLineService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/redLine")
|
||||||
|
public class BudRedLineController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudRedLineService budRedLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询红线列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudRedLineVo> list(BudRedLineBo bo, PageQuery pageQuery) {
|
||||||
|
return budRedLineService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出红线列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:export")
|
||||||
|
@Log(title = "红线", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudRedLineBo bo, HttpServletResponse response) {
|
||||||
|
List<BudRedLineVo> list = budRedLineService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "红线", BudRedLineVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取红线详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudRedLineVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budRedLineService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增红线
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:add")
|
||||||
|
@Log(title = "红线", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudRedLineBo bo) {
|
||||||
|
return toAjax(budRedLineService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改红线
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:edit")
|
||||||
|
@Log(title = "红线", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudRedLineBo bo) {
|
||||||
|
return toAjax(budRedLineService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除红线
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:remove")
|
||||||
|
@Log(title = "红线", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budRedLineService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.bo.BudSolarPanelBo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.domain.vo.BudSolarPanelVo;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.build.service.IBudSolarPanelService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/solarPanel")
|
||||||
|
public class BudSolarPanelController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudSolarPanelService budSolarPanelService;
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前项目的方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:list")
|
||||||
|
@GetMapping("/list/matrix")
|
||||||
|
public R<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudSolarPanelVo> list(BudSolarPanelBo bo, PageQuery pageQuery) {
|
||||||
|
return budSolarPanelService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出光伏板列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:export")
|
||||||
|
@Log(title = "光伏板", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudSolarPanelBo bo, HttpServletResponse response) {
|
||||||
|
List<BudSolarPanelVo> list = budSolarPanelService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板", BudSolarPanelVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudSolarPanelVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budSolarPanelService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增光伏板
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:add")
|
||||||
|
@Log(title = "光伏板", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudSolarPanelBo bo) {
|
||||||
|
return toAjax(budSolarPanelService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改光伏板
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:edit")
|
||||||
|
@Log(title = "光伏板", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudSolarPanelBo bo) {
|
||||||
|
return toAjax(budSolarPanelService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除光伏板
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:remove")
|
||||||
|
@Log(title = "光伏板", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budSolarPanelService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.bo.BudStandColumnBo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.domain.vo.BudStandColumnVo;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.build.service.IBudStandColumnService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/standColumn")
|
||||||
|
public class BudStandColumnController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudStandColumnService budStandColumnService;
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前项目的方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:list")
|
||||||
|
@GetMapping("/list/matrix")
|
||||||
|
public R<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板立柱列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudStandColumnVo> list(BudStandColumnBo bo, PageQuery pageQuery) {
|
||||||
|
return budStandColumnService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出光伏板立柱列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:export")
|
||||||
|
@Log(title = "光伏板立柱", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudStandColumnBo bo, HttpServletResponse response) {
|
||||||
|
List<BudStandColumnVo> list = budStandColumnService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板立柱", BudStandColumnVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板立柱详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudStandColumnVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budStandColumnService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增光伏板立柱
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:add")
|
||||||
|
@Log(title = "光伏板立柱", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudStandColumnBo bo) {
|
||||||
|
return toAjax(budStandColumnService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改光伏板立柱
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:edit")
|
||||||
|
@Log(title = "光伏板立柱", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudStandColumnBo bo) {
|
||||||
|
return toAjax(budStandColumnService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除光伏板立柱
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:remove")
|
||||||
|
@Log(title = "光伏板立柱", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budStandColumnService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.build.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.build.domain.bo.BudMatrixBo;
|
||||||
|
import org.dromara.build.domain.bo.BudSupportFrameBo;
|
||||||
|
import org.dromara.build.domain.vo.BudMatrixVo;
|
||||||
|
import org.dromara.build.domain.vo.BudSupportFrameVo;
|
||||||
|
import org.dromara.build.service.IBudMatrixService;
|
||||||
|
import org.dromara.build.service.IBudSupportFrameService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/supportFrame")
|
||||||
|
public class BudSupportFrameController extends BaseController {
|
||||||
|
|
||||||
|
private final IBudSupportFrameService budSupportFrameService;
|
||||||
|
|
||||||
|
private final IBudMatrixService budMatrixService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前项目的方阵列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:list")
|
||||||
|
@GetMapping("/list/matrix")
|
||||||
|
public R<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板支架列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudSupportFrameVo> list(BudSupportFrameBo bo, PageQuery pageQuery) {
|
||||||
|
return budSupportFrameService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出光伏板支架列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:export")
|
||||||
|
@Log(title = "光伏板支架", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BudSupportFrameBo bo, HttpServletResponse response) {
|
||||||
|
List<BudSupportFrameVo> list = budSupportFrameService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板支架", BudSupportFrameVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板支架详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudSupportFrameVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budSupportFrameService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增光伏板支架
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:add")
|
||||||
|
@Log(title = "光伏板支架", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BudSupportFrameBo bo) {
|
||||||
|
return toAjax(budSupportFrameService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改光伏板支架
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:edit")
|
||||||
|
@Log(title = "光伏板支架", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BudSupportFrameBo bo) {
|
||||||
|
return toAjax(budSupportFrameService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除光伏板支架
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:remove")
|
||||||
|
@Log(title = "光伏板支架", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budSupportFrameService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变对象 bud_box_change
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_box_change")
|
||||||
|
public class BudBoxChange extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工设计图对象 bud_design_drawing
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_design_drawing")
|
||||||
|
public class BudDesignDrawing extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原始坐标
|
||||||
|
*/
|
||||||
|
private String originalCoordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目标坐标
|
||||||
|
*/
|
||||||
|
private String targetCoordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸内容id
|
||||||
|
*/
|
||||||
|
private Long contentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器对象 bud_inverter
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_inverter")
|
||||||
|
public class BudInverter extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵对象 bud_matrix
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_matrix")
|
||||||
|
public class BudMatrix extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点对象 bud_pillar_point
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_pillar_point")
|
||||||
|
public class BudPillarPoint extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线对象 bud_red_line
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_red_line")
|
||||||
|
public class BudRedLine extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板对象 bud_solar_panel
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_solar_panel")
|
||||||
|
public class BudSolarPanel extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱对象 bud_stand_column
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_stand_column")
|
||||||
|
public class BudStandColumn extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.build.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架对象 bud_support_frame
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bud_support_frame")
|
||||||
|
public class BudSupportFrame extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudBoxChange;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变业务对象 bud_box_change
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudBoxChange.class, reverseConvertGenerate = false)
|
||||||
|
public class BudBoxChangeBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -4940923241574282402L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "箱变名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudDesignDrawing;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工设计图业务对象 bud_design_drawing
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudDesignDrawing.class, reverseConvertGenerate = false)
|
||||||
|
public class BudDesignDrawingBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 6136425836411124454L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键id不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原始坐标
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "原始坐标不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String originalCoordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目标坐标
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目标坐标不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String targetCoordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸内容id
|
||||||
|
*/
|
||||||
|
private Long contentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudInverter;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器业务对象 bud_inverter
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudInverter.class, reverseConvertGenerate = false)
|
||||||
|
public class BudInverterBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -1438440436310354057L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "逆变器名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudMatrix;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵业务对象 bud_matrix
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudMatrix.class, reverseConvertGenerate = false)
|
||||||
|
public class BudMatrixBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 6181989661041512249L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "方阵名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudPillarPoint;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点业务对象 bud_pillar_point
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudPillarPoint.class, reverseConvertGenerate = false)
|
||||||
|
public class BudPillarPointBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -5975142661197342615L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "光伏板桩点名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板桩点位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudRedLine;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线业务对象 bud_red_line
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudRedLine.class, reverseConvertGenerate = false)
|
||||||
|
public class BudRedLineBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -3256147550957831683L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "红线名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudSolarPanel;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板业务对象 bud_solar_panel
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudSolarPanel.class, reverseConvertGenerate = false)
|
||||||
|
public class BudSolarPanelBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -9153701188407485879L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "光伏板名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudStandColumn;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱业务对象 bud_stand_column
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudStandColumn.class, reverseConvertGenerate = false)
|
||||||
|
public class BudStandColumnBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 7837368925016777082L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "光伏板立柱名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板立柱位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.build.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.build.domain.BudSupportFrame;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架业务对象 bud_support_frame
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BudSupportFrame.class, reverseConvertGenerate = false)
|
||||||
|
public class BudSupportFrameBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -8643204138200023768L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "光伏板支架名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板支架位置
|
||||||
|
*/
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package org.dromara.build.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18 16:24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BudCreateByLayerReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4077800961049334482L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目 id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目 id 不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
@NotNull(message = "位置不能为空")
|
||||||
|
private List<String> locationLayers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private List<String> nameLayers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计图 id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "设计图 id 不能为空")
|
||||||
|
private Long designDrawingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "类型不能为空")
|
||||||
|
private String type;
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package org.dromara.build.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-20 15:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BudDesignDrawingQueryBuildReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1193895566884510811L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目 id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "类型不能为空")
|
||||||
|
private String buildType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵 id
|
||||||
|
*/
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package org.dromara.build.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18 14:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BudDesignDrawingUploadReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1104479933568403891L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原始坐标
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "原始坐标不能为空")
|
||||||
|
private String originalCoordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目标坐标
|
||||||
|
*/
|
||||||
|
private String targetCoordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package org.dromara.build.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19 19:11
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum BudCoordinateTypeEnum {
|
||||||
|
|
||||||
|
POINT("Point", 1),
|
||||||
|
LINE_STRING("LineString", 2),
|
||||||
|
POLYGON("Polygon", 3);
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
|
||||||
|
BudCoordinateTypeEnum(String text, int value) {
|
||||||
|
this.text = text;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据 value 获取对应的 text
|
||||||
|
public static String getTextByValue(int value) {
|
||||||
|
for (BudCoordinateTypeEnum type : values()) {
|
||||||
|
if (type.getValue() == value) {
|
||||||
|
return type.getText();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
package org.dromara.build.domain.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19 09:23
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum BudDesignType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵
|
||||||
|
*/
|
||||||
|
SQUARE_MATRIX("方阵", "1"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板
|
||||||
|
*/
|
||||||
|
SOLAR_PANEL("光伏板", "2"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逆变器
|
||||||
|
*/
|
||||||
|
INVERTER("逆变器", "3"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变
|
||||||
|
*/
|
||||||
|
BOX_CHANGE("箱变", "4"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红线
|
||||||
|
*/
|
||||||
|
RED_LINE("红线", "5"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 桩点
|
||||||
|
*/
|
||||||
|
PILLAR_POINT("桩点", "6"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 立柱
|
||||||
|
*/
|
||||||
|
STAND_COLUMN("立柱", "7"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支架
|
||||||
|
*/
|
||||||
|
SUPPORT_FRAME("支架", "8");
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 value 获取对应的枚举
|
||||||
|
*
|
||||||
|
* @param value 枚举值
|
||||||
|
* @return 枚举
|
||||||
|
*/
|
||||||
|
public static BudDesignType getEnumByValue(String value) {
|
||||||
|
for (BudDesignType type : values()) {
|
||||||
|
if (Objects.equals(type.getValue(), value)) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package org.dromara.build.domain.geojson;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/4/24 17:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class BudFeature implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -6103275857879306244L;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private BudGeometry geometry;
|
||||||
|
|
||||||
|
private BudProperties properties;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.build.domain.geojson;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/4/24 17:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class BudGeoJson {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private List<BudFeature> features;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package org.dromara.build.domain.geojson;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/4/24 17:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class BudGeometry implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -2582318447932685848L;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private List<Object> coordinates;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package org.dromara.build.domain.geojson;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/4/24 10:53
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class BudProperties implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -2997401596985220109L;
|
||||||
|
|
||||||
|
private String layer_name;
|
||||||
|
|
||||||
|
private String text_value;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
package org.dromara.build.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.build.domain.BudBoxChange;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变视图对象 bud_box_change
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BudBoxChange.class)
|
||||||
|
public class BudBoxChangeVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方阵id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "方阵id")
|
||||||
|
private Long matrixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "箱变名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱变位置
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "箱变位置")
|
||||||
|
private String positions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报")
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "完成时间")
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "进度类型id")
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "进度类别名称")
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.build.domain.vo;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.build.domain.enums.BudCoordinateTypeEnum;
|
||||||
|
import org.dromara.common.utils.JsonDimensionUtil;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-19 10:23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BudDesignDrawingByBuildVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -6627665214684476187L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
private JSONArray positionList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 坐标类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成状态(0未开始 1进行中 2完成)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成类型(1手动填报 2AI填报)
|
||||||
|
*/
|
||||||
|
private String finishType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate finishDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类型id
|
||||||
|
*/
|
||||||
|
private Long progressCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度类别名称
|
||||||
|
*/
|
||||||
|
private String progressCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对象转vo
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @param name 名称
|
||||||
|
* @param positions 位置字符串
|
||||||
|
* @param status 完成状态(0未开始 1进行中 2完成)
|
||||||
|
* @return BudDesignDrawingByBuildVo
|
||||||
|
*/
|
||||||
|
public static BudDesignDrawingByBuildVo obj2vo(Long id, String name, String positions, String finishType, LocalDate finishDate,
|
||||||
|
String status, Long progressCategoryId, String progressCategoryName) {
|
||||||
|
BudDesignDrawingByBuildVo vo = new BudDesignDrawingByBuildVo();
|
||||||
|
vo.setId(id);
|
||||||
|
vo.setName(name);
|
||||||
|
vo.setFinishType(finishType);
|
||||||
|
vo.setFinishDate(finishDate);
|
||||||
|
vo.setProgressCategoryId(progressCategoryId);
|
||||||
|
vo.setProgressCategoryName(progressCategoryName);
|
||||||
|
JSONArray positionList = JSONUtil.parseArray(positions);
|
||||||
|
vo.setPositionList(positionList);
|
||||||
|
vo.setStatus(status);
|
||||||
|
int depth = JsonDimensionUtil.getJsonArrayDepth(positionList);
|
||||||
|
if (depth == 2) {
|
||||||
|
// 第一个坐标
|
||||||
|
JSONArray first = positionList.getJSONArray(0);
|
||||||
|
// 最后一个坐标
|
||||||
|
JSONArray last = positionList.getJSONArray(positionList.size() - 1);
|
||||||
|
// 判断是否相同(按坐标值)
|
||||||
|
boolean same = first.size() == last.size()
|
||||||
|
&& Objects.equals(first.get(0), last.get(0))
|
||||||
|
&& Objects.equals(first.get(1), last.get(1));
|
||||||
|
depth = same ? 3 : 2;
|
||||||
|
}
|
||||||
|
vo.setType(BudCoordinateTypeEnum.getTextByValue(depth));
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user