提交代码

This commit is contained in:
zlwu committed 2025-08-13 15:02:38 +08:00
1 parent 1bf7f78c97
commit 719f69fe11
7 files changed
+579 -312

No files matched your search

-117
View File
@@ -1,117 +0,0 @@
Application Version: 5.4.0
Spring Boot Version: 3.4.6
__________ _____.___.__ ____ ____ __________.__
\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
| _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
| | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
|____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
\/ \/ \/ \/
2025-07-26 13:02:51 [background-preinit] INFO  o.h.validator.internal.util.Version
 - HV000001: Hibernate Validator 8.0.2.Final
2025-07-26 13:02:51 [restartedMain] INFO  org.dromara.DromaraApplication
 - Starting DromaraApplication using Java 17.0.9 with PID 89083 (/Users/wuzhen/Documents/myworkspace/myproject/hzdyjspro/all-project/backend/ruoyi-admin/target/classes started by wuzhen in /Users/wuzhen/Documents/myworkspace/myproject/hzdyjspro/all-project/backend/ruoyi-admin)
2025-07-26 13:02:51 [restartedMain] INFO  org.dromara.DromaraApplication
 - The following 1 profile is active: "dev"
2025-07-26 13:02:55 [restartedMain] DEBUG o.apache.ibatis.logging.LogFactory
 - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
2025-07-26 13:02:57 [restartedMain] INFO  io.undertow.servlet
 - Initializing Spring embedded WebApplicationContext
2025-07-26 13:02:58 [restartedMain] INFO  c.b.d.d.DynamicRoutingDataSource
 - dynamic-datasource detect P6SPY plugin and enabled it
2025-07-26 13:02:58 [restartedMain] INFO  com.zaxxer.hikari.HikariDataSource
 - master - Starting...
2025-07-26 13:02:58 [restartedMain] INFO  com.zaxxer.hikari.pool.HikariPool
 - master - Added connection com.mysql.cj.jdbc.ConnectionImpl@47691398
2025-07-26 13:02:58 [restartedMain] INFO  com.zaxxer.hikari.HikariDataSource
 - master - Start completed.
2025-07-26 13:02:58 [restartedMain] INFO  c.b.d.d.DynamicRoutingDataSource
 - dynamic-datasource - add a datasource named [master] success
2025-07-26 13:02:58 [restartedMain] INFO  c.b.d.d.DynamicRoutingDataSource
 - dynamic-datasource initial loaded [1] datasource,primary datasource named [master]
2025-07-26 13:03:00 [restartedMain] WARN  c.b.m.c.injector.DefaultSqlInjector
 - class org.dromara.xg.domain.XgSysDept ,Not found @TableId annotation, Cannot use Mybatis-Plus 'xxById' Method.
2025-07-26 13:03:01 [restartedMain] ERROR c.b.m.core.MybatisConfiguration
 - mapper[org.dromara.zsjy.mapper.ZsjyEnrollmentProcessMapper.countByPaymentStatus] is ignored, because it exists, maybe from xml file
2025-07-26 13:03:01 [restartedMain] ERROR c.b.m.core.MybatisConfiguration
 - mapper[org.dromara.zsjy.mapper.ZsjyEnrollmentProcessMapper.countByAdmissionStatus] is ignored, because it exists, maybe from xml file
2025-07-26 13:03:01 [restartedMain] ERROR c.b.m.core.MybatisConfiguration
 - mapper[org.dromara.zsjy.mapper.ZsjyEnrollmentProcessMapper.selectByEnrollmentId] is ignored, because it exists, maybe from xml file
_ _ |_ _ _|_. ___ _ | _
| | |\/|_)(_| | |_\ |_)||_|_\
/ |
3.5.12
2025-07-26 13:03:02 [restartedMain] INFO  o.d.common.redis.config.RedisConfig
 - 初始化 redis 配置
2025-07-26 13:03:02 [restartedMain] INFO  org.redisson.Version
 - Redisson 3.45.1
2025-07-26 13:03:02 [redisson-netty-1-6] INFO  o.r.connection.ConnectionsHolder
 - 1 connections initialized for 47.99.164.66/47.99.164.66:16379
2025-07-26 13:03:03 [redisson-netty-1-3] INFO  o.r.connection.ConnectionsHolder
 - 8 connections initialized for 47.99.164.66/47.99.164.66:16379
