Explorar el Código

地图定位sql

周壕 hace 10 meses
padre
commit
11c897a132
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      src/main/resources/mapping/cquery/WellInfoCQuery.xml

+ 4 - 1
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -53,7 +53,9 @@
         TO_CHAR(fact_daily.oil_prod_recent_date , 'YYYY-MM-dd') oil_prod_recent_date,
                fact_daily.current_state,fact_daily.water_cut,
         fact_mon.oil_prod_mon,fact_mon.gas_prod_mon,fact_mon.gas_prod_year,fact_mon.oil_prod_year
-        ,fact_mon.water_prod_mon,fact_mon.water_prod_year
+        ,fact_mon.water_prod_mon,fact_mon.water_prod_year,
+        well_stt.well_coordinates_x x,
+        well_stt.well_coordinates_y y
         from by_dwr.fact_dwr_well_basic_information well
         left join (
         select daily.* from by_dwr.fact_dwr_pc_pro_well_vol_d daily
@@ -67,6 +69,7 @@
         select well_id, max(prod_date) prod_date from by_dwr.fact_dwr_pc_pro_well_vol_m group by well_id
         ) maxmon on mon.well_id=maxmon.well_id and mon.prod_date=maxmon.prod_date
         )fact_mon on well.well_id= fact_mon.well_id
+        left join by_dwr.fact_dwr_well_structure well_stt on well.well_id = well_stt.well_id
         where 1=1
         <if test="well_common_name!='' and well_common_name!=null">
             and well.well_common_name like Concat('%',#{well_common_name},'%')