Ver Fonte

井史简介

xiaoqiao há 1 ano atrás
pai
commit
2cd686e90e

+ 5 - 0
src/main/java/com/bowintek/practice/controller/WellInfoController.java

@@ -81,4 +81,9 @@ public class WellInfoController {
     public BaseResponse getExpendSetting(String wellId) {
         return RespGenerstor.success(wellInfoService.getExpendSetting(wellId,accountService.getLoginUserID()));
     }
+    @GetMapping("/getWellDocumentList")
+    public BaseResponse getWellDocumentList(String wellId) {
+        List<HashMap<String, Object>> dataIndexList = wellInfoService.selectDataIndexList(wellId);
+        return RespGenerstor.success(dataIndexList);
+    }
 }

+ 1 - 0
src/main/java/com/bowintek/practice/vo/query/WellInfoParams.java

@@ -15,4 +15,5 @@ public class WellInfoParams {
     private String oil_prod_begin_date_end;
     private String oil_prod_recent_date_begin;
     private String oil_prod_recent_date_end;
+    private String org_id_a1;
 }

+ 39 - 13
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -3,23 +3,46 @@
 <mapper namespace="com.bowintek.practice.mapper.cquery.WellInfoCQuery">
 
     <select id="getWellInfo" resultType="java.util.HashMap">
-        select well.*,fact_daily.fluid_prod_daily,fact_daily.oil_prod_daily,fact_daily.water_cut,fact_daily.oil_prod_cum,
-               fact_intr.start_prod_date,fact_intr.prod_horizon,fact_intr.recent_testing_date,fact_intr.recent_testing_name,
-               fact_intr.construction_description,fact_intr.recent_prod_date,fact_intr.oil_nozzle,fact_intr.tubing_pres,
-               fact_intr.casing_pres,fact_intr.start_pump_liq_level
+        select well.*,
+               fact_daily.fluid_prod_daily,
+               fact_daily.oil_prod_daily,
+               fact_daily.water_cut,
+               fact_daily.oil_prod_cum,
+               fact_intr.start_prod_date,
+               fact_intr.prod_horizon,
+               fact_intr.recent_testing_date,
+               fact_intr.recent_testing_name,
+               fact_intr.construction_description,
+               fact_intr.recent_prod_date,
+               fact_intr.oil_nozzle,
+               fact_intr.tubing_pres,
+               fact_intr.casing_pres,
+               fact_intr.start_pump_liq_level,
+               str.well_production_sections,
+               str.t74_top_depth,
+               str.ko_azimuth,
+               str.ko_horizontal_dislocation,
+               str.azimuth_angle,
+               str.well_coordinates_x,
+               str.well_coordinates_y
         from public.well_basic_information well
+                 left join public.fact_dwr_well_structure str on well.well_id = str.well_id
                  left join (
-            select daily.* from public.fact_dwr_pc_pro_well_vol_d daily
-                                    inner join(
+            select daily.*
+            from public.fact_dwr_pc_pro_well_vol_d daily
+                     inner join(
                 select well_id, max(prod_time) prod_time from public.fact_dwr_pc_pro_well_vol_d group by well_id
-            ) maxdaily on daily.well_id=maxdaily.well_id and daily.prod_time=maxdaily.prod_time
-        )fact_daily on well.well_id= fact_daily.well_id
+            ) maxdaily on daily.well_id = maxdaily.well_id and daily.prod_time = maxdaily.prod_time
+        ) fact_daily on well.well_id = fact_daily.well_id
                  left join (
-            select intr.* from public.fact_dwr_well_history_introduction intr
-                                   inner join(
-                select well_id, max(start_prod_date) start_prod_date from public.fact_dwr_well_history_introduction group by well_id
-            ) maxintr on intr.well_id=maxintr.well_id and intr.start_prod_date=maxintr.start_prod_date
-        )fact_intr on well.well_id= fact_intr.well_id
+            select intr.*
+            from public.fact_dwr_well_history_introduction intr
+                     inner join(
+                select well_id, max(start_prod_date) start_prod_date
+                from public.fact_dwr_well_history_introduction
+                group by well_id
+            ) maxintr on intr.well_id = maxintr.well_id and intr.start_prod_date = maxintr.start_prod_date
+        ) fact_intr on well.well_id = fact_intr.well_id
         where well.well_id = #{well_id}
     </select>
     <select id="getWellInfoList" parameterType="com.bowintek.practice.vo.query.WellInfoParams"
