Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HYH.APSJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
佟礼
HYH.APSJ
Commits
6affdefc
Commit
6affdefc
authored
Jan 06, 2026
by
DESKTOP-VKRD9QF\Administration
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
撤销修改
parent
4c175756
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
SwaggerMapParamConfig.java
src/main/java/com/aps/config/SwaggerMapParamConfig.java
+4
-4
ResourceGanttController.java
...ava/com/aps/controller/gantt/ResourceGanttController.java
+4
-4
SceneService.java
src/main/java/com/aps/service/plan/SceneService.java
+3
-3
No files found.
src/main/java/com/aps/config/SwaggerMapParamConfig.java
View file @
6affdefc
...
...
@@ -459,12 +459,12 @@ public class SwaggerMapParamConfig {
));
break
;
case
"re
turnChromosome
"
:
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"
B571EF6682DB463AB2977B1055A74112
"
));
case
"re
vert
"
:
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"
FAADE046165147629931D5EA6A9015E8
"
));
examples
.
put
(
"回退版本示例"
,
createExample
(
"回退到上一个版本"
,
"{\n"
+
" \"sceneId\": \"
B571EF6682DB463AB2977B1055A74112
\"\n"
+
" \"sceneId\": \"
FAADE046165147629931D5EA6A9015E8
\"\n"
+
"}"
));
break
;
...
...
@@ -552,7 +552,7 @@ public class SwaggerMapParamConfig {
return
"修改时间配置请求参数"
;
case
"updateConfig"
:
return
"更新APS时间配置请求参数"
;
case
"re
turnChromosome
"
:
case
"re
vert
"
:
return
"回退版本请求参数"
;
default
:
return
"请求参数"
;
...
...
src/main/java/com/aps/controller/gantt/ResourceGanttController.java
View file @
6affdefc
...
...
@@ -882,9 +882,9 @@ public class ResourceGanttController {
* @param params 参数Map
* @return 染色体对象
*/
@PostMapping
(
"/re
turnChromosome
"
)
@Operation
(
summary
=
"
回退版本"
,
description
=
"回退到上一个版本
"
)
public
R
<
String
>
re
turnChromosome
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
@PostMapping
(
"/re
vert
"
)
@Operation
(
summary
=
"
撤销操作"
,
description
=
"撤销操作
"
)
public
R
<
String
>
re
vert
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID不能为空"
);
if
(
sceneId
==
null
)
{
...
...
@@ -892,7 +892,7 @@ public class ResourceGanttController {
}
Chromosome
result
=
planResultService
.
moveChromosome
(
sceneId
,
0
);
return
R
.
ok
(
"
回退
成功"
);
return
R
.
ok
(
"
撤销
成功"
);
}
...
...
src/main/java/com/aps/service/plan/SceneService.java
View file @
6affdefc
...
...
@@ -220,16 +220,16 @@ public class SceneService {
int
prevVersion
=
sceneChromsome
.
getVersion
()
-
1
;
if
(
prevVersion
==
0
)
{
throw
new
RuntimeException
(
"当前已是第一个版本"
);
throw
new
RuntimeException
(
"
无法撤销,
当前已是第一个版本"
);
}
sceneChromsome
.
setVersion
(
prevVersion
);
redisUtils
.
set
(
"SceneId."
+
sceneId
,
sceneChromsome
);
Chromosome
chromosome
=
loadChromosomeFromFile
(
sceneId
);
System
.
out
.
println
(
"会退的版本为"
+
sceneChromsome
.
getVersion
());
if
(
chromosome
==
null
)
{
sceneChromsome
.
setVersion
(
sceneChromsome
.
getVersion
()
+
1
);
redisUtils
.
set
(
"SceneId."
+
sceneId
,
sceneChromsome
);
throw
new
RuntimeException
(
"
回退
失败,未找到上一个版本"
);
throw
new
RuntimeException
(
"
撤销操作
失败,未找到上一个版本"
);
}
return
chromosome
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment