Kaynağa Gözat

井筒全息快照

xiaoqiao 1 yıl önce
ebeveyn
işleme
1c585c7e3c

BIN
lib/postgresql-42.3.4.jar


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

@@ -0,0 +1,47 @@
+package com.bowintek.practice.controller;
+
+import com.bowintek.practice.filter.exception.BaseResponse;
+import com.bowintek.practice.filter.exception.RespGenerstor;
+import com.bowintek.practice.model.WellBasicInformation;
+import com.bowintek.practice.services.service.OrganizationService;
+import com.bowintek.practice.services.service.WellInfoService;
+import com.bowintek.practice.vo.cd.CdOrganizationTreeVo;
+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 java.util.HashMap;
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "/api/wellInfo")
+public class WellInfoController {
+
+    @Autowired
+    private WellInfoService wellInfoService;
+    @Autowired
+    private OrganizationService organizationService;
+
+    @ResponseBody
+    @GetMapping("/getList")
+    public BaseResponse<PageInfo<HashMap<String, Object>>> getList(@RequestParam("page") int page, @RequestParam("rows") int rows,
+                                                                         WellInfoParams params) throws Exception {
+
+        PageInfo<HashMap<String, Object>> result = wellInfoService.getList(page, rows, params);
+
+        return RespGenerstor.success(result);
+    }
+
+    @GetMapping("/getOrganizationTree")
+    public BaseResponse getDictionaryList() {
+        List<CdOrganizationTreeVo> treeVoList = organizationService.getListTree();
+        List<HashMap<String, Object>> treeData = new ArrayList<>();
+        treeVoList.forEach((it) -> {
+            HashMap<String, Object> node = new HashMap<>();
+            //  node.put("key",)
+        });
+        return RespGenerstor.success(organizationService.getListTree());
+    }
+}

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

@@ -0,0 +1,30 @@
+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);
+}

+ 12 - 0
src/main/java/com/bowintek/practice/mapper/cquery/WellInfoCQuery.java

@@ -0,0 +1,12 @@
+package com.bowintek.practice.mapper.cquery;
+
+import com.bowintek.practice.vo.SubjectVo;
+import com.bowintek.practice.vo.query.WellInfoParams;
+
+import java.util.HashMap;
+import java.util.List;
+
+public interface WellInfoCQuery {
+
+    List<HashMap<String,Object>> getWellInfoList(WellInfoParams params);
+}

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

@@ -0,0 +1,396 @@
+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();
+    }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2828 - 0
src/main/java/com/bowintek/practice/model/WellBasicInformationExample.java


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

@@ -0,0 +1,38 @@
+package com.bowintek.practice.services.impl;
+
+import com.bowintek.practice.mapper.SrSubjectMapper;
+import com.bowintek.practice.mapper.WellBasicInformationMapper;
+import com.bowintek.practice.mapper.cquery.WellInfoCQuery;
+import com.bowintek.practice.model.WellBasicInformation;
+import com.bowintek.practice.model.WellBasicInformationExample;
+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;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+
+@Component
+public class WellInfoServiceImpl implements WellInfoService {
+
+    @Autowired
+    private WellBasicInformationMapper wellBasicInformationMapper;
+    @Autowired
+    private WellInfoCQuery wellInfoCQuery;
+    @Override
+    @SwitchDataSource(DBTypeEnum.POSTGRE)
+    public PageInfo<HashMap<String, Object>> getList(Integer page, Integer rows, WellInfoParams params) {
+        PageHelper.startPage(page, rows);
+
+        List<HashMap<String,Object>> dataList = wellInfoCQuery.getWellInfoList(params);
+
+        PageInfo< HashMap<String, Object>> result = new PageInfo(dataList);
+        return result;
+    }
+}

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

@@ -0,0 +1,13 @@
+package com.bowintek.practice.services.service;
+
+import com.bowintek.practice.model.WellBasicInformation;
+import com.bowintek.practice.vo.query.WellInfoParams;
+import com.github.pagehelper.PageInfo;
+
+import java.util.HashMap;
+import java.util.List;
+
+public interface WellInfoService {
+
+    PageInfo< HashMap<String, Object>> getList(Integer page, Integer rows, WellInfoParams params);
+}

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

@@ -0,0 +1,18 @@
+package com.bowintek.practice.vo.query;
+
+import lombok.Data;
+
+@Data
+public class WellInfoParams {
+    private String well_common_name;
+    private String well_id;
+    private String well_type;
+    private String spud_date_begin;
+    private String spud_date_end;
+    private String completion_date_begin;
+    private String completion_date_end;
+    private String oil_prod_begin_date_begin;
+    private String oil_prod_begin_date_end;
+    private String oil_prod_recent_date_begin;
+    private String oil_prod_recent_date_end;
+}

