192 Commits

Author SHA1 Message Date
zt
3b580788f1 Merge remote-tracking branch 'origin/updateMenu' into updateMenu 2025-12-12 18:16:20 +08:00
zt
7b6ff3bcc6 优化 2025-12-12 18:16:05 +08:00
zzz
8e5303838e 派单 2025-12-12 18:14:57 +08:00
28f92b6138 增值税发票excel导入 2025-12-12 18:10:42 +08:00
lcj
8ece9617d6 修改 bug 2025-12-12 17:46:35 +08:00
lcj
a5cf647f2b 修改bug 2025-12-12 17:12:04 +08:00
zzz
758e49973b 修改标后分析 2025-12-12 15:58:01 +08:00
zzz
876f8b700d 修改标后分析 2025-12-12 15:48:36 +08:00
zzz
53b777c7af 修改实用工具的模糊查询 2025-12-12 15:02:19 +08:00
5e749f6de6 新中大项目创建时添加建管项目修改 2025-12-12 14:54:35 +08:00
dcd0907cdd 12-12-修改收开票搜索条件 2025-12-12 11:58:04 +08:00
3f16621313 12-12-搭配角色流程列表修改 2025-12-12 11:28:02 +08:00
lcj
03b3c8141a 项目详情 2025-12-12 11:26:35 +08:00
zzz
509683386f 修改机械合同 2025-12-12 11:24:17 +08:00
e3b6c3d8d6 总体计划成本接口修改 2025-12-12 11:15:52 +08:00
29cdd7b3e7 总体计划成本接口修改 2025-12-12 10:40:47 +08:00
zzz
ee864c882a 修改税率 2025-12-12 10:08:30 +08:00
10e449c001 阶段成本分解接口修改 2025-12-12 09:41:22 +08:00
89d60dc528 阶段成本分解接口修改 2025-12-11 22:13:34 +08:00
zt
ce35086316 优化 2025-12-11 20:29:29 +08:00
e7376086f9 将供应商由建管转到新中大供应商,总体计划成本接口修改 2025-12-11 20:28:31 +08:00
zzz
4588f3f4c0 标后分析自动生成项目 2025-12-11 20:15:55 +08:00
lcj
97898aa395 修改权限 2025-12-11 18:56:57 +08:00
lcj
b4a7c6ba90 修改权限 2025-12-11 17:25:06 +08:00
4d6a225f96 12-11-权限修改,排除SuperAdmin 2025-12-11 16:38:31 +08:00
zzz
6d9b5a727d query权限去除 2025-12-11 11:42:25 +08:00
a79e08f6bc 12-11-大屏接口权限修改 2025-12-11 10:11:38 +08:00
lcj
e49ab63a0b 关联项目 2025-12-11 08:52:58 +08:00
lcj
2b3c86e763 Merge remote-tracking branch 'gitea/dev' into updateMenu 2025-12-10 19:02:01 +08:00
zt
1263b4812d 个人首页 2025-12-10 18:58:29 +08:00
lcj
755969b069 Merge branch 'dev' into updateMenu 2025-12-10 18:49:14 +08:00
lcj
dbe8556741 关联项目 2025-12-10 18:48:18 +08:00
lcj
b10e7b4ca1 修改配置 2025-12-10 17:18:03 +08:00
zt
844b3addf3 Merge remote-tracking branch 'origin/dev' into dev 2025-12-10 17:16:23 +08:00
zt
77532caf47 退出班组 2025-12-10 17:15:59 +08:00
lcj
ff9cc76ebc Merge remote-tracking branch 'gitea/updateMenu' into updateMenu 2025-12-10 15:59:50 +08:00
lcj
d125510267 Merge branch 'dev' into updateMenu 2025-12-10 15:56:18 +08:00
lcj
46ac312ddf 创建新项目 2025-12-10 15:53:31 +08:00
c45d98856e 12-10-修改事故 2025-12-10 15:52:05 +08:00
lcj
f2c0932e2e 修改bug 2025-12-10 10:58:25 +08:00
zt
b8334c7764 优化 2025-12-10 10:14:08 +08:00
c709e04c88 标前管理人员任命添加审核状态 2025-12-09 19:31:55 +08:00
509fc8cc28 标前管理-风险信息,人员任命修改 2025-12-09 18:59:18 +08:00
48338278f0 安全事故bug修改和意见箱bug修改 2025-12-09 18:50:20 +08:00
833ea7af7d 标前管理-风险信息,人员任命 2025-12-09 14:33:49 +08:00
f5cea23daa 安全事故接口优化 2025-12-09 09:06:35 +08:00
zt
a29c9c8d4d 优化 2025-12-08 19:57:28 +08:00
511bf33914 12-05-事故管理-事故上报、事故调查-修改-修改部门 2025-12-08 19:36:59 +08:00
4450f82717 12-05-事故管理-事故上报、事故调查-修改 2025-12-08 19:28:29 +08:00
lcj
f62c542684 项目对接 2025-12-08 19:10:04 +08:00
bb8c951651 安全事故接口优化 2025-12-08 18:51:31 +08:00
9f5b3918d0 12-05-事故管理-事故上报、事故调查 2025-12-08 18:48:53 +08:00
zrl
84d9291763 安全技术交底,监控修改 2025-12-08 15:52:24 +08:00
fcbc5a30c4 12-05-事故管理-事故上报、事故调查 2025-12-08 15:26:13 +08:00
zt
6f4eb21deb 危大 2025-12-08 10:43:09 +08:00
387a7488ab Merge branch 'dev' into updateMenu 2025-12-08 10:39:50 +08:00
lg
6819eb5f80 危大工程-技术交底,过程监控 2025-12-06 19:31:19 +08:00
lg
0f1ad34342 危大工程-技术交底,过程监控 2025-12-06 19:07:28 +08:00
zt
35d1cfc668 危大 2025-12-06 18:39:35 +08:00
zt
a6dc40760d 危大 2025-12-06 14:22:07 +08:00
2486bb4c6e 12-05-事故管理-事故上报 2025-12-05 20:47:10 +08:00
a59a452f89 Merge remote-tracking branch 'origin/dev' into dev 2025-12-05 20:10:20 +08:00
930bff6cba 安全事故初始化 2025-12-05 20:10:13 +08:00
lcj
70c9997c82 接入消息队列,处理延迟消息 2025-12-05 19:53:34 +08:00
lg
0db70d3d73 机械安全模块修改 2025-12-05 18:54:36 +08:00
zt
2884699ff2 bug 2025-12-05 18:53:33 +08:00
lcj
849eb802bc 隐患整改 2025-12-05 18:52:52 +08:00
4ce8ea6a3a 安全事故初始化 2025-12-05 16:59:41 +08:00
7e1db73fb0 意见箱修改 2025-12-05 16:45:22 +08:00
lcj
46299e5732 隐患整改 2025-12-05 14:24:17 +08:00
zt
6032869417 奖惩 2025-12-05 14:16:46 +08:00
lg
955d7e39e6 机械安全模块修改 2025-12-05 09:28:05 +08:00
lcj
ecc0595ec3 施工产值,隐患整改 2025-12-05 08:58:40 +08:00
6b22ed8b0a Merge remote-tracking branch 'origin/dev' into dev 2025-12-04 20:21:34 +08:00
9b7db3214e 12-04-人员定位-终版-优化版之修复版 2025-12-04 20:21:24 +08:00
zt
71b3c77028 奖惩 2025-12-04 20:08:53 +08:00
zt
c7bd709240 奖惩 2025-12-04 19:18:49 +08:00
lg
a80c38f87f 机械安全模块 2025-12-04 18:15:49 +08:00
7b91443532 Merge remote-tracking branch 'origin/dev' into dev 2025-12-04 16:27:29 +08:00
lcj
a9b9e12732 修改bug 2025-12-04 15:55:31 +08:00
99ecb29f3c 12-04-人员定位-终版-优化版 2025-12-04 15:39:06 +08:00
lg
4fe7a435c6 机械安全模块 2025-12-04 15:27:35 +08:00
zt
18be0f00a3 奖惩 2025-12-04 15:21:29 +08:00
67bbf94359 12-04-收票登记修改 2025-12-04 15:12:56 +08:00
lg
9dfea176b3 Merge remote-tracking branch 'origin/dev' into dev 2025-12-04 15:11:59 +08:00
lcj
09d3b06e7a 隐患整改 2025-12-04 15:11:27 +08:00
lg
8b60d13c0a 机械安全模块 2025-12-04 15:10:41 +08:00
188172692b 12-03-人员定位-终版 2025-12-04 14:31:48 +08:00
lcj
556f3b6535 隐患规则 2025-12-04 10:18:26 +08:00
0b81a8dc63 Merge remote-tracking branch 'origin/dev' into dev 2025-12-03 22:23:20 +08:00
982ec18490 12-03-人员定位-再版 2025-12-03 22:23:12 +08:00
0c38c42bfe 摄像头回放 2025-12-03 20:28:58 +08:00
zt
2f0b323680 顺序 2025-12-03 20:18:34 +08:00
zt
35d2a10c0e 顺序 2025-12-03 20:09:19 +08:00
zt
9c7f9ad980 隐患 2025-12-03 19:54:45 +08:00
79a2dbfcd3 12-03-人员定位-初版 2025-12-03 18:57:00 +08:00
lg
b5b7324f7c 模块添加 2025-12-03 17:14:31 +08:00
zt
b171ec6af0 隐患 2025-12-03 17:01:37 +08:00
lcj
85c7ded162 隐患规则 2025-12-03 17:00:43 +08:00
lcj
b39aa7be71 施工产值 2025-12-03 15:46:28 +08:00
8ae5614ce9 12-03-人员定位-柱状图数据 2025-12-03 09:34:45 +08:00
03cf7ebac7 12-01-人员定位 2025-12-02 21:57:46 +08:00
lg
3efa899a97 机械维护与故障 2025-12-02 19:07:26 +08:00
zt
bf1b9cf98f Merge branch 'refs/heads/dev' into updateMenu 2025-12-02 17:46:42 +08:00
zt
e800ff3ac9 Merge branch 'refs/heads/dev' into updateMenu 2025-12-02 17:44:27 +08:00
lcj
f0802432ed 修改execl导入校验 2025-12-02 17:43:59 +08:00
zt
c96808efc1 bug 2025-12-02 17:42:35 +08:00
zt
e972efb247 设计权限 2025-12-02 16:24:39 +08:00
zt
f782edd68b 设计权限 2025-12-02 16:24:02 +08:00
zt
45702ef838 设备 2025-12-02 16:22:42 +08:00
lcj
4e3faa7a23 进度识别 2025-12-02 16:12:07 +08:00
zt
40559d4d73 设备 2025-12-02 15:59:06 +08:00
zt
7816fec7aa 设备 2025-12-02 15:57:39 +08:00
lcj
37c95ab0bd 施工产值导出,大图 2025-12-02 15:51:44 +08:00
lg
3e38cf9abb 合同显示bug修改 2025-12-02 10:10:50 +08:00
lg
4aaf384ce8 机械 2025-12-01 20:00:39 +08:00
6a06d8596d 意见箱 2025-12-01 19:49:40 +08:00
be89a6fe9e 12-01-修改 2025-12-01 19:28:21 +08:00
40b51e5e9d 12-01-修改 2025-12-01 19:28:10 +08:00
zt
4b14ea5c7f 设备 2025-12-01 17:09:58 +08:00
a44777d7b2 Merge remote-tracking branch 'origin/updateMenu' into updateMenu 2025-11-28 19:55:38 +08:00
492fba5fd3 11-28-详情权限修改 2025-11-28 19:55:29 +08:00
zt
07b921d630 人员迁移 2025-11-28 19:51:41 +08:00
zt
13d33e9d53 token时间 2025-11-28 19:27:41 +08:00
zt
4f38db5fde bug 2025-11-28 18:56:59 +08:00
a868c7b5cb gps功能优化,添加人员轨迹,补充绑定车辆时历史记录返回车辆名称 2025-11-28 17:49:24 +08:00
d37b41c967 11-28-详情权限修改 2025-11-28 16:05:21 +08:00
b8fb9413de 标前立项bug修改 2025-11-28 15:22:39 +08:00
zt
fa9fcb1167 bug 2025-11-28 11:32:35 +08:00
zt
ebd88a999c bug 2025-11-27 19:17:15 +08:00
97079abdef 11-27-修改推荐审批文件操作 2025-11-27 18:56:33 +08:00
zt
94aaa90775 Merge branch 'refs/heads/dev' into updateMenu 2025-11-27 18:47:51 +08:00
lcj
1e01c53c52 大图 2025-11-27 17:41:36 +08:00
6c9e23e662 修改立项及成本权限 2025-11-27 17:37:25 +08:00
zt
8a27da9975 bug 2025-11-27 15:45:07 +08:00
e160cc5ff3 11-27-修改承包合同信息必填 2025-11-27 15:15:32 +08:00
zt
80b5f94cd4 bug 2025-11-27 11:44:03 +08:00
c9c81bb761 11-27-完善开票单位改为部门公司 2025-11-27 11:14:31 +08:00
zt
af90b0f879 产值及人员 2025-11-27 09:26:30 +08:00
lcj
b51a3ccf28 安全员轨迹信息 2025-11-26 19:57:00 +08:00
f07db8c368 车辆管理菜单修改和物资管理菜单修改 2025-11-26 19:18:52 +08:00
5e9d36400c 11-26-承包合同开票单位改为部门公司 2025-11-26 19:01:14 +08:00
zt
8f4a3e167a 产值及人员 2025-11-26 17:18:04 +08:00
lg
3ccd54a03b 权限字符修改 2025-11-26 16:15:03 +08:00
03177f58f2 11-26-更新供应商sql 2025-11-26 15:22:54 +08:00
zt
b0c875c9c4 班组 2025-11-26 10:25:44 +08:00
zt
bfe74bdb4c 去掉人脸 2025-11-25 19:47:16 +08:00
lg
cad5ba1101 权限字符修改 2025-11-25 19:40:59 +08:00
lcj
45d143ace3 进度计划菜单 2025-11-25 19:37:45 +08:00
zt
df08eb3dd6 Merge remote-tracking branch 'origin/dev' into dev 2025-11-25 19:26:22 +08:00
zt
8c292850c2 去掉人脸 2025-11-25 19:26:02 +08:00
12d3924e8a 11-25-更新收票登记 2025-11-25 19:19:52 +08:00
zt
d32947afe2 人员管理 2025-11-25 19:15:12 +08:00
lcj
9eecf67374 无人机大图 2025-11-25 17:30:31 +08:00
zt
d7fd7d6cc4 人员数据 2025-11-25 16:30:16 +08:00
lcj
77482c71b3 安全菜单修改 2025-11-25 16:16:16 +08:00
zt
66893410e9 菜单 2025-11-25 16:05:58 +08:00
fbbc4846de 车辆管理菜单修改和机械台账菜单修改 2025-11-25 14:53:20 +08:00
lcj
aac6efc568 无人机大图压缩包上传 2025-11-25 14:05:27 +08:00
lcj
209e624fc2 无人机大图压缩包上传 2025-11-25 12:31:25 +08:00
lcj
fe79bf282c 无人机大图压缩包上传 2025-11-25 12:29:57 +08:00
lcj
18cbc0655b 安全 2025-11-25 10:47:18 +08:00
6b59d264b4 Merge remote-tracking branch 'origin/dev' into dev 2025-11-25 10:41:17 +08:00
74785a768e 11-25-报销默认只能看见自己 2025-11-25 10:41:08 +08:00
lcj
32aafaa2db 修改bug 2025-11-25 10:05:00 +08:00
lcj
06617d94a7 修改bug 2025-11-25 09:52:25 +08:00
lcj
1b2f9aa755 安全 2025-11-25 09:42:28 +08:00
lg
04407d2f84 权限字符修改 2025-11-24 20:01:26 +08:00
lcj
c0fef2521f 无人机大图合并优化 2025-11-24 19:32:15 +08:00
04430d8853 综合服务合同vo修改 2025-11-24 16:04:26 +08:00
zt
875b436eea 考勤 2025-11-24 15:25:38 +08:00
2c1ca98e4e 菜单表修改 2025-11-24 14:55:49 +08:00
765490b51c 11-24-修复 2025-11-24 14:49:47 +08:00
lcj
b116db0bcd 更换菜单表 2025-11-24 14:28:36 +08:00
e2892b460b 设计合同付款、设计合同收款优化 2025-11-24 11:54:59 +08:00
30b1586a4a 设计合同付款、设计合同收款优化 2025-11-24 11:42:46 +08:00
lcj
15d86526ac 修改bug 2025-11-24 11:37:54 +08:00
cdf5f8bf5b 设计合同付款、设计合同收款优化 2025-11-24 11:37:07 +08:00
9bb41d903e 11-24-修复 2025-11-24 10:22:00 +08:00
d5f1c22bd4 设计合同进度结算、设计合同竣工结算、设计合同付款、设计合同收款的新增、修改、查询、删除 2025-11-21 20:31:45 +08:00
d2dcf656df Merge remote-tracking branch 'origin/dev' into dev 2025-11-21 20:29:30 +08:00
lcj
7191a60841 分包考勤机 2025-11-21 17:07:09 +08:00
3f21d39653 11-21-还原 2025-11-21 16:11:42 +08:00
b520ea6afe 11-21-添加对应方法2 2025-11-21 11:42:17 +08:00
e6283bee1c 11-21-添加对应方法 2025-11-21 11:15:40 +08:00
f6e1d0c73e 11-21-改善 2025-11-21 10:19:13 +08:00
c7e06ade6d Merge remote-tracking branch 'origin/dev' into dev 2025-11-20 20:00:23 +08:00
3d85b10475 11-20-改善 2025-11-20 20:00:03 +08:00
lg
e26dfc098a 竣工日期回填 2025-11-20 19:47:33 +08:00
lcj
c3ab46c8c8 降低springdoc版本 2025-11-20 19:27:17 +08:00
lcj
e37d118d0c 修改bug 2025-11-20 18:29:41 +08:00
lg
a6c92e8ba9 事务添加,删除sql问题 2025-11-20 16:17:19 +08:00
883 changed files with 47263 additions and 5505 deletions

