|
|
@@ -33,8 +33,8 @@ public class MergeComponentData {
|
|
|
* 将从本地文件读取的一行字符串数据解析为器件对象
|
|
|
*
|
|
|
* @param data
|
|
|
- * 格式为"CMP_ID" "CMP_BRID" "CMP_CODE" "CMP_KIID",如1 149
|
|
|
- * "10120-5212PC" 295
|
|
|
+ * 格式为"CMP_ID" "CMP_BRID" "CMP_CODE" "CMP_KIID" "CMP_UUID",如1 149
|
|
|
+ * "10120-5212PC" 295 "2502600600000001"
|
|
|
* @return
|
|
|
*/
|
|
|
private static ComponentSimpleInfo parseComponent(String data) {
|
|
|
@@ -44,6 +44,7 @@ public class MergeComponentData {
|
|
|
component.setBrandid(Long.parseLong(strs[1]));
|
|
|
component.setCode(strs[2].substring(1, strs[2].length() - 1));
|
|
|
component.setKindid(Long.parseLong(strs[3]));
|
|
|
+ component.setUuid(strs[4].substring(1, strs[4].length() - 1));
|
|
|
return component;
|
|
|
}
|
|
|
|
|
|
@@ -95,8 +96,8 @@ public class MergeComponentData {
|
|
|
printWriter.flush();
|
|
|
printWriter.close();
|
|
|
fileIndex++;
|
|
|
- printWriter = new PrintWriter(DATA_DIR + "\\components\\ComponentWithProperty_" + fileIndex
|
|
|
- + ".txt");
|
|
|
+ printWriter = new PrintWriter(
|
|
|
+ DATA_DIR + "\\components\\ComponentWithProperty_" + fileIndex + ".txt");
|
|
|
}
|
|
|
|
|
|
ComponentSimpleInfo component = parseComponent(componentLine);
|
|
|
@@ -119,7 +120,7 @@ public class MergeComponentData {
|
|
|
}
|
|
|
printWriter.flush();
|
|
|
} catch (FileNotFoundException e) {
|
|
|
- System.out.println("File not found!");
|
|
|
+ e.printStackTrace();
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
} finally {
|