初始化

This commit is contained in:
2026-04-13 17:32:58 +08:00
commit c6ee0d5243
1342 changed files with 96426 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
========================================
CN_Tool 升级与回滚说明
========================================
一、升级步骤(超简单!)
----------------------------------------
1. 先使用 Navicat 或其他工具手动导出数据库 SQL 备份
2. 双击 upgrade.bat首次会自动创建 upgrade 文件夹)
3. 将升级文件放入 upgrade/ 目录:
- app.asar + app.asar.unpacked\ (前端升级包,必须成套放入)
- entrance.jar (后端升级包)
4. 再次双击 upgrade.bat 开始升级
5. 等待完成后重启应用
补充说明:
- 可以只升级后端
- 可以只升级前端,但前端升级时必须同时提供:
app.asar
app.asar.unpacked\
- 数据库不由 upgrade.bat 自动备份,请务必提前手动导出 SQL
二、回滚步骤
----------------------------------------
如果升级后出现问题:
1. 双击 rollback.bat仅回滚前后端程序文件
2. 等待完成后重启应用
3. 如需恢复数据库,请手动执行升级前导出的 SQL
三、重要提示
----------------------------------------
✓ 升级前会自动备份前后端程序文件到 backup/ 目录
✓ 升级日志保存在 logs/upgrade.log
✓ 多次升级时backup/ 保存最后一次升级前的版本
✓ 数据库备份与恢复由人工处理,不再由脚本自动执行
四、紧急情况
----------------------------------------
如果脚本无法运行,请手动操作:
【恢复前端】
copy /Y backup\app.asar resources\app.asar
rmdir /s /q resources\app.asar.unpacked
xcopy backup\app.asar.unpacked resources\app.asar.unpacked\ /E /I /Y
【恢复后端】
copy /Y backup\entrance.jar resources\extraResources\java\entrance.jar
【恢复数据库】
请使用 Navicat 或其他工具执行升级前导出的 SQL 备份
========================================
如需完整技术文档,请联系交付方提供开发文档。
========================================

60
build/build.bat Normal file
View File

@@ -0,0 +1,60 @@
@echo off
chcp 65001 >nul
echo ========================================
echo 清理并重新打包
echo ========================================
echo.
echo [1/4] 删除 out 目录...
cd /d "%~dp0.."
if exist out (
rmdir /s /q out 2>nul
if exist out (
echo 删除失败,请手动删除 out 目录
pause
exit /b 1
) else (
echo out 目录已删除
)
) else (
echo out 目录不存在
)
echo.
echo [2/4] 构建前端代码...
call npm run build-frontend
if %errorlevel% neq 0 (
echo 前端构建失败
pause
exit /b 1
)
echo 前端代码构建完成
echo.
echo [3/4] 构建 electron 代码...
call npm run build-electron
if %errorlevel% neq 0 (
echo electron 构建失败
pause
exit /b 1
)
echo electron 代码构建完成
echo.
echo [4/4] 打包 Windows 版本(包含代码加密)...
call npm run build-w
if %errorlevel% neq 0 (
echo 打包失败
pause
exit /b 1
)
echo.
echo ========================================
echo 打包完成!
echo 最终交付目录: out\CN_Tool\
echo 原始输出目录: out\win-unpacked\ (已自动重命名)
echo ========================================
echo.
pause

66
build/clean-and-build.bat Normal file
View File

