Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

周壕 vor 10 Monaten
Ursprung
Commit
be7b3d5c51

+ 30 - 3
src/main/java/com/bowintek/practice/controller/WellInfoController.java

@@ -3,8 +3,8 @@ package com.bowintek.practice.controller;
 import com.alibaba.druid.support.logging.Log;
 import com.aspose.cells.License;
 import com.aspose.cells.PdfSaveOptions;
-import com.aspose.cells.SaveFormat;
 import com.aspose.cells.SaveOptions;
+import com.aspose.words.SaveFormat;
 import com.bowintek.practice.AppConfig;
 import com.bowintek.practice.filter.exception.BaseResponse;
 import com.bowintek.practice.filter.exception.RespGenerstor;
@@ -165,7 +165,34 @@ public class WellInfoController {
             os.close();
         }
     }
+    private byte[] doc2Docx(byte[] bytes) {
+        long old = System.currentTimeMillis();
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        try {
+            com.aspose.words.License aposeLic = new  com.aspose.words.License();
+            InputStream license = ClassLoader.getSystemClassLoader().getResourceAsStream("license.xml");
+            aposeLic.setLicense(license);
+
+            com.aspose.words.Document  wb = new  com.aspose.words.Document(new ByteArrayInputStream(bytes));
 
+            wb.save(outputStream, SaveFormat.DOCX);
+            bytes = outputStream.toByteArray();
+            outputStream.flush();
+            long now = System.currentTimeMillis();
+            log.info("共耗时:{}", ((now - old) / 1000.0));
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                } ;
+            }
+        }
+        return bytes;
+    }
     private byte[] xls2pdf(byte[] bytes) {
         long old = System.currentTimeMillis();
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
@@ -426,7 +453,7 @@ public class WellInfoController {
         newCell.setCellStyle(newCellStyle);
     }
 
-    private byte[] doc2Docx(byte[] bytes) throws IOException {
+   /* private byte[] doc2Docx(byte[] bytes) throws IOException {
         try {
             // 将doc文件的内容读取到XWPFDocument对象中
             InputStream fis = new ByteArrayInputStream(bytes);
@@ -451,5 +478,5 @@ public class WellInfoController {
             log.info("doc2Docx文件转换失败:" + ex.getMessage());
         }
         return bytes;
-    }
+    }*/
 }

+ 53 - 3
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -182,10 +182,60 @@
     </select>
 
     <select id="selectBoreholeInterList" resultType="java.util.HashMap">
-        select *
+        select
+            bi.interp_borehole_id,
+            bi.interp_id,
+            bi.well_id,
+            bi.wellbore_id,
+            bi.zone_id,
+            bi.zone_no,
+            bi.borehole_inter_type,
+            bi.start_depth,
+            bi.end_depth,
+            bi.thickness,
+            bi.lithology_class,
+            bi.spontaneous_potential,
+            bi.sp_gamma_radiant_intensity,
+            bi.well_diameter,
+            bi.formation_volume_density,
+            bi.sonic_differential_time,
+            bi.compensated_neutron,
+            bi.laterolog_shallow,
+            bi.laterolog_deep,
+            bi.laterolog_flushed_zone,
+            bi.density_porosity,
+            bi.sonic_porosity,
+            bi.neutron_porosity,
+            bi.effective_porosity,
+            bi.total_porosity,
+            bi.permeability,
+            bi.oil_gas_saturation,
+            bi.irreducible_water_saturation,
+            bi.shale_content,
+            bi.sandy_content,
+            bi.lime_content,
+            bi.dolomitic_content,
+            bi.carbonate_content,
+            bi.idx_type,
+            case when bi.interpretation_result like 'c%' then ''
+                 else bi.interpretation_result
+                end  interpretation_result,
+            bi.start_tvd,
+            bi.end_tvd,
+            bi.tvd_thickness,
+            bi.remarks,
+            TO_CHAR(bi.create_date , 'YYYY-MM-dd') create_date,
+            bi.create_user_id,
+            bi.create_app_id,
+            TO_CHAR(bi.update_date , 'YYYY-MM-dd') update_date,
+            bi.update_user_id,
+            bi.check_date,
+            bi.check_user_id,
+            bi.unify_task_id,
+            bi.source
         from by_dwr.fact_dwr_wl_ach_borehole_inter bi
-        where bi.well_id = #{well_id}
-        order by zone_no
+        where bi.well_id = 'HBe6JDZ9rt'
+        order by zone_no asc
     </select>
     <select id="selectTestHistoryList" resultType="java.util.HashMap">
         select *

+ 0 - 7
vue/src/views/wellinfo/table.ts

@@ -189,13 +189,6 @@ export const columns: TableColumnsType = [
     customRender: ({record}) =>
       record.oil_prod_begin_date == null ? "" : (dayjs(record.oil_prod_begin_date).format('YYYY-MM-DD'))
   },
-  {
-    title: '最近采油日期',
-    dataIndex: 'oil_prod_recent_date',
-    key: 'oil_prod_recent_date', width: 120, customHeaderCell: onHeaderCell,
-    customRender: ({record}) =>
-      record.oil_prod_recent_date == null ? "" : (dayjs(record.oil_prod_recent_date).format('YYYY-MM-DD'))
-  },
   {title: '状态', dataIndex: 'well_state', key: 'well_state', width: 120, customHeaderCell: onHeaderCell},
   {title: '设计井深(m)', dataIndex: 'budgeted_md', key: 'tempNo', width: 120, customHeaderCell: onHeaderCell},
   {