Commit 5dd910ed authored by hanson.yao's avatar hanson.yao

convert dxPart

parent c11615d4
......@@ -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) {
......
......@@ -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);
}
}
}
......
......@@ -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 +
'}';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment