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
5dd910ed
Commit
5dd910ed
authored
Dec 26, 2022
by
hanson.yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert dxPart
parent
c11615d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
31 deletions
+1
-31
BaseConvertUtil.java
src/com/yonde/common/BaseConvertUtil.java
+1
-13
IBAHelper.java
src/com/yonde/common/IBAHelper.java
+0
-3
DxPart.java
src/com/yonde/part/vo/DxPart.java
+0
-15
No files found.
src/com/yonde/common/BaseConvertUtil.java
View file @
5dd910ed
...
...
@@ -24,33 +24,21 @@ public class BaseConvertUtil {
DxPart
dxPart
=
new
DxPart
();
String
name
=
wtPart
.
getCreatorName
();
String
fullName
=
wtPart
.
getCreatorFullName
();
System
.
out
.
println
(
"-----name----"
+
name
+
"=======fullName===="
+
fullName
);
dxPart
.
setCreator
(
String
.
format
(
"%s(%s)"
,
fullName
,
name
));
WTUser
modify
=
((
WTUser
)
wtPart
.
getModifier
().
getObject
());
dxPart
.
setModifier
(
String
.
format
(
"%s(%s)"
,
modify
.
getFullName
(),
modify
.
getName
()));
dxPart
.
setName
(
wtPart
.
getName
());
dxPart
.
setNumber
(
wtPart
.
getNumber
());
System
.
out
.
println
(
"-----getPartByNumber----2"
);
dxPart
.
setEndItem
(
wtPart
.
isEndItem
());
System
.
out
.
println
(
"-----getPartByNumber----3"
);
dxPart
.
setLatest
(
wtPart
.
isLatestIteration
());
System
.
out
.
println
(
"-----getPartByNumber----4"
);
dxPart
.
setId
(
PartUtil
.
getWTObjectOid
(
wtPart
));
System
.
out
.
println
(
"-----getPartByNumber----5"
);
dxPart
.
setState
(
wtPart
.
getState
().
getState
().
getDisplay
(
Locale
.
SIMPLIFIED_CHINESE
));
String
wtType
=
ClientTypedUtility
.
getExternalTypeIdentifier
(
wtPart
);
wtType
=
wtType
.
substring
(
wtType
.
lastIndexOf
(
"|"
)
+
1
);
System
.
out
.
println
(
"--------wtType------"
+
wtType
);
dxPart
.
setSubTypeName
(
ClientTypedUtility
.
getLocalizedTypeName
(
wtPart
,
Locale
.
SIMPLIFIED_CHINESE
));
dxPart
.
setDefaultUnit
(
wtPart
.
getDefaultUnit
().
getDisplay
(
Locale
.
SIMPLIFIED_CHINESE
));
dxPart
.
setMasterId
(
new
ReferenceFactory
().
getReferenceString
(
ObjectReference
.
newObjectReference
((
wtPart
.
getMaster
().
getPersistInfo
().
getObjectIdentifier
()))));
System
.
out
.
println
(
"-----getPartByNumber----9"
);
dxPart
.
setCheckOuted
(
WorkInProgressHelper
.
isCheckedOut
(
wtPart
));
System
.
out
.
println
(
"-----getPartByNumber----10"
);
dxPart
.
setModifyTime
(
DateTimeUtil
.
timeStampToString
(
wtPart
.
getModifyTimestamp
()));
System
.
out
.
println
(
"-----getPartByNumber----11"
);
dxPart
.
setCreateTime
(
DateTimeUtil
.
timeStampToString
(
wtPart
.
getCreateTimestamp
()));
System
.
out
.
println
(
"-----getPartByNumber----12"
);
Persistable
object
=
wtPart
.
getLocker
().
getObject
();
if
(
object
!=
null
)
{
...
...
src/com/yonde/common/IBAHelper.java
View file @
5dd910ed
...
...
@@ -118,15 +118,12 @@ public class IBAHelper implements Serializable, RemoteAccess {
String
ibaClass
=
"wt.iba.definition.StringDefinition"
;
try
{
if
(
obj
instanceof
IBAHolder
)
{
System
.
out
.
println
(
"================================IBA1============="
);
IBAHolder
ibaholder
=
(
IBAHolder
)
obj
;
DefaultAttributeContainer
defaultattributecontainer
=
getContainer
(
ibaholder
);
if
(
defaultattributecontainer
!=
null
)
{
System
.
out
.
println
(
"================================IBA2============="
);
AbstractValueView
avv
=
getIBAValueView
(
defaultattributecontainer
,
ibaName
,
ibaClass
);
if
(
avv
!=
null
)
{
value
=
((
StringValueDefaultView
)
avv
).
getLocalizedDisplayString
();
System
.
out
.
println
(
ibaName
+
"================================IBA3============="
+
value
);
}
}
}
...
...
src/com/yonde/part/vo/DxPart.java
View file @
5dd910ed
...
...
@@ -4,7 +4,6 @@ import org.apache.log4j.Logger;
import
wt.log4j.LogR
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -35,23 +34,10 @@ public class DxPart implements Serializable {
private
String
version
;
private
String
iteration
;
private
Map
<
String
,
Object
>
dynamicAttrs
;
/**
* usageLinks bom link
*/
private
List
<
DxSourceUsageLink
>
sourceUsageLinks
;
public
DxPart
()
{
}
public
List
<
DxSourceUsageLink
>
getSourceUsageLinks
()
{
return
sourceUsageLinks
;
}
public
void
setSourceUsageLinks
(
List
<
DxSourceUsageLink
>
sourceUsageLinks
)
{
this
.
sourceUsageLinks
=
sourceUsageLinks
;
}
public
String
getIteration
()
{
return
iteration
;
}
...
...
@@ -235,7 +221,6 @@ public class DxPart implements Serializable {
", version='"
+
version
+
'\''
+
", iteration='"
+
iteration
+
'\''
+
", dynamicAttrs="
+
dynamicAttrs
+
", sourceUsageLinks="
+
sourceUsageLinks
+
'}'
;
}
}
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