Compare commits
1 Commits
updateMenu
...
flowUpdate
| Author | SHA1 | Date | |
|---|---|---|---|
| f6e01abe0e |
1
xinnengyuan/.gitignore
vendored
1
xinnengyuan/.gitignore
vendored
@ -54,4 +54,3 @@ 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.7.4</warm-flow.version>
|
<warm-flow.version>1.8.2</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,15 +86,6 @@
|
|||||||
<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,8 +5,6 @@ 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;
|
||||||
@ -78,7 +76,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(parseData(smsResponse));
|
return R.fail(smsResponse.getData().toString());
|
||||||
}
|
}
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -142,35 +140,4 @@ 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: qwen3-max
|
model: qwen-plus
|
||||||
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?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://192.168.110.2:13386/xinnengyuandev-update?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: xinnengyuandev
|
username: xinnengyuandev-update
|
||||||
password: StRWCZdZirysNSs2
|
password: cp7cAbWLZnRc6wyp
|
||||||
# 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,14 +368,3 @@ 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
|
|
||||||
|
|||||||
@ -41,10 +41,10 @@ snail-job:
|
|||||||
spring:
|
spring:
|
||||||
ai:
|
ai:
|
||||||
dashscope:
|
dashscope:
|
||||||
api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
|
api-key: xxx
|
||||||
chat:
|
chat:
|
||||||
options:
|
options:
|
||||||
model: qwen3-max
|
model: qwen-plus
|
||||||
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,14 +343,3 @@ 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
|
|
||||||
|
|||||||
@ -1,356 +0,0 @@
|
|||||||
# 开发环境配置
|
|
||||||
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: 17077
|
|
||||||
# rabbitmq 配置
|
|
||||||
rabbitmq:
|
|
||||||
exchange-name: menu-normal-exchange
|
|
||||||
queue-name: menu-normal-queue
|
|
||||||
routing-key: menu.normal.routing.key
|
|
||||||
delay-exchange-name: menu-delay-queue
|
|
||||||
delay-queue-name: menu-delay-exchange
|
|
||||||
delay-routing-key: menu.delay.routing.key
|
|
||||||
dead-letter-exchange: menu-dlx-exchange
|
|
||||||
dead-letter-queue: menu-dlx-queue
|
|
||||||
dead-letter-routing-key: menu.dlx.routing.key
|
|
||||||
@ -358,14 +358,3 @@ 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
|
|
||||||
|
|||||||
@ -76,9 +76,9 @@ spring:
|
|||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 1024MB
|
max-file-size: 200MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 1024MB
|
max-request-size: 200MB
|
||||||
mvc:
|
mvc:
|
||||||
# 设置静态资源路径 防止所有请求都去查静态资源
|
# 设置静态资源路径 防止所有请求都去查静态资源
|
||||||
static-path-pattern: /static/**
|
static-path-pattern: /static/**
|
||||||
@ -95,13 +95,7 @@ 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名称)
|
||||||
@ -115,7 +109,7 @@ sa-token:
|
|||||||
# token有效期,单位s 默认30天, -1代表永不过期
|
# token有效期,单位s 默认30天, -1代表永不过期
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||||
active-timeout: 2592000
|
active-timeout: 86400
|
||||||
# 同一账号最大登录数量,-1代表不限
|
# 同一账号最大登录数量,-1代表不限
|
||||||
max-login-count: -1
|
max-login-count: -1
|
||||||
|
|
||||||
@ -182,7 +176,7 @@ mybatis-plus:
|
|||||||
# 数据加密
|
# 数据加密
|
||||||
mybatis-encryptor:
|
mybatis-encryptor:
|
||||||
# 是否开启加密
|
# 是否开启加密
|
||||||
enable: true
|
enable: false
|
||||||
# 默认加密算法
|
# 默认加密算法
|
||||||
algorithm: BASE64
|
algorithm: BASE64
|
||||||
# 编码方式 BASE64/HEX。默认BASE64
|
# 编码方式 BASE64/HEX。默认BASE64
|
||||||
@ -311,12 +305,6 @@ 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
|
|
||||||
# knife4j的增强配置,不需要增强可以不配
|
# knife4j的增强配置,不需要增强可以不配
|
||||||
knife4j:
|
knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@ -1,23 +1,14 @@
|
|||||||
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
|
||||||
@ -30,12 +21,6 @@ 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));
|
||||||
@ -46,39 +31,4 @@ 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,18 +59,6 @@ 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异步执行异常处理
|
* 异步执行异常处理
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
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,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -30,11 +31,21 @@ 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);
|
||||||
@ -42,4 +53,11 @@ 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,21 +52,23 @@ 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, Long> storageId,
|
Function<T, String> storageId,
|
||||||
Function<T, String> handlerCode,
|
Function<T, String> handlerCode,
|
||||||
Function<T, String> handlerName,
|
Function<T, String> handlerName,
|
||||||
Function<T, Long> groupName,
|
Function<T, String> groupName,
|
||||||
Function<T, Date> createTimeMapper) {
|
Function<T, Date> createTimeMapper) {
|
||||||
return sourceList.stream()
|
return sourceList.stream()
|
||||||
.map(item -> new TaskHandler(
|
.map(item -> new TaskHandler(
|
||||||
String.valueOf(storageId.apply(item)),
|
storageId.apply(item),
|
||||||
handlerCode.apply(item),
|
handlerCode.apply(item),
|
||||||
handlerName.apply(item),
|
handlerName.apply(item),
|
||||||
groupName != null ? String.valueOf(groupName.apply(item)) : null,
|
groupName.apply(item),
|
||||||
createTimeMapper.apply(item)
|
createTimeMapper.apply(item)
|
||||||
)).collect(Collectors.toList());
|
)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|||||||
@ -62,4 +62,10 @@ public class ProcessEvent implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Boolean submit;
|
private Boolean submit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实例id
|
||||||
|
*/
|
||||||
|
private Long instanceId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程办理监听
|
* 流程办理监听
|
||||||
@ -56,4 +57,14 @@ public class ProcessTaskEvent implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实例id
|
||||||
|
*/
|
||||||
|
private Long instanceId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办理参数
|
||||||
|
*/
|
||||||
|
private Map<String, Object> params;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
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;
|
||||||
@ -56,4 +57,8 @@ 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,6 +82,7 @@ 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);
|
||||||
|
|
||||||
@ -90,6 +91,15 @@ 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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
package org.dromara.common.core.service;
|
|
||||||
|
|
||||||
public interface XzdSjContractInfoService {
|
|
||||||
|
|
||||||
String selectNameByIds(String ids);
|
|
||||||
}
|
|
||||||
@ -7,7 +7,6 @@ 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;
|
||||||
@ -31,8 +30,10 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
|
return collection.stream()
|
||||||
|
.filter(function)
|
||||||
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
||||||
return collection.stream().filter(function).collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,13 +41,26 @@ public class StreamUtils {
|
|||||||
*
|
*
|
||||||
* @param collection 需要查询的集合
|
* @param collection 需要查询的集合
|
||||||
* @param function 过滤方法
|
* @param function 过滤方法
|
||||||
* @return 找到符合条件的第一个元素,没有则返回null
|
* @return 找到符合条件的第一个元素,没有则返回 Optional.empty()
|
||||||
*/
|
*/
|
||||||
public static <E> E findFirst(Collection<E> collection, Predicate<E> function) {
|
public static <E> Optional<E> findFirst(Collection<E> collection, Predicate<E> function) {
|
||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return null;
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
return collection.stream().filter(function).findFirst().orElse(null);
|
return collection.stream()
|
||||||
|
.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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,13 +68,26 @@ public class StreamUtils {
|
|||||||
*
|
*
|
||||||
* @param collection 需要查询的集合
|
* @param collection 需要查询的集合
|
||||||
* @param function 过滤方法
|
* @param function 过滤方法
|
||||||
* @return 找到符合条件的任意一个元素,没有则返回null
|
* @return 找到符合条件的任意一个元素,没有则返回 Optional.empty()
|
||||||
*/
|
*/
|
||||||
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().filter(function).findAny();
|
return collection.stream()
|
||||||
|
.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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +113,10 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
return collection.stream().map(function).filter(Objects::nonNull).collect(Collectors.joining(delimiter));
|
return collection.stream()
|
||||||
|
.map(function)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.joining(delimiter));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,8 +130,11 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
|
return collection.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.sorted(comparing)
|
||||||
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
||||||
return collection.stream().filter(Objects::nonNull).sorted(comparing).collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,7 +151,9 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream().filter(Objects::nonNull).collect(Collectors.toMap(key, Function.identity(), (l, r) -> l));
|
return collection.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toMap(key, Function.identity(), (l, r) -> l));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -137,7 +172,25 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection.stream().filter(Objects::nonNull).collect(Collectors.toMap(key, value, (l, r) -> l));
|
return collection.stream()
|
||||||
|
.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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,8 +207,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection
|
return collection.stream()
|
||||||
.stream().filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.groupingBy(key, LinkedHashMap::new, Collectors.toList()));
|
.collect(Collectors.groupingBy(key, LinkedHashMap::new, Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,8 +228,8 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection
|
return collection.stream()
|
||||||
.stream().filter(Objects::nonNull)
|
.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())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,11 +246,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) || key1 == null || key2 == null) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
return collection
|
return collection.stream()
|
||||||
.stream().filter(Objects::nonNull)
|
.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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,8 +268,7 @@ public class StreamUtils {
|
|||||||
if (CollUtil.isEmpty(collection)) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
return collection
|
return collection.stream()
|
||||||
.stream()
|
|
||||||
.map(function)
|
.map(function)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
// 注意此处不要使用 .toList() 新语法 因为返回的是不可变List 会导致序列化问题
|
||||||
@ -234,11 +286,10 @@ 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) || function == null) {
|
if (CollUtil.isEmpty(collection)) {
|
||||||
return CollUtil.newHashSet();
|
return CollUtil.newHashSet();
|
||||||
}
|
}
|
||||||
return collection
|
return collection.stream()
|
||||||
.stream()
|
|
||||||
.map(function)
|
.map(function)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
@ -258,26 +309,20 @@ 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 (MapUtil.isEmpty(map1) && MapUtil.isEmpty(map2)) {
|
if (CollUtil.isEmpty(map1) && CollUtil.isEmpty(map2)) {
|
||||||
|
// 如果两个 map 都为空,则直接返回空的 map
|
||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
} else if (MapUtil.isEmpty(map1)) {
|
} else if (CollUtil.isEmpty(map1)) {
|
||||||
map1 = MapUtil.newHashMap();
|
// 如果 map1 为空,则直接处理返回 map2
|
||||||
} else if (MapUtil.isEmpty(map2)) {
|
return toMap(map2.entrySet(), Map.Entry::getKey, entry -> merge.apply(null, entry.getValue()));
|
||||||
map2 = MapUtil.newHashMap();
|
} else if (CollUtil.isEmpty(map2)) {
|
||||||
|
// 如果 map2 为空,则直接处理返回 map1
|
||||||
|
return toMap(map1.entrySet(), Map.Entry::getKey, entry -> merge.apply(entry.getValue(), null));
|
||||||
}
|
}
|
||||||
Set<K> key = new HashSet<>();
|
Set<K> keySet = new HashSet<>();
|
||||||
key.addAll(map1.keySet());
|
keySet.addAll(map1.keySet());
|
||||||
key.addAll(map2.keySet());
|
keySet.addAll(map2.keySet());
|
||||||
Map<K, V> map = new HashMap<>();
|
return toMap(keySet, key -> key, key -> merge.apply(map1.get(key), map2.get(key)));
|
||||||
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,4 +351,14 @@ 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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,146 +0,0 @@
|
|||||||
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,6 +110,15 @@ 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);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,8 @@ public class ExcelReader {
|
|||||||
|
|
||||||
// 从MultipartFile获取输入流
|
// 从MultipartFile获取输入流
|
||||||
try (InputStream stream = file.getInputStream();
|
try (InputStream stream = file.getInputStream();
|
||||||
Workbook workbook = WorkbookFactory.create(stream)) {
|
org.apache.poi.ss.usermodel.Workbook workbook = isXlsx ?
|
||||||
|
new XSSFWorkbook(stream) : new HSSFWorkbook(stream)) {
|
||||||
|
|
||||||
for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
|
for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
|
||||||
org.apache.poi.ss.usermodel.Sheet sheet = workbook.getSheetAt(sheetIndex);
|
org.apache.poi.ss.usermodel.Sheet sheet = workbook.getSheetAt(sheetIndex);
|
||||||
|
|||||||
@ -91,7 +91,7 @@ public class PlusDataPermissionHandler {
|
|||||||
DataPermissionHelper.setVariable("user", currentUser);
|
DataPermissionHelper.setVariable("user", currentUser);
|
||||||
}
|
}
|
||||||
// 如果是超级管理员或租户管理员,则不过滤数据
|
// 如果是超级管理员或租户管理员,则不过滤数据
|
||||||
if (LoginHelper.isSuperAdmin()) {
|
if (LoginHelper.isSuperAdmin() || LoginHelper.isTenantAdmin()) {
|
||||||
return where;
|
return where;
|
||||||
}
|
}
|
||||||
// 构造数据过滤条件的 SQL 片段
|
// 构造数据过滤条件的 SQL 片段
|
||||||
|
|||||||
@ -82,10 +82,5 @@ 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";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
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,4 +14,3 @@ 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,10 +29,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<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,15 +25,14 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
public class DashScopeChat {
|
public class DashScopeChat {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DashScopeSimpleChat dashScopeSimpleChat;
|
private SimpleChat simpleChat;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IAIChatMemoryService chatMemoryService;
|
private IAIChatMemoryService chatMemoryService;
|
||||||
|
|
||||||
private final ChatClient chatClient;
|
private final ChatClient chatClient;
|
||||||
|
|
||||||
private static final String DEFAULT_PROMPT =
|
private static final String DEFAULT_PROMPT = "你叫煤球,是一个博学的智能聊天助手,请根据用户提问回答!";
|
||||||
"你是一名智能助手,代号为“煤球”。回答时不要提及自身身份或角色设定,除非用户主动询问;请直接提供清晰、准确、专业的回答。";
|
|
||||||
|
|
||||||
private static final String DEFAULT_FILE_DIR = System.getProperty("user.dir") + "/chat-memory";
|
private static final String DEFAULT_FILE_DIR = System.getProperty("user.dir") + "/chat-memory";
|
||||||
|
|
||||||
@ -67,8 +66,10 @@ 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);
|
||||||
});
|
});
|
||||||
@ -99,7 +100,7 @@ public class DashScopeChat {
|
|||||||
用户:%s
|
用户:%s
|
||||||
AI:%s
|
AI:%s
|
||||||
""", userMessage, aiResponse);
|
""", userMessage, aiResponse);
|
||||||
String title = dashScopeSimpleChat.doChat(prompt);
|
String title = simpleChat.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 DashScopeSimpleChat {
|
public class SimpleChat {
|
||||||
|
|
||||||
private final ChatClient dashScopeChatClient;
|
private final ChatClient dashScopeChatClient;
|
||||||
|
|
||||||
public DashScopeSimpleChat(ChatClient.Builder chatClientBuilder) {
|
public SimpleChat(ChatClient.Builder chatClientBuilder) {
|
||||||
this.dashScopeChatClient = chatClientBuilder
|
this.dashScopeChatClient = chatClientBuilder
|
||||||
// 设置 ChatClient 中 ChatModel 的 Options 参数
|
// 设置 ChatClient 中 ChatModel 的 Options 参数
|
||||||
.defaultOptions(
|
.defaultOptions(
|
||||||
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.dromara.ai.domain.AIChatMemory;
|
import org.dromara.ai.domain.AIChatMemory;
|
||||||
import org.dromara.ai.domain.dto.AIChatMemoryQueryReq;
|
import org.dromara.ai.domain.dto.AIChatMemoryQueryReq;
|
||||||
import org.dromara.ai.domain.dto.AIChatMemoryUpdateReq;
|
import org.dromara.ai.domain.dto.AIChatMemoryUpdateReq;
|
||||||
@ -14,15 +13,11 @@ import org.dromara.ai.service.IAIChatMemoryService;
|
|||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.core.utils.file.FileUtils;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -32,7 +27,6 @@ import java.util.List;
|
|||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-11-04
|
* @date 2025-11-04
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
|
||||||
@Service
|
@Service
|
||||||
public class AIChatMemoryServiceImpl extends ServiceImpl<AIChatMemoryMapper, AIChatMemory>
|
public class AIChatMemoryServiceImpl extends ServiceImpl<AIChatMemoryMapper, AIChatMemory>
|
||||||
implements IAIChatMemoryService {
|
implements IAIChatMemoryService {
|
||||||
@ -109,42 +103,9 @@ public class AIChatMemoryServiceImpl extends ServiceImpl<AIChatMemoryMapper, AIC
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
List<AIChatMemory> aiChatMemories = this.listByIds(ids);
|
if (isValid) {
|
||||||
if (aiChatMemories.size() != ids.size()) {
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
throw new ServiceException("数据不存在");
|
|
||||||
}
|
}
|
||||||
// 暂存文件路径
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
List<File> filesToDelete = new ArrayList<>();
|
|
||||||
for (AIChatMemory mem : aiChatMemories) {
|
|
||||||
if (StringUtils.isNotBlank(mem.getFileName())) {
|
|
||||||
File file = new File(System.getProperty("user.dir")
|
|
||||||
+ "/chat-memory/", mem.getFileName());
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 防止目录穿越
|
|
||||||
if (file.getCanonicalPath().startsWith(
|
|
||||||
new File(System.getProperty("user.dir") + "/chat-memory").getCanonicalPath())) {
|
|
||||||
filesToDelete.add(file);
|
|
||||||
} else {
|
|
||||||
log.warn("危险的 filename 路径被拒绝删除: {}", mem.getFileName());
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
log.warn("filename 获取失败: {}", mem.getFileName());
|
|
||||||
throw new ServiceException("文件获取失败: " + mem.getFileName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 删除数据库
|
|
||||||
boolean b = baseMapper.deleteByIds(ids) > 0;
|
|
||||||
if (!b) {
|
|
||||||
throw new ServiceException("数据库删除失败");
|
|
||||||
}
|
|
||||||
// 删除文件(非事务,不影响数据库逻辑)
|
|
||||||
for (File f : filesToDelete) {
|
|
||||||
if (f.exists() && !FileUtils.del(f)) {
|
|
||||||
log.warn("文件删除失败: {}", f.getAbsolutePath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package org.dromara.bidding.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
@ -51,7 +50,7 @@ public class BusBiddingUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询招投标人员列表
|
* 查询招投标人员列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"bidding:biddingUser:list","bidding:biddingUser:query","bidding:biddingUser:add"},mode = SaMode.OR)
|
@SaCheckPermission("bidding:biddingUser:getUser")
|
||||||
@GetMapping("/getUser")
|
@GetMapping("/getUser")
|
||||||
public R<List<SysUser>> getUser() {
|
public R<List<SysUser>> getUser() {
|
||||||
return R.ok(busBiddingUserService.getUser());
|
return R.ok(busBiddingUserService.getUser());
|
||||||
|
|||||||
@ -1,27 +1,26 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import java.util.List;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.bigscreen.domain.dto.BusBwlBo;
|
import org.dromara.bigscreen.domain.dto.BusBwlBo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusBwlVo;
|
import org.dromara.bigscreen.domain.vo.BusBwlVo;
|
||||||
import org.dromara.bigscreen.service.IBusBwlService;
|
import org.dromara.bigscreen.service.IBusBwlService;
|
||||||
|
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.domain.R;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
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.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备忘录
|
* 备忘录
|
||||||
@ -40,7 +39,7 @@ public class BusBwlController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询备忘录列表
|
* 查询备忘录列表
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("bwl:bwl:list")
|
@SaCheckPermission("bwl:bwl:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<BusBwlVo> list(BusBwlBo bo, PageQuery pageQuery) {
|
public TableDataInfo<BusBwlVo> list(BusBwlBo bo, PageQuery pageQuery) {
|
||||||
return busBwlService.queryPageList(bo, pageQuery);
|
return busBwlService.queryPageList(bo, pageQuery);
|
||||||
|
|||||||
@ -1,27 +1,27 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import java.util.List;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.bigscreen.domain.dto.BusSygjBo;
|
import org.dromara.bigscreen.domain.dto.BusSygjBo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusSygjVo;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.dromara.bigscreen.service.IBusSygjService;
|
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.domain.R;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
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.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.bigscreen.domain.vo.BusSygjVo;
|
||||||
import org.dromara.common.web.core.BaseController;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
import org.dromara.bigscreen.service.IBusSygjService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实用工具
|
* 实用工具
|
||||||
@ -40,7 +40,7 @@ public class BusSygjController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询实用工具列表
|
* 查询实用工具列表
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("bigscreen:sygj:list")
|
@SaCheckPermission("bigscreen:sygj:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<BusSygjVo> list(BusSygjBo bo, PageQuery pageQuery) {
|
public TableDataInfo<BusSygjVo> list(BusSygjBo bo, PageQuery pageQuery) {
|
||||||
return busSygjService.queryPageList(bo, pageQuery);
|
return busSygjService.queryPageList(bo, pageQuery);
|
||||||
|
|||||||
@ -1,27 +1,26 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import java.util.List;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.bigscreen.domain.dto.BusWjzxBo;
|
import org.dromara.bigscreen.domain.dto.BusWjzxBo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusWjzxVo;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.dromara.bigscreen.service.IBusWjzxService;
|
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.domain.R;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
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.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.bigscreen.domain.vo.BusWjzxVo;
|
||||||
|
import org.dromara.bigscreen.service.IBusWjzxService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件中心
|
* 文件中心
|
||||||
@ -40,7 +39,7 @@ public class BusWjzxController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询文件中心列表
|
* 查询文件中心列表
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("bigscreen:wjzx:list")
|
@SaCheckPermission("bigscreen:wjzx:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<BusWjzxVo> list(BusWjzxBo bo, PageQuery pageQuery) {
|
public TableDataInfo<BusWjzxVo> list(BusWjzxBo bo, PageQuery pageQuery) {
|
||||||
return busWjzxService.queryPageList(bo, pageQuery);
|
return busWjzxService.queryPageList(bo, pageQuery);
|
||||||
|
|||||||
@ -41,6 +41,7 @@ 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;
|
||||||
@ -96,6 +97,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 模块
|
||||||
|
|||||||
@ -44,6 +44,7 @@ public class SysRoleWorkController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询角色流程对应列表
|
* 查询角色流程对应列表
|
||||||
*/
|
*/
|
||||||
|
@SaCheckPermission("bigscreen:roleWork:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<SysRoleWorkVo> list(SysRoleWorkBo bo, PageQuery pageQuery) {
|
public TableDataInfo<SysRoleWorkVo> list(SysRoleWorkBo bo, PageQuery pageQuery) {
|
||||||
return sysRoleWorkService.queryPageList(bo, pageQuery);
|
return sysRoleWorkService.queryPageList(bo, pageQuery);
|
||||||
|
|||||||
@ -1,39 +0,0 @@
|
|||||||
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -85,7 +85,7 @@ public class BusSygjServiceImpl extends ServiceImpl<BusSygjMapper, BusSygj> impl
|
|||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<BusSygj> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BusSygj> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByDesc(BusSygj::getId);
|
lqw.orderByDesc(BusSygj::getId);
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getGjm()), BusSygj::getGjm, bo.getGjm());
|
lqw.eq(StringUtils.isNotBlank(bo.getGjm()), BusSygj::getGjm, bo.getGjm());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getGjUrl()), BusSygj::getGjUrl, bo.getGjUrl());
|
lqw.eq(StringUtils.isNotBlank(bo.getGjUrl()), BusSygj::getGjUrl, bo.getGjUrl());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), BusSygj::getAuditStatus, bo.getAuditStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), BusSygj::getAuditStatus, bo.getAuditStatus());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getType()), BusSygj::getType, bo.getType());
|
lqw.eq(StringUtils.isNotBlank(bo.getType()), BusSygj::getType, bo.getType());
|
||||||
|
|||||||
@ -1,33 +1,34 @@
|
|||||||
package org.dromara.bigscreen.service.impl;
|
package org.dromara.bigscreen.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.bigscreen.domain.BusWjzx;
|
|
||||||
import org.dromara.bigscreen.domain.dto.BusWjzxBo;
|
import org.dromara.bigscreen.domain.dto.BusWjzxBo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusWjzxSjDateVo;
|
import org.dromara.bigscreen.domain.vo.BusWjzxSjDateVo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusWjzxVo;
|
|
||||||
import org.dromara.bigscreen.mapper.BusWjzxMapper;
|
|
||||||
import org.dromara.bigscreen.service.IBusWjzxService;
|
|
||||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.xzd.biddingManagement.biddingDocument.domain.XzdBiddingFileEstimate;
|
||||||
|
import org.dromara.xzd.biddingManagement.biddingDocument.domain.vo.XzdBiddingFileEstimateVo;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.bigscreen.domain.vo.BusWjzxVo;
|
||||||
|
import org.dromara.bigscreen.domain.BusWjzx;
|
||||||
|
import org.dromara.bigscreen.mapper.BusWjzxMapper;
|
||||||
|
import org.dromara.bigscreen.service.IBusWjzxService;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collection;
|
import java.util.stream.Collectors;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件中心Service业务层处理
|
* 文件中心Service业务层处理
|
||||||
@ -52,7 +53,7 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
|||||||
* @return 文件中心
|
* @return 文件中心
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BusWjzxVo queryById(Long id) {
|
public BusWjzxVo queryById(Long id){
|
||||||
return baseMapper.selectVoById(id);
|
return baseMapper.selectVoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +98,8 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
|||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<BusWjzx> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BusWjzx> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByDesc(BusWjzx::getId);
|
lqw.orderByDesc(BusWjzx::getId);
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getWjm()), BusWjzx::getWjm, bo.getWjm());
|
lqw.eq(StringUtils.isNotBlank(bo.getWjm()), BusWjzx::getWjm, bo.getWjm());
|
||||||
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), BusWjzx::getAuditStatus, bo.getAuditStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), BusWjzx::getAuditStatus, bo.getAuditStatus());
|
||||||
lqw.eq(bo.getCreateBy() != null, BusWjzx::getCreateBy, bo.getCreateBy());
|
lqw.eq(bo.getCreateBy() != null, BusWjzx::getCreateBy, bo.getCreateBy());
|
||||||
return lqw;
|
return lqw;
|
||||||
@ -113,7 +115,7 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
|||||||
public Boolean insertByBo(BusWjzxBo bo) {
|
public Boolean insertByBo(BusWjzxBo bo) {
|
||||||
BusWjzx add = MapstructUtils.convert(bo, BusWjzx.class);
|
BusWjzx add = MapstructUtils.convert(bo, BusWjzx.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
if (add != null && StringUtils.isNotBlank(add.getWjm())) {
|
if (add != null && StringUtils.isNotBlank(add.getWjm())){
|
||||||
String[] split = add.getWjm().split("\\.");
|
String[] split = add.getWjm().split("\\.");
|
||||||
add.setWjlx(split[split.length - 1]);
|
add.setWjlx(split[split.length - 1]);
|
||||||
}
|
}
|
||||||
@ -140,7 +142,7 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
|||||||
/**
|
/**
|
||||||
* 保存前的数据校验
|
* 保存前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(BusWjzx entity) {
|
private void validEntityBeforeSave(BusWjzx entity){
|
||||||
//TODO 做一些数据校验,如唯一约束
|
//TODO 做一些数据校验,如唯一约束
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +155,7 @@ public class BusWjzxServiceImpl extends ServiceImpl<BusWjzxMapper, BusWjzx> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
if (isValid) {
|
if(isValid){
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
}
|
}
|
||||||
ArrayList<Long> temp = new ArrayList<>();
|
ArrayList<Long> temp = new ArrayList<>();
|
||||||
|
|||||||
@ -24,7 +24,10 @@ import org.dromara.system.service.impl.SysRoleServiceImpl;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色流程对应Service业务层处理
|
* 角色流程对应Service业务层处理
|
||||||
@ -239,57 +242,57 @@ public class SysRoleWorkServiceImpl extends ServiceImpl<SysRoleWorkMapper, SysRo
|
|||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
// 获取当前登录用户的所有项目及对应所有角色
|
// 获取当前登录用户的所有项目及对应所有角色
|
||||||
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<>();
|
||||||
//维护一个该用户的 项目ID:角色ID map
|
|
||||||
Map<Long,Long> map = new HashMap<>();
|
|
||||||
//获取到该用户所有有流程的项目 说明在该项目下该用户有角色有所属流程
|
//获取到该用户所有有流程的项目 说明在该项目下该用户有角色有所属流程
|
||||||
for (SysUserRole sysUserRole : allRoleList) {
|
for (SysUserRole sysUserRole : allRoleList) {
|
||||||
|
// lqw.clear();
|
||||||
|
// lqw.eq(SysRoleWork::getProjectId,sysUserRole.getProjectId());
|
||||||
|
// lqw.eq(SysRoleWork::getRoleId, sysUserRole.getRoleId());
|
||||||
|
// SysRoleWork one = getOne(lqw);
|
||||||
|
// if (one != null){
|
||||||
|
// //先拿到该项目
|
||||||
|
// BusProjectQueryReq req = new BusProjectQueryReq();
|
||||||
|
// req.setId(sysUserRole.getProjectId());
|
||||||
|
// List<BusProjectVo> vos = projectService.queryList(req);
|
||||||
|
// if (vos != null && !vos.isEmpty()){
|
||||||
|
// if(!busProjectVoList.contains(vos.getFirst())){
|
||||||
|
// busProjectVoList.add(vos.getFirst());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
BusProjectQueryReq req = new BusProjectQueryReq();
|
BusProjectQueryReq req = new BusProjectQueryReq();
|
||||||
req.setId(sysUserRole.getProjectId());
|
req.setId(sysUserRole.getProjectId());
|
||||||
List<BusProjectVo> vos = projectService.queryList(req);
|
List<BusProjectVo> vos = projectService.queryList(req);
|
||||||
if (vos != null && !vos.isEmpty()){
|
if (vos != null && !vos.isEmpty()){
|
||||||
if(!busProjectVoList.contains(vos.getFirst())){
|
if(!busProjectVoList.contains(vos.getFirst())){
|
||||||
busProjectVoList.add(vos.getFirst());
|
busProjectVoList.add(vos.getFirst());
|
||||||
map.put(sysUserRole.getProjectId(),sysUserRole.getRoleId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//遍历
|
||||||
List<SysRoleWork> roleWorks = this.list();
|
|
||||||
List<SysRoleVo> roleVos;
|
List<SysRoleVo> roleVos;
|
||||||
for (BusProjectVo projectVo : busProjectVoList) {
|
for (BusProjectVo projectVo : busProjectVoList) {
|
||||||
roleVos = new ArrayList<>();
|
roleVos = new ArrayList<>();
|
||||||
for (SysRoleWork roleWork : roleWorks) {
|
//通过项目查找所有角色
|
||||||
if (map.containsKey(projectVo.getId()) && roleWork.getRoleId().equals(map.get(projectVo.getId()))){
|
LambdaQueryWrapper<SysRoleWork> lqw1 = new LambdaQueryWrapper<>();
|
||||||
SysRoleVo sysRoleVo = roleService.selectRoleById(roleWork.getRoleId());
|
lqw1.eq(SysRoleWork::getProjectId,projectVo.getId());
|
||||||
|
//获取角色
|
||||||
|
List<SysRoleWork> roleWorkList = list(lqw1);
|
||||||
|
for (SysRoleWork sysRoleWork : roleWorkList) {
|
||||||
|
SysRoleVo sysRoleVo = roleService.selectRoleById(sysRoleWork.getRoleId());
|
||||||
if (sysRoleVo != null){
|
if (sysRoleVo != null){
|
||||||
roleVos.add(sysRoleVo);
|
roleVos.add(sysRoleVo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
projectVo.setRoleVos(roleVos);
|
projectVo.setRoleVos(roleVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//遍历
|
|
||||||
// for (BusProjectVo projectVo : busProjectVoList) {
|
|
||||||
// roleVos = new ArrayList<>();
|
|
||||||
// //通过项目查找所有角色
|
|
||||||
// LambdaQueryWrapper<SysRoleWork> lqw1 = new LambdaQueryWrapper<>();
|
|
||||||
// lqw1.eq(SysRoleWork::getProjectId,projectVo.getId());
|
|
||||||
// List<SysRoleWork> roleWorkList = list(lqw1);
|
|
||||||
// //遍历
|
|
||||||
// for (SysRoleWork sysRoleWork : roleWorkList) {
|
|
||||||
// SysRoleVo sysRoleVo = roleService.selectRoleById(sysRoleWork.getRoleId());
|
|
||||||
// if (sysRoleVo != null){
|
|
||||||
// roleVos.add(sysRoleVo);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// projectVo.setRoleVos(roleVos);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return busProjectVoList;
|
return busProjectVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,21 +7,17 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseReq;
|
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseReq;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.RemainingReq;
|
import org.dromara.cailiaoshebei.domain.bo.RemainingReq;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialbatchdemandplanVo;
|
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
||||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
|
||||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
import org.dromara.design.domain.BusBillofquantities;
|
||||||
@ -71,18 +67,6 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
private final IBusBillofquantitiesService busBillofquantitiesService;
|
private final IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
private final IBusBiddingPlanService busBiddingPlanService;
|
private final IBusBiddingPlanService busBiddingPlanService;
|
||||||
|
|
||||||
private final IBusMaterialbatchdemandplanService busMaterialbatchdemandplanService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询物资-批次需求计划列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("cailiaoshebei:mrpBase:list")
|
|
||||||
@GetMapping("/getPlanList")
|
|
||||||
public TableDataInfo<BusMaterialbatchdemandplanVo> list(BusMaterialbatchdemandplanBo bo, PageQuery pageQuery) {
|
|
||||||
return busMaterialbatchdemandplanService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-批次需求计划基础信息列表
|
* 查询物资-批次需求计划基础信息列表
|
||||||
*/
|
*/
|
||||||
@ -117,7 +101,7 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("cailiaoshebei:mrpBase:query")
|
@SaCheckPermission("cailiaoshebei:mrpBase:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<BusMrpVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<BusMrpVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -162,7 +146,7 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 批量新增或修改
|
* 批量新增或修改
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:mrpBase:add")
|
@SaCheckPermission("cailiaoshebei:mrpBase:addbatch")
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/batch")
|
@PostMapping("/batch")
|
||||||
public R<Void> batchAddOrUpdate(@RequestBody BusMrpDto dto) {
|
public R<Void> batchAddOrUpdate(@RequestBody BusMrpDto dto) {
|
||||||
@ -172,7 +156,6 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取剩余量
|
* 获取剩余量
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"cailiaoshebei:mrpBase:add","cailiaoshebei:mrpBase:edit"},mode = SaMode.OR)
|
|
||||||
@GetMapping("/remaining")
|
@GetMapping("/remaining")
|
||||||
public R<List<Map<String,Object>>> remaining( RemainingReq req) {
|
public R<List<Map<String,Object>>> remaining( RemainingReq req) {
|
||||||
String[] split = req.getLimitListId().split(",");
|
String[] split = req.getLimitListId().split(",");
|
||||||
@ -188,7 +171,7 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导入物资需求批次计划
|
* 导入物资需求批次计划
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:mrpBase:add")
|
@SaCheckPermission("cailiaoshebei:mrpBase:import")
|
||||||
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.INSERT)
|
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/import")
|
@PostMapping("/import")
|
||||||
@ -217,7 +200,7 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取工程量清单列表
|
* 获取工程量清单列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"cailiaoshebei:mrpBase:add","cailiaoshebei:mrpBase:edit"},mode = SaMode.OR)
|
@SaCheckPermission("cailiaoshebei:mrpBase:getZhaoBiaoList")
|
||||||
@GetMapping("/getZhaoBiaoList")
|
@GetMapping("/getZhaoBiaoList")
|
||||||
public R<List<BusBiddingPlanVo>> getZhaoBiaoList(CoryObtainTheListReq req) {
|
public R<List<BusBiddingPlanVo>> getZhaoBiaoList(CoryObtainTheListReq req) {
|
||||||
BusBiddingPlanBo bo = new BusBiddingPlanBo();
|
BusBiddingPlanBo bo = new BusBiddingPlanBo();
|
||||||
@ -233,7 +216,7 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
* @param bo
|
* @param bo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:mrpBase:list")
|
@SaCheckPermission("cailiaoshebei:mrpBase:getMore")
|
||||||
@GetMapping("/getMore")
|
@GetMapping("/getMore")
|
||||||
public R<List<BusBillofquantitiesLimitListVo>> getMore(BusBiddingPlanBo bo) {
|
public R<List<BusBillofquantitiesLimitListVo>> getMore(BusBiddingPlanBo bo) {
|
||||||
if (bo.getId() == null) {
|
if (bo.getId() == null) {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.cailiaoshebei.controller;
|
package org.dromara.cailiaoshebei.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@ -9,12 +8,14 @@ import jakarta.validation.constraints.NotEmpty;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.*;
|
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusLtnVo;
|
import org.dromara.cailiaoshebei.domain.bo.BusPurchaseDocBo;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.FeedbackDto;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialbatchdemandplanVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMaterialbatchdemandplanVo;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpBaseVo;
|
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||||
import org.dromara.cailiaoshebei.service.*;
|
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusPlanDocAssociationService;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
@ -26,18 +27,11 @@ import org.dromara.common.log.annotation.Log;
|
|||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.utils.logistics.LogisticsInquiryDemo;
|
|
||||||
import org.dromara.common.utils.logistics.LogisticsInquiryUtil;
|
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
import org.dromara.design.domain.BusBillofquantities;
|
||||||
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
||||||
import org.dromara.design.service.IBusBillofquantitiesService;
|
import org.dromara.design.service.IBusBillofquantitiesService;
|
||||||
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
import org.dromara.tender.domain.bo.TenderSupplierInputReq;
|
|
||||||
import org.dromara.tender.domain.vo.TenderSupplierInputVo;
|
|
||||||
//import org.dromara.tender.service.ITenderSupplierInputService;
|
|
||||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
|
||||||
import org.dromara.xzd.service.IXzdSupplierInfoService;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -70,39 +64,6 @@ public class BusPurchaseDocController extends BaseController {
|
|||||||
|
|
||||||
private final IBusBillofquantitiesService busBillofquantitiesService;
|
private final IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
|
|
||||||
private final IBusMrpBaseService busMrpBaseService;
|
|
||||||
private final IXzdSupplierInfoService xzdSupplierInfoService;
|
|
||||||
// private final ITenderSupplierInputService tenderSupplierInputService;
|
|
||||||
private final IBusLtnService busLtnService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询物资-物流单号列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:list")
|
|
||||||
@GetMapping("/getLtnList")
|
|
||||||
public TableDataInfo<BusLtnVo> getLtnList(BusLtnBo bo, PageQuery pageQuery) {
|
|
||||||
return busLtnService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据材料名查询物资-批次需求计划基础信息列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission(value = {"cailiaoshebei:purchaseDoc:add","cailiaoshebei:purchaseDoc:edit"},mode = SaMode.OR)
|
|
||||||
@GetMapping("/getMrpBaseListByName")
|
|
||||||
public R<List<BusMrpBaseVo>> getListByName(BusMrpBaseReq req) {
|
|
||||||
return R.ok(busMrpBaseService.getListByName(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据材料名获取供应商列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission(value = {"cailiaoshebei:purchaseDoc:add","cailiaoshebei:purchaseDoc:edit"},mode = SaMode.OR)
|
|
||||||
@GetMapping("/getListByName")
|
|
||||||
public R<List<XzdSupplierInfoVo>> getListByName(TenderSupplierInputReq req) {
|
|
||||||
return R.ok(xzdSupplierInfoService.getListByName(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-采购联系单列表
|
* 查询物资-采购联系单列表
|
||||||
*/
|
*/
|
||||||
@ -141,7 +102,7 @@ public class BusPurchaseDocController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("cailiaoshebei:purchaseDoc:query")
|
@SaCheckPermission("cailiaoshebei:purchaseDoc:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<BusPurchaseDocVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<BusPurchaseDocVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -153,7 +114,7 @@ public class BusPurchaseDocController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:list")
|
@SaCheckPermission("cailiaoshebei:purchaseDoc:pdf")
|
||||||
@GetMapping("/pdf/{id}")
|
@GetMapping("/pdf/{id}")
|
||||||
public R<String> getPic(@NotNull(message = "主键不能为空")
|
public R<String> getPic(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -2,14 +2,10 @@ package org.dromara.cailiaoshebei.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.system.domain.bo.SysUserBo;
|
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
|
||||||
import org.dromara.system.service.ISysUserService;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -40,16 +36,6 @@ public class BusPurchaseUserController extends BaseController {
|
|||||||
|
|
||||||
private final IBusPurchaseUserService busPurchaseUserService;
|
private final IBusPurchaseUserService busPurchaseUserService;
|
||||||
|
|
||||||
private final ISysUserService userService;
|
|
||||||
/**
|
|
||||||
* 获取系统用户列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission(value = {"cailiaoshebei:purchaseUser:list","cailiaoshebei:purchaseUser:add","cailiaoshebei:purchaseUser:edit"},mode = SaMode.OR)
|
|
||||||
@GetMapping("/getUserList")
|
|
||||||
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
|
|
||||||
return userService.selectPageUserList(user, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资采购人员列表
|
* 查询物资采购人员列表
|
||||||
*/
|
*/
|
||||||
@ -75,7 +61,7 @@ public class BusPurchaseUserController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("cailiaoshebei:purchaseUser:query")
|
@SaCheckPermission("cailiaoshebei:purchaseUser:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<BusPurchaseUserVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<BusPurchaseUserVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -121,7 +107,7 @@ public class BusPurchaseUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增或修改物资采购人员
|
* 新增或修改物资采购人员
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"cailiaoshebei:purchaseUser:add","cailiaoshebei:purchaseUser:edit"},mode = SaMode.OR)
|
@SaCheckPermission("cailiaoshebei:purchaseUser:addOrUpdate")
|
||||||
@Log(title = "物资采购人员", businessType = BusinessType.INSERT)
|
@Log(title = "物资采购人员", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/addOrUpdate")
|
@PostMapping("/addOrUpdate")
|
||||||
@ -135,7 +121,7 @@ public class BusPurchaseUserController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param projectId 项目id
|
* @param projectId 项目id
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:purchaseUser:list")
|
@SaCheckPermission("cailiaoshebei:purchaseUser:byProject")
|
||||||
@GetMapping("/byProject/{projectId}")
|
@GetMapping("/byProject/{projectId}")
|
||||||
public R<BusPurchaseUserVo> getInfoByProject(@NotNull(message = "主键不能为空")
|
public R<BusPurchaseUserVo> getInfoByProject(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.cailiaoshebei.controller;
|
package org.dromara.cailiaoshebei.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -48,7 +47,7 @@ public class BusTotalsupplyplanController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取主数据列表
|
* 获取主数据列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:totalsupplyplan:list")
|
@SaCheckPermission("design:totalsupplyplan:queryList")
|
||||||
@GetMapping("/queryList")
|
@GetMapping("/queryList")
|
||||||
public R<List<BusTotalsupplyplanAuditVo>> queryList(TotalsupplyplanQueryListReq bo) {
|
public R<List<BusTotalsupplyplanAuditVo>> queryList(TotalsupplyplanQueryListReq bo) {
|
||||||
BusTotalsupplyplanAuditBo busTotalsupplyplanAuditBo = BeanUtil.copyProperties(bo, BusTotalsupplyplanAuditBo.class);
|
BusTotalsupplyplanAuditBo busTotalsupplyplanAuditBo = BeanUtil.copyProperties(bo, BusTotalsupplyplanAuditBo.class);
|
||||||
@ -58,7 +57,7 @@ public class BusTotalsupplyplanController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 根据主数据获取到详情
|
* 根据主数据获取到详情
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"design:totalsupplyplan:list","design:totalsupplyplan:add","design:totalsupplyplan:edit"},mode = SaMode.OR)
|
@SaCheckPermission("design:totalsupplyplan:masterData")
|
||||||
@GetMapping("/masterData")
|
@GetMapping("/masterData")
|
||||||
public R<MasterDataReqDto> masterData(MasterDataReq bo) {
|
public R<MasterDataReqDto> masterData(MasterDataReq bo) {
|
||||||
return R.ok(busTotalsupplyplanService.masterData(bo));
|
return R.ok(busTotalsupplyplanService.masterData(bo));
|
||||||
@ -87,7 +86,7 @@ public class BusTotalsupplyplanController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 导入物资-总供应计划数据
|
* 导入物资-总供应计划数据
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:totalsupplyplan:add")
|
@SaCheckPermission("design:totalsupplyplan:import")
|
||||||
@Log(title = "物资-总供应计划", businessType = BusinessType.IMPORT)
|
@Log(title = "物资-总供应计划", businessType = BusinessType.IMPORT)
|
||||||
@PostMapping("/import")
|
@PostMapping("/import")
|
||||||
public R<Void> importData(@RequestPart("file") MultipartFile file) {
|
public R<Void> importData(@RequestPart("file") MultipartFile file) {
|
||||||
@ -99,7 +98,7 @@ public class BusTotalsupplyplanController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:totalsupplyplan:query")
|
@SaCheckPermission("design:totalsupplyplan:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<BusTotalsupplyplanVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<BusTotalsupplyplanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -131,7 +130,7 @@ public class BusTotalsupplyplanController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 批量修改物资-总供应计划
|
* 批量修改物资-总供应计划
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:totalsupplyplan:edit")
|
@SaCheckPermission("design:totalsupplyplan:batchEdit")
|
||||||
@Log(title = "物资-总供应计划", businessType = BusinessType.UPDATE)
|
@Log(title = "物资-总供应计划", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping("/batchEdit")
|
@PutMapping("/batchEdit")
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package org.dromara.cailiaoshebei.controller.app;
|
|||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -31,10 +30,7 @@ import org.dromara.design.service.IBusBillofquantitiesService;
|
|||||||
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
import org.dromara.tender.domain.bo.TenderSupplierInputBo;
|
import org.dromara.tender.domain.bo.TenderSupplierInputBo;
|
||||||
import org.dromara.tender.domain.vo.TenderSupplierInputVo;
|
import org.dromara.tender.domain.vo.TenderSupplierInputVo;
|
||||||
//import org.dromara.tender.service.ITenderSupplierInputService;
|
import org.dromara.tender.service.ITenderSupplierInputService;
|
||||||
import org.dromara.xzd.domain.bo.XzdSupplierInfoBo;
|
|
||||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
|
||||||
import org.dromara.xzd.service.IXzdSupplierInfoService;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -67,9 +63,7 @@ public class BusPurchaseDocAppController extends BaseController {
|
|||||||
|
|
||||||
private final IBusBillofquantitiesService busBillofquantitiesService;
|
private final IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
|
|
||||||
// private final ITenderSupplierInputService tenderSupplierInputService;
|
private final ITenderSupplierInputService tenderSupplierInputService;
|
||||||
@Resource
|
|
||||||
private IXzdSupplierInfoService supplierInfoService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,8 +78,8 @@ public class BusPurchaseDocAppController extends BaseController {
|
|||||||
* 查询供应商入库列表
|
* 查询供应商入库列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/supList")
|
@GetMapping("/supList")
|
||||||
public TableDataInfo<XzdSupplierInfoVo> list(XzdSupplierInfoBo bo, PageQuery pageQuery) {
|
public TableDataInfo<TenderSupplierInputVo> list(TenderSupplierInputBo bo, PageQuery pageQuery) {
|
||||||
return supplierInfoService.queryPageList(bo, pageQuery);
|
return tenderSupplierInputService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -33,7 +33,7 @@ import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
|||||||
import org.dromara.tender.domain.vo.BusTenderPlanningLimitListVo;
|
import org.dromara.tender.domain.vo.BusTenderPlanningLimitListVo;
|
||||||
import org.dromara.tender.service.IBusBiddingPlanService;
|
import org.dromara.tender.service.IBusBiddingPlanService;
|
||||||
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
||||||
//import org.dromara.tender.service.ITenderSupplierInputService;
|
import org.dromara.tender.service.ITenderSupplierInputService;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.cailiaoshebei.service.impl;
|
package org.dromara.cailiaoshebei.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.ExcelReader;
|
import com.alibaba.excel.ExcelReader;
|
||||||
import com.alibaba.excel.read.metadata.ReadSheet;
|
import com.alibaba.excel.read.metadata.ReadSheet;
|
||||||
@ -105,7 +104,7 @@ public class BusTotalsupplyplanServiceImpl extends ServiceImpl<BusTotalsupplypla
|
|||||||
private LambdaQueryWrapper<BusTotalsupplyplan> buildQueryWrapper(BusTotalsupplyplanBo bo) {
|
private LambdaQueryWrapper<BusTotalsupplyplan> buildQueryWrapper(BusTotalsupplyplanBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<BusTotalsupplyplan> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BusTotalsupplyplan> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(bo.getProjectId() != null, BusTotalsupplyplan::getProjectId, bo.getProjectId());
|
lqw.eq(bo.getProjectId() != null ,BusTotalsupplyplan::getProjectId,bo.getProjectId());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getTexture()), BusTotalsupplyplan::getTexture, bo.getTexture());
|
lqw.eq(StringUtils.isNotBlank(bo.getTexture()), BusTotalsupplyplan::getTexture, bo.getTexture());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getBrand()), BusTotalsupplyplan::getBrand, bo.getBrand());
|
lqw.eq(StringUtils.isNotBlank(bo.getBrand()), BusTotalsupplyplan::getBrand, bo.getBrand());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getQualityStandard()), BusTotalsupplyplan::getQualityStandard, bo.getQualityStandard());
|
lqw.eq(StringUtils.isNotBlank(bo.getQualityStandard()), BusTotalsupplyplan::getQualityStandard, bo.getQualityStandard());
|
||||||
@ -240,14 +239,7 @@ public class BusTotalsupplyplanServiceImpl extends ServiceImpl<BusTotalsupplypla
|
|||||||
}
|
}
|
||||||
// 关闭读取器
|
// 关闭读取器
|
||||||
excelReader.finish();
|
excelReader.finish();
|
||||||
if (CollUtil.isEmpty(allData)) {
|
if (allData.isEmpty()) {
|
||||||
throw new ServiceException("未读取到有效数据", HttpStatus.BAD_REQUEST);
|
|
||||||
}
|
|
||||||
// 过滤 id 为空的数据
|
|
||||||
allData = allData.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.filter(data -> data.getId() != null).toList();
|
|
||||||
if (CollUtil.isEmpty(allData)) {
|
|
||||||
throw new ServiceException("未读取到有效数据", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("未读取到有效数据", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
// 处理导入的数据
|
// 处理导入的数据
|
||||||
@ -256,7 +248,7 @@ public class BusTotalsupplyplanServiceImpl extends ServiceImpl<BusTotalsupplypla
|
|||||||
return this.updateBatchById(list);
|
return this.updateBatchById(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("物资供货总计划,导入Excel文件失败", e);
|
log.error("物资供货总计划,导入Excel文件失败", e);
|
||||||
throw new ServiceException("导入失败, " + e.getMessage(), HttpStatus.ERROR);
|
throw new ServiceException("导入失败: " + e.getMessage(), HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package org.dromara.common.utils;
|
package org.dromara.common.utils;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.utils.MessageUtils;
|
import org.dromara.common.core.utils.MessageUtils;
|
||||||
@ -10,8 +9,6 @@ import org.dromara.contractor.domain.SubConstructionUser;
|
|||||||
import org.dromara.mobileAttendanceMachine.DeviceMessageSender;
|
import org.dromara.mobileAttendanceMachine.DeviceMessageSender;
|
||||||
import org.dromara.mobileAttendanceMachine.KqjEntity;
|
import org.dromara.mobileAttendanceMachine.KqjEntity;
|
||||||
import org.dromara.project.domain.BusAttendanceMachine;
|
import org.dromara.project.domain.BusAttendanceMachine;
|
||||||
import org.dromara.project.domain.BusAttendanceMachineRepeat;
|
|
||||||
import org.dromara.project.service.IBusAttendanceMachineRepeatService;
|
|
||||||
import org.dromara.project.service.IBusAttendanceMachineService;
|
import org.dromara.project.service.IBusAttendanceMachineService;
|
||||||
import org.dromara.sms4j.api.SmsBlend;
|
import org.dromara.sms4j.api.SmsBlend;
|
||||||
import org.dromara.sms4j.api.entity.SmsResponse;
|
import org.dromara.sms4j.api.entity.SmsResponse;
|
||||||
@ -22,7 +19,6 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -40,9 +36,6 @@ public class AsyncUtil {
|
|||||||
@Lazy
|
@Lazy
|
||||||
private IBusAttendanceMachineService attendanceMachineService;
|
private IBusAttendanceMachineService attendanceMachineService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IBusAttendanceMachineRepeatService busAttendanceMachineRepeatService;
|
|
||||||
|
|
||||||
//发送短信
|
//发送短信
|
||||||
@Async
|
@Async
|
||||||
public void sendSms(List<String> mobileList, String config) {
|
public void sendSms(List<String> mobileList, String config) {
|
||||||
@ -70,107 +63,22 @@ public class AsyncUtil {
|
|||||||
public void sendPersonnel(Long teamId, SubConstructionUser constructionUser) {
|
public void sendPersonnel(Long teamId, SubConstructionUser constructionUser) {
|
||||||
SysOssVo byId = ossService.getById(Long.valueOf(constructionUser.getFacePic()));
|
SysOssVo byId = ossService.getById(Long.valueOf(constructionUser.getFacePic()));
|
||||||
List<BusAttendanceMachine> list = attendanceMachineService.lambdaQuery().apply("FIND_IN_SET({0}, teams)", teamId).list();
|
List<BusAttendanceMachine> list = attendanceMachineService.lambdaQuery().apply("FIND_IN_SET({0}, teams)", teamId).list();
|
||||||
|
|
||||||
ArrayList<BusAttendanceMachineRepeat> repeats = new ArrayList<>();
|
|
||||||
for (BusAttendanceMachine machine : list) {
|
for (BusAttendanceMachine machine : list) {
|
||||||
Boolean b = deviceMessageSender.sendPersonnelInformation(machine.getSn(),
|
deviceMessageSender.sendPersonnelInformation(machine.getSn(), constructionUser.getSysUserId().toString(), constructionUser.getUserName(), byId.getUrl());
|
||||||
constructionUser.getSysUserId().toString(), constructionUser.getUserName(), byId.getUrl());
|
|
||||||
if (!b) {
|
|
||||||
//记录下来重连时下发
|
|
||||||
BusAttendanceMachineRepeat repeat = new BusAttendanceMachineRepeat();
|
|
||||||
repeat.setSn(machine.getSn());
|
|
||||||
repeat.setUserId(constructionUser.getSysUserId().toString());
|
|
||||||
repeat.setUserName(constructionUser.getUserName());
|
|
||||||
repeat.setUrl(byId.getUrl());
|
|
||||||
repeat.setType("1");
|
|
||||||
repeats.add(repeat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(repeats)) {
|
|
||||||
busAttendanceMachineRepeatService.saveBatch(repeats);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除考勤人员
|
//删除考勤人员
|
||||||
@Async
|
@Async
|
||||||
public void deletePersonnel(SubConstructionUser constructionUser) {
|
public void deletePersonnel(SubConstructionUser constructionUser) {
|
||||||
ArrayList<BusAttendanceMachineRepeat> repeats = new ArrayList<>();
|
|
||||||
List<BusAttendanceMachine> list = attendanceMachineService.lambdaQuery().apply("FIND_IN_SET({0}, teams)", constructionUser.getTeamId()).list();
|
List<BusAttendanceMachine> list = attendanceMachineService.lambdaQuery().apply("FIND_IN_SET({0}, teams)", constructionUser.getTeamId()).list();
|
||||||
for (BusAttendanceMachine machine : list) {
|
for (BusAttendanceMachine machine : list) {
|
||||||
try {
|
try {
|
||||||
KqjEntity.CommonResponse commonResponse = deviceMessageSender.deleteUser(machine.getSn(), constructionUser.getSysUserId().toString());
|
deviceMessageSender.deleteUser(machine.getSn(), constructionUser.getSysUserId().toString());
|
||||||
int code = commonResponse.getData().getCode();
|
|
||||||
if (code != 0) {
|
|
||||||
//记录下来重连时下发
|
|
||||||
BusAttendanceMachineRepeat repeat = new BusAttendanceMachineRepeat();
|
|
||||||
repeat.setSn(machine.getSn());
|
|
||||||
repeat.setUserId(constructionUser.getSysUserId().toString());
|
|
||||||
repeat.setUserName(constructionUser.getUserName());
|
|
||||||
repeat.setUrl(null);
|
|
||||||
repeat.setType("2");
|
|
||||||
repeats.add(repeat);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("删除考勤人员异常", e);
|
|
||||||
BusAttendanceMachineRepeat repeat = new BusAttendanceMachineRepeat();
|
|
||||||
repeat.setSn(machine.getSn());
|
|
||||||
repeat.setUserId(constructionUser.getSysUserId().toString());
|
|
||||||
repeat.setUserName(constructionUser.getUserName());
|
|
||||||
repeat.setUrl(null);
|
|
||||||
repeat.setType("2");
|
|
||||||
repeats.add(repeat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(repeats)) {
|
|
||||||
busAttendanceMachineRepeatService.saveBatch(repeats);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//重新下发人员
|
|
||||||
@Async
|
|
||||||
public void repeatSend(String sn) {
|
|
||||||
List<BusAttendanceMachineRepeat> list = busAttendanceMachineRepeatService.lambdaQuery()
|
|
||||||
.eq(BusAttendanceMachineRepeat::getSn, sn)
|
|
||||||
.eq(BusAttendanceMachineRepeat::getType, "1")
|
|
||||||
.list();
|
|
||||||
List<Long> repeatIds = new ArrayList<>();
|
|
||||||
for (BusAttendanceMachineRepeat repeat : list) {
|
|
||||||
Boolean b = deviceMessageSender.sendPersonnelInformation(repeat.getSn(), repeat.getUserId(), repeat.getUserName(), repeat.getUrl());
|
|
||||||
if (b) {
|
|
||||||
//成功删除记录
|
|
||||||
repeatIds.add(repeat.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(repeatIds)) {
|
|
||||||
busAttendanceMachineRepeatService.removeByIds(repeatIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//重新删除人员
|
|
||||||
@Async
|
|
||||||
public void repeatDelete(String sn) {
|
|
||||||
List<BusAttendanceMachineRepeat> list = busAttendanceMachineRepeatService.lambdaQuery()
|
|
||||||
.eq(BusAttendanceMachineRepeat::getSn, sn)
|
|
||||||
.eq(BusAttendanceMachineRepeat::getType, "2")
|
|
||||||
.list();
|
|
||||||
List<Long> repeatIds = new ArrayList<>();
|
|
||||||
for (BusAttendanceMachineRepeat repeat : list) {
|
|
||||||
try {
|
|
||||||
KqjEntity.CommonResponse commonResponse = deviceMessageSender.deleteUser(repeat.getSn(), repeat.getUserId());
|
|
||||||
int code = commonResponse.getData().getCode();
|
|
||||||
if (code == 0) {
|
|
||||||
//成功删除记录
|
|
||||||
repeatIds.add(repeat.getId());
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("删除考勤人员异常", e);
|
log.error("删除考勤人员异常", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(repeatIds)) {
|
|
||||||
busAttendanceMachineRepeatService.removeByIds(repeatIds);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import org.dromara.common.constant.GeoJsonConstant;
|
|||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.domain.GeoPoint;
|
import org.dromara.common.domain.GeoPoint;
|
||||||
import org.dromara.facility.domain.FacMatrix;
|
|
||||||
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
||||||
import org.dromara.facility.domain.dto.geojson.FacFeatureByPlane;
|
import org.dromara.facility.domain.dto.geojson.FacFeatureByPlane;
|
||||||
import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint;
|
import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint;
|
||||||
@ -339,29 +338,6 @@ public class JSTUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 匹配最近方阵,获取该方阵的信息
|
|
||||||
*
|
|
||||||
* @param pointEntity 点位
|
|
||||||
* @param matrices 方阵列表
|
|
||||||
* @return 最近方阵的信息
|
|
||||||
*/
|
|
||||||
public static FacMatrix findContainingMatrix(
|
|
||||||
RecognizeConvertCoordinateResult pointEntity,
|
|
||||||
List<FacMatrix> matrices
|
|
||||||
) {
|
|
||||||
double lng = Double.parseDouble(pointEntity.getLng());
|
|
||||||
double lat = Double.parseDouble(pointEntity.getLat());
|
|
||||||
Point point = geometryFactory.createPoint(new Coordinate(lng, lat));
|
|
||||||
for (FacMatrix matrix : matrices) {
|
|
||||||
Polygon polygon = parsePolygon(matrix.getPositions());
|
|
||||||
if (polygon.covers(point)) { // covers 包含边界}
|
|
||||||
return matrix;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将 FacPhotovoltaicPanel.positions 转成 Polygon
|
* 将 FacPhotovoltaicPanel.positions 转成 Polygon
|
||||||
*/
|
*/
|
||||||
@ -400,7 +376,7 @@ public class JSTUtil {
|
|||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
list.add(s);
|
list.add(s);
|
||||||
List<GeoPoint> matchingRange = findMatchingRange("30.247348", "105.729797", list);
|
List<GeoPoint> matchingRange = findMatchingRange("30.247348", "105.729797", list);
|
||||||
System.out.println(matchingRange == null);
|
System.out.println(matchingRange==null);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,106 +0,0 @@
|
|||||||
package org.dromara.complaintBox.app.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.common.core.domain.R;
|
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
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.satoken.utils.LoginHelper;
|
|
||||||
import org.dromara.common.web.core.BaseController;
|
|
||||||
import org.dromara.complaintBox.app.domain.vo.AppDetailsOfTheOpinionVo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxBo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxMessageLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxVo;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxMessageLoggingService;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxService;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/app/complaintBox/complaintBox")
|
|
||||||
public class AppBusComplaintBoxController extends BaseController {
|
|
||||||
|
|
||||||
@Lazy
|
|
||||||
private final IBusComplaintBoxService busComplaintBoxService;
|
|
||||||
@Lazy
|
|
||||||
private final IBusComplaintBoxMessageLoggingService busComplaintBoxMessageLoggingService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱列表
|
|
||||||
*/
|
|
||||||
// @SaCheckPermission("appComplaintBox:complaintBox:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<BusComplaintBoxVo> list(BusComplaintBoxBo bo, PageQuery pageQuery) {
|
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
|
||||||
if (loginUser != null) {
|
|
||||||
bo.setUserId(loginUser.getUserId());
|
|
||||||
}
|
|
||||||
return busComplaintBoxService.appQueryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取意见箱详细信息
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
*/
|
|
||||||
// @SaCheckPermission("appComplaintBox:complaintBox:query")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public R<AppDetailsOfTheOpinionVo> getInfo(@NotNull(message = "主键不能为空")
|
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(busComplaintBoxService.appQueryById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱
|
|
||||||
*/
|
|
||||||
// @SaCheckPermission("appComplaintBox:complaintBox:add")
|
|
||||||
@Log(title = "意见箱", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping()
|
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusComplaintBoxBo bo) {
|
|
||||||
return toAjax(busComplaintBoxService.insertByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见回复
|
|
||||||
*/
|
|
||||||
// @SaCheckPermission("appComplaintBox:complaintBox:add")
|
|
||||||
@Log(title = "意见箱", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/postAReply")
|
|
||||||
public R<Void> postAReply(@Validated(AddGroup.class) @RequestBody BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
return toAjax(busComplaintBoxMessageLoggingService.insertAppByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见阅读状态
|
|
||||||
*/
|
|
||||||
// @SaCheckPermission("appComplaintBox:complaintBox:edit")
|
|
||||||
@Log(title = "意见箱", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping("/editCheckStatus")
|
|
||||||
public R<Void> editCheckStatus(@Validated(EditGroup.class) @RequestBody BusComplaintBoxBo bo) {
|
|
||||||
return toAjax(busComplaintBoxService.editCheckStatus(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package org.dromara.complaintBox.app.domain.vo;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxMessageLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxVo;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class AppDetailsOfTheOpinionVo implements Serializable {
|
|
||||||
|
|
||||||
private BusComplaintBoxVo busComplaintBoxVo;
|
|
||||||
|
|
||||||
private List<BusComplaintBoxMessageLoggingVo> messageLoggingVos;
|
|
||||||
}
|
|
||||||
@ -1,124 +0,0 @@
|
|||||||
package org.dromara.complaintBox.controller;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxDisposeLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxMessageLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxDisposeLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.ComplaintBoxCountVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.DetailsOfTheOpinionVo;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxDisposeLoggingService;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxMessageLoggingService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
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.complaintBox.domain.vo.BusComplaintBoxVo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxBo;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxService;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/complaintBox/complaintBox")
|
|
||||||
public class BusComplaintBoxController extends BaseController {
|
|
||||||
|
|
||||||
private final IBusComplaintBoxService busComplaintBoxService;
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IBusComplaintBoxMessageLoggingService busComplaintBoxMessageLoggingService;
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IBusComplaintBoxDisposeLoggingService disposeLoggingService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("complaintBox:complaintBox:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<BusComplaintBoxVo> list(BusComplaintBoxBo bo, PageQuery pageQuery) {
|
|
||||||
return busComplaintBoxService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 查询意见处理记录列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("complaintBox:complaintBox:list")
|
|
||||||
@GetMapping("/getDisposeLogList")
|
|
||||||
public TableDataInfo<BusComplaintBoxDisposeLoggingVo> getDisposeLogList(BusComplaintBoxDisposeLoggingBo bo, PageQuery pageQuery) {
|
|
||||||
return disposeLoggingService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* web获取各个处理状态数量
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("complaintBox:complaintBox:list")
|
|
||||||
@GetMapping("/getCount")
|
|
||||||
public R<List<ComplaintBoxCountVo>> getCount(BusComplaintBoxBo bo) {
|
|
||||||
return R.ok(busComplaintBoxService.getCount(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取意见箱详细信息
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
*/
|
|
||||||
// @SaCheckPermission("complaintBox:complaintBox:query")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public R<DetailsOfTheOpinionVo> getInfo(@NotNull(message = "主键不能为空")
|
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(busComplaintBoxService.getInfo(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见回复
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("complaintBox:complaintBox:add")
|
|
||||||
@Log(title = "意见箱", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/postAReply")
|
|
||||||
public R<Void> postAReply(@Validated(AddGroup.class) @RequestBody BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
return toAjax(busComplaintBoxMessageLoggingService.insertWebByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见阅读状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("complaintBox:complaintBox:edit")
|
|
||||||
@Log(title = "意见箱", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping("/editCheckStatus")
|
|
||||||
public R<Void> editCheckStatus(@Validated(EditGroup.class) @RequestBody BusComplaintBoxBo bo) {
|
|
||||||
return toAjax(busComplaintBoxService.editCheckStatus(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见阅读状态
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("complaintBox:complaintBox:edit")
|
|
||||||
@Log(title = "意见箱", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping("/editStatus")
|
|
||||||
public R<Void> editStatus(@Validated(EditGroup.class) @RequestBody BusComplaintBoxBo bo) {
|
|
||||||
return toAjax(busComplaintBoxService.editStatus(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain;
|
|
||||||
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱对象 bus_complaint_box
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("bus_complaint_box")
|
|
||||||
public class BusComplaintBox extends BaseEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@TableId(value = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公司id(当前登录人的顶层下一级部门id)
|
|
||||||
*/
|
|
||||||
private Long companyId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目id
|
|
||||||
*/
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头像地址
|
|
||||||
*/
|
|
||||||
private Long avatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标题
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见类型(1、功能建议,2、Bug反馈,3、体验问题,4其他意见)
|
|
||||||
*/
|
|
||||||
private String opinionType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详细描述
|
|
||||||
*/
|
|
||||||
private String detail;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传图片(id,id之间使用','分割)
|
|
||||||
*/
|
|
||||||
private String fileId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否匿名提交(0、否,1、是)
|
|
||||||
*/
|
|
||||||
private String isCryptonym;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理状态(0、待处理,5、处理中,9、已解决,10、退回,14、不予解决())
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前处理人id
|
|
||||||
*/
|
|
||||||
private Long currentDisposeUserId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain;
|
|
||||||
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见处理记录对象 bus_complaint_box_dispose_logging
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("bus_complaint_box_dispose_logging")
|
|
||||||
public class BusComplaintBoxDisposeLogging extends BaseEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@TableId(value = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见id
|
|
||||||
*/
|
|
||||||
private Long complaintId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头像地址
|
|
||||||
*/
|
|
||||||
private Long avatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否退回(0、否,1、是)
|
|
||||||
*/
|
|
||||||
private String isRefund;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退回原因
|
|
||||||
*/
|
|
||||||
private String cause;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain;
|
|
||||||
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见沟通记录对象 bus_complaint_box_message_logging
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("bus_complaint_box_message_logging")
|
|
||||||
public class BusComplaintBoxMessageLogging extends BaseEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@TableId(value = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见id
|
|
||||||
*/
|
|
||||||
private Long complaintId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户id
|
|
||||||
*/
|
|
||||||
private Long replyUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户名
|
|
||||||
*/
|
|
||||||
private String replyUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户头像地址
|
|
||||||
*/
|
|
||||||
private Long replyAvatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户id
|
|
||||||
*/
|
|
||||||
private Long repliedUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户名
|
|
||||||
*/
|
|
||||||
private String repliedUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户头像地址
|
|
||||||
*/
|
|
||||||
private Long repliedAvatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 消息内容
|
|
||||||
*/
|
|
||||||
private String details;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理状态(0、未读,1、已读)
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.bo;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBox;
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱业务对象 bus_complaint_box
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@AutoMapper(target = BusComplaintBox.class, reverseConvertGenerate = false)
|
|
||||||
public class BusComplaintBoxBo extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公司id(当前登录人的顶层下一级部门id)
|
|
||||||
*/
|
|
||||||
private Long companyId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目id
|
|
||||||
*/
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
@NotNull(message = "主键ID不能为空", groups = { AddGroup.class })
|
|
||||||
private Long userId;
|
|
||||||
/**
|
|
||||||
* 当前处理人id
|
|
||||||
*/
|
|
||||||
private Long currentDisposeUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头像地址
|
|
||||||
*/
|
|
||||||
private Long avatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标题
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见类型(1、功能建议,2、Bug反馈,3、体验问题,4其他意见)
|
|
||||||
*/
|
|
||||||
private String opinionType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详细描述
|
|
||||||
*/
|
|
||||||
private String detail;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传图片(id,id之间使用','分割)
|
|
||||||
*/
|
|
||||||
private String fileId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否匿名提交(0、否,1、是)
|
|
||||||
*/
|
|
||||||
private String isCryptonym;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理状态(0、待处理,5、处理中,9、已解决,14、关闭)
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退回原因
|
|
||||||
*/
|
|
||||||
private String cause;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.bo;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxDisposeLogging;
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见处理记录业务对象 bus_complaint_box_dispose_logging
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@AutoMapper(target = BusComplaintBoxDisposeLogging.class, reverseConvertGenerate = false)
|
|
||||||
public class BusComplaintBoxDisposeLoggingBo extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见id
|
|
||||||
*/
|
|
||||||
private Long complaintId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头像地址
|
|
||||||
*/
|
|
||||||
private Long avatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否退回(0、否,1、是)
|
|
||||||
*/
|
|
||||||
private String isRefund;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退回原因
|
|
||||||
*/
|
|
||||||
private String cause;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.bo;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxMessageLogging;
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见沟通记录业务对象 bus_complaint_box_message_logging
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@AutoMapper(target = BusComplaintBoxMessageLogging.class, reverseConvertGenerate = false)
|
|
||||||
public class BusComplaintBoxMessageLoggingBo extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见id
|
|
||||||
*/
|
|
||||||
private Long complaintId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户id
|
|
||||||
*/
|
|
||||||
private Long replyUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户名
|
|
||||||
*/
|
|
||||||
private String replyUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户头像地址
|
|
||||||
*/
|
|
||||||
private Long replyAvatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户id
|
|
||||||
*/
|
|
||||||
private Long repliedUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户名
|
|
||||||
*/
|
|
||||||
private String repliedUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户头像地址
|
|
||||||
*/
|
|
||||||
private Long repliedAvatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 消息内容
|
|
||||||
*/
|
|
||||||
private String details;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理状态(0、未读,1、已读)
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上一条沟通记录id
|
|
||||||
*/
|
|
||||||
private Long oldId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.vo;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxDisposeLogging;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见处理记录视图对象 bus_complaint_box_dispose_logging
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
@AutoMapper(target = BusComplaintBoxDisposeLogging.class)
|
|
||||||
public class BusComplaintBoxDisposeLoggingVo implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "主键ID")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见id
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "意见id")
|
|
||||||
private Long complaintId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户名")
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头像地址
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "头像地址")
|
|
||||||
private Long avatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否退回(0、否,1、是)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "是否退回", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "0=、否,1、是")
|
|
||||||
private String isRefund;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退回原因
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "退回原因")
|
|
||||||
private String cause;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.vo;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxMessageLogging;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见沟通记录视图对象 bus_complaint_box_message_logging
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
@AutoMapper(target = BusComplaintBoxMessageLogging.class)
|
|
||||||
public class BusComplaintBoxMessageLoggingVo implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "主键ID")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见id
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "意见id")
|
|
||||||
private Long complaintId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户id
|
|
||||||
*/
|
|
||||||
private Long replyUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户名
|
|
||||||
*/
|
|
||||||
private String replyUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回复用户头像地址
|
|
||||||
*/
|
|
||||||
private Long replyAvatar;
|
|
||||||
private String replyAvatarUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户id
|
|
||||||
*/
|
|
||||||
private Long repliedUserId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户名
|
|
||||||
*/
|
|
||||||
private String repliedUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 被回复用户头像地址
|
|
||||||
*/
|
|
||||||
private Long repliedAvatar;
|
|
||||||
private String repliedAvatarUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 消息内容
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "消息内容")
|
|
||||||
private String details;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理状态(0、未读,1、已读)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "处理状态", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "0=、未读,1、已读")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发起人类型(0、发起人,1、处理人)
|
|
||||||
*/
|
|
||||||
private Integer type;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,125 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.vo;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBox;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱视图对象 bus_complaint_box
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
@AutoMapper(target = BusComplaintBox.class)
|
|
||||||
public class BusComplaintBoxVo implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "主键ID")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公司id(当前登录人的顶层下一级部门id)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "公司id", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "当=前登录人的顶层下一级部门id")
|
|
||||||
private Long companyId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目id
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "项目id")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户名")
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头像地址
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "头像地址")
|
|
||||||
private Long avatar;
|
|
||||||
private String avatarUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标题
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "标题")
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见类型(1、功能建议,2、Bug反馈,3、体验问题,4其他意见)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "意见类型", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "1=、功能建议,2、Bug反馈,3、体验问题,4其他意见")
|
|
||||||
private String opinionType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详细描述
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "详细描述")
|
|
||||||
private String detail;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传图片(id,id之间使用','分割)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "上传图片", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "i=d,id之间使用','分割")
|
|
||||||
private String fileId;
|
|
||||||
private List<String> fileUrls;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否匿名提交(0、否,1、是)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "是否匿名提交", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "0=、否,1、是")
|
|
||||||
private String isCryptonym;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理状态(0、待处理,5、处理中,9、已解决,14、关闭)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "处理状态", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(readConverterExp = "0=、待处理,5、处理中,9、已解决,14、关闭")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前处理人id
|
|
||||||
*/
|
|
||||||
private Long currentDisposeUserId;
|
|
||||||
|
|
||||||
private Integer count;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.vo;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import org.dromara.common.translation.annotation.Translation;
|
|
||||||
import org.dromara.common.translation.constant.TransConstant;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ComplaintBoxCountVo implements Serializable {
|
|
||||||
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
// @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "type",other = "opinion_processing_status")
|
|
||||||
private String typeName;
|
|
||||||
|
|
||||||
private Integer count;
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
package org.dromara.complaintBox.domain.vo;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class DetailsOfTheOpinionVo implements Serializable {
|
|
||||||
|
|
||||||
private BusComplaintBoxVo busComplaintBoxVo;
|
|
||||||
|
|
||||||
private List<BusComplaintBoxMessageLoggingVo> messageLoggingVos;
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package org.dromara.complaintBox.mapper;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxDisposeLogging;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxDisposeLoggingVo;
|
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见处理记录Mapper接口
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
public interface BusComplaintBoxDisposeLoggingMapper extends BaseMapperPlus<BusComplaintBoxDisposeLogging, BusComplaintBoxDisposeLoggingVo> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package org.dromara.complaintBox.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBox;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxBo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxVo;
|
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
||||||
import org.dromara.complaintBox.domain.vo.ComplaintBoxCountVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱Mapper接口
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
public interface BusComplaintBoxMapper extends BaseMapperPlus<BusComplaintBox, BusComplaintBoxVo> {
|
|
||||||
|
|
||||||
Page<BusComplaintBoxVo> selectVoPageList(@Param("page") Page<BusComplaintBoxVo> page, @Param("bo") BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
Page<BusComplaintBoxVo> selectVoPageWebList(@Param("page") Page<BusComplaintBoxVo> page, @Param("bo") BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
List<ComplaintBoxCountVo> getCount(@Param("bo") BusComplaintBoxBo bo);
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package org.dromara.complaintBox.mapper;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxMessageLogging;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxMessageLoggingVo;
|
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见沟通记录Mapper接口
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
public interface BusComplaintBoxMessageLoggingMapper extends BaseMapperPlus<BusComplaintBoxMessageLogging, BusComplaintBoxMessageLoggingVo> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
package org.dromara.complaintBox.service;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxDisposeLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxDisposeLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxDisposeLogging;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见处理记录Service接口
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
public interface IBusComplaintBoxDisposeLoggingService extends IService<BusComplaintBoxDisposeLogging>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱-意见处理记录
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 意见箱-意见处理记录
|
|
||||||
*/
|
|
||||||
BusComplaintBoxDisposeLoggingVo queryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询意见箱-意见处理记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 意见箱-意见处理记录分页列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<BusComplaintBoxDisposeLoggingVo> queryPageList(BusComplaintBoxDisposeLoggingBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的意见箱-意见处理记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 意见箱-意见处理记录列表
|
|
||||||
*/
|
|
||||||
List<BusComplaintBoxDisposeLoggingVo> queryList(BusComplaintBoxDisposeLoggingBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱-意见处理记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见处理记录
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
Boolean insertByBo(BusComplaintBoxDisposeLoggingBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见箱-意见处理记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见处理记录
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(BusComplaintBoxDisposeLoggingBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除意见箱-意见处理记录信息
|
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
}
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
package org.dromara.complaintBox.service;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxMessageLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxMessageLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxMessageLogging;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见沟通记录Service接口
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
public interface IBusComplaintBoxMessageLoggingService extends IService<BusComplaintBoxMessageLogging>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 意见箱-意见沟通记录
|
|
||||||
*/
|
|
||||||
BusComplaintBoxMessageLoggingVo queryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询意见箱-意见沟通记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 意见箱-意见沟通记录分页列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<BusComplaintBoxMessageLoggingVo> queryPageList(BusComplaintBoxMessageLoggingBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的意见箱-意见沟通记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 意见箱-意见沟通记录列表
|
|
||||||
*/
|
|
||||||
List<BusComplaintBoxMessageLoggingVo> queryList(BusComplaintBoxMessageLoggingBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见沟通记录
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
Boolean insertAppByBo(BusComplaintBoxMessageLoggingBo bo);
|
|
||||||
/**
|
|
||||||
* 新增意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见沟通记录
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
Boolean insertWebByBo(BusComplaintBoxMessageLoggingBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见沟通记录
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(BusComplaintBoxMessageLoggingBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除意见箱-意见沟通记录信息
|
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过意见id获取沟通记录
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<BusComplaintBoxMessageLoggingVo> getMessageLogListByComplaintId(Long id);
|
|
||||||
}
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
package org.dromara.complaintBox.service;
|
|
||||||
|
|
||||||
import org.dromara.complaintBox.app.domain.vo.AppDetailsOfTheOpinionVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxVo;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxBo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBox;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import org.dromara.complaintBox.domain.vo.ComplaintBoxCountVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.DetailsOfTheOpinionVo;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱Service接口
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
public interface IBusComplaintBoxService extends IService<BusComplaintBox>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 意见箱
|
|
||||||
*/
|
|
||||||
BusComplaintBoxVo queryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询意见箱列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 意见箱分页列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<BusComplaintBoxVo> queryPageList(BusComplaintBoxBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的意见箱列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 意见箱列表
|
|
||||||
*/
|
|
||||||
List<BusComplaintBoxVo> queryList(BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱
|
|
||||||
*
|
|
||||||
* @param bo 意见箱
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
Boolean insertByBo(BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见箱
|
|
||||||
*
|
|
||||||
* @param bo 意见箱
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除意见箱信息
|
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* app获取当前用户提出意见列表
|
|
||||||
* @param bo
|
|
||||||
* @param pageQuery
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
TableDataInfo<BusComplaintBoxVo> appQueryPageList(BusComplaintBoxBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* APP获取当前意见详情
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
AppDetailsOfTheOpinionVo appQueryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前意见详情
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
DetailsOfTheOpinionVo getInfo(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改沟通记录阅读状态
|
|
||||||
* @param bo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int editCheckStatus(BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web获取各个处理状态数量
|
|
||||||
* @param bo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ComplaintBoxCountVo> getCount(BusComplaintBoxBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见状态
|
|
||||||
* @param bo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int editStatus(BusComplaintBoxBo bo);
|
|
||||||
}
|
|
||||||
@ -1,134 +0,0 @@
|
|||||||
package org.dromara.complaintBox.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxDisposeLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxDisposeLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxDisposeLogging;
|
|
||||||
import org.dromara.complaintBox.mapper.BusComplaintBoxDisposeLoggingMapper;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxDisposeLoggingService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见处理记录Service业务层处理
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class BusComplaintBoxDisposeLoggingServiceImpl extends ServiceImpl<BusComplaintBoxDisposeLoggingMapper, BusComplaintBoxDisposeLogging> implements IBusComplaintBoxDisposeLoggingService {
|
|
||||||
|
|
||||||
private final BusComplaintBoxDisposeLoggingMapper baseMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱-意见处理记录
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 意见箱-意见处理记录
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BusComplaintBoxDisposeLoggingVo queryById(Long id){
|
|
||||||
return baseMapper.selectVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询意见箱-意见处理记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 意见箱-意见处理记录分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<BusComplaintBoxDisposeLoggingVo> queryPageList(BusComplaintBoxDisposeLoggingBo bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<BusComplaintBoxDisposeLogging> lqw = buildQueryWrapper(bo);
|
|
||||||
Page<BusComplaintBoxDisposeLoggingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的意见箱-意见处理记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 意见箱-意见处理记录列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<BusComplaintBoxDisposeLoggingVo> queryList(BusComplaintBoxDisposeLoggingBo bo) {
|
|
||||||
LambdaQueryWrapper<BusComplaintBoxDisposeLogging> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<BusComplaintBoxDisposeLogging> buildQueryWrapper(BusComplaintBoxDisposeLoggingBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<BusComplaintBoxDisposeLogging> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.orderByDesc(BusComplaintBoxDisposeLogging::getCreateTime);
|
|
||||||
lqw.eq(bo.getComplaintId() != null, BusComplaintBoxDisposeLogging::getComplaintId, bo.getComplaintId());
|
|
||||||
lqw.eq(bo.getUserId() != null, BusComplaintBoxDisposeLogging::getUserId, bo.getUserId());
|
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getUserName()), BusComplaintBoxDisposeLogging::getUserName, bo.getUserName());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getIsRefund()), BusComplaintBoxDisposeLogging::getIsRefund, bo.getIsRefund());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱-意见处理记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见处理记录
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertByBo(BusComplaintBoxDisposeLoggingBo bo) {
|
|
||||||
BusComplaintBoxDisposeLogging add = MapstructUtils.convert(bo, BusComplaintBoxDisposeLogging.class);
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见箱-意见处理记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见处理记录
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(BusComplaintBoxDisposeLoggingBo bo) {
|
|
||||||
BusComplaintBoxDisposeLogging update = MapstructUtils.convert(bo, BusComplaintBoxDisposeLogging.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(BusComplaintBoxDisposeLogging entity){
|
|
||||||
//TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除意见箱-意见处理记录信息
|
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,223 +0,0 @@
|
|||||||
package org.dromara.complaintBox.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBox;
|
|
||||||
import org.dromara.complaintBox.mapper.BusComplaintBoxMapper;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxService;
|
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
|
||||||
import org.dromara.system.service.ISysUserService;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxMessageLoggingBo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxMessageLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxMessageLogging;
|
|
||||||
import org.dromara.complaintBox.mapper.BusComplaintBoxMessageLoggingMapper;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxMessageLoggingService;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱-意见沟通记录Service业务层处理
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class BusComplaintBoxMessageLoggingServiceImpl extends ServiceImpl<BusComplaintBoxMessageLoggingMapper, BusComplaintBoxMessageLogging> implements IBusComplaintBoxMessageLoggingService {
|
|
||||||
|
|
||||||
private final BusComplaintBoxMessageLoggingMapper baseMapper;
|
|
||||||
@Lazy
|
|
||||||
private final ISysUserService sysUserService;
|
|
||||||
// @Lazy
|
|
||||||
private final BusComplaintBoxMapper busComplaintBoxMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 意见箱-意见沟通记录
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BusComplaintBoxMessageLoggingVo queryById(Long id){
|
|
||||||
return baseMapper.selectVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询意见箱-意见沟通记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 意见箱-意见沟通记录分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<BusComplaintBoxMessageLoggingVo> queryPageList(BusComplaintBoxMessageLoggingBo bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<BusComplaintBoxMessageLogging> lqw = buildQueryWrapper(bo);
|
|
||||||
Page<BusComplaintBoxMessageLoggingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的意见箱-意见沟通记录列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 意见箱-意见沟通记录列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<BusComplaintBoxMessageLoggingVo> queryList(BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
LambdaQueryWrapper<BusComplaintBoxMessageLogging> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<BusComplaintBoxMessageLogging> buildQueryWrapper(BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<BusComplaintBoxMessageLogging> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.orderByDesc(BusComplaintBoxMessageLogging::getId);
|
|
||||||
lqw.eq(bo.getComplaintId() != null, BusComplaintBoxMessageLogging::getComplaintId, bo.getComplaintId());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDetails()), BusComplaintBoxMessageLogging::getDetails, bo.getDetails());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BusComplaintBoxMessageLogging::getStatus, bo.getStatus());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见沟通记录
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertAppByBo(BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
|
||||||
if (loginUser == null) {
|
|
||||||
throw new ServiceException("登录信息出错,请重新登录!!!");
|
|
||||||
}
|
|
||||||
BusComplaintBox busComplaintBox = busComplaintBoxMapper.selectById(bo.getComplaintId());
|
|
||||||
if (busComplaintBox == null) {
|
|
||||||
throw new ServiceException("意见信息找不到!!!");
|
|
||||||
}
|
|
||||||
if ("14".equals(busComplaintBox.getStatus()) || "9".equals(busComplaintBox.getStatus())) {
|
|
||||||
throw new ServiceException("意见已关闭!!!");
|
|
||||||
}
|
|
||||||
SysUserVo sysUserVo = sysUserService.selectUserById(loginUser.getUserId());
|
|
||||||
bo.setReplyUserId(sysUserVo.getUserId());
|
|
||||||
bo.setReplyUserName(sysUserVo.getNickName());
|
|
||||||
bo.setReplyAvatar(sysUserVo.getAvatar());
|
|
||||||
BusComplaintBoxMessageLogging add = MapstructUtils.convert(bo, BusComplaintBoxMessageLogging.class);
|
|
||||||
if (busComplaintBox.getCurrentDisposeUserId() != null) {
|
|
||||||
SysUserVo userVo = sysUserService.selectUserById(busComplaintBox.getCurrentDisposeUserId());
|
|
||||||
if (userVo != null) {
|
|
||||||
add.setRepliedUserId(userVo.getUserId());
|
|
||||||
add.setRepliedUserName(userVo.getUserName());
|
|
||||||
add.setRepliedAvatar(userVo.getAvatar());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public Boolean insertWebByBo(BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
|
||||||
if (loginUser == null) {
|
|
||||||
throw new ServiceException("登录信息出错,请重新登录!!!");
|
|
||||||
}
|
|
||||||
BusComplaintBox busComplaintBox = busComplaintBoxMapper.selectById(bo.getComplaintId());
|
|
||||||
if (busComplaintBox == null) {
|
|
||||||
throw new ServiceException("意见信息找不到!!!");
|
|
||||||
}
|
|
||||||
if (busComplaintBox.getCurrentDisposeUserId()!= null && !loginUser.getUserId().equals(busComplaintBox.getCurrentDisposeUserId())) {
|
|
||||||
throw new ServiceException("处理人异常");
|
|
||||||
}
|
|
||||||
if ("0".equals(busComplaintBox.getStatus())){
|
|
||||||
throw new ServiceException("意见未处理,不能发布信息");
|
|
||||||
}
|
|
||||||
if ("14".equals(busComplaintBox.getStatus()) || "9".equals(busComplaintBox.getStatus())) {
|
|
||||||
throw new ServiceException("意见已关闭!!!");
|
|
||||||
}
|
|
||||||
SysUserVo sysUserVo = sysUserService.selectUserById(loginUser.getUserId());
|
|
||||||
bo.setReplyUserId(sysUserVo.getUserId());
|
|
||||||
bo.setReplyUserName(sysUserVo.getNickName());
|
|
||||||
bo.setReplyAvatar(sysUserVo.getAvatar());
|
|
||||||
BusComplaintBoxMessageLogging add = MapstructUtils.convert(bo, BusComplaintBoxMessageLogging.class);
|
|
||||||
add.setRepliedUserId(busComplaintBox.getUserId());
|
|
||||||
add.setRepliedUserName(busComplaintBox.getUserName());
|
|
||||||
add.setRepliedAvatar(busComplaintBox.getAvatar());
|
|
||||||
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
// if ("0".equals(busComplaintBox.getStatus())){
|
|
||||||
// busComplaintBox.setStatus("5");
|
|
||||||
// busComplaintBox.setCurrentDisposeUserId(sysUserVo.getUserId());
|
|
||||||
// busComplaintBoxMapper.updateById(busComplaintBox);
|
|
||||||
// }
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见箱-意见沟通记录
|
|
||||||
*
|
|
||||||
* @param bo 意见箱-意见沟通记录
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(BusComplaintBoxMessageLoggingBo bo) {
|
|
||||||
BusComplaintBoxMessageLogging update = MapstructUtils.convert(bo, BusComplaintBoxMessageLogging.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(BusComplaintBoxMessageLogging entity){
|
|
||||||
//TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除意见箱-意见沟通记录信息
|
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据意见id获取沟通记录
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<BusComplaintBoxMessageLoggingVo> getMessageLogListByComplaintId(Long id) {
|
|
||||||
return baseMapper.selectVoList(new LambdaQueryWrapper<BusComplaintBoxMessageLogging>().eq(BusComplaintBoxMessageLogging::getComplaintId, id));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,380 +0,0 @@
|
|||||||
package org.dromara.complaintBox.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
|
||||||
import org.dromara.complaintBox.app.domain.vo.AppDetailsOfTheOpinionVo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxDisposeLogging;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBoxMessageLogging;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxMessageLoggingVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.ComplaintBoxCountVo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.DetailsOfTheOpinionVo;
|
|
||||||
import org.dromara.complaintBox.mapper.BusComplaintBoxMessageLoggingMapper;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxDisposeLoggingService;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxMessageLoggingService;
|
|
||||||
import org.dromara.system.domain.vo.SysDeptVo;
|
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
|
||||||
import org.dromara.system.service.ISysDeptService;
|
|
||||||
import org.dromara.system.service.ISysOssService;
|
|
||||||
import org.dromara.system.service.ISysUserService;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.dromara.complaintBox.domain.bo.BusComplaintBoxBo;
|
|
||||||
import org.dromara.complaintBox.domain.vo.BusComplaintBoxVo;
|
|
||||||
import org.dromara.complaintBox.domain.BusComplaintBox;
|
|
||||||
import org.dromara.complaintBox.mapper.BusComplaintBoxMapper;
|
|
||||||
import org.dromara.complaintBox.service.IBusComplaintBoxService;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 意见箱Service业务层处理
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-11-29
|
|
||||||
*/
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class BusComplaintBoxServiceImpl extends ServiceImpl<BusComplaintBoxMapper, BusComplaintBox> implements IBusComplaintBoxService {
|
|
||||||
|
|
||||||
private final BusComplaintBoxMapper baseMapper;
|
|
||||||
// @Lazy
|
|
||||||
private final BusComplaintBoxMessageLoggingMapper messageLoggingMapper;
|
|
||||||
@Lazy
|
|
||||||
@Resource
|
|
||||||
private ISysUserService sysUserService;
|
|
||||||
@Lazy
|
|
||||||
@Resource
|
|
||||||
private ISysDeptService sysDeptService;
|
|
||||||
@Lazy
|
|
||||||
@Resource
|
|
||||||
private ISysOssService sysOssService;
|
|
||||||
@Lazy
|
|
||||||
@Resource
|
|
||||||
private IBusComplaintBoxDisposeLoggingService disposeLoggingService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询意见箱
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return 意见箱
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BusComplaintBoxVo queryById(Long id){
|
|
||||||
return baseMapper.selectVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询意见箱列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @param pageQuery 分页参数
|
|
||||||
* @return 意见箱分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<BusComplaintBoxVo> queryPageList(BusComplaintBoxBo bo, PageQuery pageQuery) {
|
|
||||||
Page<BusComplaintBoxVo> result = baseMapper.selectVoPageWebList(pageQuery.build(), bo);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的意见箱列表
|
|
||||||
*
|
|
||||||
* @param bo 查询条件
|
|
||||||
* @return 意见箱列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<BusComplaintBoxVo> queryList(BusComplaintBoxBo bo) {
|
|
||||||
LambdaQueryWrapper<BusComplaintBox> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<BusComplaintBox> buildQueryWrapper(BusComplaintBoxBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<BusComplaintBox> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.orderByDesc(BusComplaintBox::getId);
|
|
||||||
lqw.eq(bo.getCompanyId() != null, BusComplaintBox::getCompanyId, bo.getCompanyId());
|
|
||||||
lqw.eq(bo.getProjectId() != null, BusComplaintBox::getProjectId, bo.getProjectId());
|
|
||||||
lqw.eq(bo.getUserId() != null, BusComplaintBox::getUserId, bo.getUserId());
|
|
||||||
lqw.eq(bo.getCurrentDisposeUserId() != null,
|
|
||||||
BusComplaintBox::getCurrentDisposeUserId, bo.getCurrentDisposeUserId())
|
|
||||||
.or()
|
|
||||||
.isNull(BusComplaintBox::getCurrentDisposeUserId);
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), BusComplaintBox::getTitle, bo.getTitle());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getOpinionType()), BusComplaintBox::getOpinionType, bo.getOpinionType());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDetail()), BusComplaintBox::getDetail, bo.getDetail());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), BusComplaintBox::getFileId, bo.getFileId());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getIsCryptonym()), BusComplaintBox::getIsCryptonym, bo.getIsCryptonym());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BusComplaintBox::getStatus, bo.getStatus());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增意见箱
|
|
||||||
*
|
|
||||||
* @param bo 意见箱
|
|
||||||
* @return 是否新增成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertByBo(BusComplaintBoxBo bo) {
|
|
||||||
BusComplaintBox add = MapstructUtils.convert(bo, BusComplaintBox.class);
|
|
||||||
//获取用户信息进行填充
|
|
||||||
SysUserVo sysUserVo = sysUserService.selectUserById(add.getUserId());
|
|
||||||
add.setAvatar(sysUserVo.getAvatar());
|
|
||||||
add.setUserName(sysUserVo.getNickName());
|
|
||||||
//获取部门信息
|
|
||||||
SysDeptVo sysDeptVo =sysDeptService.selectDeptById(sysUserVo.getDeptId());
|
|
||||||
if (sysDeptVo != null) {
|
|
||||||
String[] split = sysDeptVo.getAncestors().split(",");
|
|
||||||
if (split.length > 0) {
|
|
||||||
//当祖级列表长度大于3时取第2个作为公司id
|
|
||||||
if (split.length > 1) {
|
|
||||||
add.setCompanyId(Long.parseLong(split[1]));
|
|
||||||
}else {
|
|
||||||
add.setCompanyId(Long.parseLong(split[0]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改意见箱
|
|
||||||
*
|
|
||||||
* @param bo 意见箱
|
|
||||||
* @return 是否修改成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(BusComplaintBoxBo bo) {
|
|
||||||
BusComplaintBox update = MapstructUtils.convert(bo, BusComplaintBox.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(BusComplaintBox entity){
|
|
||||||
//TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除意见箱信息
|
|
||||||
*
|
|
||||||
* @param ids 待删除的主键集合
|
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* app获取当前用户提出意见列表
|
|
||||||
* @param bo
|
|
||||||
* @param pageQuery
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<BusComplaintBoxVo> appQueryPageList(BusComplaintBoxBo bo, PageQuery pageQuery) {
|
|
||||||
Page<BusComplaintBoxVo> result = baseMapper.selectVoPageList(pageQuery.build(), bo);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* app获取当前意见详情
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public AppDetailsOfTheOpinionVo appQueryById(Long id) {
|
|
||||||
AppDetailsOfTheOpinionVo vo = new AppDetailsOfTheOpinionVo();
|
|
||||||
BusComplaintBoxVo busComplaintBoxVo = baseMapper.selectVoById(id);
|
|
||||||
if(busComplaintBoxVo == null){
|
|
||||||
throw new ServiceException("找不到意见信息!!!");
|
|
||||||
}
|
|
||||||
if (busComplaintBoxVo.getAvatar() != null){
|
|
||||||
SysOssVo ossVo = sysOssService.getById(busComplaintBoxVo.getAvatar());
|
|
||||||
if (ossVo != null){
|
|
||||||
busComplaintBoxVo.setAvatarUrl(ossVo.getUrl());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (busComplaintBoxVo.getFileId() != null){
|
|
||||||
String[] split = busComplaintBoxVo.getFileId().split(",");
|
|
||||||
List<Long> fileIds = Arrays.stream(split)
|
|
||||||
.filter(str -> str != null && !str.trim().isEmpty()) // 过滤空值和空白字符串
|
|
||||||
.map(str -> {
|
|
||||||
try {
|
|
||||||
return Long.valueOf(str.trim());
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
// 转换失败时可返回null,后续再过滤
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter(Objects::nonNull) // 过滤转换失败的null值
|
|
||||||
.toList();
|
|
||||||
List<SysOssVo> sysOssVos = sysOssService.listByIds(fileIds);
|
|
||||||
List<String> urls = new ArrayList<>();
|
|
||||||
sysOssVos.forEach(sysOssVo -> {
|
|
||||||
if (sysOssVo != null){
|
|
||||||
urls.add(sysOssVo.getUrl());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
busComplaintBoxVo.setFileUrls(urls);
|
|
||||||
}
|
|
||||||
vo.setBusComplaintBoxVo(busComplaintBoxVo);
|
|
||||||
List<BusComplaintBoxMessageLoggingVo> messageLoggingVos = messageLoggingMapper.selectVoList(new LambdaQueryWrapper<BusComplaintBoxMessageLogging>().eq(BusComplaintBoxMessageLogging::getComplaintId, id));
|
|
||||||
if(CollectionUtils.isNotEmpty(messageLoggingVos)){
|
|
||||||
messageLoggingVos.forEach(mvo->{
|
|
||||||
if (mvo.getReplyAvatar() != null){
|
|
||||||
SysOssVo ossVo = sysOssService.getById(mvo.getReplyAvatar());
|
|
||||||
if (ossVo != null){
|
|
||||||
mvo.setReplyAvatarUrl(ossVo.getUrl());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mvo.getRepliedAvatar() != null){
|
|
||||||
SysOssVo ossVo = sysOssService.getById(mvo.getRepliedAvatar());
|
|
||||||
if (ossVo != null){
|
|
||||||
mvo.setRepliedAvatarUrl(ossVo.getUrl());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
vo.setMessageLoggingVos(messageLoggingVos);
|
|
||||||
}
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DetailsOfTheOpinionVo getInfo(Long id) {
|
|
||||||
DetailsOfTheOpinionVo vo = new DetailsOfTheOpinionVo();
|
|
||||||
BusComplaintBoxVo busComplaintBoxVo = baseMapper.selectVoById(id);
|
|
||||||
if(busComplaintBoxVo == null){
|
|
||||||
throw new ServiceException("找不到意见信息!!!");
|
|
||||||
}
|
|
||||||
vo.setBusComplaintBoxVo(busComplaintBoxVo);
|
|
||||||
List<BusComplaintBoxMessageLoggingVo> messageLoggingVos = messageLoggingMapper.selectVoList(new LambdaQueryWrapper<BusComplaintBoxMessageLogging>().eq(BusComplaintBoxMessageLogging::getComplaintId, id));
|
|
||||||
if(CollectionUtils.isNotEmpty(messageLoggingVos)){
|
|
||||||
messageLoggingVos.forEach(messageLoggingVo->{
|
|
||||||
messageLoggingVo.setType(messageLoggingVo.getReplyUserId().equals(busComplaintBoxVo.getUserId()) ? 0 : 1);
|
|
||||||
if (messageLoggingVo.getReplyAvatar() != null){
|
|
||||||
SysOssVo ossVo = sysOssService.getById(messageLoggingVo.getReplyAvatar());
|
|
||||||
if (ossVo != null){
|
|
||||||
messageLoggingVo.setReplyAvatarUrl(ossVo.getUrl());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (messageLoggingVo.getRepliedAvatar() != null){
|
|
||||||
SysOssVo ossVo = sysOssService.getById(messageLoggingVo.getRepliedAvatar());
|
|
||||||
if (ossVo != null){
|
|
||||||
messageLoggingVo.setRepliedAvatarUrl(ossVo.getUrl());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
vo.setMessageLoggingVos(messageLoggingVos);
|
|
||||||
}
|
|
||||||
return vo;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* app修改沟通记录阅读状态
|
|
||||||
* @param bo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int editCheckStatus(BusComplaintBoxBo bo) {
|
|
||||||
if (bo.getId() == null || bo.getUserId() == null) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
Long count = messageLoggingMapper.selectCount(new LambdaQueryWrapper<BusComplaintBoxMessageLogging>()
|
|
||||||
.eq(BusComplaintBoxMessageLogging::getStatus,"0")
|
|
||||||
.eq(BusComplaintBoxMessageLogging::getComplaintId, bo.getId())
|
|
||||||
.eq(BusComplaintBoxMessageLogging::getRepliedUserId, bo.getUserId()));
|
|
||||||
if (count == 0) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return messageLoggingMapper.update(new LambdaUpdateWrapper<BusComplaintBoxMessageLogging>()
|
|
||||||
.set(BusComplaintBoxMessageLogging::getStatus,"1")
|
|
||||||
.eq(BusComplaintBoxMessageLogging::getComplaintId,bo.getId())
|
|
||||||
.eq(BusComplaintBoxMessageLogging::getRepliedUserId,bo.getUserId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ComplaintBoxCountVo> getCount(BusComplaintBoxBo bo) {
|
|
||||||
|
|
||||||
return baseMapper.getCount(bo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public int editStatus(BusComplaintBoxBo bo) {
|
|
||||||
if (bo.getStatus() == null){
|
|
||||||
throw new ServiceException("意见状态不能为空");
|
|
||||||
}
|
|
||||||
BusComplaintBoxVo busComplaintBoxVo = baseMapper.selectVoById(bo.getId());
|
|
||||||
if (busComplaintBoxVo == null){
|
|
||||||
throw new ServiceException("找不到意见!!");
|
|
||||||
}
|
|
||||||
if ("14".equals(busComplaintBoxVo.getStatus())){
|
|
||||||
throw new ServiceException("该意见已经关闭,不允许再修改状态");
|
|
||||||
}
|
|
||||||
LambdaUpdateWrapper<BusComplaintBox> lqw = new LambdaUpdateWrapper<BusComplaintBox>();
|
|
||||||
lqw.set(BusComplaintBox::getStatus, bo.getStatus());
|
|
||||||
lqw.eq(BusComplaintBox::getId, bo.getId());
|
|
||||||
if ("5".equals(bo.getStatus())){
|
|
||||||
BusComplaintBoxDisposeLogging logging = new BusComplaintBoxDisposeLogging();
|
|
||||||
logging.setComplaintId(bo.getId());
|
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
|
||||||
SysUserVo sysUserVo = sysUserService.selectUserById(loginUser.getUserId());
|
|
||||||
if (sysUserVo == null){
|
|
||||||
throw new ServiceException("找不到当前登录用户信息!");
|
|
||||||
}
|
|
||||||
lqw.set(BusComplaintBox::getCurrentDisposeUserId, loginUser.getUserId());
|
|
||||||
logging.setUserId(loginUser.getUserId());
|
|
||||||
logging.setUserName(sysUserVo.getNickName());
|
|
||||||
logging.setAvatar(sysUserVo.getAvatar());
|
|
||||||
disposeLoggingService.save(logging);
|
|
||||||
}
|
|
||||||
if ("0".equals(bo.getStatus())){
|
|
||||||
lqw.set(BusComplaintBox::getCurrentDisposeUserId, null);
|
|
||||||
BusComplaintBoxDisposeLogging logging = disposeLoggingService.getBaseMapper()
|
|
||||||
.selectOne(new LambdaQueryWrapper<BusComplaintBoxDisposeLogging>()
|
|
||||||
.eq(BusComplaintBoxDisposeLogging::getComplaintId, bo.getId())
|
|
||||||
.eq(BusComplaintBoxDisposeLogging::getUserId, busComplaintBoxVo.getCurrentDisposeUserId())
|
|
||||||
.eq(BusComplaintBoxDisposeLogging::getIsRefund, "0"));
|
|
||||||
if (logging == null){
|
|
||||||
throw new ServiceException("找不到处理人记录");
|
|
||||||
}
|
|
||||||
logging.setIsRefund("1");
|
|
||||||
logging.setCause(bo.getCause());
|
|
||||||
disposeLoggingService.updateById(logging);
|
|
||||||
}
|
|
||||||
return baseMapper.update(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
package org.dromara.contractor.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.common.core.domain.R;
|
|
||||||
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.web.core.BaseController;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineSendInfoUserReq;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineUserQueryReq;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineUserRemoveReq;
|
|
||||||
import org.dromara.contractor.domain.vo.SubAttendanceMachineUserVo;
|
|
||||||
import org.dromara.contractor.service.ISubAttendanceMachineUserService;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包考勤机用户
|
|
||||||
*
|
|
||||||
* @author lilemy
|
|
||||||
* @date 2025-11-21 15:38
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/contractor/attendanceMachineUser")
|
|
||||||
public class SubAttendanceMachineUserController extends BaseController {
|
|
||||||
|
|
||||||
private final ISubAttendanceMachineUserService subAttendanceMachineUserService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询考勤机用户列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("contractor:attendanceMachineUser:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public R<List<SubAttendanceMachineUserVo>> list(SubAttendanceMachineUserQueryReq req) {
|
|
||||||
return R.ok(subAttendanceMachineUserService.queryList(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下发用户到考勤机中
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("contractor:attendanceMachineUser:add")
|
|
||||||
@Log(title = "分包考勤机用户", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping("/send")
|
|
||||||
public R<String> sendPersonInfo(@Validated @RequestBody SubAttendanceMachineSendInfoUserReq req) {
|
|
||||||
return R.ok(subAttendanceMachineUserService.sendPersonInfo(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除考勤机用户
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("contractor:attendanceMachineUser:add")
|
|
||||||
@Log(title = "分包考勤机用户", businessType = BusinessType.DELETE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@DeleteMapping()
|
|
||||||
public R<Void> remove(@Validated @RequestBody SubAttendanceMachineUserRemoveReq req) {
|
|
||||||
return toAjax(subAttendanceMachineUserService.remove(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.contractor.controller;
|
package org.dromara.contractor.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.ExcelWriter;
|
import com.alibaba.excel.ExcelWriter;
|
||||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||||
@ -27,12 +26,9 @@ import org.dromara.common.web.core.BaseController;
|
|||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.SubConstructionUserFile;
|
import org.dromara.contractor.domain.SubConstructionUserFile;
|
||||||
import org.dromara.contractor.domain.dto.constructionuser.*;
|
import org.dromara.contractor.domain.dto.constructionuser.*;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.*;
|
import org.dromara.contractor.domain.vo.constructionuser.*;
|
||||||
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
|
||||||
import org.dromara.contractor.service.ISubConstructionUserFileService;
|
import org.dromara.contractor.service.ISubConstructionUserFileService;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
import org.dromara.contractor.service.ISubContractorService;
|
|
||||||
import org.dromara.project.domain.dto.project.BusProjectQueryReq;
|
import org.dromara.project.domain.dto.project.BusProjectQueryReq;
|
||||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
||||||
import org.dromara.project.domain.dto.projectteammember.BusProjectTeamMemberCreateReq;
|
import org.dromara.project.domain.dto.projectteammember.BusProjectTeamMemberCreateReq;
|
||||||
@ -79,8 +75,6 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
private final IdCardEncryptorUtil idCardEncryptorUtil;
|
private final IdCardEncryptorUtil idCardEncryptorUtil;
|
||||||
private final ISubConstructionUserFileService constructionUserFileService;
|
private final ISubConstructionUserFileService constructionUserFileService;
|
||||||
|
|
||||||
private final ISubContractorService contractorService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询施工人员列表
|
* 查询施工人员列表
|
||||||
*/
|
*/
|
||||||
@ -90,15 +84,6 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
return constructionUserService.queryPageList(req, pageQuery);
|
return constructionUserService.queryPageList(req, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询分包单位列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/subContractorList")
|
|
||||||
public TableDataInfo<SubContractorVo> list(SubContractorQueryReq req, PageQuery pageQuery) {
|
|
||||||
return contractorService.queryPageList(req, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新人池
|
* 新人池
|
||||||
@ -123,7 +108,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询每个施工人员总的考勤列表
|
* 查询每个施工人员总的考勤列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"contractor:constructionUser:listAttendanceTotal", "project:attendance:listAttendanceTotal"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"contractor:constructionUser:listAttendanceTotal", "project:attendance:listAttendanceTotal"})
|
||||||
@GetMapping("/list/attendance/total")
|
@GetMapping("/list/attendance/total")
|
||||||
public TableDataInfo<SubConstructionUserAttendanceTotalVo> listAttendanceTotal(SubConstructionUserAttendanceQueryReq req,
|
public TableDataInfo<SubConstructionUserAttendanceTotalVo> listAttendanceTotal(SubConstructionUserAttendanceQueryReq req,
|
||||||
PageQuery pageQuery) {
|
PageQuery pageQuery) {
|
||||||
@ -155,7 +140,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("contractor:constructionUser:query")
|
@SaCheckPermission("contractor:constructionUser:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<SubConstructionUserVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<SubConstructionUserVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -247,7 +232,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 施工人员迁移
|
* 施工人员迁移
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("contractor:constructionUser:change")
|
@SaCheckPermission("contractor:constructionUser:edit")
|
||||||
@Log(title = "施工人员", businessType = BusinessType.UPDATE)
|
@Log(title = "施工人员", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping("/change/project")
|
@PutMapping("/change/project")
|
||||||
@ -269,9 +254,9 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目班组列表 contractor:constructionUser:newUserList
|
* 查询项目班组列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"project:projectTeam:addTeam", "contractor:constructionUser:newUserList","contractor:constructionUser:addTeam"}, mode = SaMode.OR)
|
@SaCheckPermission("project:projectTeam:addTeam")
|
||||||
@GetMapping("/projectList")
|
@GetMapping("/projectList")
|
||||||
public TableDataInfo<BusProjectVo> list(BusProjectQueryReq req, PageQuery pageQuery) {
|
public TableDataInfo<BusProjectVo> list(BusProjectQueryReq req, PageQuery pageQuery) {
|
||||||
return projectService.queryPageList(req, pageQuery);
|
return projectService.queryPageList(req, pageQuery);
|
||||||
@ -280,7 +265,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目班组列表
|
* 查询项目班组列表
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("project:projectTeam:addTeam")
|
@SaCheckPermission("project:projectTeam:addTeam")
|
||||||
@GetMapping("/teamList")
|
@GetMapping("/teamList")
|
||||||
public TableDataInfo<BusProjectTeamVo> teamList(BusProjectTeamQueryReq req, PageQuery pageQuery) {
|
public TableDataInfo<BusProjectTeamVo> teamList(BusProjectTeamQueryReq req, PageQuery pageQuery) {
|
||||||
return busProjectTeamService.queryPageList(req, pageQuery);
|
return busProjectTeamService.queryPageList(req, pageQuery);
|
||||||
@ -289,7 +274,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 添加项目班组
|
* 添加项目班组
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"project:projectTeam:addTeam", "contractor:constructionUser:addTeam"}, mode = SaMode.OR)
|
@SaCheckPermission("project:projectTeam:addTeam")
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/addTeam")
|
@PostMapping("/addTeam")
|
||||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody BusProjectTeamMemberCreateReq req) {
|
public R<Long> add(@Validated(AddGroup.class) @RequestBody BusProjectTeamMemberCreateReq req) {
|
||||||
@ -412,7 +397,6 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
vo.setUploadFile("部分上传");
|
vo.setUploadFile("部分上传");
|
||||||
}
|
}
|
||||||
dataList.add(vo);
|
dataList.add(vo);
|
||||||
order++;
|
|
||||||
}
|
}
|
||||||
// 写入当前Sheet的数据
|
// 写入当前Sheet的数据
|
||||||
excelWriter.write(dataList, writeSheet);
|
excelWriter.write(dataList, writeSheet);
|
||||||
@ -457,9 +441,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
} else {
|
} else {
|
||||||
vo.setUploadFile("部分上传");
|
vo.setUploadFile("部分上传");
|
||||||
}
|
}
|
||||||
vo.setTeamName(null);
|
|
||||||
dataList.add(vo);
|
dataList.add(vo);
|
||||||
order++;
|
|
||||||
}
|
}
|
||||||
// 写入当前Sheet的数据
|
// 写入当前Sheet的数据
|
||||||
excelWriter.write(dataList, writeSheet);
|
excelWriter.write(dataList, writeSheet);
|
||||||
|
|||||||
@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工人员文件存储
|
* 施工人员文件存储
|
||||||
@ -40,27 +39,12 @@ public class SubConstructionUserFileController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询施工人员文件存储列表
|
* 查询施工人员文件存储列表
|
||||||
*/
|
*/
|
||||||
//@SaCheckPermission(value = {"project:constructionUserFile:list", "contractor:constructionUserFile:list"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"project:constructionUserFile:list", "contractor:constructionUserFile:list"}, mode = SaMode.OR)
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<List<SubConstructionUserFileVo>> list(SubConstructionUserFileQueryReq req) {
|
public R<List<SubConstructionUserFileVo>> list(SubConstructionUserFileQueryReq req) {
|
||||||
return R.ok(constructionUserFileService.queryList(req));
|
return R.ok(constructionUserFileService.queryList(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载用户文件的ZIP(按类型分文件夹)
|
|
||||||
* @param userId 用户ID
|
|
||||||
*/
|
|
||||||
@GetMapping("/downloadFiles")
|
|
||||||
public void downloadUserFilesByType(Long userId,String type, HttpServletResponse response) {
|
|
||||||
try {
|
|
||||||
constructionUserFileService.generateTypeGroupZip(userId,type, response);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出施工人员文件存储列表
|
* 导出施工人员文件存储列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.contractor.controller;
|
package org.dromara.contractor.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -95,8 +94,7 @@ public class SubContractorController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改分包单位
|
* 修改分包单位
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"contractor:contractor:edit", "contractor:contractor:save"}
|
@SaCheckPermission("contractor:contractor:edit")
|
||||||
, mode = SaMode.OR)
|
|
||||||
@Log(title = "分包单位", businessType = BusinessType.UPDATE)
|
@Log(title = "分包单位", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.contractor.controller;
|
package org.dromara.contractor.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -39,9 +38,9 @@ public class SubSubcontractController extends BaseController {
|
|||||||
private ISubSubcontractService subcontractService;
|
private ISubSubcontractService subcontractService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包合同列表 project:projectTeam:addTeam
|
* 查询分包合同列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission(value = {"contractor:subcontract:list", "project:projectTeam:addTeam"}, mode = SaMode.OR)
|
@SaCheckPermission("contractor:subcontract:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<SubSubcontractVo> list(SubSubcontractQueryReq req, PageQuery pageQuery) {
|
public TableDataInfo<SubSubcontractVo> list(SubSubcontractQueryReq req, PageQuery pageQuery) {
|
||||||
return subcontractService.queryPageList(req, pageQuery);
|
return subcontractService.queryPageList(req, pageQuery);
|
||||||
|
|||||||
@ -77,19 +77,17 @@ public class SubUserSalaryDetailController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 工资计算与导出
|
* 工资计算与导出
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("contractor:userSalaryDetail:salaryPageList")
|
|
||||||
@GetMapping("/salaryPageList")
|
@GetMapping("/salaryPageList")
|
||||||
public TableDataInfo<SubConstructionUserSalaryVo> salaryPageList( SubConstructionUserSalaryDto dto, PageQuery pageQuery) {
|
public TableDataInfo<SubConstructionUserSalaryVo> salaryPageList( SubConstructionUserSalaryDto dto, PageQuery pageQuery) {
|
||||||
return subUserSalaryDetailService.salaryPageList(dto, pageQuery);
|
return subUserSalaryDetailService.salaryPageList(dto, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SaCheckPermission("contractor:userSalaryDetail:export")
|
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public void export(HttpServletResponse response, SubConstructionUserSalaryDto dto) throws IOException {
|
public void export(HttpServletResponse response, SubConstructionUserSalaryDto dto) throws IOException {
|
||||||
subUserSalaryDetailService.export(response, dto);
|
subUserSalaryDetailService.export(response, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SaCheckPermission("contractor:userSalaryDetail:import")
|
|
||||||
@PutMapping("/import")
|
@PutMapping("/import")
|
||||||
@RepeatSubmit(interval = 1, timeUnit = TimeUnit.MINUTES,message = "正在导入,请勿重复提交")
|
@RepeatSubmit(interval = 1, timeUnit = TimeUnit.MINUTES,message = "正在导入,请勿重复提交")
|
||||||
public R<Boolean> importData(@RequestParam("file") MultipartFile file) {
|
public R<Boolean> importData(@RequestParam("file") MultipartFile file) {
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
package org.dromara.contractor.domain.dto.attendancemachineuser;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lilemy
|
|
||||||
* @date 2025-11-21 15:36
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SubAttendanceMachineSendInfoUserReq implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = -6517799483848691652L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤机主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "考勤机不能为空")
|
|
||||||
private Long machineId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID列表
|
|
||||||
*/
|
|
||||||
@NotNull(message = "用户列表不能为空")
|
|
||||||
private List<Long> userIds;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
package org.dromara.contractor.domain.dto.attendancemachineuser;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lilemy
|
|
||||||
* @date 2025-11-21 15:36
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SubAttendanceMachineUserQueryReq implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = -1629819732452840391L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤机主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "考勤机不能为空")
|
|
||||||
private Long machineId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "项目不能为空")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "分包不能为空")
|
|
||||||
private Long contractorId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户名称
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标识(是否下发)
|
|
||||||
*/
|
|
||||||
private Integer identifying;
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
package org.dromara.contractor.domain.dto.attendancemachineuser;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lilemy
|
|
||||||
* @date 2025-11-21 15:36
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SubAttendanceMachineUserRemoveReq implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = -8880884070612972760L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤机主键ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "考勤机不能为空")
|
|
||||||
private Long machineId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID列表
|
|
||||||
*/
|
|
||||||
@NotNull(message = "用户列表不能为空")
|
|
||||||
private List<Long> userIds;
|
|
||||||
}
|
|
||||||
@ -34,11 +34,4 @@ public class SubConstructionUserChangeProjectReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@NotNull(message = "分包公司id不能为空")
|
@NotNull(message = "分包公司id不能为空")
|
||||||
private Long contractorId;
|
private Long contractorId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工种
|
|
||||||
*/
|
|
||||||
private String typeOfWork;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,15 +9,12 @@ import org.dromara.common.excel.convert.ExcelDictConvert;
|
|||||||
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 org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.vo.constructionuserfile.SubConstructionUserFileVo;
|
|
||||||
import org.dromara.project.domain.vo.constructionuserexit.BusConstructionUserExitVo;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -298,29 +295,5 @@ public class SubConstructionUserVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long sysUserId;
|
private Long sysUserId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 岗位(默认为0普通员工,1组长)
|
|
||||||
*/
|
|
||||||
private String postId;
|
private String postId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包管理人员ID
|
|
||||||
*/
|
|
||||||
private String fbId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包管理人员名称
|
|
||||||
*/
|
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "fbId")
|
|
||||||
private String fbName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件
|
|
||||||
*/
|
|
||||||
List<SubConstructionUserFileVo> subConstructionUserFileVos;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 记录
|
|
||||||
*/
|
|
||||||
List<BusConstructionUserExitVo> busConstructionUserExitVos;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
package org.dromara.contractor.service;
|
|
||||||
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineSendInfoUserReq;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineUserQueryReq;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineUserRemoveReq;
|
|
||||||
import org.dromara.contractor.domain.vo.SubAttendanceMachineUserVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包考勤机用户Service接口
|
|
||||||
*
|
|
||||||
* @author lilemy
|
|
||||||
* @date 2025-11-21 15:33
|
|
||||||
*/
|
|
||||||
public interface ISubAttendanceMachineUserService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的考勤机用户列表
|
|
||||||
*
|
|
||||||
* @param req 查询条件
|
|
||||||
* @return 考勤机用户列表
|
|
||||||
*/
|
|
||||||
List<SubAttendanceMachineUserVo> queryList(SubAttendanceMachineUserQueryReq req);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下发用户到考勤机中
|
|
||||||
*
|
|
||||||
* @param req 下发用户参数
|
|
||||||
* @return 下发结果
|
|
||||||
*/
|
|
||||||
String sendPersonInfo(SubAttendanceMachineSendInfoUserReq req);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除考勤机用户
|
|
||||||
*
|
|
||||||
* @param req 删除参数
|
|
||||||
* @return 删除结果
|
|
||||||
*/
|
|
||||||
Boolean remove(SubAttendanceMachineUserRemoveReq req);
|
|
||||||
}
|
|
||||||
@ -9,7 +9,6 @@ import org.dromara.contractor.domain.dto.constructionuserfile.SubConstructionUse
|
|||||||
import org.dromara.contractor.domain.dto.constructionuserfile.SubConstructionUserFileSaveReq;
|
import org.dromara.contractor.domain.dto.constructionuserfile.SubConstructionUserFileSaveReq;
|
||||||
import org.dromara.contractor.domain.dto.constructionuserfile.SubConstructionUserFileTemplateReq;
|
import org.dromara.contractor.domain.dto.constructionuserfile.SubConstructionUserFileTemplateReq;
|
||||||
import org.dromara.contractor.domain.vo.constructionuserfile.SubConstructionUserFileVo;
|
import org.dromara.contractor.domain.vo.constructionuserfile.SubConstructionUserFileVo;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -83,12 +82,4 @@ public interface ISubConstructionUserFileService extends IService<SubConstructio
|
|||||||
|
|
||||||
|
|
||||||
Map<String,String> getFileByUserId(Long userId);
|
Map<String,String> getFileByUserId(Long userId);
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取施工人员文件列表
|
|
||||||
*/
|
|
||||||
Map<String,List<SubConstructionUserFileVo>> fileList(Long userId);
|
|
||||||
|
|
||||||
|
|
||||||
void generateTypeGroupZip(Long userId,String type, HttpServletResponse response) throws Exception;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,182 +0,0 @@
|
|||||||
package org.dromara.contractor.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.dromara.common.core.constant.HttpStatus;
|
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineSendInfoUserReq;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineUserQueryReq;
|
|
||||||
import org.dromara.contractor.domain.dto.attendancemachineuser.SubAttendanceMachineUserRemoveReq;
|
|
||||||
import org.dromara.contractor.domain.vo.SubAttendanceMachineUserVo;
|
|
||||||
import org.dromara.contractor.service.ISubAttendanceMachineUserService;
|
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
|
||||||
import org.dromara.mobileAttendanceMachine.DeviceMessageSender;
|
|
||||||
import org.dromara.mobileAttendanceMachine.KqjEntity;
|
|
||||||
import org.dromara.project.domain.BusAttendanceMachine;
|
|
||||||
import org.dromara.project.service.IBusAttendanceMachineService;
|
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
|
||||||
import org.dromara.system.service.ISysOssService;
|
|
||||||
import org.dromara.system.service.ISysUserService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包考勤机用户Service业务层处理
|
|
||||||
*
|
|
||||||
* @author lilemy
|
|
||||||
* @date 2025-11-21 15:35
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
|
||||||
public class SubAttendanceMachineUserServiceImpl implements ISubAttendanceMachineUserService {
|
|
||||||
|
|
||||||
private final IBusAttendanceMachineService attendanceMachineService;
|
|
||||||
|
|
||||||
private final DeviceMessageSender deviceMessageSender;
|
|
||||||
|
|
||||||
private final ISubConstructionUserService constructionUserService;
|
|
||||||
|
|
||||||
private final ISysUserService userService;
|
|
||||||
|
|
||||||
private final ISysOssService ossService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的考勤机用户列表
|
|
||||||
*
|
|
||||||
* @param req 查询条件
|
|
||||||
* @return 考勤机用户列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<SubAttendanceMachineUserVo> queryList(SubAttendanceMachineUserQueryReq req) {
|
|
||||||
List<SysUserVo> userVoList = userService.selectFbUserList(req.getProjectId(), List.of(req.getContractorId()), req.getUserName());
|
|
||||||
if (CollUtil.isEmpty(userVoList)) {
|
|
||||||
return CollUtil.newArrayList();
|
|
||||||
}
|
|
||||||
BusAttendanceMachine machine = attendanceMachineService.getById(req.getMachineId());
|
|
||||||
if (machine == null) {
|
|
||||||
throw new ServiceException("考勤机不存在", HttpStatus.NOT_FOUND);
|
|
||||||
}
|
|
||||||
// 判断选择分包和考勤机是否一致
|
|
||||||
if (StringUtils.isBlank(machine.getContractors())) {
|
|
||||||
throw new ServiceException("考勤机未绑定分包", HttpStatus.NOT_FOUND);
|
|
||||||
}
|
|
||||||
if (!Arrays.stream(machine.getContractors().split(","))
|
|
||||||
.map(Long::parseLong)
|
|
||||||
.collect(Collectors.toSet()).contains(req.getContractorId())) {
|
|
||||||
throw new ServiceException("所选分包与考勤机不匹配", HttpStatus.NOT_FOUND);
|
|
||||||
}
|
|
||||||
// 获取考勤机里的用户
|
|
||||||
Set<String> userIdList = new HashSet<>();
|
|
||||||
try {
|
|
||||||
KqjEntity.CommonResponse response = deviceMessageSender.getAllUsers(machine.getSn());
|
|
||||||
int code = response.getData().getCode();
|
|
||||||
if (code == 0 || code == 200) {
|
|
||||||
log.info("获取考勤机数据成功:{}", response.getData());
|
|
||||||
String[] userIds = response.getData().getUserIds();
|
|
||||||
userIdList = Arrays.stream(userIds).collect(Collectors.toSet());
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("获取考勤机用户失败,sn:{}", machine.getSn(), e);
|
|
||||||
throw new ServiceException("获取考勤机用户失败", HttpStatus.ERROR);
|
|
||||||
}
|
|
||||||
Set<String> finalUserIdList = userIdList;
|
|
||||||
return userVoList.stream().map(userVo -> {
|
|
||||||
SubAttendanceMachineUserVo vo = new SubAttendanceMachineUserVo();
|
|
||||||
vo.setMachineId(req.getMachineId());
|
|
||||||
vo.setContractorId(req.getContractorId());
|
|
||||||
vo.setUserId(userVo.getUserId());
|
|
||||||
vo.setUserName(userVo.getNickName());
|
|
||||||
if (CollUtil.isEmpty(finalUserIdList)) {
|
|
||||||
vo.setIdentifying(0);
|
|
||||||
} else if (finalUserIdList.contains(userVo.getUserId().toString())) {
|
|
||||||
vo.setIdentifying(1);
|
|
||||||
} else {
|
|
||||||
vo.setIdentifying(0);
|
|
||||||
}
|
|
||||||
return vo;
|
|
||||||
}).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下发用户到考勤机中
|
|
||||||
*
|
|
||||||
* @param req 下发用户参数
|
|
||||||
* @return 下发结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String sendPersonInfo(SubAttendanceMachineSendInfoUserReq req) {
|
|
||||||
Long machineId = req.getMachineId();
|
|
||||||
List<Long> userIds = req.getUserIds();
|
|
||||||
BusAttendanceMachine machine = attendanceMachineService.getById(machineId);
|
|
||||||
if (machine == null) {
|
|
||||||
throw new ServiceException("考勤机不存在");
|
|
||||||
}
|
|
||||||
List<SubConstructionUser> userList = constructionUserService.lambdaQuery()
|
|
||||||
.in(SubConstructionUser::getSysUserId, userIds)
|
|
||||||
.list();
|
|
||||||
// 获取用户人脸照信息
|
|
||||||
List<Long> faceIds = userList.stream().map(SubConstructionUser::getFacePic).map(Long::parseLong).distinct().toList();
|
|
||||||
List<SysOssVo> ossVos = ossService.listByIds(faceIds);
|
|
||||||
Map<Long, SysOssVo> ossVoMap = ossVos.stream()
|
|
||||||
.collect(Collectors.toMap(SysOssVo::getOssId, v -> v));
|
|
||||||
// 返回数据
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("用户:[");
|
|
||||||
int count = 0;
|
|
||||||
for (SubConstructionUser user : userList) {
|
|
||||||
String facePic = user.getFacePic();
|
|
||||||
if (StringUtils.isBlank(facePic)) {
|
|
||||||
sb.append(user.getUserName()).append(" ");
|
|
||||||
count++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SysOssVo ossVo = ossVoMap.get(Long.parseLong(facePic));
|
|
||||||
if (ossVo == null) {
|
|
||||||
sb.append(user.getUserName()).append(" ");
|
|
||||||
count++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
Boolean result = deviceMessageSender.sendPersonnelInformation(machine.getSn(),
|
|
||||||
user.getSysUserId().toString(), user.getUserName(), ossVo.getUrl());
|
|
||||||
log.info("考勤机 Sn:{} ,用户:{} 下发成功", machine.getSn(), user.getUserName());
|
|
||||||
if (!result) {
|
|
||||||
sb.append(user.getUserName()).append(" ");
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sb.append("] 下发失败");
|
|
||||||
return count == 0 ? "下发成功" : sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除考勤机用户
|
|
||||||
*
|
|
||||||
* @param req 删除参数
|
|
||||||
* @return 删除结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean remove(SubAttendanceMachineUserRemoveReq req) {
|
|
||||||
Long machineId = req.getMachineId();
|
|
||||||
List<Long> userIds = req.getUserIds();
|
|
||||||
BusAttendanceMachine machine = attendanceMachineService.getById(machineId);
|
|
||||||
if (machine == null) {
|
|
||||||
throw new ServiceException("考勤机不存在", HttpStatus.NOT_FOUND);
|
|
||||||
}
|
|
||||||
String[] userIdArray = userIds.stream()
|
|
||||||
.map(String::valueOf) // 将 Long 转成 String
|
|
||||||
.toArray(String[]::new);
|
|
||||||
try {
|
|
||||||
KqjEntity.CommonResponse response = deviceMessageSender.batchDeleteUsers(machine.getSn(), userIdArray);
|
|
||||||
return response.getData().getCode() == 0 || response.getData().getCode() == 200;
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new ServiceException("删除考勤机用户失败", HttpStatus.ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -45,9 +45,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -234,7 +231,7 @@ public class SubConstructionUserFileServiceImpl extends ServiceImpl<SubConstruct
|
|||||||
.select(SubConstructionUser::getId, SubConstructionUser::getSysUserId,
|
.select(SubConstructionUser::getId, SubConstructionUser::getSysUserId,
|
||||||
SubConstructionUser::getUserName, SubConstructionUser::getSfzNumber)
|
SubConstructionUser::getUserName, SubConstructionUser::getSfzNumber)
|
||||||
.eq(SubConstructionUser::getProjectId, projectId)
|
.eq(SubConstructionUser::getProjectId, projectId)
|
||||||
.eq(SubConstructionUser::getUserRole, "0")
|
.eq( SubConstructionUser::getUserRole, "0")
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isEmpty(allUserList)) {
|
if (CollUtil.isEmpty(allUserList)) {
|
||||||
throw new ServiceException("项目下无施工人员");
|
throw new ServiceException("项目下无施工人员");
|
||||||
@ -274,7 +271,7 @@ public class SubConstructionUserFileServiceImpl extends ServiceImpl<SubConstruct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollUtil.isEmpty(constructionUserFileList)) {
|
if (CollUtil.isEmpty(constructionUserFileList)) {
|
||||||
throw new ServiceException("未找到施工人员文件");
|
return true;
|
||||||
}
|
}
|
||||||
// 9. 判断是否已经存在
|
// 9. 判断是否已经存在
|
||||||
List<Long> userIdList = constructionUserFileList.stream().map(SubConstructionUserFile::getUserId).toList();
|
List<Long> userIdList = constructionUserFileList.stream().map(SubConstructionUserFile::getUserId).toList();
|
||||||
@ -473,94 +470,6 @@ public class SubConstructionUserFileServiceImpl extends ServiceImpl<SubConstruct
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, List<SubConstructionUserFileVo>> fileList(Long userId) {
|
|
||||||
|
|
||||||
List<SubConstructionUserFileVo> subConstructionUserFileVos = baseMapper.selectVoList(Wrappers.<SubConstructionUserFile>lambdaQuery()
|
|
||||||
.eq(SubConstructionUserFile::getUserId, userId));
|
|
||||||
Map<String, List<SubConstructionUserFileVo>> resultMap = subConstructionUserFileVos.stream().collect(Collectors.groupingBy(SubConstructionUserFileVo::getFileType));
|
|
||||||
return resultMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void generateTypeGroupZip(Long userId,String type, HttpServletResponse response) throws Exception {
|
|
||||||
|
|
||||||
// 1. 查询该用户的所有文件
|
|
||||||
List<SubConstructionUserFile> list = lambdaQuery()
|
|
||||||
.eq(SubConstructionUserFile::getUserId, userId)
|
|
||||||
.eq(StrUtil.isNotBlank(type),SubConstructionUserFile::getFileType, type)
|
|
||||||
.list();
|
|
||||||
if (list.isEmpty()) {
|
|
||||||
throw new ServiceException("该用户没有文件");
|
|
||||||
}
|
|
||||||
List<SysDictDataVo> userFileType = dictTypeService.selectDictDataByType("user_file_type");
|
|
||||||
Map<String, String> collect = userFileType.stream().collect(Collectors.toMap(SysDictDataVo::getDictValue, SysDictDataVo::getDictLabel));
|
|
||||||
|
|
||||||
// 3. 设置响应头(ZIP文件下载)
|
|
||||||
response.setContentType("application/zip");
|
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"user_files.zip\"");
|
|
||||||
|
|
||||||
// 4. 压缩流直接写入响应(无临时文件)
|
|
||||||
try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) {
|
|
||||||
// 遍历每个文件类型分组
|
|
||||||
for (SubConstructionUserFile entry : list) {
|
|
||||||
String fileType = entry.getFileType(); // 文件夹名称:文件类型(如"01")
|
|
||||||
|
|
||||||
String fileTypeName = collect.get(fileType);
|
|
||||||
|
|
||||||
String fileUrl = entry.getPath();
|
|
||||||
if (StringUtils.isBlank(fileUrl)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String[] split = fileUrl.split(",");
|
|
||||||
List<Long> ossIds = Arrays.stream(split).map(Long::valueOf).toList();
|
|
||||||
List<SysOssVo> sysOssVos = ossService.listByIds(ossIds);
|
|
||||||
for (SysOssVo sysOssVo : sysOssVos) {
|
|
||||||
String ossVoUrl = sysOssVo.getUrl();
|
|
||||||
if (StringUtils.isBlank(ossVoUrl)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String zipEntryName = fileTypeName + "/" + sysOssVo.getOriginalName();
|
|
||||||
ZipEntry zipEntry = new ZipEntry(zipEntryName);
|
|
||||||
zipOut.putNextEntry(zipEntry);
|
|
||||||
// 下载远程文件并写入ZIP
|
|
||||||
URL url = new URL(ossVoUrl);
|
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
|
||||||
connection.setRequestMethod("GET");
|
|
||||||
connection.setConnectTimeout(5000);
|
|
||||||
connection.setReadTimeout(10000);
|
|
||||||
|
|
||||||
try (InputStream in = connection.getInputStream()) {
|
|
||||||
byte[] buffer = new byte[1024 * 8];
|
|
||||||
int len;
|
|
||||||
while ((len = in.read(buffer)) != -1) {
|
|
||||||
zipOut.write(buffer, 0, len);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
connection.disconnect();
|
|
||||||
zipOut.closeEntry(); // 关闭当前条目
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 递归扫描指定目录,找到 “姓名-Id” 格式的文件夹并解析
|
* 递归扫描指定目录,找到 “姓名-Id” 格式的文件夹并解析
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.dromara.common.core.constant.DateConstant;
|
import org.dromara.common.core.constant.DateConstant;
|
||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.enums.UserType;
|
import org.dromara.common.core.enums.UserType;
|
||||||
@ -38,11 +37,9 @@ import org.dromara.contractor.domain.SubConstructionUser;
|
|||||||
import org.dromara.contractor.domain.SubConstructionUserFile;
|
import org.dromara.contractor.domain.SubConstructionUserFile;
|
||||||
import org.dromara.contractor.domain.SubContractor;
|
import org.dromara.contractor.domain.SubContractor;
|
||||||
import org.dromara.contractor.domain.dto.constructionuser.*;
|
import org.dromara.contractor.domain.dto.constructionuser.*;
|
||||||
import org.dromara.contractor.domain.dto.constructionuserfile.SubConstructionUserFileQueryReq;
|
|
||||||
import org.dromara.contractor.domain.enums.SubConstructionUserFileStatusEnum;
|
import org.dromara.contractor.domain.enums.SubConstructionUserFileStatusEnum;
|
||||||
import org.dromara.contractor.domain.exportvo.BusConstructionUserExportVo;
|
import org.dromara.contractor.domain.exportvo.BusConstructionUserExportVo;
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.*;
|
import org.dromara.contractor.domain.vo.constructionuser.*;
|
||||||
import org.dromara.contractor.domain.vo.constructionuserfile.SubConstructionUserFileVo;
|
|
||||||
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
||||||
import org.dromara.contractor.mapper.SubConstructionUserMapper;
|
import org.dromara.contractor.mapper.SubConstructionUserMapper;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserFileService;
|
import org.dromara.contractor.service.ISubConstructionUserFileService;
|
||||||
@ -50,12 +47,11 @@ import org.dromara.contractor.service.ISubConstructionUserService;
|
|||||||
import org.dromara.contractor.service.ISubContractorService;
|
import org.dromara.contractor.service.ISubContractorService;
|
||||||
import org.dromara.project.domain.*;
|
import org.dromara.project.domain.*;
|
||||||
import org.dromara.project.domain.dto.attendance.TodayUserDto;
|
import org.dromara.project.domain.dto.attendance.TodayUserDto;
|
||||||
import org.dromara.project.domain.dto.constructionuserexit.BusConstructionUserExitQueryReq;
|
import org.dromara.project.domain.dto.attendance.TwoWeekDto;
|
||||||
import org.dromara.project.domain.enums.BusAttendanceClockStatusEnum;
|
import org.dromara.project.domain.enums.BusAttendanceClockStatusEnum;
|
||||||
import org.dromara.project.domain.enums.BusAttendanceCommuterEnum;
|
import org.dromara.project.domain.enums.BusAttendanceCommuterEnum;
|
||||||
import org.dromara.project.domain.enums.BusConstructionUserAttendanceStatusEnum;
|
import org.dromara.project.domain.enums.BusConstructionUserAttendanceStatusEnum;
|
||||||
import org.dromara.project.domain.vo.attendance.AttendanceTodayUserVo;
|
import org.dromara.project.domain.vo.attendance.AttendanceTodayUserVo;
|
||||||
import org.dromara.project.domain.vo.constructionuserexit.BusConstructionUserExitVo;
|
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
||||||
import org.dromara.project.service.*;
|
import org.dromara.project.service.*;
|
||||||
import org.dromara.system.domain.SysUser;
|
import org.dromara.system.domain.SysUser;
|
||||||
@ -91,7 +87,6 @@ import static org.dromara.project.domain.enums.BusAttendanceClockStatusEnum.ATTE
|
|||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-03-07
|
* @date 2025-03-07
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
|
||||||
@Service
|
@Service
|
||||||
public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionUserMapper, SubConstructionUser>
|
public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionUserMapper, SubConstructionUser>
|
||||||
implements ISubConstructionUserService {
|
implements ISubConstructionUserService {
|
||||||
@ -161,10 +156,6 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
@Resource
|
@Resource
|
||||||
private AsyncUtil asyncUtil;
|
private AsyncUtil asyncUtil;
|
||||||
|
|
||||||
@Resource
|
|
||||||
@Lazy
|
|
||||||
private IBusConstructionUserExitService busConstructionUserExitService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询施工人员
|
* 查询施工人员
|
||||||
@ -179,16 +170,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
if (constructionUser == null) {
|
if (constructionUser == null) {
|
||||||
throw new ServiceException("施工人员信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("施工人员信息不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
SubConstructionUserVo vo = this.getVo(constructionUser, isHidden);
|
return this.getVo(constructionUser, isHidden);
|
||||||
SubConstructionUserFileQueryReq req = new SubConstructionUserFileQueryReq();
|
|
||||||
req.setUserId(constructionUser.getSysUserId());
|
|
||||||
List<SubConstructionUserFileVo> subConstructionUserFileVos = constructionUserFileService.queryList(req);
|
|
||||||
vo.setSubConstructionUserFileVos(subConstructionUserFileVos);
|
|
||||||
BusConstructionUserExitQueryReq busConstructionUserExitQueryReq = new BusConstructionUserExitQueryReq();
|
|
||||||
busConstructionUserExitQueryReq.setUserId(constructionUser.getSysUserId());
|
|
||||||
List<BusConstructionUserExitVo> busConstructionUserExitVos = busConstructionUserExitService.queryList(busConstructionUserExitQueryReq);
|
|
||||||
vo.setBusConstructionUserExitVos(busConstructionUserExitVos);
|
|
||||||
return vo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -247,7 +229,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
try {
|
try {
|
||||||
decrypt = idCardEncryptorUtil.decrypt(decrypt);
|
decrypt = idCardEncryptorUtil.decrypt(decrypt);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("身份证解密失败:{}", vo.getUserName(), e);
|
log.warn("身份证解密失败");
|
||||||
}
|
}
|
||||||
subConstructionUserVo.setSfzNumber(decrypt);
|
subConstructionUserVo.setSfzNumber(decrypt);
|
||||||
return subConstructionUserVo;
|
return subConstructionUserVo;
|
||||||
@ -274,7 +256,6 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
constructionUser.setTypeOfWork(dto.getTypeOfWork());
|
constructionUser.setTypeOfWork(dto.getTypeOfWork());
|
||||||
constructionUser.setEntryDate(new Date());
|
constructionUser.setEntryDate(new Date());
|
||||||
constructionUser.setFirstDate(LocalDate.now());
|
constructionUser.setFirstDate(LocalDate.now());
|
||||||
constructionUser.setStatus("0");
|
|
||||||
|
|
||||||
int i = baseMapper.updateById(constructionUser);
|
int i = baseMapper.updateById(constructionUser);
|
||||||
|
|
||||||
@ -678,14 +659,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
LambdaUpdateWrapper<SubConstructionUser> lambdaUpdate = Wrappers.lambdaUpdate(SubConstructionUser.class)
|
LambdaUpdateWrapper<SubConstructionUser> lambdaUpdate = Wrappers.lambdaUpdate(SubConstructionUser.class)
|
||||||
.eq(SubConstructionUser::getId, id)
|
.eq(SubConstructionUser::getId, id)
|
||||||
.set(SubConstructionUser::getProjectId, req.getProjectId())
|
.set(SubConstructionUser::getProjectId, req.getProjectId())
|
||||||
.set(SubConstructionUser::getContractorId, req.getContractorId())
|
.set(SubConstructionUser::getContractorId, req.getContractorId());
|
||||||
.set(SubConstructionUser::getTypeOfWork, req.getTypeOfWork())
|
|
||||||
;
|
|
||||||
|
|
||||||
userProjectRelevancyService.deleteByUserId(constructionUser.getSysUserId());
|
|
||||||
|
|
||||||
roleService.deleteRoleByUserIdAndProjectId(constructionUser.getSysUserId(), req.getProjectId());
|
|
||||||
|
|
||||||
return this.update(lambdaUpdate);
|
return this.update(lambdaUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -914,22 +888,6 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
Integer age = Math.max(Period.between(sfzBirth, LocalDate.now()).getYears(), 0);
|
Integer age = Math.max(Period.between(sfzBirth, LocalDate.now()).getYears(), 0);
|
||||||
constructionUserVo.setAge(age);
|
constructionUserVo.setAge(age);
|
||||||
}
|
}
|
||||||
//班组信息
|
|
||||||
if (constructionUser.getTeamId() != null) {
|
|
||||||
BusProjectTeam byId = projectTeamService.getById(constructionUser.getTeamId());
|
|
||||||
if (byId != null) {
|
|
||||||
constructionUserVo.setTeamId(byId.getId());
|
|
||||||
constructionUserVo.setTeamName(byId.getTeamName());
|
|
||||||
constructionUserVo.setFbId(byId.getUserId());
|
|
||||||
BusProjectTeamMember one = projectTeamMemberService.getOne(Wrappers.<BusProjectTeamMember>lambdaQuery()
|
|
||||||
.eq(BusProjectTeamMember::getTeamId, constructionUser.getTeamId())
|
|
||||||
.last("limit 1")
|
|
||||||
);
|
|
||||||
if (one != null) {
|
|
||||||
constructionUserVo.setPostId(one.getPostId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return constructionUserVo;
|
return constructionUserVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1059,7 +1017,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
));
|
));
|
||||||
int fileTypeSize = dictTypeService.selectDictDataByType(SubConstructionUserConstant.USER_FILE_TYPE).size();
|
int fileTypeSize = dictTypeService.selectDictDataByType(SubConstructionUserConstant.USER_FILE_TYPE).size();
|
||||||
// 获取用户上传文件数量信息
|
// 获取用户上传文件数量信息
|
||||||
List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getSysUserId).toList();
|
List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getId).toList();
|
||||||
List<SubConstructionUserFile> fileList = constructionUserFileService.lambdaQuery()
|
List<SubConstructionUserFile> fileList = constructionUserFileService.lambdaQuery()
|
||||||
.select(SubConstructionUserFile::getId, SubConstructionUserFile::getUserId)
|
.select(SubConstructionUserFile::getId, SubConstructionUserFile::getUserId)
|
||||||
.in(SubConstructionUserFile::getUserId, userIdList)
|
.in(SubConstructionUserFile::getUserId, userIdList)
|
||||||
@ -1088,12 +1046,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
constructionUserVo.setStandardSalary(workWageMap.get(key));
|
constructionUserVo.setStandardSalary(workWageMap.get(key));
|
||||||
}
|
}
|
||||||
// 关联施工人员文件上传状态
|
// 关联施工人员文件上传状态
|
||||||
long count = fileCountMap.getOrDefault(constructionUser.getSysUserId(), 0L);
|
long count = fileCountMap.getOrDefault(constructionUser.getId(), 0L);
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.NOUPLOAD.getValue());
|
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.NOUPLOAD.getValue());
|
||||||
} else if (count < fileTypeSize) {
|
} else if (count < fileTypeSize) {
|
||||||
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.PARTUPLOAD.getValue());
|
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.PARTUPLOAD.getValue());
|
||||||
} else if (count >= fileTypeSize) {
|
} else if (count == fileTypeSize) {
|
||||||
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.UPLOAD.getValue());
|
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.UPLOAD.getValue());
|
||||||
}
|
}
|
||||||
// 解密身份证号码
|
// 解密身份证号码
|
||||||
@ -1295,7 +1253,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (attendanceUserIdList.contains(id)) {
|
if(attendanceUserIdList.contains(id)){
|
||||||
constructionUserAttendanceTotalResp.setClockToday(true);
|
constructionUserAttendanceTotalResp.setClockToday(true);
|
||||||
}
|
}
|
||||||
constructionUserAttendanceTotalResp.setAttendanceDays(attendanceDays);
|
constructionUserAttendanceTotalResp.setAttendanceDays(attendanceDays);
|
||||||
@ -1498,7 +1456,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
* 人脸识别
|
* 人脸识别
|
||||||
*
|
*
|
||||||
* @param file 图片文件
|
* @param file 图片文件
|
||||||
* @param userId 用户id
|
* @param userId
|
||||||
* @return 是否匹配成功
|
* @return 是否匹配成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -1506,7 +1464,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
String reqBase64 = this.getPicBase64(file);
|
String reqBase64 = this.getPicBase64(file);
|
||||||
HumanFaceReq request = new HumanFaceReq();
|
HumanFaceReq request = new HumanFaceReq();
|
||||||
request.setImage(reqBase64);
|
request.setImage(reqBase64);
|
||||||
if (userId == null) {
|
if(userId == null){
|
||||||
userId = LoginHelper.getUserId();
|
userId = LoginHelper.getUserId();
|
||||||
}
|
}
|
||||||
SubConstructionUser constructionUser = this.getBySysUserId(userId);
|
SubConstructionUser constructionUser = this.getBySysUserId(userId);
|
||||||
@ -1652,16 +1610,16 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
||||||
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
||||||
.isNotNull(SubConstructionUser::getTeamId);
|
.isNotNull(SubConstructionUser::getTeamId);
|
||||||
if ("1".equals(dto.getType())) {
|
if("1".equals(dto.getType())){
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
} else if ("2".equals(dto.getType())) {
|
}else if("2".equals(dto.getType())){
|
||||||
if (dto.getIsToday()) {
|
if(dto.getIsToday()){
|
||||||
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()), SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()),SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
} else {
|
}else {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
}else{
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1696,16 +1654,16 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
||||||
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
||||||
.isNotNull(SubConstructionUser::getTeamId);
|
.isNotNull(SubConstructionUser::getTeamId);
|
||||||
if ("1".equals(dto.getType())) {
|
if("1".equals(dto.getType())){
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
} else if ("2".equals(dto.getType())) {
|
}else if("2".equals(dto.getType())){
|
||||||
if (dto.getIsToday()) {
|
if(dto.getIsToday()){
|
||||||
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()), SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()),SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
} else {
|
}else {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
}else{
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,9 +31,7 @@ import org.dromara.project.service.IBusProjectService;
|
|||||||
import org.dromara.system.domain.SysUser;
|
import org.dromara.system.domain.SysUser;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.dromara.tender.domain.TenderSupplierInput;
|
import org.dromara.tender.domain.TenderSupplierInput;
|
||||||
//import org.dromara.tender.service.ITenderSupplierInputService;
|
import org.dromara.tender.service.ITenderSupplierInputService;
|
||||||
import org.dromara.xzd.domain.XzdSupplierInfo;
|
|
||||||
import org.dromara.xzd.service.IXzdSupplierInfoService;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -58,10 +56,8 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusProjectService projectService;
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
// @Resource
|
|
||||||
// private ITenderSupplierInputService supplierInputService;
|
|
||||||
@Resource
|
@Resource
|
||||||
private IXzdSupplierInfoService supplierInfoService;
|
private ITenderSupplierInputService supplierInputService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@Lazy
|
@Lazy
|
||||||
@ -199,7 +195,7 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
|
|||||||
if (StringUtils.isNotBlank(custodianPhone) && !PhoneUtil.isPhone(custodianPhone)) {
|
if (StringUtils.isNotBlank(custodianPhone) && !PhoneUtil.isPhone(custodianPhone)) {
|
||||||
throw new ServiceException("管理人手机号格式不正确", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("管理人手机号格式不正确", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isNotEmpty(supplierId) && supplierInfoService.getById(supplierId) == null) {
|
if (ObjectUtils.isNotEmpty(supplierId) && supplierInputService.getById(supplierId) == null) {
|
||||||
throw new ServiceException("供应商不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("供应商不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,9 +253,9 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
|
|||||||
// 关联供应商名称
|
// 关联供应商名称
|
||||||
Long supplierId = contractor.getSupplierId();
|
Long supplierId = contractor.getSupplierId();
|
||||||
if (supplierId != null) {
|
if (supplierId != null) {
|
||||||
XzdSupplierInfo supplierInfo = supplierInfoService.getById(supplierId);
|
TenderSupplierInput supplierInput = supplierInputService.getById(supplierId);
|
||||||
if (supplierInfo != null) {
|
if (supplierInput != null) {
|
||||||
contractorVo.setSupplierName(supplierInfo.getUnitName());
|
contractorVo.setSupplierName(supplierInput.getSupplierName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return contractorVo;
|
return contractorVo;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public class BusContactformtemplateController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询联系单模板列表(不分页)
|
* 查询联系单模板列表(不分页)
|
||||||
*/
|
*/
|
||||||
//@SaCheckPermission(value = {"cory:contactformtemplate:listNoPage", "cory:contactformtemplate:list"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"cory:contactformtemplate:listNoPage", "cory:contactformtemplate:list"}, mode = SaMode.OR)
|
||||||
@GetMapping("/listNoPage")
|
@GetMapping("/listNoPage")
|
||||||
public R<List<BusContactformtemplateVo>> listNoPage(BusContactformtemplateBo bo) {
|
public R<List<BusContactformtemplateVo>> listNoPage(BusContactformtemplateBo bo) {
|
||||||
return R.ok(busContactformtemplateService.queryList(bo));
|
return R.ok(busContactformtemplateService.queryList(bo));
|
||||||
|
|||||||
@ -83,7 +83,7 @@ public class BusContactnoticeController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改联系单
|
* 修改联系单
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("cory:contactnotice:edit")
|
@SaCheckPermission("cory:contactnotice:edit")
|
||||||
@Log(title = "联系单", businessType = BusinessType.UPDATE)
|
@Log(title = "联系单", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
|
|||||||
@ -46,7 +46,4 @@ public class BusContactnoticeBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@NotNull(message = "模板类型不能为空", groups = { QueryGroup.class })
|
@NotNull(message = "模板类型不能为空", groups = { QueryGroup.class })
|
||||||
private List<Long> types;
|
private List<Long> types;
|
||||||
|
|
||||||
|
|
||||||
private Long id;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public class BusBillofquantitiesVersionsController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取所有版本号
|
* 获取所有版本号
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:list")
|
@SaCheckPermission("design:billofquantitiesVersions:obtainAllVersionNumbers")
|
||||||
@GetMapping("/obtainAllVersionNumbers")
|
@GetMapping("/obtainAllVersionNumbers")
|
||||||
public TableDataInfo<BusBillofquantitiesVersionsVo> obtainAllVersionNumbers(ObtainAllVersionNumbersReq bo, PageQuery pageQuery) {
|
public TableDataInfo<BusBillofquantitiesVersionsVo> obtainAllVersionNumbers(ObtainAllVersionNumbersReq bo, PageQuery pageQuery) {
|
||||||
return busBillofquantitiesVersionsService.obtainAllVersionNumbers(bo, pageQuery);
|
return busBillofquantitiesVersionsService.obtainAllVersionNumbers(bo, pageQuery);
|
||||||
@ -76,7 +76,7 @@ public class BusBillofquantitiesVersionsController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取指定版本的sheet
|
* 获取指定版本的sheet
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:list")
|
@SaCheckPermission("design:billofquantitiesVersions:sheetList")
|
||||||
@GetMapping("/sheetList")
|
@GetMapping("/sheetList")
|
||||||
public R<List<String>> sheetList(SheetListReq bo) {
|
public R<List<String>> sheetList(SheetListReq bo) {
|
||||||
return R.ok(busBillofquantitiesVersionsService.sheetList(bo));
|
return R.ok(busBillofquantitiesVersionsService.sheetList(bo));
|
||||||
@ -85,7 +85,7 @@ public class BusBillofquantitiesVersionsController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取工程量清单列表
|
* 获取工程量清单列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:list")
|
@SaCheckPermission("design:billofquantitiesVersions:obtainTheList")
|
||||||
@GetMapping("/obtainTheList")
|
@GetMapping("/obtainTheList")
|
||||||
public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq bo, PageQuery pageQuery) {
|
public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq bo, PageQuery pageQuery) {
|
||||||
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
|
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
|
||||||
@ -114,7 +114,6 @@ public class BusBillofquantitiesVersionsController extends BaseController {
|
|||||||
* 导出工程量清单版本列表
|
* 导出工程量清单版本列表
|
||||||
*/
|
*/
|
||||||
@Log(title = "工程量清单版本", businessType = BusinessType.EXPORT)
|
@Log(title = "工程量清单版本", businessType = BusinessType.EXPORT)
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:export")
|
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(String versions,Long projectId, HttpServletResponse response) throws IOException {
|
public void export(String versions,Long projectId, HttpServletResponse response) throws IOException {
|
||||||
Map<String, List<BillOfQuantitiesExport>> sheetDataMap = busBillofquantitiesVersionsService.export(versions,projectId);
|
Map<String, List<BillOfQuantitiesExport>> sheetDataMap = busBillofquantitiesVersionsService.export(versions,projectId);
|
||||||
|
|||||||
@ -130,7 +130,7 @@ public class BusDrawingreviewController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目下的子项目列表
|
* 查询项目下的子项目列表
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:drawingreviewReceipts:subProjectList")
|
@SaCheckPermission("design:drawingreviewReceipts:subProjectList")
|
||||||
@GetMapping("/subProjectList/{id}")
|
@GetMapping("/subProjectList/{id}")
|
||||||
public R<List<BusSubProjectVo>> listSubProject(@NotNull(message = "项目id不能为空")
|
public R<List<BusSubProjectVo>> listSubProject(@NotNull(message = "项目id不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -98,7 +98,7 @@ public class BusDrawingreviewReceiptsController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:drawingreviewReceipts:query")
|
@SaCheckPermission("design:drawingreviewReceipts:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<BusDrawingreviewReceiptsVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<BusDrawingreviewReceiptsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -119,7 +119,7 @@ public class BusDrawingreviewReceiptsController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改设计-图纸评审验证
|
* 修改设计-图纸评审验证
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:drawingreviewReceipts:edit")
|
@SaCheckPermission("design:drawingreviewReceipts:edit")
|
||||||
@Log(title = "设计-图纸评审验证", businessType = BusinessType.UPDATE)
|
@Log(title = "设计-图纸评审验证", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
@ -163,8 +163,6 @@ public class BusDrawingreviewReceiptsController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
private static final String TEMPLATE_PATH = "template/设计验证表.docx";
|
private static final String TEMPLATE_PATH = "template/设计验证表.docx";
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/downloadWord")
|
@PostMapping("/downloadWord")
|
||||||
public void generateDesignLeaderDoc(Long id, HttpServletResponse response) {
|
public void generateDesignLeaderDoc(Long id, HttpServletResponse response) {
|
||||||
OutputStream outputStream = null;
|
OutputStream outputStream = null;
|
||||||
|
|||||||
@ -15,9 +15,6 @@ import org.dromara.design.domain.DesCollectCatalogue;
|
|||||||
import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto;
|
import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto;
|
||||||
import org.dromara.design.domain.vo.DesCollectCatalogueVo;
|
import org.dromara.design.domain.vo.DesCollectCatalogueVo;
|
||||||
//import org.dromara.design.handler.UserDropdownSheetWriteHandler;
|
//import org.dromara.design.handler.UserDropdownSheetWriteHandler;
|
||||||
import org.dromara.system.domain.bo.SysUserBo;
|
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
|
||||||
import org.dromara.system.service.ISysUserService;
|
|
||||||
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -49,7 +46,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
public class DesCollectController extends BaseController {
|
public class DesCollectController extends BaseController {
|
||||||
|
|
||||||
private final IDesCollectService desCollectService;
|
private final IDesCollectService desCollectService;
|
||||||
private final ISysUserService userService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询收资清单列表
|
* 查询收资清单列表
|
||||||
@ -60,13 +56,6 @@ public class DesCollectController extends BaseController {
|
|||||||
return desCollectService.queryPageList(bo, pageQuery);
|
return desCollectService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SaCheckPermission("design:collect:query")
|
|
||||||
@GetMapping("/userList")
|
|
||||||
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
|
|
||||||
return userService.selectPageUserList(user, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出收资清单列表
|
* 导出收资清单列表
|
||||||
*/
|
*/
|
||||||
@ -140,7 +129,7 @@ public class DesCollectController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param projectId 项目ID
|
* @param projectId 项目ID
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:collect:query")
|
@SaCheckPermission("design:collect:byProjectId")
|
||||||
@GetMapping("/byProjectId/{projectId}")
|
@GetMapping("/byProjectId/{projectId}")
|
||||||
public R<DesCollectVo> getInfoByProjectId(@NotNull(message = "项目ID不能为空")
|
public R<DesCollectVo> getInfoByProjectId(@NotNull(message = "项目ID不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import java.net.URLEncoder;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||||
@ -15,20 +14,14 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
|
||||||
import org.dromara.design.domain.DesCollect;
|
|
||||||
import org.dromara.design.domain.DesCollectFile;
|
import org.dromara.design.domain.DesCollectFile;
|
||||||
import org.dromara.design.domain.bo.DesCollectCatalogueBo;
|
|
||||||
import org.dromara.design.domain.bo.DesCollectFileBo;
|
import org.dromara.design.domain.bo.DesCollectFileBo;
|
||||||
import org.dromara.design.domain.dto.ExportDto;
|
import org.dromara.design.domain.dto.ExportDto;
|
||||||
import org.dromara.design.domain.dto.designchange.DesDesignExtendDetailDto;
|
import org.dromara.design.domain.dto.designchange.DesDesignExtendDetailDto;
|
||||||
import org.dromara.design.domain.vo.DesCollectCatalogueVo;
|
|
||||||
import org.dromara.design.domain.vo.DesCollectFileVo;
|
import org.dromara.design.domain.vo.DesCollectFileVo;
|
||||||
import org.dromara.design.domain.vo.DesCollectFileWordVo;
|
import org.dromara.design.domain.vo.DesCollectFileWordVo;
|
||||||
import org.dromara.design.domain.vo.designchange.DesDesignChangeVo;
|
import org.dromara.design.domain.vo.designchange.DesDesignChangeVo;
|
||||||
import org.dromara.design.service.IDesCollectCatalogueService;
|
|
||||||
import org.dromara.design.service.IDesCollectFileService;
|
import org.dromara.design.service.IDesCollectFileService;
|
||||||
import org.dromara.design.service.IDesCollectService;
|
|
||||||
import org.dromara.project.domain.BusProject;
|
import org.dromara.project.domain.BusProject;
|
||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
@ -63,21 +56,6 @@ public class DesCollectFileController extends BaseController {
|
|||||||
private final IDesCollectFileService desCollectFileService;
|
private final IDesCollectFileService desCollectFileService;
|
||||||
|
|
||||||
private final IBusProjectService projectService;
|
private final IBusProjectService projectService;
|
||||||
private final IDesCollectService desCollectService;
|
|
||||||
|
|
||||||
|
|
||||||
private final IDesCollectCatalogueService desCollectCatalogueService;
|
|
||||||
|
|
||||||
@SaCheckPermission("design:collectFile:list")
|
|
||||||
@GetMapping("/catalogueList")
|
|
||||||
public TableDataInfo<DesCollectCatalogueVo> list(DesCollectCatalogueBo bo, PageQuery pageQuery) {
|
|
||||||
DesCollect desCollect = desCollectService.getOne(Wrappers.lambdaQuery(DesCollect.class)
|
|
||||||
.eq(DesCollect::getProjectId, bo.getProjectId()).last("limit 1"));
|
|
||||||
if (desCollect == null || !BusinessStatusEnum.FINISH.getStatus().equals(desCollect.getStatus())) {
|
|
||||||
return TableDataInfo.build();
|
|
||||||
}
|
|
||||||
return desCollectCatalogueService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询收资文件列表
|
* 查询收资文件列表
|
||||||
@ -88,8 +66,6 @@ public class DesCollectFileController extends BaseController {
|
|||||||
return desCollectFileService.queryPageList(bo, pageQuery);
|
return desCollectFileService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出收资文件列表
|
* 导出收资文件列表
|
||||||
*/
|
*/
|
||||||
@ -166,7 +142,6 @@ public class DesCollectFileController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final String TEMPLATE_PATH = "template/设计输入资料清单及评审表.docx";
|
private static final String TEMPLATE_PATH = "template/设计输入资料清单及评审表.docx";
|
||||||
@SaCheckPermission("design:collectFile:downloadWord")
|
|
||||||
@PostMapping("/downloadWord")
|
@PostMapping("/downloadWord")
|
||||||
public void generateDesignLeaderDoc(Long projectId, HttpServletResponse response) {
|
public void generateDesignLeaderDoc(Long projectId, HttpServletResponse response) {
|
||||||
OutputStream outputStream = null;
|
OutputStream outputStream = null;
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public class DesConstructionSchedulePlanController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:constructionSchedulePlan:query")
|
@SaCheckPermission("design:constructionSchedulePlan:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<DesConstructionSchedulePlanVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<DesConstructionSchedulePlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -177,8 +177,6 @@ public class DesConstructionSchedulePlanController extends BaseController {
|
|||||||
|
|
||||||
private static final String TEMPLATE_RESOURCE_PATH = "template/CCCET-JL-CX-25设计计划表.docx";
|
private static final String TEMPLATE_RESOURCE_PATH = "template/CCCET-JL-CX-25设计计划表.docx";
|
||||||
// -------------------------- 2. 核心接口:修复单元格清空逻辑与数据填充 --------------------------
|
// -------------------------- 2. 核心接口:修复单元格清空逻辑与数据填充 --------------------------
|
||||||
|
|
||||||
@SaCheckPermission("design:constructionSchedulePlan:downloadWord")
|
|
||||||
@PostMapping("/downloadWord")
|
@PostMapping("/downloadWord")
|
||||||
public void fillCccetTemplate(Long projectId, HttpServletResponse response) {
|
public void fillCccetTemplate(Long projectId, HttpServletResponse response) {
|
||||||
// 1. 基础参数校验(避免空数据)
|
// 1. 基础参数校验(避免空数据)
|
||||||
|
|||||||
@ -97,7 +97,7 @@ public class DesDesignChangeController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:designChange:query")
|
@SaCheckPermission("design:designChange:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<DesDesignChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<DesDesignChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -118,7 +118,7 @@ public class DesDesignChangeController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改设计变更管理
|
* 修改设计变更管理
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:designChange:edit")
|
@SaCheckPermission("design:designChange:edit")
|
||||||
@Log(title = "设计变更管理", businessType = BusinessType.UPDATE)
|
@Log(title = "设计变更管理", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
@ -143,7 +143,7 @@ public class DesDesignChangeController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询选择卷册目录
|
* 查询选择卷册目录
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:designChange:catalogList")
|
@SaCheckPermission("design:designChange:catalogList")
|
||||||
@GetMapping("/catalogList/{projectId}")
|
@GetMapping("/catalogList/{projectId}")
|
||||||
public R<List<DesVolumeCatalogVo>> catalogList(@PathVariable("projectId") Long projectId) {
|
public R<List<DesVolumeCatalogVo>> catalogList(@PathVariable("projectId") Long projectId) {
|
||||||
return R.ok(desVolumeCatalogService.catalogList(projectId));
|
return R.ok(desVolumeCatalogService.catalogList(projectId));
|
||||||
@ -152,7 +152,7 @@ public class DesDesignChangeController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询选择目录下的蓝图
|
* 查询选择目录下的蓝图
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("design:designChange:blueprint")
|
@SaCheckPermission("design:designChange:blueprint")
|
||||||
@GetMapping("/blueprint/{volumeCatalogId}")
|
@GetMapping("/blueprint/{volumeCatalogId}")
|
||||||
public R<List<DesVolumeFile>> blueprint(@PathVariable("volumeCatalogId") Long volumeCatalogId) {
|
public R<List<DesVolumeFile>> blueprint(@PathVariable("volumeCatalogId") Long volumeCatalogId) {
|
||||||
List<DesVolumeFile> list = desVolumeFileService.list(Wrappers.lambdaQuery(DesVolumeFile.class)
|
List<DesVolumeFile> list = desVolumeFileService.list(Wrappers.lambdaQuery(DesVolumeFile.class)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user