View File

@ -54,3 +54,4 @@ docs
/file /file
.idea/ .idea/
chat-memory/ chat-memory/
queries/

View File

@ -18,7 +18,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>21</java.version> <java.version>21</java.version>
<mybatis.version>3.5.16</mybatis.version> <mybatis.version>3.5.16</mybatis.version>
<springdoc.version>2.8.4</springdoc.version> <springdoc.version>2.3.0</springdoc.version>
<therapi-javadoc.version>0.15.0</therapi-javadoc.version> <therapi-javadoc.version>0.15.0</therapi-javadoc.version>
<easyexcel.version>4.0.3</easyexcel.version> <easyexcel.version>4.0.3</easyexcel.version>
<velocity.version>2.3</velocity.version> <velocity.version>2.3</velocity.version>
@ -86,6 +86,15 @@
<activeByDefault>true</activeByDefault> <activeByDefault>true</activeByDefault>
</activation> </activation>
</profile> </profile>
<profile>
<id>menu</id>
<properties>
<profiles.active>menu</profiles.active>
<logging.level>info</logging.level>
<monitor.username>ruoyi</monitor.username>
<monitor.password>123456</monitor.password>
</properties>
</profile>
<profile> <profile>
<id>prod</id> <id>prod</id>
<properties> <properties>

View File

