Commit a7bafbff by jiang'yun

修改

parent 1e5ec82f
......@@ -2,12 +2,11 @@ package com.ruoyi.project.zt.controller;
import cn.hutool.http.HttpRequest;
import com.google.gson.*;
import com.ruoyi.framework.util.JsonToMarkdown;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.zt.domian.CommonParam;
import com.ruoyi.project.zt.domian.DjDcInfo;
import com.ruoyi.project.zt.domian.Djjc;
import com.ruoyi.project.zt.domian.Ljinfo;
import com.ruoyi.project.zt.domain.CommonParam;
import com.ruoyi.project.zt.domain.DjDcInfo;
import com.ruoyi.project.zt.domain.Djjc;
import com.ruoyi.project.zt.domain.Ljinfo;
import com.ruoyi.project.zt.service.DjdcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -53,7 +52,7 @@ public class DjdcController {
Map<String,Object> map =new HashMap<>();
switch (path) {
case "getDjjcList":
//获取邻井基础信息
//获取钻头关键数据
map.put("jh","井号");
map.put("kc","开次");
map.put("jd","井段");
......@@ -135,6 +134,40 @@ public class DjdcController {
map.put("zjjjss","直接损失");
map.put("js","井深");
return AjaxResult.success( djdcService.getJsqaList(param),map);
case "getDjZtfxList":
//获取钻头分析
map.put("kc","开次");
map.put("ztxh","钻头型号");
map.put("cc","外径");
map.put("ztsl","钻头数量(钻头使用频次)");
map.put("ytzl","一趟钻率");
map.put("etzl","二趟钻率");
map.put("stzl","三趟钻率");
map.put("sitzl","四趟钻率");
map.put("wtzl","五趟钻率");
map.put("jcZw","进尺中位数");
map.put("jcMax","进尺最大值");
map.put("jxzsZw","机械钻速中位数");
map.put("jxzsMax","机械钻速最大值");
map.put("qsjsZw","起出井深中位数");
return AjaxResult.success( djdcService.getDjZtfxList(param),map);
case "calZtzhdf":
//计算钻头综合得分
// map.put("kc","开次");
// map.put("ztxh","钻头型号");
// map.put("cc","外径");
// map.put("ztsl","钻头数量(钻头使用频次)");
// map.put("ytzl","一趟钻率");
// map.put("etzl","二趟钻率");
// map.put("stzl","三趟钻率");
// map.put("sitzl","四趟钻率");
// map.put("wtzl","五趟钻率");
// map.put("jcZw","进尺中位数");
// map.put("jcMax","进尺最大值");
// map.put("jxzsZw","机械钻速中位数");
// map.put("jxzsMax","机械钻速最大值");
// map.put("qsjsZw","起出井深中位数");
return AjaxResult.success( djdcService.calZtzhdf(param));
default:
return AjaxResult.success();
}
......
package com.ruoyi.project.zt.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zt.domain.LjSzfxjg;
import com.ruoyi.project.zt.service.ILjSzfxjgService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 邻井-实钻分析结果Controller
*
* @author ruoyi
* @date 2025-06-29
*/
@RestController
@RequestMapping("/system/ljSzfxjg")
public class LjSzfxjgController extends BaseController
{
@Autowired
private ILjSzfxjgService ljSzfxjgService;
/**
* 查询邻井-实钻分析结果列表
*/
@PreAuthorize("@ss.hasPermi('system:ljSzfxjg:list')")
@GetMapping("/list")
public TableDataInfo list(LjSzfxjg ljSzfxjg)
{
startPage();
List<LjSzfxjg> list = ljSzfxjgService.selectLjSzfxjgList(ljSzfxjg);
return getDataTable(list);
}
/**
* 导出邻井-实钻分析结果列表
*/
@PreAuthorize("@ss.hasPermi('system:ljSzfxjg:export')")
@Log(title = "邻井-实钻分析结果", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, LjSzfxjg ljSzfxjg)
{
List<LjSzfxjg> list = ljSzfxjgService.selectLjSzfxjgList(ljSzfxjg);
ExcelUtil<LjSzfxjg> util = new ExcelUtil<LjSzfxjg>(LjSzfxjg.class);
util.exportExcel(response, list, "邻井-实钻分析结果数据");
}
/**
* 获取邻井-实钻分析结果详细信息
*/
@PreAuthorize("@ss.hasPermi('system:ljSzfxjg:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(ljSzfxjgService.selectLjSzfxjgById(id));
}
/**
* 新增邻井-实钻分析结果
*/
@PreAuthorize("@ss.hasPermi('system:ljSzfxjg:add')")
@Log(title = "邻井-实钻分析结果", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody LjSzfxjg ljSzfxjg)
{
return toAjax(ljSzfxjgService.insertLjSzfxjg(ljSzfxjg));
}
/**
* 修改邻井-实钻分析结果
*/
@PreAuthorize("@ss.hasPermi('system:ljSzfxjg:edit')")
@Log(title = "邻井-实钻分析结果", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody LjSzfxjg ljSzfxjg)
{
return toAjax(ljSzfxjgService.updateLjSzfxjg(ljSzfxjg));
}
/**
* 删除邻井-实钻分析结果
*/
@PreAuthorize("@ss.hasPermi('system:ljSzfxjg:remove')")
@Log(title = "邻井-实钻分析结果", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ljSzfxjgService.deleteLjSzfxjgByIds(ids));
}
}
package com.ruoyi.project.zt.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zt.domain.LjZtzhdf;
import com.ruoyi.project.zt.service.ILjZtzhdfService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 钻头综合得分Controller
*
* @author ruoyi
* @date 2025-06-29
*/
@RestController
@RequestMapping("/system/ljZtzhdf")
public class LjZtzhdfController extends BaseController
{
@Autowired
private ILjZtzhdfService ljZtzhdfService;
/**
* 查询钻头综合得分列表
*/
@PreAuthorize("@ss.hasPermi('system:ljZtzhdf:list')")
@GetMapping("/list")
public TableDataInfo list(LjZtzhdf ljZtzhdf)
{
startPage();
List<LjZtzhdf> list = ljZtzhdfService.selectLjZtzhdfList(ljZtzhdf);
return getDataTable(list);
}
/**
* 导出钻头综合得分列表
*/
@PreAuthorize("@ss.hasPermi('system:ljZtzhdf:export')")
@Log(title = "钻头综合得分", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, LjZtzhdf ljZtzhdf)
{
List<LjZtzhdf> list = ljZtzhdfService.selectLjZtzhdfList(ljZtzhdf);
ExcelUtil<LjZtzhdf> util = new ExcelUtil<LjZtzhdf>(LjZtzhdf.class);
util.exportExcel(response, list, "钻头综合得分数据");
}
/**
* 获取钻头综合得分详细信息
*/
@PreAuthorize("@ss.hasPermi('system:ljZtzhdf:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(ljZtzhdfService.selectLjZtzhdfById(id));
}
/**
* 新增钻头综合得分
*/
@PreAuthorize("@ss.hasPermi('system:ljZtzhdf:add')")
@Log(title = "钻头综合得分", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody LjZtzhdf ljZtzhdf)
{
return toAjax(ljZtzhdfService.insertLjZtzhdf(ljZtzhdf));
}
/**
* 修改钻头综合得分
*/
@PreAuthorize("@ss.hasPermi('system:ljZtzhdf:edit')")
@Log(title = "钻头综合得分", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody LjZtzhdf ljZtzhdf)
{
return toAjax(ljZtzhdfService.updateLjZtzhdf(ljZtzhdf));
}
/**
* 删除钻头综合得分
*/
@PreAuthorize("@ss.hasPermi('system:ljZtzhdf:remove')")
@Log(title = "钻头综合得分", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ljZtzhdfService.deleteLjZtzhdfByIds(ids));
}
}
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import com.ruoyi.project.zt.domain.vo.SjInfo;
import lombok.Data;
import java.util.List;
......@@ -7,10 +8,18 @@ import java.util.List;
@Data
public class CommonParam {
//接口路径
private String path;
//井号
private String jh;
//区块名称
private String qk;
//设计井信息
private List<SjInfo> sj;
//开始完井时间
private String wjsjks;
//结束完井时间
......@@ -37,4 +46,7 @@ public class CommonParam {
private String[] jhs;
}
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domain;
import lombok.Data;
@Data
public class DjZtfx {
//开次
private String kc;
//钻头型号
private String ztxh;
//外径
private Double cc;
//钻头数量(钻头使用频次)
private Integer ztsl;
//一趟钻率
private Double ytzl;
private Double etzl;
private Double stzl;
private Double sitzl;
private Double wtzl;
//进尺中位数
private Double jcZw;
//进尺最大值
private Double jcMax;
//机械钻速中位数
private Double jxzsZw;
//机械钻速最大值
private Double jxzsMax;
//起出井深中位数
private Double qsjsZw;
}
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......@@ -22,6 +22,10 @@ public class Djjc {
//井底纵坐标
private Double jdzzb;
private Double ksjs;
private Double js;
//开次
private String kc;
......@@ -40,6 +44,9 @@ public class Djjc {
//钻头型号
private String ztxh;
//钻头外径
private Double ztcc;
//喷嘴
private String pz;
......@@ -50,7 +57,15 @@ public class Djjc {
private String qzyy;
//指标
private String zb;
private Double zb;
//钻井液密度
private Double zjymd;
//泵压
private Double lgby;
//排量
private Double pl;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 邻井-实钻分析结果对象 lj_szfxjg
*
* @author ruoyi
* @date 2025-06-29
*/
public class LjSzfxjg extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 功能模块 */
@Excel(name = "功能模块")
private String gnmk;
/** 分析范围 */
@Excel(name = "分析范围")
private String fxfw;
/** 分析对象 */
@Excel(name = "分析对象")
private String fxdx;
/** 分析现象 */
@Excel(name = "分析现象")
private String fxxy;
/** 分析结论 */
@Excel(name = "分析结论")
private String fxjl;
/** 输出方向 */
@Excel(name = "输出方向")
private String scfx;
/** 优选依据 */
@Excel(name = "优选依据")
private String yxyj;
/** 最优建议 */
@Excel(name = "最优建议")
private String zyjy;
/** 其次建议 */
@Excel(name = "其次建议")
private String qcyj;
/** 推荐评分 */
@Excel(name = "推荐评分")
private Double tjpf;
/** 详细参数 */
@Excel(name = "详细参数")
private String xxcs;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setGnmk(String gnmk)
{
this.gnmk = gnmk;
}
public String getGnmk()
{
return gnmk;
}
public void setFxfw(String fxfw)
{
this.fxfw = fxfw;
}
public String getFxfw()
{
return fxfw;
}
public void setFxdx(String fxdx)
{
this.fxdx = fxdx;
}
public String getFxdx()
{
return fxdx;
}
public void setFxxy(String fxxy)
{
this.fxxy = fxxy;
}
public String getFxxy()
{
return fxxy;
}
public void setFxjl(String fxjl)
{
this.fxjl = fxjl;
}
public String getFxjl()
{
return fxjl;
}
public void setScfx(String scfx)
{
this.scfx = scfx;
}
public String getScfx()
{
return scfx;
}
public void setYxyj(String yxyj)
{
this.yxyj = yxyj;
}
public String getYxyj()
{
return yxyj;
}
public void setZyjy(String zyjy)
{
this.zyjy = zyjy;
}
public String getZyjy()
{
return zyjy;
}
public void setQcyj(String qcyj)
{
this.qcyj = qcyj;
}
public String getQcyj()
{
return qcyj;
}
public void setTjpf(Double tjpf)
{
this.tjpf = tjpf;
}
public Double getTjpf()
{
return tjpf;
}
public void setXxcs(String xxcs)
{
this.xxcs = xxcs;
}
public String getXxcs()
{
return xxcs;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("gnmk", getGnmk())
.append("fxfw", getFxfw())
.append("fxdx", getFxdx())
.append("fxxy", getFxxy())
.append("fxjl", getFxjl())
.append("scfx", getScfx())
.append("yxyj", getYxyj())
.append("zyjy", getZyjy())
.append("qcyj", getQcyj())
.append("tjpf", getTjpf())
.append("xxcs", getXxcs())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.ruoyi.project.zt.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 钻头综合得分对象 lj_ztzhdf
*
* @author ruoyi
* @date 2025-06-29
*/
public class LjZtzhdf extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 开次 */
@Excel(name = "开次")
private String kc;
/** 钻头型号 */
@Excel(name = "钻头型号")
private String ztxh;
/** 钻头尺寸 */
@Excel(name = "钻头尺寸")
private Double cc;
/** 进尺得分 */
@Excel(name = "进尺得分")
private Double jcdf;
/** 机速得分 */
@Excel(name = "机速得分")
private Double jsdf;
/** 指标得分 */
@Excel(name = "指标得分")
private Double zbdf;
/** 数量得分 */
@Excel(name = "数量得分")
private Double sldf;
/** 综合得分 */
@Excel(name = "综合得分")
private Double zhdf;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setKc(String kc)
{
this.kc = kc;
}
public String getKc()
{
return kc;
}
public void setZtxh(String ztxh)
{
this.ztxh = ztxh;
}
public String getZtxh()
{
return ztxh;
}
public void setCc(Double cc)
{
this.cc = cc;
}
public Double getCc()
{
return cc;
}
public void setJcdf(Double jcdf)
{
this.jcdf = jcdf;
}
public Double getJcdf()
{
return jcdf;
}
public void setJsdf(Double jsdf)
{
this.jsdf = jsdf;
}
public Double getJsdf()
{
return jsdf;
}
public void setZbdf(Double zbdf)
{
this.zbdf = zbdf;
}
public Double getZbdf()
{
return zbdf;
}
public void setSldf(Double sldf)
{
this.sldf = sldf;
}
public Double getSldf()
{
return sldf;
}
public void setZhdf(Double zhdf)
{
this.zhdf = zhdf;
}
public Double getZhdf()
{
return zhdf;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("kc", getKc())
.append("ztxh", getZtxh())
.append("cc", getCc())
.append("jcdf", getJcdf())
.append("jsdf", getJsdf())
.append("zbdf", getZbdf())
.append("sldf", getSldf())
.append("zhdf", getZhdf())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domian;
package com.ruoyi.project.zt.domain;
import lombok.Data;
......
package com.ruoyi.project.zt.domain.vo;
import lombok.Data;
@Data
public class SjInfo {
//开次
private String kc;
//钻头尺寸
private Double ztcc;
//功能模块
private String gnmk;
//一趟钻率
private Double ytzl ;
private String ztxh;
//进尺
private Double jc;
//机速
private Double js;
//指标
private Double zb;
//数量
private Integer sl;
private Double jcScore;
private Double jsScore;
private Double slScore;
private Double zbScore;
private Double totalScore;
}
package com.ruoyi.project.zt.mapper;
import com.ruoyi.project.zt.domian.*;
import com.ruoyi.project.zt.domain.*;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......@@ -31,4 +31,7 @@ public interface DjdcInfoMapper {
List<Ljjw> getLjjwList(CommonParam param);
List<DjZtfx> getDjZtfxList(CommonParam param);
}
package com.ruoyi.project.zt.mapper;
import com.ruoyi.project.zt.domian.CommonParam;
import com.ruoyi.project.zt.domian.Jsqa;
import com.ruoyi.project.zt.domain.CommonParam;
import com.ruoyi.project.zt.domain.Jsqa;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......
package com.ruoyi.project.zt.mapper;
import com.ruoyi.project.zt.domian.Jsta;
import com.ruoyi.project.zt.domain.Jsta;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......
package com.ruoyi.project.zt.mapper;
import com.ruoyi.project.zt.domian.Jswa;
import com.ruoyi.project.zt.domain.Jswa;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......@@ -11,4 +11,7 @@ public interface JswaMapper {
List<Jswa> getList(Jswa jswa);
Jswa selectMd(Jswa jswapa);
}
package com.ruoyi.project.zt.mapper;
import java.util.List;
import com.ruoyi.project.zt.domain.LjSzfxjg;
/**
* 邻井-实钻分析结果Mapper接口
*
* @author ruoyi
* @date 2025-06-29
*/
public interface LjSzfxjgMapper
{
/**
* 查询邻井-实钻分析结果
*
* @param id 邻井-实钻分析结果主键
* @return 邻井-实钻分析结果
*/
public LjSzfxjg selectLjSzfxjgById(Long id);
/**
* 查询邻井-实钻分析结果列表
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 邻井-实钻分析结果集合
*/
public List<LjSzfxjg> selectLjSzfxjgList(LjSzfxjg ljSzfxjg);
/**
* 新增邻井-实钻分析结果
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 结果
*/
public int insertLjSzfxjg(LjSzfxjg ljSzfxjg);
/**
* 修改邻井-实钻分析结果
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 结果
*/
public int updateLjSzfxjg(LjSzfxjg ljSzfxjg);
/**
* 删除邻井-实钻分析结果
*
* @param id 邻井-实钻分析结果主键
* @return 结果
*/
public int deleteLjSzfxjgById(Long id);
/**
* 批量删除邻井-实钻分析结果
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteLjSzfxjgByIds(Long[] ids);
int batchLjSzfxjg(List<LjSzfxjg> ljSzfxjgList);
}
package com.ruoyi.project.zt.mapper;
import java.util.List;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zt.domain.LjZtzhdf;
/**
* 钻头综合得分Mapper接口
*
* @author ruoyi
* @date 2025-06-29
*/
@DataSource(value = DataSourceType.MASTER)
public interface LjZtzhdfMapper
{
/**
* 查询钻头综合得分
*
* @param id 钻头综合得分主键
* @return 钻头综合得分
*/
public LjZtzhdf selectLjZtzhdfById(Long id);
/**
* 查询钻头综合得分列表
*
* @param ljZtzhdf 钻头综合得分
* @return 钻头综合得分集合
*/
public List<LjZtzhdf> selectLjZtzhdfList(LjZtzhdf ljZtzhdf);
/**
* 新增钻头综合得分
*
* @param ljZtzhdf 钻头综合得分
* @return 结果
*/
public int insertLjZtzhdf(LjZtzhdf ljZtzhdf);
/**
* 修改钻头综合得分
*
* @param ljZtzhdf 钻头综合得分
* @return 结果
*/
public int updateLjZtzhdf(LjZtzhdf ljZtzhdf);
/**
* 删除钻头综合得分
*
* @param id 钻头综合得分主键
* @return 结果
*/
public int deleteLjZtzhdfById(Long id);
/**
* 批量删除钻头综合得分
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteLjZtzhdfByIds(Long[] ids);
int batchLjZtzhdf(List<LjZtzhdf> list);
}
package com.ruoyi.project.zt.service;
import com.ruoyi.project.zt.domian.*;
import com.ruoyi.project.zt.domain.*;
import com.ruoyi.project.zt.domain.vo.SjInfo;
import java.text.ParseException;
import java.util.List;
public interface DjdcService {
......@@ -28,4 +28,7 @@ public interface DjdcService {
List<Jsqa> getJsqaList(CommonParam param);
List<DjZtfx> getDjZtfxList(CommonParam param);
List<LjZtzhdf> calZtzhdf(CommonParam param);
}
package com.ruoyi.project.zt.service;
import java.util.List;
import com.ruoyi.project.zt.domain.LjSzfxjg;
/**
* 邻井-实钻分析结果Service接口
*
* @author ruoyi
* @date 2025-06-29
*/
public interface ILjSzfxjgService
{
/**
* 查询邻井-实钻分析结果
*
* @param id 邻井-实钻分析结果主键
* @return 邻井-实钻分析结果
*/
public LjSzfxjg selectLjSzfxjgById(Long id);
/**
* 查询邻井-实钻分析结果列表
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 邻井-实钻分析结果集合
*/
public List<LjSzfxjg> selectLjSzfxjgList(LjSzfxjg ljSzfxjg);
/**
* 新增邻井-实钻分析结果
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 结果
*/
public int insertLjSzfxjg(LjSzfxjg ljSzfxjg);
/**
* 修改邻井-实钻分析结果
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 结果
*/
public int updateLjSzfxjg(LjSzfxjg ljSzfxjg);
/**
* 批量删除邻井-实钻分析结果
*
* @param ids 需要删除的邻井-实钻分析结果主键集合
* @return 结果
*/
public int deleteLjSzfxjgByIds(Long[] ids);
/**
* 删除邻井-实钻分析结果信息
*
* @param id 邻井-实钻分析结果主键
* @return 结果
*/
public int deleteLjSzfxjgById(Long id);
}
package com.ruoyi.project.zt.service;
import java.util.List;
import com.ruoyi.project.zt.domain.LjZtzhdf;
/**
* 钻头综合得分Service接口
*
* @author ruoyi
* @date 2025-06-29
*/
public interface ILjZtzhdfService
{
/**
* 查询钻头综合得分
*
* @param id 钻头综合得分主键
* @return 钻头综合得分
*/
public LjZtzhdf selectLjZtzhdfById(Long id);
/**
* 查询钻头综合得分列表
*
* @param ljZtzhdf 钻头综合得分
* @return 钻头综合得分集合
*/
public List<LjZtzhdf> selectLjZtzhdfList(LjZtzhdf ljZtzhdf);
/**
* 新增钻头综合得分
*
* @param ljZtzhdf 钻头综合得分
* @return 结果
*/
public int insertLjZtzhdf(LjZtzhdf ljZtzhdf);
/**
* 修改钻头综合得分
*
* @param ljZtzhdf 钻头综合得分
* @return 结果
*/
public int updateLjZtzhdf(LjZtzhdf ljZtzhdf);
/**
* 批量删除钻头综合得分
*
* @param ids 需要删除的钻头综合得分主键集合
* @return 结果
*/
public int deleteLjZtzhdfByIds(Long[] ids);
/**
* 删除钻头综合得分信息
*
* @param id 钻头综合得分主键
* @return 结果
*/
public int deleteLjZtzhdfById(Long id);
}
......@@ -7,23 +7,21 @@ import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zt.domian.*;
import com.ruoyi.project.zt.mapper.DjdcInfoMapper;
import com.ruoyi.project.zt.mapper.JsqaMapper;
import com.ruoyi.project.zt.mapper.JstaMapper;
import com.ruoyi.project.zt.mapper.JswaMapper;
import com.ruoyi.project.zt.domain.*;
import com.ruoyi.project.zt.domain.vo.SjInfo;
import com.ruoyi.project.zt.mapper.*;
import com.ruoyi.project.zt.service.DjdcService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -43,6 +41,12 @@ public class DjdcServiceImpl implements DjdcService {
@Autowired
private JsqaMapper jsqaMapper;
@Autowired
private LjZtzhdfMapper ljZtzhdfMapper;
@Autowired
private LjSzfxjgMapper ljSzfxjgMapper;
@Override
public List<DjDcInfo> getList(DjDcInfo info) {
......@@ -96,6 +100,14 @@ public class DjdcServiceImpl implements DjdcService {
List<Djjc> list =djdcInfoMapper.getDjjcList(param);
for(Djjc item:list){
//查询密度
Jswa jswapa=new Jswa();
jswapa.setJh(item.getJh());
jswapa.setJs(item.getJs());
Jswa md=jswaMapper.selectMd(jswapa);
if(md!=null){
item.setZjymd(md.getMd());
}
Map<Integer, Integer> valueCountMap = new TreeMap<>(); // 使用TreeMap自动按值排序
//判断喷嘴
......@@ -823,8 +835,9 @@ public class DjdcServiceImpl implements DjdcService {
String result2 = HttpRequest.get(url).execute().body();
System.out.println(result2);
//模拟返回值
// 模拟返回值
List<Map<String, Object>> mapList = processJson(result2);
// List<Map<String, Object>> mapList = processJson(jsonString);
List<Map<String, Object>> jh = mapList.stream().filter(it -> param.getJh().equals(it.get("JH").toString())).collect(Collectors.toList());
......@@ -1303,6 +1316,291 @@ public class DjdcServiceImpl implements DjdcService {
return jsqaMapper.getJsqaList(param);
}
@Override
public List<DjZtfx> getDjZtfxList(CommonParam param) {
return djdcInfoMapper.getDjZtfxList(param);
}
@Override
public List<LjZtzhdf> calZtzhdf(CommonParam param) {
List<LjZtzhdf> ljZtzhdfList=new ArrayList<>();
List<LjSzfxjg> ljSzfxjgList=new ArrayList<>();
if(StringUtils.isNotEmpty(param.getJh())){
String[] jhs = param.getJh().split(",");
param.setJhs(jhs);
}
//根据qk获取钻头分析
List<DjZtfx> djZtfxList = djdcInfoMapper.getDjZtfxList(param);
//根据井号取钻头关键数据
List<Djjc> djjcList = getDjjcList(param);
DecimalFormat df = new DecimalFormat("#.00");
List<SjInfo> sjInfoList = param.getSj();
for(SjInfo info :sjInfoList){
List<SjInfo> reList =new ArrayList<>();
//钻头分析模块
List<DjZtfx> collect = djZtfxList.stream().filter(ztfx -> equals(ztfx.getCc(), info.getZtcc()) && info.getKc().equals(ztfx.getKc())).collect(Collectors.toList());
//按使用数量排序
List<DjZtfx> ztslList=collect.stream()
.sorted(Comparator.comparingInt(DjZtfx::getZtsl).reversed()).collect(Collectors.toList());
int size=0;
if(ztslList.size()>3){
size=3;
}else {
size=ztslList.size();
}
for(int i =0;i<size;i++){
DjZtfx djZtfx = ztslList.get(i);
SjInfo sjInfo=new SjInfo();
sjInfo.setKc(djZtfx.getKc());
sjInfo.setZtcc(djZtfx.getCc());
sjInfo.setZtxh(djZtfx.getZtxh());
sjInfo.setJc(djZtfx.getJcMax());
sjInfo.setJs(djZtfx.getJxzsMax());
sjInfo.setZb(0.0);
sjInfo.setSl(djZtfx.getZtsl());
sjInfo.setGnmk("钻头分析区块");
sjInfo.setYtzl(djZtfx.getYtzl());
reList.add(sjInfo);
}
//按使用数量排序
List<DjZtfx> zjlList=collect.stream()
.sorted(Comparator.comparingDouble(DjZtfx::getYtzl).reversed()).collect(Collectors.toList());
if(zjlList.size()>3){
size=3;
}else {
size=zjlList.size();
}
for(int i =0;i<size;i++){
DjZtfx djZtfx = zjlList.get(i);
SjInfo sjInfo=new SjInfo();
sjInfo.setKc(djZtfx.getKc());
sjInfo.setZtcc(djZtfx.getCc());
sjInfo.setZtxh(djZtfx.getZtxh());
sjInfo.setJc(djZtfx.getJcMax());
sjInfo.setJs(djZtfx.getJxzsMax());
sjInfo.setZb(0.0);
sjInfo.setSl(djZtfx.getZtsl());
sjInfo.setGnmk("钻头分析区块");
sjInfo.setYtzl(djZtfx.getYtzl());
reList.add(sjInfo);
}
List<SjInfo> collect1 = reList.stream().distinct().collect(Collectors.toList());
//计算得分
calculateScores(collect1);
// 按进尺降序排序
List<SjInfo> jcSorted = collect1.stream()
.sorted(Comparator.comparingDouble(SjInfo::getJc).reversed())
.collect(Collectors.toList());
LjSzfxjg ljSzfxjg=new LjSzfxjg();
ljSzfxjg.setGnmk("钻头分析区块");
ljSzfxjg.setFxfw(info.getKc()+"开");
ljSzfxjg.setFxdx("钻头使用");
ljSzfxjg.setScfx("钻头选型");
ljSzfxjg.setYxyj("进尺最高");
if(jcSorted.size()>=2){
SjInfo sjInfo = jcSorted.get(0);
SjInfo sjInfo2 = jcSorted.get(1);
ljSzfxjg.setFxxy("钻头数量使用最多是"+sjInfo.getZtxh()+"("+sjInfo.getSl()+"只)、一趟钻率("+sjInfo.getYtzl()+"%),其次钻头数量使用最多是"+sjInfo2.getZtxh()+"("+sjInfo2.getSl()+"只),一趟钻率("+sjInfo2.getYtzl()+"%)");
ljSzfxjg.setZyjy(sjInfo.getZtxh());
ljSzfxjg.setQcyj(sjInfo2.getZtxh());
ljSzfxjg.setTjpf(Double.parseDouble(df.format(sjInfo.getTotalScore())));
}else if(jcSorted.size()==1){
SjInfo sjInfo = jcSorted.get(0);
ljSzfxjg.setFxxy("钻头数量使用最多是"+sjInfo.getZtxh()+"、一趟钻率("+sjInfo.getYtzl()+"%)");
ljSzfxjg.setZyjy(sjInfo.getZtxh());
ljSzfxjg.setTjpf(Double.parseDouble(df.format(sjInfo.getTotalScore())));
}
ljSzfxjgList.add(ljSzfxjg);
// 按机速降序排序
List<SjInfo> jsSorted = collect1.stream()
.sorted(Comparator.comparingDouble(SjInfo::getJs).reversed())
.collect(Collectors.toList());
LjSzfxjg ljSzfxjgjs=new LjSzfxjg();
ljSzfxjgjs.setGnmk("钻头分析区块");
ljSzfxjgjs.setFxfw(info.getKc()+"开");
ljSzfxjgjs.setFxdx("钻头使用");
ljSzfxjgjs.setScfx("钻头选型");
ljSzfxjgjs.setYxyj("机速最快");
if(jsSorted.size()>=2){
SjInfo sjInfo = jsSorted.get(0);
SjInfo sjInfo2 = jsSorted.get(1);
ljSzfxjgjs.setFxxy("钻头数量使用最多是"+sjInfo.getZtxh()+"("+sjInfo.getSl()+"只)、一趟钻率("+sjInfo.getYtzl()+"%),其次钻头数量使用最多是"+sjInfo2.getZtxh()+"("+sjInfo2.getSl()+"只),一趟钻率("+sjInfo2.getYtzl()+"%)");
ljSzfxjgjs.setZyjy(sjInfo.getZtxh());
ljSzfxjgjs.setQcyj(sjInfo2.getZtxh());
ljSzfxjgjs.setTjpf(Double.parseDouble(df.format(sjInfo.getTotalScore())));
}else if(jsSorted.size()==1){
SjInfo sjInfo = jsSorted.get(0);
ljSzfxjgjs.setFxxy("钻头数量使用最多是"+sjInfo.getZtxh()+"、一趟钻率("+sjInfo.getYtzl()+"%)");
ljSzfxjgjs.setZyjy(sjInfo.getZtxh());
ljSzfxjgjs.setTjpf(Double.parseDouble(df.format(sjInfo.getTotalScore())));
}
ljSzfxjgList.add(ljSzfxjgjs);
// 按数量降序排序
List<SjInfo> slSorted = collect1.stream()
.sorted(Comparator.comparingInt(SjInfo::getSl).reversed())
.collect(Collectors.toList());
LjSzfxjg ljSzfxjgSl=new LjSzfxjg();
ljSzfxjgSl.setGnmk("钻头分析区块");
ljSzfxjgSl.setFxfw(info.getKc()+"开");
ljSzfxjgSl.setFxdx("钻头使用");
ljSzfxjgSl.setScfx("钻头选型");
ljSzfxjgSl.setYxyj("数量最多");
if(slSorted.size()>=2){
SjInfo sjInfo = slSorted.get(0);
SjInfo sjInfo2 = slSorted.get(1);
ljSzfxjgSl.setFxxy("钻头数量使用最多是"+sjInfo.getZtxh()+"("+sjInfo.getSl()+"只)、一趟钻率("+sjInfo.getYtzl()+"%),其次钻头数量使用最多是"+sjInfo2.getZtxh()+"("+sjInfo2.getSl()+"只),一趟钻率("+sjInfo2.getYtzl()+"%)");
ljSzfxjgSl.setZyjy(sjInfo.getZtxh());
ljSzfxjgSl.setQcyj(sjInfo2.getZtxh());
ljSzfxjgSl.setTjpf(Double.parseDouble(df.format(sjInfo.getTotalScore())));
}else if(slSorted.size()==1){
SjInfo sjInfo = slSorted.get(0);
ljSzfxjgSl.setFxxy("钻头数量使用最多是"+sjInfo.getZtxh()+"、一趟钻率("+sjInfo.getYtzl()+"%)");
ljSzfxjgSl.setZyjy(sjInfo.getZtxh());
ljSzfxjgSl.setTjpf(Double.parseDouble(df.format(sjInfo.getTotalScore())));
}
ljSzfxjgList.add(ljSzfxjgSl);
//钻头关键数据(匹配数据)
List<Djjc> ztppList = djjcList.stream().filter(dj -> equals(dj.getZtcc(),info.getZtcc() ) && dj.getKc().equals(info.getKc())).collect(Collectors.toList());
ztppList.forEach(ztpp->{
SjInfo sjInfo=new SjInfo();
sjInfo.setKc(ztpp.getKc());
sjInfo.setZtcc(ztpp.getZtcc());
sjInfo.setZtxh(ztpp.getZtxh());
sjInfo.setJc(ztpp.getJc());
sjInfo.setJs(ztpp.getJxzs());
sjInfo.setZb(ztpp.getZb());
sjInfo.setSl(1);
sjInfo.setGnmk("钻头关键数据");
collect1.add(sjInfo);
});
calculateScores(collect1);
for(SjInfo sjInfodf:collect1){
LjZtzhdf ljZtzhdf=new LjZtzhdf();
ljZtzhdf.setKc(sjInfodf.getKc());
ljZtzhdf.setZtxh(sjInfodf.getZtxh());
ljZtzhdf.setCc(sjInfodf.getZtcc());
ljZtzhdf.setJcdf(sjInfodf.getJcScore());
ljZtzhdf.setJsdf(sjInfodf.getJsScore());
ljZtzhdf.setZbdf(sjInfodf.getZbScore());
ljZtzhdf.setSldf(sjInfodf.getSlScore());
ljZtzhdf.setZhdf(Double.parseDouble(df.format(sjInfodf.getTotalScore())));
if(ljZtzhdf.getZhdf()>0){
ljZtzhdfList.add(ljZtzhdf);
}
}
}
//去重
if(ljZtzhdfList.size()>0){
ljZtzhdfList=ljZtzhdfList.stream().distinct().collect(Collectors.toList());
int i=ljZtzhdfMapper.batchLjZtzhdf(ljZtzhdfList);
}
if(ljSzfxjgList.size()>0){
int i=ljSzfxjgMapper.batchLjSzfxjg(ljSzfxjgList);
}
return ljZtzhdfList;
}
public static void calculateScores(List<SjInfo> items) {
// 按进尺降序排序
List<SjInfo> jcSorted = items.stream()
.sorted(Comparator.comparingDouble(SjInfo::getJc).reversed())
.collect(Collectors.toList());
// 按机速降序排序
List<SjInfo> jsSorted = items.stream()
.sorted(Comparator.comparingDouble(SjInfo::getJs).reversed())
.collect(Collectors.toList());
// 按数量降序排序
List<SjInfo> slSorted = items.stream()
.sorted(Comparator.comparingInt(SjInfo::getSl).reversed())
.collect(Collectors.toList());
// 计算进尺得分(最高1分)
if (!jcSorted.isEmpty()) {
double maxJc = jcSorted.get(0).getJc();
for (int i = 0; i < jcSorted.size(); i++) {
SjInfo item = jcSorted.get(i);
double score = 0.0;
if (i == 0) {
score = 1.0;
} else if (i == 1 && item.getJc() == maxJc) {
score = 1.0; // 并列第一
} else if (i == 1) {
score = 0.8; // 第二名
}
item.setJcScore(score);
}
}
// 计算机速得分(最高0.25分)
if (!jsSorted.isEmpty()) {
double maxJs = jsSorted.get(0).getJs();
for (int i = 0; i < jsSorted.size(); i++) {
SjInfo item = jsSorted.get(i);
double score = 0.0;
if (i == 0) {
score = 0.25;
} else if (i == 1 && item.getJs() == maxJs) {
score = 0.25; // 并列第一
} else if (i == 1) {
score = 0.25 * 0.8; // 第二名
}
item.setJsScore(score);
}
}
// 计算数量得分(最高0.5分)
if (!slSorted.isEmpty()) {
int maxSl = slSorted.get(0).getSl();
for (int i = 0; i < slSorted.size(); i++) {
SjInfo item = slSorted.get(i);
double score = 0.0;
if (i == 0) {
score = 0.5;
} else if (i == 1 && item.getSl() == maxSl) {
score = 0.5; // 并列第一
} else if (i == 1) {
score = 0.5 * 0.8; // 第二名
}
item.setSlScore(score);
}
}
// 计算综合得分
for (SjInfo item : items) {
double totalScore = item.getJcScore() + item.getJsScore() + item.getSlScore();
item.setTotalScore(totalScore);
}
}
public static boolean equals(double a, double b) {
// 注意:要使用String类型的构造函数,防止精度丢失
BigDecimal bd1 = new BigDecimal(Double.toString(a));
BigDecimal bd2 = new BigDecimal(Double.toString(b));
return bd1.compareTo(bd2) == 0;
}
/**
* 从Markdown代码块中提取JSON内容
......
package com.ruoyi.project.zt.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zt.mapper.LjSzfxjgMapper;
import com.ruoyi.project.zt.domain.LjSzfxjg;
import com.ruoyi.project.zt.service.ILjSzfxjgService;
/**
* 邻井-实钻分析结果Service业务层处理
*
* @author ruoyi
* @date 2025-06-29
*/
@Service
public class LjSzfxjgServiceImpl implements ILjSzfxjgService
{
@Autowired
private LjSzfxjgMapper ljSzfxjgMapper;
/**
* 查询邻井-实钻分析结果
*
* @param id 邻井-实钻分析结果主键
* @return 邻井-实钻分析结果
*/
@Override
public LjSzfxjg selectLjSzfxjgById(Long id)
{
return ljSzfxjgMapper.selectLjSzfxjgById(id);
}
/**
* 查询邻井-实钻分析结果列表
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 邻井-实钻分析结果
*/
@Override
public List<LjSzfxjg> selectLjSzfxjgList(LjSzfxjg ljSzfxjg)
{
return ljSzfxjgMapper.selectLjSzfxjgList(ljSzfxjg);
}
/**
* 新增邻井-实钻分析结果
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 结果
*/
@Override
public int insertLjSzfxjg(LjSzfxjg ljSzfxjg)
{
return ljSzfxjgMapper.insertLjSzfxjg(ljSzfxjg);
}
/**
* 修改邻井-实钻分析结果
*
* @param ljSzfxjg 邻井-实钻分析结果
* @return 结果
*/
@Override
public int updateLjSzfxjg(LjSzfxjg ljSzfxjg)
{
ljSzfxjg.setUpdateTime(DateUtils.getNowDate());
return ljSzfxjgMapper.updateLjSzfxjg(ljSzfxjg);
}
/**
* 批量删除邻井-实钻分析结果
*
* @param ids 需要删除的邻井-实钻分析结果主键
* @return 结果
*/
@Override
public int deleteLjSzfxjgByIds(Long[] ids)
{
return ljSzfxjgMapper.deleteLjSzfxjgByIds(ids);
}
/**
* 删除邻井-实钻分析结果信息
*
* @param id 邻井-实钻分析结果主键
* @return 结果
*/
@Override
public int deleteLjSzfxjgById(Long id)
{
return ljSzfxjgMapper.deleteLjSzfxjgById(id);
}
}
package com.ruoyi.project.zt.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zt.mapper.LjZtzhdfMapper;
import com.ruoyi.project.zt.domain.LjZtzhdf;
import com.ruoyi.project.zt.service.ILjZtzhdfService;
/**
* 钻头综合得分Service业务层处理
*
* @author ruoyi
* @date 2025-06-29
*/
@Service
public class LjZtzhdfServiceImpl implements ILjZtzhdfService
{
@Autowired
private LjZtzhdfMapper ljZtzhdfMapper;
/**
* 查询钻头综合得分
*
* @param id 钻头综合得分主键
* @return 钻头综合得分
*/
@Override
public LjZtzhdf selectLjZtzhdfById(Long id)
{
return ljZtzhdfMapper.selectLjZtzhdfById(id);
}
/**
* 查询钻头综合得分列表
*
* @param ljZtzhdf 钻头综合得分
* @return 钻头综合得分
*/
@Override
public List<LjZtzhdf> selectLjZtzhdfList(LjZtzhdf ljZtzhdf)
{
return ljZtzhdfMapper.selectLjZtzhdfList(ljZtzhdf);
}
/**
* 新增钻头综合得分
*
* @param ljZtzhdf 钻头综合得分
* @return 结果
*/
@Override
public int insertLjZtzhdf(LjZtzhdf ljZtzhdf)
{
return ljZtzhdfMapper.insertLjZtzhdf(ljZtzhdf);
}
/**
* 修改钻头综合得分
*
* @param ljZtzhdf 钻头综合得分
* @return 结果
*/
@Override
public int updateLjZtzhdf(LjZtzhdf ljZtzhdf)
{
ljZtzhdf.setUpdateTime(DateUtils.getNowDate());
return ljZtzhdfMapper.updateLjZtzhdf(ljZtzhdf);
}
/**
* 批量删除钻头综合得分
*
* @param ids 需要删除的钻头综合得分主键
* @return 结果
*/
@Override
public int deleteLjZtzhdfByIds(Long[] ids)
{
return ljZtzhdfMapper.deleteLjZtzhdfByIds(ids);
}
/**
* 删除钻头综合得分信息
*
* @param id 钻头综合得分主键
* @return 结果
*/
@Override
public int deleteLjZtzhdfById(Long id)
{
return ljZtzhdfMapper.deleteLjZtzhdfById(id);
}
}
......@@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
<!-- 指定 MyBatis 所用日志的具体实现 -->
<setting name="logImpl" value="SLF4J" />
<!-- 使用驼峰命名法转换字段 -->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
</configuration>
......@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.project.zt.mapper.DjdcInfoMapper">
<select id="getList" resultType="com.ruoyi.project.zt.domian.DjDcInfo">
<select id="getList" resultType="com.ruoyi.project.zt.domain.DjDcInfo">
......@@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="ljListByJh" resultType="com.ruoyi.project.zt.domian.Ljinfo">
<select id="ljListByJh" resultType="com.ruoyi.project.zt.domain.Ljinfo">
SELECT a.jh, a.jkhzb, a.jkzzb, a.jdhzb, a.jdzzb
FROM JSBA a
......@@ -131,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- &#45;&#45; ABS(a.jkhzb - b.jkhzb) &lt; 10 &#45;&#45; 按井口坐标-->
<!-- &#45;&#45; AND-->
<!-- &#45;&#45; ABS(a.jkzzb - b.jkzzb) &lt; 10;-->
<select id="getDjjcList" resultType="com.ruoyi.project.zt.domian.Djjc">
<select id="getDjjcList" resultType="com.ruoyi.project.zt.domain.Djjc">
select a.jh,a.jdhzb,a.jdzzb,to_char(b.WJRQ,'YYYY-MM-DD') wjrq,c.kc,c.jd,ksjs,c.JS,xh,
......@@ -155,7 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
YCMSQK,
ZCMSQK,
Qzyy,
zb
zb,pl,LGBY,cc ztcc
from JSBA a
left join jsaa b on a.jh = b.jh
left join (
......@@ -192,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
Qzyy,
zzjs,
ROUND(jc / case when (JCSJHJ / 24) =0 then 1 else (JCSJHJ / 24) end , 2) zb
,pl,LGBY,cc
from JSHA
order by xh
......@@ -221,7 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by kc asc,zb desc
</select>
<select id="getZqshfxList" resultType="com.ruoyi.project.zt.domian.DjZqsjfx">
<select id="getZqshfxList" resultType="com.ruoyi.project.zt.domain.DjZqsjfx">
select a.jh,c.kc,ksjs,c.js
......@@ -268,7 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by kc,jh
</select>
<select id="getJcAndCw" resultType="com.ruoyi.project.zt.domian.DjZqsjfx">
<select id="getJcAndCw" resultType="com.ruoyi.project.zt.domain.DjZqsjfx">
select jh,sum(jc) jc ,LISTAGG ( SZDC, '- ' ) WITHIN GROUP ( ORDER BY xh ) AS cw
from JSHA a
......@@ -284,7 +285,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
group by jh
</select>
<select id="getZjzhfxList" resultType="com.ruoyi.project.zt.domian.DjZjzhfx">
<select id="getZjzhfxList" resultType="com.ruoyi.project.zt.domain.DjZjzhfx">
select a.jh,
c.kc,
......@@ -329,7 +330,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by kc, jh
</select>
<select id="getJshaJc" resultType="com.ruoyi.project.zt.domian.DjZjzhfx">
<select id="getJshaJc" resultType="com.ruoyi.project.zt.domain.DjZjzhfx">
select jh,
nvl(sum(jc),0) jc,
nvl(ROUND(sum(JCSJHJ)/24,2),0) jcsjhj
......@@ -340,49 +341,178 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by jh
</select>
<select id="getDjinfoByjh" resultType="com.ruoyi.project.zt.domian.Djjc">
<select id="getDjinfoByjh" resultType="com.ruoyi.project.zt.domain.Djjc">
select JDHZB,JDZZB from JSBA a where a.JH =#{jh}
</select>
<select id="getLjjwList" resultType="com.ruoyi.project.zt.domian.Ljjw">
<select id="getLjjwList" resultType="com.ruoyi.project.zt.domain.Ljjw">
select distinct
* from (
select *
from (SELECT a.jh,
a.jkhzb,
a.jkzzb,
a.jdhzb,
a.jdzzb,
a.jx,
a.jb,
b.wjjs---井深
,
b.wjczjs,---垂深
b.wzcw,------完钻层位
kc.kc,----------------开次信息
zjzq.wjzq,-----完井周期
zjzq.zjzq, -----钻井周期
round(power(power(ABS(a.jkhzb - ${jkhzb}-----传入井口横坐标以及纵坐标
), 2) + power(ABS(a.jkzzb - ${jkzzb}), 2), 0.5), 2) as jkjl,--井口距离
round(power(power(ABS(a.jdhzb - ${jdhzb} -----传入井底横坐标以及纵坐标
), 2) + power(ABS(a.jdzzb - ${jdzzb}), 2), 0.5), 2) as jdjl,--井底距离
ABS(a.jkzzb - ${jkzzb}) as jkzjl,--井口纵距离,
ABS(a.jkhzb - ${jkhzb}) as jkhjl,--井口横距离
ABS(a.jdzzb - ${jdzzb}) as jdzjl,--井底纵距离
ABS(a.jdhzb - ${jdhzb}) as jdhjl--井底横距离
FROM JSBA a
left join jsaa b
on a.jh = b.jh
-------钻井周期以及完井周期
left join
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh = a.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%'
group by jh) kc
on a.jh = kc.jh
WHERE 1 = 1
and a.jh not like '%侧%'
and ABS(a.jdhzb - #{jdhzb}) &lt; #{jl} -- 按井底坐标选
AND ABS(a.jdzzb - #{jdzzb}) &lt; #{jl}
SELECT a.jh, a.jkhzb, a.jkzzb, a.jdhzb, a.jdzzb,a.jx,a.jb,b.wjjs---井深
,b.wjczjs,---垂深
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
order by jkjl asc) where ROWNUM &lt;= 5
union all
select *
from (
SELECT a.jh,
a.jkhzb,
a.jkzzb,
a.jdhzb,
a.jdzzb,
a.jx,
a.jb,
b.wjjs---井深
,
b.wjczjs,---垂深
b.wzcw,------完钻层位
kc.kc,----------------开次信息
zjzq.wjzq,-----完井周期
zjzq.zjzq, -----钻井周期
round(power(power(ABS(a.jkhzb - ${jkhzb}-----传入井口横坐标以及纵坐标
),2)+ power(ABS(a.jkzzb - ${jkzzb}),2),0.5) ,2)as jkjl,--井口距离
round( power(power(ABS(a.jdhzb - ${jdhzb} -----传入井底横坐标以及纵坐标
),2)+ power(ABS(a.jdzzb - ${jdzzb}),2),0.5),2) as jdjl,--井底距离
), 2) + power(ABS(a.jkzzb - ${jkzzb}), 2), 0.5), 2) as jkjl,--井口距离
round(power(power(ABS(a.jdhzb - ${jdhzb} -----传入井底横坐标以及纵坐标
), 2) + power(ABS(a.jdzzb - ${jdzzb}), 2), 0.5), 2) as jdjl,--井底距离
ABS(a.jkzzb - ${jkzzb}) as jkzjl,--井口纵距离,
ABS(a.jkhzb - ${jkhzb}) as jkhjl,--井口横距离
ABS(a.jdzzb - ${jdzzb}) as jdzjl,--井底纵距离
ABS(a.jdhzb - ${jdhzb} ) as jdhjl--井底横距离
ABS(a.jdhzb - ${jdhzb}) as jdhjl--井底横距离
FROM JSBA a
left join jsaa b
on a.jh=b.jh
on a.jh = b.jh
-------钻井周期以及完井周期
left join
(
select jsta.jh, sum(case when jsta.sgzyxm='完井作业' then jsta.sjts else 0 end ) as wjzq, sum(jsta.sjts)-sum(case when jsta.sgzyxm='完井作业' then jsta.sjts else 0 end ) as zjzq FROM JSTA jsta
where jsta.jd1 is not null or jsta.jd2 is not null
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh=a.jh
on zjzq.jh = a.jh
left join ( select jh,count(*) as kc from jsdb where tgcc not like '%导管%'
group by jh )kc
on a.jh=kc.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%'
group by jh) kc
on a.jh = kc.jh
WHERE
ABS(a.jdhzb - #{jdhzb}) &lt; #{jl} -- 按井底坐标选
AND
ABS(a.jdzzb - #{jdzzb}) &lt; #{jl}
WHERE 1 = 1
and a.jh not like '%侧%'
and ABS(a.jdhzb - #{jdhzb}) &lt; #{jl} -- 按井底坐标选
AND ABS(a.jdzzb - #{jdzzb}) &lt; #{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
order by jdjl asc
) where ROWNUM &lt; =5 ) a order by jh
</select>
<!-- select ss.kc,ss.ztxh,ss.cc,-->
<!-- count( *) as ztsl,-->
<!-- round( sum(case when ss.kc=1 and tcyk=1 then 1 else 0 end )/count(*)*100,2)as ytzl,-->
<!-- round( sum(case when ss.kc=2 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as etzl,-->
<!-- round( sum(case when ss.kc=3 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as stzl,-->
<!-- round( sum(case when ss.kc=4 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as sitzl,-->
<!-- round( sum(case when ss.kc=5 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as wtzl-->
<!-- from (-->
<!-- select ss.kc,ss.lag_js,ss.js,jsha.ztxh,jsha.cc,jsha.zzjs,nvl(jsha.qsjs,0),-->
<!-- -&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;判断是否在开次内一趟-->
<!-- case when abs(nvl(jsha.qsjs,0)-ss.lag_js) &lt;=30 and jsha.zzjs=ss.js then 1 else 0 end as tcyk-->
<!-- from (-->
<!-- -&#45;&#45;&#45;&#45;&#45;&#45;获取合适的井组以及井的开次信息以及井深信息-->
<!-- select jh ,-->
<!-- ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,-->
<!-- JS,-->
<!-- LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS-->
<!-- from JSDB-->
<!-- where jh in(-->
<!-- select jh from jsaa where qk like CONCAT(CONCAT('%', #{qk}), '%') and wjrq >sysdate-365*2-->
<!-- ) and tgcc not like '%导管%'-->
<!-- -&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;-->
<!-- ) ss-->
<!-- right join (select * from jsha where jh in(select jh from jsaa where qk like CONCAT(CONCAT('%', #{qk}), '%') and wjrq >sysdate-365*2))jsha-->
<!-- on jsha.jh=ss.jh and jsha.zzjs between ss.lag_js and ss.js-->
<!-- )ss-->
<!-- group by ss.kc,ss.ztxh,ss.cc-->
<select id="getDjZtfxList" resultType="com.ruoyi.project.zt.domain.DjZtfx">
select ss.kc,ss.ztxh,ss.cc,
count( *) as ztsl,
round( sum(case when tcyk=1 then 1 else 0 end )/count(*)*100,2)as ytzl,
-- round( sum(case when ss.kc=1 and tcyk=1 then 1 else 0 end )/count(*)*100,2)as ytzl,
--round( sum(case when ss.kc=2 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as etzl,
-- round( sum(case when ss.kc=3 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as stzl,
-- round( sum(case when ss.kc=4 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as sitzl,
-- round( sum(case when ss.kc=5 and tcyk=1 then 1 else 0 end )/count(*)*100,2) as wtzl,
MEDIAN(nvl(jc,0)) as jc_zw,max(nvl(jc,0)) as jc_max,MEDIAN(nvl(jxzs,0)) as jxzs_zw,max(nvl(jxzs,0)) as jxzs_max,MEDIAN(nvl(qsjs,0)) as qsjs_zw
from (
select ss.kc,ss.lag_js,ss.js,jsha.ztxh,jsha.cc,jsha.zzjs,jsha.jc,jsha.jxzs,nvl(jsha.qsjs,0) as qsjs,
---------判断是否在开次内一趟
case when abs(nvl(jsha.qsjs,0)-ss.lag_js) &lt;=30 and jsha.zzjs=ss.js then 1 else 0 end as tcyk
from (
-------获取合适的井组以及井的开次信息以及井深信息
select jh ,
ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS
from JSDB
where jh in(
select jh from jsaa where qk like CONCAT(CONCAT('%', #{qk}), '%') and wjrq >sysdate-365*2
) and tgcc not like '%导管%'
-------------------------------------------------
) ss
right join (select * from jsha where jh in(select jh from jsaa where qk like CONCAT(CONCAT('%', #{qk}), '%') and wjrq >sysdate-365*2))jsha
on jsha.jh=ss.jh and jsha.zzjs between ss.lag_js and ss.js
)ss
group by ss.kc,ss.ztxh,ss.cc
</select>
</mapper>
\ No newline at end of file
......@@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getJsqaList" resultType="com.ruoyi.project.zt.domian.Jsqa">
<select id="getJsqaList" resultType="com.ruoyi.project.zt.domain.Jsqa">
select *
from JSQA a
where 1=1
......
......@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.project.zt.mapper.JstaMapper">
<select id="getList" resultType="com.ruoyi.project.zt.domian.Jsta">
<select id="getList" resultType="com.ruoyi.project.zt.domain.Jsta">
select *
from JSTA a
......
......@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.zt.mapper.JswaMapper">
<select id="getList" resultType="com.ruoyi.project.zt.domian.Jswa">
<select id="getList" resultType="com.ruoyi.project.zt.domain.Jswa">
select jh, rq, nvl(js,0) js, nvl(rjc,0) rjc,nvl(sg,0) sg, nvl(xl,0)xl,nvl(zrtg,0) zrtg, nvl(zztg,0)zztg,nvl(fzqk,0) fzqk,brzygz from JSWA where 1=1
<if test="jh!=null and jh!=''">
......@@ -24,5 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by rq
</select>
<select id="selectMd" resultType="com.ruoyi.project.zt.domain.Jswa">
select * from (
select * from JSwA where RJC>0 and jh=#{jh} and js=#{js} ) where ROWNUM=1
</select>
</mapper>
\ No newline at end of file
<?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.ruoyi.project.zt.mapper.LjSzfxjgMapper">
<resultMap type="LjSzfxjg" id="LjSzfxjgResult">
<result property="id" column="id" />
<result property="gnmk" column="gnmk" />
<result property="fxfw" column="fxfw" />
<result property="fxdx" column="fxdx" />
<result property="fxxy" column="fxxy" />
<result property="fxjl" column="fxjl" />
<result property="scfx" column="scfx" />
<result property="yxyj" column="yxyj" />
<result property="zyjy" column="zyjy" />
<result property="qcyj" column="qcyj" />
<result property="tjpf" column="tjpf" />
<result property="xxcs" column="xxcs" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectLjSzfxjgVo">
select id, gnmk, fxfw, fxdx, fxxy, fxjl, scfx, yxyj, zyjy, qcyj, tjpf, xxcs, created_by, created_time, update_by, update_time from lj_szfxjg
</sql>
<select id="selectLjSzfxjgList" parameterType="LjSzfxjg" resultMap="LjSzfxjgResult">
<include refid="selectLjSzfxjgVo"/>
<where>
<if test="gnmk != null and gnmk != ''"> and gnmk = #{gnmk}</if>
<if test="fxfw != null and fxfw != ''"> and fxfw = #{fxfw}</if>
<if test="fxdx != null and fxdx != ''"> and fxdx = #{fxdx}</if>
<if test="fxxy != null and fxxy != ''"> and fxxy = #{fxxy}</if>
<if test="fxjl != null and fxjl != ''"> and fxjl = #{fxjl}</if>
<if test="scfx != null and scfx != ''"> and scfx = #{scfx}</if>
<if test="yxyj != null and yxyj != ''"> and yxyj = #{yxyj}</if>
<if test="zyjy != null and zyjy != ''"> and zyjy = #{zyjy}</if>
<if test="qcyj != null and qcyj != ''"> and qcyj = #{qcyj}</if>
<if test="tjpf != null "> and tjpf = #{tjpf}</if>
<if test="xxcs != null and xxcs != ''"> and xxcs = #{xxcs}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
</where>
</select>
<select id="selectLjSzfxjgById" parameterType="Long" resultMap="LjSzfxjgResult">
<include refid="selectLjSzfxjgVo"/>
where id = #{id}
</select>
<insert id="insertLjSzfxjg" parameterType="LjSzfxjg" useGeneratedKeys="true" keyProperty="id">
insert into lj_szfxjg
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="gnmk != null">gnmk,</if>
<if test="fxfw != null">fxfw,</if>
<if test="fxdx != null">fxdx,</if>
<if test="fxxy != null">fxxy,</if>
<if test="fxjl != null">fxjl,</if>
<if test="scfx != null">scfx,</if>
<if test="yxyj != null">yxyj,</if>
<if test="zyjy != null">zyjy,</if>
<if test="qcyj != null">qcyj,</if>
<if test="tjpf != null">tjpf,</if>
<if test="xxcs != null">xxcs,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="gnmk != null">#{gnmk},</if>
<if test="fxfw != null">#{fxfw},</if>
<if test="fxdx != null">#{fxdx},</if>
<if test="fxxy != null">#{fxxy},</if>
<if test="fxjl != null">#{fxjl},</if>
<if test="scfx != null">#{scfx},</if>
<if test="yxyj != null">#{yxyj},</if>
<if test="zyjy != null">#{zyjy},</if>
<if test="qcyj != null">#{qcyj},</if>
<if test="tjpf != null">#{tjpf},</if>
<if test="xxcs != null">#{xxcs},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<insert id="batchLjSzfxjg">
insert into lj_szfxjg( gnmk, fxfw, fxdx, fxxy, fxjl, scfx, yxyj, zyjy, qcyj, tjpf, xxcs, created_by, created_time, update_by, update_time) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.gnmk}, #{item.fxfw}, #{item.fxdx}, #{item.fxxy}, #{item.fxjl}, #{item.scfx}, #{item.yxyj}, #{item.zyjy}, #{item.qcyj}, #{item.tjpf}, #{item.xxcs}, #{item.createdBy}, #{item.createdTime}, #{item.updateBy}, #{item.updateTime})
</foreach>
</insert>
<update id="updateLjSzfxjg" parameterType="LjSzfxjg">
update lj_szfxjg
<trim prefix="SET" suffixOverrides=",">
<if test="gnmk != null">gnmk = #{gnmk},</if>
<if test="fxfw != null">fxfw = #{fxfw},</if>
<if test="fxdx != null">fxdx = #{fxdx},</if>
<if test="fxxy != null">fxxy = #{fxxy},</if>
<if test="fxjl != null">fxjl = #{fxjl},</if>
<if test="scfx != null">scfx = #{scfx},</if>
<if test="yxyj != null">yxyj = #{yxyj},</if>
<if test="zyjy != null">zyjy = #{zyjy},</if>
<if test="qcyj != null">qcyj = #{qcyj},</if>
<if test="tjpf != null">tjpf = #{tjpf},</if>
<if test="xxcs != null">xxcs = #{xxcs},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteLjSzfxjgById" parameterType="Long">
delete from lj_szfxjg where id = #{id}
</delete>
<delete id="deleteLjSzfxjgByIds" parameterType="String">
delete from lj_szfxjg where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.ruoyi.project.zt.mapper.LjZtzhdfMapper">
<resultMap type="LjZtzhdf" id="LjZtzhdfResult">
<result property="id" column="id" />
<result property="kc" column="kc" />
<result property="ztxh" column="ztxh" />
<result property="cc" column="cc" />
<result property="jcdf" column="jcdf" />
<result property="jsdf" column="jsdf" />
<result property="zbdf" column="zbdf" />
<result property="sldf" column="sldf" />
<result property="zhdf" column="zhdf" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectLjZtzhdfVo">
select id, kc, ztxh, cc, jcdf, jsdf, zbdf, sldf, zhdf, created_by, created_time, update_by, update_time from lj_ztzhdf
</sql>
<select id="selectLjZtzhdfList" parameterType="LjZtzhdf" resultMap="LjZtzhdfResult">
<include refid="selectLjZtzhdfVo"/>
<where>
<if test="kc != null and kc != ''"> and kc = #{kc}</if>
<if test="ztxh != null and ztxh != ''"> and ztxh = #{ztxh}</if>
<if test="cc != null "> and cc = #{cc}</if>
<if test="jcdf != null "> and jcdf = #{jcdf}</if>
<if test="jsdf != null "> and jsdf = #{jsdf}</if>
<if test="zbdf != null "> and zbdf = #{zbdf}</if>
<if test="sldf != null "> and sldf = #{sldf}</if>
<if test="zhdf != null "> and zhdf = #{zhdf}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
</where>
</select>
<select id="selectLjZtzhdfById" parameterType="Long" resultMap="LjZtzhdfResult">
<include refid="selectLjZtzhdfVo"/>
where id = #{id}
</select>
<insert id="insertLjZtzhdf" parameterType="LjZtzhdf" useGeneratedKeys="true" keyProperty="id">
insert into lj_ztzhdf
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="kc != null">kc,</if>
<if test="ztxh != null">ztxh,</if>
<if test="cc != null">cc,</if>
<if test="jcdf != null">jcdf,</if>
<if test="jsdf != null">jsdf,</if>
<if test="zbdf != null">zbdf,</if>
<if test="sldf != null">sldf,</if>
<if test="zhdf != null">zhdf,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="kc != null">#{kc},</if>
<if test="ztxh != null">#{ztxh},</if>
<if test="cc != null">#{cc},</if>
<if test="jcdf != null">#{jcdf},</if>
<if test="jsdf != null">#{jsdf},</if>
<if test="zbdf != null">#{zbdf},</if>
<if test="sldf != null">#{sldf},</if>
<if test="zhdf != null">#{zhdf},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateLjZtzhdf" parameterType="LjZtzhdf">
update lj_ztzhdf
<trim prefix="SET" suffixOverrides=",">
<if test="kc != null">kc = #{kc},</if>
<if test="ztxh != null">ztxh = #{ztxh},</if>
<if test="cc != null">cc = #{cc},</if>
<if test="jcdf != null">jcdf = #{jcdf},</if>
<if test="jsdf != null">jsdf = #{jsdf},</if>
<if test="zbdf != null">zbdf = #{zbdf},</if>
<if test="sldf != null">sldf = #{sldf},</if>
<if test="zhdf != null">zhdf = #{zhdf},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteLjZtzhdfById" parameterType="Long">
delete from lj_ztzhdf where id = #{id}
</delete>
<delete id="deleteLjZtzhdfByIds" parameterType="String">
delete from lj_ztzhdf where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchLjZtzhdf">
insert into lj_ztzhdf( kc, ztxh, cc, jcdf, jsdf, zbdf, sldf, zhdf) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.kc}, #{item.ztxh}, #{item.cc}, #{item.jcdf}, #{item.jsdf}, #{item.zbdf}, #{item.sldf}, #{item.zhdf})
</foreach>
</insert>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment