Browse Source

1.井史简介优化,2.更改组织表

da-xian 5 days ago
parent
commit
f61f61e263

+ 1 - 1
src/main/java/com/bowintek/smartsearch/services/impl/AnalyzeServiceImpl.java

@@ -65,7 +65,7 @@ public class AnalyzeServiceImpl implements AnalyzeService {
         addToMainDict(mapSymbols, "包含", "对比符号", "");
 
         //单位分词
-        addToMainDict(mapUnits, "", "单位", "");
+        addToMainDict(mapUnits, "t", "单位", "");
 
         //对象分词
         addToMainDict(mapObjects, "井", "对象", "");

+ 10 - 10
src/main/java/com/bowintek/smartsearch/services/impl/FactWellServiceImpl.java

@@ -302,45 +302,45 @@ public class FactWellServiceImpl implements FactWellService {
             list.forEach(item->{
                 item.setGas(item.getGas()/10000);
             });
-            units.add(new FactWellUnit("gas", "万立方米"));
+            units.add(new FactWellUnit("gas", "10^4m³"));
         }else{
-            units.add(new FactWellUnit("gas", "立方米"));
+            units.add(new FactWellUnit("gas", ""));
         }
 
         if(list.stream().filter(x->x.getOil()>10000).count() == listSize){
             list.forEach(item->{
                 item.setOil(item.getOil()/10000);
             });
-            units.add(new FactWellUnit("oil", "万吨"));
+            units.add(new FactWellUnit("oil", "10^4t"));
         }else{
-            units.add(new FactWellUnit("oil", ""));
+            units.add(new FactWellUnit("oil", "t"));
         }
 
         if(list.stream().filter(x->x.getWater()>10000).count() == listSize){
             list.forEach(item->{
                 item.setWater(item.getWater()/10000);
             });
-            units.add(new FactWellUnit("water", "万吨"));
+            units.add(new FactWellUnit("water", "10^4t"));
         }else{
-            units.add(new FactWellUnit("water", ""));
+            units.add(new FactWellUnit("water", "t"));
         }
 
         if(list.stream().filter(x->x.getFluid()>10000).count() == listSize){
             list.forEach(item->{
                 item.setFluid(item.getFluid()/10000);
             });
-            units.add(new FactWellUnit("fluid", "万吨"));
+            units.add(new FactWellUnit("fluid", "10^4t"));
         }else{
-            units.add(new FactWellUnit("fluid", ""));
+            units.add(new FactWellUnit("fluid", "t"));
         }
 
         if(list.stream().filter(x->x.getVol()>10000).count() == listSize){
             list.forEach(item->{
                 item.setOil(item.getVol()/10000);
             });
-            units.add(new FactWellUnit("vol", "万吨"));
+            units.add(new FactWellUnit("vol", "10^4t"));
         }else{
-            units.add(new FactWellUnit("vol", ""));
+            units.add(new FactWellUnit("vol", "t"));
         }
 
         units.add(new FactWellUnit("watercut", "%"));

+ 4 - 0
src/main/java/com/bowintek/smartsearch/services/impl/OrganizationServiceImpl.java

@@ -2,6 +2,8 @@ package com.bowintek.smartsearch.services.impl;
 
 import com.bowintek.smartsearch.mapper.cquery.CdOrganizationCQuery;
 import com.bowintek.smartsearch.services.service.OrganizationService;
+import com.bowintek.smartsearch.util.multipdb.DBTypeEnum;
+import com.bowintek.smartsearch.util.multipdb.SwitchDataSource;
 import com.bowintek.smartsearch.vo.cd.CdOrganizationTreeVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -21,7 +23,9 @@ public class OrganizationServiceImpl implements OrganizationService {
         return recursionListTree(sources, null);
     }
 
+
     @Override
+    @SwitchDataSource(DBTypeEnum.POSTGRE)
     public List<CdOrganizationTreeVo> getListTree(String parentValue){
         List<CdOrganizationTreeVo> sources = cdOrganizationCQuery.getListToTree();
         return recursionListTree(sources, parentValue);

+ 5 - 5
src/main/resources/mapping/cquery/CdOrganizationCQuery.xml

@@ -2,15 +2,15 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.bowintek.smartsearch.mapper.cquery.CdOrganizationCQuery">
     <select id="getListToTree" resultType="com.bowintek.smartsearch.vo.cd.CdOrganizationTreeVo">
-        SELECT org.org_id value, org.org_name label, org.parent_id parentValue
-        FROM cd_organization org
+        select a2_org_id value, new_org label, parent_id parentValue
+        from by_dwr.org_202409
     </select>
 
     <select id="getListByIdList" resultType="com.bowintek.smartsearch.vo.cd.CdOrganizationTreeVo">
-        SELECT org.org_id value, org.org_name label, org.parent_id parentValue
-        FROM cd_organization org
+        select a2_org_id value, new_org label, parent_id parentValue
+        from by_dwr.org_202409
         where 1=1
-        and org_id in
+        and a2_org_id in
         <foreach collection="idList" item="orgId" index="index" open="(" close=")" separator=",">
             #{orgId}
         </foreach>

+ 5 - 7
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -56,9 +56,7 @@
         well.end_drilling_date,
         well.budgeted_md,
         well.completion_formation,
-        well.completion_method,
-        well.org_id_a1,
-        well.org_id_a2,
+        well.completion_method, well.org_id_a2 as org_id_a1,
         well.org_name_a2,
         well.project_id,
         well.project_name,
@@ -85,7 +83,7 @@
         LEFT JOIN by_dwr.fact_dwr_pc_pro_well_vol_d_d fact_daily ON well.well_id = fact_daily.well_id
         LEFT JOIN by_dwr.fact_dwr_pc_pro_well_vol_m_m 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
-        LEFT JOIN by_dim.v_plant_site_station station ON well.org_id_a1 = station.ID
+        LEFT JOIN by_dim.v_plant_site_station station ON well.org_id_a2 = station.ID
         WHERE 1 = 1
         <if test="well_common_name!='' and well_common_name!=null">
             and well.well_common_name like Concat('%',#{well_common_name},'%')
@@ -126,13 +124,13 @@
             '1 day')
         </if>
         <if test="org_id_a1!='' and org_id_a1!=null">
-            and well.org_id_a1 =#{org_id_a1}
+            and well.org_id_a2 =#{org_id_a1}
         </if>
         <if test="project_id!='' and project_id!=null">
             and well.project_id =#{project_id}
         </if>
         <if test="orgList!=null and orgList.size>0">
-            and well.org_id_a1 in
+            and well.org_id_a2 in
             <foreach collection="orgList" item="orgId" index="index" open="(" close=")" separator=",">
                 #{orgId}
             </foreach>
@@ -177,7 +175,7 @@
             and well.completion_date  <![CDATA[ < ]]> (CAST(#{completion_date_end} AS DATE) + INTERVAL '1 day')
         </if>
         <if test="org_id_a1!='' and org_id_a1!=null">
-            and well.org_id_a1 =#{org_id_a1}
+            and well.org_id_a2 =#{org_id_a1}
         </if>
         <if test="project_id!='' and project_id!=null">
             and well.project_id =#{project_id}

+ 1 - 1
vue/src/components/basic/chart/chart-base.vue

@@ -43,7 +43,7 @@
         return props.lineColor? props.lineColor : '#0058D0';
       });
 
-      const units = {oil:'10kt', gas:'10^8m³',vol:'10kt'};
+      const units = {oil:' 10^4t', gas:' 10^8m³',vol:' 10^4t'};
 
       return{
         timeType,

+ 1 - 1
vue/src/components/basic/chart/chart-cell.vue

@@ -55,7 +55,7 @@ export default defineComponent({
       return props.lineColor ? props.lineColor : '#0058D0';
     });
 
-    const units = {oil: '10kt', gas: '10^8m³', vol: '10kt'};
+    const units = {oil: ' 10^4t', gas: ' 10^8m³', vol: ' 10^4t'};
 
     return {
       timeType,

+ 21 - 11
vue/src/components/basic/chart/chart-prod-dynamics.vue

@@ -53,7 +53,7 @@
     <div class="echarts-total">
       <span style="font-weight: bold;padding-right: 10px">统计区间:</span>
       <template v-for="(it) in getTotals()">
-        <span :style="{color: it.color, fontWeight: 'bold'}">{{it.name}}</span>&nbsp;:&nbsp;{{it.total!=null? parseFloat( it.total).toFixed(3):0}}({{it.unit}}) &nbsp;&nbsp;&nbsp;&nbsp;
+        <span :style="{color: it.color, fontWeight: 'bold'}">{{it.name}}</span>&nbsp;:&nbsp;{{it.total!=null? parseFloat( it.total).toFixed(3):0}}{{it.unit}} &nbsp;&nbsp;&nbsp;&nbsp;
       </template>
     </div>
     <div class="echart" :id="('chart-'+id)" :style="getChartStyle()"></div>
@@ -83,12 +83,12 @@
         height : 130,
         datas : [],
         timeList : [] as any,
-        typeOptions: [{label:'产油量', leiLabel:'累产油量', value:'oil', unit:'万吨', color: '#ec1e27'},
-                      {label:'产水量', leiLabel:'累产水量', value:'water', unit:'万吨', color: '#00B0F0'},
-                      {label:'产液量', leiLabel:'累产液量', value:'fluid', unit:'万吨', color: '#60080e'},
-                      {label:'产气量', leiLabel:'累产气量', value:'gas', unit:'立方米', color: '#ffc800'},
+        typeOptions: [{label:'产油量', leiLabel:'累产油量', value:'oil', unit:'10^4t', color: '#ec1e27'},
+                      {label:'产水量', leiLabel:'累产水量', value:'water', unit:'10^4t', color: '#00B0F0'},
+                      {label:'产液量', leiLabel:'累产液量', value:'fluid', unit:'10^4t', color: '#60080e'},
+                      {label:'产气量', leiLabel:'累产气量', value:'gas', unit:'', color: '#ffc800'},
                       {label:'含水率', leiLabel:'含水率', value:'watercut', unit:'%', color: '#322eda'},
-                      {label:'注水量', leiLabel:'累注水量', value:'vol', unit:'万吨', color: '#42f03e'}
+                      {label:'注水量', leiLabel:'累注水量', value:'vol', unit:'10^4t', color: '#42f03e'}
                     ] as any
       }
     },
@@ -260,7 +260,8 @@
             nameGap: 100,
             nameLocation:'center',
             type : 'value',
-            axisLabel: { formatter : '{value}'+this.getTypeUnit(showList[i].label)}};
+            // axisLabel: { formatter : '{value}'+"("+this.getTypeUnit(showList[i].label)+")"}
+          };
           yAxis.push(row);
         }
         console.log("getyAxis",yAxis);
