init
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
/water-admin/target/
|
||||||
|
/water-common/*/target/
|
||||||
|
/water-modules/*/target/
|
||||||
6608
logs/sys-console.2026-05-08.log
Normal file
6608
logs/sys-console.2026-05-08.log
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2014,3 +2014,93 @@ Caused by: java.nio.channels.ClosedChannelException
|
|||||||
2026-05-09 10:10:00 [snail-job-grpc-client-executor-127.0.0.1-134] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[134] message:[UNAVAILABLE: io exception]
|
2026-05-09 10:10:00 [snail-job-grpc-client-executor-127.0.0.1-134] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[134] message:[UNAVAILABLE: io exception]
|
||||||
2026-05-09 10:10:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
2026-05-09 10:10:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
2026-05-09 10:10:10 [snail-job-grpc-client-executor-127.0.0.1-136] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[136] message:[UNAVAILABLE: io exception]
|
2026-05-09 10:10:10 [snail-job-grpc-client-executor-127.0.0.1-136] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[136] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:10:20 [snail-job-grpc-client-executor-127.0.0.1-137] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[137] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:10:30 [snail-job-grpc-client-executor-127.0.0.1-138] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[138] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:10:40 [snail-job-grpc-client-executor-127.0.0.1-139] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[139] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:10:50 [snail-job-grpc-client-executor-127.0.0.1-140] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[140] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:11:00 [snail-job-grpc-client-executor-127.0.0.1-142] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[141] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:11:10 [snail-job-grpc-client-executor-127.0.0.1-143] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[143] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:11:20 [snail-job-grpc-client-executor-127.0.0.1-144] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[144] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:11:30 [snail-job-grpc-client-executor-127.0.0.1-145] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[145] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:11:40 [snail-job-grpc-client-executor-127.0.0.1-146] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[146] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:11:50 [snail-job-grpc-client-executor-127.0.0.1-147] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[147] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:12:00 [snail-job-grpc-client-executor-127.0.0.1-148] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[148] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:12:10 [snail-job-grpc-client-executor-127.0.0.1-150] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[150] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:12:20 [snail-job-grpc-client-executor-127.0.0.1-151] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[151] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:12:30 [snail-job-grpc-client-executor-127.0.0.1-152] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[152] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:12:40 [snail-job-grpc-client-executor-127.0.0.1-153] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[153] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:12:50 [snail-job-grpc-client-executor-127.0.0.1-154] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[154] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:13:00 [snail-job-grpc-client-executor-127.0.0.1-155] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[155] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:13:10 [snail-job-grpc-client-executor-127.0.0.1-157] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[157] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:13:20 [snail-job-grpc-client-executor-127.0.0.1-158] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[158] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:13:30 [snail-job-grpc-client-executor-127.0.0.1-159] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[159] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:13:40 [snail-job-grpc-client-executor-127.0.0.1-160] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[160] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:13:50 [snail-job-grpc-client-executor-127.0.0.1-161] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[161] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:14:00 [snail-job-grpc-client-executor-127.0.0.1-163] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[163] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:14:10 [snail-job-grpc-client-executor-127.0.0.1-164] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[164] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:14:20 [snail-job-grpc-client-executor-127.0.0.1-165] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[165] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:14:30 [snail-job-grpc-client-executor-127.0.0.1-166] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[166] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:14:40 [snail-job-grpc-client-executor-127.0.0.1-167] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[167] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:14:50 [snail-job-grpc-client-executor-127.0.0.1-168] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[168] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:15:00 [snail-job-grpc-client-executor-127.0.0.1-169] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[170] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:15:10 [snail-job-grpc-client-executor-127.0.0.1-171] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[171] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:15:20 [snail-job-grpc-client-executor-127.0.0.1-172] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[172] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:15:30 [snail-job-grpc-client-executor-127.0.0.1-173] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[173] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:15:40 [snail-job-grpc-client-executor-127.0.0.1-174] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[174] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:15:50 [snail-job-grpc-client-executor-127.0.0.1-175] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[175] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:16:00 [snail-job-grpc-client-executor-127.0.0.1-176] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[177] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:16:10 [snail-job-grpc-client-executor-127.0.0.1-178] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[178] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:16:20 [snail-job-grpc-client-executor-127.0.0.1-179] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[179] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:16:30 [snail-job-grpc-client-executor-127.0.0.1-180] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[180] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:16:40 [snail-job-grpc-client-executor-127.0.0.1-181] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[181] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:50 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:16:50 [snail-job-grpc-client-executor-127.0.0.1-182] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[182] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:00 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:17:00 [snail-job-grpc-client-executor-127.0.0.1-184] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[184] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:10 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:17:10 [snail-job-grpc-client-executor-127.0.0.1-185] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[185] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:20 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:17:20 [snail-job-grpc-client-executor-127.0.0.1-186] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[186] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:30 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:17:30 [snail-job-grpc-client-executor-127.0.0.1-187] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[187] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:40 [sj-client-check] WARN c.a.s.c.c.r.c.g.SnailJobGrpcClient - gRPC channel state=TRANSIENT_FAILURE, try reconnect...
|
||||||
|
2026-05-09 10:17:40 [snail-job-grpc-client-executor-127.0.0.1-188] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[188] message:[UNAVAILABLE: io exception]
|
||||||
|
|||||||
BIN
logs/sys-error.2026-04-24.log.gz
Normal file
BIN
logs/sys-error.2026-04-24.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-error.2026-04-25.log.gz
Normal file
BIN
logs/sys-error.2026-04-25.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-error.2026-04-28.log.gz
Normal file
BIN
logs/sys-error.2026-04-28.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-error.2026-04-29.log.gz
Normal file
BIN
logs/sys-error.2026-04-29.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-error.2026-05-07.log.gz
Normal file
BIN
logs/sys-error.2026-05-07.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-error.2026-05-08.log.gz
Normal file
BIN
logs/sys-error.2026-05-08.log.gz
Normal file
Binary file not shown.
@@ -568,3 +568,48 @@ Caused by: java.sql.SQLException: Field 'user_id' doesn't have a default value
|
|||||||
2026-05-09 10:09:50 [snail-job-grpc-client-executor-127.0.0.1-133] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[133] message:[UNAVAILABLE: io exception]
|
2026-05-09 10:09:50 [snail-job-grpc-client-executor-127.0.0.1-133] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[133] message:[UNAVAILABLE: io exception]
|
||||||
2026-05-09 10:10:00 [snail-job-grpc-client-executor-127.0.0.1-134] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[134] message:[UNAVAILABLE: io exception]
|
2026-05-09 10:10:00 [snail-job-grpc-client-executor-127.0.0.1-134] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[134] message:[UNAVAILABLE: io exception]
|
||||||
2026-05-09 10:10:10 [snail-job-grpc-client-executor-127.0.0.1-136] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[136] message:[UNAVAILABLE: io exception]
|
2026-05-09 10:10:10 [snail-job-grpc-client-executor-127.0.0.1-136] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[136] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:20 [snail-job-grpc-client-executor-127.0.0.1-137] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[137] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:30 [snail-job-grpc-client-executor-127.0.0.1-138] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[138] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:40 [snail-job-grpc-client-executor-127.0.0.1-139] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[139] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:10:50 [snail-job-grpc-client-executor-127.0.0.1-140] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[140] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:00 [snail-job-grpc-client-executor-127.0.0.1-142] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[141] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:10 [snail-job-grpc-client-executor-127.0.0.1-143] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[143] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:20 [snail-job-grpc-client-executor-127.0.0.1-144] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[144] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:30 [snail-job-grpc-client-executor-127.0.0.1-145] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[145] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:40 [snail-job-grpc-client-executor-127.0.0.1-146] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[146] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:11:50 [snail-job-grpc-client-executor-127.0.0.1-147] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[147] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:00 [snail-job-grpc-client-executor-127.0.0.1-148] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[148] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:10 [snail-job-grpc-client-executor-127.0.0.1-150] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[150] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:20 [snail-job-grpc-client-executor-127.0.0.1-151] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[151] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:30 [snail-job-grpc-client-executor-127.0.0.1-152] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[152] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:40 [snail-job-grpc-client-executor-127.0.0.1-153] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[153] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:12:50 [snail-job-grpc-client-executor-127.0.0.1-154] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[154] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:00 [snail-job-grpc-client-executor-127.0.0.1-155] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[155] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:10 [snail-job-grpc-client-executor-127.0.0.1-157] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[157] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:20 [snail-job-grpc-client-executor-127.0.0.1-158] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[158] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:30 [snail-job-grpc-client-executor-127.0.0.1-159] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[159] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:40 [snail-job-grpc-client-executor-127.0.0.1-160] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[160] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:13:50 [snail-job-grpc-client-executor-127.0.0.1-161] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[161] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:00 [snail-job-grpc-client-executor-127.0.0.1-163] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[163] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:10 [snail-job-grpc-client-executor-127.0.0.1-164] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[164] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:20 [snail-job-grpc-client-executor-127.0.0.1-165] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[165] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:30 [snail-job-grpc-client-executor-127.0.0.1-166] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[166] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:40 [snail-job-grpc-client-executor-127.0.0.1-167] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[167] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:14:50 [snail-job-grpc-client-executor-127.0.0.1-168] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[168] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:00 [snail-job-grpc-client-executor-127.0.0.1-169] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[170] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:10 [snail-job-grpc-client-executor-127.0.0.1-171] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[171] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:20 [snail-job-grpc-client-executor-127.0.0.1-172] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[172] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:30 [snail-job-grpc-client-executor-127.0.0.1-173] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[173] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:40 [snail-job-grpc-client-executor-127.0.0.1-174] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[174] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:15:50 [snail-job-grpc-client-executor-127.0.0.1-175] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[175] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:00 [snail-job-grpc-client-executor-127.0.0.1-176] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[177] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:10 [snail-job-grpc-client-executor-127.0.0.1-178] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[178] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:20 [snail-job-grpc-client-executor-127.0.0.1-179] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[179] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:30 [snail-job-grpc-client-executor-127.0.0.1-180] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[180] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:40 [snail-job-grpc-client-executor-127.0.0.1-181] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[181] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:16:50 [snail-job-grpc-client-executor-127.0.0.1-182] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[182] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:00 [snail-job-grpc-client-executor-127.0.0.1-184] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[184] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:10 [snail-job-grpc-client-executor-127.0.0.1-185] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[185] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:20 [snail-job-grpc-client-executor-127.0.0.1-186] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[186] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:30 [snail-job-grpc-client-executor-127.0.0.1-187] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[187] message:[UNAVAILABLE: io exception]
|
||||||
|
2026-05-09 10:17:40 [snail-job-grpc-client-executor-127.0.0.1-188] ERROR c.a.s.c.c.handler.ClientRegister - heartbeat check requestId:[188] message:[UNAVAILABLE: io exception]
|
||||||
|
|||||||
BIN
logs/sys-info.2026-04-24.log.gz
Normal file
BIN
logs/sys-info.2026-04-24.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-info.2026-04-25.log.gz
Normal file
BIN
logs/sys-info.2026-04-25.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-info.2026-04-28.log.gz
Normal file
BIN
logs/sys-info.2026-04-28.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-info.2026-04-29.log.gz
Normal file
BIN
logs/sys-info.2026-04-29.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-info.2026-05-07.log.gz
Normal file
BIN
logs/sys-info.2026-05-07.log.gz
Normal file
Binary file not shown.
BIN
logs/sys-info.2026-05-08.log.gz
Normal file
BIN
logs/sys-info.2026-05-08.log.gz
Normal file
Binary file not shown.
@@ -0,0 +1,112 @@
|
|||||||
|
package org.dromara.app.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.app.domain.vo.AppDeviceVo;
|
||||||
|
import org.dromara.app.domain.bo.AppDeviceBo;
|
||||||
|
import org.dromara.app.service.IAppDeviceService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/device")
|
||||||
|
public class AppDeviceController extends BaseController {
|
||||||
|
|
||||||
|
private final IAppDeviceService appDeviceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备信息
|
||||||
|
列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:device:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<AppDeviceVo> list(AppDeviceBo bo, PageQuery pageQuery) {
|
||||||
|
return appDeviceService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出设备信息
|
||||||
|
列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:device:export")
|
||||||
|
@Log(title = "设备信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(AppDeviceBo bo, HttpServletResponse response) {
|
||||||
|
List<AppDeviceVo> list = appDeviceService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "设备信息 ", AppDeviceVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设备信息
|
||||||
|
详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:device:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<AppDeviceVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(appDeviceService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备信息
|
||||||
|
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:device:add")
|
||||||
|
@Log(title = "设备信息", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody AppDeviceBo bo) {
|
||||||
|
return toAjax(appDeviceService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备信息
|
||||||
|
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:device:edit")
|
||||||
|
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody AppDeviceBo bo) {
|
||||||
|
return toAjax(appDeviceService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:device:remove")
|
||||||
|
@Log(title = "设备信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(appDeviceService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.app.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleDetailVo;
|
||||||
|
import org.dromara.app.domain.bo.AppScheduleDetailBo;
|
||||||
|
import org.dromara.app.service.IAppScheduleDetailService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/scheduleDetail")
|
||||||
|
public class AppScheduleDetailController extends BaseController {
|
||||||
|
|
||||||
|
private final IAppScheduleDetailService appScheduleDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排程详情列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:scheduleDetail:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<AppScheduleDetailVo> list(AppScheduleDetailBo bo, PageQuery pageQuery) {
|
||||||
|
return appScheduleDetailService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出排程详情列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:scheduleDetail:export")
|
||||||
|
@Log(title = "排程详情", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(AppScheduleDetailBo bo, HttpServletResponse response) {
|
||||||
|
List<AppScheduleDetailVo> list = appScheduleDetailService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "排程详情", AppScheduleDetailVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取排程详情详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:scheduleDetail:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<AppScheduleDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(appScheduleDetailService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增排程详情
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:scheduleDetail:add")
|
||||||
|
@Log(title = "排程详情", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody AppScheduleDetailBo bo) {
|
||||||
|
return toAjax(appScheduleDetailService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改排程详情
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:scheduleDetail:edit")
|
||||||
|
@Log(title = "排程详情", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody AppScheduleDetailBo bo) {
|
||||||
|
return toAjax(appScheduleDetailService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除排程详情
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:scheduleDetail:remove")
|
||||||
|
@Log(title = "排程详情", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(appScheduleDetailService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.app.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.app.domain.vo.AppSchedulingDeviceVo;
|
||||||
|
import org.dromara.app.domain.bo.AppSchedulingDeviceBo;
|
||||||
|
import org.dromara.app.service.IAppSchedulingDeviceService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/schedulingDevice")
|
||||||
|
public class AppSchedulingDeviceController extends BaseController {
|
||||||
|
|
||||||
|
private final IAppSchedulingDeviceService appSchedulingDeviceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排程与设备关联列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:schedulingDevice:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<AppSchedulingDeviceVo> list(AppSchedulingDeviceBo bo, PageQuery pageQuery) {
|
||||||
|
return appSchedulingDeviceService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出排程与设备关联列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:schedulingDevice:export")
|
||||||
|
@Log(title = "排程与设备关联", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(AppSchedulingDeviceBo bo, HttpServletResponse response) {
|
||||||
|
List<AppSchedulingDeviceVo> list = appSchedulingDeviceService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "排程与设备关联", AppSchedulingDeviceVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取排程与设备关联详细信息
|
||||||
|
*
|
||||||
|
* @param schedulingId 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:schedulingDevice:query")
|
||||||
|
@GetMapping("/{schedulingId}")
|
||||||
|
public R<AppSchedulingDeviceVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long schedulingId) {
|
||||||
|
return R.ok(appSchedulingDeviceService.queryById(schedulingId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增排程与设备关联
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:schedulingDevice:add")
|
||||||
|
@Log(title = "排程与设备关联", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody AppSchedulingDeviceBo bo) {
|
||||||
|
return toAjax(appSchedulingDeviceService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改排程与设备关联
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:schedulingDevice:edit")
|
||||||
|
@Log(title = "排程与设备关联", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody AppSchedulingDeviceBo bo) {
|
||||||
|
return toAjax(appSchedulingDeviceService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除排程与设备关联
|
||||||
|
*
|
||||||
|
* @param schedulingIds 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:schedulingDevice:remove")
|
||||||
|
@Log(title = "排程与设备关联", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{schedulingIds}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] schedulingIds) {
|
||||||
|
return toAjax(appSchedulingDeviceService.deleteWithValidByIds(List.of(schedulingIds), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.app.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.app.domain.vo.AppWateringLogVo;
|
||||||
|
import org.dromara.app.domain.bo.AppWateringLogBo;
|
||||||
|
import org.dromara.app.service.IAppWateringLogService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/wateringLog")
|
||||||
|
public class AppWateringLogController extends BaseController {
|
||||||
|
|
||||||
|
private final IAppWateringLogService appWateringLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询浇水记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:wateringLog:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<AppWateringLogVo> list(AppWateringLogBo bo, PageQuery pageQuery) {
|
||||||
|
return appWateringLogService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出浇水记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:wateringLog:export")
|
||||||
|
@Log(title = "浇水记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(AppWateringLogBo bo, HttpServletResponse response) {
|
||||||
|
List<AppWateringLogVo> list = appWateringLogService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "浇水记录", AppWateringLogVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取浇水记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:wateringLog:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<AppWateringLogVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(appWateringLogService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增浇水记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:wateringLog:add")
|
||||||
|
@Log(title = "浇水记录", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody AppWateringLogBo bo) {
|
||||||
|
return toAjax(appWateringLogService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改浇水记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:wateringLog:edit")
|
||||||
|
@Log(title = "浇水记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody AppWateringLogBo bo) {
|
||||||
|
return toAjax(appWateringLogService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除浇水记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("app:wateringLog:remove")
|
||||||
|
@Log(title = "浇水记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(appWateringLogService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package org.dromara.app.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
对象 app_device
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("app_device")
|
||||||
|
public class AppDevice extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备编号
|
||||||
|
*/
|
||||||
|
private String deviceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备图片
|
||||||
|
*/
|
||||||
|
private String deviceImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 1-工作中 0-离线 2-待机 3-故障
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量
|
||||||
|
*/
|
||||||
|
private String powerLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量更新时间
|
||||||
|
*/
|
||||||
|
private Date powerLevelUpdatatime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WiFi名称
|
||||||
|
*/
|
||||||
|
private String wifiName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WiFi密码
|
||||||
|
*/
|
||||||
|
private String wifiPassword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备型号
|
||||||
|
*/
|
||||||
|
private String deviceEm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备序列号
|
||||||
|
*/
|
||||||
|
private String deviceSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固件版本
|
||||||
|
*/
|
||||||
|
private String fwVer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mac地址
|
||||||
|
*/
|
||||||
|
private String macAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到期时间
|
||||||
|
*/
|
||||||
|
private Date expirationTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package org.dromara.app.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日程排列对象 app_schedule
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("app_schedule")
|
||||||
|
public class AppSchedule extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0-关闭 1 开启
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
private List<AppScheduleDetail> details;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package org.dromara.app.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情对象 app_schedule_detail
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("app_schedule_detail")
|
||||||
|
public class AppScheduleDetail extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程id
|
||||||
|
*/
|
||||||
|
private Long scheduleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 周几 1-周一 2-周二 .... 7-周日
|
||||||
|
*/
|
||||||
|
private Integer weekday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private LocalTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间(分钟)
|
||||||
|
*/
|
||||||
|
private Integer durationMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水区域
|
||||||
|
*/
|
||||||
|
private Integer zones;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方式 0-排程 1-手动
|
||||||
|
*/
|
||||||
|
private String triggerType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package org.dromara.app.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联对象 app_scheduling_device
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("app_scheduling_device")
|
||||||
|
public class AppSchedulingDevice extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程id
|
||||||
|
*/
|
||||||
|
private Long schedulingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package org.dromara.app.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录对象 app_watering_log
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("app_watering_log")
|
||||||
|
public class AppWateringLog extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备ID
|
||||||
|
*/
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联排程
|
||||||
|
*/
|
||||||
|
private Long scheduleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间
|
||||||
|
*/
|
||||||
|
private String durationMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水区域
|
||||||
|
*/
|
||||||
|
private String zones;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-排程 1-手动
|
||||||
|
*/
|
||||||
|
private String triggerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package org.dromara.app.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppDevice;
|
||||||
|
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.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
业务对象 app_device
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = AppDevice.class, reverseConvertGenerate = false)
|
||||||
|
public class AppDeviceBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备编号
|
||||||
|
*/
|
||||||
|
private String deviceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备图片
|
||||||
|
*/
|
||||||
|
private String deviceImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 1-工作中 0-离线 2-待机 3-故障
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量
|
||||||
|
*/
|
||||||
|
private String powerLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量更新时间
|
||||||
|
*/
|
||||||
|
private Date powerLevelUpdatatime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WiFi名称
|
||||||
|
*/
|
||||||
|
private String wifiName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WiFi密码
|
||||||
|
*/
|
||||||
|
private String wifiPassword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备型号
|
||||||
|
*/
|
||||||
|
private String deviceEm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备序列号
|
||||||
|
*/
|
||||||
|
private String deviceSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固件版本
|
||||||
|
*/
|
||||||
|
private String fwVer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mac地址
|
||||||
|
*/
|
||||||
|
private String macAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到期时间
|
||||||
|
*/
|
||||||
|
private Date expirationTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package org.dromara.app.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppSchedule;
|
||||||
|
import org.dromara.app.domain.AppScheduleDetail;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日程排列业务对象 app_schedule
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = AppSchedule.class, reverseConvertGenerate = false)
|
||||||
|
public class AppScheduleBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private List<Long> deviceIds;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0-关闭 1 开启
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@NotEmpty(message = "至少需要配置一天")
|
||||||
|
private List<AppScheduleDetail> details;
|
||||||
|
|
||||||
|
// 内部类
|
||||||
|
@Data
|
||||||
|
public static class AppScheduleDetail extends org.dromara.app.domain.AppScheduleDetail {
|
||||||
|
@NotNull(message = "星期不能为空")
|
||||||
|
@Min(1) @Max(7)
|
||||||
|
private Integer weekday;
|
||||||
|
|
||||||
|
@NotNull(message = "开始时间不能为空")
|
||||||
|
private LocalTime startTime;
|
||||||
|
|
||||||
|
@NotNull(message = "持续时间不能为空")
|
||||||
|
//@Min(1) @Max(120)
|
||||||
|
private Integer durationMin;
|
||||||
|
|
||||||
|
//@NotNull(message = "浇水区域不能为空")
|
||||||
|
private Integer zones; // 位掩码
|
||||||
|
|
||||||
|
private String triggerType = "0";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.dromara.app.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppScheduleDetail;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情业务对象 app_schedule_detail
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = AppScheduleDetail.class, reverseConvertGenerate = false)
|
||||||
|
public class AppScheduleDetailBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程id
|
||||||
|
*/
|
||||||
|
private Long scheduleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 周几 1-周一 2-周二 .... 7-周日
|
||||||
|
*/
|
||||||
|
private String weekday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private LocalTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间(分钟)
|
||||||
|
*/
|
||||||
|
private String durationMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水区域
|
||||||
|
*/
|
||||||
|
private String zones;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方式 0-排程 1-手动
|
||||||
|
*/
|
||||||
|
private String triggerType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package org.dromara.app.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppSchedulingDevice;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联业务对象 app_scheduling_device
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = AppSchedulingDevice.class, reverseConvertGenerate = false)
|
||||||
|
public class AppSchedulingDeviceBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "排程id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long schedulingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "设备id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package org.dromara.app.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppWateringLog;
|
||||||
|
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.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录业务对象 app_watering_log
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = AppWateringLog.class, reverseConvertGenerate = false)
|
||||||
|
public class AppWateringLogBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备ID
|
||||||
|
*/
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联排程
|
||||||
|
*/
|
||||||
|
private Long scheduleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间
|
||||||
|
*/
|
||||||
|
private String durationMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水区域
|
||||||
|
*/
|
||||||
|
private String zones;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-排程 1-手动
|
||||||
|
*/
|
||||||
|
private String triggerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
package org.dromara.app.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.app.domain.AppDevice;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
视图对象 app_device
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = AppDevice.class)
|
||||||
|
public class AppDeviceVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备编号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备编号")
|
||||||
|
private String deviceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备图片
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备图片")
|
||||||
|
private String deviceImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 1-工作中 0-离线 2-待机 3-故障
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态 1-工作中 0-离线 2-待机 3-故障")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "电量")
|
||||||
|
private String powerLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量更新时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "电量更新时间")
|
||||||
|
private Date powerLevelUpdatatime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WiFi名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "WiFi名称")
|
||||||
|
private String wifiName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WiFi密码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "WiFi密码")
|
||||||
|
private String wifiPassword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备型号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备型号")
|
||||||
|
private String deviceEm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备序列号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备序列号")
|
||||||
|
private String deviceSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固件版本
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "固件版本")
|
||||||
|
private String fwVer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mac地址
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "mac地址")
|
||||||
|
private String macAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到期时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "到期时间")
|
||||||
|
private Date expirationTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package org.dromara.app.domain.vo;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.app.domain.AppScheduleDetail;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情视图对象 app_schedule_detail
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = AppScheduleDetail.class)
|
||||||
|
public class AppScheduleDetailVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "排程id")
|
||||||
|
private Long scheduleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 周几 1-周一 2-周二 .... 7-周日
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "周几 1-周一 2-周二 .... 7-周日")
|
||||||
|
private Integer weekday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开始时间")
|
||||||
|
private LocalTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间(分钟)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "持续时间(分钟)")
|
||||||
|
private Integer durationMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水区域
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "浇水区域")
|
||||||
|
private String zones;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方式 0-排程 1-手动
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "方式 0-排程 1-手动 ")
|
||||||
|
private String triggerType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package org.dromara.app.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import org.dromara.app.domain.AppSchedule;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.app.domain.bo.AppScheduleBo;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日程排列视图对象 app_schedule
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = AppSchedule.class)
|
||||||
|
public class AppScheduleVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "排程名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备ids
|
||||||
|
*/
|
||||||
|
private List<Long> deviceIds;
|
||||||
|
/**
|
||||||
|
* 状态 0-关闭 1 开启
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态 0-关闭 1 开启")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@NotEmpty(message = "至少需要配置一天")
|
||||||
|
private List<AppScheduleDetailVo> details;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package org.dromara.app.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppSchedulingDevice;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联视图对象 app_scheduling_device
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = AppSchedulingDevice.class)
|
||||||
|
public class AppSchedulingDeviceVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "排程id")
|
||||||
|
private Long schedulingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package org.dromara.app.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.app.domain.AppWateringLog;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录视图对象 app_watering_log
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = AppWateringLog.class)
|
||||||
|
public class AppWateringLogVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设备ID")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联排程
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联排程")
|
||||||
|
private Long scheduleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开始时间")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结束时间")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "持续时间")
|
||||||
|
private String durationMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水区域
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "浇水区域")
|
||||||
|
private String zones;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-排程 1-手动
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "0-排程 1-手动")
|
||||||
|
private String triggerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.dromara.app.mapper;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppDevice;
|
||||||
|
import org.dromara.app.domain.vo.AppDeviceVo;
|
||||||
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
||||||
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface AppDeviceMapper extends BaseMapperPlus<AppDevice, AppDeviceVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.app.mapper;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppScheduleDetail;
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleDetailVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface AppScheduleDetailMapper extends BaseMapperPlus<AppScheduleDetail, AppScheduleDetailVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.app.mapper;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppSchedule;
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日程排列Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface AppScheduleMapper extends BaseMapperPlus<AppSchedule, AppScheduleVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.app.mapper;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppSchedulingDevice;
|
||||||
|
import org.dromara.app.domain.vo.AppSchedulingDeviceVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface AppSchedulingDeviceMapper extends BaseMapperPlus<AppSchedulingDevice, AppSchedulingDeviceVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.app.mapper;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.AppWateringLog;
|
||||||
|
import org.dromara.app.domain.vo.AppWateringLogVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface AppWateringLogMapper extends BaseMapperPlus<AppWateringLog, AppWateringLogVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package org.dromara.app.service;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.vo.AppDeviceVo;
|
||||||
|
import org.dromara.app.domain.bo.AppDeviceBo;
|
||||||
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
||||||
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
Service接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface IAppDeviceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 设备信息
|
||||||
|
|
||||||
|
*/
|
||||||
|
AppDeviceVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询设备信息
|
||||||
|
列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 设备信息
|
||||||
|
分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<AppDeviceVo> queryPageList(AppDeviceBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的设备信息
|
||||||
|
列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 设备信息
|
||||||
|
列表
|
||||||
|
*/
|
||||||
|
List<AppDeviceVo> queryList(AppDeviceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param bo 设备信息
|
||||||
|
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(AppDeviceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param bo 设备信息
|
||||||
|
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(AppDeviceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除设备信息
|
||||||
|
信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.app.service;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleDetailVo;
|
||||||
|
import org.dromara.app.domain.bo.AppScheduleDetailBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情Service接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface IAppScheduleDetailService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排程详情
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 排程详情
|
||||||
|
*/
|
||||||
|
AppScheduleDetailVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询排程详情列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 排程详情分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<AppScheduleDetailVo> queryPageList(AppScheduleDetailBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的排程详情列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 排程详情列表
|
||||||
|
*/
|
||||||
|
List<AppScheduleDetailVo> queryList(AppScheduleDetailBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增排程详情
|
||||||
|
*
|
||||||
|
* @param bo 排程详情
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(AppScheduleDetailBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改排程详情
|
||||||
|
*
|
||||||
|
* @param bo 排程详情
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(AppScheduleDetailBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除排程详情信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
List<AppScheduleDetailVo> queryByScheduleId(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.app.service;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleVo;
|
||||||
|
import org.dromara.app.domain.bo.AppScheduleBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日程排列Service接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface IAppScheduleService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询日程排列
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 日程排列
|
||||||
|
*/
|
||||||
|
AppScheduleVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询日程排列列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 日程排列分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<AppScheduleVo> queryPageList(AppScheduleBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的日程排列列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 日程排列列表
|
||||||
|
*/
|
||||||
|
List<AppScheduleVo> queryList(AppScheduleBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增日程排列
|
||||||
|
*
|
||||||
|
* @param bo 日程排列
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(AppScheduleBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改日程排列
|
||||||
|
*
|
||||||
|
* @param bo 日程排列
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
List updateByBo(AppScheduleBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除日程排列信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.app.service;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.vo.AppSchedulingDeviceVo;
|
||||||
|
import org.dromara.app.domain.bo.AppSchedulingDeviceBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联Service接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface IAppSchedulingDeviceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排程与设备关联
|
||||||
|
*
|
||||||
|
* @param schedulingId 主键
|
||||||
|
* @return 排程与设备关联
|
||||||
|
*/
|
||||||
|
AppSchedulingDeviceVo queryById(Long schedulingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询排程与设备关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 排程与设备关联分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<AppSchedulingDeviceVo> queryPageList(AppSchedulingDeviceBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的排程与设备关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 排程与设备关联列表
|
||||||
|
*/
|
||||||
|
List<AppSchedulingDeviceVo> queryList(AppSchedulingDeviceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增排程与设备关联
|
||||||
|
*
|
||||||
|
* @param bo 排程与设备关联
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(AppSchedulingDeviceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改排程与设备关联
|
||||||
|
*
|
||||||
|
* @param bo 排程与设备关联
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(AppSchedulingDeviceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除排程与设备关联信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.app.service;
|
||||||
|
|
||||||
|
import org.dromara.app.domain.vo.AppWateringLogVo;
|
||||||
|
import org.dromara.app.domain.bo.AppWateringLogBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录Service接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
public interface IAppWateringLogService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询浇水记录
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 浇水记录
|
||||||
|
*/
|
||||||
|
AppWateringLogVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询浇水记录列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 浇水记录分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<AppWateringLogVo> queryPageList(AppWateringLogBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的浇水记录列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 浇水记录列表
|
||||||
|
*/
|
||||||
|
List<AppWateringLogVo> queryList(AppWateringLogBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增浇水记录
|
||||||
|
*
|
||||||
|
* @param bo 浇水记录
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(AppWateringLogBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改浇水记录
|
||||||
|
*
|
||||||
|
* @param bo 浇水记录
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(AppWateringLogBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除浇水记录信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package org.dromara.app.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
||||||
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||||
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.app.domain.bo.AppDeviceBo;
|
||||||
|
import org.dromara.app.domain.vo.AppDeviceVo;
|
||||||
|
import org.dromara.app.domain.AppDevice;
|
||||||
|
import org.dromara.app.mapper.AppDeviceMapper;
|
||||||
|
import org.dromara.app.service.IAppDeviceService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备信息
|
||||||
|
Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class AppDeviceServiceImpl implements IAppDeviceService {
|
||||||
|
|
||||||
|
private final AppDeviceMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 设备信息
|
||||||
|
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AppDeviceVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询设备信息
|
||||||
|
列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 设备信息
|
||||||
|
分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<AppDeviceVo> queryPageList(AppDeviceBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<AppDevice> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<AppDeviceVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的设备信息
|
||||||
|
列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 设备信息
|
||||||
|
列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppDeviceVo> queryList(AppDeviceBo bo) {
|
||||||
|
LambdaQueryWrapper<AppDevice> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<AppDevice> buildQueryWrapper(AppDeviceBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<AppDevice> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(AppDevice::getId);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeviceNo()), AppDevice::getDeviceNo, bo.getDeviceNo());
|
||||||
|
lqw.eq(bo.getUserId() != null, AppDevice::getUserId, bo.getUserId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), AppDevice::getDeviceName, bo.getDeviceName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeviceImg()), AppDevice::getDeviceImg, bo.getDeviceImg());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), AppDevice::getStatus, bo.getStatus());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getPowerLevel()), AppDevice::getPowerLevel, bo.getPowerLevel());
|
||||||
|
lqw.eq(bo.getPowerLevelUpdatatime() != null, AppDevice::getPowerLevelUpdatatime, bo.getPowerLevelUpdatatime());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getWifiName()), AppDevice::getWifiName, bo.getWifiName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getWifiPassword()), AppDevice::getWifiPassword, bo.getWifiPassword());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeviceEm()), AppDevice::getDeviceEm, bo.getDeviceEm());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeviceSn()), AppDevice::getDeviceSn, bo.getDeviceSn());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFwVer()), AppDevice::getFwVer, bo.getFwVer());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMacAddress()), AppDevice::getMacAddress, bo.getMacAddress());
|
||||||
|
lqw.eq(bo.getExpirationTime() != null, AppDevice::getExpirationTime, bo.getExpirationTime());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param bo 设备信息
|
||||||
|
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(AppDeviceBo bo) {
|
||||||
|
AppDevice add = MapstructUtils.convert(bo, AppDevice.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备信息
|
||||||
|
|
||||||
|
*
|
||||||
|
* @param bo 设备信息
|
||||||
|
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(AppDeviceBo bo) {
|
||||||
|
AppDevice update = MapstructUtils.convert(bo, AppDevice.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(AppDevice entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除设备信息
|
||||||
|
信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
package org.dromara.app.service.impl;
|
||||||
|
|
||||||
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.app.domain.bo.AppScheduleDetailBo;
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleDetailVo;
|
||||||
|
import org.dromara.app.domain.AppScheduleDetail;
|
||||||
|
import org.dromara.app.mapper.AppScheduleDetailMapper;
|
||||||
|
import org.dromara.app.service.IAppScheduleDetailService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程详情Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class AppScheduleDetailServiceImpl implements IAppScheduleDetailService {
|
||||||
|
|
||||||
|
private final AppScheduleDetailMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排程详情
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 排程详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AppScheduleDetailVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询排程详情列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 排程详情分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<AppScheduleDetailVo> queryPageList(AppScheduleDetailBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<AppScheduleDetail> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<AppScheduleDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的排程详情列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 排程详情列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppScheduleDetailVo> queryList(AppScheduleDetailBo bo) {
|
||||||
|
LambdaQueryWrapper<AppScheduleDetail> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<AppScheduleDetail> buildQueryWrapper(AppScheduleDetailBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<AppScheduleDetail> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(AppScheduleDetail::getId);
|
||||||
|
lqw.eq(bo.getScheduleId() != null, AppScheduleDetail::getScheduleId, bo.getScheduleId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getWeekday()), AppScheduleDetail::getWeekday, bo.getWeekday());
|
||||||
|
lqw.eq(bo.getStartTime() != null, AppScheduleDetail::getStartTime, bo.getStartTime());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDurationMin()), AppScheduleDetail::getDurationMin, bo.getDurationMin());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getZones()), AppScheduleDetail::getZones, bo.getZones());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTriggerType()), AppScheduleDetail::getTriggerType, bo.getTriggerType());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增排程详情
|
||||||
|
*
|
||||||
|
* @param bo 排程详情
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(AppScheduleDetailBo bo) {
|
||||||
|
AppScheduleDetail add = MapstructUtils.convert(bo, AppScheduleDetail.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改排程详情
|
||||||
|
*
|
||||||
|
* @param bo 排程详情
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(AppScheduleDetailBo bo) {
|
||||||
|
AppScheduleDetail update = MapstructUtils.convert(bo, AppScheduleDetail.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(AppScheduleDetail entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除排程详情信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AppScheduleDetailVo> queryByScheduleId(Long id) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
package org.dromara.app.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import org.dromara.app.domain.AppSchedulingDevice;
|
||||||
|
import org.dromara.app.mapper.AppScheduleDetailMapper;
|
||||||
|
import org.dromara.app.mapper.AppSchedulingDeviceMapper;
|
||||||
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.app.domain.bo.AppScheduleBo;
|
||||||
|
import org.dromara.app.domain.vo.AppScheduleVo;
|
||||||
|
import org.dromara.app.domain.AppScheduleDetail;
|
||||||
|
import org.dromara.app.domain.AppSchedule;
|
||||||
|
import org.dromara.app.mapper.AppScheduleMapper;
|
||||||
|
import org.dromara.app.service.IAppScheduleService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日程排列Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class AppScheduleServiceImpl implements IAppScheduleService {
|
||||||
|
|
||||||
|
private final AppScheduleMapper baseMapper;
|
||||||
|
private final AppScheduleDetailMapper scheduleDetailMapper;
|
||||||
|
private final AppSchedulingDeviceMapper schedulingDeviceMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询日程排列
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 日程排列
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AppScheduleVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询日程排列列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 日程排列分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<AppScheduleVo> queryPageList(AppScheduleBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<AppSchedule> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<AppScheduleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的日程排列列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 日程排列列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppScheduleVo> queryList(AppScheduleBo bo) {
|
||||||
|
LambdaQueryWrapper<AppSchedule> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<AppSchedule> buildQueryWrapper(AppScheduleBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<AppSchedule> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(AppSchedule::getId);
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getName()), AppSchedule::getName, bo.getName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), AppSchedule::getStatus, bo.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增日程排列
|
||||||
|
*
|
||||||
|
* @param bo 日程排列
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public Boolean insertByBo(AppScheduleBo bo) {
|
||||||
|
AppSchedule add = MapstructUtils.convert(bo, AppSchedule.class);
|
||||||
|
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
//创建排程
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
//创建详情
|
||||||
|
for (AppScheduleBo.AppScheduleDetail item:bo.getDetails()){
|
||||||
|
AppScheduleDetail detail = new AppScheduleDetail();
|
||||||
|
detail.setWeekday(item.getWeekday());
|
||||||
|
detail.setStartTime(item.getStartTime());
|
||||||
|
detail.setDurationMin(item.getDurationMin());
|
||||||
|
detail.setZones(item.getZones());
|
||||||
|
detail.setTriggerType(item.getTriggerType());
|
||||||
|
scheduleDetailMapper.insert(detail);
|
||||||
|
}
|
||||||
|
//绑定设备
|
||||||
|
for (Long deviceId:bo.getDeviceIds()){
|
||||||
|
//查询设备日程冲突
|
||||||
|
List list = checkConflict(deviceId, bo);
|
||||||
|
if (list.size()!=0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//没冲突设备绑定日程
|
||||||
|
AppSchedulingDevice appSchedulingDevice = new AppSchedulingDevice();
|
||||||
|
appSchedulingDevice.setDeviceId(deviceId);
|
||||||
|
appSchedulingDevice.setSchedulingId(add.getId());
|
||||||
|
appSchedulingDevice.setCreateTime(new Date());
|
||||||
|
schedulingDeviceMapper.insert(appSchedulingDevice);
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改日程排列
|
||||||
|
*
|
||||||
|
* @param bo 日程排列
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List updateByBo(AppScheduleBo bo) {
|
||||||
|
AppSchedule update = MapstructUtils.convert(bo, AppSchedule.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
|
||||||
|
|
||||||
|
//修改详情
|
||||||
|
for (AppScheduleBo.AppScheduleDetail item:bo.getDetails()){
|
||||||
|
AppScheduleDetail detail = new AppScheduleDetail();
|
||||||
|
detail.setWeekday(item.getWeekday());
|
||||||
|
detail.setStartTime(item.getStartTime());
|
||||||
|
detail.setDurationMin(item.getDurationMin());
|
||||||
|
detail.setZones(item.getZones());
|
||||||
|
detail.setTriggerType(item.getTriggerType());
|
||||||
|
scheduleDetailMapper.updateById(detail);
|
||||||
|
}
|
||||||
|
//绑定设备
|
||||||
|
for (Long deviceId:bo.getDeviceIds()){
|
||||||
|
//查询设备日程冲突
|
||||||
|
List list = checkConflict(deviceId, bo);
|
||||||
|
if (list.size()!=0){
|
||||||
|
//有冲突
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//没冲突设备绑定日程
|
||||||
|
AppSchedulingDevice appSchedulingDevice = new AppSchedulingDevice();
|
||||||
|
appSchedulingDevice.setDeviceId(deviceId);
|
||||||
|
appSchedulingDevice.setSchedulingId(bo.getId());
|
||||||
|
appSchedulingDevice.setCreateTime(new Date());
|
||||||
|
}
|
||||||
|
return new ArrayList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(AppSchedule entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除日程排列信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查新日程与设备已绑定日程是否存在时间冲突
|
||||||
|
*/
|
||||||
|
public List checkConflict(Long deviceId, AppScheduleBo newSchedule) {
|
||||||
|
// 1. 获取该设备所有已绑定的日程
|
||||||
|
List<AppSchedulingDevice> existingBindings = schedulingDeviceMapper.selectList(new QueryWrapper<AppSchedulingDevice>().eq("device_id", deviceId));
|
||||||
|
|
||||||
|
List conflicts = new ArrayList<>();
|
||||||
|
|
||||||
|
// 2. 对新日程的每一天,与已存在的每一天逐一比较
|
||||||
|
for (AppScheduleDetail newDay : newSchedule.getDetails()) {
|
||||||
|
//关闭的排程直接跳出
|
||||||
|
if ("0".equals(newSchedule.getStatus())) break;
|
||||||
|
//此设备日程
|
||||||
|
for (AppSchedulingDevice existing : existingBindings){
|
||||||
|
AppScheduleVo appScheduleVo = baseMapper.selectVoById(existing.getSchedulingId());
|
||||||
|
if (ObjectUtil.isNotNull(appScheduleVo) && !"0".equals(appScheduleVo.getStatus())){
|
||||||
|
List<AppScheduleDetail> details = scheduleDetailMapper.selectList(new QueryWrapper<AppScheduleDetail>().eq("scheduling_id", existing.getSchedulingId()));
|
||||||
|
|
||||||
|
for (AppScheduleDetail existingDay:details ){
|
||||||
|
|
||||||
|
// 3. 同一天才检查时间重叠
|
||||||
|
if (newDay.getWeekday() == existingDay.getWeekday()) {
|
||||||
|
if (timeOverlap(newDay, existingDay)) {
|
||||||
|
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("scheduleName", appScheduleVo.getName());
|
||||||
|
map.put("newDay", newDay);
|
||||||
|
map.put("existingDay", existingDay);
|
||||||
|
conflicts.add(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return conflicts; // 空列表 = 无冲突
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 判断两段时间是否重叠
|
||||||
|
* 重叠条件:start1 < end2 && start2 < end1
|
||||||
|
*/
|
||||||
|
public boolean timeOverlap(AppScheduleDetail a, AppScheduleDetail b) {
|
||||||
|
LocalTime bendTime = b.getStartTime().plusMinutes(b.getDurationMin());
|
||||||
|
LocalTime aendTime = a.getStartTime().plusMinutes(a.getDurationMin());
|
||||||
|
|
||||||
|
return a.getStartTime().isBefore(bendTime)
|
||||||
|
&& b.getStartTime().isBefore(aendTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package org.dromara.app.service.impl;
|
||||||
|
|
||||||
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.app.domain.bo.AppSchedulingDeviceBo;
|
||||||
|
import org.dromara.app.domain.vo.AppSchedulingDeviceVo;
|
||||||
|
import org.dromara.app.domain.AppSchedulingDevice;
|
||||||
|
import org.dromara.app.mapper.AppSchedulingDeviceMapper;
|
||||||
|
import org.dromara.app.service.IAppSchedulingDeviceService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排程与设备关联Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class AppSchedulingDeviceServiceImpl implements IAppSchedulingDeviceService {
|
||||||
|
|
||||||
|
private final AppSchedulingDeviceMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排程与设备关联
|
||||||
|
*
|
||||||
|
* @param schedulingId 主键
|
||||||
|
* @return 排程与设备关联
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AppSchedulingDeviceVo queryById(Long schedulingId){
|
||||||
|
return baseMapper.selectVoById(schedulingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询排程与设备关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 排程与设备关联分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<AppSchedulingDeviceVo> queryPageList(AppSchedulingDeviceBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<AppSchedulingDevice> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<AppSchedulingDeviceVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的排程与设备关联列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 排程与设备关联列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppSchedulingDeviceVo> queryList(AppSchedulingDeviceBo bo) {
|
||||||
|
LambdaQueryWrapper<AppSchedulingDevice> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<AppSchedulingDevice> buildQueryWrapper(AppSchedulingDeviceBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<AppSchedulingDevice> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(bo.getSchedulingId() != null, AppSchedulingDevice::getSchedulingId, bo.getSchedulingId());
|
||||||
|
lqw.eq(bo.getDeviceId() != null, AppSchedulingDevice::getDeviceId, bo.getDeviceId());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增排程与设备关联
|
||||||
|
*
|
||||||
|
* @param bo 排程与设备关联
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(AppSchedulingDeviceBo bo) {
|
||||||
|
AppSchedulingDevice add = MapstructUtils.convert(bo, AppSchedulingDevice.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setSchedulingId(add.getSchedulingId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改排程与设备关联
|
||||||
|
*
|
||||||
|
* @param bo 排程与设备关联
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(AppSchedulingDeviceBo bo) {
|
||||||
|
AppSchedulingDevice update = MapstructUtils.convert(bo, AppSchedulingDevice.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(AppSchedulingDevice entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除排程与设备关联信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
package org.dromara.app.service.impl;
|
||||||
|
|
||||||
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.app.domain.bo.AppWateringLogBo;
|
||||||
|
import org.dromara.app.domain.vo.AppWateringLogVo;
|
||||||
|
import org.dromara.app.domain.AppWateringLog;
|
||||||
|
import org.dromara.app.mapper.AppWateringLogMapper;
|
||||||
|
import org.dromara.app.service.IAppWateringLogService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浇水记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2026-04-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class AppWateringLogServiceImpl implements IAppWateringLogService {
|
||||||
|
|
||||||
|
private final AppWateringLogMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询浇水记录
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 浇水记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AppWateringLogVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询浇水记录列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 浇水记录分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<AppWateringLogVo> queryPageList(AppWateringLogBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<AppWateringLog> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<AppWateringLogVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的浇水记录列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 浇水记录列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppWateringLogVo> queryList(AppWateringLogBo bo) {
|
||||||
|
LambdaQueryWrapper<AppWateringLog> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<AppWateringLog> buildQueryWrapper(AppWateringLogBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<AppWateringLog> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(AppWateringLog::getId);
|
||||||
|
lqw.eq(bo.getUserId() != null, AppWateringLog::getUserId, bo.getUserId());
|
||||||
|
lqw.eq(bo.getDeviceId() != null, AppWateringLog::getDeviceId, bo.getDeviceId());
|
||||||
|
lqw.eq(bo.getScheduleId() != null, AppWateringLog::getScheduleId, bo.getScheduleId());
|
||||||
|
lqw.eq(bo.getStartTime() != null, AppWateringLog::getStartTime, bo.getStartTime());
|
||||||
|
lqw.eq(bo.getEndTime() != null, AppWateringLog::getEndTime, bo.getEndTime());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDurationMin()), AppWateringLog::getDurationMin, bo.getDurationMin());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getZones()), AppWateringLog::getZones, bo.getZones());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTriggerType()), AppWateringLog::getTriggerType, bo.getTriggerType());
|
||||||
|
lqw.eq(bo.getCreatedTime() != null, AppWateringLog::getCreatedTime, bo.getCreatedTime());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增浇水记录
|
||||||
|
*
|
||||||
|
* @param bo 浇水记录
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(AppWateringLogBo bo) {
|
||||||
|
AppWateringLog add = MapstructUtils.convert(bo, AppWateringLog.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改浇水记录
|
||||||
|
*
|
||||||
|
* @param bo 浇水记录
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(AppWateringLogBo bo) {
|
||||||
|
AppWateringLog update = MapstructUtils.convert(bo, AppWateringLog.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(AppWateringLog entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除浇水记录信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.app.mapper.AppDeviceMapper">
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.app.mapper.AppScheduleDetailMapper">
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.app.mapper.AppScheduleMapper">
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.app.mapper.AppSchedulingDeviceMapper">
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.app.mapper.AppWateringLogMapper">
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user