+ 7 - 4
src/main/resources/generatorConfig.xml

@@ -4,7 +4,7 @@
 
 <generatorConfiguration>
     <!--mysql 连接数据库jar 这里选择自己本地位置-->
-    <classPathEntry location="./lib/mysql-connector-java-5.1.46.jar"/>
+    <classPathEntry location="./lib/postgresql-42.3.4.jar"/>
     <context id="testTables" targetRuntime="MyBatis3">
         <!-- 运行环境配置 -->
         <!--<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>-->
@@ -23,10 +23,13 @@
                         password="bowin123">
         </jdbcConnection>
         -->
-        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
+  <!--      <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                         connectionURL="jdbc:mysql://office.bowintek.com:3306/smartSearchDB?useSSL=false" userId="root"
+                        password="bowin123">-->
+        <jdbcConnection driverClass="org.postgresql.Driver"
+                        connectionURL="jdbc:postgresql://office.bowintek.com:5432/postgres"
+                        userId="postgres"
                         password="bowin123">
-
         </jdbcConnection>
 
         <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
@@ -120,6 +123,6 @@
             <columnOverride column="StandardMajorID" javaType="java.lang.Integer" jdbcType="INTEGER" />
             <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
         </table>-->
-        <table schema="" tableName="sr_tag"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="well_basic_information"><property name="useActualColumnNames" value="true"/></table>
     </context>
 </generatorConfiguration>

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

@@ -0,0 +1,751 @@
+<?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 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 well_basic_information
+    where well_id = #{well_id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from well_basic_information
+    where well_id = #{well_id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.bowintek.practice.model.WellBasicInformationExample">
+    delete from 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 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 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 well_basic_information
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update 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 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 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 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>

+ 15 - 0
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -0,0 +1,15 @@
+<?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.cquery.WellInfoCQuery">
+
+    <select id="getWellInfoList" parameterType="com.bowintek.practice.vo.query.WellInfoParams"  resultType="java.util.HashMap">
+        select well.*,fact.oil_prod_begin_date,fact.oil_prod_recent_date,fact.current_state,fact.water_cut
+        from well_basic_information well
+                 inner join (
+            select daily.* from FACT_DWR_PC_PRO_WELL_VOL_DAILY daily
+                                    inner join(
+                select  well_id, max(prod_time) prod_time from FACT_DWR_PC_PRO_WELL_VOL_DAILY group by well_id
+            ) maxdaly on daily.well_id=maxdaly.well_id and daily.prod_time=maxdaly.prod_time
+        )fact on well.well_id= fact.well_id
+    </select>
+</mapper>

+ 7 - 4
target/classes/generatorConfig.xml

@@ -4,7 +4,7 @@
 
 <generatorConfiguration>
     <!--mysql 连接数据库jar 这里选择自己本地位置-->
-    <classPathEntry location="./lib/mysql-connector-java-5.1.46.jar"/>
+    <classPathEntry location="./lib/postgresql-42.3.4.jar"/>
     <context id="testTables" targetRuntime="MyBatis3">
         <!-- 运行环境配置 -->
         <!--<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>-->
@@ -23,10 +23,13 @@
                         password="bowin123">
         </jdbcConnection>
         -->
-        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
+  <!--      <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                         connectionURL="jdbc:mysql://office.bowintek.com:3306/smartSearchDB?useSSL=false" userId="root"
+                        password="bowin123">-->
+        <jdbcConnection driverClass="org.postgresql.Driver"
+                        connectionURL="jdbc:postgresql://office.bowintek.com:5432/postgres"
+                        userId="postgres"
                         password="bowin123">
-
         </jdbcConnection>
 
         <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
@@ -120,6 +123,6 @@
             <columnOverride column="StandardMajorID" javaType="java.lang.Integer" jdbcType="INTEGER" />
             <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
         </table>-->
-        <table schema="" tableName="sr_tag"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="well_basic_information"><property name="useActualColumnNames" value="true"/></table>
     </context>
 </generatorConfiguration>

+ 1 - 0
vue/src/router/asyncModules/sale.ts

@@ -7,4 +7,5 @@ export default {
   'views/subjectlist': () => import( '@/views/subject/index.vue'),
   'views/subjectedit': () => import( '@/views/subject/edit.vue'),
   'views/subjectdetail': () => import( '@/views/subject/detail.vue'),
+  'views/wellinfo': () => import( '@/views/wellinfo/index.vue'),
 }

+ 434 - 0
vue/src/views/wellinfo/index.vue