@@ -0,0 +1,66 @@
@echo off
chcp 65001 >nul
echo ========================================
echo 清理并重新打包
echo ========================================
echo.
echo [1/5] 结束所有相关进程...
echo 正在停止 CN_Tool...
taskkill /F /IM CN_Tool.exe 2>nul
echo ✓ 所有进程已结束
timeout /t 2 /nobreak >nul
echo.
echo [2/5] 删除 out 目录...
cd /d "%~dp0.."
if exist out (
rmdir /s /q out 2>nul
if exist out (
echo ✗ 删除失败,请手动删除 out 目录
pause
exit /b 1
) else (
echo ✓ out 目录已删除
)
) else (
echo ✓ out 目录不存在
)
echo.
echo [3/5] 构建前端代码...
call npm run build-frontend
if %errorlevel% neq 0 (
echo ✗ 前端构建失败
pause
exit /b 1
)
echo ✓ 前端代码构建完成
echo.
echo [4/5] 构建 electron 代码...
call npm run build-electron
if %errorlevel% neq 0 (
echo ✗ electron 构建失败
pause
exit /b 1
)
echo ✓ electron 代码构建完成
echo.
echo [5/5] 打包 Windows 版本(包含代码加密)...
call npm run build-w
if %errorlevel% neq 0 (
echo ✗ 打包失败
pause
exit /b 1
)
echo.
echo ========================================
echo ✓ 打包完成!
echo 最终交付目录: out\CN_Tool\
echo 原始输出目录: out\win-unpacked\ (已自动重命名)
echo ========================================
echo.
pause

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,6 @@
2025-10-24T05:37:51.310214Z 0 [System] [MY-013169] [Server] C:\code\gitea\NPQS-9100\pqs-9100_client\build\extraResources\mysql\bin\mysqld.exe (mysqld 8.0.43) initializing of server in progress as process 4888
2025-10-24T05:37:51.310610Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'C:\code\gitea\NPQS-9100\pqs-9100_client\build\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2025-10-24T05:37:51.344647Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-10-24T05:37:51.822216Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-10-24T05:37:52.901713Z 0 [Warning] [MY-013829] [Server] Missing data directory for ICU regular expressions: C:\code\gitea\NPQS-9100\pqs-9100_client\build\lib\private\.
2025-10-24T05:37:53.321652Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

2
build/data/auto.cnf Normal file
View File

@@ -0,0 +1,2 @@
[auto]
server-uuid=94eac58a-b09b-11f0-9152-00155d74a0b8

BIN
build/data/ca-key.pem Normal file

Binary file not shown.

BIN
build/data/ca.pem Normal file

Binary file not shown.

BIN
build/data/client-cert.pem Normal file

Binary file not shown.

BIN
build/data/client-key.pem Normal file

Binary file not shown.

438
build/data/ib_buffer_pool Normal file
View File