@ -5,6 +5,8 @@ import cn.hutool.captcha.AbstractCaptcha;
import cn.hutool.captcha.generator.CodeGenerator; import cn.hutool.captcha.generator.CodeGenerator;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -76,7 +78,7 @@ public class CaptchaController {
SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, map); SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, map);
if (!smsResponse.isSuccess()) { if (!smsResponse.isSuccess()) {
log.error("验证码短信发送异常 => {}", smsResponse); log.error("验证码短信发送异常 => {}", smsResponse);
return R.fail(smsResponse.getData().toString()); return R.fail(parseData(smsResponse));
} }
return R.ok(); return R.ok();
} }
@ -140,4 +142,35 @@ public class CaptchaController {
return R.ok(captchaVo); return R.ok(captchaVo);
} }
public static String parseData(SmsResponse smsResponse ) {
try {
JSONObject json = JSONUtil.parseObj(smsResponse.getData());
// 核心:用 JsonUtil 解析 data通过键路径 "Response.SendStatusSet[0].Code" 提取字段
// 键路径规则:层级用 "." 分隔,列表索引用 "[0]" 表示(第 1 个元素)
String code = json.getByPath("Response.SendStatusSet[0].Code", String.class);
System.out.println("错误码:" + code); // 输出FailedOperation.InsufficientBalanceInSmsPackage
return convert(code);
} catch (Exception e) {
return "短信发送未知错误";
}
}
public static String convert(String code) {
return switch (code) {
case "FailedOperation.InsufficientBalanceInSmsPackage" -> "套餐包余量不足,请购买套餐包";
case "InternalError.SendAndRecvFail" -> "短信收发超时,请检查您的网络是否有波动";
case "InvalidParameterValue.IncorrectPhoneNumber" -> "手机号格式错误";
case "LimitExceeded.AppCountryOrRegionDailyLimit" -> "业务短信国家/地区日下发条数超过设定的上限";
case "LimitExceeded.AppDailyLimit" -> "业务短信日下发条数超过设定的上限";
case "LimitExceeded.PhoneNumberDailyLimit" -> "单个手机号日下发短信条数超过设定的上限";
case "UnauthorizedOperation.ServiceSuspendDueToArrears" -> "欠费被停止服务";
case "UnsupportedOperation.UnsupportedRegion" -> "不支持该地区短信下发";
default -> "短信发送未知错误";
};
}
} }

View File

@ -41,7 +41,7 @@ spring:
api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
chat: chat:
options: options:
model: qwen-plus model: qwen3-max
datasource: datasource:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
@ -368,3 +368,14 @@ 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

View File

@ -41,10 +41,10 @@ snail-job:
spring: spring:
ai: ai:
dashscope: dashscope:
api-key: xxx api-key: sk-8d8df92fcbac4bd2922edba30b0bb8fa
chat: chat:
options: options:
model: qwen-plus model: qwen3-max
datasource: datasource:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
@ -343,3 +343,14 @@ 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

View File

@ -0,0 +1,356 @@
# 开发环境配置
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

View File

@ -358,3 +358,14 @@ 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

View File

@ -76,9 +76,9 @@ spring:
servlet: servlet:
multipart: multipart:
# 单个文件大小 # 单个文件大小
max-file-size: 200MB max-file-size: 1024MB
# 设置总上传的文件大小 # 设置总上传的文件大小
max-request-size: 200MB max-request-size: 1024MB
mvc: mvc:
# 设置静态资源路径 防止所有请求都去查静态资源 # 设置静态资源路径 防止所有请求都去查静态资源
static-path-pattern: /static/** static-path-pattern: /static/**
@ -95,7 +95,13 @@ spring:
deserialization: deserialization:
# 允许对象忽略json中不存在的属性 # 允许对象忽略json中不存在的属性
fail_on_unknown_properties: false fail_on_unknown_properties: false
rabbitmq:
host: 192.168.110.2
port: 5672
username: admin
password: yuanjiexny
publisher-returns: true
publisher-confirm-type: correlated
# Sa-Token配置 # Sa-Token配置
sa-token: sa-token:
# token名称 (同时也是cookie名称) # token名称 (同时也是cookie名称)
@ -109,7 +115,7 @@ sa-token:
# token有效期单位s 默认30天, -1代表永不过期 # token有效期单位s 默认30天, -1代表永不过期
timeout: 2592000 timeout: 2592000
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒 # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
active-timeout: 86400 active-timeout: 2592000
# 同一账号最大登录数量,-1代表不限 # 同一账号最大登录数量,-1代表不限
max-login-count: -1 max-login-count: -1
@ -176,7 +182,7 @@ mybatis-plus:
# 数据加密 # 数据加密
mybatis-encryptor: mybatis-encryptor:
# 是否开启加密 # 是否开启加密
enable: false enable: true
# 默认加密算法 # 默认加密算法
algorithm: BASE64 algorithm: BASE64
# 编码方式 BASE64/HEX。默认BASE64 # 编码方式 BASE64/HEX。默认BASE64
@ -305,6 +311,12 @@ 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

View File

@ -1,14 +1,23 @@
package org.dromara.test; package org.dromara.test;
import cn.hutool.json.JSONUtil;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.manager.recognizermanager.RecognizerManager; import org.dromara.manager.recognizermanager.RecognizerManager;
import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum; import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum;
import org.dromara.manager.recognizermanager.vo.RecognizeVo; import org.dromara.manager.recognizermanager.vo.RecognizeVo;
import org.dromara.progress.domain.PgsProgressPlanDetail;
import org.dromara.progress.domain.vo.progressplandetail.PgsProgressPlanDetailFinishedVo;
import org.dromara.progress.service.IPgsProgressPlanDetailService;
import org.dromara.progress.service.IPgsProgressPlanService;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @author lilemy * @author lilemy
@ -21,6 +30,12 @@ public class RecognizerTest {
@Resource @Resource
private RecognizerManager recognizerManager; private RecognizerManager recognizerManager;
@Resource
private IPgsProgressPlanDetailService progressPlanDetailService;
@Resource
private IPgsProgressPlanService progressPlanService;
@Test @Test
void test() { void test() {
RecognizeVo recognize = recognizerManager.recognize("http://xny.yj-3d.com:7363/file/tif/20250625160218orthophoto.png", List.of(RecognizerTypeEnum.PANEL)); RecognizeVo recognize = recognizerManager.recognize("http://xny.yj-3d.com:7363/file/tif/20250625160218orthophoto.png", List.of(RecognizerTypeEnum.PANEL));
@ -31,4 +46,39 @@ public class RecognizerTest {
void testChange() { void testChange() {
recognizerManager.convertCoordinate("http://xny.yj-3d.com:9000/xinnengyuan-dev/2025/11/11/d48767a62bc04867a552e06ba6712004.tif", List.of()); recognizerManager.convertCoordinate("http://xny.yj-3d.com:9000/xinnengyuan-dev/2025/11/11/d48767a62bc04867a552e06ba6712004.tif", List.of());
} }
@Test
void checkNumber() {
List<PgsProgressPlanDetail> detailList = progressPlanDetailService.list();
List<PgsProgressPlanDetail> planDetailList = detailList.stream()
.filter(detail -> StringUtils.isNotBlank(detail.getFinishedDetail()))
.toList();
Map<String, List<PgsProgressPlanDetail>> collect = planDetailList.stream()
.collect(Collectors.groupingBy(PgsProgressPlanDetail::getFinishedDetail));
// 遍历分组结果,输出重复项
for (Map.Entry<String, List<PgsProgressPlanDetail>> entry : collect.entrySet()) {
String fieldValue = entry.getKey();
List<PgsProgressPlanDetail> duplicates = entry.getValue();
if (duplicates.size() > 1) { // 筛选出有重复的字段值
PgsProgressPlanDetail first = duplicates.getFirst();
Long id = first.getId();
Long planId = first.getProgressPlanId();
progressPlanService.removeById(planId);
progressPlanDetailService.removeById(id);
System.out.println("重复对象的对象:" + duplicates.stream().map(PgsProgressPlanDetail::getId).toList());
}
}
for (PgsProgressPlanDetail detail : detailList) {
BigDecimal aiFill = detail.getFinishedNumber();
String finishedDetail = detail.getFinishedDetail();
if (StringUtils.isBlank(finishedDetail)) {
continue;
}
// log.info("id: {}, finishedDetail: {}", detail.getId(), finishedDetail);
List<PgsProgressPlanDetailFinishedVo> finishedVos = JSONUtil.toList(finishedDetail, PgsProgressPlanDetailFinishedVo.class);
if (aiFill.compareTo(BigDecimal.valueOf(finishedVos.size())) != 0) {
log.info("数量异常:{}{}", detail.getId(), detail.getProgressCategoryId());
}
}
}
} }

View File

@ -59,6 +59,18 @@ public class AsyncConfig implements AsyncConfigurer {
return executor; return executor;
} }
// 解压线程池(大文件操作,不需要太多线程)
@Bean("unzipExecutor")
public Executor unzipExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(2);
executor.setMaxPoolSize(4);
executor.setQueueCapacity(10);
executor.setThreadNamePrefix("unzip-");
executor.initialize();
return executor;
}
/** /**
* 异步执行异常处理 * 异步执行异常处理
*/ */

View File

@ -0,0 +1,6 @@
package org.dromara.common.core.service;
public interface XzdSjContractInfoService {
String selectNameByIds(String ids);
}

View File

@ -0,0 +1,146 @@
package org.dromara.common.core.utils;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
/**
* 时间戳转换工具类(包含时分秒提取)
*/
public class TimestampUtils {
// 默认时区(东八区)
private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone("GMT+8");
// 完整日期格式
private static final String FULL_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
// 时分秒格式
private static final String TIME_FORMAT = "HH:mm:ss";
// 日期格式
private static final String DATE_FORMAT = "yyyy-MM-dd";
/**
* 将日期字符串转为秒级时间戳(优化版)
* 支持格式:"2025-12-03 23:59:59"、"2025-12-03"等
* @param dateStr 日期字符串
* @return 秒级时间戳
*/
public static Long parseDateToTimestamp(String dateStr) {
if (StrUtil.isBlank(dateStr)) {
return null;
}
// 使用Hutool的DateUtil进行智能解析推荐
try {
Date date = DateUtil.parse(dateStr);
return date.getTime() / 1000L; // 转为秒级时间戳
} catch (Exception e) {
throw new IllegalArgumentException(
String.format("日期格式错误:%s支持格式yyyy-MM-dd HH:mm:ss、yyyy-MM-dd等", dateStr)
);
}
}
/**
* 将时间戳转换为完整日期格式yyyy-MM-dd HH:mm:ss
*/
public static String formatTimestamp(Object timestamp) {
if (timestamp == null) {
return null;
}
String timestampStr = timestamp.toString().trim();
if (StrUtil.isBlank(timestampStr)) {
return null;
}
Long time = parseToMilliseconds(timestampStr);
SimpleDateFormat sdf = new SimpleDateFormat(FULL_DATE_FORMAT);
sdf.setTimeZone(DEFAULT_TIME_ZONE);
return sdf.format(new Date(time));
}
/**
* 提取时间戳中的时分秒部分HH:mm:ss
*/
public static String extractTime(Object timestamp) {
if (timestamp == null) {
return null;
}
String timestampStr = timestamp.toString().trim();
if (StrUtil.isBlank(timestampStr)) {
return null;
}
Long time = parseToMilliseconds(timestampStr);
SimpleDateFormat sdf = new SimpleDateFormat(TIME_FORMAT);
sdf.setTimeZone(DEFAULT_TIME_ZONE);
return sdf.format(new Date(time));
}
/**
* 提取时间戳中的日期部分yyyy-MM-dd
*/
public static String extractDate(Object timestamp) {
if (timestamp == null) {
return null;
}
String timestampStr = timestamp.toString().trim();
if (StrUtil.isBlank(timestampStr)) {
return null;
}
Long time = parseToMilliseconds(timestampStr);
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
sdf.setTimeZone(DEFAULT_TIME_ZONE);
return sdf.format(new Date(time));
}
/**
* 解析时间戳字符串为毫秒级时间戳
*/
private static Long parseToMilliseconds(String timestampStr) {
try {
Long time = Long.parseLong(timestampStr);
// 10位秒级时间戳转为13位毫秒级
if (timestampStr.length() == 10) {
time = time * 1000;
}
return time;
} catch (NumberFormatException e) {
throw new IllegalArgumentException("时间戳格式错误:" + timestampStr);
}
}
/**
* 获取时间戳对应的小时
*/
public static int getHour(Object timestamp) {
String timeStr = extractTime(timestamp);
return Integer.parseInt(timeStr.split(":")[0]);
}
/**
* 获取时间戳对应的分钟
*/
public static int getMinute(Object timestamp) {
String timeStr = extractTime(timestamp);
return Integer.parseInt(timeStr.split(":")[1]);
}
/**
* 获取时间戳对应的秒
*/
public static int getSecond(Object timestamp) {
String timeStr = extractTime(timestamp);
return Integer.parseInt(timeStr.split(":")[2]);
}
}

