Bladeren bron

add wellsource struct

xsr 1 jaar geleden
bovenliggende
commit
3fe4848b8c

+ 125 - 0
src/main/java/com/gct/tool/entity/centralbase/CbCdWellSource.java

@@ -0,0 +1,125 @@
1
+package com.gct.tool.entity.centralbase;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.extension.activerecord.Model;
6
+import com.fasterxml.jackson.annotation.JsonFormat;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+import java.io.Serializable;
14
+import java.time.LocalDateTime;
15
+
16
+/**
17
+ * <p>
18
+ * 单井基础信息
19
+ * </p>
20
+ *
21
+ * @author wsy
22
+ * @since 2021-01-19
23
+ */
24
+@Data
25
+@EqualsAndHashCode(callSuper = false)
26
+@Accessors(chain = true)
27
+@ApiModel(value="CbCdWellSource对象", description="单井基础信息")
28
+@TableName("centralbase.cb_cd_well_source")
29
+public class CbCdWellSource extends Model<CbCdWellSource> {
30
+
31
+    private static final long serialVersionUID=1L;
32
+
33
+    @ApiModelProperty(value = "井id")
34
+    private String wellId;
35
+
36
+    @ApiModelProperty(value = "通用井名")
37
+    private String wellCommonName;
38
+
39
+    @ApiModelProperty(value = "标准井名")
40
+    private String wellLegalName;
41
+
42
+    @ApiModelProperty(value = "井型")
43
+    private String reason;
44
+
45
+    @ApiModelProperty(value = "井别")
46
+    private String wellPurpose;
47
+
48
+    @ApiModelProperty(value = "投产措施;投产措施;0:无措施正常投产,1:压力投产,2:酸化投产")
49
+    private Integer pStartProdStitum;
50
+
51
+    @ApiModelProperty(value = "目的层")
52
+    private String targetFormation;
53
+
54
+    @ApiModelProperty(value = "开钻日期;钻井日期")
55
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
56
+    private LocalDateTime spudDate;
57
+
58
+    @ApiModelProperty(value = "机构ID;井所属的组织机构ID")
59
+    private String orgId;
60
+
61
+    @ApiModelProperty(value = "构造单元ID;井所属的构造单元ID")
62
+    private String structId;
63
+
64
+    @ApiModelProperty(value = "油气单元ID;井所属的油气单元ID")
65
+    private String oilfieldId;
66
+
67
+    @ApiModelProperty(value = "物探工区ID;井所属的物探工区ID")
68
+    private String expAreaId;
69
+
70
+    @ApiModelProperty(value = "组合单元ID")
71
+    private String groupUnitId;
72
+
73
+    @ApiModelProperty(value = "站库ID")
74
+    private String stationId;
75
+
76
+    @ApiModelProperty(value = "纬度")
77
+    private Double geoLatitude;
78
+
79
+    @ApiModelProperty(value = "经度")
80
+    private Double geoLongitude;
81
+
82
+    @ApiModelProperty(value = "坐标参照")
83
+    private String geoOffsetReference;
84
+
85
+    @ApiModelProperty(value = "横坐标;向东偏离位置,对应大地坐标Y")
86
+    private Double geoOffsetEast;
87
+
88
+    @ApiModelProperty(value = "纵坐标;向北偏离位置,对应大地坐标X")
89
+    private Double geoOffsetNorth;
90
+
91
+    @ApiModelProperty(value = "备注")
92
+    private String remarks;
93
+
94
+    @ApiModelProperty(value = "是否是斜井,填写Y或N")
95
+    private String isDeviated;
96
+
97
+    @ApiModelProperty(value = "井身质量")
98
+    private String endStatus;
99
+
100
+    @ApiModelProperty(value = "生产层段名称")
101
+    private String completionName;
102
+
103
+    @ApiModelProperty(value = "生产区块名称")
104
+    @TableField("PRODUCING_AREA_name")
105
+    private String producingAreaName;
106
+
107
+    @ApiModelProperty(value = "生产层段顶部垂深")
108
+    private Double topTvd;
109
+
110
+    @ApiModelProperty(value = "生产层段底部垂深")
111
+    private Double bottomTvd;
112
+
113
+    @ApiModelProperty(value = "完井层位ID")
114
+    private String completionId;
115
+
116
+    @ApiModelProperty(value = "井站名称|站库名称")
117
+    private String stationName;
118
+
119
+
120
+    @Override
121
+    protected Serializable pkVal() {
122
+        return null;
123
+    }
124
+
125
+}

+ 45 - 0
src/main/java/com/gct/tool/mapper/centralbase/CbCdWellSourceMapper.java

