Explorar el Código

完成功能开发

cuixubin hace 4 años
padre
commit
54e97ee652
Se han modificado 2 ficheros con 16 adiciones y 14 borrados
  1. 12 10
      src/main/java/com/persagy/dptool/VenderUtil.java
  2. 4 4
      src/main/resources/primary.fxml

+ 12 - 10
src/main/java/com/persagy/dptool/VenderUtil.java

@@ -83,14 +83,14 @@ public class VenderUtil {
                 if (infoCodeSet.contains("DPBrandID") && infoCodeSet.contains("Brand")) {
                     processBrand(item);
                 }
-                if (infoCodeSet.contains("DPMaintainerID") && (infoCodeSet.contains("Maintainer") || infoCodeSet.contains("MaintainerContacto") || infoCodeSet.contains("MaintainerPhone"))) {
-                    processNameContactPhone(item, "DPMaintainerID", "Maintainer", "MaintainerContacto", "MaintainerPhone");
+                if (infoCodeSet.contains("DPMaintainerID") && (infoCodeSet.contains("Maintainer") || infoCodeSet.contains("MaintainerContactor") || infoCodeSet.contains("MaintainerPhone"))) {
+                    processNameContactPhone(item, "DPMaintainerID", "Maintainer", "MaintainerContactor", "MaintainerPhone");
                 }
-                if (infoCodeSet.contains("DPManufacturerID") && (infoCodeSet.contains("Manufacturer") || infoCodeSet.contains("ManufacturerContacto") || infoCodeSet.contains("ManufacturerPhone"))) {
-                    processNameContactPhone(item, "DPManufacturerID", "Manufacturer", "ManufacturerContacto", "ManufacturerPhone");
+                if (infoCodeSet.contains("DPManufacturerID") && (infoCodeSet.contains("Manufacturer") || infoCodeSet.contains("ManufacturerContactor") || infoCodeSet.contains("ManufacturerPhone"))) {
+                    processNameContactPhone(item, "DPManufacturerID", "Manufacturer", "ManufacturerContactor", "ManufacturerPhone");
                 }
-                if (infoCodeSet.contains("DPSupplierID") && (infoCodeSet.contains("Supplier") || infoCodeSet.contains("SupplierContacto") || infoCodeSet.contains("SupplierPhone"))) {
-                    processNameContactPhone(item, "DPSupplierID", "Supplier", "SupplierContacto", "SupplierPhone");
+                if (infoCodeSet.contains("DPSupplierID") && (infoCodeSet.contains("Supplier") || infoCodeSet.contains("SupplierContactor") || infoCodeSet.contains("SupplierPhone"))) {
+                    processNameContactPhone(item, "DPSupplierID", "Supplier", "SupplierContactor", "SupplierPhone");
                 }
                 if (infoCodeSet.contains("DPSpecificationID") && infoCodeSet.contains("Specification")) {
                     processSpecific(item);
@@ -193,7 +193,9 @@ public class VenderUtil {
         ObjectInfoRecord phoneRecord = null;
 
         for(String key : item.keySet()) {
-            if(key.startsWith(ctmInfoCode)) {
+            String infoCode = key.split("@")[0];
+
+            if(infoCode.equals(ctmInfoCode)) {
                 if(null == newCTMRecord) {
                     newCTMRecord = item.get(key);
                 }else {
@@ -201,7 +203,7 @@ public class VenderUtil {
                 }
             }
 
-            if(key.startsWith(nameCode)) {
+            if(infoCode.equals(nameCode)) {
                 if(null == nameRecord) {
                     nameRecord = item.get(key);
                 }else {
@@ -209,7 +211,7 @@ public class VenderUtil {
                 }
             }
 
-            if(key.startsWith(contactCode)) {
+            if(infoCode.equals(contactCode)) {
                 if(null == contactRecord) {
                     contactRecord = item.get(key);
                 }else {
@@ -217,7 +219,7 @@ public class VenderUtil {
                 }
             }
 
-            if(key.startsWith(phoneCode)) {
+            if(infoCode.equals(phoneCode)) {
                 if(null == phoneRecord) {
                     phoneRecord = item.get(key);
                 }else {

+ 4 - 4
src/main/resources/primary.fxml

@@ -32,7 +32,7 @@
                         <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                             <children>
                                 <Label layoutX="12.0" layoutY="14.0" prefHeight="26.0" prefWidth="128.0" text="数据平台配置目录:" />
-                                <TextField fx:id="txfDir" layoutX="138.0" layoutY="12.0" prefHeight="30.0" prefWidth="592.0" promptText="D:/develop/tomcat9/webapps/data-platform-3/WEB-INF/classes/" />
+                                <TextField fx:id="txfDir" editable="false" layoutX="138.0" layoutY="12.0" prefHeight="30.0" prefWidth="592.0" promptText="D:/develop/tomcat9/webapps/data-platform-3/WEB-INF/classes/" />
                                 <Button fx:id="btnSelectDir" layoutX="733.0" layoutY="12.0" mnemonicParsing="false" onAction="#selectDir" text="···" />
                                 <Button fx:id="btnCheck" layoutX="776.0" layoutY="12.0" mnemonicParsing="false" onAction="#checkConfig" text="校验" />
                                 <Label layoutX="138.0" layoutY="49.0" prefHeight="20.0" prefWidth="644.0" text="注: 路径为数据平台配置文件config.properties所在目录,或本地数据字典property文件夹所在目录" textFill="#7c7c7c">
@@ -62,7 +62,7 @@
                         <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                             <children>
                                 <Label layoutX="9.0" layoutY="56.0" prefHeight="26.0" prefWidth="98.0" text="json文件目录:" textAlignment="RIGHT" />
-                                <TextField fx:id="txfDirJson" layoutX="107.0" layoutY="54.0" prefHeight="30.0" prefWidth="620.0" />
+                                <TextField fx:id="txfDirJson" editable="false" layoutX="107.0" layoutY="54.0" prefHeight="30.0" prefWidth="620.0" />
                                 <Button fx:id="btnSelecDirJson" layoutX="731.0" layoutY="54.0" mnemonicParsing="false" onAction="#selectDirJson" text="···" />
                                 <Button fx:id="btnCheckJson" layoutX="777.0" layoutY="54.0" mnemonicParsing="false" onAction="#checkJsonFile" text="校验" />
                                 <Label layoutX="107.0" layoutY="84.0" prefHeight="27.0" prefWidth="666.0" text="注: 只识别由HbaseCat工具导出的json文件;只能校验物理世界相关数据表;json文件名应与表名一致。" textFill="#7c7c7c">
@@ -93,9 +93,9 @@
                         <Label layoutX="31.0" layoutY="14.0" prefHeight="20.0" prefWidth="60.0" text="*项目id: " />
                         <TextField fx:id="txfProjectVender" layoutX="91.0" layoutY="9.0" prefHeight="30.0" prefWidth="157.0" promptText="Pj110101001" />
                         <Label layoutX="17.0" layoutY="63.0" prefHeight="20.0" prefWidth="74.0" text="*选择文件:" />
-                        <TextField fx:id="txfObjInfosJson" layoutX="91.0" layoutY="58.0" prefHeight="30.0" prefWidth="699.0" promptText="D:/temp/obj_infos.json" />
+                        <TextField fx:id="txfObjInfosJson" editable="false" layoutX="91.0" layoutY="58.0" prefHeight="30.0" prefWidth="699.0" promptText="D:/temp/obj_infos.json" />
                         <Button layoutX="796.0" layoutY="58.0" mnemonicParsing="false" onAction="#selectObjInfoJsonInput" text="···" />
-                        <Label layoutX="91.0" layoutY="88.0" prefHeight="24.0" prefWidth="696.0" text="注: 所选文件为HBaseCat工具导出的,HBase中物理世界,导出的obj_infos表数据的,json格式文件" textFill="#7c7c7c">
+                        <Label layoutX="91.0" layoutY="88.0" prefHeight="24.0" prefWidth="696.0" text="注: 所选文件为HBaseCat工具导出的,HBase中物理世界obj_infos表数据的,json格式文件" textFill="#7c7c7c">
                            <font>
                               <Font size="14.0" />
                            </font>