@@ -0,0 +1,438 @@
4294967294,5
4294967293,131
4294967293,130
4294967293,129
4294967293,128
4294967293,127
4294967293,126
4294967293,125
4294967293,124
4294967293,123
4294967293,122
4294967293,121
4294967293,120
4294967293,119
4294967293,118
4294967293,117
4294967293,116
4294967293,115
4294967293,114
4294967293,113
4294967293,112
4294967293,111
4294967293,110
4294967293,109
4294967293,108
4294967293,107
4294967293,106
4294967293,105
4294967293,104
4294967293,103
4294967293,102
4294967293,101
4294967293,100
4294967293,99
4294967293,98
4294967293,97
4294967293,96
4294967293,95
4294967293,94
4294967293,93
4294967293,92
4294967293,91
4294967293,90
4294967293,89
4294967293,87
4294967293,86
4294967293,85
4294967293,84
4294967293,83
4294967293,82
4294967293,81
4294967293,80
4294967293,79
4294967293,78
4294967293,77
4294967293,76
4294967293,75
4294967293,74
4294967293,73
4294967293,72
4294967293,71
4294967293,70
4294967293,69
4294967293,68
4294967293,67
4294967293,66
4294967293,65
4294967293,64
4294967293,63
4294967293,62
4294967293,61
4294967293,60
4294967293,59
4294967293,58
4294967293,57
4294967293,56
4294967293,55
4294967293,54
4294967293,53
4294967293,52
4294967293,51
4294967293,50
4294967293,49
4294967293,48
4294967293,47
4294967293,46
4294967293,45
4294967293,44
4294967293,43
4294967293,42
4294967293,41
4294967293,40
4294967293,39
4294967293,38
4294967293,37
4294967293,36
4294967293,35
4294967293,34
4294967293,33
4294967293,32
4294967293,31
4294967293,30
4294967293,29
4294967293,28
4294967293,27
4294967293,26
4294967293,25
4294967293,24
4294967293,23
4294967293,22
4294967293,21
4294967293,20
4294967293,19
4294967293,18
4294967293,17
4294967293,16
4294967293,15
4294967293,14
4294967293,13
4294967293,12
4294967293,11
4294967293,10
4294967293,9
4294967293,8
4294967293,7
4294967293,6
4294967293,5
4294967293,4
4294967293,3
4294967278,132
4294967278,131
4294967278,130
4294967278,129
4294967278,128
4294967278,127
4294967278,126
4294967278,125
4294967278,124
4294967278,123
4294967278,122
4294967278,121
4294967278,120
4294967278,119
4294967278,118
4294967278,117
4294967278,116
4294967278,115
4294967278,114
4294967278,113
4294967278,112
4294967278,111
4294967278,110
4294967278,109
4294967278,108
4294967278,107
4294967278,106
4294967278,105
4294967278,104
4294967278,103
4294967278,102
4294967278,101
4294967278,100
4294967278,99
4294967278,98
4294967278,97
4294967278,96
4294967278,95
4294967278,94
4294967278,93
4294967278,92
4294967278,91
4294967278,90
4294967278,89
4294967278,87
4294967278,86
4294967278,85
4294967278,84
4294967278,83
4294967278,82
4294967278,81
4294967278,80
4294967278,79
4294967278,78
4294967278,77
4294967278,76
4294967278,75
4294967278,74
4294967278,73
4294967278,72
4294967278,71
4294967278,70
4294967278,69
4294967278,68
4294967278,67
4294967278,66
4294967278,65
4294967278,64
4294967278,63
4294967278,62
4294967278,61
4294967278,60
4294967278,59
4294967278,58
4294967278,57
4294967278,56
4294967278,55
4294967278,54
4294967278,53
4294967278,52
4294967278,51
4294967278,50
4294967278,49
4294967278,48
4294967278,47
4294967278,46
4294967278,45
4294967278,44
4294967278,43
4294967278,42
4294967278,41
4294967278,40
4294967278,39
4294967278,38
4294967278,37
4294967278,36
4294967278,35
4294967278,34
4294967278,33
4294967278,32
4294967278,31
4294967278,30
4294967278,29
4294967278,28
4294967278,27
4294967278,26
4294967278,137
4294967278,25
4294967278,24
4294967278,23
4294967278,22
4294967278,21
4294967278,20
4294967278,19
4294967278,18
4294967278,17
4294967278,16
4294967278,15
4294967278,14
4294967278,13
4294967278,12
4294967278,11
4294967278,10
4294967278,9
4294967278,8
4294967278,7
4294967278,6
4294967278,5
4294967278,4
4294967279,132
4294967279,131
4294967279,130
4294967279,129
4294967279,128
4294967279,127
4294967279,126
4294967279,125
4294967279,124
4294967279,123
4294967279,122
4294967279,121
4294967279,120
4294967279,119
4294967279,118
4294967279,117
4294967279,116
4294967279,115
4294967279,114
4294967279,113
4294967279,112
4294967279,111
4294967279,110
4294967279,109
4294967279,108
4294967279,107
4294967279,106
4294967279,105
4294967279,104
4294967279,103
4294967279,101
4294967279,100
4294967279,99
4294967279,98
4294967279,97
4294967279,96
4294967279,95
4294967279,94
4294967279,93
4294967279,92
4294967279,91
4294967279,90
4294967279,89
4294967279,87
4294967279,86
4294967279,85
4294967279,84
4294967279,83
4294967279,82
4294967279,81
4294967279,80
4294967279,79
4294967279,78
4294967279,77
4294967279,76
4294967279,75
4294967279,74
4294967279,73
4294967279,72
4294967279,71
4294967279,70
4294967279,69
4294967279,68
4294967279,67
4294967279,66
4294967279,65
4294967279,64
4294967279,63
4294967279,62
4294967279,61
4294967279,60
4294967279,59
4294967279,58
4294967279,57
4294967279,56
4294967279,55
4294967279,54
4294967279,53
4294967279,52
4294967279,51
4294967279,50
4294967279,49
4294967279,48
4294967279,47
4294967279,46
4294967279,45
4294967279,44
4294967279,43
4294967279,42
4294967279,41
4294967279,40
4294967279,39
4294967279,38
4294967279,37
4294967279,36
4294967279,35
4294967279,34
4294967279,33
4294967279,32
4294967279,31
4294967279,30
4294967279,29
4294967279,28
4294967279,27
4294967279,138
4294967279,26
4294967279,25
4294967279,24
4294967279,23
4294967279,134
4294967279,22
4294967279,21
4294967279,20
4294967279,19
4294967279,18
4294967279,17
4294967279,16
4294967279,15
4294967279,14
4294967279,13
4294967279,12
4294967279,11
4294967279,10
4294967279,9
4294967279,8
4294967279,7
4294967279,6
4294967279,5
4294967279,4
0,5
4243767290,0
4294967294,187
4294967294,467
4294967294,2
4294967294,1165
4294967294,1164
4294967294,1163
4294967294,24
4294967294,129
4294967294,1162
4294967279,280
4294967279,0
4294967279,102
4294967294,104
4294967294,1161
4294967294,1
4294967294,1160
4294967294,46
4294967294,0
4243767290,4
4243767290,3
4243767290,2
4294967294,107
4294967294,106
4294967294,128
4294967294,25
4294967294,92
4294967294,91
4294967294,90
4294967294,88
4294967294,87
4294967294,86
4294967294,85
4294967294,84
4294967294,82
4294967294,83
4294967294,1217
4294967294,1216
4294967294,1087
4294967294,1086
4294967294,1085
4294967294,466
4294967294,1159
4294967294,1084
4294967294,425
4294967294,1158
4294967294,1157
4294967294,186
4294967294,465
4294967294,1156