@@ -272,8 +273,9 @@
         let yDatas = this.getyDatas();
         for(let i=0;i< showList.length;i++){
           let row = { xAxisIndex : this.getGridIndex(i), yAxisIndex: this.getGridIndex(i),
-            type : this.serieType, data: yDatas[i] ,
-            name : i<=1?showList[i].label: null,
+            type : this.serieType,
+            data: yDatas[i],
+            name : showList[i].label,//(i <= 1 ? showList[i].label : null),// +"("+this.getTypeUnit(showList[i].label)+")",
             itemStyle:{color: this.getTypeColor(showList[i].label)}
           };
           series.push(row);
@@ -281,6 +283,14 @@
         console.log("getSeries",series);
         return series;
       },
+      getFormatter:function (params){
+        let tooltipHtml = '<div><strong>' + params.seriesName + '</strong></div>';
+        // params.forEach(function (item) {
+          tooltipHtml += '<div><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + params.color + ';"></span>' + params.name + ': ' + params.value + '(' + this.getTypeUnit(params.seriesName) + ')</div>';
+        // });
+        return tooltipHtml;
+        console.log("getFormatter",params);
+      },
       getyAxisTitle:function (i, label){
         return i<=1?"产油量/产水量":label;
       },
@@ -303,7 +313,7 @@
           totals.push({
             name:showList[i].leiLabel,
             total : total,
-            unit : this.getTypeUnit(showList[i].label),
+            unit : "("+this.getTypeUnit(showList[i].label)+")",
             color: this.getTypeColor(showList[i].label)
           });
         }