@@ -0,0 +1,434 @@
+<template>
+  <div class="query-index">
+    <div class="query-index-tree" v-if="showTree">
+      <div class="query-index-tree-search">
+        <a-tabs v-model:activeKey="activeTab" @change="tabChange" style="width:97%;">
+          <a-tab-pane key="1" tab="组织架构目录">
+          </a-tab-pane>
+          <a-tab-pane key="2" tab="地址单元目录" forceRender="true">
+          </a-tab-pane>
+        </a-tabs>
+        <DoubleLeftOutlined @click="showTree=false"/>
+      </div>
+      <div style="margin-top: -15px">
+        <a-input-search
+          v-model:value="subjectTrees.searchStr"
+          placeholder="查找目录..."
+          @search="searchTree"
+        />
+      </div>
+      <div class="query-index-tree-box">
+        <a-tree
+          :show-line="true"
+          :tree-data="subjectTrees.data"
+          v-model:expandedKeys="subjectTrees.expandedKeys"
+          v-model:selectedKeys="subjectTrees.selectedKeys"
+          :replace-fields="replaceFields"
+          :autoExpandParent="subjectTrees.autoExpandParent"
+          @expand="treeOnExpand">
+          <template #title="{ label,value,children }">
+                    <span v-if="label!=null&&label.indexOf(subjectTrees.searchStr) > -1">
+                      {{ label.substr(0, label.indexOf(subjectTrees.searchStr)) }}
+                      <span style="color: #f50">{{ subjectTrees.searchStr }}</span>
+                      {{ label.substr(label.indexOf(subjectTrees.searchStr) + subjectTrees.searchStr.length) }}
+                    </span>
+            <span v-else>{{ label }}</span>
+          </template>
+        </a-tree>
+      </div>
+    </div>
+    <div class="query-index-close" v-else>
+      <DoubleRightOutlined @click="showTree=true"/>
+    </div>
+    <div class="query-index-content">
+      <div class="query-index-form">
+        <a-form ref="formRef" name="fromQuery"
+                class="ant-advanced-search-form"
+                :label-col="labelCol"
+                :model="formState.temp">
+          <a-row :gutter="24" class="query-index-row">
+            <a-col :span="6">
+              <a-form-item name="tempName" label="井号:">
+                <a-input v-model:value="formState.well_id"/>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item name="well_common_name" label="井名:">
+                <a-input v-model:value="formState.well_common_name"/>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item name="tempName" label="井型:">
+                <a-select ref="select" v-model:value="formState.well_type"
+                          :options="wellTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6" style="text-align: left">
+              <MenuOutlined @click="showQuery=true" v-if="!showQuery"/>
+              <LineOutlined @click="showQuery=false" v-else/>
+              <a-button type="primary" html-type="submit" @click="onQuery" style="margin-left: 10px;">查询</a-button>
+              <a-button html-type="submit" @click="() => {formRef.resetFields();onQuery()}" style="margin-left: 10px;">
+                重置
+              </a-button>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24" class="query-index-row" v-if="showQuery">
+            <a-col :span="6">
+              <a-form-item name="tempName" label="开钻日期:">
+                <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
+                                @change="(d)=>{onRangeChange(d,'spud_date_begin','spud_date_end')}"/>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item name="well_common_name" label="完井日期:">
+                <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
+                                @change="(d)=>{onRangeChange(d,'completion_date_begin','completion_date_end')}"/>
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
+              <a-form-item name="tempName" label="开始采油日期:">
+                <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
+                                @change="(d)=>{onRangeChange(d,'oil_prod_begin_date_begin','oil_prod_begin_date_end')}"/>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24" class="query-index-row" v-if="showQuery">
+            <a-col :span="6">
+              <a-form-item name="tempName" label="开钻日期:">
+                <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
+                                @change="(d)=>{onRangeChange(d,'oil_prod_recent_date_begin','oil_prod_recent_date_end')}"/>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <a-spin :spinning="loading">
+        <div class="query-index-table">
+          <a-table :columns="columns" :data-source="data" :scroll="{ x:'100%', y: 500 }"
+                   :loading="loading"
+                   :row-key="record=>record.tempId"
+                   bordered>
+            <template #bodyCell="{ column,record }">
+              <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>
+              </template>
+            </template>
+          </a-table>
+        </div>
+      </a-spin>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+import {ref, defineComponent, reactive, computed} from 'vue';
+import type {FormInstance} from 'ant-design-vue';
+import {useRoute} from 'vue-router';
+import {get} from "@/api/common";
+import type {TableColumnsType} from "ant-design-vue";
+import dayjs from "dayjs";
+import {getPaginationTotalTitle} from "@/utils/common";
+
+export default defineComponent({
+  name: 'queryindex',
+  components: {},
+  setup() {
+    const route = useRoute();
+    const expand = ref(false);
+    const formRef = ref<FormInstance>();
+    const loading = ref(false);
+    const showQuery = ref(false);
+    const selectedRowKeys = ref([]);
+    const activeTab = ref("1");
+    const showTree = ref(true);
+    const data = ref([]);
+    const wellTypeList = ref([{label: "直井", value: "直井"}, {label: "定向井", value: "定向井"}, {label: "分支井", value: "分支井"}]);
+    const replaceFields = {
+      children: 'children',
+      title: 'label',
+      key: 'value',
+    };
+
+    const formState = reactive({
+      page: 1,
+      rows: 10,
+      total: 0,
+      well_common_name: '',
+      well_id: '',
+      well_type: '',
+      spud_date_begin: '',
+      spud_date_end: '',
+      completion_date_begin: '',
+      completion_date_end: '',
+      oil_prod_begin_date_begin: '',
+      oil_prod_begin_date_end: '',
+      oil_prod_recent_date_begin: '',
+      oil_prod_recent_date_end: ''
+    });
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        width: 60,
+        dataIndex: 'index',
+        key: 'index',
+        align: "center",
+        customRender: item => `${formState.rows * (formState.page - 1) + item.index + 1}`
+      },
+      {title: '井号', dataIndex: 'well_id', key: 'well_id', width: 120},
+      {title: '井名', dataIndex: 'well_common_name', key: 'well_common_name', width: 120},
+      {title: '井型', dataIndex: 'well_type', key: 'well_type', width: 120},
+      {
+        title: '开钻日期', dataIndex: 'spud_date', key: 'spud_date', width: 120, customRender: ({record}) =>
+          record.spud_date == null ? "" : (dayjs(record.spud_date).format('YYYY-MM-DD'))
+      },
+      {
+        title: '完钻日期', dataIndex: 'end_drilling_date', key: 'end_drilling_date', width: 120, customRender: ({record}) =>
+          record.end_drilling_date == null ? "" : (dayjs(record.end_drilling_date).format('YYYY-MM-DD'))
+      },
+      {
+        title: '完井日期', dataIndex: 'completion_date', key: 'completion_date', width: 120, customRender: ({record}) =>
+          record.end_drilling_date == null ? "" : (dayjs(record.end_drilling_date).format('YYYY-MM-DD'))
+      },
+      {
+        title: '开始采油日期',
+        dataIndex: 'oil_prod_begin_date',
+        key: 'oil_prod_begin_date', width: 120,
+        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,
+        customRender: ({record}) =>
+          record.oil_prod_recent_date == null ? "" : (dayjs(record.oil_prod_recent_date).format('YYYY-MM-DD'))
+      },
+      {title: '状态', dataIndex: 'current_state', key: 'current_state', width: 120},
+      {title: '设计井深(m)', dataIndex: 'budgeted_md', key: 'tempNo', width: 120},
+      {title: '含水率', dataIndex: 'water_cut', key: 'water_cut', width: 120},
+      {title: '月产油量(t)', dataIndex: 'oil_prod_mon', key: 'oil_prod_mon', width: 120},
+      {title: '累产油量(t)', dataIndex: 'oil_prod_ year', key: 'oil_prod_ year', width: 120},
+      {title: '累产油量趋势', dataIndex: 'tempNo', key: 'tempNo', width: 150},
+      {title: '月产气量(m³)', dataIndex: 'gas_prod_ year', key: 'gas_prod_ year', width: 120},
+      {title: '累产气量(m³)', dataIndex: 'gas_prod_mon', key: 'gas_prod_mon', width: 120},
+      {title: '累产油量趋势', dataIndex: 'tempNo', key: 'tempNo', width: 150},
+      {title: '操作列', dataIndex: 'operation', key: 'operation', width: 120}
+    ];
+    const onSelectChange = (keys: any) => {
+      selectedRowKeys.value = keys;
+    };
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: formState.page,
+      pageSize: formState.rows,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+
+    const loadData = async function () {
+      loading.value = true;
+      const result: any = await get('wellInfo/getList', formState);
+
+      data.value = result.list;
+      formState.total = result.total;
+      loading.value = false;
+    }
+    const onRangeChange = (dateString, begin, end) => {
+      formState[begin] = dateString ? dateString[0].format("YYYY-MM-DD") : '';
+      formState[end] = dateString ? dateString[1].format("YYYY-MM-DD") : '';
+    };
+    const tabChange = (key) => {
+      console.log("tabChange", key);
+      if (key == "2") {
+
+      }
+    }
+    const onQuery = () => {
+      loadData();
+    }
+    const subjectTrees = ref({
+      data: [],
+      expandedKeys: [''],
+      selectedKeys: [''],
+      autoExpandParent:true,
+      searchStr: ''
+    });
+    const getSubjectTree = async function () {
+      //loading.value = true;
+      subjectTrees.value.data = await get('wellInfo/getOrganizationTree', {tabName: subjectTrees.value.searchStr});
+      //计算第一个展开节点
+      subjectTrees.value.expandedKeys = [];
+      if (subjectTrees.value.data && subjectTrees.value.data.length > 0) {
+        subjectTrees.value.expandedKeys.push((subjectTrees.value.data[0] as any).value + "");
+      }
+      generateList(subjectTrees.value.data);
+    }
+    getSubjectTree();
+    const searchTree = () => {
+      const expanded = dataList
+        .map((item: any) => {
+          if (item.label != null && item.label.indexOf(subjectTrees.value.searchStr) > -1) {
+            return getParentKey(item.value as string, subjectTrees.value.data);
+          }
+          return null;
+        })
+        .filter((item, i, self) => item && self.indexOf(item) === i);
+      subjectTrees.value.expandedKeys = expanded as string[];
+      subjectTrees.value.autoExpandParent = true;
+    }
+    const dataList: any[] = [];
+    const generateList = (data: any[]) => {
+      for (let i = 0; i < data.length; i++) {
+        const node = data[i];
+        const label = node.label;
+        dataList.push({value: node.value, label: label as string});
+        if (node.children) {
+          generateList(node.children);
+        }
+      }
+    };
+
+    const getParentKey = (key: string, tree: any[]): string | number | undefined => {
+      let parentKey;
+      for (let i = 0; i < tree.length; i++) {
+        const node = tree[i];
+        if (node.children) {
+          if (node.children.some(item => item.value === key)) {
+            parentKey = node.value;
+          } else if (getParentKey(key, node.children)) {
+            parentKey = getParentKey(key, node.children);
+          }
+        }
+      }
+      return parentKey;
+    };
+
+    const treeOnExpand = function (keys: string[]) {
+      subjectTrees.value.expandedKeys = keys;
+      subjectTrees.value.autoExpandParent = false;
+    }
+    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];
+      }
+    }
+    const labelCol = {style: {width: '100px'}};
+    return {
+      route, selectedRowKeys, columns, loading, activeTab, showTree, onSelectChange, data,
+      expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList, replaceFields,
+      formRef,
+      formState,
+      labelCol,
+      tabChange,
+      treeOnExpand,
+      subjectTrees,
+      getSubjectTree, searchTree,
+      treeOnSelect, pagination
+    };
+  },
+  created() {
+    this.loadData();
+  },
+  activated() {
+  }
+});
+</script>
+
+<style lang="less" scoped>
+.ant-form-item {
+  margin: 0 0 10px !important;
+}
+
+.ant-form-item-label label {
+  width: 100% !important;
+  background-color: #2dd36f;
+}
+
+.query-index {
+  display: flex;
+  flex-direction: row;
+  min-height: 100%;
+  background-color: white;
+}
+
+.query-index-tree {
+  min-width: 260px;
+  max-width: 360px;
+  border-right: 2px solid #f2f2f2;
+  margin-right: 5px;
+}
+
+.query-index-close {
+  width: 15px;
+  padding-top: 10px;
+  padding-left: 10px;
+}
+
+.query-index-content {
+  flex-grow: 1;
+  display: flex;
+  flex-direction: column;
+  width: 80%;
+}
+
+.query-index-form {
+  padding: 15px 10px 10px 15px;
+}
+
+.query-index-table {
+  flex-grow: 1;
+  display: flex;
+}
+
+.query-index-tabs {
+  margin-left: 10px;
+  margin-right: 10px;
+  height: 100%;
+  flex: 1;
+}
+
+.tabs-view-content {
+  padding: 0px;
+}
+
+.query-index-tree-item {
+  white-space: nowrap; /*强制span不换行*/
+  display: inline-block; /*将span当做块级元素对待*/
+  text-overflow: ellipsis; /*超出部分以点号代替*/
+}
+
+.query-index-tree-search {
+  padding: 5px;
+  border-bottom: 2px solid #f2f2f2;
+  display: flex;
+  align-items: center;
+}
+
+.query-index-tree-box {
+  padding: 5px;
+  padding-top: 10px;
+  overflow-y: scroll;
+  max-height: 600px;
+}
+
+.query-index-row {
+
+}
+</style>
+