View File

@ -45,6 +45,16 @@
<groupId>com.github.xiaoymin</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.5.0</version> <version>4.5.0</version>
<exclusions>
<exclusion>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -110,15 +110,6 @@ public class SpringDocConfig {
} }
PlusPaths newPaths = new PlusPaths(); PlusPaths newPaths = new PlusPaths();
oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v)); oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v));
newPaths.forEach((s, pathItem) -> {
// 为所有接口添加鉴权
pathItem.readOperations().forEach(operation -> {
operation.addSecurityItem(new SecurityRequirement()
.addList(HttpHeaders.AUTHORIZATION)
.addList("Clientid")
);
});
});
openApi.setPaths(newPaths); openApi.setPaths(newPaths);
}; };
} }

View File

@ -73,8 +73,7 @@ public class ExcelReader {
// 从MultipartFile获取输入流 // 从MultipartFile获取输入流
try (InputStream stream = file.getInputStream(); try (InputStream stream = file.getInputStream();
org.apache.poi.ss.usermodel.Workbook workbook = isXlsx ? Workbook workbook = WorkbookFactory.create(stream)) {
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);

View File

@ -91,7 +91,7 @@ public class PlusDataPermissionHandler {
DataPermissionHelper.setVariable("user", currentUser); DataPermissionHelper.setVariable("user", currentUser);
} }
// 如果是超级管理员或租户管理员,则不过滤数据 // 如果是超级管理员或租户管理员,则不过滤数据
if (LoginHelper.isSuperAdmin() || LoginHelper.isTenantAdmin()) { if (LoginHelper.isSuperAdmin()) {
return where; return where;
} }
// 构造数据过滤条件的 SQL 片段 // 构造数据过滤条件的 SQL 片段

View File

@ -82,5 +82,10 @@ public interface TransConstant {
*/ */
String XZD_CBYS_ZJHCB_ID_TO_NAME = "xzd_cbys_zjhcb_id_to_name"; String XZD_CBYS_ZJHCB_ID_TO_NAME = "xzd_cbys_zjhcb_id_to_name";
/**
* 新中大-设计合同信息id转name
*/
String XZD_SJ_CONTRACT_INFO_ID_TO_NAME = "xzd_sj_contract_info_id_to_name";
} }

View File

@ -0,0 +1,24 @@
package org.dromara.common.translation.core.impl;
import lombok.AllArgsConstructor;
import org.dromara.common.core.service.XzdSjContractInfoService;
import org.dromara.common.core.service.XzdSupplierOpenBankService;
import org.dromara.common.translation.annotation.TranslationType;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.common.translation.core.TranslationInterface;
@AllArgsConstructor
@TranslationType(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME)
public class XzdSjContractInfoImpl implements TranslationInterface<String> {
private final XzdSjContractInfoService xzdSjContractInfoService;
@Override
public String translation(Object key, String other) {
if (key instanceof String ids) {
return xzdSjContractInfoService.selectNameByIds(ids);
} else if (key instanceof Long id) {
return xzdSjContractInfoService.selectNameByIds(id.toString());
}
return null;
}
}

View File

@ -14,3 +14,4 @@ org.dromara.common.translation.core.impl.XzdSupplierOpenBankImpl
org.dromara.common.translation.core.impl.XzdProjectManagerApprovalImpl org.dromara.common.translation.core.impl.XzdProjectManagerApprovalImpl
org.dromara.common.translation.core.impl.XzdCbysZjhcbImpl org.dromara.common.translation.core.impl.XzdCbysZjhcbImpl
org.dromara.common.translation.core.impl.XzdJXHTTranslation org.dromara.common.translation.core.impl.XzdJXHTTranslation
org.dromara.common.translation.core.impl.XzdSjContractInfoImpl

View File

@ -29,6 +29,10 @@
<dependencies> <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<!-- TwelveMonkeys ImageIO 扩展 --> <!-- TwelveMonkeys ImageIO 扩展 -->
<dependency> <dependency>
<groupId>com.twelvemonkeys.imageio</groupId> <groupId>com.twelvemonkeys.imageio</groupId>

View File

