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
b138cff8
Commit
b138cff8
authored
Apr 27, 2023
by
shyWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDM前端改造
对象创建文件夹调整,按初始化规则
parent
dc0c359f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
37 deletions
+28
-37
DXChangeOrderService.java
src/com/yonde/change/service/DXChangeOrderService.java
+6
-6
BaseLineUtil.java
src/com/yonde/common/BaseLineUtil.java
+2
-2
DxPartUtil.java
src/com/yonde/common/DxPartUtil.java
+17
-26
DxDocUtil.java
src/com/yonde/doc/util/DxDocUtil.java
+3
-3
No files found.
src/com/yonde/change/service/DXChangeOrderService.java
View file @
b138cff8
...
...
@@ -79,7 +79,7 @@ public class DXChangeOrderService implements RemoteAccess {
}
if
(
container
!=
null
)
{
changeIssue
.
setContainer
(
container
);
String
folderPath
=
null
;
/*
String folderPath = null;
DxDocumentFolderVO folderVO = null;
if (ObjectsUtil.nonNull(folderVO)) {
folderPath = folderVO.getFullPath();
...
...
@@ -92,7 +92,7 @@ public class DXChangeOrderService implements RemoteAccess {
FolderHelper.assignLocations(loacationMap);
} else {
throw new WTException(String.format("未找到工程更改文件夹%d", folderPath));
}
}
*/
}
else
{
throw
new
WTException
(
String
.
format
(
"型号上下文%d不存在"
,
dxContext
.
getName
()));
}
...
...
@@ -232,7 +232,7 @@ public class DXChangeOrderService implements RemoteAccess {
}
if
(
container
!=
null
)
{
ecr
.
setContainer
(
container
);
String
folderPath
=
null
;
/*
String folderPath = null;
DxDocumentFolderVO folderVO = null;
if (ObjectsUtil.nonNull(folderVO)) {
folderPath = folderVO.getFullPath();
...
...
@@ -245,7 +245,7 @@ public class DXChangeOrderService implements RemoteAccess {
FolderHelper.assignLocations(loacationMap);
} else {
System.out.println("未找到工程更改文件夹");
}
}
*/
}
// TODO 动态获取变更类型
/* String type = entityVO.getSubTypeName();
...
...
@@ -400,7 +400,7 @@ public class DXChangeOrderService implements RemoteAccess {
}
if
(
container
!=
null
)
{
wtChangeOrder2
.
setContainer
(
container
);
String
folderPath
=
null
;
/*
String folderPath = null;
DxDocumentFolderVO folderVO = null;
if (ObjectsUtil.nonNull(folderVO)) {
folderPath = folderVO.getFullPath();
...
...
@@ -413,7 +413,7 @@ public class DXChangeOrderService implements RemoteAccess {
FolderHelper.assignLocations(loacationMap);
} else {
System.out.println("未找到工程更改文件夹");
}
}
*/
}
}
wtChangeOrder2
=
ChangeOrderUtil
.
createWTChangeOrder2
(
wtChangeOrder2
,
changeNoticeVo
.
getName
(),
null
,
...
...
src/com/yonde/common/BaseLineUtil.java
View file @
b138cff8
...
...
@@ -58,9 +58,9 @@ public class BaseLineUtil {
baseline
.
setTypeDefinitionReference
(
typeDef
);
/*LifeCycleHelper.setLifeCycle(baseline,
LifeCycleHelper.service.getLifeCycleTemplate("", container.getContainerReference()));*/
WTContainerRef
containerRef
=
WTContainerRef
.
newWTContainerRef
(
baseline
.
getContainer
());
/*
WTContainerRef containerRef = WTContainerRef.newWTContainerRef(baseline.getContainer());
Folder assignedFolder = FolderHelper.service.saveFolderPath("/Default", containerRef);
FolderHelper
.
assignLocation
((
FolderEntry
)
baseline
,
assignedFolder
);
FolderHelper.assignLocation((FolderEntry) baseline, assignedFolder);
*/
baseline
=
(
ManagedBaseline
)
PersistenceHelper
.
manager
.
save
(
baseline
);
ManagedBaselineIdentity
identificationObject
=
(
ManagedBaselineIdentity
)
baseline
.
getIdentificationObject
();
...
...
src/com/yonde/common/DxPartUtil.java
View file @
b138cff8
...
...
@@ -205,11 +205,6 @@ public class DxPartUtil implements RemoteAccess, Serializable {
}
public
static
WTPart
createPart
(
DxPartVO
dxPartVO
)
throws
Exception
{
/* if (!RemoteMethodServer.ServerFlag) {
return (WTPart) RemoteMethodServer.getDefault().invoke("createPart", DxPartUtil.class.getName(), null,
new Class[]{DxPartVO.class},
new Object[]{dxPartVO});
}*/
WTPart
part
=
null
;
String
partSource
=
""
;
String
partAssembly
=
""
;
...
...
@@ -291,14 +286,6 @@ public class DxPartUtil implements RemoteAccess, Serializable {
if
(
partType
==
null
||
partType
.
equalsIgnoreCase
(
""
))
{
partType
=
"wt.part.WTPart"
;
}
if
(
partFolder
==
null
||
partFolder
.
equalsIgnoreCase
(
""
))
{
partFolder
=
"/Default"
;
}
else
{
if
(!
partFolder
.
startsWith
(
"/Default"
))
{
partFolder
=
"/Default/"
+
partFolder
;
}
}
part
=
WTPart
.
newWTPart
(
number
,
name
,
QuantityUnit
.
EA
);
if
(
partType
!=
null
)
{
...
...
@@ -308,13 +295,16 @@ public class DxPartUtil implements RemoteAccess, Serializable {
WTContainerRef
containerRef
=
WTContainerRef
.
newWTContainerRef
(
container
);
part
.
setContainerReference
(
containerRef
);
if
(
StringUtils
.
isNotEmpty
(
partFolder
))
{
if
(!
partFolder
.
startsWith
(
"/Default"
))
{
partFolder
=
"/Default/"
+
partFolder
;
}
Folder
location
=
null
;
try
{
location
=
FolderHelper
.
service
.
getFolder
(
partFolder
,
containerRef
);
}
catch
(
Exception
e
)
{
location
=
null
;
}
if
(
location
==
null
)
location
=
FolderHelper
.
service
.
saveFolderPath
(
partFolder
,
containerRef
);
...
...
@@ -323,6 +313,7 @@ public class DxPartUtil implements RemoteAccess, Serializable {
map
.
put
(
part
,
location
);
FolderHelper
.
assignLocations
(
map
);
}
}
part
.
setPartType
(
part_assembly
);
...
...
src/com/yonde/doc/util/DxDocUtil.java
View file @
b138cff8
...
...
@@ -67,8 +67,8 @@ public class DxDocUtil {
}
String
name
=
dxDocumentVO
.
getName
();
String
containerName
=
dxDocumentVO
.
getDxContext
().
getName
();
DxDocumentFolderVO
dxDocumentFolder
=
dxDocumentVO
.
getDxDocumentFolder
();
String
folderPath
=
dxDocumentFolder
==
null
?
"/Default"
:
dxDocumentFolder
.
getFullPath
();
/*
DxDocumentFolderVO dxDocumentFolder = dxDocumentVO.getDxDocumentFolder();
String folderPath = dxDocumentFolder == null?"/Default":dxDocumentFolder.getFullPath();
*/
String
lifecycleTemplateName
=
null
;
//TODO
String
state
=
dxDocumentVO
.
getState
();
...
...
@@ -91,7 +91,7 @@ public class DxDocUtil {
WTContainerRef
cref
=
WTContainerRef
.
newWTContainerRef
(
container
);
doc
.
setContainerReference
(
cref
);
CommonUtil
.
setFolder
(
cref
,
doc
,
folderPath
);
//
CommonUtil.setFolder(cref, doc, folderPath);
/*
* if(folderPath != null){ Folder folder = FolderHelper.service.getFolder(folderPath, cref);
* FolderHelper.assignLocation(doc, folder); }
...
...
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