2025-07-26 13:03:06 [restartedMain] INFO  c.a.s.c.j.c.e.b.AbstractScriptExecutor$SnailFileUtils
 - [FileUtils] [workspace] use user.home as workspace: /Users/wuzhen/snailJob/worker
2025-07-26 13:03:06 [restartedMain] INFO  c.a.s.c.j.c.e.b.AbstractScriptExecutor$SnailFileUtils
 - [FileUtils] [workspace] use user.home as workspace: /Users/wuzhen/snailJob/worker
2025-07-26 13:03:06 [restartedMain] INFO  c.a.s.c.j.c.e.b.AbstractScriptExecutor$SnailFileUtils
 - [FileUtils] [workspace] use user.home as workspace: /Users/wuzhen/snailJob/worker
2025-07-26 13:03:07 [restartedMain] INFO  o.d.common.json.config.JacksonConfig
 - 初始化 jackson 配置
____ ____ ___ ____ _ _ ____ _ _
[__ |__| __ | | | |_/ |___ |\ |
___] | | | |__| | \_ |___ | \|
https://sa-token.cc (v1.42.0)
2025-07-26 13:03:08 [restartedMain] INFO  c.b.m.e.s.MybatisPlusApplicationContextAware
 - Register ApplicationContext instances org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1d95e68a
▄ ▄ ▄▄▄▄▄▄ ▄
█ █ █ ▄▄▄ ▄ ▄▄ ▄▄▄▄▄ █ █ ▄▄▄ ▄ ▄
▀ █▀█ █ ▀ █ █▀ ▀ █ █ █ ▄▄▄▄▄ █▄▄▄▄▄ █ █▀ ▀█ ▀▄ ▄ ▄▀
██ ██▀ ▄▀▀▀█ █ █ █ █ █ █ █ █ █▄█▄█
█ █ ▀▄▄▀█ █ █ █ █ █ █▄▄ ▀█▄█▀ █ █
 :: Warm-Flow :: (v1.7.3)
2025-07-26 13:03:24 [restartedMain] INFO  o.d.w.p.modes.sb.config.BeanConfig
 - 【warm-flow】,加载完成
2025-07-26 13:03:26 [restartedMain] WARN  o.s.b.d.a.OptionalLiveReloadServer
 - Unable to start LiveReload server
2025-07-26 13:03:27 [restartedMain] INFO  io.undertow
 - starting server: Undertow - 2.3.18.Final
2025-07-26 13:03:27 [restartedMain] INFO  org.xnio
 - XNIO version 3.8.16.Final
2025-07-26 13:03:28 [restartedMain] INFO  org.xnio.nio
 - XNIO NIO Implementation Version 3.8.16.Final
2025-07-26 13:03:28 [restartedMain] INFO  org.jboss.threads
 - JBoss Threads version 3.5.0.Final
2025-07-26 13:03:28 [restartedMain] INFO  io.undertow
 - stopping server: Undertow - 2.3.18.Final
2025-07-26 13:03:28 [restartedMain] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext
 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'
2025-07-26 13:03:28 [restartedMain] INFO  o.d.c.core.config.ThreadPoolConfig
 - ====关闭后台任务任务线程池====
2025-07-26 13:03:28 [restartedMain] INFO  c.b.d.d.DynamicRoutingDataSource
 - dynamic-datasource start closing ....
2025-07-26 13:03:28 [restartedMain] INFO  com.zaxxer.hikari.HikariDataSource
 - master - Shutdown initiated...
2025-07-26 13:03:28 [restartedMain] INFO  com.zaxxer.hikari.HikariDataSource
 - master - Shutdown completed.
2025-07-26 13:03:28 [restartedMain] INFO  c.b.d.d.d.DefaultDataSourceDestroyer
 - dynamic-datasource close the datasource named [master] success,
2025-07-26 13:03:28 [restartedMain] INFO  c.b.d.d.DynamicRoutingDataSource
 - dynamic-datasource all closed success,bye
