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
96c8753d
Commit
96c8753d
authored
Mar 22, 2023
by
shyWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDM前端改造
PBOM签审PBOM数据同步
parent
c2952291
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
194 additions
and
0 deletions
+194
-0
PdmPartBean.java
src/com/yonde/part/bean/PdmPartBean.java
+194
-0
No files found.
src/com/yonde/part/bean/PdmPartBean.java
0 → 100644
View file @
96c8753d
package
com
.
yonde
.
part
.
bean
;
import
com.yonde.common.IBAHelper
;
import
com.yonde.common.ObjectsUtil
;
import
com.yonde.common.PartUtil
;
import
com.yonde.part.vo.DxPartVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
wt.fc.PersistenceHelper
;
import
wt.part.Quantity
;
import
wt.part.WTPart
;
import
wt.part.WTPartMaster
;
import
wt.part.WTPartUsageLink
;
import
wt.util.WTException
;
import
java.io.Serializable
;
import
java.lang.reflect.InvocationTargetException
;
import
java.rmi.RemoteException
;
import
java.util.List
;
import
java.util.Map
;
public
class
PdmPartBean
implements
Serializable
,
Cloneable
{
private
String
number
;
//编号
private
String
name
;
//名称
private
String
parentNumber
;
//父件编号
private
Double
amount
;
//数量
private
String
unit
;
//单位
private
String
subTypeName
;
//类别
private
String
endItem
;
//是否成品
private
String
contextName
;
//上下文
private
String
viewType
;
//视图
private
String
upperPart
=
"否"
;
//是否管理部件
private
Map
<
String
,
Object
>
dynamicAttrs
;
//动态属性
private
String
version
;
//大版本
private
String
iteration
;
//小版本
private
DBPartSign
dbPart
=
new
DBPartSign
();
public
PdmPartBean
()
{
}
public
PdmPartBean
(
WTPart
wtPart
)
throws
WTException
,
RemoteException
,
InvocationTargetException
{
this
.
number
=
wtPart
.
getNumber
();
this
.
name
=
wtPart
.
getName
();
this
.
contextName
=
wtPart
.
getContainerName
();
this
.
viewType
=
wtPart
.
getViewName
();
this
.
subTypeName
=
"Assembly"
;
//TODO 要映射
this
.
dynamicAttrs
=
IBAHelper
.
getAllIBAValues
(
wtPart
);
}
public
PdmPartBean
(
WTPartUsageLink
usageLink
)
throws
WTException
,
RemoteException
,
InvocationTargetException
{
WTPart
parent
=
(
WTPart
)
usageLink
.
getUsedBy
();
Quantity
qt
=
usageLink
.
getQuantity
();
this
.
setAmount
(
qt
.
getAmount
());
this
.
setUnit
(
qt
.
getUnit
().
toString
());
WTPartMaster
uses
=
(
WTPartMaster
)
usageLink
.
getUses
();
WTPart
child
=
PartUtil
.
getLatestPartByNoViewWithState
(
uses
.
getNumber
(),
parent
.
getViewName
(),
null
,
false
);
if
(
ObjectsUtil
.
nonNull
(
child
))
{
this
.
number
=
child
.
getNumber
();
this
.
name
=
child
.
getName
();
this
.
contextName
=
child
.
getContainerName
();
this
.
viewType
=
child
.
getViewName
();
List
<
WTPart
>
childByView
=
PartUtil
.
getChildByView
(
child
,
child
.
getViewName
());
if
(
CollectionUtils
.
isNotEmpty
(
childByView
))
{
this
.
subTypeName
=
"Assembly"
;
//TODO 要映射
}
else
{
this
.
subTypeName
=
"Component"
;
//TODO 要映射
}
this
.
dynamicAttrs
=
IBAHelper
.
getAllIBAValues
(
child
);
}
}
public
void
setDBPartSign
(
Long
masterId
)
{
this
.
dbPart
.
dbPart
=
true
;
this
.
dbPart
.
masterId
=
masterId
;
}
public
class
DBPartSign
implements
Serializable
{
public
Boolean
dbPart
=
false
;
public
Long
masterId
;
public
DBPartSign
()
{
}
}
public
String
getNumber
()
{
return
number
;
}
public
void
setNumber
(
String
number
)
{
this
.
number
=
number
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getParentNumber
()
{
return
parentNumber
;
}
public
void
setParentNumber
(
String
parentNumber
)
{
this
.
parentNumber
=
parentNumber
;
}
public
Double
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
Double
amount
)
{
this
.
amount
=
amount
;
}
public
String
getUnit
()
{
return
unit
;
}
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
unit
;
}
public
String
getSubTypeName
()
{
return
subTypeName
;
}
public
void
setSubTypeName
(
String
subTypeName
)
{
this
.
subTypeName
=
subTypeName
;
}
public
String
getEndItem
()
{
return
endItem
;
}
public
void
setEndItem
(
String
endItem
)
{
this
.
endItem
=
endItem
;
}
public
String
getContextName
()
{
return
contextName
;
}
public
void
setContextName
(
String
contextName
)
{
this
.
contextName
=
contextName
;
}
public
String
getViewType
()
{
return
viewType
;
}
public
void
setViewType
(
String
viewType
)
{
this
.
viewType
=
viewType
;
}
public
String
getUpperPart
()
{
return
upperPart
;
}
public
void
setUpperPart
(
String
upperPart
)
{
this
.
upperPart
=
upperPart
;
}
public
Map
<
String
,
Object
>
getDynamicAttrs
()
{
return
dynamicAttrs
;
}
public
void
setDynamicAttrs
(
Map
<
String
,
Object
>
dynamicAttrs
)
{
this
.
dynamicAttrs
=
dynamicAttrs
;
}
public
String
getVersion
()
{
return
version
;
}
public
void
setVersion
(
String
version
)
{
this
.
version
=
version
;
}
public
String
getIteration
()
{
return
iteration
;
}
public
void
setIteration
(
String
iteration
)
{
this
.
iteration
=
iteration
;
}
public
DBPartSign
getDbPart
()
{
return
dbPart
;
}
public
void
setDbPart
(
DBPartSign
dbPart
)
{
this
.
dbPart
=
dbPart
;
}
}
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