|
@@ -2,6 +2,7 @@ package com.sagacloud.route;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.rjeschke.txtmark.Processor;
|
|
|
+import com.sagacloud.pojos.DPSelectPropertyResult;
|
|
|
import com.sagacloud.route.processors.Insurance.*;
|
|
|
import com.sagacloud.route.processors.GetPropByPjProcessor;
|
|
|
import com.sagacloud.route.processors.Maintainance.FilterPropertyProcessor;
|
|
@@ -127,7 +128,7 @@ public class Route extends ExceptionHandlerBaseRoute {
|
|
|
|
|
|
|
|
|
|
|
|
- from("direct:getProperty").process(new StatisticsProcessor())
|
|
|
+ from("direct:getPropertyStatisticsByProject").process(new StatisticsProcessor())
|
|
|
.to(String.join("", InitEnvRoute.venders, "/auxiliary/property/create_by_project"));
|
|
|
|
|
|
|
|
@@ -150,13 +151,22 @@ public class Route extends ExceptionHandlerBaseRoute {
|
|
|
})
|
|
|
.to(Const.venders+"/auxiliary/vender/query_detail")
|
|
|
.process(new VenderMapProcessor())
|
|
|
- .split(body(), (oldmsg, newmsg) -> {
|
|
|
- if(oldmsg == null){
|
|
|
- return newmsg;
|
|
|
- }
|
|
|
- oldmsg.getIn().setBody(oldmsg.getIn().getBody(String.class) + newmsg.getIn().getBody(String.class));
|
|
|
- return oldmsg;
|
|
|
- }).parallelProcessing().parallelAggregate().to("direct://test");
|
|
|
+ .split(body()).parallelProcessing()
|
|
|
+ .process(exchange -> {
|
|
|
+ String projectId = exchange.getIn().getBody(String.class);
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("projectId",projectId);
|
|
|
+ exchange.setProperty("projectId",projectId);
|
|
|
+ exchange.getIn().setBody(json.toString());
|
|
|
+ })
|
|
|
+ .to("direct:getPropertiesByPj")
|
|
|
+ .process(exchange -> {
|
|
|
+ String jsonStr = exchange.getIn().getBody(String.class);
|
|
|
+ DPSelectPropertyResult dpResult = JSONObject.parseObject(jsonStr, DPSelectPropertyResult.class);
|
|
|
+ exchange.setProperty("propertyData",dpResult);
|
|
|
+ exchange.getIn().setBody(exchange.getProperty("projectId"));
|
|
|
+ })
|
|
|
+ .to("direct:getPropertyStatisticsByProject");
|
|
|
}
|
|
|
|
|
|
|