Ver código fonte

查询a2动页面数据太慢

gxt 3 anos atrás
pai
commit
aa070001d3

+ 4 - 3
src/main/java/com/gct/tools/etlcamelhuge/routeconfig/CamelJDBCConfiguration.java

@@ -11,6 +11,7 @@ import org.springframework.context.annotation.Configuration;
11 11
 import org.springframework.util.StringUtils;
12 12
 
13 13
 import java.math.BigDecimal;
14
+import java.math.RoundingMode;
14 15
 import java.time.LocalDateTime;
15 16
 import java.time.format.DateTimeFormatter;
16 17
 import java.util.*;
@@ -224,7 +225,7 @@ public class CamelJDBCConfiguration {
224 225
                             in.setHeader("date",getDate());
225 226
                         });
226 227
                          setMyBody(statusDailyDYM)
227
-                        .setBody(simple("select distinct jh , rq , dym from DBA01 where  (jh,rq) in (SELECT  jh,max(rq) rq  FROM DBA01 WHERE dym is not null and rq<= to_date('${header.date}','yyyy-MM-dd')and jh='${header.well_id}' group by jh)"))
228
+                        .setBody(simple("select distinct jh , rq , dym from DBA01 where  (jh,rq) in (SELECT  jh,max(rq) rq  FROM DBA01 WHERE dym is not null and jh='${header.well_id}' group by jh)"))
228 229
                         .to("jdbc:oracle")
229 230
                         .split(body())
230 231
                         .setBody(simple("update centralbase.cb_pc_pro_wellbore_status_daily set start_pump_liq_level = '${body[DYM]}'  where well_id = '${body[JH]}' and prod_date::date  = '${header.date}' "))
@@ -266,9 +267,9 @@ public class CamelJDBCConfiguration {
266 267
                             HashMap<String, Object> aRow = in.getBody(HashMap.class);
267 268
                             aRow.put("submergence_depth",null);
268 269
                             if (aRow.get("start_pump_liq_level")!=null && aRow.get("pump_depth")!=null){
269
-                                double cmd= Double.valueOf(aRow.get("pump_depth").toString())-Double.valueOf(aRow.get("start_pump_liq_level").toString())/10;
270
+                                double cmd= Double.parseDouble(aRow.get("pump_depth").toString())-Double.parseDouble(aRow.get("start_pump_liq_level").toString())/10;
270 271
                                 BigDecimal bd=new BigDecimal(cmd);
271
-                                double cmd1=bd.setScale(1,BigDecimal.ROUND_HALF_UP).doubleValue();
272
+                                double cmd1=bd.setScale(1, RoundingMode.HALF_UP).doubleValue();
272 273
                                 aRow.put("submergence_depth",cmd1);
273 274
                             }
274 275
                 })