2025-07-26 13:03:28 [restartedMain] ERROR o.s.b.d.LoggingFailureAnalysisReporter
 -
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
-37
View File
@@ -1,37 +0,0 @@
mysql: [Warning] Using a password on the command line interface can be insecure.
info
=== 1. 班主任和班级信息检查 ===
info
=== 2. 奖学金批次信息检查 ===
batch_id batch_name batch_status start_time end_time create_time
1952730449122004993 2025-2026??????????????? ACTIVE 2025-08-05 00:00:00 2025-08-29 00:00:00 2025-08-05 21:56:34
1 2024-2025??????????? ACTIVE 2024-09-01 00:00:00 2024-12-31 23:59:59 2025-08-05 09:04:39
info
=== 3. 奖学金类型信息检查 ===
type_id type_name level_type type_status batch_id batch_name
1 ??????? FIRST 1 1953330495479644161 2025-2026?????????????
1 ??????? FIRST 1 1952730449122004993 2025-2026???????????????
5 ????????? FIRST 1 1952730449122004993 2025-2026???????????????
1953004971846852609 ??????? FIRST 1 1952730449122004993 2025-2026???????????????
6 ????????? FIRST 1 NULL NULL
2 ??????? SECOND 1 1953330495479644161 2025-2026?????????????
2 ??????? SECOND 1 1952730449122004993 2025-2026???????????????
1953005237862195202 ??????? SECOND 1 1952730449122004993 2025-2026???????????????
7 ????????? SECOND 1 NULL NULL
1953004602014097409 ??????? SPECIAL 1 1952730449122004993 2025-2026???????????????
4 ????????? SPECIAL 1 1952730449122004993 2025-2026???????????????
8 ??????? SPECIAL 1 NULL NULL
1952634577994387457 ????? SPECIAL 1 1952730449122004993 2025-2026???????????????
1953004324552499202 ?????? SPECIAL 1 1952730449122004993 2025-2026???????????????
3 ??????? THIRD 1 1952730449122004993 2025-2026???????????????
1953005415696490497 ??????? THIRD 1 1952730449122004993 2025-2026???????????????
info
=== 4. 班级名额分配情况检查 ===
quota_id batch_id batch_name scholarship_type_id type_name class_id class_name total_quota used_quota available_quota allocation_method status create_time
2001 1 2024-2025??????????? 1 ??????? 1001 NULL 2 0 2 MANUAL ACTIVE 2025-08-06 11:00:49
2003 1 2024-2025??????????? 2 ??????? 1001 NULL 3 0 2 MANUAL ACTIVE 2025-08-06 11:00:49
2002 1 2024-2025??????????? 1 ??????? 1002 NULL 1 0 1 MANUAL ACTIVE 2025-08-06 11:00:49
2004 1 2024-2025??????????? 2 ??????? 1002 NULL 2 0 2 MANUAL ACTIVE 2025-08-06 11:00:49
info
=== 5. 已使用名额情况检查 ===
ERROR 1054 (42S22) at line 87: Unknown column 'sa.applicant_class_id' in 'field list'
@@ -43,13 +43,13 @@ public interface XgDormBedMapper extends BaseMapperPlus<XgDormBed, XgDormBedVo>
bs.status as assignment_status,
bs.college_id,
c.college_name,
college_dept.dept_name as college_name,
bs.major_id,
c.major_name,
major_dept.dept_name as major_name,
bs.class_id,
c.class_name,
class_dept.dept_name as class_name,
c.class_code,
c.grade,
@@ -62,6 +62,9 @@ public interface XgDormBedMapper extends BaseMapperPlus<XgDormBed, XgDormBedVo>
FROM xg_dorm_bed b
LEFT JOIN xg_dorm_room r ON b.room_id = r.id
LEFT JOIN xg_dorm_bed_student bs ON b.id = bs.bed_id AND bs.status = '0' AND bs.deleted = '0'
LEFT JOIN sys_dept college_dept ON bs.college_id = college_dept.dept_id AND college_dept.del_flag = '0'
LEFT JOIN sys_dept major_dept ON bs.major_id = major_dept.dept_id AND major_dept.del_flag = '0'
LEFT JOIN sys_dept class_dept ON bs.class_id = class_dept.dept_id AND class_dept.del_flag = '0'
LEFT JOIN xg_class_msg c ON bs.class_id = c.id AND c.deleted = 0
LEFT JOIN xg_student_msg s ON bs.student_id = s.id AND s.deleted = 0
WHERE b.room_id = #{roomId}
@@ -96,13 +99,13 @@ public interface XgDormBedMapper extends BaseMapperPlus<XgDormBed, XgDormBedVo>
bs.status as assignment_status,
bs.college_id,
c.college_name,
college_dept.dept_name as college_name,
bs.major_id,
c.major_name,
major_dept.dept_name as major_name,
bs.class_id,
c.class_name,
class_dept.dept_name as class_name,
c.class_code,
c.grade,
@@ -115,6 +118,9 @@ public interface XgDormBedMapper extends BaseMapperPlus<XgDormBed, XgDormBedVo>
FROM xg_dorm_bed b
LEFT JOIN xg_dorm_room r ON b.room_id = r.id
LEFT JOIN xg_dorm_bed_student bs ON b.id = bs.bed_id AND bs.status = '0' AND bs.deleted = '0'
LEFT JOIN sys_dept college_dept ON bs.college_id = college_dept.dept_id AND college_dept.del_flag = '0'
LEFT JOIN sys_dept major_dept ON bs.major_id = major_dept.dept_id AND major_dept.del_flag = '0'
LEFT JOIN sys_dept class_dept ON bs.class_id = class_dept.dept_id AND class_dept.del_flag = '0'
LEFT JOIN xg_class_msg c ON bs.class_id = c.id AND c.deleted = 0
LEFT JOIN xg_student_msg s ON bs.student_id = s.id AND s.deleted = 0
WHERE r.building_id = #{buildingId}
@@ -234,12 +234,15 @@ public class XgDormBedStudentServiceImpl implements IXgDormBedStudentService {
}
}
// 验证学院人数总和是否等于床位总数
// 验证学院人数总和不能超过床位总数(允许少于床位总数)
int totalStudents = collegeCounts.stream().mapToInt(Integer::intValue).sum();
if (totalStudents != totalBeds) {
throw new RuntimeException("学院人数总和(" + totalStudents + ")与床位总数(" + totalBeds + ")不匹配");
if (totalStudents > totalBeds) {
throw new RuntimeException("学院人数总和(" + totalStudents + ")超过了床位总数(" + totalBeds + "),请调整分配数量");
}
log.info("床位分配验证通过:总床位数{},分配学生数{},剩余床位数{}",
totalBeds, totalStudents, totalBeds - totalStudents);
// 房间使用状态跟踪
int[] roomUsage = new int[sortedRoomIds.size()]; // 记录每个房间已使用床位数
Map<Integer, Long> roomCollegeMap = new java.util.HashMap<>(); // 记录房间主要分配给哪个学院
@@ -352,8 +355,12 @@ public class XgDormBedStudentServiceImpl implements IXgDormBedStudentService {
log.info("学院{}床位分配完成", collegeId);
}
// 6. 更新床位状态为已分配
for (Long bedId : bo.getBedIds()) {
// 6. 更新床位状态为已分配(只更新实际被分配的床位)
Set<Long> allocatedBedIds = allocationRecords.stream()
.map(XgDormBedStudent::getBedId)
.collect(java.util.stream.Collectors.toSet());
for (Long bedId : allocatedBedIds) {
XgDormBed updateBed = new XgDormBed();
updateBed.setId(bedId);
updateBed.setBedStatus("1"); // 1-已分配
@@ -361,6 +368,8 @@ public class XgDormBedStudentServiceImpl implements IXgDormBedStudentService {
xgDormBedMapper.updateById(updateBed);
}
log.info("更新床位状态:共{}个床位被标记为已分配", allocatedBedIds.size());
// 7. 批量插入分配记录
if (!allocationRecords.isEmpty()) {
boolean insertResult = baseMapper.insertBatch(allocationRecords);
@@ -369,8 +378,8 @@ public class XgDormBedStudentServiceImpl implements IXgDormBedStudentService {
}
}
log.info("成功分配{}个床位给{}个学院,分配记录:{}",
totalBeds, bo.getCollegeIds().size(), allocationRecords.size());
log.info("成功分配{}个床位给{}个学院,总可用床位:{},分配记录:{}",
allocatedBedIds.size(), bo.getCollegeIds().size(), totalBeds, allocationRecords.size());
return true;
} catch (Exception e) {