@@ -312,7 +322,7 @@
       },
       readerChart: function () {
         const option = {
-          tooltip: { trigger: 'item', triggerOn:"mousemove",showContent:true },
+          tooltip: { trigger: 'item', triggerOn:"mousemove",showContent:true,  formatter: this.getFormatter},
           toolbox: { feature: { saveAsImage: {} } },
           grid: this.getGrids(),
           xAxis: this.getxAxis(),

+ 19 - 14
vue/src/views/wellinfo/detail.vue

@@ -1,6 +1,14 @@
 <template>
   <div id="wellInfoDetail">
     <a-layout>
+      <a-layout-sider>
+        <a-anchor wrapper-class="anchor" :target-offset="50"
+                  @click.prevent="handleClickAnchor"
+                  :get-container="getContainer">
+          <a-anchor-link v-for="(item, index) in steps"
+                         :href="item.id" :key="index" :title="item.title"/>
+        </a-anchor>
+      </a-layout-sider>
       <a-layout-content>
         <a-card id="jsjj" :bordered="false" :headStyle="cardSettings.cardHeadStyle" class="card-detail">
           <template #title>
@@ -14,12 +22,15 @@
             <DownSquareOutlined v-else @click="cardSettings.cardSummary.expand=true"
                                 :style="cardSettings.buttonStyle"/>
           </template>
-          <div v-if="cardSettings.cardSummary.expand" class="info-body">
-            <p>井名<span>{{ dataModel.well_common_name }}</span>,
-              井别<span>{{ dataModel.well_purpose }}</span>,
-              构造位置<span>{{dataModel.structure_pos}}</span>
+          <div v-if="cardSettings.cardSummary.expand" class="info-body" style="font-size: larger;">
+            <p>
+              井名<span>{{ dataModel.well_common_name }}</span>,
+              井别<span>{{ dataModel.well_purpose }}</span>
+            </p>
+            <p>
+              构造位置<span>{{dataModel.structure_pos}}</span>,
               <template v-if="dataModel.spud_date_fmt">
-                ,于<span>{{ dataModel.spud_date_fmt }}</span>开钻
+                于<span>{{ dataModel.spud_date_fmt }}</span>开钻
               </template>
               <template v-if="dataModel.end_drilling_date_fmt">
                 ,<span>{{ dataModel.end_drilling_date_fmt }}</span>完钻
@@ -52,7 +63,7 @@
               ,日产油量<span>{{ dataModel.oil_prod_daily ?? '--' }}</span>t/d
               ,含水<span>{{ dataModel.water_cut ?? '--' }}</span>%
               ,动液面<span>{{ dataModel.start_pump_liq_level ?? '--' }}</span>m
-              ,截止目前累产油<span>{{ dataModel.oil_prod_cum ?? '--' }}</span>
+              ,截止目前累产油<span>{{ dataModel.oil_prod_cum ?? '--' }}</span>t
             </p>
           </div>
         </a-card>
@@ -352,14 +363,6 @@
       </div>
     </a-card>
       </a-layout-content>
-      <a-layout-sider>
-        <a-anchor wrapper-class="anchor" :target-offset="50"
-                  @click.prevent="handleClickAnchor"
-                  :get-container="getContainer">
-          <a-anchor-link v-for="(item, index) in steps"
-                         :href="item.id" :key="index" :title="item.title"/>
-        </a-anchor>
-      </a-layout-sider>
     </a-layout>
   </div>
 </template>
@@ -693,6 +696,7 @@ export default defineComponent({
     .ant-card-head-title {
       font-weight: bold;
       color: #40a9ff;
+      font-size: larger;
     }
 
     .ant-card-head {
@@ -733,6 +737,7 @@ export default defineComponent({
 
     span {
       color: #1890ff;
+      font-weight: 600;
     }
   }