Commit b2d2b677 by jiang'yun

修改

parent 2ec5f500
package com.ruoyi.project.zjsgfa.controller;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.zjsgfa.domain.SjDjjc;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
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 org.springframework.web.bind.annotation.*;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjJsjg;
......@@ -23,6 +24,7 @@ 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;
import org.springframework.web.multipart.MultipartFile;
/**
* 设计信息-井身结构Controller
......@@ -52,7 +54,7 @@ public class SjJsjgController extends BaseController
/**
* 导出设计信息-井身结构列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJsjg:export')")
// @PreAuthorize("@ss.hasPermi('system:sjJsjg:export')")
@Log(title = "设计信息-井身结构", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjJsjg sjJsjg)
......@@ -125,4 +127,102 @@ public class SjJsjgController extends BaseController
/**
* 导入数据
*/
// @PreAuthorize("@ss.hasPermi('system:sjJsjg:importData')")
@PostMapping("/importData")
@ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
XSSFWorkbook workbook = null;
try {
//装载流
workbook = new XSSFWorkbook(file.getInputStream());
// 获取一个工作表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum();
// 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++){//跳过第一行
if(i==0){
continue;
}
// 获取行
XSSFRow row = sheet.getRow(i);
System.out.println(row);
SjJsjg info=new SjJsjg();
String jh=new DataFormatter().formatCellValue(row.getCell(0));
if(StringUtils.isEmpty(jh)){
return AjaxResult.error("第"+(i+1)+"行井号不能为空");
}
info.setJh(jh);
String kc=new DataFormatter().formatCellValue(row.getCell(1));
if(StringUtils.isEmpty(kc)){
return AjaxResult.error("第"+(i+1)+"行开次不能为空");
}
info.setKc(kc);
String ztzj=new DataFormatter().formatCellValue(row.getCell(2));
if(StringUtils.isEmpty(ztzj)){
return AjaxResult.error("第"+(i+1)+"行钻头直径不能为空");
}
info.setZtzj(Double.parseDouble(ztzj));
String js=new DataFormatter().formatCellValue(row.getCell(3));
if(StringUtils.isEmpty(js)){
return AjaxResult.error("第"+(i+1)+"行井深不能为空");
}
info.setJs(Double.parseDouble(js));
String tgwj=new DataFormatter().formatCellValue(row.getCell(4));
if(StringUtils.isEmpty(tgwj)){
return AjaxResult.error("第"+(i+1)+"行套管外径不能为空");
}
info.setTtwj(Double.parseDouble(tgwj));
String ttds=new DataFormatter().formatCellValue(row.getCell(5));
if(StringUtils.isEmpty(ttds)){
return AjaxResult.error("第"+(i+1)+"行套管顶深不能为空");
}
info.setTtds(Double.parseDouble(ttds));
String ttxs=new DataFormatter().formatCellValue(row.getCell(6));
if(StringUtils.isEmpty(ttxs)){
return AjaxResult.error("第"+(i+1)+"行套管下深不能为空");
}
info.setTtxs(Double.parseDouble(ttxs));
String snfg=new DataFormatter().formatCellValue(row.getCell(7));
if(StringUtils.isEmpty(snfg)){
return AjaxResult.error("第"+(i+1)+"行水泥返高不能为空");
}
info.setSnfg(Double.parseDouble(snfg));
String bz=new DataFormatter().formatCellValue(row.getCell(8));
info.setBz(bz);
sjJsjgService.insertSjJsjg(info);
}
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
throw new Exception("导入Excel失败,请联系网站管理员!");
} finally {
workbook.close();
}
return AjaxResult.success("导入成功");
}
}
package com.ruoyi.project.zjsgfa.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.zjsgfa.domain.SjJygjGdfdcs;
import com.ruoyi.project.zjsgfa.service.ISjJygjGdfdcsService;
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-26
*/
@RestController
@RequestMapping("/system/sjJygjGdfdcs")
public class SjJygjGdfdcsController extends BaseController
{
@Autowired
private ISjJygjGdfdcsService sjJygjGdfdcsService;
/**
* 查询设计信息-井眼轨迹_轨道分段参数列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdfdcs:list')")
@GetMapping("/list")
public TableDataInfo list(SjJygjGdfdcs sjJygjGdfdcs)
{
startPage();
List<SjJygjGdfdcs> list = sjJygjGdfdcsService.selectSjJygjGdfdcsList(sjJygjGdfdcs);
return getDataTable(list);
}
/**
* 导出设计信息-井眼轨迹_轨道分段参数列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdfdcs:export')")
@Log(title = "设计信息-井眼轨迹_轨道分段参数", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjJygjGdfdcs sjJygjGdfdcs)
{
List<SjJygjGdfdcs> list = sjJygjGdfdcsService.selectSjJygjGdfdcsList(sjJygjGdfdcs);
ExcelUtil<SjJygjGdfdcs> util = new ExcelUtil<SjJygjGdfdcs>(SjJygjGdfdcs.class);
util.exportExcel(response, list, "设计信息-井眼轨迹_轨道分段参数数据");
}
/**
* 获取设计信息-井眼轨迹_轨道分段参数详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdfdcs:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjJygjGdfdcsService.selectSjJygjGdfdcsById(id));
}
/**
* 新增设计信息-井眼轨迹_轨道分段参数
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdfdcs:add')")
@Log(title = "设计信息-井眼轨迹_轨道分段参数", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjJygjGdfdcs sjJygjGdfdcs)
{
return toAjax(sjJygjGdfdcsService.insertSjJygjGdfdcs(sjJygjGdfdcs));
}
/**
* 修改设计信息-井眼轨迹_轨道分段参数
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdfdcs:edit')")
@Log(title = "设计信息-井眼轨迹_轨道分段参数", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjJygjGdfdcs sjJygjGdfdcs)
{
return toAjax(sjJygjGdfdcsService.updateSjJygjGdfdcs(sjJygjGdfdcs));
}
/**
* 删除设计信息-井眼轨迹_轨道分段参数
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdfdcs:remove')")
@Log(title = "设计信息-井眼轨迹_轨道分段参数", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjJygjGdfdcsService.deleteSjJygjGdfdcsByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.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.zjsgfa.domain.SjJygjGdsjgdcs;
import com.ruoyi.project.zjsgfa.service.ISjJygjGdsjgdcsService;
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-26
*/
@RestController
@RequestMapping("/system/sjJygjGdsjgdcs")
public class SjJygjGdsjgdcsController extends BaseController
{
@Autowired
private ISjJygjGdsjgdcsService sjJygjGdsjgdcsService;
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdsjgdcs:list')")
@GetMapping("/list")
public TableDataInfo list(SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
startPage();
List<SjJygjGdsjgdcs> list = sjJygjGdsjgdcsService.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
return getDataTable(list);
}
/**
* 导出设计信息-井眼轨迹_轨道设计各点参数列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdsjgdcs:export')")
@Log(title = "设计信息-井眼轨迹_轨道设计各点参数", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
List<SjJygjGdsjgdcs> list = sjJygjGdsjgdcsService.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
ExcelUtil<SjJygjGdsjgdcs> util = new ExcelUtil<SjJygjGdsjgdcs>(SjJygjGdsjgdcs.class);
util.exportExcel(response, list, "设计信息-井眼轨迹_轨道设计各点参数数据");
}
/**
* 获取设计信息-井眼轨迹_轨道设计各点参数详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdsjgdcs:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjJygjGdsjgdcsService.selectSjJygjGdsjgdcsById(id));
}
/**
* 新增设计信息-井眼轨迹_轨道设计各点参数
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdsjgdcs:add')")
@Log(title = "设计信息-井眼轨迹_轨道设计各点参数", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
return toAjax(sjJygjGdsjgdcsService.insertSjJygjGdsjgdcs(sjJygjGdsjgdcs));
}
/**
* 修改设计信息-井眼轨迹_轨道设计各点参数
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdsjgdcs:edit')")
@Log(title = "设计信息-井眼轨迹_轨道设计各点参数", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
return toAjax(sjJygjGdsjgdcsService.updateSjJygjGdsjgdcs(sjJygjGdsjgdcs));
}
/**
* 删除设计信息-井眼轨迹_轨道设计各点参数
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjGdsjgdcs:remove')")
@Log(title = "设计信息-井眼轨迹_轨道设计各点参数", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjJygjGdsjgdcsService.deleteSjJygjGdsjgdcsByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.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.zjsgfa.domain.SjJygjInfo;
import com.ruoyi.project.zjsgfa.service.ISjJygjInfoService;
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-26
*/
@RestController
@RequestMapping("/system/sjJygjInfo")
public class SjJygjInfoController extends BaseController
{
@Autowired
private ISjJygjInfoService sjJygjInfoService;
/**
* 查询设计信息-井眼轨迹信息列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjInfo:list')")
@GetMapping("/list")
public TableDataInfo list(SjJygjInfo sjJygjInfo)
{
startPage();
List<SjJygjInfo> list = sjJygjInfoService.selectSjJygjInfoList(sjJygjInfo);
return getDataTable(list);
}
/**
* 导出设计信息-井眼轨迹信息列表
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjInfo:export')")
@Log(title = "设计信息-井眼轨迹信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjJygjInfo sjJygjInfo)
{
List<SjJygjInfo> list = sjJygjInfoService.selectSjJygjInfoList(sjJygjInfo);
ExcelUtil<SjJygjInfo> util = new ExcelUtil<SjJygjInfo>(SjJygjInfo.class);
util.exportExcel(response, list, "设计信息-井眼轨迹信息数据");
}
/**
* 获取设计信息-井眼轨迹信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjInfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjJygjInfoService.selectSjJygjInfoById(id));
}
/**
* 新增设计信息-井眼轨迹信息
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjInfo:add')")
@Log(title = "设计信息-井眼轨迹信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjJygjInfo sjJygjInfo)
{
return toAjax(sjJygjInfoService.insertSjJygjInfo(sjJygjInfo));
}
/**
* 修改设计信息-井眼轨迹信息
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjInfo:edit')")
@Log(title = "设计信息-井眼轨迹信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjJygjInfo sjJygjInfo)
{
return toAjax(sjJygjInfoService.updateSjJygjInfo(sjJygjInfo));
}
/**
* 删除设计信息-井眼轨迹信息
*/
@PreAuthorize("@ss.hasPermi('system:sjJygjInfo:remove')")
@Log(title = "设计信息-井眼轨迹信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjJygjInfoService.deleteSjJygjInfoByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
......@@ -31,27 +30,27 @@ public class SjJsjg extends BaseEntity
/** 钻头直径 */
@Excel(name = "钻头直径")
private BigDecimal ztzj;
private Double ztzj;
/** 井深 */
@Excel(name = "井深")
private BigDecimal js;
private Double js;
/** 套管外径 */
@Excel(name = "套管外径")
private BigDecimal ttwj;
private Double ttwj;
/** 套管顶深 */
@Excel(name = "套管顶深")
private BigDecimal ttds;
private Double ttds;
/** 套管下深 */
@Excel(name = "套管下深")
private BigDecimal ttxs;
private Double ttxs;
/** 水泥返高 */
@Excel(name = "水泥返高")
private BigDecimal snfg;
private Double snfg;
/** 备注 */
@Excel(name = "备注")
......@@ -96,62 +95,62 @@ public class SjJsjg extends BaseEntity
return kc;
}
public void setZtzj(BigDecimal ztzj)
public void setZtzj(Double ztzj)
{
this.ztzj = ztzj;
}
public BigDecimal getZtzj()
public Double getZtzj()
{
return ztzj;
}
public void setJs(BigDecimal js)
public void setJs(Double js)
{
this.js = js;
}
public BigDecimal getJs()
public Double getJs()
{
return js;
}
public void setTtwj(BigDecimal ttwj)
public void setTtwj(Double ttwj)
{
this.ttwj = ttwj;
}
public BigDecimal getTtwj()
public Double getTtwj()
{
return ttwj;
}
public void setTtds(BigDecimal ttds)
public void setTtds(Double ttds)
{
this.ttds = ttds;
}
public BigDecimal getTtds()
public Double getTtds()
{
return ttds;
}
public void setTtxs(BigDecimal ttxs)
public void setTtxs(Double ttxs)
{
this.ttxs = ttxs;
}
public BigDecimal getTtxs()
public Double getTtxs()
{
return ttxs;
}
public void setSnfg(BigDecimal snfg)
public void setSnfg(Double snfg)
{
this.snfg = snfg;
}
public BigDecimal getSnfg()
public Double getSnfg()
{
return snfg;
}
......
package com.ruoyi.project.zjsgfa.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;
/**
* 设计信息-井眼轨迹_轨道分段参数对象 sj_jygj_gdfdcs
*
* @author ruoyi
* @date 2025-06-26
*/
public class SjJygjGdfdcs extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 井号 */
@Excel(name = "井号")
private String jh;
/** 井深 */
@Excel(name = "井深")
private Double js;
/** 井斜 */
@Excel(name = "井斜")
private Double jx;
/** 方位 */
@Excel(name = "方位")
private Double fw;
/** 垂深 */
@Excel(name = "垂深")
private Double cs;
/** 水平位移 */
@Excel(name = "水平位移")
private Double spwy;
/** 南北位移 */
@Excel(name = "南北位移")
private Double nbwy;
/** 东西位移 */
@Excel(name = "东西位移")
private Double dxwy;
/** 全角变化率 */
@Excel(name = "全角变化率")
private Double qjbhl;
/** 工具面 */
@Excel(name = "工具面")
private Double gjm;
/** 靶点 */
@Excel(name = "靶点")
private String bd;
/** 备注 */
@Excel(name = "备注")
private String bz;
/** 创建人 */
@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 setJh(String jh)
{
this.jh = jh;
}
public String getJh()
{
return jh;
}
public void setJs(Double js)
{
this.js = js;
}
public Double getJs()
{
return js;
}
public void setJx(Double jx)
{
this.jx = jx;
}
public Double getJx()
{
return jx;
}
public void setFw(Double fw)
{
this.fw = fw;
}
public Double getFw()
{
return fw;
}
public void setCs(Double cs)
{
this.cs = cs;
}
public Double getCs()
{
return cs;
}
public void setSpwy(Double spwy)
{
this.spwy = spwy;
}
public Double getSpwy()
{
return spwy;
}
public void setNbwy(Double nbwy)
{
this.nbwy = nbwy;
}
public Double getNbwy()
{
return nbwy;
}
public void setDxwy(Double dxwy)
{
this.dxwy = dxwy;
}
public Double getDxwy()
{
return dxwy;
}
public void setQjbhl(Double qjbhl)
{
this.qjbhl = qjbhl;
}
public Double getQjbhl()
{
return qjbhl;
}
public void setGjm(Double gjm)
{
this.gjm = gjm;
}
public Double getGjm()
{
return gjm;
}
public void setBd(String bd)
{
this.bd = bd;
}
public String getBd()
{
return bd;
}
public void setBz(String bz)
{
this.bz = bz;
}
public String getBz()
{
return bz;
}
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("jh", getJh())
.append("js", getJs())
.append("jx", getJx())
.append("fw", getFw())
.append("cs", getCs())
.append("spwy", getSpwy())
.append("nbwy", getNbwy())
.append("dxwy", getDxwy())
.append("qjbhl", getQjbhl())
.append("gjm", getGjm())
.append("bd", getBd())
.append("bz", getBz())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.ruoyi.project.zjsgfa.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;
/**
* 设计信息-井眼轨迹_轨道设计各点参数对象 sj_jygj_gdsjgdcs
*
* @author ruoyi
* @date 2025-06-26
*/
public class SjJygjGdsjgdcs extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 井号 */
@Excel(name = "井号")
private String jh;
/** 井深 */
@Excel(name = "井深")
private Double js;
/** 井斜 */
@Excel(name = "井斜")
private Double jx;
/** 方位 */
@Excel(name = "方位")
private Double fw;
/** 闭合方位 */
@Excel(name = "闭合方位")
private Double bhfw;
/** 垂深 */
@Excel(name = "垂深")
private Double cs;
/** 闭合距 */
@Excel(name = "闭合距")
private Double bhj;
/** 南北位移 */
@Excel(name = "南北位移")
private Double nbwy;
/** 东西位移 */
@Excel(name = "东西位移")
private Double dxwy;
/** 造斜率 */
@Excel(name = "造斜率")
private Double zxl;
/** 方位变化率 */
@Excel(name = "方位变化率")
private Double fwbhl;
/** 全角变化率 */
@Excel(name = "全角变化率")
private Double qjbhl;
/** 工具面 */
@Excel(name = "工具面")
private Double gjm;
/** 备注 */
@Excel(name = "备注")
private String bz;
/** 创建人 */
@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 setJh(String jh)
{
this.jh = jh;
}
public String getJh()
{
return jh;
}
public void setJs(Double js)
{
this.js = js;
}
public Double getJs()
{
return js;
}
public void setJx(Double jx)
{
this.jx = jx;
}
public Double getJx()
{
return jx;
}
public void setFw(Double fw)
{
this.fw = fw;
}
public Double getFw()
{
return fw;
}
public void setBhfw(Double bhfw)
{
this.bhfw = bhfw;
}
public Double getBhfw()
{
return bhfw;
}
public void setCs(Double cs)
{
this.cs = cs;
}
public Double getCs()
{
return cs;
}
public void setBhj(Double bhj)
{
this.bhj = bhj;
}
public Double getBhj()
{
return bhj;
}
public void setNbwy(Double nbwy)
{
this.nbwy = nbwy;
}
public Double getNbwy()
{
return nbwy;
}
public void setDxwy(Double dxwy)
{
this.dxwy = dxwy;
}
public Double getDxwy()
{
return dxwy;
}
public void setZxl(Double zxl)
{
this.zxl = zxl;
}
public Double getZxl()
{
return zxl;
}
public void setFwbhl(Double fwbhl)
{
this.fwbhl = fwbhl;
}
public Double getFwbhl()
{
return fwbhl;
}
public void setQjbhl(Double qjbhl)
{
this.qjbhl = qjbhl;
}
public Double getQjbhl()
{
return qjbhl;
}
public void setGjm(Double gjm)
{
this.gjm = gjm;
}
public Double getGjm()
{
return gjm;
}
public void setBz(String bz)
{
this.bz = bz;
}
public String getBz()
{
return bz;
}
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("jh", getJh())
.append("js", getJs())
.append("jx", getJx())
.append("fw", getFw())
.append("bhfw", getBhfw())
.append("cs", getCs())
.append("bhj", getBhj())
.append("nbwy", getNbwy())
.append("dxwy", getDxwy())
.append("zxl", getZxl())
.append("fwbhl", getFwbhl())
.append("qjbhl", getQjbhl())
.append("gjm", getGjm())
.append("bz", getBz())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.ruoyi.project.zjsgfa.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;
/**
* 设计信息-井眼轨迹信息对象 sj_jygj_info
*
* @author ruoyi
* @date 2025-06-26
*/
public class SjJygjInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 井号 */
@Excel(name = "井号")
private String jh;
/** 轨道类型 */
@Excel(name = "轨道类型")
private String gdlx;
/** 井口横坐标 */
@Excel(name = "井口横坐标")
private Double jkhzb;
/** 井口纵坐标 */
@Excel(name = "井口纵坐标")
private Double jkzzb;
/** 靶点横坐标 */
@Excel(name = "靶点横坐标")
private Double bdhzb;
/** 靶点纵坐标 */
@Excel(name = "靶点纵坐标")
private Double bdzzb;
/** 垂深 */
@Excel(name = "垂深")
private Double cs;
/** 闭合距 */
@Excel(name = "闭合距")
private Double bhj;
/** 闭合方向 */
@Excel(name = "闭合方向")
private Double bhfx;
/** 靶半径 */
@Excel(name = "靶半径")
private Double bbj;
/** 备注 */
@Excel(name = "备注")
private String bz;
/** 创建人 */
@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 setJh(String jh)
{
this.jh = jh;
}
public String getJh()
{
return jh;
}
public void setGdlx(String gdlx)
{
this.gdlx = gdlx;
}
public String getGdlx()
{
return gdlx;
}
public void setJkhzb(Double jkhzb)
{
this.jkhzb = jkhzb;
}
public Double getJkhzb()
{
return jkhzb;
}
public void setJkzzb(Double jkzzb)
{
this.jkzzb = jkzzb;
}
public Double getJkzzb()
{
return jkzzb;
}
public void setBdhzb(Double bdhzb)
{
this.bdhzb = bdhzb;
}
public Double getBdhzb()
{
return bdhzb;
}
public void setBdzzb(Double bdzzb)
{
this.bdzzb = bdzzb;
}
public Double getBdzzb()
{
return bdzzb;
}
public void setCs(Double cs)
{
this.cs = cs;
}
public Double getCs()
{
return cs;
}
public void setBhj(Double bhj)
{
this.bhj = bhj;
}
public Double getBhj()
{
return bhj;
}
public void setBhfx(Double bhfx)
{
this.bhfx = bhfx;
}
public Double getBhfx()
{
return bhfx;
}
public void setBbj(Double bbj)
{
this.bbj = bbj;
}
public Double getBbj()
{
return bbj;
}
public void setBz(String bz)
{
this.bz = bz;
}
public String getBz()
{
return bz;
}
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("jh", getJh())
.append("gdlx", getGdlx())
.append("jkhzb", getJkhzb())
.append("jkzzb", getJkzzb())
.append("bdhzb", getBdhzb())
.append("bdzzb", getBdzzb())
.append("cs", getCs())
.append("bhj", getBhj())
.append("bhfx", getBhfx())
.append("bbj", getBbj())
.append("bz", getBz())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjJygjGdfdcs;
/**
* 设计信息-井眼轨迹_轨道分段参数Mapper接口
*
* @author ruoyi
* @date 2025-06-26
*/
public interface SjJygjGdfdcsMapper
{
/**
* 查询设计信息-井眼轨迹_轨道分段参数
*
* @param id 设计信息-井眼轨迹_轨道分段参数主键
* @return 设计信息-井眼轨迹_轨道分段参数
*/
public SjJygjGdfdcs selectSjJygjGdfdcsById(Long id);
/**
* 查询设计信息-井眼轨迹_轨道分段参数列表
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 设计信息-井眼轨迹_轨道分段参数集合
*/
public List<SjJygjGdfdcs> selectSjJygjGdfdcsList(SjJygjGdfdcs sjJygjGdfdcs);
/**
* 新增设计信息-井眼轨迹_轨道分段参数
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 结果
*/
public int insertSjJygjGdfdcs(SjJygjGdfdcs sjJygjGdfdcs);
/**
* 修改设计信息-井眼轨迹_轨道分段参数
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 结果
*/
public int updateSjJygjGdfdcs(SjJygjGdfdcs sjJygjGdfdcs);
/**
* 删除设计信息-井眼轨迹_轨道分段参数
*
* @param id 设计信息-井眼轨迹_轨道分段参数主键
* @return 结果
*/
public int deleteSjJygjGdfdcsById(Long id);
/**
* 批量删除设计信息-井眼轨迹_轨道分段参数
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjJygjGdfdcsByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjJygjGdsjgdcs;
/**
* 设计信息-井眼轨迹_轨道设计各点参数Mapper接口
*
* @author ruoyi
* @date 2025-06-26
*/
public interface SjJygjGdsjgdcsMapper
{
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数
*
* @param id 设计信息-井眼轨迹_轨道设计各点参数主键
* @return 设计信息-井眼轨迹_轨道设计各点参数
*/
public SjJygjGdsjgdcs selectSjJygjGdsjgdcsById(Long id);
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数列表
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 设计信息-井眼轨迹_轨道设计各点参数集合
*/
public List<SjJygjGdsjgdcs> selectSjJygjGdsjgdcsList(SjJygjGdsjgdcs sjJygjGdsjgdcs);
/**
* 新增设计信息-井眼轨迹_轨道设计各点参数
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 结果
*/
public int insertSjJygjGdsjgdcs(SjJygjGdsjgdcs sjJygjGdsjgdcs);
/**
* 修改设计信息-井眼轨迹_轨道设计各点参数
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 结果
*/
public int updateSjJygjGdsjgdcs(SjJygjGdsjgdcs sjJygjGdsjgdcs);
/**
* 删除设计信息-井眼轨迹_轨道设计各点参数
*
* @param id 设计信息-井眼轨迹_轨道设计各点参数主键
* @return 结果
*/
public int deleteSjJygjGdsjgdcsById(Long id);
/**
* 批量删除设计信息-井眼轨迹_轨道设计各点参数
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjJygjGdsjgdcsByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjJygjInfo;
/**
* 设计信息-井眼轨迹信息Mapper接口
*
* @author ruoyi
* @date 2025-06-26
*/
public interface SjJygjInfoMapper
{
/**
* 查询设计信息-井眼轨迹信息
*
* @param id 设计信息-井眼轨迹信息主键
* @return 设计信息-井眼轨迹信息
*/
public SjJygjInfo selectSjJygjInfoById(Long id);
/**
* 查询设计信息-井眼轨迹信息列表
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 设计信息-井眼轨迹信息集合
*/
public List<SjJygjInfo> selectSjJygjInfoList(SjJygjInfo sjJygjInfo);
/**
* 新增设计信息-井眼轨迹信息
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 结果
*/
public int insertSjJygjInfo(SjJygjInfo sjJygjInfo);
/**
* 修改设计信息-井眼轨迹信息
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 结果
*/
public int updateSjJygjInfo(SjJygjInfo sjJygjInfo);
/**
* 删除设计信息-井眼轨迹信息
*
* @param id 设计信息-井眼轨迹信息主键
* @return 结果
*/
public int deleteSjJygjInfoById(Long id);
/**
* 批量删除设计信息-井眼轨迹信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjJygjInfoByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjJygjGdfdcs;
/**
* 设计信息-井眼轨迹_轨道分段参数Service接口
*
* @author ruoyi
* @date 2025-06-26
*/
public interface ISjJygjGdfdcsService
{
/**
* 查询设计信息-井眼轨迹_轨道分段参数
*
* @param id 设计信息-井眼轨迹_轨道分段参数主键
* @return 设计信息-井眼轨迹_轨道分段参数
*/
public SjJygjGdfdcs selectSjJygjGdfdcsById(Long id);
/**
* 查询设计信息-井眼轨迹_轨道分段参数列表
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 设计信息-井眼轨迹_轨道分段参数集合
*/
public List<SjJygjGdfdcs> selectSjJygjGdfdcsList(SjJygjGdfdcs sjJygjGdfdcs);
/**
* 新增设计信息-井眼轨迹_轨道分段参数
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 结果
*/
public int insertSjJygjGdfdcs(SjJygjGdfdcs sjJygjGdfdcs);
/**
* 修改设计信息-井眼轨迹_轨道分段参数
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 结果
*/
public int updateSjJygjGdfdcs(SjJygjGdfdcs sjJygjGdfdcs);
/**
* 批量删除设计信息-井眼轨迹_轨道分段参数
*
* @param ids 需要删除的设计信息-井眼轨迹_轨道分段参数主键集合
* @return 结果
*/
public int deleteSjJygjGdfdcsByIds(Long[] ids);
/**
* 删除设计信息-井眼轨迹_轨道分段参数信息
*
* @param id 设计信息-井眼轨迹_轨道分段参数主键
* @return 结果
*/
public int deleteSjJygjGdfdcsById(Long id);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjJygjGdsjgdcs;
/**
* 设计信息-井眼轨迹_轨道设计各点参数Service接口
*
* @author ruoyi
* @date 2025-06-26
*/
public interface ISjJygjGdsjgdcsService
{
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数
*
* @param id 设计信息-井眼轨迹_轨道设计各点参数主键
* @return 设计信息-井眼轨迹_轨道设计各点参数
*/
public SjJygjGdsjgdcs selectSjJygjGdsjgdcsById(Long id);
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数列表
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 设计信息-井眼轨迹_轨道设计各点参数集合
*/
public List<SjJygjGdsjgdcs> selectSjJygjGdsjgdcsList(SjJygjGdsjgdcs sjJygjGdsjgdcs);
/**
* 新增设计信息-井眼轨迹_轨道设计各点参数
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 结果
*/
public int insertSjJygjGdsjgdcs(SjJygjGdsjgdcs sjJygjGdsjgdcs);
/**
* 修改设计信息-井眼轨迹_轨道设计各点参数
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 结果
*/
public int updateSjJygjGdsjgdcs(SjJygjGdsjgdcs sjJygjGdsjgdcs);
/**
* 批量删除设计信息-井眼轨迹_轨道设计各点参数
*
* @param ids 需要删除的设计信息-井眼轨迹_轨道设计各点参数主键集合
* @return 结果
*/
public int deleteSjJygjGdsjgdcsByIds(Long[] ids);
/**
* 删除设计信息-井眼轨迹_轨道设计各点参数信息
*
* @param id 设计信息-井眼轨迹_轨道设计各点参数主键
* @return 结果
*/
public int deleteSjJygjGdsjgdcsById(Long id);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjJygjInfo;
/**
* 设计信息-井眼轨迹信息Service接口
*
* @author ruoyi
* @date 2025-06-26
*/
public interface ISjJygjInfoService
{
/**
* 查询设计信息-井眼轨迹信息
*
* @param id 设计信息-井眼轨迹信息主键
* @return 设计信息-井眼轨迹信息
*/
public SjJygjInfo selectSjJygjInfoById(Long id);
/**
* 查询设计信息-井眼轨迹信息列表
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 设计信息-井眼轨迹信息集合
*/
public List<SjJygjInfo> selectSjJygjInfoList(SjJygjInfo sjJygjInfo);
/**
* 新增设计信息-井眼轨迹信息
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 结果
*/
public int insertSjJygjInfo(SjJygjInfo sjJygjInfo);
/**
* 修改设计信息-井眼轨迹信息
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 结果
*/
public int updateSjJygjInfo(SjJygjInfo sjJygjInfo);
/**
* 批量删除设计信息-井眼轨迹信息
*
* @param ids 需要删除的设计信息-井眼轨迹信息主键集合
* @return 结果
*/
public int deleteSjJygjInfoByIds(Long[] ids);
/**
* 删除设计信息-井眼轨迹信息信息
*
* @param id 设计信息-井眼轨迹信息主键
* @return 结果
*/
public int deleteSjJygjInfoById(Long id);
}
package com.ruoyi.project.zjsgfa.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.zjsgfa.mapper.SjJygjGdfdcsMapper;
import com.ruoyi.project.zjsgfa.domain.SjJygjGdfdcs;
import com.ruoyi.project.zjsgfa.service.ISjJygjGdfdcsService;
/**
* 设计信息-井眼轨迹_轨道分段参数Service业务层处理
*
* @author ruoyi
* @date 2025-06-26
*/
@Service
public class SjJygjGdfdcsServiceImpl implements ISjJygjGdfdcsService
{
@Autowired
private SjJygjGdfdcsMapper sjJygjGdfdcsMapper;
/**
* 查询设计信息-井眼轨迹_轨道分段参数
*
* @param id 设计信息-井眼轨迹_轨道分段参数主键
* @return 设计信息-井眼轨迹_轨道分段参数
*/
@Override
public SjJygjGdfdcs selectSjJygjGdfdcsById(Long id)
{
return sjJygjGdfdcsMapper.selectSjJygjGdfdcsById(id);
}
/**
* 查询设计信息-井眼轨迹_轨道分段参数列表
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 设计信息-井眼轨迹_轨道分段参数
*/
@Override
public List<SjJygjGdfdcs> selectSjJygjGdfdcsList(SjJygjGdfdcs sjJygjGdfdcs)
{
return sjJygjGdfdcsMapper.selectSjJygjGdfdcsList(sjJygjGdfdcs);
}
/**
* 新增设计信息-井眼轨迹_轨道分段参数
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 结果
*/
@Override
public int insertSjJygjGdfdcs(SjJygjGdfdcs sjJygjGdfdcs)
{
return sjJygjGdfdcsMapper.insertSjJygjGdfdcs(sjJygjGdfdcs);
}
/**
* 修改设计信息-井眼轨迹_轨道分段参数
*
* @param sjJygjGdfdcs 设计信息-井眼轨迹_轨道分段参数
* @return 结果
*/
@Override
public int updateSjJygjGdfdcs(SjJygjGdfdcs sjJygjGdfdcs)
{
sjJygjGdfdcs.setUpdateTime(DateUtils.getNowDate());
return sjJygjGdfdcsMapper.updateSjJygjGdfdcs(sjJygjGdfdcs);
}
/**
* 批量删除设计信息-井眼轨迹_轨道分段参数
*
* @param ids 需要删除的设计信息-井眼轨迹_轨道分段参数主键
* @return 结果
*/
@Override
public int deleteSjJygjGdfdcsByIds(Long[] ids)
{
return sjJygjGdfdcsMapper.deleteSjJygjGdfdcsByIds(ids);
}
/**
* 删除设计信息-井眼轨迹_轨道分段参数信息
*
* @param id 设计信息-井眼轨迹_轨道分段参数主键
* @return 结果
*/
@Override
public int deleteSjJygjGdfdcsById(Long id)
{
return sjJygjGdfdcsMapper.deleteSjJygjGdfdcsById(id);
}
}
package com.ruoyi.project.zjsgfa.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.zjsgfa.mapper.SjJygjGdsjgdcsMapper;
import com.ruoyi.project.zjsgfa.domain.SjJygjGdsjgdcs;
import com.ruoyi.project.zjsgfa.service.ISjJygjGdsjgdcsService;
/**
* 设计信息-井眼轨迹_轨道设计各点参数Service业务层处理
*
* @author ruoyi
* @date 2025-06-26
*/
@Service
public class SjJygjGdsjgdcsServiceImpl implements ISjJygjGdsjgdcsService
{
@Autowired
private SjJygjGdsjgdcsMapper sjJygjGdsjgdcsMapper;
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数
*
* @param id 设计信息-井眼轨迹_轨道设计各点参数主键
* @return 设计信息-井眼轨迹_轨道设计各点参数
*/
@Override
public SjJygjGdsjgdcs selectSjJygjGdsjgdcsById(Long id)
{
return sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsById(id);
}
/**
* 查询设计信息-井眼轨迹_轨道设计各点参数列表
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 设计信息-井眼轨迹_轨道设计各点参数
*/
@Override
public List<SjJygjGdsjgdcs> selectSjJygjGdsjgdcsList(SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
return sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
}
/**
* 新增设计信息-井眼轨迹_轨道设计各点参数
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 结果
*/
@Override
public int insertSjJygjGdsjgdcs(SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
return sjJygjGdsjgdcsMapper.insertSjJygjGdsjgdcs(sjJygjGdsjgdcs);
}
/**
* 修改设计信息-井眼轨迹_轨道设计各点参数
*
* @param sjJygjGdsjgdcs 设计信息-井眼轨迹_轨道设计各点参数
* @return 结果
*/
@Override
public int updateSjJygjGdsjgdcs(SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
sjJygjGdsjgdcs.setUpdateTime(DateUtils.getNowDate());
return sjJygjGdsjgdcsMapper.updateSjJygjGdsjgdcs(sjJygjGdsjgdcs);
}
/**
* 批量删除设计信息-井眼轨迹_轨道设计各点参数
*
* @param ids 需要删除的设计信息-井眼轨迹_轨道设计各点参数主键
* @return 结果
*/
@Override
public int deleteSjJygjGdsjgdcsByIds(Long[] ids)
{
return sjJygjGdsjgdcsMapper.deleteSjJygjGdsjgdcsByIds(ids);
}
/**
* 删除设计信息-井眼轨迹_轨道设计各点参数信息
*
* @param id 设计信息-井眼轨迹_轨道设计各点参数主键
* @return 结果
*/
@Override
public int deleteSjJygjGdsjgdcsById(Long id)
{
return sjJygjGdsjgdcsMapper.deleteSjJygjGdsjgdcsById(id);
}
}
package com.ruoyi.project.zjsgfa.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.zjsgfa.mapper.SjJygjInfoMapper;
import com.ruoyi.project.zjsgfa.domain.SjJygjInfo;
import com.ruoyi.project.zjsgfa.service.ISjJygjInfoService;
/**
* 设计信息-井眼轨迹信息Service业务层处理
*
* @author ruoyi
* @date 2025-06-26
*/
@Service
public class SjJygjInfoServiceImpl implements ISjJygjInfoService
{
@Autowired
private SjJygjInfoMapper sjJygjInfoMapper;
/**
* 查询设计信息-井眼轨迹信息
*
* @param id 设计信息-井眼轨迹信息主键
* @return 设计信息-井眼轨迹信息
*/
@Override
public SjJygjInfo selectSjJygjInfoById(Long id)
{
return sjJygjInfoMapper.selectSjJygjInfoById(id);
}
/**
* 查询设计信息-井眼轨迹信息列表
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 设计信息-井眼轨迹信息
*/
@Override
public List<SjJygjInfo> selectSjJygjInfoList(SjJygjInfo sjJygjInfo)
{
return sjJygjInfoMapper.selectSjJygjInfoList(sjJygjInfo);
}
/**
* 新增设计信息-井眼轨迹信息
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 结果
*/
@Override
public int insertSjJygjInfo(SjJygjInfo sjJygjInfo)
{
return sjJygjInfoMapper.insertSjJygjInfo(sjJygjInfo);
}
/**
* 修改设计信息-井眼轨迹信息
*
* @param sjJygjInfo 设计信息-井眼轨迹信息
* @return 结果
*/
@Override
public int updateSjJygjInfo(SjJygjInfo sjJygjInfo)
{
sjJygjInfo.setUpdateTime(DateUtils.getNowDate());
return sjJygjInfoMapper.updateSjJygjInfo(sjJygjInfo);
}
/**
* 批量删除设计信息-井眼轨迹信息
*
* @param ids 需要删除的设计信息-井眼轨迹信息主键
* @return 结果
*/
@Override
public int deleteSjJygjInfoByIds(Long[] ids)
{
return sjJygjInfoMapper.deleteSjJygjInfoByIds(ids);
}
/**
* 删除设计信息-井眼轨迹信息信息
*
* @param id 设计信息-井眼轨迹信息主键
* @return 结果
*/
@Override
public int deleteSjJygjInfoById(Long id)
{
return sjJygjInfoMapper.deleteSjJygjInfoById(id);
}
}
......@@ -48,7 +48,7 @@ public class DjdcController {
* 获取井基础信息
*/
@PostMapping("/api")
public AjaxResult ff(@RequestBody CommonParam param){
public AjaxResult ff(@RequestBody CommonParam param) throws Exception{
String path = param.getPath();
Map<String,Object> map =new HashMap<>();
switch (path) {
......@@ -120,6 +120,21 @@ public class DjdcController {
map.put("jdzjl","井底纵距离");
map.put("jdhjl","井底横距离");
return AjaxResult.success( djdcService.getLjjwList(param),map);
case "getJsqaList":
//获取复杂情况
map.put("jh","井号");
map.put("fzbh","复杂编号");
map.put("fzqk","复杂情况");
map.put("fsrq","事故时间-发生");
map.put("fssj","事故时间-发生");
map.put("jcrq","事故时间-解除");
map.put("jcsj","事故时间-解除");
map.put("sssj","事故时间-损失");
map.put("fsjgjyy","发生经过");
map.put("clgk","处理概况");
map.put("zjjjss","直接损失");
map.put("js","井深");
return AjaxResult.success( djdcService.getJsqaList(param),map);
default:
return AjaxResult.success();
}
......
......@@ -2,6 +2,8 @@ package com.ruoyi.project.zt.domian;
import lombok.Data;
import java.util.List;
@Data
public class CommonParam {
......@@ -32,4 +34,7 @@ public class CommonParam {
private Double jl=1000.00;
private String[] jhs;
}
......@@ -10,6 +10,10 @@ public class DjZqsjfx {
//井号
private String jh;
/**
* 井筒名
*/
private String jtm;
//开始井深
private Double ksjs;
//结束井深
......@@ -20,15 +24,25 @@ public class DjZqsjfx {
private Double jc;
//到达层位
private String cw;
//钻进周期
//钻进实际周期
private Double zjzq;
//中完周期
private Double zwzq;
//钻进速率
private Double zjsl;
//钻进异常周期
private Double zjycsl;
//钻进生产周期
private Double zjsczq;
//钻进速率
private Double zjsl;
//中完实际周期
private Double zwzq;
//完井异常周期
private Double wjycsl;
//完井(中完)生产周期
private Double wjsczq;
//钻井异常描述
private String zjycms;
//中完(完井异常描述)
private String wjycms;
}
package com.ruoyi.project.zt.domian;
import lombok.Data;
@Data
public class Jsfa {
private String jh;
private Integer xh;
private String zjjd;
private String zjzh;
private String bz;
}
package com.ruoyi.project.zt.domian;
import lombok.Data;
import java.util.Date;
@Data
public class Jsha {
private String jh;
private Integer xh;
private String ztxlh;
private String ztxh;
private String iadc;
private Integer xjcs;
private Double cc;
private String lx;
private String cj;
private Double rjxd;
private Double cjxd;
private Double pz1;
private Double pz2;
private Double pz3;
private Double pz4;
private Double pz5;
private Double pz6;
private Double pz7;
private Double pz8;
private Double pz9;
private Double pz10;
private Double qsjs;
private Double zzjs;
private String szdc;
private Double jc;
private Double jxzs;
private Double jcsjhj;
private Double jcsjczj;
private Double jcsjqxz;
private Double jcsjkhy;
private String zy;
private String zs;
private String gj;
private String bs;
private String pl;
private Double lgby;
private Double ztyj;
private Double hkyh;
private Double cjl;
private Double pssd;
private Double ztsgl;
private Double bsgl;
private Double sfsdzg;
private Double sfsdzt;
private Double gllyl;
private String ycmsqk;
private String zcmsqk;
private String zjmsqk;
private String bz;
private String npc;
private String wpc;
private String mstz;
private String wz;
private String zc;
private String zj;
private String qzyy;
private String qttz;
private Double nj;
private Integer zpzzs;
private Date qsrq;
private Date zzzrq;
private String pzlx;
private Double ztjg;
}
package com.ruoyi.project.zt.domian;
import lombok.Data;
import java.util.Date;
@Data
public class Jsqa {
private String jh;
private Integer fzbh;
private String fzqk;
private Date fsrq;
private String fssj;
private Date jcrq;
private String jcsj;
private Double sssj;
private String fsjgjyy;
private String clgk;
private Double zjjjss;
private Double js;
}
......@@ -102,4 +102,8 @@ public class Jswa {
private Double njss;
private Double ksjs;
private String ksrq;
private String jsrq;
}
package com.ruoyi.project.zt.mapper;
import com.ruoyi.project.zt.domian.CommonParam;
import com.ruoyi.project.zt.domian.Jsqa;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface JsqaMapper {
List<Jsqa> getJsqaList(CommonParam param);
}
......@@ -3,6 +3,7 @@ package com.ruoyi.project.zt.service;
import com.ruoyi.project.zt.domian.*;
import java.text.ParseException;
import java.util.List;
public interface DjdcService {
......@@ -15,11 +16,16 @@ public interface DjdcService {
List<Djjc> getDjjcList(CommonParam param);
List<DjZqsjfx> getZqshfxList(CommonParam param);
List<DjZqsjfx> getZqshfxList(CommonParam param) throws Exception;
List<DjZjzhfx> getZjzhfxList(CommonParam param);
List<Ljjw> getLjjwList(CommonParam param);
List<Jsfa> getJsfaList(CommonParam param);
List<Jsqa> getJsqaList(CommonParam param);
}
package com.ruoyi.project.zt.service.impl;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
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.service.DjdcService;
......@@ -13,8 +17,16 @@ 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.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;
import java.util.stream.Collectors;
@Service
......@@ -28,6 +40,8 @@ public class DjdcServiceImpl implements DjdcService {
@Autowired
private JswaMapper jswaMapper;
@Autowired
private JsqaMapper jsqaMapper;
@Override
......@@ -43,13 +57,15 @@ public class DjdcServiceImpl implements DjdcService {
@Override
public List<Djjc> getDjjcList(CommonParam param) {
if(StringUtils.isNotEmpty(param.getJh())){
Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
if(djjc==null){
return new ArrayList<>();
}else {
param.setJdhzb(djjc.getJdhzb());
param.setJdzzb(djjc.getJdzzb());
}
String[] jhs = param.getJh().split(",");
param.setJhs(jhs);
// Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
// if(djjc==null){
// return new ArrayList<>();
// }else {
// param.setJdhzb(djjc.getJdhzb());
// param.setJdzzb(djjc.getJdzzb());
// }
}
// 创建数据列表
List<Qzyy> qzyyList = new ArrayList<>();
......@@ -106,8 +122,9 @@ public class DjdcServiceImpl implements DjdcService {
String wpcqk="";
String npcqk="";
if(StringUtils.isNotEmpty(wpc)){
Integer clsz = clsz(wpc);
for(int i=0 ;i<9;i++){
if(Integer.parseInt(wpc)==i){
if(clsz==i){
if(i==0){
wpcqk="外排齿:无磨损";
}else {
......@@ -119,8 +136,12 @@ public class DjdcServiceImpl implements DjdcService {
}
if(StringUtils.isNotEmpty(npc)){
Integer clsz = clsz(npc);
if(item.getJh().equals("滨648-侧斜28")){
Integer clsz2 = clsz(npc);
}
for(int i=1 ;i<9;i++){
if(Integer.parseInt(npc)==i){
if(clsz==i){
if(i==0){
npcqk="内排齿:无磨损";
}else {
......@@ -138,8 +159,9 @@ public class DjdcServiceImpl implements DjdcService {
String wpcqk="";
String npcqk="";
if(StringUtils.isNotEmpty(yc)){
Integer clsz = clsz(yc);
for(int i=1 ;i<9;i++){
if(Integer.parseInt(yc)==i){
if(clsz==i){
if(i==0){
wpcqk="牙齿:无磨损";
}else {
......@@ -151,8 +173,9 @@ public class DjdcServiceImpl implements DjdcService {
}
if(StringUtils.isNotEmpty(zc)){
Integer clsz = clsz(yc);
for(int i=1 ;i<9;i++){
if(Integer.parseInt(zc)==i){
if(clsz==i){
if(i==0){
npcqk="轴承:无磨损";
}else {
......@@ -177,20 +200,636 @@ public class DjdcServiceImpl implements DjdcService {
return list;
}
public Integer clsz(String str){
// List<Integer> numbers = new ArrayList<>();
Pattern pattern = Pattern.compile("\\d+");
Matcher matcher = pattern.matcher(str);
String re="";
while (matcher.find()) {
re=re+matcher.group();
}
if(StringUtils.isNotEmpty(re)){
return Integer.parseInt(re);
}else {
return 0;
}
}
@Override
public List<DjZqsjfx> getZqshfxList(CommonParam param) {
public List<DjZqsjfx> getZqshfxList(CommonParam param) throws Exception {
//查询临井
if(StringUtils.isNotEmpty(param.getJh())){
Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
if(djjc==null){
return new ArrayList<>();
}else {
param.setJdhzb(djjc.getJdhzb());
param.setJdzzb(djjc.getJdzzb());
}
String[] jhs = param.getJh().split(",");
param.setJhs(jhs);
// Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
// if(djjc==null){
// return new ArrayList<>();
// }else {
// param.setJdhzb(djjc.getJdhzb());
// param.setJdzzb(djjc.getJdzzb());
// }
}
//调用接口查询数据
String jsonString = "{\n" +
" \"columns\": [\n" +
" \"JHDM\",\n" +
" \"JH\",\n" +
" \"ZYMC\",\n" +
" \"ZYMCBM\",\n" +
" \"JS\",\n" +
" \"ZYSJ\",\n" +
" \"DATASUBTIME\"\n" +
" ],\n" +
" \"result\": [\n" +
" [\n" +
" \"SL2024022603\",\n" +
" \"滨648-侧斜28\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2978,\n" +
" \"Tue, 17 Sep 2024 22:30:00 GMT\",\n" +
" \"Wed, 18 Sep 2024 07:49:50 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024021905\",\n" +
" \"滨648-斜69\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 317,\n" +
" \"Wed, 05 Jun 2024 11:30:00 GMT\",\n" +
" \"Thu, 06 Jun 2024 08:05:38 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024021905\",\n" +
" \"滨648-斜69\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Tue, 04 Jun 2024 11:00:00 GMT\",\n" +
" \"Wed, 05 Jun 2024 09:01:52 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024021905\",\n" +
" \"滨648-斜69\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 317,\n" +
" \"Tue, 04 Jun 2024 14:00:00 GMT\",\n" +
" \"Thu, 06 Jun 2024 08:05:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024021905\",\n" +
" \"滨648-斜69\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2923,\n" +
" \"Thu, 13 Jun 2024 21:30:00 GMT\",\n" +
" \"Fri, 14 Jun 2024 07:26:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024021905\",\n" +
" \"滨648-斜69\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2923,\n" +
" \"Thu, 13 Jun 2024 21:30:00 GMT\",\n" +
" \"Fri, 14 Jun 2024 07:26:36 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024021905\",\n" +
" \"滨648-斜69\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2985,\n" +
" \"Tue, 18 Jun 2024 19:30:00 GMT\",\n" +
" \"Wed, 19 Jun 2024 06:13:50 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024022603\",\n" +
" \"滨648-侧斜28\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 213,\n" +
" \"Wed, 04 Sep 2024 22:00:00 GMT\",\n" +
" \"Thu, 05 Sep 2024 06:29:17 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024022603\",\n" +
" \"滨648-侧斜28\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2978,\n" +
" \"Wed, 11 Sep 2024 11:00:00 GMT\",\n" +
" \"Thu, 12 Sep 2024 06:59:38 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100817\",\n" +
" \"滨648-斜72\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 3251,\n" +
" \"Sat, 25 Jan 2025 12:30:00 GMT\",\n" +
" \"Mon, 27 Jan 2025 06:55:31 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100817\",\n" +
" \"滨648-斜72\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 3251,\n" +
" \"Sat, 25 Jan 2025 12:30:00 GMT\",\n" +
" \"Mon, 27 Jan 2025 06:55:31 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100818\",\n" +
" \"滨648-斜73\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 308,\n" +
" \"Sun, 12 Jan 2025 23:00:00 GMT\",\n" +
" \"Tue, 14 Jan 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100817\",\n" +
" \"滨648-斜72\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 462,\n" +
" \"Wed, 22 Jan 2025 21:30:00 GMT\",\n" +
" \"Fri, 24 Jan 2025 06:55:25 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100816\",\n" +
" \"滨648-斜71\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Sun, 02 Feb 2025 12:00:00 GMT\",\n" +
" \"Mon, 03 Feb 2025 06:55:23 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100816\",\n" +
" \"滨648-斜71\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 453,\n" +
" \"Sun, 02 Feb 2025 18:00:00 GMT\",\n" +
" \"Mon, 03 Feb 2025 06:55:23 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100825\",\n" +
" \"滨648-斜88\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 3049,\n" +
" \"Tue, 24 Dec 2024 18:30:00 GMT\",\n" +
" \"Wed, 01 Jan 2025 06:55:22 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100825\",\n" +
" \"滨648-斜88\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 3049,\n" +
" \"Tue, 24 Dec 2024 18:30:00 GMT\",\n" +
" \"Wed, 01 Jan 2025 06:55:22 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100818\",\n" +
" \"滨648-斜73\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Sat, 11 Jan 2025 18:30:00 GMT\",\n" +
" \"Mon, 13 Jan 2025 06:55:25 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100818\",\n" +
" \"滨648-斜73\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 308,\n" +
" \"Sat, 11 Jan 2025 22:30:00 GMT\",\n" +
" \"Mon, 13 Jan 2025 06:55:25 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100817\",\n" +
" \"滨648-斜72\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Tue, 21 Jan 2025 12:00:00 GMT\",\n" +
" \"Thu, 23 Jan 2025 06:55:26 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100825\",\n" +
" \"滨648-斜88\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 3049,\n" +
" \"Mon, 30 Dec 2024 19:00:00 GMT\",\n" +
" \"Wed, 01 Jan 2025 06:55:22 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100818\",\n" +
" \"滨648-斜73\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2981,\n" +
" \"Mon, 20 Jan 2025 11:00:00 GMT\",\n" +
" \"Tue, 21 Jan 2025 06:55:30 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100816\",\n" +
" \"滨648-斜71\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 453,\n" +
" \"Mon, 03 Feb 2025 23:30:00 GMT\",\n" +
" \"Wed, 05 Feb 2025 06:55:32 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100816\",\n" +
" \"滨648-斜71\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 3030,\n" +
" \"Tue, 11 Feb 2025 18:00:00 GMT\",\n" +
" \"Thu, 13 Feb 2025 06:55:25 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100817\",\n" +
" \"滨648-斜72\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 462,\n" +
" \"Tue, 21 Jan 2025 18:00:00 GMT\",\n" +
" \"Thu, 23 Jan 2025 06:55:26 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100825\",\n" +
" \"滨648-斜88\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Fri, 20 Dec 2024 15:30:00 GMT\",\n" +
" \"Wed, 25 Dec 2024 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100825\",\n" +
" \"滨648-斜88\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 324,\n" +
" \"Fri, 20 Dec 2024 19:30:00 GMT\",\n" +
" \"Wed, 25 Dec 2024 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100825\",\n" +
" \"滨648-斜88\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 324,\n" +
" \"Sun, 22 Dec 2024 00:00:00 GMT\",\n" +
" \"Wed, 25 Dec 2024 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100817\",\n" +
" \"滨648-斜72\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 3251,\n" +
" \"Sat, 01 Feb 2025 13:00:00 GMT\",\n" +
" \"Sun, 02 Feb 2025 06:55:30 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100824\",\n" +
" \"滨648-斜87\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2840,\n" +
" \"Wed, 26 Mar 2025 12:30:00 GMT\",\n" +
" \"Sun, 30 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100824\",\n" +
" \"滨648-斜87\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2840,\n" +
" \"Wed, 26 Mar 2025 12:30:00 GMT\",\n" +
" \"Sun, 30 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100818\",\n" +
" \"滨648-斜73\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2981,\n" +
" \"Wed, 15 Jan 2025 12:00:00 GMT\",\n" +
" \"Fri, 17 Jan 2025 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100818\",\n" +
" \"滨648-斜73\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2981,\n" +
" \"Wed, 15 Jan 2025 12:00:00 GMT\",\n" +
" \"Fri, 17 Jan 2025 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100821\",\n" +
" \"滨648-斜78\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 313,\n" +
" \"Sun, 16 Mar 2025 15:30:00 GMT\",\n" +
" \"Mon, 17 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100821\",\n" +
" \"滨648-斜78\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Sun, 16 Mar 2025 13:00:00 GMT\",\n" +
" \"Mon, 17 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100820\",\n" +
" \"滨648-斜76\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2763,\n" +
" \"Sat, 15 Mar 2025 08:00:00 GMT\",\n" +
" \"Sun, 16 Mar 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100820\",\n" +
" \"滨648-斜76\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 322,\n" +
" \"Sun, 09 Mar 2025 16:00:00 GMT\",\n" +
" \"Sun, 16 Mar 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100820\",\n" +
" \"滨648-斜76\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Sat, 08 Mar 2025 14:00:00 GMT\",\n" +
" \"Mon, 10 Mar 2025 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100820\",\n" +
" \"滨648-斜76\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 322,\n" +
" \"Sat, 08 Mar 2025 17:30:00 GMT\",\n" +
" \"Mon, 10 Mar 2025 06:55:28 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100821\",\n" +
" \"滨648-斜78\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2819,\n" +
" \"Sat, 22 Mar 2025 07:30:00 GMT\",\n" +
" \"Sun, 23 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100824\",\n" +
" \"滨648-斜87\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 324,\n" +
" \"Mon, 24 Mar 2025 15:00:00 GMT\",\n" +
" \"Sun, 30 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100820\",\n" +
" \"滨648-斜76\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2763,\n" +
" \"Tue, 11 Mar 2025 15:00:00 GMT\",\n" +
" \"Sun, 16 Mar 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100824\",\n" +
" \"滨648-斜87\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Sun, 23 Mar 2025 12:30:00 GMT\",\n" +
" \"Sun, 30 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100824\",\n" +
" \"滨648-斜87\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 324,\n" +
" \"Sun, 23 Mar 2025 16:00:00 GMT\",\n" +
" \"Sun, 30 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100821\",\n" +
" \"滨648-斜78\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 313,\n" +
" \"Mon, 17 Mar 2025 16:00:00 GMT\",\n" +
" \"Wed, 19 Mar 2025 06:55:27 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100816\",\n" +
" \"滨648-斜71\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 3030,\n" +
" \"Wed, 05 Feb 2025 18:00:00 GMT\",\n" +
" \"Fri, 07 Feb 2025 06:55:31 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100816\",\n" +
" \"滨648-斜71\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 3030,\n" +
" \"Wed, 05 Feb 2025 18:00:00 GMT\",\n" +
" \"Fri, 07 Feb 2025 06:55:31 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100821\",\n" +
" \"滨648-斜78\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2819,\n" +
" \"Wed, 19 Mar 2025 09:00:00 GMT\",\n" +
" \"Thu, 20 Mar 2025 06:55:23 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100821\",\n" +
" \"滨648-斜78\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2819,\n" +
" \"Wed, 19 Mar 2025 09:00:00 GMT\",\n" +
" \"Thu, 20 Mar 2025 06:55:23 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100820\",\n" +
" \"滨648-斜76\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2763,\n" +
" \"Tue, 11 Mar 2025 15:00:00 GMT\",\n" +
" \"Sun, 16 Mar 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100824\",\n" +
" \"滨648-斜87\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2840,\n" +
" \"Sat, 29 Mar 2025 09:00:00 GMT\",\n" +
" \"Sun, 30 Mar 2025 06:55:24 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100826\",\n" +
" \"滨648-斜90\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2834,\n" +
" \"Thu, 03 Apr 2025 02:00:00 GMT\",\n" +
" \"Sat, 05 Apr 2025 06:55:26 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100826\",\n" +
" \"滨648-斜90\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2834,\n" +
" \"Thu, 03 Apr 2025 02:00:00 GMT\",\n" +
" \"Sat, 05 Apr 2025 06:55:26 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100826\",\n" +
" \"滨648-斜90\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Sun, 30 Mar 2025 10:30:00 GMT\",\n" +
" \"Tue, 01 Apr 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100826\",\n" +
" \"滨648-斜90\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 310,\n" +
" \"Sun, 30 Mar 2025 14:00:00 GMT\",\n" +
" \"Tue, 01 Apr 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100822\",\n" +
" \"滨648-斜79\",\n" +
" \"完钻\",\n" +
" \"08\",\n" +
" 2888,\n" +
" \"Thu, 10 Apr 2025 12:00:00 GMT\",\n" +
" \"Sun, 13 Apr 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100822\",\n" +
" \"滨648-斜79\",\n" +
" \"第二次完钻\",\n" +
" \"14\",\n" +
" 2888,\n" +
" \"Thu, 10 Apr 2025 12:00:00 GMT\",\n" +
" \"Sun, 13 Apr 2025 06:55:29 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100822\",\n" +
" \"滨648-斜79\",\n" +
" \"第一次完钻\",\n" +
" \"13\",\n" +
" 312,\n" +
" \"Mon, 07 Apr 2025 16:30:00 GMT\",\n" +
" \"Wed, 09 Apr 2025 06:55:23 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100822\",\n" +
" \"滨648-斜79\",\n" +
" \"第一次开钻\",\n" +
" \"01\",\n" +
" 0,\n" +
" \"Mon, 07 Apr 2025 13:00:00 GMT\",\n" +
" \"Wed, 09 Apr 2025 06:55:23 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100822\",\n" +
" \"滨648-斜79\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2888,\n" +
" \"Tue, 15 Apr 2025 18:00:00 GMT\",\n" +
" \"Thu, 17 Apr 2025 06:55:27 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100822\",\n" +
" \"滨648-斜79\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 312,\n" +
" \"Tue, 08 Apr 2025 15:30:00 GMT\",\n" +
" \"Thu, 10 Apr 2025 06:55:30 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100826\",\n" +
" \"滨648-斜90\",\n" +
" \"完井\",\n" +
" \"09\",\n" +
" 2834,\n" +
" \"Sun, 06 Apr 2025 08:30:00 GMT\",\n" +
" \"Tue, 08 Apr 2025 06:55:26 GMT\"\n" +
" ],\n" +
" [\n" +
" \"SL2024100826\",\n" +
" \"滨648-斜90\",\n" +
" \"第二次开钻\",\n" +
" \"02\",\n" +
" 310,\n" +
" \"Mon, 31 Mar 2025 15:30:00 GMT\",\n" +
" \"Wed, 02 Apr 2025 06:55:26 GMT\"\n" +
" ]\n" +
" ]\n" +
"}";
//模拟返回值
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());
List<DjZqsjfx> list =djdcInfoMapper.getZqshfxList(param);
DecimalFormat df = new DecimalFormat("#.00");
DateTimeFormatter formatter = DateTimeFormatter
.ofPattern("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
DateTimeFormatter outputFormatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
for(DjZqsjfx item:list){
//查询进尺和层位
DjZqsjfx djZqsjfx=djdcInfoMapper.getJcAndCw(item);
......@@ -200,57 +839,314 @@ public class DjdcServiceImpl implements DjdcService {
item.setJc(djZqsjfx.getJc());
item.setCw(djZqsjfx.getCw().substring(djZqsjfx.getCw().lastIndexOf("-")+1));
//查询周期
Jsta jsta =new Jsta();
jsta.setJh(item.getJh());
jsta.setJd2(item.getJs());
jsta.setJd1(item.getKsjs());
List<Jsta> jstaList = jstaMapper.getList(jsta);
Double zjzq =0.0;
Double zwzq =0.0;
Double js = item.getJs();
for(Jsta it:jstaList){
Double jd1=it.getJd1()==null?0.0:it.getJd1();
Double jd2=it.getJd2()==null?0.0:it.getJd2();
if(jd1==0&jd2==0){
continue;
} else if(jd1.equals(js) && js.equals(jd2)){
zwzq=zwzq+it.getSjts();
// Jsta jsta =new Jsta();
// jsta.setJh(item.getJh());
// jsta.setJd2(item.getJs());
// jsta.setJd1(item.getKsjs());
// List<Jsta> jstaList = jstaMapper.getList(jsta);
// Double zjzq =0.0;
// Double zwzq =0.0;
// Double js = item.getJs();
// for(Jsta it:jstaList){
// Double jd1=it.getJd1()==null?0.0:it.getJd1();
// Double jd2=it.getJd2()==null?0.0:it.getJd2();
// if(jd1==0&jd2==0){
// continue;
// } else if(jd1.equals(js) && js.equals(jd2)){
// zwzq=zwzq+it.getSjts();
// }else {
// zjzq=zjzq+it.getSjts();
// }
// }
// item.setZjzq(Double.parseDouble(df.format(zjzq)));
// item.setZwzq(Double.parseDouble(df.format(zwzq)));
// if(item.getZjzq()>0){
// System.out.println(item.getZjzq());
// System.out.println(zwzq);
// Double zjsl=item.getJc()/item.getZjzq();
// System.out.println(zjsl);
// item.setZjsl(Double.parseDouble(df.format(zjsl)));
// }
//查询钻井日志
// Jswa jswa =new Jswa();
// jswa.setJh(item.getJh());
// jswa.setJs(item.getJs());
// jswa.setKsjs(item.getKsjs());
// List<Jswa> jswaList=jswaMapper.getList(jswa);
// Double zjycsl=0.0;
// Double wjycsl=0.0;
// for(Jswa wa:jswaList){
// Double js1 = wa.getJs();
// Double rjc = wa.getRjc();
// if (rjc!=0 && js1<= js) {
// //钻进
// zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
// }else if(rjc==0 && Objects.equals(js1, item.getJs())) {
// //完井
// wjycsl=wjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
// }
// }
// item.setZjycsl(Double.parseDouble(df.format(zjycsl)));
// item.setWjycsl(Double.parseDouble(df.format(wjycsl)));
//计算周期
List<Map<String, Object>> jhzqList = mapList.stream().filter(it -> item.getJh().equals(it.get("JH").toString())).collect(Collectors.toList());
ZonedDateTime kssj=null;
ZonedDateTime zwsj=null;
ZonedDateTime jssj=null;
if(item.getKc().equals("1")){
//取出开始日期
Map<String, Object> mapks = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("01")).findFirst().orElse(null);
if(mapks!=null){
String dateStr = (String) mapks.get("ZYSJ");
if (dateStr != null) {
kssj= ZonedDateTime.parse(dateStr, formatter);
}
}
//取出钻完日期
Map<String, Object> mapzw = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("13")).findFirst().orElse(null);
if(mapzw!=null){
String dateStr = (String) mapzw.get("ZYSJ");
if (dateStr != null) {
zwsj = ZonedDateTime.parse(dateStr, formatter);
}
}else {
zjzq=zjzq+it.getSjts();
mapzw = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("08")).findFirst().orElse(null);
if(mapzw!=null){
String dateStr = (String) mapzw.get("ZYSJ");
if (dateStr != null) {
zwsj = ZonedDateTime.parse(dateStr, formatter);
}
}
}
//取出结束日期
Map<String, Object> mapjs = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("02")).findFirst().orElse(null);
if(mapjs!=null){
String dateStr = (String) mapjs.get("ZYSJ");
if (dateStr != null) {
jssj = ZonedDateTime.parse(dateStr, formatter);
}
}else {
mapjs = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("09")).findFirst().orElse(null);
if(mapjs!=null){
String dateStr = (String) mapjs.get("ZYSJ");
if (dateStr != null) {
jssj = ZonedDateTime.parse(dateStr, formatter);
}
}
}
}else if(item.getKc().equals("2")){
//取出开始日期
Map<String, Object> mapks = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("02")).findFirst().orElse(null);
if(mapks!=null){
String dateStr = (String) mapks.get("ZYSJ");
if (dateStr != null) {
kssj= ZonedDateTime.parse(dateStr, formatter);
}
}
//取出钻完日期
Map<String, Object> mapzw = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("14")).findFirst().orElse(null);
if(mapzw!=null){
String dateStr = (String) mapzw.get("ZYSJ");
if (dateStr != null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
zwsj = ZonedDateTime.parse(dateStr, formatter);
}
}else {
mapzw = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("08")).findFirst().orElse(null);
if(mapzw!=null){
String dateStr = (String) mapzw.get("ZYSJ");
if (dateStr != null) {
zwsj = ZonedDateTime.parse(dateStr, formatter);
}
}
}
//取出结束日期
Map<String, Object> mapjs = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("03")).findFirst().orElse(null);
if(mapjs!=null){
if(mapjs!=null){
String dateStr = (String) mapjs.get("ZYSJ");
if (dateStr != null) {
jssj = ZonedDateTime.parse(dateStr, formatter);
}
}
}else {
mapjs = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("09")).findFirst().orElse(null);
if(mapjs!=null){
String dateStr = (String) mapjs.get("ZYSJ");
if (dateStr != null) {
jssj = ZonedDateTime.parse(dateStr, formatter);
}
}
}
}else if(item.getKc().equals("3")){
//取出开始日期
Map<String, Object> mapks = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("03")).findFirst().orElse(null);
if(mapks!=null){
String dateStr = (String) mapks.get("ZYSJ");
if (dateStr != null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
kssj= ZonedDateTime.parse(dateStr, formatter);
}
}
//取出钻完日期
Map<String, Object> mapzw = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("15")).findFirst().orElse(null);
if(mapzw!=null){
String dateStr = (String) mapzw.get("ZYSJ");
if (dateStr != null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
zwsj = ZonedDateTime.parse(dateStr, formatter);
}
}else {
mapzw = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("08")).findFirst().orElse(null);
if(mapzw!=null){
String dateStr = (String) mapzw.get("ZYSJ");
if (dateStr != null) {
zwsj = ZonedDateTime.parse(dateStr, formatter);
}
}
}
//取出结束日期
Map<String, Object> mapjs = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("04")).findFirst().orElse(null);
if(mapjs!=null){
if(mapjs!=null){
String dateStr = (String) mapjs.get("ZYSJ");
if (dateStr != null) {
jssj = ZonedDateTime.parse(dateStr, formatter);
}
}
}else {
mapjs = jhzqList.stream().filter(it -> it.get("ZYMCBM").equals("09")).findFirst().orElse(null);
if(mapjs!=null){
String dateStr = (String) mapjs.get("ZYSJ");
if (dateStr != null) {
jssj = ZonedDateTime.parse(dateStr, formatter);
}
}
}
}
item.setZjzq(Double.parseDouble(df.format(zjzq)));
item.setZwzq(Double.parseDouble(df.format(zwzq)));
if(item.getZjzq()>0){
System.out.println(item.getZjzq());
System.out.println(zwzq);
Double zjsl=item.getJc()/item.getZjzq();
System.out.println(zjsl);
item.setZjsl(Double.parseDouble(df.format(zjsl)));
//计算钻进实际周期
if(kssj!=null && zwsj!=null){
// 解析字符串并转换为 UTC 时间
// 转换为 UTC 时间戳(Instant)
// Instant instant1 = kssj.toInstant();
// Instant instant2 = zwsj.toInstant();
String dateTimeStr1 = kssj.format(outputFormatter2);
String dateTimeStr2 = zwsj.format(outputFormatter2);
LocalDateTime dateTime1 = LocalDateTime.parse(dateTimeStr1, outputFormatter2);
LocalDateTime dateTime2 = LocalDateTime.parse(dateTimeStr2, outputFormatter2);
// 转换为 Instant(假设为 UTC 时区)
Instant instant1 = dateTime1.atZone(ZoneOffset.UTC).toInstant();
Instant instant2 = dateTime2.atZone(ZoneOffset.UTC).toInstant();
// 计算秒数差
long secondsDiff = Duration.between(instant1, instant2).getSeconds();
// 转换为天数(保留两位小数)
double daysDiff = secondsDiff / (24.0 * 60 * 60);
item.setZjzq(Double.parseDouble(df.format(daysDiff)));
//计算异常周期
Jswa jswa =new Jswa();
jswa.setKsrq(kssj.format(outputFormatter));
jswa.setJsrq(zwsj.format(outputFormatter));
jswa.setJh(item.getJh());
List<Jswa> jswaList = jswaMapper.getList(jswa);
Double zjycsl=0.0;
for(Jswa wa:jswaList){
zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
}
//异常周期
item.setZjycsl(Double.parseDouble(df.format(zjycsl/24)));
//生产周期
item.setZjsczq(Double.parseDouble(df.format(item.getZjzq()-item.getZjycsl())));
//钻进速率
if(item.getZjzq()>0){
Double zjsl=item.getJc()/item.getZjzq();
item.setZjsl(Double.parseDouble(df.format(zjsl)));
}
if(zjycsl>0){
//钻进异常描述
item.setZjycms(String.join(",",jswaList.stream().map(Jswa::getBrzygz).collect(Collectors.toList())));
}
}
//计算中完实际周期
if(jssj!=null && zwsj!=null){
// 转换为 UTC 时间戳(Instant)
//查询钻井日志
Jswa jswa =new Jswa();
jswa.setJh(item.getJh());
jswa.setJs(item.getJs());
jswa.setKsjs(item.getKsjs());
List<Jswa> jswaList=jswaMapper.getList(jswa);
Double zjycsl=0.0;
Double wjycsl=0.0;
for(Jswa wa:jswaList){
Double js1 = wa.getJs();
Double rjc = wa.getRjc();
if (rjc!=0 && js1<= js) {
//钻进
String dateTimeStr1 = zwsj.format(outputFormatter2);
String dateTimeStr2 = jssj.format(outputFormatter2);
LocalDateTime dateTime1 = LocalDateTime.parse(dateTimeStr1, outputFormatter2);
LocalDateTime dateTime2 = LocalDateTime.parse(dateTimeStr2, outputFormatter2);
// 转换为 Instant(假设为 UTC 时区)
Instant instant1 = dateTime1.atZone(ZoneOffset.UTC).toInstant();
Instant instant2 = dateTime2.atZone(ZoneOffset.UTC).toInstant();
// 计算秒数差
long secondsDiff = Duration.between(instant1, instant2).getSeconds();
// 转换为天数(保留两位小数)
double daysDiff = secondsDiff / (24.0 * 60 * 60);
item.setZwzq(Double.parseDouble(df.format(daysDiff)));
item.setZwzq(Double.parseDouble(df.format(daysDiff)));
//计算异常周期
Jswa jswa =new Jswa();
jswa.setKsrq(zwsj.format(outputFormatter));
jswa.setJsrq(jssj.format(outputFormatter));
jswa.setJh(item.getJh());
List<Jswa> jswaList = jswaMapper.getList(jswa);
Double zjycsl=0.0;
for(Jswa wa:jswaList){
zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
}else if(rjc==0 && Objects.equals(js1, item.getJs())) {
//完井
wjycsl=wjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
}
item.setWjycsl(Double.parseDouble(df.format(zjycsl/24)));
//生产周期
item.setWjsczq(Double.parseDouble(df.format(item.getZwzq()-item.getWjycsl())));
if(zjycsl>0){
//中完异常描述
item.setWjycms(String.join(",",jswaList.stream().map(Jswa::getBrzygz).collect(Collectors.toList())));
}
}
item.setZjycsl(Double.parseDouble(df.format(zjycsl)));
item.setWjycsl(Double.parseDouble(df.format(wjycsl)));
}
return list;
......@@ -259,13 +1155,15 @@ public class DjdcServiceImpl implements DjdcService {
@Override
public List<DjZjzhfx> getZjzhfxList(CommonParam param) {
if(StringUtils.isNotEmpty(param.getJh())){
Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
if(djjc==null){
return new ArrayList<>();
}else {
param.setJdhzb(djjc.getJdhzb());
param.setJdzzb(djjc.getJdzzb());
}
String[] jhs = param.getJh().split(",");
param.setJhs(jhs);
// Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
// if(djjc==null){
// return new ArrayList<>();
// }else {
// param.setJdhzb(djjc.getJdhzb());
// param.setJdzzb(djjc.getJdzzb());
// }
}
List<DjZjzhfx> list= djdcInfoMapper.getZjzhfxList(param);
DecimalFormat df = new DecimalFormat("#.00");
......@@ -281,17 +1179,21 @@ public class DjdcServiceImpl implements DjdcService {
String url="http://10.68.249.59:33331/api/chat/1";
String result2 = HttpRequest.post(url)
.body(json)
.execute().body();
String result2 = HttpRequest.post(url).body(json).execute().body();
System.out.println(result2);
JsonObject elementerror = new Gson().fromJson(result2, JsonObject.class);
if (isValidString(elementerror, "error")) {
String errorMsg = elementerror.get("error").getAsString();
System.out.println("错误信息: " + errorMsg);
JSONObject jsonObject = JSON.parseObject(result2);
Object error = jsonObject.get("error");
if(error!=null){
System.out.println("错误信息: " + jsonObject.getString("error"));
continue;
}
// JsonObject elementerror = new Gson().fromJson(result2, JsonObject.class);
//
// if (isValidString(elementerror, "error")) {
// String errorMsg = elementerror.get("error").getAsString();
// System.out.println("错误信息: " + errorMsg);
// continue;
// }
// 解析API响应
......@@ -374,6 +1276,28 @@ public class DjdcServiceImpl implements DjdcService {
return djdcInfoMapper.getLjjwList(param);
}
@Override
public List<Jsfa> getJsfaList(CommonParam param) {
return null;
}
@Override
public List<Jsqa> getJsqaList(CommonParam param) {
if(StringUtils.isNotEmpty(param.getJh())){
String[] jhs = param.getJh().split(",");
param.setJhs(jhs);
// Djjc djjc=djdcInfoMapper.getDjinfoByjh(param.getJh());
// if(djjc==null){
// return new ArrayList<>();
// }else {
// param.setJdhzb(djjc.getJdhzb());
// param.setJdzzb(djjc.getJdzzb());
// }
}
return jsqaMapper.getJsqaList(param);
}
/**
* 从Markdown代码块中提取JSON内容
......@@ -395,6 +1319,47 @@ public class DjdcServiceImpl implements DjdcService {
}
public static List<Map<String, Object>> processJson(String jsonString) throws ParseException {
// 创建Gson实例
Gson gson = new GsonBuilder().setPrettyPrinting().create();
// 定义JSON数据的类型
Type jsonType = new TypeToken<Map<String, Object>>() {}.getType();
Map<String, Object> jsonMap = gson.fromJson(jsonString, jsonType);
// 提取columns和result
List<String> columns = (List<String>) jsonMap.get("columns");
List<List<Object>> result = (List<List<Object>>) jsonMap.get("result");
// 转换为键值对列表
List<Map<String, Object>> records = new ArrayList<>();
for (List<Object> row : result) {
Map<String, Object> record = new LinkedHashMap<>();
for (int i = 0; i < columns.size(); i++) {
if (i < row.size()) {
record.put(columns.get(i), row.get(i));
} else {
record.put(columns.get(i), null);
}
}
records.add(record);
}
// 将日期字符串转换为Date对象
// System.out.println("处理结果:");
// for (int i = 0; i < records.size(); i++) {
// Map<String, Object> firstRecord = records.get(i);
// String dateStr = (String) firstRecord.get("ZYSJ");
// if (dateStr != null) {
// SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
// Date date = dateFormat.parse(dateStr);
// firstRecord.put("ZYSJ",date);
// }
// }
return records;
}
}
<?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.zjsgfa.mapper.SjJygjGdfdcsMapper">
<resultMap type="SjJygjGdfdcs" id="SjJygjGdfdcsResult">
<result property="id" column="id" />
<result property="jh" column="jh" />
<result property="js" column="js" />
<result property="jx" column="jx" />
<result property="fw" column="fw" />
<result property="cs" column="cs" />
<result property="spwy" column="spwy" />
<result property="nbwy" column="nbwy" />
<result property="dxwy" column="dxwy" />
<result property="qjbhl" column="qjbhl" />
<result property="gjm" column="gjm" />
<result property="bd" column="bd" />
<result property="bz" column="bz" />
<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="selectSjJygjGdfdcsVo">
select id, jh, js, jx, fw, cs, spwy, nbwy, dxwy, qjbhl, gjm, bd, bz, created_by, created_time, update_by, update_time from sj_jygj_gdfdcs
</sql>
<select id="selectSjJygjGdfdcsList" parameterType="SjJygjGdfdcs" resultMap="SjJygjGdfdcsResult">
<include refid="selectSjJygjGdfdcsVo"/>
<where>
<if test="jh != null and jh != ''"> and jh = #{jh}</if>
<if test="js != null "> and js = #{js}</if>
<if test="jx != null "> and jx = #{jx}</if>
<if test="fw != null "> and fw = #{fw}</if>
<if test="cs != null "> and cs = #{cs}</if>
<if test="spwy != null "> and spwy = #{spwy}</if>
<if test="nbwy != null "> and nbwy = #{nbwy}</if>
<if test="dxwy != null "> and dxwy = #{dxwy}</if>
<if test="qjbhl != null "> and qjbhl = #{qjbhl}</if>
<if test="gjm != null "> and gjm = #{gjm}</if>
<if test="bd != null and bd != ''"> and bd = #{bd}</if>
<if test="bz != null and bz != ''"> and bz = #{bz}</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="selectSjJygjGdfdcsById" parameterType="Long" resultMap="SjJygjGdfdcsResult">
<include refid="selectSjJygjGdfdcsVo"/>
where id = #{id}
</select>
<insert id="insertSjJygjGdfdcs" parameterType="SjJygjGdfdcs" useGeneratedKeys="true" keyProperty="id">
insert into sj_jygj_gdfdcs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jh != null">jh,</if>
<if test="js != null">js,</if>
<if test="jx != null">jx,</if>
<if test="fw != null">fw,</if>
<if test="cs != null">cs,</if>
<if test="spwy != null">spwy,</if>
<if test="nbwy != null">nbwy,</if>
<if test="dxwy != null">dxwy,</if>
<if test="qjbhl != null">qjbhl,</if>
<if test="gjm != null">gjm,</if>
<if test="bd != null">bd,</if>
<if test="bz != null">bz,</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="jh != null">#{jh},</if>
<if test="js != null">#{js},</if>
<if test="jx != null">#{jx},</if>
<if test="fw != null">#{fw},</if>
<if test="cs != null">#{cs},</if>
<if test="spwy != null">#{spwy},</if>
<if test="nbwy != null">#{nbwy},</if>
<if test="dxwy != null">#{dxwy},</if>
<if test="qjbhl != null">#{qjbhl},</if>
<if test="gjm != null">#{gjm},</if>
<if test="bd != null">#{bd},</if>
<if test="bz != null">#{bz},</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="updateSjJygjGdfdcs" parameterType="SjJygjGdfdcs">
update sj_jygj_gdfdcs
<trim prefix="SET" suffixOverrides=",">
<if test="jh != null">jh = #{jh},</if>
<if test="js != null">js = #{js},</if>
<if test="jx != null">jx = #{jx},</if>
<if test="fw != null">fw = #{fw},</if>
<if test="cs != null">cs = #{cs},</if>
<if test="spwy != null">spwy = #{spwy},</if>
<if test="nbwy != null">nbwy = #{nbwy},</if>
<if test="dxwy != null">dxwy = #{dxwy},</if>
<if test="qjbhl != null">qjbhl = #{qjbhl},</if>
<if test="gjm != null">gjm = #{gjm},</if>
<if test="bd != null">bd = #{bd},</if>
<if test="bz != null">bz = #{bz},</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="deleteSjJygjGdfdcsById" parameterType="Long">
delete from sj_jygj_gdfdcs where id = #{id}
</delete>
<delete id="deleteSjJygjGdfdcsByIds" parameterType="String">
delete from sj_jygj_gdfdcs 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.zjsgfa.mapper.SjJygjGdsjgdcsMapper">
<resultMap type="SjJygjGdsjgdcs" id="SjJygjGdsjgdcsResult">
<result property="id" column="id" />
<result property="jh" column="jh" />
<result property="js" column="js" />
<result property="jx" column="jx" />
<result property="fw" column="fw" />
<result property="bhfw" column="bhfw" />
<result property="cs" column="cs" />
<result property="bhj" column="bhj" />
<result property="nbwy" column="nbwy" />
<result property="dxwy" column="dxwy" />
<result property="zxl" column="zxl" />
<result property="fwbhl" column="fwbhl" />
<result property="qjbhl" column="qjbhl" />
<result property="gjm" column="gjm" />
<result property="bz" column="bz" />
<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="selectSjJygjGdsjgdcsVo">
select id, jh, js, jx, fw, bhfw, cs, bhj, nbwy, dxwy, zxl, fwbhl, qjbhl, gjm, bz, created_by, created_time, update_by, update_time from sj_jygj_gdsjgdcs
</sql>
<select id="selectSjJygjGdsjgdcsList" parameterType="SjJygjGdsjgdcs" resultMap="SjJygjGdsjgdcsResult">
<include refid="selectSjJygjGdsjgdcsVo"/>
<where>
<if test="jh != null and jh != ''"> and jh = #{jh}</if>
<if test="js != null "> and js = #{js}</if>
<if test="jx != null "> and jx = #{jx}</if>
<if test="fw != null "> and fw = #{fw}</if>
<if test="bhfw != null "> and bhfw = #{bhfw}</if>
<if test="cs != null "> and cs = #{cs}</if>
<if test="bhj != null "> and bhj = #{bhj}</if>
<if test="nbwy != null "> and nbwy = #{nbwy}</if>
<if test="dxwy != null "> and dxwy = #{dxwy}</if>
<if test="zxl != null "> and zxl = #{zxl}</if>
<if test="fwbhl != null "> and fwbhl = #{fwbhl}</if>
<if test="qjbhl != null "> and qjbhl = #{qjbhl}</if>
<if test="gjm != null "> and gjm = #{gjm}</if>
<if test="bz != null and bz != ''"> and bz = #{bz}</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="selectSjJygjGdsjgdcsById" parameterType="Long" resultMap="SjJygjGdsjgdcsResult">
<include refid="selectSjJygjGdsjgdcsVo"/>
where id = #{id}
</select>
<insert id="insertSjJygjGdsjgdcs" parameterType="SjJygjGdsjgdcs" useGeneratedKeys="true" keyProperty="id">
insert into sj_jygj_gdsjgdcs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jh != null">jh,</if>
<if test="js != null">js,</if>
<if test="jx != null">jx,</if>
<if test="fw != null">fw,</if>
<if test="bhfw != null">bhfw,</if>
<if test="cs != null">cs,</if>
<if test="bhj != null">bhj,</if>
<if test="nbwy != null">nbwy,</if>
<if test="dxwy != null">dxwy,</if>
<if test="zxl != null">zxl,</if>
<if test="fwbhl != null">fwbhl,</if>
<if test="qjbhl != null">qjbhl,</if>
<if test="gjm != null">gjm,</if>
<if test="bz != null">bz,</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="jh != null">#{jh},</if>
<if test="js != null">#{js},</if>
<if test="jx != null">#{jx},</if>
<if test="fw != null">#{fw},</if>
<if test="bhfw != null">#{bhfw},</if>
<if test="cs != null">#{cs},</if>
<if test="bhj != null">#{bhj},</if>
<if test="nbwy != null">#{nbwy},</if>
<if test="dxwy != null">#{dxwy},</if>
<if test="zxl != null">#{zxl},</if>
<if test="fwbhl != null">#{fwbhl},</if>
<if test="qjbhl != null">#{qjbhl},</if>
<if test="gjm != null">#{gjm},</if>
<if test="bz != null">#{bz},</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="updateSjJygjGdsjgdcs" parameterType="SjJygjGdsjgdcs">
update sj_jygj_gdsjgdcs
<trim prefix="SET" suffixOverrides=",">
<if test="jh != null">jh = #{jh},</if>
<if test="js != null">js = #{js},</if>
<if test="jx != null">jx = #{jx},</if>
<if test="fw != null">fw = #{fw},</if>
<if test="bhfw != null">bhfw = #{bhfw},</if>
<if test="cs != null">cs = #{cs},</if>
<if test="bhj != null">bhj = #{bhj},</if>
<if test="nbwy != null">nbwy = #{nbwy},</if>
<if test="dxwy != null">dxwy = #{dxwy},</if>
<if test="zxl != null">zxl = #{zxl},</if>
<if test="fwbhl != null">fwbhl = #{fwbhl},</if>
<if test="qjbhl != null">qjbhl = #{qjbhl},</if>
<if test="gjm != null">gjm = #{gjm},</if>
<if test="bz != null">bz = #{bz},</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="deleteSjJygjGdsjgdcsById" parameterType="Long">
delete from sj_jygj_gdsjgdcs where id = #{id}
</delete>
<delete id="deleteSjJygjGdsjgdcsByIds" parameterType="String">
delete from sj_jygj_gdsjgdcs 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.zjsgfa.mapper.SjJygjInfoMapper">
<resultMap type="SjJygjInfo" id="SjJygjInfoResult">
<result property="id" column="id" />
<result property="jh" column="jh" />
<result property="gdlx" column="gdlx" />
<result property="jkhzb" column="jkhzb" />
<result property="jkzzb" column="jkzzb" />
<result property="bdhzb" column="bdhzb" />
<result property="bdzzb" column="bdzzb" />
<result property="cs" column="cs" />
<result property="bhj" column="bhj" />
<result property="bhfx" column="bhfx" />
<result property="bbj" column="bbj" />
<result property="bz" column="bz" />
<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="selectSjJygjInfoVo">
select id, jh, gdlx, jkhzb, jkzzb, bdhzb, bdzzb, cs, bhj, bhfx, bbj, bz, created_by, created_time, update_by, update_time from sj_jygj_info
</sql>
<select id="selectSjJygjInfoList" parameterType="SjJygjInfo" resultMap="SjJygjInfoResult">
<include refid="selectSjJygjInfoVo"/>
<where>
<if test="jh != null and jh != ''"> and jh = #{jh}</if>
<if test="gdlx != null and gdlx != ''"> and gdlx = #{gdlx}</if>
<if test="jkhzb != null "> and jkhzb = #{jkhzb}</if>
<if test="jkzzb != null "> and jkzzb = #{jkzzb}</if>
<if test="bdhzb != null "> and bdhzb = #{bdhzb}</if>
<if test="bdzzb != null "> and bdzzb = #{bdzzb}</if>
<if test="cs != null "> and cs = #{cs}</if>
<if test="bhj != null "> and bhj = #{bhj}</if>
<if test="bhfx != null "> and bhfx = #{bhfx}</if>
<if test="bbj != null "> and bbj = #{bbj}</if>
<if test="bz != null and bz != ''"> and bz = #{bz}</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="selectSjJygjInfoById" parameterType="Long" resultMap="SjJygjInfoResult">
<include refid="selectSjJygjInfoVo"/>
where id = #{id}
</select>
<insert id="insertSjJygjInfo" parameterType="SjJygjInfo" useGeneratedKeys="true" keyProperty="id">
insert into sj_jygj_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jh != null">jh,</if>
<if test="gdlx != null">gdlx,</if>
<if test="jkhzb != null">jkhzb,</if>
<if test="jkzzb != null">jkzzb,</if>
<if test="bdhzb != null">bdhzb,</if>
<if test="bdzzb != null">bdzzb,</if>
<if test="cs != null">cs,</if>
<if test="bhj != null">bhj,</if>
<if test="bhfx != null">bhfx,</if>
<if test="bbj != null">bbj,</if>
<if test="bz != null">bz,</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="jh != null">#{jh},</if>
<if test="gdlx != null">#{gdlx},</if>
<if test="jkhzb != null">#{jkhzb},</if>
<if test="jkzzb != null">#{jkzzb},</if>
<if test="bdhzb != null">#{bdhzb},</if>
<if test="bdzzb != null">#{bdzzb},</if>
<if test="cs != null">#{cs},</if>
<if test="bhj != null">#{bhj},</if>
<if test="bhfx != null">#{bhfx},</if>
<if test="bbj != null">#{bbj},</if>
<if test="bz != null">#{bz},</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="updateSjJygjInfo" parameterType="SjJygjInfo">
update sj_jygj_info
<trim prefix="SET" suffixOverrides=",">
<if test="jh != null">jh = #{jh},</if>
<if test="gdlx != null">gdlx = #{gdlx},</if>
<if test="jkhzb != null">jkhzb = #{jkhzb},</if>
<if test="jkzzb != null">jkzzb = #{jkzzb},</if>
<if test="bdhzb != null">bdhzb = #{bdhzb},</if>
<if test="bdzzb != null">bdzzb = #{bdzzb},</if>
<if test="cs != null">cs = #{cs},</if>
<if test="bhj != null">bhj = #{bhj},</if>
<if test="bhfx != null">bhfx = #{bhfx},</if>
<if test="bbj != null">bbj = #{bbj},</if>
<if test="bz != null">bz = #{bz},</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="deleteSjJygjInfoById" parameterType="Long">
delete from sj_jygj_info where id = #{id}
</delete>
<delete id="deleteSjJygjInfoByIds" parameterType="String">
delete from sj_jygj_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -211,24 +211,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="wjsjjs!=null and wjsjjs!=''">
and to_char(b.WJRQ,'YYYY-MM-DD')&lt;=#{wjsjjs}
</if>
order by kc,jh,zb desc
<if test="jhs!=null">
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
order by kc asc,zb desc
</select>
<select id="getZqshfxList" resultType="com.ruoyi.project.zt.domian.DjZqsjfx">
select a.jh,c.kc,ksjs,c.js
select a.jh,c.kc,ksjs,c.js
from JSBA a
left join jsaa b on a.jh = b.jh
left join (
SELECT
jh,kc,(CASE WHEN kc = 1 THEN 0 ELSE LAG_JS END) ksjs,js
FROM (
SELECT
jh, ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,
select * from (SELECT jh,
0 AS kc,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS
FROM JSDB
) t) c on a.jh=c.jh
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
where jsdb.tgcc like '%导管%'
UNION all
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 ksjs
FROM JSDB jsdb
where jsdb.tgcc not like '%导管%'
order by jh)) c on a.jh=c.jh
where 1=1
<if test="jdhzb!=null">
......@@ -243,6 +256,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="wjsjjs!=null and wjsjjs!=''">
and to_char(b.WJRQ,'YYYY-MM-DD')&lt;=#{wjsjjs}
</if>
<if test="jhs!=null">
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
order by kc,jh
......@@ -297,7 +318,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="wjsjjs!=null and wjsjjs!=''">
and to_char(b.WJRQ,'YYYY-MM-DD')&lt;=#{wjsjjs}
</if>
<if test="jhs!=null">
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
order by kc, jh
......
<?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.JsqaMapper">
<select id="getJsqaList" resultType="com.ruoyi.project.zt.domian.Jsqa">
select *
from JSQA a
where 1=1
<if test="jhs!=null">
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
order by jh
</select>
</mapper>
\ No newline at end of file
......@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.project.zt.mapper.JswaMapper">
<select id="getList" resultType="com.ruoyi.project.zt.domian.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 from JSWA where 1=1
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!=''">
and jh =#{jh}
......@@ -16,6 +16,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="js!=null ">
and js &lt;= #{js}
</if>
<if test="ksrq!=null and ksrq!=''">
and to_char(RQ,'YYYY-MM-DD')>=#{ksrq}
</if>
<if test="jsrq!=null and jsrq!=''">
and to_char(RQ,'YYYY-MM-DD')&lt;=#{jsrq}
</if>
order by rq
</select>
</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