Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BasicAPI
Project
Project
Details
Activity
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
杜科
BasicAPI
Commits
de1008db
Commit
de1008db
authored
Mar 22, 2023
by
shyWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDM前端改造
转试图问题处理
parent
96c8753d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
DxPartController.java
src/com/yonde/part/controller/DxPartController.java
+2
-0
DxPartService.java
src/com/yonde/part/service/DxPartService.java
+5
-5
No files found.
src/com/yonde/part/controller/DxPartController.java
View file @
de1008db
...
...
@@ -3,6 +3,7 @@ package com.yonde.part.controller;
import
com.alibaba.fastjson.JSON
;
import
com.yonde.basedata.controller.AbstractBaseController
;
import
com.yonde.basedata.entity.api.ApiResult
;
import
com.yonde.basedata.exception.DxBusinessException
;
import
com.yonde.basedata.search.BaseSearchCondition
;
import
com.yonde.common.ObjectsUtil
;
import
com.yonde.part.service.DxPartService
;
...
...
@@ -190,6 +191,7 @@ public class DxPartController extends AbstractBaseController {
DxPartService
.
convertViewAll
(
id
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ApiResult
.
error
(
"501"
,
"视图转换失败:请先检入BOM数据!"
,
new
DxBusinessException
(
"501"
,
e
.
getLocalizedMessage
()));
}
return
ApiResult
.
ok
(
"转视图成功"
);
}
...
...
src/com/yonde/part/service/DxPartService.java
View file @
de1008db
...
...
@@ -560,20 +560,20 @@ public class DxPartService implements RemoteAccess, Serializable {
WTPart
ppart
=
PartUtil
.
getLatestViewPart
(
partById
.
getNumber
(),
"Planning"
);
ArrayList
<
WTPart
>
list
=
new
ArrayList
<
WTPart
>();
if
(
ppart
==
null
){
WTPartConfigSpec
partConfigSpec
=
WTPartConfigSpec
.
newWTPartConfigSpec
(
WTPartStandardConfigSpec
.
newWTPartStandardConfigSpec
(
ViewHelper
.
service
.
getView
(
"Design"
),
null
));
PartUtil
.
getAllChildByView
(
partById
,
partConfigSpec
,
list
);
ppart
=
(
WTPart
)
ViewHelper
.
service
.
newBranchForView
(
partById
,
"Planning"
);
ppart
.
setContainer
(
partById
.
getContainer
());
CommonUtil
.
setFolder
(
"/Default/PBOM/PBOM零部件"
,
partById
.
getContainerReference
(),
ppart
);
PersistenceHelper
.
manager
.
save
(
ppart
);
}
WTPartConfigSpec
partConfigSpec
=
WTPartConfigSpec
.
newWTPartConfigSpec
(
WTPartStandardConfigSpec
.
newWTPartStandardConfigSpec
(
ViewHelper
.
service
.
getView
(
"Design"
),
null
));
PartUtil
.
getAllChildByView
(
partById
,
partConfigSpec
,
list
);
logger
.
error
(
"converViewAll===="
+
list
.
size
());
for
(
WTPart
tempPart
:
list
){
WTPart
p2
=
PartUtil
.
getLatestViewPart
(
tempPart
.
getNumber
(),
"Planning"
);
if
(
p2
==
null
){
p2
=
(
WTPart
)
ViewHelper
.
service
.
newBranchForView
(
tempPart
,
"Planning"
);
p2
.
setContainer
(
partById
.
getContainer
());
p2
.
setContainer
(
tempPart
.
getContainer
());
CommonUtil
.
setFolder
(
"/Default/PBOM/PBOM零部件"
,
tempPart
.
getContainerReference
(),
p2
);
PersistenceHelper
.
manager
.
save
(
p2
);
}
...
...
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