BIN
build/data/ibdata1 Normal file

Binary file not shown.

BIN
build/data/mysql.ibd Normal file

Binary file not shown.

Binary file not shown.

View File

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"mysqld_version_id":80043,"dd_version":80023,"sdi_version":80019,"dd_object_type":"Table","dd_object":{"name":"cond_instances","mysql_version_id":80043,"created":20251024053752,"last_altered":20251024053752,"hidden":1,"options":"avg_row_length=0;key_block_size=0;keys_disabled=0;pack_record=1;server_p_s_table=1;stats_auto_recalc=0;stats_sample_pages=0;","columns":[{"name":"NAME","type":16,"is_nullable":false,"is_zerofill":false,"is_unsigned":false,"is_auto_increment":false,"is_virtual":false,"hidden":1,"ordinal_position":1,"char_length":512,"numeric_precision":0,"numeric_scale":0,"numeric_scale_null":true,"datetime_precision":0,"datetime_precision_null":1,"has_no_default":true,"default_value_null":false,"srs_id_null":true,"srs_id":0,"default_value":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAA==","default_value_utf8_null":true,"default_value_utf8":"","default_option":"","update_option":"","comment":"","generation_expression":"","generation_expression_utf8":"","options":"interval_count=0;","se_private_data":"","engine_attribute":"","secondary_engine_attribute":"","column_key":4,"column_type_utf8":"varchar(128)","elements":[],"collation_id":255,"is_explicit_collation":false},{"name":"OBJECT_INSTANCE_BEGIN","type":9,"is_nullable":false,"is_zerofill":false,"is_unsigned":true,"is_auto_increment":false,"is_virtual":false,"hidden":1,"ordinal_position":2,"char_length":20,"numeric_precision":20,"numeric_scale":0,"numeric_scale_null":false,"datetime_precision":0,"datetime_precision_null":1,"has_no_default":true,"default_value_null":false,"srs_id_null":true,"srs_id":0,"default_value":"AAAAAAAAAAA=","default_value_utf8_null":true,"default_value_utf8":"","default_option":"","update_option":"","comment":"","generation_expression":"","generation_expression_utf8":"","options":"interval_count=0;","se_private_data":"","engine_attribute":"","secondary_engine_attribute":"","column_key":2,"column_type_utf8":"bigint unsigned","elements":[],"collation_id":255,"is_explicit_collation":false}],"schema_ref":"performance_schema","se_private_id":18446744073709551615,"engine":"PERFORMANCE_SCHEMA","last_checked_for_upgrade_version_id":0,"comment":"","se_private_data":"","engine_attribute":"","secondary_engine_attribute":"","row_format":2,"partition_type":0,"partition_expression":"","partition_expression_utf8":"","default_partitioning":0,"subpartition_type":0,"subpartition_expression":"","subpartition_expression_utf8":"","default_subpartitioning":0,"indexes":[{"name":"PRIMARY","hidden":false,"is_generated":false,"ordinal_position":1,"comment":"","options":"flags=0;","se_private_data":"","type":1,"algorithm":4,"is_algorithm_explicit":false,"is_visible":true,"engine":"PERFORMANCE_SCHEMA","engine_attribute":"","secondary_engine_attribute":"","elements":[{"ordinal_position":1,"length":8,"order":1,"hidden":false,"column_opx":1}]},{"name":"NAME","hidden":false,"is_generated":false,"ordinal_position":2,"comment":"","options":"flags=0;","se_private_data":"","type":3,"algorithm":4,"is_algorithm_explicit":false,"is_visible":true,"engine":"PERFORMANCE_SCHEMA","engine_attribute":"","secondary_engine_attribute":"","elements":[{"ordinal_position":1,"length":512,"order":1,"hidden":false,"column_opx":0}]}],"foreign_keys":[],"check_constraints":[],"partitions":[],"collation_id":255}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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