@ -25,14 +25,15 @@ import java.util.concurrent.CompletableFuture;
public class DashScopeChat { public class DashScopeChat {
@Resource @Resource
private SimpleChat simpleChat; private DashScopeSimpleChat dashScopeSimpleChat;
@Resource @Resource
private IAIChatMemoryService chatMemoryService; private IAIChatMemoryService chatMemoryService;
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";
@ -66,10 +67,8 @@ public class DashScopeChat {
.collectList() .collectList()
.flatMapMany(tokens -> { .flatMapMany(tokens -> {
String aiResponse = String.join("", tokens); String aiResponse = String.join("", tokens);
if (isFirst) {
// 异步生成标题 // 异步生成标题
generateChatTitleAsync(chatId, message, aiResponse, userId); generateChatTitleAsync(chatId, message, aiResponse, userId);
}
// 返回完整的流结果 // 返回完整的流结果
return Flux.fromIterable(tokens); return Flux.fromIterable(tokens);
}); });
@ -100,7 +99,7 @@ public class DashScopeChat {
用户:%s 用户:%s
AI%s AI%s
""", userMessage, aiResponse); """, userMessage, aiResponse);
String title = simpleChat.doChat(prompt); String title = dashScopeSimpleChat.doChat(prompt);
log.info("用户:{} 生成标题成功:{} -> {}", userId, chatId, title); log.info("用户:{} 生成标题成功:{} -> {}", userId, chatId, title);
// 保存对话数据 // 保存对话数据
AIChatMemory memory = new AIChatMemory(); AIChatMemory memory = new AIChatMemory();

View File

@ -9,11 +9,11 @@ import org.springframework.stereotype.Component;
* @date 2025-11-04 15:26 * @date 2025-11-04 15:26
*/ */
@Component @Component
public class SimpleChat { public class DashScopeSimpleChat {
private final ChatClient dashScopeChatClient; private final ChatClient dashScopeChatClient;
public SimpleChat(ChatClient.Builder chatClientBuilder) { public DashScopeSimpleChat(ChatClient.Builder chatClientBuilder) {
this.dashScopeChatClient = chatClientBuilder this.dashScopeChatClient = chatClientBuilder
// 设置 ChatClient ChatModel Options 参数 // 设置 ChatClient ChatModel Options 参数
.defaultOptions( .defaultOptions(

View File

@ -4,6 +4,7 @@ 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;
@ -13,11 +14,15 @@ 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;
@ -27,6 +32,7 @@ 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 {
@ -103,9 +109,42 @@ 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) {
if (isValid) { List<AIChatMemory> aiChatMemories = this.listByIds(ids);
//TODO 做一些业务上的校验,判断是否需要校验 if (aiChatMemories.size() != ids.size()) {
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;
} }
} }

View File

@ -2,6 +2,7 @@ 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.*;
@ -50,7 +51,7 @@ public class BusBiddingUserController extends BaseController {
/** /**
* 查询招投标人员列表 * 查询招投标人员列表
*/ */
@SaCheckPermission("bidding:biddingUser:getUser") @SaCheckPermission(value = {"bidding:biddingUser:list","bidding:biddingUser:query","bidding:biddingUser:add"},mode = SaMode.OR)
@GetMapping("/getUser") @GetMapping("/getUser")
public R<List<SysUser>> getUser() { public R<List<SysUser>> getUser() {
return R.ok(busBiddingUserService.getUser()); return R.ok(busBiddingUserService.getUser());

View File

@ -1,26 +1,27 @@
package org.dromara.bigscreen.controller; package org.dromara.bigscreen.controller;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.dromara.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.log.enums.BusinessType;
import org.dromara.common.excel.utils.ExcelUtil; import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.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;
/** /**
* 备忘录 * 备忘录
@ -39,7 +40,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);

View File

@ -1,27 +1,27 @@
package org.dromara.bigscreen.controller; package org.dromara.bigscreen.controller;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.dromara.bigscreen.domain.dto.BusSygjBo; import org.dromara.bigscreen.domain.dto.BusSygjBo;
import org.springframework.web.bind.annotation.*; import org.dromara.bigscreen.domain.vo.BusSygjVo;
import org.springframework.validation.annotation.Validated; import org.dromara.bigscreen.service.IBusSygjService;
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.log.enums.BusinessType;
import org.dromara.common.excel.utils.ExcelUtil; import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.bigscreen.domain.vo.BusSygjVo; import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.common.log.annotation.Log;
import org.dromara.bigscreen.service.IBusSygjService; 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.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 +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);

View File

@ -1,26 +1,27 @@
package org.dromara.bigscreen.controller; package org.dromara.bigscreen.controller;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.dromara.bigscreen.domain.dto.BusWjzxBo; import org.dromara.bigscreen.domain.dto.BusWjzxBo;
import org.springframework.web.bind.annotation.*; import org.dromara.bigscreen.domain.vo.BusWjzxVo;
import org.springframework.validation.annotation.Validated; import org.dromara.bigscreen.service.IBusWjzxService;
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.log.enums.BusinessType;
import org.dromara.common.excel.utils.ExcelUtil; import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.bigscreen.domain.vo.BusWjzxVo; import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.bigscreen.service.IBusWjzxService; 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.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;
/** /**
* 文件中心 * 文件中心
@ -39,7 +40,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);

View File

@ -41,7 +41,6 @@ import org.dromara.patch.service.IPdMasterService;
import org.dromara.project.service.IBusProjectService; import org.dromara.project.service.IBusProjectService;
import org.dromara.system.domain.SysMenu; import org.dromara.system.domain.SysMenu;
import org.dromara.system.domain.vo.RouterVo; import org.dromara.system.domain.vo.RouterVo;
import org.dromara.system.mapper.SysRoleMapper;
import org.dromara.system.service.impl.SysMenuServiceImpl; import org.dromara.system.service.impl.SysMenuServiceImpl;
import org.dromara.system.service.impl.SysUserServiceImpl; import org.dromara.system.service.impl.SysUserServiceImpl;
import org.dromara.warm.flow.core.FlowEngine; import org.dromara.warm.flow.core.FlowEngine;
@ -97,7 +96,6 @@ 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 模块

View File

@ -44,7 +44,6 @@ 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);

View File

@ -0,0 +1,39 @@
package org.dromara.bigscreen.controller;
import jakarta.annotation.Resource;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
import org.dromara.bigscreen.service.ProjectBigScreenService;
import org.dromara.common.core.domain.R;
import org.dromara.project.domain.vo.project.BusProjectVo;
import org.dromara.project.service.IBusProjectService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* UE大屏
*
* @author Lion Li
* @date 2025-11-04
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/UE/screen")
public class UEController {
@Resource
private IBusProjectService projectService;
@GetMapping("/projectInfo/{projectId}")
public R<BusProjectVo> getProjectPeople(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) {
return R.ok(projectService.selectById(projectId));
}
}

View File

@ -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.eq(StringUtils.isNotBlank(bo.getGjm()), BusSygj::getGjm, bo.getGjm()); lqw.like(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());

View File

@ -1,34 +1,33 @@
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.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.dromara.common.mybatis.core.page.TableDataInfo;
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.*; import java.util.ArrayList;
import java.util.stream.Collectors; import java.util.Collection;
import java.util.List;
import java.util.Map;
/** /**
* 文件中心Service业务层处理 * 文件中心Service业务层处理
@ -98,8 +97,7 @@ 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.eq(StringUtils.isNotBlank(bo.getWjm()), BusWjzx::getWjm, bo.getWjm()); lqw.like(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;

View File

@ -24,10 +24,7 @@ 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.ArrayList; import java.util.*;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/** /**
* 角色流程对应Service业务层处理 * 角色流程对应Service业务层处理
@ -242,57 +239,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) {
LambdaQueryWrapper<SysRoleWork> lqw1 = new LambdaQueryWrapper<>(); if (map.containsKey(projectVo.getId()) && roleWork.getRoleId().equals(map.get(projectVo.getId()))){
lqw1.eq(SysRoleWork::getProjectId,projectVo.getId()); SysRoleVo sysRoleVo = roleService.selectRoleById(roleWork.getRoleId());
//获取角色
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;
} }

View File

@ -7,17 +7,21 @@ 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;
@ -67,6 +71,18 @@ 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);
}
/** /**
* 查询物资-批次需求计划基础信息列表 * 查询物资-批次需求计划基础信息列表
*/ */
@ -101,7 +117,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) {
@ -146,7 +162,7 @@ public class BusMrpBaseController extends BaseController {
/** /**
* 批量新增或修改 * 批量新增或修改
*/ */
@SaCheckPermission("cailiaoshebei:mrpBase:addbatch") @SaCheckPermission("cailiaoshebei:mrpBase:add")
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/batch") @PostMapping("/batch")
public R<Void> batchAddOrUpdate(@RequestBody BusMrpDto dto) { public R<Void> batchAddOrUpdate(@RequestBody BusMrpDto dto) {
@ -156,6 +172,7 @@ 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(",");
@ -171,7 +188,7 @@ public class BusMrpBaseController extends BaseController {
/** /**
* 导入物资需求批次计划 * 导入物资需求批次计划
*/ */
@SaCheckPermission("cailiaoshebei:mrpBase:import") @SaCheckPermission("cailiaoshebei:mrpBase:add")
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.INSERT) @Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/import") @PostMapping("/import")
@ -200,7 +217,7 @@ public class BusMrpBaseController extends BaseController {
/** /**
* 获取工程量清单列表 * 获取工程量清单列表
*/ */
@SaCheckPermission("cailiaoshebei:mrpBase:getZhaoBiaoList") @SaCheckPermission(value = {"cailiaoshebei:mrpBase:add","cailiaoshebei:mrpBase:edit"},mode = SaMode.OR)
@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();
@ -216,7 +233,7 @@ public class BusMrpBaseController extends BaseController {
* @param bo * @param bo
* @return * @return
*/ */
@SaCheckPermission("cailiaoshebei:mrpBase:getMore") @SaCheckPermission("cailiaoshebei:mrpBase:list")
@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) {

View File

@ -1,6 +1,7 @@
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;
@ -8,14 +9,12 @@ 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.BusMaterialbatchdemandplanBo; import org.dromara.cailiaoshebei.domain.bo.*;
import org.dromara.cailiaoshebei.domain.bo.BusPurchaseDocBo; import org.dromara.cailiaoshebei.domain.vo.BusLtnVo;
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.IBusMaterialbatchdemandplanService; import org.dromara.cailiaoshebei.service.*;
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;
@ -27,11 +26,18 @@ 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.*;
@ -64,6 +70,39 @@ 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));
}
/** /**
* 查询物资-采购联系单列表 * 查询物资-采购联系单列表
*/ */
@ -102,7 +141,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) {
@ -114,7 +153,7 @@ public class BusPurchaseDocController extends BaseController {
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckPermission("cailiaoshebei:purchaseDoc:pdf") @SaCheckPermission("cailiaoshebei:purchaseDoc:list")
@GetMapping("/pdf/{id}") @GetMapping("/pdf/{id}")
public R<String> getPic(@NotNull(message = "主键不能为空") public R<String> getPic(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {

View File

@ -2,10 +2,14 @@ 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;
@ -36,6 +40,16 @@ 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);
}
/** /**
* 查询物资采购人员列表 * 查询物资采购人员列表
*/ */
@ -61,7 +75,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) {
@ -107,7 +121,7 @@ public class BusPurchaseUserController extends BaseController {
/** /**
* 新增或修改物资采购人员 * 新增或修改物资采购人员
*/ */
@SaCheckPermission("cailiaoshebei:purchaseUser:addOrUpdate") @SaCheckPermission(value = {"cailiaoshebei:purchaseUser:add","cailiaoshebei:purchaseUser:edit"},mode = SaMode.OR)
@Log(title = "物资采购人员", businessType = BusinessType.INSERT) @Log(title = "物资采购人员", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/addOrUpdate") @PostMapping("/addOrUpdate")
@ -121,7 +135,7 @@ public class BusPurchaseUserController extends BaseController {
* *
* @param projectId 项目id * @param projectId 项目id
*/ */
@SaCheckPermission("cailiaoshebei:purchaseUser:byProject") @SaCheckPermission("cailiaoshebei:purchaseUser:list")
@GetMapping("/byProject/{projectId}") @GetMapping("/byProject/{projectId}")
public R<BusPurchaseUserVo> getInfoByProject(@NotNull(message = "主键不能为空") public R<BusPurchaseUserVo> getInfoByProject(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {

View File

@ -1,6 +1,7 @@
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;
@ -47,7 +48,7 @@ public class BusTotalsupplyplanController extends BaseController {
/** /**
* 获取主数据列表 * 获取主数据列表
*/ */
@SaCheckPermission("design:totalsupplyplan:queryList") @SaCheckPermission("design:totalsupplyplan:list")
@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);
@ -57,7 +58,7 @@ public class BusTotalsupplyplanController extends BaseController {
/** /**
* 根据主数据获取到详情 * 根据主数据获取到详情
*/ */
@SaCheckPermission("design:totalsupplyplan:masterData") @SaCheckPermission(value = {"design:totalsupplyplan:list","design:totalsupplyplan:add","design:totalsupplyplan:edit"},mode = SaMode.OR)
@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));
@ -86,7 +87,7 @@ public class BusTotalsupplyplanController extends BaseController {
/** /**
* 导入物资-总供应计划数据 * 导入物资-总供应计划数据
*/ */
@SaCheckPermission("design:totalsupplyplan:import") @SaCheckPermission("design:totalsupplyplan:add")
@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) {
@ -98,7 +99,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) {
@ -130,7 +131,7 @@ public class BusTotalsupplyplanController extends BaseController {
/** /**
* 批量修改物资-总供应计划 * 批量修改物资-总供应计划
*/ */
@SaCheckPermission("design:totalsupplyplan:batchEdit") @SaCheckPermission("design:totalsupplyplan:edit")
@Log(title = "物资-总供应计划", businessType = BusinessType.UPDATE) @Log(title = "物资-总供应计划", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping("/batchEdit") @PutMapping("/batchEdit")

View File

@ -3,6 +3,7 @@ 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;
@ -30,7 +31,10 @@ 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.*;
@ -63,7 +67,9 @@ 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;
/** /**
@ -78,8 +84,8 @@ public class BusPurchaseDocAppController extends BaseController {
* 查询供应商入库列表 * 查询供应商入库列表
*/ */
@GetMapping("/supList") @GetMapping("/supList")
public TableDataInfo<TenderSupplierInputVo> list(TenderSupplierInputBo bo, PageQuery pageQuery) { public TableDataInfo<XzdSupplierInfoVo> list(XzdSupplierInfoBo bo, PageQuery pageQuery) {
return tenderSupplierInputService.queryPageList(bo, pageQuery); return supplierInfoService.queryPageList(bo, pageQuery);
} }
/** /**

View File

@ -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;

View File

@ -1,6 +1,7 @@
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;
@ -239,7 +240,14 @@ public class BusTotalsupplyplanServiceImpl extends ServiceImpl<BusTotalsupplypla
} }
// 关闭读取器 // 关闭读取器
excelReader.finish(); excelReader.finish();
if (allData.isEmpty()) { if (CollUtil.isEmpty(allData)) {
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);
} }
// 处理导入的数据 // 处理导入的数据
@ -248,7 +256,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);
} }
} }

View File

@ -1,5 +1,6 @@
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;
@ -9,6 +10,8 @@ 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;
@ -19,6 +22,7 @@ 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;
@ -36,6 +40,9 @@ 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) {
@ -63,22 +70,107 @@ 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) {
deviceMessageSender.sendPersonnelInformation(machine.getSn(), constructionUser.getSysUserId().toString(), constructionUser.getUserName(), byId.getUrl()); Boolean b = deviceMessageSender.sendPersonnelInformation(machine.getSn(),
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 {
deviceMessageSender.deleteUser(machine.getSn(), constructionUser.getSysUserId().toString()); KqjEntity.CommonResponse commonResponse = 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);
}
} }
} }

View File

@ -8,6 +8,7 @@ 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;
@ -338,6 +339,29 @@ 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
*/ */

View File

@ -0,0 +1,106 @@
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));
}
}

View File

@ -0,0 +1,16 @@
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;
}

View File

@ -0,0 +1,124 @@
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));
}
}

View File

@ -0,0 +1,91 @@
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;
/**
* 上传图片idid之间使用','分割)
*/
private String fileId;
/**
* 是否匿名提交0、否1、是
*/
private String isCryptonym;
/**
* 处理状态0、待处理5、处理中9、已解决10、退回14、不予解决()
*/
private String status;
/**
* 当前处理人id
*/
private Long currentDisposeUserId;
}

View File

@ -0,0 +1,61 @@
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;
}

View File

@ -0,0 +1,76 @@
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;
}

View File

@ -0,0 +1,95 @@
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;
/**
* 上传图片idid之间使用','分割)
*/
private String fileId;
/**
* 是否匿名提交0、否1、是
*/
private String isCryptonym;
/**
* 处理状态0、待处理5、处理中9、已解决14、关闭
*/
private String status;
/**
* 退回原因
*/
private String cause;
}

View File

@ -0,0 +1,60 @@
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;
}

View File

@ -0,0 +1,80 @@
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;
}

View File

@ -0,0 +1,82 @@
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;
}

View File

@ -0,0 +1,99 @@
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;
}

View File

@ -0,0 +1,125 @@
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;
/**
* 上传图片idid之间使用','分割)
*/
@ExcelProperty(value = "上传图片", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "i=did之间使用','分割")
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;
}

View File

@ -0,0 +1,18 @@
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;
}

View File

@ -0,0 +1,14 @@
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;
}

View File

@ -0,0 +1,15 @@
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> {
}

View File

@ -0,0 +1,26 @@
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);
}

