Merge pull request 'bom优化' (#2) from ljh into master
Reviewed-on: http://yunpi.tpddns.cn:3000/ZT_CODE/com.connor.chint.sap2/pulls/2master
commit
7d2c60af2c
@ -1,146 +1,153 @@
|
|||||||
package com.connor.chint.sap2.StandardBOM;
|
package com.connor.chint.sap2.StandardBOM;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.connor.chint.sap2.util.KUtil;
|
import com.connor.chint.sap2.util.KUtil;
|
||||||
import com.connor.chint.sap2.util.ZYFactoryUtil;
|
import com.connor.chint.sap2.util.ZYFactoryUtil;
|
||||||
import com.teamcenter.rac.kernel.TCComponent;
|
import com.teamcenter.rac.kernel.TCComponent;
|
||||||
import com.teamcenter.rac.kernel.TCComponentBOMLine;
|
import com.teamcenter.rac.kernel.TCComponentBOMLine;
|
||||||
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
import com.teamcenter.rac.kernel.TCException;
|
import com.teamcenter.rac.kernel.TCException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class DYStandardBomBean {
|
public class DYStandardBomBean
|
||||||
|
{
|
||||||
private TCComponentItemRevision rev;
|
private TCComponentItemRevision rev;
|
||||||
private List<DYStandardBomBean> children = new ArrayList<>();
|
private TCComponentBOMLine line;
|
||||||
private int index;
|
private List<DYStandardBomBean> children = new ArrayList();
|
||||||
|
private int index;
|
||||||
private List<TCComponent> factoryNos = new ArrayList<>();
|
private List<TCComponent> factoryNos = new ArrayList();
|
||||||
private List<String> factoryIDs = new ArrayList<>();
|
private List<String> factoryIDs = new ArrayList();
|
||||||
|
public String factoryID = "";
|
||||||
public String factoryID = "";
|
private String status_BOM = "";
|
||||||
private String status_BOM = "";
|
private String isTCM = "";
|
||||||
private String isTCM = "";
|
|
||||||
|
public String getIsTCM()
|
||||||
public String getIsTCM() {
|
{
|
||||||
return isTCM;
|
return this.isTCM;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsTCM(String isTCM) {
|
public void setIsTCM(String isTCM)
|
||||||
this.isTCM = isTCM;
|
{
|
||||||
}
|
this.isTCM = isTCM;
|
||||||
|
}
|
||||||
public void changeBOMStatus() throws TCException {
|
|
||||||
if (KUtil.isEmpty(status_BOM) || "Íê³É".equals(status_BOM)) {
|
public void changeBOMStatus()
|
||||||
status_BOM = "δÍê³É";
|
throws TCException
|
||||||
} else {
|
{
|
||||||
status_BOM = "Íê³É";
|
if ((KUtil.isEmpty(this.status_BOM)) || ("Íê³É".equals(this.status_BOM))) {
|
||||||
}
|
this.status_BOM = "δÍê³É";
|
||||||
|
} else {
|
||||||
rev.setProperty("zt2_WebNo", status_BOM);
|
this.status_BOM = "Íê³É";
|
||||||
|
}
|
||||||
// System.out.println("status_BOM:"+status_BOM);
|
this.rev.setProperty("zt2_WebNo", this.status_BOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DYStandardBomBean(TCComponentItemRevision rev, TCComponentBOMLine line, int index) {
|
public DYStandardBomBean(TCComponentItemRevision rev, TCComponentBOMLine line, int index)
|
||||||
this.rev = rev;
|
{
|
||||||
this.index = index;
|
this.rev = rev;
|
||||||
// try {
|
this.line = line;
|
||||||
// status_BOM = rev.getProperty("zt2_WebNo");
|
this.index = index;
|
||||||
// } catch (TCException e) {
|
}
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
public void getFactoryNo()
|
||||||
|
{
|
||||||
}
|
if (this.factoryIDs.size() > 0) {
|
||||||
|
this.factoryID = ZYFactoryUtil.getFactory(this.factoryIDs, 4);
|
||||||
public void getFactoryNo() {
|
}
|
||||||
if (factoryIDs.size() > 0) {
|
}
|
||||||
factoryID = ZYFactoryUtil.getFactory(factoryIDs, 4);
|
|
||||||
}
|
public String toString()
|
||||||
|
{
|
||||||
}
|
if ("Íê³É".equals(this.status_BOM))
|
||||||
|
{
|
||||||
/*
|
String text = "";
|
||||||
* public DYStandardBomBean getClone() { DYStandardBomBean bean = new
|
if (KUtil.isEmpty(this.factoryID)) {
|
||||||
* DYStandardBomBean(rev, line, index); bean.setChildren(children);
|
text = this.status_BOM + " " + this.rev.toString();
|
||||||
* bean.setFactoryIDs(factoryIDs); bean.status_BOM = status_BOM; return bean; }
|
} else {
|
||||||
*/
|
text = this.status_BOM + " " + this.rev.toString() + " (" + this.factoryID + ")";
|
||||||
|
}
|
||||||
@Override
|
return KUtil.getRedText(text);
|
||||||
public String toString() {
|
}
|
||||||
|
if (KUtil.isEmpty(this.factoryID)) {
|
||||||
if ("Íê³É".equals(status_BOM)) {
|
return this.status_BOM + " " + this.rev.toString();
|
||||||
|
}
|
||||||
String text = "";
|
return this.status_BOM + " " + this.rev.toString() + " (" + this.factoryID + ")";
|
||||||
if (KUtil.isEmpty(factoryID)) {
|
}
|
||||||
text = status_BOM + " " + rev.toString();
|
|
||||||
} else {
|
public List<DYStandardBomBean> getChildren()
|
||||||
text = status_BOM + " " + rev.toString() + " (" + factoryID + ")";
|
{
|
||||||
}
|
return this.children;
|
||||||
return KUtil.getRedText(text);
|
}
|
||||||
} else {
|
|
||||||
if (KUtil.isEmpty(factoryID)) {
|
public void setChildren(List<DYStandardBomBean> children)
|
||||||
return status_BOM + " " + rev.toString();
|
{
|
||||||
} else {
|
this.children = children;
|
||||||
return status_BOM + " " + rev.toString() + " (" + factoryID + ")";
|
}
|
||||||
}
|
|
||||||
}
|
public int getIndex()
|
||||||
}
|
{
|
||||||
|
return this.index;
|
||||||
public List<DYStandardBomBean> getChildren() {
|
}
|
||||||
return children;
|
|
||||||
}
|
public void setIndex(int index)
|
||||||
|
{
|
||||||
public void setChildren(List<DYStandardBomBean> children) {
|
this.index = index;
|
||||||
this.children = children;
|
}
|
||||||
}
|
|
||||||
|
public TCComponentItemRevision getRev()
|
||||||
public int getIndex() {
|
{
|
||||||
return index;
|
return this.rev;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIndex(int index) {
|
public void setRev(TCComponentItemRevision rev)
|
||||||
this.index = index;
|
{
|
||||||
}
|
this.rev = rev;
|
||||||
|
}
|
||||||
public TCComponentItemRevision getRev() {
|
|
||||||
return rev;
|
public List<TCComponent> getFactoryNos()
|
||||||
}
|
{
|
||||||
|
return this.factoryNos;
|
||||||
public void setRev(TCComponentItemRevision rev) {
|
}
|
||||||
this.rev = rev;
|
|
||||||
}
|
public void setFactoryNos(List<TCComponent> factoryNos)
|
||||||
|
{
|
||||||
public List<TCComponent> getFactoryNos() {
|
this.factoryNos = factoryNos;
|
||||||
return factoryNos;
|
}
|
||||||
}
|
|
||||||
|
public List<String> getFactoryIDs()
|
||||||
public void setFactoryNos(List<TCComponent> factoryNos) {
|
{
|
||||||
this.factoryNos = factoryNos;
|
return this.factoryIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getFactoryIDs() {
|
public void setFactoryIDs(List<String> factoryIDs)
|
||||||
return factoryIDs;
|
{
|
||||||
}
|
this.factoryIDs = factoryIDs;
|
||||||
|
}
|
||||||
public void setFactoryIDs(List<String> factoryIDs) {
|
|
||||||
this.factoryIDs = factoryIDs;
|
public void addFactoryID(String factoryID)
|
||||||
}
|
{
|
||||||
|
if (!this.factoryIDs.contains(factoryID)) {
|
||||||
public void addFactoryID(String factoryID) {
|
this.factoryIDs.add(factoryID);
|
||||||
if (!factoryIDs.contains(factoryID)) {
|
}
|
||||||
factoryIDs.add(factoryID);
|
}
|
||||||
}
|
|
||||||
}
|
public String getStatus_BOM()
|
||||||
|
{
|
||||||
public String getStatus_BOM() {
|
return this.status_BOM;
|
||||||
return status_BOM;
|
}
|
||||||
}
|
|
||||||
|
public void setStatus_BOM(String status_BOM)
|
||||||
public void setStatus_BOM(String status_BOM) {
|
{
|
||||||
this.status_BOM = status_BOM;
|
this.status_BOM = status_BOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TCComponentBOMLine getLine()
|
||||||
|
{
|
||||||
|
return this.line;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLine(TCComponentBOMLine line)
|
||||||
|
{
|
||||||
|
this.line = line;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue