2 Commit-ok e6e2fe94c6 ... be7b3d5c51

Szerző SHA1 Üzenet Dátum
  周壕 be7b3d5c51 Merge remote-tracking branch 'origin/master' 10 hónapja
  周壕 ca6178268b 优化图表查询语句,增加注水量显示 10 hónapja

+ 19 - 3
src/main/java/com/bowintek/practice/services/impl/FactWellServiceImpl.java

@@ -3,12 +3,14 @@ package com.bowintek.practice.services.impl;
 import com.bowintek.practice.mapper.cquery.FactWellCQuery;
 import com.bowintek.practice.model.EsQueryLog;
 import com.bowintek.practice.services.service.FactWellService;
+import com.bowintek.practice.util.StringUtils;
 import com.bowintek.practice.util.multipdb.DBTypeEnum;
 import com.bowintek.practice.util.multipdb.SwitchDataSource;
 import com.bowintek.practice.vo.EsQueryLogVo;
 import com.bowintek.practice.vo.FactWell.FactWellGroupList;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import org.apache.commons.lang3.SystemUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -49,7 +51,10 @@ public class FactWellServiceImpl implements FactWellService {
         //重新计算当前12月
         if(startTime==null || endTime==null) return getMonthGroupList(wellId);
 
-        System.out.println("getMonthGroupList "+dateToDayString(startTime)+" "+dateToDayString(endTime));
+        System.out.println("getMonthGroupList startTime:"+dateToDayString(startTime)
+                +" endTime:"+dateToDayString(endTime)
+                +" wellId:"+wellId);
+        if(StringUtils.IsNullEmpty(wellId)) return new ArrayList<>();
 
         List<FactWellGroupList> rtnList = factWellCQuery
                 .getMonthShowInList(wellId, dateToDayString(startTime), dateToDayString(endTime));
@@ -92,6 +97,11 @@ public class FactWellServiceImpl implements FactWellService {
         //重新计算当前30天日期
         if(startTime==null || endTime==null) return getDayGroupList(wellId);
 
+        System.out.println("getMonthGroupList startTime:"+dateToDayString(startTime)
+                +" endTime:"+dateToDayString(endTime)
+                +" wellId:"+wellId);
+        if(StringUtils.IsNullEmpty(wellId)) return new ArrayList<>();
+
         List<FactWellGroupList> rtnList = factWellCQuery
                 .getDayGroupList(wellId, dateToDayString(startTime), dateToDayString(endTime));
 
@@ -139,7 +149,10 @@ public class FactWellServiceImpl implements FactWellService {
         //重新计算当前12月
         if(startTime==null || endTime==null) return getMonthGroupList(wellId);
 
-        System.out.println("getMonthGroupList "+dateToDayString(startTime)+" "+dateToDayString(endTime));
+        System.out.println("getMonthGroupList startTime:"+dateToDayString(startTime)
+                +" endTime:"+dateToDayString(endTime)
+                +" wellId:"+wellId);
+        if(StringUtils.IsNullEmpty(wellId)) return new ArrayList<>();
 
         List<FactWellGroupList> rtnList = factWellCQuery
                 .getMonthGroupList(wellId, dateToDayString(startTime), dateToDayString(endTime));
@@ -181,7 +194,10 @@ public class FactWellServiceImpl implements FactWellService {
         //重新计算5年时间
         if(startTime==null || endTime==null) return getYearGroupList(wellId);
 
-        System.out.println("getYearGroupList "+dateToDayString(startTime)+" "+dateToDayString(endTime));
+        System.out.println("getMonthGroupList startTime:"+dateToDayString(startTime)
+                +" endTime:"+dateToDayString(endTime)
+                +" wellId:"+wellId);
+        if(StringUtils.IsNullEmpty(wellId)) return new ArrayList<>();
 
         List<FactWellGroupList> rtnList = factWellCQuery
                 .getYearGroupList(wellId, dateToDayString(startTime), dateToDayString(endTime));

+ 6 - 5
src/main/resources/mapping/cquery/FactWellCQuery.xml

@@ -35,20 +35,21 @@
             MAX(t.oil_prod_mon) oil,
             MAX(t.water_prod_mon) water,
             MAX(t.fluid_prod_mon) fluid,
-            0 watercut
+            MAX(t.water_cut) watercut,
+            MAX(t.inj_vol_cum) vol
         FROM (  SELECT wm.well_id,
                     TO_CHAR(wm.prod_date , 'YYYY年MM月') prod_time_str,
                     COALESCE(wm.gas_prod_cum, 0) gas_prod_mon,
                     COALESCE(wm.oil_prod_cum, 0) oil_prod_mon,
                     COALESCE(wm.water_prod_cum, 0) water_prod_mon,
-                    COALESCE(wm.liquid_prod_cum, 0) fluid_prod_mon
+                    COALESCE(wm.liquid_prod_cum, 0) fluid_prod_mon,
+                    COALESCE(wm.water_cut, 0) water_cut,
+                    COALESCE(wm.inj_vol_cum, 0) inj_vol_cum
                 FROM by_dwr.fact_dwr_pc_pro_well_vol_d wm
                 WHERE wm.prod_date is not null
                     and wm.prod_date <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
                     and wm.prod_date <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
-                    <if test="wellId!='' and wellId!=null">
-                        and wm.well_id=#{wellId}
-                    </if>
+                    and wm.well_id=#{wellId}
             ) t
         GROUP BY t.well_id, t.prod_time_str
     </select>

+ 7 - 4
vue/src/components/basic/chart/chart-cell.vue

@@ -63,15 +63,18 @@
     },
     mounted(){
       console.log("mounted chart-cell" , this.id);
-      this.readerCell();
+      if(this.wellId!=null && this.wellId!=undefined && this.wellId.trim().length>0)
+        this.readerCell();
 
       watch(
         () => this.wellId,
         (n, o) => {
           if(n!=o) {
-            console.log("wellId change",this.getChartId(), n, o);
-            this.chartDispose();
-            this.readerCell();
+            console.log("wellIdChangeLog",this.getChartId(), n, o);
+            if(n!=null && n!=undefined && n.trim().length>0) {
+              this.chartDispose();
+              this.readerCell();
+            }
           }
         }
       );

+ 5 - 1
vue/src/components/basic/chart/chart-map.vue

@@ -24,7 +24,7 @@
     </div>
     <iframe width="100%" height="100%" tyle="border: 0"
             :src="iframeSrc" ref="iframeRef" id="iframeMap"
-            class="chart-map-iframe"></iframe>
+            :class="(isSearch?'chart-map-iframe':'chart-map-iframe2')"></iframe>
   </div>
 </template>
 
@@ -152,6 +152,10 @@
     top:-50px;
     z-index: 10;
   }
+  .chart-map-iframe2{
+    position: relative;
+    z-index: 10;
+  }
   .chart-map-input{
     background-color: white;
     position: relative;

+ 2 - 2
vue/src/views/wellinfo/index.vue

@@ -178,7 +178,7 @@
               </template>
               <template v-if="column.dataIndex === 'water'">
                 <div style="height:25px">
-                  <ChartCell :timeType="('month')" :dataType="('water')" :wellId="record.well_id"></ChartCell>
+                  <ChartCell :timeType="('month')" :dataType="('vol')" :wellId="record.well_id"></ChartCell>
                 </div>
               </template>
               <template v-if="column.key === 'well_common_name'">
@@ -263,7 +263,7 @@
                     </td>
                     <td colspan="2" rowspan="2">
                       <div style="height:25px">
-                        <ChartCell :timeType="('month')" :dataType="('water')" :wellId="item.well_id"></ChartCell>
+                        <ChartCell :timeType="('month')" :dataType="('vol')" :wellId="item.well_id"></ChartCell>
                       </div>
                     </td>
                   </tr>