Quellcode durchsuchen

分层注水评价、静态数据、单井日报

Qi Wang vor 2 Jahren
Ursprung
Commit
95dab94346

+ 7 - 7
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/controller/LayeredWaterController.java

@@ -1,8 +1,8 @@
 package cn.com.victorysoft.business.cyyzs.controller;
 
-import cn.com.victorysoft.business.cyyzs.entity.StaticData;
-import cn.com.victorysoft.business.cyyzs.param.StaticDataParam;
-import cn.com.victorysoft.business.cyyzs.service.StaticDataService;
+import cn.com.victorysoft.business.cyyzs.entity.LayeredWater;
+import cn.com.victorysoft.business.cyyzs.param.LayeredWaterParam;
+import cn.com.victorysoft.business.cyyzs.service.LayeredWaterService;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -16,12 +16,12 @@ import javax.annotation.Resource;
 public class LayeredWaterController {
 
     @Resource
-    private StaticDataService staticDataService;
+    private LayeredWaterService layeredWaterService;
 
-    @GetMapping("/index")
+    @GetMapping("/page")
     @ApiOperation("查询分层注水评价")
-    public PageInfo<StaticData> selectList(StaticDataParam param) {
-        return staticDataService.selectList(param);
+    public PageInfo<LayeredWater> selectList(LayeredWaterParam param) {
+        return layeredWaterService.selectList(param);
     }
 
 

+ 1 - 1
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/controller/StaticDataController.java

@@ -20,7 +20,7 @@ public class StaticDataController {
     @Resource
     private StaticDataService staticDataService;
 
-    @GetMapping("/index")
+    @GetMapping("/page")
     @ApiOperation("查询静态数据")
     public PageInfo<StaticData> selectList(StaticDataParam param) {
         return staticDataService.selectList(param);

+ 30 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/controller/WellDailyController.java

@@ -0,0 +1,30 @@
+package cn.com.victorysoft.business.cyyzs.controller;
+
+import cn.com.victorysoft.business.cyyzs.entity.WellDaily;
+import cn.com.victorysoft.business.cyyzs.param.WellDailyParam;
+import cn.com.victorysoft.business.cyyzs.service.WellDailyService;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@Api(tags = "单井日报")
+@RestController
+@RequestMapping("cyyzs/well")
+public class WellDailyController {
+
+    @Resource
+    private WellDailyService wellDailyService;
+
+    @GetMapping("/page")
+    @ApiOperation("查询单井日报")
+    public PageInfo<WellDaily> selectList(WellDailyParam param) {
+        return wellDailyService.selectList(param);
+    }
+
+
+}

+ 17 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/dao/LayeredWaterDao.java

@@ -0,0 +1,17 @@
+package cn.com.victorysoft.business.cyyzs.dao;
+
+
+import cn.com.victorysoft.business.cyyzs.entity.LayeredWater;
+import cn.com.victorysoft.business.cyyzs.entity.StaticData;
+import cn.com.victorysoft.business.cyyzs.param.LayeredWaterParam;
+import cn.com.victorysoft.business.cyyzs.param.StaticDataParam;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface LayeredWaterDao {
+
+    List<LayeredWater> selectList(LayeredWaterParam param);
+
+}

+ 15 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/dao/WellDailyDao.java

@@ -0,0 +1,15 @@
+package cn.com.victorysoft.business.cyyzs.dao;
+
+
+import cn.com.victorysoft.business.cyyzs.entity.WellDaily;
+import cn.com.victorysoft.business.cyyzs.param.WellDailyParam;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface WellDailyDao {
+
+    List<WellDaily> selectList(WellDailyParam param);
+
+}

+ 40 - 39
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/entity/LayeredWater.java

@@ -16,17 +16,7 @@ public class LayeredWater implements Serializable {
     /**
      * 日期
      */
-    private String RECORD_DATE;
-
-    /**
-     * 单位代码
-     */
-    private String UNITCODE;
-
-    /**
-     * 区块代码
-     */
-    private String QKDM;
+    private String recordDate;
 
     /**
      * 单位代码
@@ -39,14 +29,14 @@ public class LayeredWater implements Serializable {
     private String dwmc;
 
     /**
-     * 油田代码
+     * 区块代码
      */
-    private String ytdm;
+    private String qkdm;
 
     /**
-     * 变更日期
+     * 区块名称
      */
-    private Date bgrq;
+    private String qkmc;
 
     /**
      * 油藏类型
@@ -59,64 +49,75 @@ public class LayeredWater implements Serializable {
     private String yclxmc;
 
     /**
-     * 生产层位
+     * 工艺类型
+     */
+    private String gylx;
+
+    /**
+     * 工艺类型名称
      */
-    private String sccw;
+    private String gylxmc;
 
     /**
-     * 层数
+     * 井号
      */
-    private BigDecimal cs;
+    private String wellname;
 
     /**
-     * 原始地层压力
+     * 层位
      */
-    private BigDecimal ysdcyl;
+    private String layer;
 
     /**
-     * 原始地层温度
+     * 日配注量
      */
-    private BigDecimal ysdcwd;
+    private BigDecimal planDailyWater;
 
     /**
-     * 原始饱和压力
+     * 泵压
      */
-    private BigDecimal ysbhyl;
+    private BigDecimal pp;
 
     /**
-     * 注水井段顶深
+     * 套压
      */
-    private BigDecimal zsjdds;
+    private BigDecimal pc;
 
     /**
-     * 注水井段底深
+     * 油压
      */
-    private BigDecimal zsjddis;
+    private BigDecimal pt;
 
     /**
-     * 油藏中深
+     * 日注水量
      */
-    private BigDecimal yczs;
+    private BigDecimal dailyWater;
 
     /**
-     * 套管规格
+     * 累计注水量
      */
-    private BigDecimal tggg;
+    private BigDecimal ljzsl;
 
     /**
-     * 井斜
+     * 累计注水时间
      */
-    private BigDecimal jx;
+    private BigDecimal ljzssj;
 
     /**
-     * 最大层间压差
+     * 日注能力
      */
-    private BigDecimal zdcjyc;
+    private BigDecimal rznl;
 
     /**
-     * 砂层厚度
+     * 差值
      */
-    private BigDecimal sthd;
+    private BigDecimal cz;
+
+    /**
+     * 分析评价
+     */
+    private BigDecimal fxpj;
+
 
     private static final long serialVersionUID = 1L;
 }

+ 84 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/entity/WellDaily.java

@@ -0,0 +1,84 @@
+package cn.com.victorysoft.business.cyyzs.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 
+ * 单井日报
+ */
+@Data
+public class WellDaily implements Serializable {
+
+    /**
+     * 日期
+     */
+    private Date rq;
+
+    /**
+     * 井号
+     */
+    private String jh;
+
+    /**
+     * 生产时间
+     */
+    private BigDecimal scsj;
+
+    /**
+     * 泵压
+     */
+    private String by;
+
+    /**
+     * 干压
+     */
+    private BigDecimal gxyl;
+
+    /**
+     * 油压
+     */
+    private BigDecimal yy;
+
+    /**
+     * 套压
+     */
+    private BigDecimal ty;
+
+    /**
+     * 日注水量
+     */
+    private BigDecimal rzsl;
+
+    /**
+     * 日配注量
+     */
+    private BigDecimal rpzsl;
+
+    /**
+     * 注入段
+     */
+    private String zrd;
+
+    /**
+     * 开始时间
+     */
+    private String kssj;
+
+    /**
+     * 结束时间
+     */
+    private String jssj;
+
+    /**
+     * 备注
+     */
+    private String bz;
+
+
+
+    private static final long serialVersionUID = 1L;
+}

+ 42 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/param/LayeredWaterParam.java

@@ -0,0 +1,42 @@
+package cn.com.victorysoft.business.cyyzs.param;
+
+import cn.com.victorysoft.business.sys.param.PageParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@ApiModel("分层注水评价参数")
+@Data
+public class LayeredWaterParam extends PageParam {
+
+    @ApiModelProperty("单位")
+    private String unitcode;
+
+    @ApiModelProperty("单元")
+    private String blockcode;
+
+    @ApiModelProperty("油藏类型")
+    private String oiltype;
+
+    @ApiModelProperty("工艺类型")
+    private String crafttype;
+
+    @ApiModelProperty("井号")
+    private String wellname;
+
+    @ApiModelProperty("开始日期")
+    private Date startdate;
+
+    @ApiModelProperty("结束日期")
+    private Date enddate;
+
+    @ApiModelProperty("分析评价")
+    private String evaluation;
+
+
+
+
+
+}

+ 23 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/param/WellDailyParam.java

@@ -0,0 +1,23 @@
+package cn.com.victorysoft.business.cyyzs.param;
+
+import cn.com.victorysoft.business.sys.param.PageParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@ApiModel("单井日报参数")
+@Data
+public class WellDailyParam extends PageParam {
+
+    @ApiModelProperty("井号")
+    private String wellname;
+
+    @ApiModelProperty("开始日期")
+    private Date startdate;
+
+    @ApiModelProperty("结束日期")
+    private Date enddate;
+
+}

+ 29 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/service/LayeredWaterService.java

@@ -0,0 +1,29 @@
+package cn.com.victorysoft.business.cyyzs.service;
+
+import cn.com.victorysoft.business.cyyzs.dao.LayeredWaterDao;
+import cn.com.victorysoft.business.cyyzs.entity.LayeredWater;
+import cn.com.victorysoft.business.cyyzs.entity.StaticData;
+import cn.com.victorysoft.business.cyyzs.param.LayeredWaterParam;
+import cn.com.victorysoft.business.util.PageUtils;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Slf4j
+@Service
+public class LayeredWaterService {
+
+    @Resource
+    private LayeredWaterDao layeredWaterDao;
+
+    /**
+     * 查询分层注水评价
+     */
+    public PageInfo<LayeredWater> selectList(LayeredWaterParam param) {
+        PageUtils.startPage(param);
+        return new PageInfo<>(layeredWaterDao.selectList(param));
+    }
+
+}

+ 28 - 0
vseaf4.4-cyyzs/src/main/java/cn/com/victorysoft/business/cyyzs/service/WellDailyService.java

@@ -0,0 +1,28 @@
+package cn.com.victorysoft.business.cyyzs.service;
+
+import cn.com.victorysoft.business.cyyzs.dao.WellDailyDao;
+import cn.com.victorysoft.business.cyyzs.entity.WellDaily;
+import cn.com.victorysoft.business.cyyzs.param.WellDailyParam;
+import cn.com.victorysoft.business.util.PageUtils;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Slf4j
+@Service
+public class WellDailyService {
+
+    @Resource
+    private WellDailyDao wellDailyDao;
+
+    /**
+     * 查询分层注水评价
+     */
+    public PageInfo<WellDaily> selectList(WellDailyParam param) {
+        PageUtils.startPage(param);
+        return new PageInfo<>(wellDailyDao.selectList(param));
+    }
+
+}

+ 67 - 0
vseaf4.4-cyyzs/src/main/resources/mapper/LayeredWaterDao.xml

@@ -0,0 +1,67 @@
+<?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="cn.com.victorysoft.business.cyyzs.dao.LayeredWaterDao">
+    <sql id="Base_Column_List">
+        RECORD_DATE
+        , DWDM, su.UNITNAME DWMC, QKDM, sb.BLOCKNAME QKMC,
+        YCLX, (select flag_name from sys_flag where category_code = 'YCLX' and flag_code = yclx) YCLXMC,
+        GYLX, (select flag_name from sys_flag where category_code = 'GYLX' and flag_code = gylx) GYLXMC,
+        WELLNAME, LAYER, PLAN_DAILY_WATER, PP, PC, PT, DAILY_WATER
+    </sql>
+    <select id="selectList" parameterType="cn.com.victorysoft.business.cyyzs.param.LayeredWaterParam"
+            resultType="cn.com.victorysoft.business.cyyzs.entity.LayeredWater">
+        select * from (
+        SELECT RECORD_DATE, DWDM, su.UNITNAME DWMC, QKDM, sb.BLOCKNAME QKMC, YCLX,
+        (SELECT flag_name FROM sys_flag WHERE category_code = 'YCLX' AND flag_code = yclx) YCLXMC,
+        GYLX,
+        (SELECT flag_name FROM sys_flag WHERE category_code = 'GYLX' AND flag_code = gylx) GYLXMC,
+        WELLNAME, LAYER, PLAN_DAILY_WATER, PP, PC, PT, DAILY_WATER, SECTION
+        FROM WELL_SECTION_DAILY wsd
+        LEFT JOIN WATER_WELL_BASIC web ON wsd.WELLNAME = web.JH
+        LEFT JOIN WELL_PROCESS_TYPE wpt ON wsd.WELLNAME = wpt.JH and wpt.fwsj &lt;= #{enddate,jdbcType=VARCHAR} and rownum = '1'
+        LEFT JOIN sys_unitinfo su ON wsd.UNITCODE = su.UNITCODE
+        LEFT JOIN sys_blockinfo sb ON web.QKDM = sb.BLOCKCODE
+        WHERE RECORD_DATE = #{enddate,jdbcType=VARCHAR}
+        AND wsd.UNITCODE IN (SELECT unitcode
+        FROM SYS_UNITINFO
+        START WITH UNITCODE = '30200000'
+        CONNECT BY PRIOR UNITCODE = P_UNITCODE)) a
+        inner join
+        (select SECTION,WELLNAME,
+        ROUND(sum(DAILY_WATER), 2) ljzsl,
+        ROUND(sum(OPEN_TIME), 2) ljzssj,
+        case when sum(OPEN_TIME) = '0' then 0 when sum(OPEN_TIME) = null then 0 else
+        ROUND(sum(DAILY_WATER)/sum(OPEN_TIME), 2) end rznl,
+        case when sum(PLAN_DAILY_WATER) = '0' then 0 when sum(PLAN_DAILY_WATER) = null then 0 else
+        ROUND((sum(DAILY_WATER)/sum(PLAN_DAILY_WATER)), 2) end cz,
+        case
+        when sum(OPEN_TIME) = '0' then 0 when sum(OPEN_TIME) = null then 0
+        when sum(PLAN_DAILY_WATER) = '0' then 0 when sum(PLAN_DAILY_WATER) = null then 0
+        else ROUND((sum(DAILY_WATER)/sum(OPEN_TIME))/sum(PLAN_DAILY_WATER), 2) end fxpj
+        from WELL_SECTION_DAILY
+        WHERE RECORD_DATE >= #{startdate,jdbcType=VARCHAR} AND RECORD_DATE &lt;= #{enddate,jdbcType=VARCHAR}
+        group by SECTION,WELLNAME) b on a.SECTION = b.SECTION and a.WELLNAME = b.WELLNAME
+        where
+            a.DWDM in (select unitcode
+            from SYS_UNITINFO
+            start with UNITCODE = #{unitcode,jdbcType=VARCHAR}
+            connect by prior UNITCODE = P_UNITCODE)
+        <if test="blockcode != null and blockcode != ''">
+            and a.QKDM = #{blockcode,jdbcType=VARCHAR}
+        </if>
+        <if test="oiltype != null and oiltype != ''">
+            and a.YCLX = #{oiltype,jdbcType=VARCHAR}
+        </if>
+        <if test="crafttype != null and crafttype != ''">
+            and a.GYLX = #{crafttype,jdbcType=VARCHAR}
+        </if>
+        <if test="wellname != null and wellname != ''">
+            and a.WELLNAME = #{wellname,jdbcType=VARCHAR}
+        </if>
+        <if test="evaluation != null and evaluation != ''">
+
+        </if>
+        order by a.WELLNAME
+    </select>
+
+</mapper>

+ 4 - 26
vseaf4.4-cyyzs/src/main/resources/mapper/StaticDataDao.xml

@@ -1,40 +1,18 @@
 <?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="cn.com.victorysoft.business.cyyzs.dao.StaticDataDao">
-    <resultMap id="BaseResultMap" type="cn.com.victorysoft.business.cyyzs.entity.StaticData">
-        <id column="JH" jdbcType="VARCHAR" property="jh"/>
-        <result column="QKDM" jdbcType="VARCHAR" property="qkdm"/>
-        <result column="DWDM" jdbcType="VARCHAR" property="dwdm"/>
-        <result column="DWMC" jdbcType="VARCHAR" property="dwmc"/>
-        <result column="YTDM" jdbcType="VARCHAR" property="ytdm"/>
-        <result column="BGRQ" jdbcType="TIMESTAMP" property="bgrq"/>
-        <result column="YCLX" jdbcType="VARCHAR" property="yclx"/>
-        <result column="SCCW" jdbcType="VARCHAR" property="sccw"/>
-        <result column="CS" jdbcType="DECIMAL" property="cs"/>
-        <result column="YSDCYL" jdbcType="DECIMAL" property="ysdcyl"/>
-        <result column="YSDCWD" jdbcType="DECIMAL" property="ysdcwd"/>
-        <result column="YSBHYL" jdbcType="DECIMAL" property="ysbhyl"/>
-        <result column="ZSJDDS" jdbcType="DECIMAL" property="zsjdds"/>
-        <result column="ZSJDDIS" jdbcType="DECIMAL" property="zsjddis"/>
-        <result column="YCZS" jdbcType="DECIMAL" property="yczs"/>
-        <result column="TGGG" jdbcType="DECIMAL" property="tggg"/>
-        <result column="JX" jdbcType="DECIMAL" property="jx"/>
-        <result column="ZDCJYC" jdbcType="DECIMAL" property="zdcjyc"/>
-        <result column="STHD" jdbcType="DECIMAL" property="sthd"/>
-    </resultMap>
     <sql id="Base_Column_List">
         JH, QKDM, DWDM, DWMC, YTDM, BGRQ, YCLX, SCCW, CS, YSDCYL, YSDCWD, YSBHYL, ZSJDDS, ZSJDDIS, YCZS,
-        TGGG, JX, ZDCJYC, STHD, c.BLOCKNAME qkmc,
+        TGGG, JX, ZDCJYC, STHD, sb.BLOCKNAME qkmc,
         (select flag_name from sys_flag where category_code = 'YCLX' and flag_code = yclx) yclxmc
     </sql>
     <select id="selectList" parameterType="cn.com.victorysoft.business.cyyzs.param.StaticDataParam"
             resultType="cn.com.victorysoft.business.cyyzs.entity.StaticData">
         select
         <include refid="Base_Column_List"/>
-        from WATER_WELL_BASIC a
-        left join sys_unitinfo b on a.dwdm = b.unitcode
-        left join sys_blockinfo c on a.qkdm = c.blockcode
-        where BGRQ = #{testdate,jdbcType=VARCHAR}
+        from WATER_WELL_BASIC web
+        left join sys_blockinfo sb on web.qkdm = sb.blockcode
+        where BGRQ = #{testdate,jdbcType=TIMESTAMP}
         <if test="unitcode != null and unitcode != ''">
             and DWDM in (select unitcode
             from SYS_UNITINFO

+ 20 - 0
vseaf4.4-cyyzs/src/main/resources/mapper/WellDailyDao.xml

@@ -0,0 +1,20 @@
+<?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="cn.com.victorysoft.business.cyyzs.dao.WellDailyDao">
+    <sql id="Base_Column_List">
+        RQ, JH, SCSJ, GXYL, YY, TY, RZSL, RPZSL, BZ
+    </sql>
+    <select id="selectList" parameterType="cn.com.victorysoft.business.cyyzs.param.WellDailyParam"
+            resultType="cn.com.victorysoft.business.cyyzs.entity.WellDaily">
+        select
+        <include refid="Base_Column_List"/>
+        from YS_DBA02
+        where RQ >= #{startdate,jdbcType=TIMESTAMP}
+          and RQ &lt;= #{enddate,jdbcType=TIMESTAMP}
+        <if test="wellname != null and wellname != ''">
+            and JH = #{wellname,jdbcType=VARCHAR}
+        </if>
+        order by jh
+    </select>
+
+</mapper>

+ 2 - 2
vseaf4.4-sys/src/main/resources/mapper/SysBlockinfoDao.xml

@@ -21,8 +21,8 @@
     <select id="selectByUnitBlock" resultType="SysBlockinfo" fetchSize="20">
         select distinct sb.BLOCKCODE, sb.BLOCKNAME
         from SYS_BLOCKINFO sb, water_well_basic wb
-        where sb.BLOCKCODE = wb.BLOCKCODE
-        and wb.unitcode in
+        where sb.BLOCKCODE = wb.QKDM
+        and wb.DWDM in
         (select unitcode
         from SYS_UNITINFO
         start with UNITCODE = #{unitcode}