|
|
@ -29,99 +29,105 @@ public class AssignProcess extends KCommand {
|
|
|
|
|
|
|
|
|
|
|
|
// private boolean top = true;
|
|
|
|
// private boolean top = true;
|
|
|
|
private TCComponentItemRevision rev;
|
|
|
|
private TCComponentItemRevision rev;
|
|
|
|
|
|
|
|
|
|
|
|
public TCComponentItemRevision getPRevision(TCComponentItemRevision rev2) throws Exception {
|
|
|
|
public TCComponentItemRevision getPRevision(TCComponentItemRevision rev2) throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
String zt2_MaterialNo = rev2.getStringProperty("zt2_MaterialNo");
|
|
|
|
String zt2_MaterialNo = rev2.getStringProperty("zt2_MaterialNo");
|
|
|
|
if(rev2.getType().equals("Part Revision")) {
|
|
|
|
if (rev2.getType().equals("Part Revision")) {
|
|
|
|
String zt2_ifpbom = rev2.getProperty("zt2_ifpbom");
|
|
|
|
String zt2_ifpbom = rev2.getProperty("zt2_ifpbom");
|
|
|
|
if(zt2_ifpbom.equals("P")) {
|
|
|
|
if (zt2_ifpbom.equals("P")) {
|
|
|
|
return rev2;
|
|
|
|
return rev2;
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
TCComponent designRev = rev2.getRelatedComponent("TC_Is_Represented_By");
|
|
|
|
TCComponent designRev = rev2.getRelatedComponent("TC_Is_Represented_By");
|
|
|
|
if(designRev!=null) {
|
|
|
|
if (designRev != null) {
|
|
|
|
TCComponent[] matnrs = designRev.getRelatedComponents("representation_for");
|
|
|
|
TCComponent[] matnrs = designRev.getRelatedComponents("representation_for");
|
|
|
|
for(TCComponent matnr:matnrs) {
|
|
|
|
for (TCComponent matnr : matnrs) {
|
|
|
|
String[] properties = matnr.getProperties(new String[]{"zt2_ifpbom","zt2_MaterialNo"});
|
|
|
|
String[] properties = matnr.getProperties(new String[] { "zt2_ifpbom", "zt2_MaterialNo" });
|
|
|
|
if(properties[1].equals(zt2_MaterialNo) && properties[0].equals("P")) {
|
|
|
|
if (properties[1].equals(zt2_MaterialNo) && properties[0].equals("P")) {
|
|
|
|
return (TCComponentItemRevision)matnr;
|
|
|
|
return (TCComponentItemRevision) matnr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else if(rev2.getType().equals("ZT2_Design3DRevision")) {
|
|
|
|
} else if (rev2.getType().equals("ZT2_Design3DRevision")) {
|
|
|
|
TCComponent[] matnrs = rev2.getRelatedComponents("representation_for");
|
|
|
|
TCComponent[] matnrs = rev2.getRelatedComponents("representation_for");
|
|
|
|
for(TCComponent matnr:matnrs) {
|
|
|
|
for (TCComponent matnr : matnrs) {
|
|
|
|
String[] properties = matnr.getProperties(new String[]{"zt2_ifpbom","zt2_MaterialNo"});
|
|
|
|
String[] properties = matnr.getProperties(new String[] { "zt2_ifpbom", "zt2_MaterialNo" });
|
|
|
|
if(properties[0].equals("P")) {
|
|
|
|
if (properties[0].equals("P")) {
|
|
|
|
return (TCComponentItemRevision)matnr;
|
|
|
|
return (TCComponentItemRevision) matnr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (TCComponentItemRevision)matnrs[0];
|
|
|
|
return (TCComponentItemRevision) matnrs[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return rev2;
|
|
|
|
return rev2;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private TCComponentItemRevision getTopZzItem(TCComponentItemRevision rev) {
|
|
|
|
private TCComponentItemRevision getTopZzItem(TCComponentItemRevision rev) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// Auto-generated method stub
|
|
|
|
// item = null;
|
|
|
|
// item = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TCComponent[] whereUsed = rev.whereUsed((short)0);
|
|
|
|
TCComponent[] whereUsed = rev.whereUsed((short) 0);
|
|
|
|
if(whereUsed.length==0) {
|
|
|
|
if (whereUsed.length == 0) {
|
|
|
|
// String property = rev.getProperty("item_id");
|
|
|
|
// String property = rev.getProperty("item_id");
|
|
|
|
return rev;
|
|
|
|
return rev;
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
List<TCComponentItemRevision> revPs = new ArrayList<TCComponentItemRevision>();
|
|
|
|
List<TCComponentItemRevision> revPs = new ArrayList<TCComponentItemRevision>();
|
|
|
|
for(int i=0;i<whereUsed.length;i++) {
|
|
|
|
for (int i = 0; i < whereUsed.length; i++) {
|
|
|
|
TCComponentItemRevision revP = (TCComponentItemRevision)whereUsed[i];
|
|
|
|
TCComponentItemRevision revP = (TCComponentItemRevision) whereUsed[i];
|
|
|
|
if(revP.getType().contains("Part")) {
|
|
|
|
if (revP.getType().contains("Part")) {
|
|
|
|
revPs.add(revP);
|
|
|
|
revPs.add(revP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for(TCComponentItemRevision revP:revPs) {
|
|
|
|
for (TCComponentItemRevision revP : revPs) {
|
|
|
|
if(revPs.size()>1) {
|
|
|
|
if (revPs.size() > 1) {
|
|
|
|
// TCComponentItemRevision revP = (TCComponentItemRevision)whereUsed[i];
|
|
|
|
// TCComponentItemRevision revP = (TCComponentItemRevision)whereUsed[i];
|
|
|
|
String property = revP.getProperty("zt2_ifpbom");
|
|
|
|
String property = revP.getProperty("zt2_ifpbom");
|
|
|
|
if(property==null||!property.equals("P")) {
|
|
|
|
if (property == null || !property.equals("P")) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TCComponentItemRevision item = getTopZzItem(revP);
|
|
|
|
TCComponentItemRevision item = getTopZzItem(revP);
|
|
|
|
if(item!=null) {
|
|
|
|
if (item != null) {
|
|
|
|
return item;
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
// Auto-generated catch block
|
|
|
|
// Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public AssignProcess(AbstractAIFApplication app, String commandId, String actionInfo) {
|
|
|
|
public AssignProcess(AbstractAIFApplication app, String commandId, String actionInfo) {
|
|
|
|
super(app, commandId, actionInfo);
|
|
|
|
super(app, commandId, actionInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long time20 = System.nanoTime();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InterfaceAIFComponent targetComponent = app.getTargetComponent();
|
|
|
|
InterfaceAIFComponent targetComponent = app.getTargetComponent();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TCSession session = (TCSession)app.getSession();
|
|
|
|
TCSession session = (TCSession) app.getSession();
|
|
|
|
String groupID = SAPUtil.getGroupID(session);
|
|
|
|
String groupID = SAPUtil.getGroupID(session);
|
|
|
|
if(!groupID.equals("M060")) {
|
|
|
|
if (!groupID.equals("M060")) {
|
|
|
|
MessageBox.post("请登录正确组", "", MessageBox.ERROR);
|
|
|
|
MessageBox.post("请登录正确组", "", MessageBox.ERROR);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(targetComponent instanceof TCComponentBOMLine) {
|
|
|
|
if (targetComponent instanceof TCComponentBOMLine) {
|
|
|
|
rev = ((TCComponentBOMLine)targetComponent).getItemRevision();
|
|
|
|
rev = ((TCComponentBOMLine) targetComponent).getItemRevision();
|
|
|
|
}else if(targetComponent instanceof TCComponentItemRevision) {
|
|
|
|
} else if (targetComponent instanceof TCComponentItemRevision) {
|
|
|
|
TCComponentItemRevision rev = (TCComponentItemRevision) targetComponent;
|
|
|
|
TCComponentItemRevision rev = (TCComponentItemRevision) targetComponent;
|
|
|
|
this.rev = rev;
|
|
|
|
this.rev = rev;
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
MessageBox.post("请选择BOM行或者版本对象", "", MessageBox.ERROR);
|
|
|
|
MessageBox.post("请选择BOM行或者版本对象", "", MessageBox.ERROR);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
new Thread() {
|
|
|
|
new Thread() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
if(!rev.getType().equals("Part Revision")) {
|
|
|
|
if (!rev.getType().equals("Part Revision")) {
|
|
|
|
MessageBox.post("请选择PBOM对象", "", MessageBox.ERROR);
|
|
|
|
MessageBox.post("请选择PBOM对象", "", MessageBox.ERROR);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -129,94 +135,133 @@ public class AssignProcess extends KCommand {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TCPreferenceService service = session.getPreferenceService();
|
|
|
|
TCPreferenceService service = session.getPreferenceService();
|
|
|
|
// TCComponentItemRevision pRevision = getPRevision(rev);
|
|
|
|
// TCComponentItemRevision pRevision = getPRevision(rev);
|
|
|
|
|
|
|
|
long time5 = System.nanoTime();
|
|
|
|
TCComponentItemRevision topZzItem = getTopZzItem(rev);
|
|
|
|
TCComponentItemRevision topZzItem = getTopZzItem(rev);
|
|
|
|
|
|
|
|
long time6 = System.nanoTime();
|
|
|
|
|
|
|
|
System.out.println(
|
|
|
|
|
|
|
|
"getTopZzItem=========================================: " + (time6 - time5) / 1000000L);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long time7 = System.nanoTime();
|
|
|
|
|
|
|
|
|
|
|
|
String name = rev.getProperty("object_name");
|
|
|
|
String name = rev.getProperty("object_name");
|
|
|
|
String property = topZzItem.getProperty("zt2_ifpbom");
|
|
|
|
String property = topZzItem.getProperty("zt2_ifpbom");
|
|
|
|
if(!property.equals("P") && topZzItem.getStringProperty("object_desc").contains("1ZDB300000P")) {
|
|
|
|
if (!property.equals("P")
|
|
|
|
|
|
|
|
&& topZzItem.getStringProperty("object_desc").contains("1ZDB300000P")) {
|
|
|
|
MessageBox.post("请选择PBOM对象", "", MessageBox.ERROR);
|
|
|
|
MessageBox.post("请选择PBOM对象", "", MessageBox.ERROR);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
boolean isback = false;
|
|
|
|
boolean isback = false;
|
|
|
|
String[] rules = service.getStringValues("CHINT_PROCESS_RULE");
|
|
|
|
String[] rules = service.getStringValues("CHINT_PROCESS_RULE");
|
|
|
|
for(String rule : rules) {
|
|
|
|
for (String rule : rules) {
|
|
|
|
String[] split = rule.split(":");
|
|
|
|
String[] split = rule.split(":");
|
|
|
|
if(!split[0].equals(groupID))
|
|
|
|
if (!split[0].equals(groupID))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
String[] backs = split[1].split(";");
|
|
|
|
String[] backs = split[1].split(";");
|
|
|
|
for(String back : backs) {
|
|
|
|
for (String back : backs) {
|
|
|
|
System.out.println(name + "==" + back + ">>" + name.contains(back));
|
|
|
|
System.out.println(name + "==" + back + ">>" + name.contains(back));
|
|
|
|
if(name.contains(back)) {
|
|
|
|
if (name.contains(back)) {
|
|
|
|
isback = true;
|
|
|
|
isback = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(isback)
|
|
|
|
if (isback)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TCComponentItemRevision desginRev = (TCComponentItemRevision) topZzItem.getRelatedComponent("TC_Is_Represented_By");
|
|
|
|
TCComponentItemRevision desginRev = (TCComponentItemRevision) topZzItem
|
|
|
|
System.out.println("topZzItem=="+topZzItem.toString()+">>"+isback);
|
|
|
|
.getRelatedComponent("TC_Is_Represented_By");
|
|
|
|
if(isback) {
|
|
|
|
System.out.println("topZzItem==" + topZzItem.toString() + ">>" + isback);
|
|
|
|
|
|
|
|
if (isback) {
|
|
|
|
AIFComponentContext[] folders = topZzItem.getItem()
|
|
|
|
AIFComponentContext[] folders = topZzItem.getItem()
|
|
|
|
.whereReferencedByTypeRelation(new String[] { "ZT2_ProjectFolder" }, null);//new String[] { "contents" }
|
|
|
|
.whereReferencedByTypeRelation(new String[] { "ZT2_ProjectFolder" }, null);// new
|
|
|
|
if(folders.length == 0) {
|
|
|
|
// String[]
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// "contents"
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (folders.length == 0) {
|
|
|
|
MessageBox.post("未找到产成品文件夹,请检查.", "提示", MessageBox.WARNING);
|
|
|
|
MessageBox.post("未找到产成品文件夹,请检查.", "提示", MessageBox.WARNING);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AIFComponentContext[] ccps = folders[0].getComponent().getChildren();
|
|
|
|
AIFComponentContext[] ccps = folders[0].getComponent().getChildren();
|
|
|
|
System.out.println(folders[0].getComponent() + "==>" + ccps.length);
|
|
|
|
System.out.println(folders[0].getComponent() + "==>" + ccps.length);
|
|
|
|
for(AIFComponentContext aifcc : ccps) {
|
|
|
|
for (AIFComponentContext aifcc : ccps) {
|
|
|
|
TCComponentItem item = (TCComponentItem) aifcc.getComponent();
|
|
|
|
TCComponentItem item = (TCComponentItem) aifcc.getComponent();
|
|
|
|
desginRev = (TCComponentItemRevision) item.getLatestItemRevision().getRelatedComponent("TC_Is_Represented_By");
|
|
|
|
desginRev = (TCComponentItemRevision) item.getLatestItemRevision()
|
|
|
|
|
|
|
|
.getRelatedComponent("TC_Is_Represented_By");
|
|
|
|
System.out.println(item + "==>" + desginRev);
|
|
|
|
System.out.println(item + "==>" + desginRev);
|
|
|
|
if(desginRev != null)
|
|
|
|
if (desginRev != null)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(desginRev == null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long time8 = System.nanoTime();
|
|
|
|
|
|
|
|
System.out.println(
|
|
|
|
|
|
|
|
"检查逻辑=========================================: " + (time8 - time7) / 1000000L);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (desginRev == null) {
|
|
|
|
MessageBox.post("存在顶层P物料没有关联图纸,请检查.", "提示", MessageBox.WARNING);
|
|
|
|
MessageBox.post("存在顶层P物料没有关联图纸,请检查.", "提示", MessageBox.WARNING);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Map<String, String> classificationAttributes = desginRev.getItem().getClassificationAttributes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long time3 = System.nanoTime();
|
|
|
|
|
|
|
|
Map<String, String> classificationAttributes = desginRev.getItem()
|
|
|
|
|
|
|
|
.getClassificationAttributes();
|
|
|
|
System.out.println(classificationAttributes.toString());
|
|
|
|
System.out.println(classificationAttributes.toString());
|
|
|
|
|
|
|
|
|
|
|
|
for(String key:classificationAttributes.keySet()) {
|
|
|
|
|
|
|
|
if(key.equals("产品型号")) {
|
|
|
|
|
|
|
|
|
|
|
|
for (String key : classificationAttributes.keySet()) {
|
|
|
|
|
|
|
|
if (key.equals("产品型号")) {
|
|
|
|
String cphx = classificationAttributes.get(key);
|
|
|
|
String cphx = classificationAttributes.get(key);
|
|
|
|
String sql = "SELECT \"ProductZu\" FROM \"CHINT_WORKHOUR_WhProductXH\" where \"ProductXH\" = '"+cphx+"'";
|
|
|
|
String sql = "SELECT \"ProductZu\" FROM \"CHINT_WORKHOUR_WhProductXH\" where \"ProductXH\" = '"
|
|
|
|
|
|
|
|
+ cphx + "'";
|
|
|
|
String[] prefs = service.getStringValues("database_tc");
|
|
|
|
String[] prefs = service.getStringValues("database_tc");
|
|
|
|
SqlUtil.getTCDataConnection(prefs);
|
|
|
|
SqlUtil.getTCDataConnection(prefs);
|
|
|
|
ResultSet read2 = SqlUtil.read(sql);
|
|
|
|
ResultSet read2 = SqlUtil.read(sql);
|
|
|
|
if(!read2.next()) {
|
|
|
|
if (!read2.next()) {
|
|
|
|
String searchSql = "SELECT distinct \"ProductZu\" FROM \"CHINT_WORKHOUR_WhProductXH\" where \"COMPANYCODE\" = 'M060'";
|
|
|
|
String searchSql = "SELECT distinct \"ProductZu\" FROM \"CHINT_WORKHOUR_WhProductXH\" where \"COMPANYCODE\" = 'M060'";
|
|
|
|
ResultSet read = SqlUtil.read(searchSql);
|
|
|
|
ResultSet read = SqlUtil.read(searchSql);
|
|
|
|
List<String> productZuList = new ArrayList<String>();
|
|
|
|
List<String> productZuList = new ArrayList<String>();
|
|
|
|
while(read.next()){
|
|
|
|
while (read.next()) {
|
|
|
|
productZuList.add(read.getString(1));
|
|
|
|
productZuList.add(read.getString(1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
System.out.println(productZuList.toString());
|
|
|
|
System.out.println(productZuList.toString());
|
|
|
|
String[] array = productZuList.toArray(new String[] {});
|
|
|
|
String[] array = productZuList.toArray(new String[] {});
|
|
|
|
Object showInputDialog = JOptionPane.showInputDialog(null,"当前产品型号未维护,请选择对应产品族.","提示",JOptionPane.QUESTION_MESSAGE,null,array,array[0]);
|
|
|
|
Object showInputDialog = JOptionPane.showInputDialog(null, "当前产品型号未维护,请选择对应产品族.",
|
|
|
|
if(showInputDialog==null) {
|
|
|
|
"提示", JOptionPane.QUESTION_MESSAGE, null, array, array[0]);
|
|
|
|
|
|
|
|
if (showInputDialog == null) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
System.out.println("showInputDialog:" + showInputDialog.toString());
|
|
|
|
System.out.println("showInputDialog:" + showInputDialog.toString());
|
|
|
|
String insertSql = "INSERT INTO \"CHINT_WORKHOUR_WhProductXH\" "
|
|
|
|
String insertSql = "INSERT INTO \"CHINT_WORKHOUR_WhProductXH\" "
|
|
|
|
+ "(\"ProductXH\",\"ProductZu\",\"COMPANYCODE\") "
|
|
|
|
+ "(\"ProductXH\",\"ProductZu\",\"COMPANYCODE\") " + "VALUES (?,?,?)";
|
|
|
|
+ "VALUES (?,?,?)";
|
|
|
|
SqlUtil.write(insertSql,
|
|
|
|
SqlUtil.write(insertSql, new Object[] {cphx,showInputDialog.toString(),"M060"});
|
|
|
|
new Object[] { cphx, showInputDialog.toString(), "M060" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long time4 = System.nanoTime();
|
|
|
|
|
|
|
|
System.out.println(
|
|
|
|
|
|
|
|
"sql==========================================: " + (time4 - time3) / 1000000L);
|
|
|
|
comp = new MyProgressBarCompent("", "正在进行一键指派工艺路线......");
|
|
|
|
comp = new MyProgressBarCompent("", "正在进行一键指派工艺路线......");
|
|
|
|
TCUserService userService = (TCUserService) session.getUserService();
|
|
|
|
TCUserService userService = (TCUserService) session.getUserService();
|
|
|
|
Object call = userService.call("CloneTempProcess", new Object[] {rev.getUid()});
|
|
|
|
long time1 = System.nanoTime();
|
|
|
|
|
|
|
|
Object call = userService.call("CloneTempProcess", new Object[] { rev.getUid() });
|
|
|
|
|
|
|
|
long time2 = System.nanoTime();
|
|
|
|
|
|
|
|
System.out.println(
|
|
|
|
|
|
|
|
"调用call==========================================: " + (time2 - time1) / 1000000L);
|
|
|
|
String string = call.toString();
|
|
|
|
String string = call.toString();
|
|
|
|
comp.setVisible(false);
|
|
|
|
comp.setVisible(false);
|
|
|
|
System.out.println(string);
|
|
|
|
System.out.println(string);
|
|
|
|
if(!string.equals("succ")) {
|
|
|
|
if (!string.equals("succ")) {
|
|
|
|
// if(string.contains("在数据库表中无对应典型产品族值")) {
|
|
|
|
// if(string.contains("在数据库表中无对应典型产品族值")) {
|
|
|
|
// String[] split = string.split("当前变压器产品型号:");
|
|
|
|
// String[] split = string.split("当前变压器产品型号:");
|
|
|
|
// String[] split2 = split[1].split(",在数据库表中无对应典型产品族值");
|
|
|
|
// String[] split2 = split[1].split(",在数据库表中无对应典型产品族值");
|
|
|
@ -235,23 +280,28 @@ public class AssignProcess extends KCommand {
|
|
|
|
// System.out.println(productZuList.toString());
|
|
|
|
// System.out.println(productZuList.toString());
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
new SAPMessageUtilFram("", "一键指派工艺路线存在异常,请检查:\n" + string);
|
|
|
|
new SAPMessageUtilFram("", "一键指派工艺路线存在异常,请检查:\n" + string);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
MessageBox.post("一键指派工艺路线完成。","提示",MessageBox.INFORMATION);
|
|
|
|
MessageBox.post("一键指派工艺路线完成。", "提示", MessageBox.INFORMATION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e1) {
|
|
|
|
} catch (Exception e1) {
|
|
|
|
// Auto-generated catch block
|
|
|
|
// Auto-generated catch block
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
}finally {
|
|
|
|
} finally {
|
|
|
|
SqlUtil.freeAll();
|
|
|
|
SqlUtil.freeAll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(comp!=null) {
|
|
|
|
if (comp != null) {
|
|
|
|
comp.setVisible(false);
|
|
|
|
comp.setVisible(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}.start();
|
|
|
|
}.start();
|
|
|
|
}catch(Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long time21 = System.nanoTime();
|
|
|
|
|
|
|
|
System.out.println(
|
|
|
|
|
|
|
|
"总时长==========================================: " + (time21 - time20) / 1000000L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|