View File

@ -0,0 +1,15 @@
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> {
}

View File

@ -0,0 +1,70 @@
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);
}

View File

@ -0,0 +1,84 @@
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);
}

View File

@ -0,0 +1,117 @@
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);
}

View File

@ -0,0 +1,134 @@
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;
}
}

View File

@ -0,0 +1,223 @@
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));
}
}

View File

@ -0,0 +1,380 @@
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);
}
}

View File

@ -0,0 +1,65 @@
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));
}
}

View File

@ -1,6 +1,7 @@
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;
@ -26,9 +27,12 @@ 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;
@ -75,6 +79,8 @@ 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;
/** /**
* 查询施工人员列表 * 查询施工人员列表
*/ */
@ -84,6 +90,15 @@ 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);
}
/** /**
* 新人池 * 新人池
@ -108,7 +123,7 @@ public class SubConstructionUserController extends BaseController {
/** /**
* 查询每个施工人员总的考勤列表 * 查询每个施工人员总的考勤列表
*/ */
@SaCheckPermission(value = {"contractor:constructionUser:listAttendanceTotal", "project:attendance:listAttendanceTotal"}) @SaCheckPermission(value = {"contractor:constructionUser:listAttendanceTotal", "project:attendance:listAttendanceTotal"}, mode = SaMode.OR)
@GetMapping("/list/attendance/total") @GetMapping("/list/attendance/total")
public TableDataInfo<SubConstructionUserAttendanceTotalVo> listAttendanceTotal(SubConstructionUserAttendanceQueryReq req, public TableDataInfo<SubConstructionUserAttendanceTotalVo> listAttendanceTotal(SubConstructionUserAttendanceQueryReq req,
PageQuery pageQuery) { PageQuery pageQuery) {
@ -140,7 +155,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) {
@ -232,7 +247,7 @@ public class SubConstructionUserController extends BaseController {
/** /**
* 施工人员迁移 * 施工人员迁移
*/ */
@SaCheckPermission("contractor:constructionUser:edit") @SaCheckPermission("contractor:constructionUser:change")
@Log(title = "施工人员", businessType = BusinessType.UPDATE) @Log(title = "施工人员", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping("/change/project") @PutMapping("/change/project")
@ -254,9 +269,9 @@ public class SubConstructionUserController extends BaseController {
} }
/** /**
* 查询项目班组列表 * 查询项目班组列表 contractor:constructionUser:newUserList
*/ */
@SaCheckPermission("project:projectTeam:addTeam") @SaCheckPermission(value = {"project:projectTeam:addTeam", "contractor:constructionUser:newUserList","contractor:constructionUser:addTeam"}, mode = SaMode.OR)
@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);
@ -265,7 +280,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);
@ -274,7 +289,7 @@ public class SubConstructionUserController extends BaseController {
/** /**
* 添加项目班组 * 添加项目班组
*/ */
@SaCheckPermission("project:projectTeam:addTeam") @SaCheckPermission(value = {"project:projectTeam:addTeam", "contractor:constructionUser:addTeam"}, mode = SaMode.OR)
@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) {
@ -397,6 +412,7 @@ 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);
@ -441,7 +457,9 @@ 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);

View File

@ -21,6 +21,7 @@ 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;
/** /**
* 施工人员文件存储 * 施工人员文件存储
@ -39,12 +40,27 @@ 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);
}
}
/** /**
* 导出施工人员文件存储列表 * 导出施工人员文件存储列表
*/ */

View File

@ -1,6 +1,7 @@
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;
@ -94,7 +95,8 @@ public class SubContractorController extends BaseController {
/** /**
* 修改分包单位 * 修改分包单位
*/ */
@SaCheckPermission("contractor:contractor:edit") @SaCheckPermission(value = {"contractor:contractor:edit", "contractor:contractor:save"}
, mode = SaMode.OR)
@Log(title = "分包单位", businessType = BusinessType.UPDATE) @Log(title = "分包单位", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()

View File

@ -1,6 +1,7 @@
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;
@ -38,9 +39,9 @@ public class SubSubcontractController extends BaseController {
private ISubSubcontractService subcontractService; private ISubSubcontractService subcontractService;
/** /**
* 查询分包合同列表 * 查询分包合同列表 project:projectTeam:addTeam
*/ */
@SaCheckPermission("contractor:subcontract:list") @SaCheckPermission(value = {"contractor:subcontract:list", "project:projectTeam:addTeam"}, mode = SaMode.OR)
@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);

View File

@ -77,17 +77,19 @@ 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) {

View File

@ -0,0 +1,32 @@
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;
}

View File

@ -0,0 +1,46 @@
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;
}

View File

@ -0,0 +1,31 @@
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;
}

View File

@ -34,4 +34,11 @@ public class SubConstructionUserChangeProjectReq implements Serializable {
*/ */
@NotNull(message = "分包公司id不能为空") @NotNull(message = "分包公司id不能为空")
private Long contractorId; private Long contractorId;
/**
* 工种
*/
private String typeOfWork;
} }

View File

@ -1,28 +1,23 @@
package org.dromara.project.domain; package org.dromara.contractor.domain.vo;
import lombok.Data; import lombok.Data;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* 考勤机用户对象 bus_attendance_machine_user * 考勤机用户视图对象
* *
* @author lilemy * @author lilemy
* @date 2025-10-15 * @date 2025-11-21
*/ */
@Data @Data
public class BusAttendanceMachineUser implements Serializable { public class SubAttendanceMachineUserVo implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private Long id;
/** /**
* 考勤机主键ID * 考勤机主键ID
*/ */
@ -31,26 +26,21 @@ public class BusAttendanceMachineUser implements Serializable {
/** /**
* 班组ID * 班组ID
*/ */
private Long teamId; private Long contractorId;
/** /**
* 用户ID * 用户ID
*/ */
private Long userId; private Long userId;
/**
* 用户名称
*/
private String userName;
/** /**
* 标识是否下发 * 标识是否下发
*/ */
private Integer identifying; private Integer identifying;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
} }

View File

@ -9,12 +9,15 @@ 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;
/** /**
@ -295,5 +298,29 @@ 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;
} }

View File

@ -0,0 +1,41 @@
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);
}

View File

@ -9,6 +9,7 @@ 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;
@ -82,4 +83,12 @@ 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;
} }

View File

@ -0,0 +1,182 @@
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);
}
}
}

View File

@ -45,6 +45,9 @@ 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.*;
@ -271,7 +274,7 @@ public class SubConstructionUserFileServiceImpl extends ServiceImpl<SubConstruct
} }
} }
if (CollUtil.isEmpty(constructionUserFileList)) { if (CollUtil.isEmpty(constructionUserFileList)) {
return true; throw new ServiceException("未找到施工人员文件");
} }
// 9. 判断是否已经存在 // 9. 判断是否已经存在
List<Long> userIdList = constructionUserFileList.stream().map(SubConstructionUserFile::getUserId).toList(); List<Long> userIdList = constructionUserFileList.stream().map(SubConstructionUserFile::getUserId).toList();
@ -470,6 +473,94 @@ 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” 格式的文件夹并解析
*/ */

View File

@ -10,6 +10,7 @@ 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;
@ -37,9 +38,11 @@ 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;
@ -47,11 +50,12 @@ 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.attendance.TwoWeekDto; import org.dromara.project.domain.dto.constructionuserexit.BusConstructionUserExitQueryReq;
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;
@ -87,6 +91,7 @@ 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 {
@ -156,6 +161,10 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
@Resource @Resource
private AsyncUtil asyncUtil; private AsyncUtil asyncUtil;
@Resource
@Lazy
private IBusConstructionUserExitService busConstructionUserExitService;
/** /**
* 查询施工人员 * 查询施工人员
@ -170,7 +179,16 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
if (constructionUser == null) { if (constructionUser == null) {
throw new ServiceException("施工人员信息不存在", HttpStatus.NOT_FOUND); throw new ServiceException("施工人员信息不存在", HttpStatus.NOT_FOUND);
} }
return this.getVo(constructionUser, isHidden); SubConstructionUserVo vo = 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;
} }
/** /**
@ -229,7 +247,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("身份证解密失败"); log.warn("身份证解密失败{}", vo.getUserName(), e);
} }
subConstructionUserVo.setSfzNumber(decrypt); subConstructionUserVo.setSfzNumber(decrypt);
return subConstructionUserVo; return subConstructionUserVo;
@ -256,6 +274,7 @@ 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);
@ -659,7 +678,14 @@ 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);
} }
@ -888,6 +914,22 @@ 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;
} }
@ -1017,7 +1059,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::getId).toList(); List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getSysUserId).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)
@ -1046,12 +1088,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
constructionUserVo.setStandardSalary(workWageMap.get(key)); constructionUserVo.setStandardSalary(workWageMap.get(key));
} }
// 关联施工人员文件上传状态 // 关联施工人员文件上传状态
long count = fileCountMap.getOrDefault(constructionUser.getId(), 0L); long count = fileCountMap.getOrDefault(constructionUser.getSysUserId(), 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());
} }
// 解密身份证号码 // 解密身份证号码
@ -1456,7 +1498,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
* 人脸识别 * 人脸识别
* *
* @param file 图片文件 * @param file 图片文件
* @param userId * @param userId 用户id
* @return 是否匹配成功 * @return 是否匹配成功
*/ */
@Override @Override

View File

@ -31,7 +31,9 @@ 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;
@ -56,8 +58,10 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
@Resource @Resource
private IBusProjectService projectService; private IBusProjectService projectService;
// @Resource
// private ITenderSupplierInputService supplierInputService;
@Resource @Resource
private ITenderSupplierInputService supplierInputService; private IXzdSupplierInfoService supplierInfoService;
@Resource @Resource
@Lazy @Lazy
@ -195,7 +199,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) && supplierInputService.getById(supplierId) == null) { if (ObjectUtils.isNotEmpty(supplierId) && supplierInfoService.getById(supplierId) == null) {
throw new ServiceException("供应商不存在", HttpStatus.NOT_FOUND); throw new ServiceException("供应商不存在", HttpStatus.NOT_FOUND);
} }
} }
@ -253,9 +257,9 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
// 关联供应商名称 // 关联供应商名称
Long supplierId = contractor.getSupplierId(); Long supplierId = contractor.getSupplierId();
if (supplierId != null) { if (supplierId != null) {
TenderSupplierInput supplierInput = supplierInputService.getById(supplierId); XzdSupplierInfo supplierInfo = supplierInfoService.getById(supplierId);
if (supplierInput != null) { if (supplierInfo != null) {
contractorVo.setSupplierName(supplierInput.getSupplierName()); contractorVo.setSupplierName(supplierInfo.getUnitName());
} }
} }
return contractorVo; return contractorVo;

View File

@ -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));

View File

@ -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()

View File

@ -46,4 +46,7 @@ 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;
} }

View File

@ -57,7 +57,7 @@ public class BusBillofquantitiesVersionsController extends BaseController {
/** /**
* 获取所有版本号 * 获取所有版本号
*/ */
@SaCheckPermission("design:billofquantitiesVersions:obtainAllVersionNumbers") @SaCheckPermission("design:billofquantitiesVersions:list")
@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:sheetList") @SaCheckPermission("design:billofquantitiesVersions:list")
@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:obtainTheList") @SaCheckPermission("design:billofquantitiesVersions:list")
@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,6 +114,7 @@ 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);

View File

@ -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) {

View File

@ -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,6 +163,8 @@ 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;

View File

@ -15,6 +15,9 @@ 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;
@ -46,6 +49,7 @@ 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;
/** /**
* 查询收资清单列表 * 查询收资清单列表
@ -56,6 +60,13 @@ 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);
}
/** /**
* 导出收资清单列表 * 导出收资清单列表
*/ */
@ -129,7 +140,7 @@ public class DesCollectController extends BaseController {
* *
* @param projectId 项目ID * @param projectId 项目ID
*/ */
@SaCheckPermission("design:collect:byProjectId") @SaCheckPermission("design:collect:query")
@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) {

View File

@ -7,6 +7,7 @@ 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;
@ -14,14 +15,20 @@ 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;
@ -56,6 +63,21 @@ 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);
}
/** /**
* 查询收资文件列表 * 查询收资文件列表
@ -66,6 +88,8 @@ public class DesCollectFileController extends BaseController {
return desCollectFileService.queryPageList(bo, pageQuery); return desCollectFileService.queryPageList(bo, pageQuery);
} }
/** /**
* 导出收资文件列表 * 导出收资文件列表
*/ */
@ -142,6 +166,7 @@ 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;

View File

@ -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,6 +177,8 @@ 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. 基础参数校验(避免空数据)

View File

@ -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)

View File

