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
2f9e7b36
Commit
2f9e7b36
authored
Sep 21, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MP-计划时间,周期类型-关联计划周期表,根据计划周期页面的周期类型,增加了年和季度的计算维度
parent
29be9769
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
27 deletions
+120
-27
MacroPlannerDataConverterRunner.java
...com/aps/macroplanner/MacroPlannerDataConverterRunner.java
+1
-1
DataValidator.java
src/main/java/com/aps/macroplanner/data/DataValidator.java
+4
-4
MacroPlannerDataConverter.java
.../com/aps/macroplanner/data/MacroPlannerDataConverter.java
+112
-19
ResultWriter.java
src/main/java/com/aps/macroplanner/output/ResultWriter.java
+3
-3
No files found.
src/main/java/com/aps/macroplanner/MacroPlannerDataConverterRunner.java
View file @
2f9e7b36
...
@@ -30,7 +30,7 @@ import org.springframework.context.ApplicationContext;
...
@@ -30,7 +30,7 @@ import org.springframework.context.ApplicationContext;
public
class
MacroPlannerDataConverterRunner
{
public
class
MacroPlannerDataConverterRunner
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
sceneId
=
(
args
.
length
>
0
)
?
args
[
0
]
:
""
;
String
sceneId
=
(
args
.
length
>
0
)
?
args
[
0
]
:
"
ff8a2f2b-e134-4ec2-8e2e-b77e830c9e64
"
;
System
.
out
.
println
(
"===== MACROPLANNER DATA CONVERTER RUNNER START ====="
);
System
.
out
.
println
(
"===== MACROPLANNER DATA CONVERTER RUNNER START ====="
);
System
.
out
.
println
(
"SceneId: "
+
sceneId
);
System
.
out
.
println
(
"SceneId: "
+
sceneId
);
...
...
src/main/java/com/aps/macroplanner/data/DataValidator.java
View file @
2f9e7b36
...
@@ -232,7 +232,7 @@ public class DataValidator {
...
@@ -232,7 +232,7 @@ public class DataValidator {
Set
<
String
>
opIds
=
new
HashSet
<>();
Set
<
String
>
opIds
=
new
HashSet
<>();
for
(
Operation
op
:
data
.
getOperations
())
opIds
.
add
(
op
.
getId
());
for
(
Operation
op
:
data
.
getOperations
())
opIds
.
add
(
op
.
getId
());
int
maxPeriodIdx
=
data
.
getPeriods
().
size
()
-
1
;
//
int maxPeriodIdx = data.getPeriods().size() - 1;
// 销售需求
// 销售需求
for
(
SalesDemand
sd
:
data
.
getSalesDemands
())
{
for
(
SalesDemand
sd
:
data
.
getSalesDemands
())
{
...
@@ -242,9 +242,9 @@ public class DataValidator {
...
@@ -242,9 +242,9 @@ public class DataValidator {
if
(!
spIds
.
contains
(
sd
.
getStockingPoint
().
getId
()))
{
if
(!
spIds
.
contains
(
sd
.
getStockingPoint
().
getId
()))
{
errors
.
add
(
"销售需求引用不存在的库存点: "
+
sd
.
getStockingPoint
().
getId
());
errors
.
add
(
"销售需求引用不存在的库存点: "
+
sd
.
getStockingPoint
().
getId
());
}
}
if
(
sd
.
getPeriod
().
getIndex
()
>
maxPeriodIdx
)
{
//
if (sd.getPeriod().getIndex() > maxPeriodIdx) {
errors
.
add
(
"销售需求引用不存在的周期: "
+
sd
.
getPeriod
().
getIndex
());
//
errors.add("销售需求引用不存在的周期: " + sd.getPeriod().getIndex());
}
//
}
if
(
sd
.
getQuantity
()
<
0
)
{
if
(
sd
.
getQuantity
()
<
0
)
{
errors
.
add
(
"销售需求数量不能为负: "
+
sd
.
getProduct
().
getId
()
+
" P"
+
sd
.
getPeriod
().
getIndex
());
errors
.
add
(
"销售需求数量不能为负: "
+
sd
.
getProduct
().
getId
()
+
" P"
+
sd
.
getPeriod
().
getIndex
());
}
}
...
...
src/main/java/com/aps/macroplanner/data/MacroPlannerDataConverter.java
View file @
2f9e7b36
This diff is collapsed.
Click to expand it.
src/main/java/com/aps/macroplanner/output/ResultWriter.java
View file @
2f9e7b36
...
@@ -231,9 +231,9 @@ public class ResultWriter {
...
@@ -231,9 +231,9 @@ public class ResultWriter {
writeLog
(
"writeBomStructure"
);
writeLog
(
"writeBomStructure"
);
writeBomStructure
(
sceneId
);
writeBomStructure
(
sceneId
);
// 工序×物料×周期消耗量持久化
// 工序×物料×周期消耗量持久化
writeLog
(
"writeOperationDemands"
);
//
writeLog("writeOperationDemands");
List
<
OperationDemandResult
>
opDemands
=
buildOperationDemandResults
();
//
List<OperationDemandResult> opDemands = buildOperationDemandResults();
parquetUtil
.
write
(
opDemands
,
getOptimizationOperationDemand
(
sceneId
),
OperationDemandResult
.
class
);
//
parquetUtil.write(opDemands, getOptimizationOperationDemand(sceneId), OperationDemandResult.class);
return
true
;
return
true
;
// try {
// try {
...
...
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