@@ -76,6 +99,9 @@
             and fact_daily.oil_prod_recent_date  <![CDATA[ < ]]> (CAST(#{oil_prod_recent_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}
+        </if>
     </select>
     <select id="selectBoreholeInterList" resultType="java.util.HashMap">
         select *

BIN
vue/src/assets/images/file.png


+ 11 - 4
vue/src/views/wellinfo/detail.vue

@@ -61,11 +61,18 @@
           <a-descriptions-item label="井型:">{{ dataModel.well_type }}</a-descriptions-item>
           <a-descriptions-item label="开钻日期:">{{ dataModel.spud_date }}</a-descriptions-item>
           <a-descriptions-item label="完钻日期:">{{ dataModel.end_drilling_date }}</a-descriptions-item>
-          <a-descriptions-item label="设计井深:">{{ dataModel.budgeted_md }}</a-descriptions-item>
+          <a-descriptions-item label="设计井深:">{{ dataModel.budgeted_md }}m</a-descriptions-item>
           <a-descriptions-item label="完钻层位:">{{ dataModel.completion_formation }}</a-descriptions-item>
           <a-descriptions-item label="完井方式:">{{ dataModel.completion_method }}</a-descriptions-item>
+          <a-descriptions-item label="生产井段:">{{ dataModel.well_production_sections }}</a-descriptions-item>
+          <a-descriptions-item label="T₇⁴顶深:">{{ dataModel.t74_top_depth }}m</a-descriptions-item>
+          <a-descriptions-item label="造斜点:">{{ dataModel.ko_azimuth }}m</a-descriptions-item>
+          <a-descriptions-item label="水平位移:">{{ dataModel.ko_horizontal_dislocation }}m</a-descriptions-item>
+          <a-descriptions-item label="方位角:">{{ dataModel.azimuth_angle }}°</a-descriptions-item>
+          <a-descriptions-item label="井位坐标X:">{{ dataModel.well_coordinates_x }}</a-descriptions-item>
+          <a-descriptions-item label="井位坐标y:">{{ dataModel.well_coordinates_y }}</a-descriptions-item>
         </a-descriptions>
-        <a-divider type="vertical" class="info-title" dashed>井信息</a-divider>
+        <a-divider type="vertical" class="info-title" dashed>井A1信息</a-divider>
         <a-descriptions bordered>
           <a-descriptions-item label="采油厂机构:">{{ dataModel.org_name_a1 }}</a-descriptions-item>
           <a-descriptions-item label="单位名称:">{{ dataModel.org_name_a2 }}</a-descriptions-item>
@@ -293,7 +300,7 @@ export default defineComponent({
   margin-top: 10px;
 
   a {
-    color: #3a7be0;
+    color: #1890ff;
   }
 }
 
@@ -301,7 +308,7 @@ export default defineComponent({
   line-height: 30px;
 
   span {
-    color: #3a7be0
+    color: #1890ff;
   }
 }
 

+ 52 - 34
vue/src/views/wellinfo/index.vue

@@ -25,7 +25,7 @@
           v-model:selectedKeys="subjectTrees.selectedKeys"
           :replace-fields="replaceFields"
           :autoExpandParent="subjectTrees.autoExpandParent"
-          @expand="treeOnExpand">
+          @expand="treeOnExpand" @select="treeOnSelect">
           <template #title="{ label,value,children }">
                     <span v-if="label!=null&&label.indexOf(subjectTrees.searchStr) > -1">
                       {{ label.substr(0, label.indexOf(subjectTrees.searchStr)) }}
@@ -127,19 +127,7 @@
                 <a-button type="link" size="small" @click="detail(record.well_id)">{{ record.well_id }}</a-button>
               </template>
               <template v-if="column.key === 'operation'">
-                <a-popover trigger="hover" placement="left">
-                  <template #content>
-                    <a-button type="link" size="small">复制模板</a-button>
-                    <br/>
-                    <a-button type="link" size="small">查看详情</a-button>
-                    <br/>
-                    <a-popconfirm placement="leftTop"
-                                  title="是否删除数据?">
-                      <a-button type="link" size="small">删除</a-button>
-                    </a-popconfirm>
-                  </template>
-                  <a-button type="link" size="small">相关文档</a-button>
-                </a-popover>
+                <a-button type="link" size="small" @click="showDoc(record.well_id)">相关文档</a-button>
               </template>
             </template>
           </a-table>
@@ -149,9 +137,8 @@
             <a-col :span="8" v-for="item in data">
               <a-card :title="'井名:'+item.well_common_name" bodyStyle="padding: 10px;">
                 <template #extra>
-                  <a-button type="link">查看详情</a-button>
-                  |
-                  <a-button type="link">相关文档</a-button>
+                  <a-button type="link" @click="detail(item.well_id)">查看详情</a-button>
+                  <a-button type="link" @click="showDoc(item.well_id)">相关文档</a-button>
                 </template>
                 <table class="well-card-table">
                   <tr>
@@ -164,7 +151,7 @@
                     <th>开钻日期:</th>
                     <td>{{ item.spud_date }}</td>
                     <th>含水率:</th>
-                    <td :class="getTdColor( item.water_cut)">{{ item.water_cut }}</td>
+                    <td><span style="padding:2px 10px;" :class="getTdColor( item.water_cut)">{{ item.water_cut }}</span></td>
                   </tr>
                   <tr>
                     <th>开始采油日期:</th>
@@ -173,22 +160,22 @@
                     <td>{{ item.oil_prod_recent_date }}</td>
                   </tr>
                   <tr>
-                    <th>月产油量(t):</th>
-                    <td>{{ item.oil_prod_mon }}</td>
+                    <th>月产油量:</th>
+                    <td>{{ item.oil_prod_mon }}t</td>
                     <td colspan="2" rowspan="2"></td>
                   </tr>
                   <tr>
-                    <th>累产油量(t):</th>
-                    <td>{{ item.oil_prod_year }}</td>
+                    <th>累产油量:</th>
+                    <td>{{ item.oil_prod_year }}t</td>
                   </tr>
                   <tr>
-                    <th>月产气量(m³):</th>
-                    <td>{{ item.gas_prod_mon }}</td>
+                    <th>月产气量:</th>
+                    <td>{{ item.gas_prod_mon }}</td>
                     <td colspan="2" rowspan="2"></td>
                   </tr>
                   <tr>
-                    <th>累产气量(m³):</th>
-                    <td>{{ item.gas_prod_year }}</td>
+                    <th>累产气量:</th>
+                    <td>{{ item.gas_prod_year }}</td>
                   </tr>
                 </table>
               </a-card>
@@ -203,6 +190,26 @@
                       @showSizeChange="(current,pageSize)=>handleTableChange({ current: current,pageSize: pageSize })"/>
       </a-spin>
     </div>
+    <a-modal v-model:visible="isShowDoc" title="相关文档" :footer="null" @onCancel="isShowDoc=false">
+      <a-list item-layout="horizontal" :data-source="docList">
+        <template #renderItem="{ item }">
+          <a-list-item>
+            <template #actions>
+              <a style="color:#1890ff">下载</a>
+            </template>
+            <a-list-item-meta
+              :description="item.file_business_type">
+              <template #title>
+                <a href="https://www.antdv.com/">{{ item.file_name }}</a>
+              </template>
+              <template #avatar>
+                <img src="~@/assets/images/file.png"/>
+              </template>
+            </a-list-item-meta>
+          </a-list-item>
+        </template>
+      </a-list>
+    </a-modal>
   </div>
 </template>
 
@@ -229,9 +236,11 @@ export default defineComponent({
     const selectedRowKeys = ref([]);
     const activeTab = ref("1");
     const showTree = ref(true);
+    const isShowDoc = ref(false);
     const data = ref([{children: [], label: '', value: ''}]);
     const viewModel = ref("list");
     const tabsViewStore = useTabsViewStore();
+    const docList = ref([]);
     const wellTypeList = ref([{label: "直井", value: "直井"}, {label: "定向井", value: "定向井"}, {label: "分支井", value: "分支井"}]);
     const replaceFields = {
       children: 'children',
@@ -253,7 +262,8 @@ export default defineComponent({
       oil_prod_begin_date_begin: '',
       oil_prod_begin_date_end: '',
       oil_prod_recent_date_begin: '',
-      oil_prod_recent_date_end: ''
+      oil_prod_recent_date_end: '',
+      org_id_a1: ''
     });
     const columns: TableColumnsType = [
       {
@@ -266,6 +276,7 @@ export default defineComponent({
       },
       {title: '井号', dataIndex: 'well_id', key: 'well_id', width: 120},
       {title: '井名', dataIndex: 'well_common_name', key: 'well_common_name', width: 120},
+      {title: '采油厂机构', dataIndex: 'org_name_a1', key: 'org_name_a1', width: 120},
       {title: '井型', dataIndex: 'well_type', key: 'well_type', width: 120},
       {
         title: '开钻日期', dataIndex: 'spud_date', key: 'spud_date', width: 120, customRender: ({record}) =>
@@ -369,7 +380,6 @@ export default defineComponent({
       searchStr: ''
     });
     const getSubjectTree = async function () {
-      //loading.value = true;
       subjectTrees.value.data = await get('wellInfo/getOrganizationTree', {tabName: subjectTrees.value.searchStr});
       //计算第一个展开节点
       subjectTrees.value.expandedKeys = [];
@@ -424,18 +434,22 @@ export default defineComponent({
     }
     const treeOnSelect = function (selected, selectedNodes, node) {
       console.log(selected, selectedNodes, node);
-      if (selected && selectedNodes.node.parent != undefined) {
-      }
-      if (selectedNodes.node.parent == undefined) {
-        subjectTrees.value.expandedKeys = [selectedNodes.node.key];
-      }
+      formState.org_id_a1 = selected.length>0 ? selectedNodes.node.key : '';
+      loadData();
     }
+    const showDoc = (id) => {
+      get('wellInfo/getWellDocumentList', {wellId: id}).then(data => {
+        docList.value = data;
+        isShowDoc.value = true;
+      })
+    };
     const labelCol = {style: {width: '100px'}};
+
     return {
       route, selectedRowKeys, columns, loading, activeTab, showTree, onSelectChange, data,
       expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList, replaceFields,
       formRef, viewModel, handleTableChange, detail,
-      formState,
+      formState, isShowDoc, showDoc, docList,
       labelCol, getTdColor,
       tabChange,
       treeOnExpand,
@@ -487,6 +501,10 @@ export default defineComponent({
 .query-index-table {
   flex-grow: 1;
   display: flex;
+
+  .ant-row{
+    width:100%;
+  }
 }
 
 .query-index-tabs {