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
2a8e9ba8
Commit
2a8e9ba8
authored
Dec 19, 2025
by
DESKTOP-VKRD9QF\Administration
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移动工作块
parent
de289521
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
3 deletions
+87
-3
SwaggerMapParamConfig.java
src/main/java/com/aps/config/SwaggerMapParamConfig.java
+33
-1
ResourceGanttController.java
...ava/com/aps/controller/gantt/ResourceGanttController.java
+54
-2
No files found.
src/main/java/com/aps/config/SwaggerMapParamConfig.java
View file @
2a8e9ba8
...
@@ -136,7 +136,7 @@ public class SwaggerMapParamConfig {
...
@@ -136,7 +136,7 @@ public class SwaggerMapParamConfig {
break
;
break
;
case
"operationMove"
:
case
"operationMove"
:
properties
.
put
(
"
S
ceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"
s
ceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"id"
,
new
StringSchema
().
description
(
"操作ID"
).
example
(
1
));
properties
.
put
(
"id"
,
new
StringSchema
().
description
(
"操作ID"
).
example
(
1
));
properties
.
put
(
"newStartTime"
,
new
StringSchema
().
description
(
"新的开始时间"
).
example
(
"2025-11-03T07:36:00.000Z"
));
properties
.
put
(
"newStartTime"
,
new
StringSchema
().
description
(
"新的开始时间"
).
example
(
"2025-11-03T07:36:00.000Z"
));
properties
.
put
(
"newMachineId"
,
new
StringSchema
().
description
(
"新机器ID"
).
example
(
3402
));
properties
.
put
(
"newMachineId"
,
new
StringSchema
().
description
(
"新机器ID"
).
example
(
3402
));
...
@@ -151,6 +151,22 @@ public class SwaggerMapParamConfig {
...
@@ -151,6 +151,22 @@ public class SwaggerMapParamConfig {
));
));
break
;
break
;
case
"operationBlockMove"
:
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"id"
,
new
StringSchema
().
description
(
"操作ID列表"
).
example
(
"[1, 2, 3]"
));
properties
.
put
(
"newStartTime"
,
new
StringSchema
().
description
(
"新的开始时间"
).
example
(
"2025-11-03T07:36:00.000Z"
));
properties
.
put
(
"newMachineId"
,
new
StringSchema
().
description
(
"新机器ID"
).
example
(
3402
));
examples
.
put
(
"移动工作块示例"
,
createExample
(
"将指定的多个操作移动到新的时间和机器上"
,
"{\n"
+
" \"sceneId\": \"B571EF6682DB463AB2977B1055A74112\",\n"
+
" \"id\": [1, 2, 3],\n"
+
" \"newStartTime\": \"2025-11-03T07:36:00.000Z\",\n"
+
" \"newMachineId\": 3401\n"
+
"}"
));
break
;
case
"operationedit"
:
case
"operationedit"
:
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"operation"
,
new
StringSchema
().
description
(
"操作对象"
));
properties
.
put
(
"operation"
,
new
StringSchema
().
description
(
"操作对象"
));
...
@@ -175,6 +191,20 @@ public class SwaggerMapParamConfig {
...
@@ -175,6 +191,20 @@ public class SwaggerMapParamConfig {
));
));
break
;
break
;
case
"fixStartDate"
:
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"id"
,
new
StringSchema
().
description
(
"操作ID"
).
example
(
1
));
properties
.
put
(
"newStartTime"
,
new
StringSchema
().
description
(
"新的开始时间"
).
example
(
"2025-11-03T07:36:00.000Z"
));
examples
.
put
(
"固定开始日期示例"
,
createExample
(
"固定操作的开始日期"
,
"{\n"
+
" \"sceneId\": \"B571EF6682DB463AB2977B1055A74112\",\n"
+
" \"id\": 1,\n"
+
" \"newStartTime\": \"2025-11-03T07:36:00.000Z\"\n"
+
"}"
));
break
;
case
"spiltOperation"
:
case
"spiltOperation"
:
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"sceneId"
,
new
StringSchema
().
description
(
"场景ID"
).
example
(
"B571EF6682DB463AB2977B1055A74112"
));
properties
.
put
(
"id"
,
new
StringSchema
().
description
(
"操作ID"
).
example
(
1
));
properties
.
put
(
"id"
,
new
StringSchema
().
description
(
"操作ID"
).
example
(
1
));
...
@@ -452,6 +482,8 @@ public class SwaggerMapParamConfig {
...
@@ -452,6 +482,8 @@ public class SwaggerMapParamConfig {
return
"删除订单请求参数"
;
return
"删除订单请求参数"
;
case
"orderMerge"
:
case
"orderMerge"
:
return
"合并订单请求参数"
;
return
"合并订单请求参数"
;
case
"fixStartDate"
:
return
"固定开始日期请求参数"
;
// 添加 ChromosomeDataController 相关方法的描述
// 添加 ChromosomeDataController 相关方法的描述
case
"queryChromosomeData"
:
case
"queryChromosomeData"
:
return
"分页查询染色体数据请求参数"
;
return
"分页查询染色体数据请求参数"
;
...
...
src/main/java/com/aps/controller/gantt/ResourceGanttController.java
View file @
2a8e9ba8
...
@@ -144,7 +144,30 @@ public class ResourceGanttController {
...
@@ -144,7 +144,30 @@ public class ResourceGanttController {
// 1. 提取参数
// 1. 提取参数
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID"
);
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID"
);
List
<?>
opid
=
ParamValidator
.
getList
(
params
,
"id"
,
"操作ID"
);
Integer
opid
=
ParamValidator
.
getInteger
(
params
,
"id"
,
"操作ID"
);
LocalDateTime
newStartTime
=
ParamValidator
.
getDateTime
(
params
,
"newStartTime"
,
"新的开始时间"
);
Long
newMachineId
=
ParamValidator
.
getLong
(
params
,
"newMachineId"
,
"新机器ID"
);
// 2. 验证场景
ParamValidator
.
validateSceneExists
(
sceneService
,
sceneId
);
// 将单个opid放入List中
List
<
Integer
>
opids
=
new
ArrayList
<>();
opids
.
add
(
opid
);
// 3. 执行业务
Chromosome
result
=
planResultService
.
Move
(
sceneId
,
opids
,
newStartTime
,
newMachineId
);
return
R
.
ok
(
"移动成功"
);
}
@PostMapping
(
"/operationBlockMove"
)
@Operation
(
summary
=
"移动工作块"
,
description
=
"移动工作块"
)
public
R
<
String
>
operationBlockMove
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
// 1. 提取参数
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID"
);
List
opid
=
ParamValidator
.
getList
(
params
,
"id"
,
"操作ID"
);
LocalDateTime
newStartTime
=
ParamValidator
.
getDateTime
(
params
,
"newStartTime"
,
"新的开始时间"
);
LocalDateTime
newStartTime
=
ParamValidator
.
getDateTime
(
params
,
"newStartTime"
,
"新的开始时间"
);
Long
newMachineId
=
ParamValidator
.
getLong
(
params
,
"newMachineId"
,
"新机器ID"
);
Long
newMachineId
=
ParamValidator
.
getLong
(
params
,
"newMachineId"
,
"新机器ID"
);
...
@@ -153,12 +176,41 @@ public class ResourceGanttController {
...
@@ -153,12 +176,41 @@ public class ResourceGanttController {
List
<
Integer
>
opids
=
ParamValidator
.
convertToIntArray
(
opid
,
"操作IDS"
);
List
<
Integer
>
opids
=
ParamValidator
.
convertToIntArray
(
opid
,
"操作IDS"
);
// 3. 执行业务
// 3. 执行业务
Chromosome
result
=
planResultService
.
Move
(
sceneId
,
opids
,
newStartTime
,
newMachineId
);
Chromosome
result
=
planResultService
.
Move
(
sceneId
,
opids
,
newStartTime
,
newMachineId
);
return
R
.
ok
(
"移动成功"
);
return
R
.
ok
(
"移动成功"
);
}
}
@PostMapping
(
"/fixStartDate"
)
@Operation
(
summary
=
"固定开始日期"
,
description
=
"固定开始日期"
)
public
R
<
String
>
fixStartDate
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
// 1. 提取参数
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID"
);
Integer
opid
=
ParamValidator
.
getInteger
(
params
,
"id"
,
"操作ID"
);
LocalDateTime
newStartTime
=
ParamValidator
.
getDateTime
(
params
,
"newStartTime"
,
"新的开始时间"
);
// 2. 验证场景
ParamValidator
.
validateSceneExists
(
sceneService
,
sceneId
);
// List<Integer> opids = ParamValidator.convertToIntArray(opid, "操作IDS");
List
<
Integer
>
opids
=
new
ArrayList
<>();
opids
.
add
(
opid
);
// 3. 执行业务
Chromosome
result
=
planResultService
.
Move
(
sceneId
,
opids
,
newStartTime
,
0L
);
return
R
.
ok
(
"固定开始日期成功"
);
}
@PostMapping
(
"/operationedit"
)
@PostMapping
(
"/operationedit"
)
@Operation
(
summary
=
"修改工单"
,
description
=
"修改工单"
)
@Operation
(
summary
=
"修改工单"
,
description
=
"修改工单"
)
public
R
<
Chromosome
>
operationedit
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
public
R
<
Chromosome
>
operationedit
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
...
...
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