xiaoqiao 1 سال پیش
والد
کامیت
e5c2e53378

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

@@ -12,6 +12,10 @@ import java.util.ArrayList;
  */
 @Component
 public class AppConfig {
+
+    @Value("${appconfig.hdfshelperurl}")
+    public String hdfshelperurl;
+
     @Value("${appconfig.uploadfile-url}")
     public String uploadfileUrl;
 
@@ -64,6 +68,7 @@ public class AppConfig {
     @Value("${appconfig.oauthconfig.client_secret}")
     public String oauthconfig_client_secret;
 
+
     /**
      * @Description //TODO 静态文件路径
      * @Date 10:17 2019/10/9

+ 42 - 8
src/main/java/com/bowintek/practice/controller/WellInfoController.java

@@ -1,24 +1,28 @@
 package com.bowintek.practice.controller;
 
-import com.alibaba.fastjson.JSONObject;
+import com.bowintek.practice.AppConfig;
 import com.bowintek.practice.filter.exception.BaseResponse;
 import com.bowintek.practice.filter.exception.RespGenerstor;
-import com.bowintek.practice.model.WellBasicInformation;
 import com.bowintek.practice.model.WlUserExpendSetting;
 import com.bowintek.practice.services.service.AccountService;
 import com.bowintek.practice.services.service.OrganizationService;
 import com.bowintek.practice.services.service.WellInfoService;
-import com.bowintek.practice.vo.SubjectVo;
-import com.bowintek.practice.vo.SubjectfieldVo;
-import com.bowintek.practice.vo.cd.CdOrganizationTreeVo;
+import com.bowintek.practice.util.RemoteHelper;
 import com.bowintek.practice.vo.query.WellInfoParams;
 import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
+import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping(value = "/api/wellInfo")
@@ -30,6 +34,10 @@ public class WellInfoController {
     private OrganizationService organizationService;
     @Autowired
     private AccountService accountService;
+    @Autowired
+    private RemoteHelper remoteHelper;
+    @Autowired
+    private AppConfig appConfig;
 
     @ResponseBody
     @GetMapping("/getList")
@@ -44,7 +52,7 @@ public class WellInfoController {
     @ResponseBody
     @GetMapping("/getMapList")
     public BaseResponse<PageInfo<HashMap<String, Object>>> getMapList(@RequestParam("page") int page, @RequestParam("rows") int rows,
-                                                                   WellInfoParams params) throws Exception {
+                                                                      WellInfoParams params) throws Exception {
 
         PageInfo<HashMap<String, Object>> result = wellInfoService.getMapList(page, rows, params);
 
@@ -98,17 +106,43 @@ public class WellInfoController {
         }
         return RespGenerstor.success(count);
     }
+
     @GetMapping("/getExpendSetting")
     public BaseResponse getExpendSetting(String wellId) {
-        return RespGenerstor.success(wellInfoService.getExpendSetting(wellId,accountService.getLoginUserID()));
+        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);
     }
+
     @GetMapping("/getConstructUnitTree")
     public BaseResponse getConstructUnitTree() {
         return RespGenerstor.success(wellInfoService.getConstructUnitTree());
     }
+
+    @GetMapping("/downFile")
+    public void downFile(HttpServletResponse response, String well_id, String fileName) throws IOException {
+        Map<String, String> getParams = new HashMap<>();
+        getParams.put("path", "1");
+
+        String reData = remoteHelper.getJson(getParams, appConfig.hdfshelperurl + "read", "UTF-8");
+        byte[] bytes = Base64.getDecoder().decode(reData);
+        OutputStream os = response.getOutputStream();
+
+        response.setContentType("application/force-download");// 设置强制下载不打开
+        response.setContentType("multipart/form-data;charset=UTF-8");
+        response.setHeader("Content-Length", String.valueOf(bytes.length));
+        response.addHeader("Content-Disposition",
+                "attachment;fileName=" + URLEncoder.encode(fileName, "UTF-8"));// 设置文件名
+
+        //os.write(reData.getBytes(StandardCharsets.UTF_8));
+        os.write(Base64.getDecoder().decode(reData));
+        if (null != os) {
+            os.flush();
+            os.close();
+        }
+    }
 }

+ 0 - 30
src/main/java/com/bowintek/practice/mapper/WellBasicInformationMapper.java

@@ -1,30 +0,0 @@
-package com.bowintek.practice.mapper;
-
-import com.bowintek.practice.model.WellBasicInformation;
-import com.bowintek.practice.model.WellBasicInformationExample;
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface WellBasicInformationMapper {
-    long countByExample(WellBasicInformationExample example);
-
-    int deleteByExample(WellBasicInformationExample example);
-
-    int deleteByPrimaryKey(String well_id);
-
-    int insert(WellBasicInformation row);
-
-    int insertSelective(WellBasicInformation row);
-
-    List<WellBasicInformation> selectByExample(WellBasicInformationExample example);
-
-    WellBasicInformation selectByPrimaryKey(String well_id);
-
-    int updateByExampleSelective(@Param("row") WellBasicInformation row, @Param("example") WellBasicInformationExample example);
-
-    int updateByExample(@Param("row") WellBasicInformation row, @Param("example") WellBasicInformationExample example);
-
-    int updateByPrimaryKeySelective(WellBasicInformation row);
-
-    int updateByPrimaryKey(WellBasicInformation row);
-}

+ 0 - 396
src/main/java/com/bowintek/practice/model/WellBasicInformation.java

@@ -1,396 +0,0 @@
-package com.bowintek.practice.model;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-public class WellBasicInformation {
-    private String well_id;
-
-    private String well_common_name;
-
-    private String well_purpose;
-
-    private String well_type;
-
-    private Date spud_date;
-
-    private Date end_drilling_date;
-
-    private BigDecimal budgeted_md;
-
-    private String completion_formation;
-
-    private String completion_method;
-
-    private String org_name_a1;
-
-    private String org_name_a2;
-
-    private String well_legal_name;
-
-    private String geo_description;
-
-    private String structure_pos;
-
-    private Date create_date;
-
-    private Date completion_date;
-
-    private Date update_date;
-
-    private Date check_date;
-
-    private String phase;
-
-    private String wellbore_common_name;
-
-    private String target_formation;
-
-    private BigDecimal authorized_md;
-
-    private BigDecimal authorized_tvd;
-
-    private BigDecimal bh_md;
-
-    private BigDecimal bh_tvd;
-
-    private String geo_description_bh;
-
-    private BigDecimal ko_md;
-
-    private BigDecimal ko_tvd;
-
-    private String project_name;
-
-    private String project_type;
-
-    private String project_level;
-
-    private String remarks;
-
-    private String bz_basin;
-
-    private String bz_depression;
-
-    private String bz_depressed;
-
-    private String bz_structural_belt;
-
-    private String bz_qkdy;
-
-    private String bz_org_name;
-
-    private String bz_dwmc;
-
-    public String getWell_id() {
-        return well_id;
-    }
-
-    public void setWell_id(String well_id) {
-        this.well_id = well_id == null ? null : well_id.trim();
-    }
-
-    public String getWell_common_name() {
-        return well_common_name;
-    }
-
-    public void setWell_common_name(String well_common_name) {
-        this.well_common_name = well_common_name == null ? null : well_common_name.trim();
-    }
-
-    public String getWell_purpose() {
-        return well_purpose;
-    }
-
-    public void setWell_purpose(String well_purpose) {
-        this.well_purpose = well_purpose == null ? null : well_purpose.trim();
-    }
-
-    public String getWell_type() {
-        return well_type;
-    }
-
-    public void setWell_type(String well_type) {
-        this.well_type = well_type == null ? null : well_type.trim();
-    }
-
-    public Date getSpud_date() {
-        return spud_date;
-    }
-
-    public void setSpud_date(Date spud_date) {
-        this.spud_date = spud_date;
-    }
-
-    public Date getEnd_drilling_date() {
-        return end_drilling_date;
-    }
-
-    public void setEnd_drilling_date(Date end_drilling_date) {
-        this.end_drilling_date = end_drilling_date;
-    }
-
-    public BigDecimal getBudgeted_md() {
-        return budgeted_md;
-    }
-
-    public void setBudgeted_md(BigDecimal budgeted_md) {
-        this.budgeted_md = budgeted_md;
-    }
-
-    public String getCompletion_formation() {
-        return completion_formation;
-    }
-
-    public void setCompletion_formation(String completion_formation) {
-        this.completion_formation = completion_formation == null ? null : completion_formation.trim();
-    }
-
-    public String getCompletion_method() {
-        return completion_method;
-    }
-
-    public void setCompletion_method(String completion_method) {
-        this.completion_method = completion_method == null ? null : completion_method.trim();
-    }
-
-    public String getOrg_name_a1() {
-        return org_name_a1;
-    }
-
-    public void setOrg_name_a1(String org_name_a1) {
-        this.org_name_a1 = org_name_a1 == null ? null : org_name_a1.trim();
-    }
-
-    public String getOrg_name_a2() {
-        return org_name_a2;
-    }
-
-    public void setOrg_name_a2(String org_name_a2) {
-        this.org_name_a2 = org_name_a2 == null ? null : org_name_a2.trim();
-    }
-
-    public String getWell_legal_name() {
-        return well_legal_name;
-    }
-
-    public void setWell_legal_name(String well_legal_name) {
-        this.well_legal_name = well_legal_name == null ? null : well_legal_name.trim();
-    }
-
-    public String getGeo_description() {
-        return geo_description;
-    }
-
-    public void setGeo_description(String geo_description) {
-        this.geo_description = geo_description == null ? null : geo_description.trim();
-    }
-
-    public String getStructure_pos() {
-        return structure_pos;
-    }
-
-    public void setStructure_pos(String structure_pos) {
-        this.structure_pos = structure_pos == null ? null : structure_pos.trim();
-    }
-
-    public Date getCreate_date() {
-        return create_date;
-    }
-
-    public void setCreate_date(Date create_date) {
-        this.create_date = create_date;
-    }
-
-    public Date getCompletion_date() {
-        return completion_date;
-    }
-
-    public void setCompletion_date(Date completion_date) {
-        this.completion_date = completion_date;
-    }
-
-    public Date getUpdate_date() {
-        return update_date;
-    }
-
-    public void setUpdate_date(Date update_date) {
-        this.update_date = update_date;
-    }
-
-    public Date getCheck_date() {
-        return check_date;
-    }
-
-    public void setCheck_date(Date check_date) {
-        this.check_date = check_date;
-    }
-
-    public String getPhase() {
-        return phase;
-    }
-
-    public void setPhase(String phase) {
-        this.phase = phase == null ? null : phase.trim();
-    }
-
-    public String getWellbore_common_name() {
-        return wellbore_common_name;
-    }
-
-    public void setWellbore_common_name(String wellbore_common_name) {
-        this.wellbore_common_name = wellbore_common_name == null ? null : wellbore_common_name.trim();
-    }
-
-    public String getTarget_formation() {
-        return target_formation;
-    }
-
-    public void setTarget_formation(String target_formation) {
-        this.target_formation = target_formation == null ? null : target_formation.trim();
-    }
-
-    public BigDecimal getAuthorized_md() {
-        return authorized_md;
-    }
-
-    public void setAuthorized_md(BigDecimal authorized_md) {
-        this.authorized_md = authorized_md;
-    }
-
-    public BigDecimal getAuthorized_tvd() {
-        return authorized_tvd;
-    }
-
-    public void setAuthorized_tvd(BigDecimal authorized_tvd) {
-        this.authorized_tvd = authorized_tvd;
-    }
-
-    public BigDecimal getBh_md() {
-        return bh_md;
-    }
-
-    public void setBh_md(BigDecimal bh_md) {
-        this.bh_md = bh_md;
-    }
-
-    public BigDecimal getBh_tvd() {
-        return bh_tvd;
-    }
-
-    public void setBh_tvd(BigDecimal bh_tvd) {
-        this.bh_tvd = bh_tvd;
-    }
-
-    public String getGeo_description_bh() {
-        return geo_description_bh;
-    }
-
-    public void setGeo_description_bh(String geo_description_bh) {
-        this.geo_description_bh = geo_description_bh == null ? null : geo_description_bh.trim();
-    }
-
-    public BigDecimal getKo_md() {
-        return ko_md;
-    }
-
-    public void setKo_md(BigDecimal ko_md) {
-        this.ko_md = ko_md;
-    }
-
-    public BigDecimal getKo_tvd() {
-        return ko_tvd;
-    }
-
-    public void setKo_tvd(BigDecimal ko_tvd) {
-        this.ko_tvd = ko_tvd;
-    }
-
-    public String getProject_name() {
-        return project_name;
-    }
-
-    public void setProject_name(String project_name) {
-        this.project_name = project_name == null ? null : project_name.trim();
-    }
-
-    public String getProject_type() {
-        return project_type;
-    }
-
-    public void setProject_type(String project_type) {
-        this.project_type = project_type == null ? null : project_type.trim();
-    }
-
-    public String getProject_level() {
-        return project_level;
-    }
-
-    public void setProject_level(String project_level) {
-        this.project_level = project_level == null ? null : project_level.trim();
-    }
-
-    public String getRemarks() {
-        return remarks;
-    }
-
-    public void setRemarks(String remarks) {
-        this.remarks = remarks == null ? null : remarks.trim();
-    }
-
-    public String getBz_basin() {
-        return bz_basin;
-    }
-
-    public void setBz_basin(String bz_basin) {
-        this.bz_basin = bz_basin == null ? null : bz_basin.trim();
-    }
-
-    public String getBz_depression() {
-        return bz_depression;
-    }
-
-    public void setBz_depression(String bz_depression) {
-        this.bz_depression = bz_depression == null ? null : bz_depression.trim();
-    }
-
-    public String getBz_depressed() {
-        return bz_depressed;
-    }
-
-    public void setBz_depressed(String bz_depressed) {
-        this.bz_depressed = bz_depressed == null ? null : bz_depressed.trim();
-    }
-
-    public String getBz_structural_belt() {
-        return bz_structural_belt;
-    }
-
-    public void setBz_structural_belt(String bz_structural_belt) {
-        this.bz_structural_belt = bz_structural_belt == null ? null : bz_structural_belt.trim();
-    }
-
-    public String getBz_qkdy() {
-        return bz_qkdy;
-    }
-
-    public void setBz_qkdy(String bz_qkdy) {
-        this.bz_qkdy = bz_qkdy == null ? null : bz_qkdy.trim();
-    }
-
-    public String getBz_org_name() {
-        return bz_org_name;
-    }
-
-    public void setBz_org_name(String bz_org_name) {
-        this.bz_org_name = bz_org_name == null ? null : bz_org_name.trim();
-    }
-
-    public String getBz_dwmc() {
-        return bz_dwmc;
-    }
-
-    public void setBz_dwmc(String bz_dwmc) {
-        this.bz_dwmc = bz_dwmc == null ? null : bz_dwmc.trim();
-    }
-}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 2828
src/main/java/com/bowintek/practice/model/WellBasicInformationExample.java


+ 0 - 7
src/main/java/com/bowintek/practice/services/impl/WellInfoServiceImpl.java

@@ -1,17 +1,12 @@
 package com.bowintek.practice.services.impl;
 
-import com.bowintek.practice.mapper.SrSubjectMapper;
-import com.bowintek.practice.mapper.WellBasicInformationMapper;
 import com.bowintek.practice.mapper.WlUserExpendSettingMapper;
 import com.bowintek.practice.mapper.cquery.WellInfoCQuery;
-import com.bowintek.practice.model.WellBasicInformation;
-import com.bowintek.practice.model.WellBasicInformationExample;
 import com.bowintek.practice.model.WlUserExpendSetting;
 import com.bowintek.practice.model.WlUserExpendSettingExample;
 import com.bowintek.practice.services.service.WellInfoService;
 import com.bowintek.practice.util.multipdb.DBTypeEnum;
 import com.bowintek.practice.util.multipdb.SwitchDataSource;
-import com.bowintek.practice.vo.SubjectVo;
 import com.bowintek.practice.vo.query.WellInfoParams;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -27,8 +22,6 @@ import static com.bowintek.practice.util.Constant.FACT_CURRENT_STATE;
 @Component
 public class WellInfoServiceImpl implements WellInfoService {
 
-    @Autowired
-    private WellBasicInformationMapper wellBasicInformationMapper;
     @Autowired
     private WellInfoCQuery wellInfoCQuery;
     @Autowired

+ 0 - 1
src/main/java/com/bowintek/practice/services/service/WellInfoService.java

@@ -1,6 +1,5 @@
 package com.bowintek.practice.services.service;
 
-import com.bowintek.practice.model.WellBasicInformation;
 import com.bowintek.practice.model.WlUserExpendSetting;
 import com.bowintek.practice.vo.query.WellInfoParams;
 import com.github.pagehelper.PageInfo;

+ 1 - 1
src/main/resources/application.yml

@@ -144,4 +144,4 @@ appconfig:
     client_id: 2d4a5b3c-dc6c-4231-914c-ca1a4d3a134b
     client_secret: e2afdc026c4e745714d2f3b2a2e393686c11f66f
 
-
+  hdfshelperurl: http://10.73.178.206:8078/hdfshelper/

+ 0 - 751
src/main/resources/mapping/WellBasicInformationMapper.xml

@@ -1,751 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.bowintek.practice.mapper.WellBasicInformationMapper">
-  <resultMap id="BaseResultMap" type="com.bowintek.practice.model.WellBasicInformation">
-    <id column="well_id" jdbcType="VARCHAR" property="well_id" />
-    <result column="well_common_name" jdbcType="VARCHAR" property="well_common_name" />
-    <result column="well_purpose" jdbcType="VARCHAR" property="well_purpose" />
-    <result column="well_type" jdbcType="VARCHAR" property="well_type" />
-    <result column="spud_date" jdbcType="DATE" property="spud_date" />
-    <result column="end_drilling_date" jdbcType="DATE" property="end_drilling_date" />
-    <result column="budgeted_md" jdbcType="NUMERIC" property="budgeted_md" />
-    <result column="completion_formation" jdbcType="VARCHAR" property="completion_formation" />
-    <result column="completion_method" jdbcType="VARCHAR" property="completion_method" />
-    <result column="org_name_a1" jdbcType="VARCHAR" property="org_name_a1" />
-    <result column="org_name_a2" jdbcType="VARCHAR" property="org_name_a2" />
-    <result column="well_legal_name" jdbcType="VARCHAR" property="well_legal_name" />
-    <result column="geo_description" jdbcType="VARCHAR" property="geo_description" />
-    <result column="structure_pos" jdbcType="VARCHAR" property="structure_pos" />
-    <result column="create_date" jdbcType="DATE" property="create_date" />
-    <result column="completion_date" jdbcType="DATE" property="completion_date" />
-    <result column="update_date" jdbcType="DATE" property="update_date" />
-    <result column="check_date" jdbcType="DATE" property="check_date" />
-    <result column="phase" jdbcType="VARCHAR" property="phase" />
-    <result column="wellbore_common_name" jdbcType="VARCHAR" property="wellbore_common_name" />
-    <result column="target_formation" jdbcType="VARCHAR" property="target_formation" />
-    <result column="authorized_md" jdbcType="NUMERIC" property="authorized_md" />
-    <result column="authorized_tvd" jdbcType="NUMERIC" property="authorized_tvd" />
-    <result column="bh_md" jdbcType="NUMERIC" property="bh_md" />
-    <result column="bh_tvd" jdbcType="NUMERIC" property="bh_tvd" />
-    <result column="geo_description_bh" jdbcType="VARCHAR" property="geo_description_bh" />
-    <result column="ko_md" jdbcType="NUMERIC" property="ko_md" />
-    <result column="ko_tvd" jdbcType="NUMERIC" property="ko_tvd" />
-    <result column="project_name" jdbcType="VARCHAR" property="project_name" />
-    <result column="project_type" jdbcType="VARCHAR" property="project_type" />
-    <result column="project_level" jdbcType="VARCHAR" property="project_level" />
-    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
-    <result column="bz_basin" jdbcType="VARCHAR" property="bz_basin" />
-    <result column="bz_depression" jdbcType="VARCHAR" property="bz_depression" />
-    <result column="bz_depressed" jdbcType="VARCHAR" property="bz_depressed" />
-    <result column="bz_structural_belt" jdbcType="VARCHAR" property="bz_structural_belt" />
-    <result column="bz_qkdy" jdbcType="VARCHAR" property="bz_qkdy" />
-    <result column="bz_org_name" jdbcType="VARCHAR" property="bz_org_name" />
-    <result column="bz_dwmc" jdbcType="VARCHAR" property="bz_dwmc" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    well_id, well_common_name, well_purpose, well_type, spud_date, end_drilling_date, 
-    budgeted_md, completion_formation, completion_method, org_name_a1, org_name_a2, well_legal_name, 
-    geo_description, structure_pos, create_date, completion_date, update_date, check_date, 
-    phase, wellbore_common_name, target_formation, authorized_md, authorized_tvd, bh_md, 
-    bh_tvd, geo_description_bh, ko_md, ko_tvd, project_name, project_type, project_level, 
-    remarks, bz_basin, bz_depression, bz_depressed, bz_structural_belt, bz_qkdy, bz_org_name, 
-    bz_dwmc
-  </sql>
-  <select id="selectByExample" parameterType="com.bowintek.practice.model.WellBasicInformationExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from BY_DIM.well_basic_information
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from BY_DIM.well_basic_information
-    where well_id = #{well_id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    delete from BY_DIM.well_basic_information
-    where well_id = #{well_id,jdbcType=VARCHAR}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.bowintek.practice.model.WellBasicInformationExample">
-    delete from BY_DIM.well_basic_information
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.bowintek.practice.model.WellBasicInformation">
-    insert into BY_DIM.well_basic_information (well_id, well_common_name, well_purpose, 
-      well_type, spud_date, end_drilling_date, 
-      budgeted_md, completion_formation, completion_method, 
-      org_name_a1, org_name_a2, well_legal_name, 
-      geo_description, structure_pos, create_date, 
-      completion_date, update_date, check_date, 
-      phase, wellbore_common_name, target_formation, 
-      authorized_md, authorized_tvd, bh_md, 
-      bh_tvd, geo_description_bh, ko_md, 
-      ko_tvd, project_name, project_type, 
-      project_level, remarks, bz_basin, 
-      bz_depression, bz_depressed, bz_structural_belt, 
-      bz_qkdy, bz_org_name, bz_dwmc
-      )
-    values (#{well_id,jdbcType=VARCHAR}, #{well_common_name,jdbcType=VARCHAR}, #{well_purpose,jdbcType=VARCHAR}, 
-      #{well_type,jdbcType=VARCHAR}, #{spud_date,jdbcType=DATE}, #{end_drilling_date,jdbcType=DATE}, 
-      #{budgeted_md,jdbcType=NUMERIC}, #{completion_formation,jdbcType=VARCHAR}, #{completion_method,jdbcType=VARCHAR}, 
-      #{org_name_a1,jdbcType=VARCHAR}, #{org_name_a2,jdbcType=VARCHAR}, #{well_legal_name,jdbcType=VARCHAR}, 
-      #{geo_description,jdbcType=VARCHAR}, #{structure_pos,jdbcType=VARCHAR}, #{create_date,jdbcType=DATE}, 
-      #{completion_date,jdbcType=DATE}, #{update_date,jdbcType=DATE}, #{check_date,jdbcType=DATE}, 
-      #{phase,jdbcType=VARCHAR}, #{wellbore_common_name,jdbcType=VARCHAR}, #{target_formation,jdbcType=VARCHAR}, 
-      #{authorized_md,jdbcType=NUMERIC}, #{authorized_tvd,jdbcType=NUMERIC}, #{bh_md,jdbcType=NUMERIC}, 
-      #{bh_tvd,jdbcType=NUMERIC}, #{geo_description_bh,jdbcType=VARCHAR}, #{ko_md,jdbcType=NUMERIC}, 
-      #{ko_tvd,jdbcType=NUMERIC}, #{project_name,jdbcType=VARCHAR}, #{project_type,jdbcType=VARCHAR}, 
-      #{project_level,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{bz_basin,jdbcType=VARCHAR}, 
-      #{bz_depression,jdbcType=VARCHAR}, #{bz_depressed,jdbcType=VARCHAR}, #{bz_structural_belt,jdbcType=VARCHAR}, 
-      #{bz_qkdy,jdbcType=VARCHAR}, #{bz_org_name,jdbcType=VARCHAR}, #{bz_dwmc,jdbcType=VARCHAR}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.bowintek.practice.model.WellBasicInformation">
-    insert into BY_DIM.well_basic_information
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="well_id != null">
-        well_id,
-      </if>
-      <if test="well_common_name != null">
-        well_common_name,
-      </if>
-      <if test="well_purpose != null">
-        well_purpose,
-      </if>
-      <if test="well_type != null">
-        well_type,
-      </if>
-      <if test="spud_date != null">
-        spud_date,
-      </if>
-      <if test="end_drilling_date != null">
-        end_drilling_date,
-      </if>
-      <if test="budgeted_md != null">
-        budgeted_md,
-      </if>
-      <if test="completion_formation != null">
-        completion_formation,
-      </if>
-      <if test="completion_method != null">
-        completion_method,
-      </if>
-      <if test="org_name_a1 != null">
-        org_name_a1,
-      </if>
-      <if test="org_name_a2 != null">
-        org_name_a2,
-      </if>
-      <if test="well_legal_name != null">
-        well_legal_name,
-      </if>
-      <if test="geo_description != null">
-        geo_description,
-      </if>
-      <if test="structure_pos != null">
-        structure_pos,
-      </if>
-      <if test="create_date != null">
-        create_date,
-      </if>
-      <if test="completion_date != null">
-        completion_date,
-      </if>
-      <if test="update_date != null">
-        update_date,
-      </if>
-      <if test="check_date != null">
-        check_date,
-      </if>
-      <if test="phase != null">
-        phase,
-      </if>
-      <if test="wellbore_common_name != null">
-        wellbore_common_name,
-      </if>
-      <if test="target_formation != null">
-        target_formation,
-      </if>
-      <if test="authorized_md != null">
-        authorized_md,
-      </if>
-      <if test="authorized_tvd != null">
-        authorized_tvd,
-      </if>
-      <if test="bh_md != null">
-        bh_md,
-      </if>
-      <if test="bh_tvd != null">
-        bh_tvd,
-      </if>
-      <if test="geo_description_bh != null">
-        geo_description_bh,
-      </if>
-      <if test="ko_md != null">
-        ko_md,
-      </if>
-      <if test="ko_tvd != null">
-        ko_tvd,
-      </if>
-      <if test="project_name != null">
-        project_name,
-      </if>
-      <if test="project_type != null">
-        project_type,
-      </if>
-      <if test="project_level != null">
-        project_level,
-      </if>
-      <if test="remarks != null">
-        remarks,
-      </if>
-      <if test="bz_basin != null">
-        bz_basin,
-      </if>
-      <if test="bz_depression != null">
-        bz_depression,
-      </if>
-      <if test="bz_depressed != null">
-        bz_depressed,
-      </if>
-      <if test="bz_structural_belt != null">
-        bz_structural_belt,
-      </if>
-      <if test="bz_qkdy != null">
-        bz_qkdy,
-      </if>
-      <if test="bz_org_name != null">
-        bz_org_name,
-      </if>
-      <if test="bz_dwmc != null">
-        bz_dwmc,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="well_id != null">
-        #{well_id,jdbcType=VARCHAR},
-      </if>
-      <if test="well_common_name != null">
-        #{well_common_name,jdbcType=VARCHAR},
-      </if>
-      <if test="well_purpose != null">
-        #{well_purpose,jdbcType=VARCHAR},
-      </if>
-      <if test="well_type != null">
-        #{well_type,jdbcType=VARCHAR},
-      </if>
-      <if test="spud_date != null">
-        #{spud_date,jdbcType=DATE},
-      </if>
-      <if test="end_drilling_date != null">
-        #{end_drilling_date,jdbcType=DATE},
-      </if>
-      <if test="budgeted_md != null">
-        #{budgeted_md,jdbcType=NUMERIC},
-      </if>
-      <if test="completion_formation != null">
-        #{completion_formation,jdbcType=VARCHAR},
-      </if>
-      <if test="completion_method != null">
-        #{completion_method,jdbcType=VARCHAR},
-      </if>
-      <if test="org_name_a1 != null">
-        #{org_name_a1,jdbcType=VARCHAR},
-      </if>
-      <if test="org_name_a2 != null">
-        #{org_name_a2,jdbcType=VARCHAR},
-      </if>
-      <if test="well_legal_name != null">
-        #{well_legal_name,jdbcType=VARCHAR},
-      </if>
-      <if test="geo_description != null">
-        #{geo_description,jdbcType=VARCHAR},
-      </if>
-      <if test="structure_pos != null">
-        #{structure_pos,jdbcType=VARCHAR},
-      </if>
-      <if test="create_date != null">
-        #{create_date,jdbcType=DATE},
-      </if>
-      <if test="completion_date != null">
-        #{completion_date,jdbcType=DATE},
-      </if>
-      <if test="update_date != null">
-        #{update_date,jdbcType=DATE},
-      </if>
-      <if test="check_date != null">
-        #{check_date,jdbcType=DATE},
-      </if>
-      <if test="phase != null">
-        #{phase,jdbcType=VARCHAR},
-      </if>
-      <if test="wellbore_common_name != null">
-        #{wellbore_common_name,jdbcType=VARCHAR},
-      </if>
-      <if test="target_formation != null">
-        #{target_formation,jdbcType=VARCHAR},
-      </if>
-      <if test="authorized_md != null">
-        #{authorized_md,jdbcType=NUMERIC},
-      </if>
-      <if test="authorized_tvd != null">
-        #{authorized_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="bh_md != null">
-        #{bh_md,jdbcType=NUMERIC},
-      </if>
-      <if test="bh_tvd != null">
-        #{bh_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="geo_description_bh != null">
-        #{geo_description_bh,jdbcType=VARCHAR},
-      </if>
-      <if test="ko_md != null">
-        #{ko_md,jdbcType=NUMERIC},
-      </if>
-      <if test="ko_tvd != null">
-        #{ko_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="project_name != null">
-        #{project_name,jdbcType=VARCHAR},
-      </if>
-      <if test="project_type != null">
-        #{project_type,jdbcType=VARCHAR},
-      </if>
-      <if test="project_level != null">
-        #{project_level,jdbcType=VARCHAR},
-      </if>
-      <if test="remarks != null">
-        #{remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_basin != null">
-        #{bz_basin,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_depression != null">
-        #{bz_depression,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_depressed != null">
-        #{bz_depressed,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_structural_belt != null">
-        #{bz_structural_belt,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_qkdy != null">
-        #{bz_qkdy,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_org_name != null">
-        #{bz_org_name,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_dwmc != null">
-        #{bz_dwmc,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.bowintek.practice.model.WellBasicInformationExample" resultType="java.lang.Long">
-    select count(*) from BY_DIM.well_basic_information
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update BY_DIM.well_basic_information
-    <set>
-      <if test="row.well_id != null">
-        well_id = #{row.well_id,jdbcType=VARCHAR},
-      </if>
-      <if test="row.well_common_name != null">
-        well_common_name = #{row.well_common_name,jdbcType=VARCHAR},
-      </if>
-      <if test="row.well_purpose != null">
-        well_purpose = #{row.well_purpose,jdbcType=VARCHAR},
-      </if>
-      <if test="row.well_type != null">
-        well_type = #{row.well_type,jdbcType=VARCHAR},
-      </if>
-      <if test="row.spud_date != null">
-        spud_date = #{row.spud_date,jdbcType=DATE},
-      </if>
-      <if test="row.end_drilling_date != null">
-        end_drilling_date = #{row.end_drilling_date,jdbcType=DATE},
-      </if>
-      <if test="row.budgeted_md != null">
-        budgeted_md = #{row.budgeted_md,jdbcType=NUMERIC},
-      </if>
-      <if test="row.completion_formation != null">
-        completion_formation = #{row.completion_formation,jdbcType=VARCHAR},
-      </if>
-      <if test="row.completion_method != null">
-        completion_method = #{row.completion_method,jdbcType=VARCHAR},
-      </if>
-      <if test="row.org_name_a1 != null">
-        org_name_a1 = #{row.org_name_a1,jdbcType=VARCHAR},
-      </if>
-      <if test="row.org_name_a2 != null">
-        org_name_a2 = #{row.org_name_a2,jdbcType=VARCHAR},
-      </if>
-      <if test="row.well_legal_name != null">
-        well_legal_name = #{row.well_legal_name,jdbcType=VARCHAR},
-      </if>
-      <if test="row.geo_description != null">
-        geo_description = #{row.geo_description,jdbcType=VARCHAR},
-      </if>
-      <if test="row.structure_pos != null">
-        structure_pos = #{row.structure_pos,jdbcType=VARCHAR},
-      </if>
-      <if test="row.create_date != null">
-        create_date = #{row.create_date,jdbcType=DATE},
-      </if>
-      <if test="row.completion_date != null">
-        completion_date = #{row.completion_date,jdbcType=DATE},
-      </if>
-      <if test="row.update_date != null">
-        update_date = #{row.update_date,jdbcType=DATE},
-      </if>
-      <if test="row.check_date != null">
-        check_date = #{row.check_date,jdbcType=DATE},
-      </if>
-      <if test="row.phase != null">
-        phase = #{row.phase,jdbcType=VARCHAR},
-      </if>
-      <if test="row.wellbore_common_name != null">
-        wellbore_common_name = #{row.wellbore_common_name,jdbcType=VARCHAR},
-      </if>
-      <if test="row.target_formation != null">
-        target_formation = #{row.target_formation,jdbcType=VARCHAR},
-      </if>
-      <if test="row.authorized_md != null">
-        authorized_md = #{row.authorized_md,jdbcType=NUMERIC},
-      </if>
-      <if test="row.authorized_tvd != null">
-        authorized_tvd = #{row.authorized_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="row.bh_md != null">
-        bh_md = #{row.bh_md,jdbcType=NUMERIC},
-      </if>
-      <if test="row.bh_tvd != null">
-        bh_tvd = #{row.bh_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="row.geo_description_bh != null">
-        geo_description_bh = #{row.geo_description_bh,jdbcType=VARCHAR},
-      </if>
-      <if test="row.ko_md != null">
-        ko_md = #{row.ko_md,jdbcType=NUMERIC},
-      </if>
-      <if test="row.ko_tvd != null">
-        ko_tvd = #{row.ko_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="row.project_name != null">
-        project_name = #{row.project_name,jdbcType=VARCHAR},
-      </if>
-      <if test="row.project_type != null">
-        project_type = #{row.project_type,jdbcType=VARCHAR},
-      </if>
-      <if test="row.project_level != null">
-        project_level = #{row.project_level,jdbcType=VARCHAR},
-      </if>
-      <if test="row.remarks != null">
-        remarks = #{row.remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_basin != null">
-        bz_basin = #{row.bz_basin,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_depression != null">
-        bz_depression = #{row.bz_depression,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_depressed != null">
-        bz_depressed = #{row.bz_depressed,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_structural_belt != null">
-        bz_structural_belt = #{row.bz_structural_belt,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_qkdy != null">
-        bz_qkdy = #{row.bz_qkdy,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_org_name != null">
-        bz_org_name = #{row.bz_org_name,jdbcType=VARCHAR},
-      </if>
-      <if test="row.bz_dwmc != null">
-        bz_dwmc = #{row.bz_dwmc,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="example != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update BY_DIM.well_basic_information
-    set well_id = #{row.well_id,jdbcType=VARCHAR},
-      well_common_name = #{row.well_common_name,jdbcType=VARCHAR},
-      well_purpose = #{row.well_purpose,jdbcType=VARCHAR},
-      well_type = #{row.well_type,jdbcType=VARCHAR},
-      spud_date = #{row.spud_date,jdbcType=DATE},
-      end_drilling_date = #{row.end_drilling_date,jdbcType=DATE},
-      budgeted_md = #{row.budgeted_md,jdbcType=NUMERIC},
-      completion_formation = #{row.completion_formation,jdbcType=VARCHAR},
-      completion_method = #{row.completion_method,jdbcType=VARCHAR},
-      org_name_a1 = #{row.org_name_a1,jdbcType=VARCHAR},
-      org_name_a2 = #{row.org_name_a2,jdbcType=VARCHAR},
-      well_legal_name = #{row.well_legal_name,jdbcType=VARCHAR},
-      geo_description = #{row.geo_description,jdbcType=VARCHAR},
-      structure_pos = #{row.structure_pos,jdbcType=VARCHAR},
-      create_date = #{row.create_date,jdbcType=DATE},
-      completion_date = #{row.completion_date,jdbcType=DATE},
-      update_date = #{row.update_date,jdbcType=DATE},
-      check_date = #{row.check_date,jdbcType=DATE},
-      phase = #{row.phase,jdbcType=VARCHAR},
-      wellbore_common_name = #{row.wellbore_common_name,jdbcType=VARCHAR},
-      target_formation = #{row.target_formation,jdbcType=VARCHAR},
-      authorized_md = #{row.authorized_md,jdbcType=NUMERIC},
-      authorized_tvd = #{row.authorized_tvd,jdbcType=NUMERIC},
-      bh_md = #{row.bh_md,jdbcType=NUMERIC},
-      bh_tvd = #{row.bh_tvd,jdbcType=NUMERIC},
-      geo_description_bh = #{row.geo_description_bh,jdbcType=VARCHAR},
-      ko_md = #{row.ko_md,jdbcType=NUMERIC},
-      ko_tvd = #{row.ko_tvd,jdbcType=NUMERIC},
-      project_name = #{row.project_name,jdbcType=VARCHAR},
-      project_type = #{row.project_type,jdbcType=VARCHAR},
-      project_level = #{row.project_level,jdbcType=VARCHAR},
-      remarks = #{row.remarks,jdbcType=VARCHAR},
-      bz_basin = #{row.bz_basin,jdbcType=VARCHAR},
-      bz_depression = #{row.bz_depression,jdbcType=VARCHAR},
-      bz_depressed = #{row.bz_depressed,jdbcType=VARCHAR},
-      bz_structural_belt = #{row.bz_structural_belt,jdbcType=VARCHAR},
-      bz_qkdy = #{row.bz_qkdy,jdbcType=VARCHAR},
-      bz_org_name = #{row.bz_org_name,jdbcType=VARCHAR},
-      bz_dwmc = #{row.bz_dwmc,jdbcType=VARCHAR}
-    <if test="example != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.practice.model.WellBasicInformation">
-    update BY_DIM.well_basic_information
-    <set>
-      <if test="well_common_name != null">
-        well_common_name = #{well_common_name,jdbcType=VARCHAR},
-      </if>
-      <if test="well_purpose != null">
-        well_purpose = #{well_purpose,jdbcType=VARCHAR},
-      </if>
-      <if test="well_type != null">
-        well_type = #{well_type,jdbcType=VARCHAR},
-      </if>
-      <if test="spud_date != null">
-        spud_date = #{spud_date,jdbcType=DATE},
-      </if>
-      <if test="end_drilling_date != null">
-        end_drilling_date = #{end_drilling_date,jdbcType=DATE},
-      </if>
-      <if test="budgeted_md != null">
-        budgeted_md = #{budgeted_md,jdbcType=NUMERIC},
-      </if>
-      <if test="completion_formation != null">
-        completion_formation = #{completion_formation,jdbcType=VARCHAR},
-      </if>
-      <if test="completion_method != null">
-        completion_method = #{completion_method,jdbcType=VARCHAR},
-      </if>
-      <if test="org_name_a1 != null">
-        org_name_a1 = #{org_name_a1,jdbcType=VARCHAR},
-      </if>
-      <if test="org_name_a2 != null">
-        org_name_a2 = #{org_name_a2,jdbcType=VARCHAR},
-      </if>
-      <if test="well_legal_name != null">
-        well_legal_name = #{well_legal_name,jdbcType=VARCHAR},
-      </if>
-      <if test="geo_description != null">
-        geo_description = #{geo_description,jdbcType=VARCHAR},
-      </if>
-      <if test="structure_pos != null">
-        structure_pos = #{structure_pos,jdbcType=VARCHAR},
-      </if>
-      <if test="create_date != null">
-        create_date = #{create_date,jdbcType=DATE},
-      </if>
-      <if test="completion_date != null">
-        completion_date = #{completion_date,jdbcType=DATE},
-      </if>
-      <if test="update_date != null">
-        update_date = #{update_date,jdbcType=DATE},
-      </if>
-      <if test="check_date != null">
-        check_date = #{check_date,jdbcType=DATE},
-      </if>
-      <if test="phase != null">
-        phase = #{phase,jdbcType=VARCHAR},
-      </if>
-      <if test="wellbore_common_name != null">
-        wellbore_common_name = #{wellbore_common_name,jdbcType=VARCHAR},
-      </if>
-      <if test="target_formation != null">
-        target_formation = #{target_formation,jdbcType=VARCHAR},
-      </if>
-      <if test="authorized_md != null">
-        authorized_md = #{authorized_md,jdbcType=NUMERIC},
-      </if>
-      <if test="authorized_tvd != null">
-        authorized_tvd = #{authorized_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="bh_md != null">
-        bh_md = #{bh_md,jdbcType=NUMERIC},
-      </if>
-      <if test="bh_tvd != null">
-        bh_tvd = #{bh_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="geo_description_bh != null">
-        geo_description_bh = #{geo_description_bh,jdbcType=VARCHAR},
-      </if>
-      <if test="ko_md != null">
-        ko_md = #{ko_md,jdbcType=NUMERIC},
-      </if>
-      <if test="ko_tvd != null">
-        ko_tvd = #{ko_tvd,jdbcType=NUMERIC},
-      </if>
-      <if test="project_name != null">
-        project_name = #{project_name,jdbcType=VARCHAR},
-      </if>
-      <if test="project_type != null">
-        project_type = #{project_type,jdbcType=VARCHAR},
-      </if>
-      <if test="project_level != null">
-        project_level = #{project_level,jdbcType=VARCHAR},
-      </if>
-      <if test="remarks != null">
-        remarks = #{remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_basin != null">
-        bz_basin = #{bz_basin,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_depression != null">
-        bz_depression = #{bz_depression,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_depressed != null">
-        bz_depressed = #{bz_depressed,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_structural_belt != null">
-        bz_structural_belt = #{bz_structural_belt,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_qkdy != null">
-        bz_qkdy = #{bz_qkdy,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_org_name != null">
-        bz_org_name = #{bz_org_name,jdbcType=VARCHAR},
-      </if>
-      <if test="bz_dwmc != null">
-        bz_dwmc = #{bz_dwmc,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where well_id = #{well_id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.bowintek.practice.model.WellBasicInformation">
-    update BY_DIM.well_basic_information
-    set well_common_name = #{well_common_name,jdbcType=VARCHAR},
-      well_purpose = #{well_purpose,jdbcType=VARCHAR},
-      well_type = #{well_type,jdbcType=VARCHAR},
-      spud_date = #{spud_date,jdbcType=DATE},
-      end_drilling_date = #{end_drilling_date,jdbcType=DATE},
-      budgeted_md = #{budgeted_md,jdbcType=NUMERIC},
-      completion_formation = #{completion_formation,jdbcType=VARCHAR},
-      completion_method = #{completion_method,jdbcType=VARCHAR},
-      org_name_a1 = #{org_name_a1,jdbcType=VARCHAR},
-      org_name_a2 = #{org_name_a2,jdbcType=VARCHAR},
-      well_legal_name = #{well_legal_name,jdbcType=VARCHAR},
-      geo_description = #{geo_description,jdbcType=VARCHAR},
-      structure_pos = #{structure_pos,jdbcType=VARCHAR},
-      create_date = #{create_date,jdbcType=DATE},
-      completion_date = #{completion_date,jdbcType=DATE},
-      update_date = #{update_date,jdbcType=DATE},
-      check_date = #{check_date,jdbcType=DATE},
-      phase = #{phase,jdbcType=VARCHAR},
-      wellbore_common_name = #{wellbore_common_name,jdbcType=VARCHAR},
-      target_formation = #{target_formation,jdbcType=VARCHAR},
-      authorized_md = #{authorized_md,jdbcType=NUMERIC},
-      authorized_tvd = #{authorized_tvd,jdbcType=NUMERIC},
-      bh_md = #{bh_md,jdbcType=NUMERIC},
-      bh_tvd = #{bh_tvd,jdbcType=NUMERIC},
-      geo_description_bh = #{geo_description_bh,jdbcType=VARCHAR},
-      ko_md = #{ko_md,jdbcType=NUMERIC},
-      ko_tvd = #{ko_tvd,jdbcType=NUMERIC},
-      project_name = #{project_name,jdbcType=VARCHAR},
-      project_type = #{project_type,jdbcType=VARCHAR},
-      project_level = #{project_level,jdbcType=VARCHAR},
-      remarks = #{remarks,jdbcType=VARCHAR},
-      bz_basin = #{bz_basin,jdbcType=VARCHAR},
-      bz_depression = #{bz_depression,jdbcType=VARCHAR},
-      bz_depressed = #{bz_depressed,jdbcType=VARCHAR},
-      bz_structural_belt = #{bz_structural_belt,jdbcType=VARCHAR},
-      bz_qkdy = #{bz_qkdy,jdbcType=VARCHAR},
-      bz_org_name = #{bz_org_name,jdbcType=VARCHAR},
-      bz_dwmc = #{bz_dwmc,jdbcType=VARCHAR}
-    where well_id = #{well_id,jdbcType=VARCHAR}
-  </update>
-</mapper>

+ 25 - 25
src/main/resources/mapping/cquery/FactWellCQuery.xml

@@ -10,15 +10,15 @@
                 SUM(t.water_prod_daily) water,
                 SUM(t.water_cut) watercut
         FROM (  SELECT  wd.well_id,
-                        to_char(wd.prod_time, 'YYYY-MM-DD') prod_time_str,
-                        coalesce(wd.gas_prod_daily, 0)      gas_prod_daily,
-                        coalesce(wd.oil_prod_daily, 0)      oil_prod_daily,
-                        coalesce(wd.fluid_prod_daily, 0)      fluid_prod_daily,
-                        coalesce(wd.water_prod_daily, 0)      water_prod_daily,
-                        coalesce(wd.water_cut, 0)      water_cut
-                FROM BY_DIM.fact_dwr_pc_pro_well_vol_d wd
-                WHERE wd.prod_time <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
-                    and wd.prod_time <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
+                        TO_CHAR(wd.prod_date , 'YYYY-MM-dd') prod_time_str,
+                        COALESCE(wd.gas_prod_daily, 0)      gas_prod_daily,
+                        COALESCE(wd.oil_prod_daily, 0)      oil_prod_daily,
+                        COALESCE(wd.fluid_prod_daily, 0)      fluid_prod_daily,
+                        COALESCE(wd.water_prod_daily, 0)      water_prod_daily,
+                        COALESCE(wd.water_cut, 0)      water_cut
+                FROM by_dwr.fact_dwr_pc_pro_well_vol_d wd
+                WHERE wd.prod_date <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
+                    and wd.prod_date <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
         <if test="wellId!='' and wellId!=null">
             and wd.well_id=#{wellId}
         </if>
@@ -35,14 +35,14 @@
             SUM(t.fluid_prod_mon) fluid,
             0 watercut
         FROM (  SELECT wm.well_id,
-                    to_char(wm.prod_time, 'YYYY年MM月') prod_time_str,
-                    coalesce(wm.gas_prod_mon, 0) gas_prod_mon,
-                    coalesce(wm.oil_prod_mon, 0) oil_prod_mon,
-                    coalesce(wm.water_prod_mon, 0) water_prod_mon,
-                    coalesce(wm.fluid_prod_mon, 0) fluid_prod_mon
-                FROM BY_DIM.fact_dwr_pc_pro_well_vol_m wm
-                WHERE wm.prod_time <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
-                    and wm.prod_time <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
+                    wm.prod_date prod_time_str,
+                    COALESCE(wm.gas_prod_mon, 0) gas_prod_mon,
+                    COALESCE(wm.oil_prod_mon, 0) oil_prod_mon,
+                    COALESCE(wm.water_prod_mon, 0) water_prod_mon,
+                    COALESCE(wm.fluid_prod_mon, 0) fluid_prod_mon
+                FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
+                WHERE wm.prod_date <![CDATA[ >= ]]>  #{startDay}
+                    and wm.prod_date <![CDATA[ <= ]]> #{endDay}
         <if test="wellId!='' and wellId!=null">
             and wm.well_id=#{wellId}
         </if>
@@ -59,14 +59,14 @@
             SUM(t.fluid_prod_mon) fluid,
             0 watercut
         FROM (  SELECT wm.well_id,
-                    to_char(wm.prod_time, 'YYYY') prod_time_str,
-                    coalesce(wm.gas_prod_mon, 0) gas_prod_mon,
-                    coalesce(wm.oil_prod_mon, 0) oil_prod_mon,
-                    coalesce(wm.water_prod_mon, 0) water_prod_mon,
-                    coalesce(wm.fluid_prod_mon, 0) fluid_prod_mon
-                FROM BY_DIM.fact_dwr_pc_pro_well_vol_m wm
-                WHERE wm.prod_time <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
-                and wm.prod_time <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
+                    LEFT(prod_date,4 ) prod_time_str,
+                    COALESCE(wm.gas_prod_mon, 0) gas_prod_mon,
+                    COALESCE(wm.oil_prod_mon, 0) oil_prod_mon,
+                    COALESCE(wm.water_prod_mon, 0) water_prod_mon,
+                    COALESCE(wm.fluid_prod_mon, 0) fluid_prod_mon
+                FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
+                WHERE wm.prod_time <![CDATA[ >= ]]> #{startDay}
+                and wm.prod_time <![CDATA[ <= ]]> #{endDay}
         <if test="wellId!='' and wellId!=null">
             and wm.well_id=#{wellId}
         </if>

+ 26 - 26
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -25,21 +25,21 @@
                str.azimuth_angle,
                str.well_coordinates_x,
                str.well_coordinates_y
-        from BY_DIM.well_basic_information well
-                 left join BY_DIM.fact_dwr_well_structure str on well.well_id = str.well_id
+        from by_dwr.fact_dwr_well_basic_information well
+                 left join by_dwr.fact_dwr_well_structure str on well.well_id = str.well_id
                  left join (
             select daily.*
-            from BY_DIM.fact_dwr_pc_pro_well_vol_d daily
+            from by_dwr.fact_dwr_pc_pro_well_vol_d daily
                      inner join(
-                select well_id, max(prod_time) prod_time from BY_DIM.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
+                select well_id, max(prod_date) prod_date from by_dwr.fact_dwr_pc_pro_well_vol_d group by well_id
+            ) maxdaily on daily.well_id = maxdaily.well_id and daily.prod_date = maxdaily.prod_date
         ) fact_daily on well.well_id = fact_daily.well_id
                  left join (
             select intr.*
-            from BY_DIM.fact_dwr_well_history_introduction intr
+            from by_dwr.fact_dwr_well_history_introduction intr
                      inner join(
                 select well_id, max(start_prod_date) start_prod_date
-                from BY_DIM.fact_dwr_well_history_introduction
+                from by_dwr.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
@@ -50,18 +50,18 @@
         select
         well.*,fact_daily.oil_prod_begin_date,fact_daily.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
-        from BY_DIM.well_basic_information well
+        from by_dwr.fact_dwr_well_basic_information well
         left join (
-        select daily.* from BY_DIM.fact_dwr_pc_pro_well_vol_d daily
+        select daily.* from by_dwr.fact_dwr_pc_pro_well_vol_d daily
         inner join(
-        select well_id, max(prod_time) prod_time from BY_DIM.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
+        select well_id, max(prod_date) prod_date from by_dwr.fact_dwr_pc_pro_well_vol_d group by well_id
+        ) maxdaily on daily.well_id=maxdaily.well_id and daily.prod_date=maxdaily.prod_date
         )fact_daily on well.well_id= fact_daily.well_id
         left join (
-        select mon.* from BY_DIM.fact_dwr_pc_pro_well_vol_m mon
+        select mon.* from by_dwr.fact_dwr_pc_pro_well_vol_m mon
         inner join(
-        select well_id, max(prod_time) prod_time from BY_DIM.fact_dwr_pc_pro_well_vol_m group by well_id
-        ) maxmon on mon.well_id=maxmon.well_id and mon.prod_time=maxmon.prod_time
+        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
         where 1=1
         <if test="well_common_name!='' and well_common_name!=null">
@@ -114,8 +114,8 @@
             well.geo_description,
             structure.well_coordinates_x x,
             structure.well_coordinates_y y
-        FROM BY_DIM.well_basic_information well
-        inner join BY_DIM.fact_dwr_well_structure structure on well.well_id = structure.well_id
+        FROM by_dwr.fact_dwr_well_basic_information well
+        inner join by_dwr.fact_dwr_well_structure structure on well.well_id = structure.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},'%')
@@ -148,29 +148,29 @@
 
     <select id="selectBoreholeInterList" resultType="java.util.HashMap">
         select *
-        from BY_DIM.fact_dwr_wl_ach_borehole_inter bi
+        from by_dwr.fact_dwr_wl_ach_borehole_inter bi
         where bi.well_id = #{well_id}
     </select>
     <select id="selectTestHistoryList" resultType="java.util.HashMap">
         select *
-        from BY_DIM.dws_dm_test_history th
+        from by_dm.dws_dm_test_history th
         where th.well_id = #{well_id}
     </select>
     <select id="selectTestHistorySummary" resultType="java.util.HashMap">
         select testing_name, count(1) as testing_num
-        from BY_DIM.dws_dm_test_history th
+        from by_dm.dws_dm_test_history th
         where th.well_id = #{well_id}
         group by th.testing_name
     </select>
     <select id="getLastTestHistory" resultType="java.util.HashMap">
         select *
-        from BY_DIM.dws_dm_test_history th
+        from by_dm.dws_dm_test_history th
         where th.well_id = #{well_id}
         order by th.testing_date desc limit 1
     </select>
     <select id="selectAnalyticalAssaysList" resultType="java.util.HashMap">
         select *
-        from BY_DIM.dws_dm_analytical_assays aa
+        from by_dm.dws_dm_analytical_assays aa
         where aa.well_id = #{well_id}
     </select>
     <select id="selectAnalyticalAssaysSummary" resultType="java.util.HashMap">
@@ -183,30 +183,30 @@
                SUM(CASE WHEN item_code = '录井综合解释' THEN 1 ELSE 0 END)      AS 录井综合解释,
                SUM(CASE WHEN item_code = '气测解释' THEN 1 ELSE 0 END)        AS 气测解释,
                SUM(CASE WHEN item_code = '定量荧光解释' THEN 1 ELSE 0 END)      AS 定量荧光解释
-        FROM BY_DIM.dws_dm_analytical_assays
+        FROM by_dm.dws_dm_analytical_assays
         where well_id = #{well_id}
         GROUP BY item_code;
     </select>
     <select id="selectHistoryAssignmentList" resultType="java.util.HashMap">
         select *
-        from BY_DIM.fact_dwr_brief_history_assignment ha
+        from by_dwr.fact_dwr_brief_history_assignment ha
         where ha.well_id = #{well_id}
     </select>
     <select id="selectHistoryAssignmentSummary" resultType="java.util.HashMap">
         select test_processes_name, count(1) as testing_num
-        from BY_DIM.fact_dwr_brief_history_assignment bha
+        from by_dwr.fact_dwr_brief_history_assignment bha
         where bha.well_id = #{well_id}
         group by bha.test_processes_name
     </select>
     <select id="getLastHistoryAssignment" resultType="java.util.HashMap">
         select *
-        from BY_DIM.fact_dwr_brief_history_assignment bha
+        from by_dwr.fact_dwr_brief_history_assignment bha
         where bha.well_id = #{well_id}
         order by bha.start_time desc limit 1
     </select>
     <select id="selectDataIndexList" resultType="java.util.HashMap">
         select *
-        from BY_DIM.fact_dwr_well_data_index di
+        from by_dwr.fact_dwr_well_data_index di
         where di.well_id = #{well_id}
     </select>
     <select id="selectDimProjectTypeList" resultType="java.util.HashMap">

+ 4 - 4
src/main/resources/static/a4gis/index.html

@@ -187,19 +187,19 @@
       right: 20px;
     }
   </style>
-  <!--测试环境使用-->
+  <!--测试环境使用
   <link href='https://js.arcgis.com/3.27/esri/css/esri.css' rel='stylesheet' />
   <script src='jquery.min.js'></script>
   <script src='https://js.arcgis.com/3.27/init.js' type='text/javascript'></script>
   <script src='init-gmap.js?v=1.15.9' type='text/javascript'></script>
-  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
+  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>-->
 
-  <!--正式环境使用
+  <!--正式环境使用-->
   <link href='http://a4.petrochina/gisapi/esri/css/esri.css' rel='stylesheet' />
   <script src='http://a4.petrochina/gisapi/third/jquery/jquery-1.9.1.min.js'></script>
   <script src='http://a4.petrochina/gisapi/init.js' type='text/javascript'></script>
   <script src='http://a4.petrochina/gisapi/lib/init-gmap.js?v=1.15.9' type='text/javascript'></script>
-  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script> -->
+  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
 
   <script>
     var map = null, app = { token: "d4b2b740-9814-4d75-9cda-dac96fc2bc10" };

+ 1 - 1
target/classes/application.yml

@@ -144,4 +144,4 @@ appconfig:
     client_id: 2d4a5b3c-dc6c-4231-914c-ca1a4d3a134b
     client_secret: e2afdc026c4e745714d2f3b2a2e393686c11f66f
 
-
+  hdfshelperurl: http://10.73.178.206:8078/hdfshelper/

BIN
target/classes/com/bowintek/practice/AppConfig.class


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

@@ -48,7 +48,7 @@
     },
     setup(props, context){
       console.log("ChartMap setup" , props, context);
-      let iframeSrc = ref<string>("http://10.73.178.206:8077/a4gis/index.html");
+      let iframeSrc = ref<string>("http://192.168.0.68:8077/a4gis/index.html");
       let iframeRef = ref<any>();   // 和iframe标签的ref绑定
 
       const wellId = computed(() => {

+ 2 - 2
vue/src/utils/downloadFile.ts

@@ -95,8 +95,8 @@ export function downloadByUrl({
   });
 }
 
-export function download(fileId, fileName) {
-  return handleDownloadByGet("/api/system/file/downFile", {fileId: fileId}, fileName, "下载失败!");
+export function download(well_id, fileName) {
+  return handleDownloadByGet("/api/wellInfo/downFile", {well_id: well_id,fileName:fileName}, fileName, "下载失败!");
 };
 
 export function downloadTempFile(fileName) {

+ 10 - 6
vue/src/views/wellinfo/index.vue

@@ -146,8 +146,8 @@
                   <ChartCell :timeType="('month')" :dataType="('gas')" :wellId="record.well_id"></ChartCell>
                 </div>
               </template>
-              <template v-if="column.key === 'well_id'">
-                <a-button type="link" size="small" @click="detail(record.well_id)">{{ record.well_id }}</a-button>
+              <template v-if="column.key === 'well_common_name'">
+                <a-button type="link" size="small" @click="detail(record.well_id)">{{ record.well_common_name }}</a-button>
               </template>
               <template v-if="column.key === 'operation'">
                 <a-button type="link" size="small" @click="showDoc(record.well_id)">相关文档</a-button>
@@ -230,7 +230,7 @@
         <template #renderItem="{ item }">
           <a-list-item>
             <template #actions>
-              <a style="color:#1890ff">下载</a>
+              <a style="color:#1890ff" @click="downFile(item)">下载</a>
             </template>
             <a-list-item-meta
               :description="item.file_business_type">
@@ -260,6 +260,7 @@ import type {TableProps} from "ant-design-vue";
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import ChartCell from '@/components/basic/chart/chart-cell.vue'
 import ChartMap from '@/components/basic/chart/chart-map.vue'
+import {download} from "@/utils/downloadFile";
 
 export default defineComponent({
   name: 'wellinfoindex',
@@ -304,6 +305,10 @@ export default defineComponent({
       org_id_a1: '',
       project_id: ''
     });
+    const downFile = (record: any) => {
+
+      download(record.fileId, record.file_name);
+    };
     const resetFields = function () {
       let keys: string[] = Object.keys(formState);
       keys.forEach(key => {
@@ -333,8 +338,7 @@ export default defineComponent({
         align: "center", fixed: 'left',
         customRender: item => `${formState.rows * (formState.page - 1) + item.index + 1}`
       },
-      {title: '井号', dataIndex: 'well_id', key: 'well_id', width: 120, fixed: 'left'},
-      {title: '井名', dataIndex: 'well_common_name', key: 'well_common_name', width: 120},
+      {title: '井名', dataIndex: 'well_common_name', key: 'well_common_name', width: 120, fixed: 'left'},
       {title: '采油厂机构', dataIndex: 'org_name_a1', key: 'org_name_a1', width: 120},
       {title: '地质单元', dataIndex: 'project_name', key: 'project_name', width: 120},
       {title: '井型', dataIndex: 'well_type', key: 'well_type', width: 120},
@@ -578,7 +582,7 @@ export default defineComponent({
       expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList, replaceFields,
       formRef, viewModel, handleTableChange, detail,
       formState, isShowDoc, showDoc, docList, resetFields, showColumnType, filterColumns,
-      labelCol, getTdColor,
+      labelCol, getTdColor,downFile,
       tabChange,
       treeOnExpand,
       subjectTrees,