@ -2,7 +2,10 @@ package org.dromara.design.controller;
import java.util.List; import java.util.List;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*; import jakarta.validation.constraints.*;
@ -15,7 +18,15 @@ import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto;
import org.dromara.design.domain.dto.desExtract.DesExtractBatchDto; import org.dromara.design.domain.dto.desExtract.DesExtractBatchDto;
import org.dromara.design.domain.vo.DesCollectFileVo; import org.dromara.design.domain.vo.DesCollectFileVo;
import org.dromara.design.domain.vo.DesUserVo; import org.dromara.design.domain.vo.DesUserVo;
import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo;
import org.dromara.design.service.IDesUserService; import org.dromara.design.service.IDesUserService;
import org.dromara.design.service.IDesVolumeCatalogService;
import org.dromara.system.domain.bo.SysPostBo;
import org.dromara.system.domain.bo.SysRoleBo;
import org.dromara.system.domain.vo.SysRoleVo;
import org.dromara.system.domain.vo.SysUserInfoVo;
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;
@ -47,6 +58,10 @@ public class DesExtractController extends BaseController {
private final IDesExtractService desExtractService; private final IDesExtractService desExtractService;
private final IDesUserService deUserService; private final IDesUserService deUserService;
private final IDesVolumeCatalogService desVolumeCatalogService;
private final ISysUserService userService;
/** /**
* 查询提资清单列表 * 查询提资清单列表
*/ */
@ -126,13 +141,29 @@ public class DesExtractController extends BaseController {
/** /**
* 查询用户的专业 * 查询用户的专业
*/ */
@SaCheckPermission("design:extract:userMajor") @SaCheckPermission("design:extract:add")
@GetMapping("/userMajor") @GetMapping("/userMajor")
public R<List<DesUserVo>> selectUserMajor(DesUserBo bo) { public R<List<DesUserVo>> selectUserMajor(DesUserBo bo) {
bo.setUserType("2"); bo.setUserType("2");
return R.ok( deUserService.queryList(bo)); return R.ok( deUserService.queryList(bo));
} }
@SaCheckPermission("design:extract:add")
@GetMapping("/catalogList/{projectId}")
public R<List<DesVolumeCatalogVo>> catalogList(@PathVariable("projectId") Long projectId) {
return R.ok(desVolumeCatalogService.catalogList(projectId));
}
@SaCheckPermission("design:extract:add")
@GetMapping("/userInfo/{userId}")
public R<SysUserInfoVo> userInfo(@PathVariable(value = "userId", required = false) Long userId) {
SysUserInfoVo userInfoVo = new SysUserInfoVo();
if (ObjectUtil.isNotNull(userId)) {
SysUserVo sysUser = userService.selectUserById(userId);
userInfoVo.setUser(sysUser);
}
return R.ok(userInfoVo);
}
/** /**
* 清单导出 * 清单导出

View File

@ -47,50 +47,50 @@ public class DesPrelimSchemeController extends BaseController {
return desPrelimSchemeService.queryPageList(bo, pageQuery); return desPrelimSchemeService.queryPageList(bo, pageQuery);
} }
/** // /**
* 导出设计初步方案列表 // * 导出设计初步方案列表
*/ // */
@SaCheckPermission("design:prelimScheme:export") // @SaCheckPermission("design:prelimScheme:export")
@Log(title = "设计初步方案", businessType = BusinessType.EXPORT) // @Log(title = "设计初步方案", businessType = BusinessType.EXPORT)
@PostMapping("/export") // @PostMapping("/export")
public void export(DesPrelimSchemeBo bo, HttpServletResponse response) { // public void export(DesPrelimSchemeBo bo, HttpServletResponse response) {
List<DesPrelimSchemeVo> list = desPrelimSchemeService.queryList(bo); // List<DesPrelimSchemeVo> list = desPrelimSchemeService.queryList(bo);
ExcelUtil.exportExcel(list, "设计初步方案", DesPrelimSchemeVo.class, response); // ExcelUtil.exportExcel(list, "设计初步方案", DesPrelimSchemeVo.class, response);
} // }
/** /**
* 获取设计初步方案详细信息 * 获取设计初步方案详细信息
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckPermission("design:prelimScheme:query") // @SaCheckPermission("design:prelimScheme:query")
@GetMapping("/{id}") @GetMapping("/{id}")
public R<DesPrelimSchemeVo> getInfo(@NotNull(message = "主键不能为空") public R<DesPrelimSchemeVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(desPrelimSchemeService.queryById(id)); return R.ok(desPrelimSchemeService.queryById(id));
} }
/** // /**
* 新增设计初步方案 // * 新增设计初步方案
*/ // */
@SaCheckPermission("design:prelimScheme:add") // @SaCheckPermission("design:prelimScheme:add")
@Log(title = "设计初步方案", businessType = BusinessType.INSERT) // @Log(title = "设计初步方案", businessType = BusinessType.INSERT)
@RepeatSubmit() // @RepeatSubmit()
@PostMapping() // @PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody DesPrelimSchemeBo bo) { // public R<Void> add(@Validated(AddGroup.class) @RequestBody DesPrelimSchemeBo bo) {
return toAjax(desPrelimSchemeService.insertByBo(bo)); // return toAjax(desPrelimSchemeService.insertByBo(bo));
} // }
/** // /**
* 修改设计初步方案 // * 修改设计初步方案
*/ // */
@SaCheckPermission("design:prelimScheme:edit") // @SaCheckPermission("design:prelimScheme:edit")
@Log(title = "设计初步方案", businessType = BusinessType.UPDATE) // @Log(title = "设计初步方案", businessType = BusinessType.UPDATE)
@RepeatSubmit() // @RepeatSubmit()
@PutMapping() // @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DesPrelimSchemeBo bo) { // public R<Void> edit(@Validated(EditGroup.class) @RequestBody DesPrelimSchemeBo bo) {
return toAjax(desPrelimSchemeService.updateByBo(bo)); // return toAjax(desPrelimSchemeService.updateByBo(bo));
} // }
/** /**
* 删除设计初步方案 * 删除设计初步方案
@ -109,7 +109,7 @@ public class DesPrelimSchemeController extends BaseController {
/** /**
* 新增设计初步方案文件 * 新增设计初步方案文件
*/ */
@SaCheckPermission("design:prelimScheme:upload") @SaCheckPermission("design:prelimScheme:add")
@Log(title = "设计初步方案", businessType = BusinessType.INSERT) @Log(title = "设计初步方案", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/upload") @PostMapping("/upload")
@ -121,7 +121,7 @@ public class DesPrelimSchemeController extends BaseController {
/** /**
* 修改设计方案文件 * 修改设计方案文件
*/ */
@SaCheckPermission("design:prelimScheme:update") @SaCheckPermission("design:prelimScheme:edit")
@Log(title = "设计初步方案", businessType = BusinessType.UPDATE) @Log(title = "设计初步方案", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/update/{id}") @PostMapping("/update/{id}")
@ -129,6 +129,8 @@ public class DesPrelimSchemeController extends BaseController {
return toAjax(desPrelimSchemeService.updateFile(file, projectId,id)); return toAjax(desPrelimSchemeService.updateFile(file, projectId,id));
} }
@SaCheckPermission("design:prelimScheme:export")
@Log(title = "设计初步方案", businessType = BusinessType.EXPORT)
@PostMapping("/exportZipWithStatus") @PostMapping("/exportZipWithStatus")
public void exportZipWithStatus(ExportDto dto, HttpServletResponse response) throws Exception { public void exportZipWithStatus(ExportDto dto, HttpServletResponse response) throws Exception {
desPrelimSchemeService.exportAsZipWithStatusPrefix(dto, response); desPrelimSchemeService.exportAsZipWithStatusPrefix(dto, response);

View File

@ -63,7 +63,7 @@ public class DesSchemeController extends BaseController {
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckPermission("design:scheme:query") // @SaCheckPermission("design:scheme:query")
@GetMapping("/{id}") @GetMapping("/{id}")
public R<DesSchemeVo> getInfo(@NotNull(message = "主键不能为空") public R<DesSchemeVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
@ -109,7 +109,7 @@ public class DesSchemeController extends BaseController {
/** /**
* 新增设计方案文件 * 新增设计方案文件
*/ */
@SaCheckPermission("design:scheme:upload") @SaCheckPermission("design:scheme:add")
@Log(title = "设计方案", businessType = BusinessType.INSERT) @Log(title = "设计方案", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/upload") @PostMapping("/upload")
@ -120,7 +120,7 @@ public class DesSchemeController extends BaseController {
/** /**
* 修改设计方案文件 * 修改设计方案文件
*/ */
@SaCheckPermission("design:scheme:update") @SaCheckPermission("design:scheme:edit")
@Log(title = "设计方案", businessType = BusinessType.UPDATE) @Log(title = "设计方案", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/update/{id}") @PostMapping("/update/{id}")
@ -129,6 +129,7 @@ public class DesSchemeController extends BaseController {
} }
@SaCheckPermission("design:scheme:export")
@PostMapping("/exportZipWithStatus") @PostMapping("/exportZipWithStatus")
public void exportZipWithStatus(ExportDto dto, HttpServletResponse response) throws Exception { public void exportZipWithStatus(ExportDto dto, HttpServletResponse response) throws Exception {
desSchemeService.exportAsZipWithStatusPrefix(dto, response); desSchemeService.exportAsZipWithStatusPrefix(dto, response);

View File

@ -61,7 +61,7 @@ public class DesSubcontractController extends BaseController {
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckPermission("design:subcontract:query") // @SaCheckPermission("design:subcontract:query")
@GetMapping("/{id}") @GetMapping("/{id}")
public R<DesSubcontractVo> getInfo(@NotNull(message = "主键不能为空") public R<DesSubcontractVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {

View File

@ -29,6 +29,9 @@ import org.dromara.design.domain.DesUserExcelData;
import org.dromara.design.domain.dto.desUser.DesUserBatchDto; import org.dromara.design.domain.dto.desUser.DesUserBatchDto;
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.dromara.system.domain.bo.SysUserBo;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.system.service.ISysUserService;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -64,6 +67,7 @@ public class DesUserController extends BaseController {
private final IDesUserService desUserService; private final IDesUserService desUserService;
private final IBusProjectService projectService; private final IBusProjectService projectService;
private final ISysUserService userService;
/** /**
* 查询设计人员列表 * 查询设计人员列表
@ -74,6 +78,12 @@ public class DesUserController extends BaseController {
return desUserService.queryPageList(bo, pageQuery); return desUserService.queryPageList(bo, pageQuery);
} }
@SaCheckPermission("design:user:list")
@GetMapping("/userList")
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
return userService.selectPageUserList(user, pageQuery);
}
/** /**
* 导出设计人员列表 * 导出设计人员列表
*/ */
@ -154,6 +164,7 @@ public class DesUserController extends BaseController {
private static final String TEMPLATE_PATH = "template/设计项目负责人任命通知单.docx"; private static final String TEMPLATE_PATH = "template/设计项目负责人任命通知单.docx";
@SaCheckPermission("design:user:downloadWord")
@PostMapping("/downloadWord") @PostMapping("/downloadWord")
public void generateDesignLeaderDoc( Long projectId, public void generateDesignLeaderDoc( Long projectId,
HttpServletResponse response HttpServletResponse response

View File

@ -26,6 +26,7 @@ import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogCreateReq;
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq; import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq;
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq; import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq;
import org.dromara.design.domain.vo.CopyUserVo; import org.dromara.design.domain.vo.CopyUserVo;
import org.dromara.design.domain.vo.DelayContVo;
import org.dromara.design.domain.vo.DesUserVo; import org.dromara.design.domain.vo.DesUserVo;
import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo; import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo;
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
@ -45,10 +46,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId; import java.time.ZoneId;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -89,7 +87,7 @@ public class DesVolumeCatalogController extends BaseController {
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckPermission("design:volumeCatalog:query") // @SaCheckPermission("design:volumeCatalog:query")
@GetMapping("/{id}") @GetMapping("/{id}")
public R<DesVolumeCatalogVo> getInfo(@NotNull(message = "主键不能为空") public R<DesVolumeCatalogVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id, String type) { @PathVariable Long id, String type) {
@ -101,7 +99,7 @@ public class DesVolumeCatalogController extends BaseController {
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckPermission("design:volumeCatalog:listFile") // @SaCheckPermission("design:volumeCatalog:listFile")
@GetMapping("/listFileById/{id}") @GetMapping("/listFileById/{id}")
public R<List<DesVolumeFileVo>> listFileById(@NotNull(message = "主键不能为空") public R<List<DesVolumeFileVo>> listFileById(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
@ -131,6 +129,16 @@ public class DesVolumeCatalogController extends BaseController {
return toAjax(desVolumeCatalogService.viewerFile(id)); return toAjax(desVolumeCatalogService.viewerFile(id));
} }
/**
* 计划过期统计
*/
@GetMapping("/delayCont/{projectId}")
public R<DelayContVo> delayCont(@PathVariable Long projectId) {
return R.ok(desVolumeCatalogService.delayCont(projectId));
}
/** /**
* 新增卷册目录 * 新增卷册目录
*/ */
@ -167,6 +175,9 @@ public class DesVolumeCatalogController extends BaseController {
} }
/** /**
* 收资清单模板导出 * 收资清单模板导出
*/ */
@ -222,7 +233,7 @@ public class DesVolumeCatalogController extends BaseController {
/** /**
* 查询设计人员列表 * 查询设计人员列表
*/ */
@SaCheckPermission("design:volumeCatalog:majorList") @SaCheckPermission("design:volumeCatalog:add")
@GetMapping("/majorList") @GetMapping("/majorList")
public R<List<DesUserVo>> list(DesUserBo bo) { public R<List<DesUserVo>> list(DesUserBo bo) {
@ -237,6 +248,13 @@ public class DesVolumeCatalogController extends BaseController {
return R.ok(uniqueMajors); return R.ok(uniqueMajors);
} }
@SaCheckPermission("design:volumeCatalog:add")
@GetMapping("/userList")
public TableDataInfo<DesUserVo> list(DesUserBo bo, PageQuery pageQuery) {
return desUserService.queryPageList(bo, pageQuery);
}
public static List<ExcelData> readExcel(MultipartFile file) throws IOException { public static List<ExcelData> readExcel(MultipartFile file) throws IOException {
List<ExcelData> dataList = new ArrayList<>(); List<ExcelData> dataList = new ArrayList<>();

View File

@ -96,7 +96,7 @@ public class DesVolumeFileController extends BaseController {
} }
@SaCheckPermission("design:volumeFile:joinList")
@GetMapping("/joinList") @GetMapping("/joinList")
public TableDataInfo<DesVolumeFileJoinVo> joinList(DesVolumeFileBo bo, PageQuery pageQuery) { public TableDataInfo<DesVolumeFileJoinVo> joinList(DesVolumeFileBo bo, PageQuery pageQuery) {
return desVolumeFileService.queryJoinPageList(bo, pageQuery); return desVolumeFileService.queryJoinPageList(bo, pageQuery);

Some files were not shown because too many files have changed in this diff Show More