@@ -0,0 +1,45 @@
1
+package com.gct.tool.mapper.centralbase;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.gct.centralbase.entity.CbCdWellSource;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * <p>
15
+ * 单井基础信息 Mapper 接口
16
+ * </p>
17
+ *
18
+ * @author wsy
19
+ * @since 2021-01-19
20
+ */
21
+@Mapper
22
+public interface CbCdWellSourceMapper extends BaseMapper<CbCdWellSource> {
23
+
24
+    List<CbCdWellSource> selectWellSourceList(@Param("orgIds") List<String> orgIds);
25
+
26
+    List<CbCdWellSource> getjhAll();
27
+    List<CbCdWellSource> getjhAllByorgid(@Param("orgid") String orgid);
28
+    Page<Map<String,Object>> getAllWellSourceList(@Param("page") IPage<Map<String,Object>> page, @Param("sql") String sql);
29
+
30
+    /**
31
+     * 根据井号查询稠油井信息
32
+     * @param wellName
33
+     * @return
34
+     */
35
+    CbCdWellSource getByWellId_Heavy(@Param("wellName") String wellName);
36
+
37
+
38
+
39
+    //查询所有井用于分析误差率
40
+    List<CbCdWellSource> getjhAllYieldError();
41
+
42
+    List<CbCdWellSource> getjhAllConent();
43
+
44
+
45
+}

+ 88 - 0
src/main/java/com/gct/tool/mapper/centralbase/CbCdWellSourceMapper.xml

@@ -0,0 +1,88 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.gct.centralbase.mapper.CbCdWellSourceMapper">
4
+
5
+    <cache flushInterval="60000" size="5096"/>
6
+
7
+    <!-- 通用查询映射结果 -->
8
+    <resultMap id="BaseResultMap" type="com.gct.centralbase.entity.CbCdWellSource">
9
+        <result column="well_id" property="wellId"/>
10
+        <result column="well_common_name" property="wellCommonName"/>
11
+        <result column="well_legal_name" property="wellLegalName"/>
12
+        <result column="reason" property="reason"/>
13
+        <result column="well_purpose" property="wellPurpose"/>
14
+        <result column="p_start_prod_stitum" property="pStartProdStitum"/>
15
+        <result column="target_formation" property="targetFormation"/>
16
+        <result column="spud_date" property="spudDate"/>
17
+        <result column="org_id" property="orgId"/>
18
+        <result column="struct_id" property="structId"/>
19
+        <result column="oilfield_id" property="oilfieldId"/>
20
+        <result column="exp_area_id" property="expAreaId"/>
21
+        <result column="group_unit_id" property="groupUnitId"/>
22
+        <result column="station_id" property="stationId"/>
23
+        <result column="geo_latitude" property="geoLatitude"/>
24
+        <result column="geo_longitude" property="geoLongitude"/>
25
+        <result column="geo_offset_reference" property="geoOffsetReference"/>
26
+        <result column="geo_offset_east" property="geoOffsetEast"/>
27
+        <result column="geo_offset_north" property="geoOffsetNorth"/>
28
+        <result column="remarks" property="remarks"/>
29
+        <result column="is_deviated" property="isDeviated"/>
30
+        <result column="end_status" property="endStatus"/>
31
+        <result column="completion_name" property="completionName"/>
32
+        <result column="PRODUCING_AREA_name" property="producingAreaName"/>
33
+        <result column="top_tvd" property="topTvd"/>
34
+        <result column="bottom_tvd" property="bottomTvd"/>
35
+        <result column="completion_id" property="completionId"/>
36
+    </resultMap>
37
+
38
+
39
+    <select id="selectWellSourceList" resultType="com.gct.centralbase.entity.CbCdWellSource">
40
+        select "u"."well_common_name" from "centralbase"."cb_cd_well_source" "u"
41
+        -- LEFT JOIN sys_user_role r ON u.id = r.user_id
42
+        -- left join sys_user_dept d on u.id = d.user_id
43
+        <where>
44
+            <if test="orgIds != null  and orgIds != ''">
45
+                and "u"."org_id" in
46
+                <foreach collection="orgIds" item="org_id" index="index" open="(" close=")" separator=",">
47
+                    #{org_id}
48
+                </foreach>
49
+            </if>
50
+        </where>
51
+    </select>
52
+    <select id="getAllWellSourceList" resultType="java.util.Map">
53
+        ${sql}
54
+    </select>
55
+
56
+    <select id="getjhAll" resultType="com.gct.centralbase.entity.CbCdWellSource">
57
+        select * from centralbase.cb_cd_well_source where (station_id
58
+         like '%红浅%' or station_id like '%六采%' or station_id like '%五采%' or station_id like '%特采%' )
59
+    </select>
60
+
61
+    <select id="getjhAllByorgid" resultType="com.gct.centralbase.entity.CbCdWellSource">
62
+        select * from centralbase.cb_cd_well_source where org_id =#{orgid}
63
+    </select>
64
+
65
+    <select id="getByWellId_Heavy" resultType="com.gct.centralbase.entity.CbCdWellSource">
66
+        select * from centralbase.cb_cd_well_source where well_id =#{wellName} and (station_id
67
+         like '%红浅%' or station_id like '%六采%' or station_id like '%五采%' or station_id like '%特采%' )
68
+    </select>
69
+
70
+
71
+    <select id="getjhAllYieldError" resultType="com.gct.centralbase.entity.CbCdWellSource">
72
+        select * from centralbase.cb_cd_well_source where (station_id
73
+         like '%一采%' or station_id like '%二采%' or station_id like '%三采%')
74
+    </select>
75
+
76
+
77
+    <select id="getjhAllConent" resultType="com.gct.centralbase.entity.CbCdWellSource">
78
+        select * from centralbase.cb_cd_well_source
79
+    </select>
80
+
81
+
82
+
83
+
84
+
85
+</mapper>
86
+
87
+
88
+