Explorar o código

Merge remote-tracking branch 'origin/master'

Jxing %!s(int64=6) %!d(string=hai) anos
pai
achega
8da0ac8c58

+ 4 - 0
src/main/java/com/sagacloud/route/Route.java

@@ -9,6 +9,7 @@ import com.sagacloud.route.processors.Maintainance.QueryPropertyProcesspr;
 import com.sagacloud.route.processors.Manufacturer.MaunfacturerFilter;
 import com.sagacloud.route.processors.Manufacturer.GetVenderBySpecProcessor;
 import com.sagacloud.route.processors.PeriodTask.StatisticsProcessor;
+import com.sagacloud.route.processors.VenderMapProcessor;
 import com.sagacloud.route.processors.supplier.SupplierFilter;
 import com.sagacloud.utils.Const;
 import org.apache.commons.io.IOUtils;
@@ -141,6 +142,9 @@ public class Route extends ExceptionHandlerBaseRoute {
                 .route()
                 .to("direct:getPropertiesByPj");
 
+        from("direct:buildVenderMap")
+                .to(Const.venders+"/auxiliary/vender/query_detail").
+                process(new VenderMapProcessor());
     }
 
 

+ 22 - 0
src/main/java/com/sagacloud/route/processors/VenderMapProcessor.java

@@ -0,0 +1,22 @@
+package com.sagacloud.route.processors;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Created by Xiaoyu on 2018/7/13
+ */
+public class VenderMapProcessor implements Processor {
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        //第一层为Manufacturer、Brand、Specification、Supplier、SupplierContractID、Insurer、InsuranceNum、Maintainer
+        Map<String,Map> nameMap = new HashMap<>();
+        Map<String,String> idMap = new HashMap<>();//厂商id->厂商id,型号id->厂商id
+        Set<String> venderSet = new HashSet<>();
+    }
+}