Commit a078d5d8 by jiang'yun

修改

parent 712031b0
package com.zjsgfa.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.zjsgfa.framework.aspectj.lang.annotation.Log;
import com.zjsgfa.framework.aspectj.lang.enums.BusinessType;
import com.zjsgfa.project.zjsgfa.domain.Mxglpz;
import com.zjsgfa.project.zjsgfa.service.IMxglpzService;
import com.zjsgfa.framework.web.controller.BaseController;
import com.zjsgfa.framework.web.domain.AjaxResult;
import com.zjsgfa.common.utils.poi.ExcelUtil;
import com.zjsgfa.framework.web.page.TableDataInfo;
/**
* 模型关联配置Controller
*
* @author ruoyi
* @date 2025-09-29
*/
@RestController
@RequestMapping("/system/mxglpz")
public class MxglpzController extends BaseController
{
@Autowired
private IMxglpzService mxglpzService;
/**
* 查询模型关联配置列表
*/
//@PreAuthorize("@ss.hasPermi('system:mxglpz:list')")
@GetMapping("/list")
public TableDataInfo list(Mxglpz mxglpz)
{
startPage();
List<Mxglpz> list = mxglpzService.selectMxglpzList(mxglpz);
return getDataTable(list);
}
/**
* 导出模型关联配置列表
*/
//@PreAuthorize("@ss.hasPermi('system:mxglpz:export')")
@Log(title = "模型关联配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Mxglpz mxglpz)
{
List<Mxglpz> list = mxglpzService.selectMxglpzList(mxglpz);
ExcelUtil<Mxglpz> util = new ExcelUtil<Mxglpz>(Mxglpz.class);
util.exportExcel(response, list, "模型关联配置数据");
}
/**
* 获取模型关联配置详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:mxglpz:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(mxglpzService.selectMxglpzById(id));
}
/**
* 新增模型关联配置
*/
//@PreAuthorize("@ss.hasPermi('system:mxglpz:add')")
@Log(title = "模型关联配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Mxglpz mxglpz)
{
return toAjax(mxglpzService.insertMxglpz(mxglpz));
}
/**
* 修改模型关联配置
*/
//@PreAuthorize("@ss.hasPermi('system:mxglpz:edit')")
@Log(title = "模型关联配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Mxglpz mxglpz)
{
return toAjax(mxglpzService.updateMxglpz(mxglpz));
}
/**
* 删除模型关联配置
*/
//@PreAuthorize("@ss.hasPermi('system:mxglpz:remove')")
@Log(title = "模型关联配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(mxglpzService.deleteMxglpzByIds(ids));
}
}
......@@ -322,9 +322,9 @@ public class SjDjjcController extends BaseController
@PreAuthorize("@ss.hasPermi('designInformation:sjDjjc:remove')")
@Log(title = "设计信息-井基础信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
public AjaxResult remove(@PathVariable Long ids)
{
return toAjax(sjDjjcService.deleteSjDjjcByIds(ids));
return toAjax(sjDjjcService.deleteSjDjjcById(ids));
}
......
package com.zjsgfa.project.zjsgfa.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zjsgfa.framework.aspectj.lang.annotation.Excel;
import com.zjsgfa.framework.web.domain.BaseEntity;
import lombok.Data;
/**
* 模型关联配置对象 mxglpz
*
* @author ruoyi
* @date 2025-09-29
*/
@Data
public class Mxglpz extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 方法名称 */
@Excel(name = "方法名称")
private String ffmc;
/** 入参 */
@Excel(name = "入参")
private String rc;
/** 方式(系统内置、外置) */
@Excel(name = "方式", readConverterExp = "系=统内置、外置")
private String lb;
/** url地址 */
@Excel(name = "url地址")
private String url;
/** 备注 */
@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;
}
package com.zjsgfa.project.zjsgfa.mapper;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.Mxglpz;
/**
* 模型关联配置Mapper接口
*
* @author ruoyi
* @date 2025-09-29
*/
public interface MxglpzMapper
{
/**
* 查询模型关联配置
*
* @param id 模型关联配置主键
* @return 模型关联配置
*/
public Mxglpz selectMxglpzById(Long id);
/**
* 查询模型关联配置列表
*
* @param mxglpz 模型关联配置
* @return 模型关联配置集合
*/
public List<Mxglpz> selectMxglpzList(Mxglpz mxglpz);
/**
* 新增模型关联配置
*
* @param mxglpz 模型关联配置
* @return 结果
*/
public int insertMxglpz(Mxglpz mxglpz);
/**
* 修改模型关联配置
*
* @param mxglpz 模型关联配置
* @return 结果
*/
public int updateMxglpz(Mxglpz mxglpz);
/**
* 删除模型关联配置
*
* @param id 模型关联配置主键
* @return 结果
*/
public int deleteMxglpzById(Long id);
/**
* 批量删除模型关联配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMxglpzByIds(Long[] ids);
}
......@@ -2,6 +2,7 @@ package com.zjsgfa.project.zjsgfa.mapper;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjDjjc;
import org.apache.ibatis.annotations.Param;
/**
* 设计信息-井基础信息Mapper接口
......@@ -62,4 +63,6 @@ public interface SjDjjcMapper
SjDjjc selectSjDjjcByJh(String jh);
int batchDeleteByJhPrefix(@Param("jh") String jh);
}
package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.Mxglpz;
/**
* 模型关联配置Service接口
*
* @author ruoyi
* @date 2025-09-29
*/
public interface IMxglpzService
{
/**
* 查询模型关联配置
*
* @param id 模型关联配置主键
* @return 模型关联配置
*/
public Mxglpz selectMxglpzById(Long id);
/**
* 查询模型关联配置列表
*
* @param mxglpz 模型关联配置
* @return 模型关联配置集合
*/
public List<Mxglpz> selectMxglpzList(Mxglpz mxglpz);
/**
* 新增模型关联配置
*
* @param mxglpz 模型关联配置
* @return 结果
*/
public int insertMxglpz(Mxglpz mxglpz);
/**
* 修改模型关联配置
*
* @param mxglpz 模型关联配置
* @return 结果
*/
public int updateMxglpz(Mxglpz mxglpz);
/**
* 批量删除模型关联配置
*
* @param ids 需要删除的模型关联配置主键集合
* @return 结果
*/
public int deleteMxglpzByIds(Long[] ids);
/**
* 删除模型关联配置信息
*
* @param id 模型关联配置主键
* @return 结果
*/
public int deleteMxglpzById(Long id);
}
package com.zjsgfa.project.zjsgfa.service.impl;
import java.util.List;
import com.zjsgfa.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.MxglpzMapper;
import com.zjsgfa.project.zjsgfa.domain.Mxglpz;
import com.zjsgfa.project.zjsgfa.service.IMxglpzService;
/**
* 模型关联配置Service业务层处理
*
* @author ruoyi
* @date 2025-09-29
*/
@Service
public class MxglpzServiceImpl implements IMxglpzService
{
@Autowired
private MxglpzMapper mxglpzMapper;
/**
* 查询模型关联配置
*
* @param id 模型关联配置主键
* @return 模型关联配置
*/
@Override
public Mxglpz selectMxglpzById(Long id)
{
return mxglpzMapper.selectMxglpzById(id);
}
/**
* 查询模型关联配置列表
*
* @param mxglpz 模型关联配置
* @return 模型关联配置
*/
@Override
public List<Mxglpz> selectMxglpzList(Mxglpz mxglpz)
{
return mxglpzMapper.selectMxglpzList(mxglpz);
}
/**
* 新增模型关联配置
*
* @param mxglpz 模型关联配置
* @return 结果
*/
@Override
public int insertMxglpz(Mxglpz mxglpz)
{
return mxglpzMapper.insertMxglpz(mxglpz);
}
/**
* 修改模型关联配置
*
* @param mxglpz 模型关联配置
* @return 结果
*/
@Override
public int updateMxglpz(Mxglpz mxglpz)
{
mxglpz.setUpdateTime(DateUtils.getNowDate());
return mxglpzMapper.updateMxglpz(mxglpz);
}
/**
* 批量删除模型关联配置
*
* @param ids 需要删除的模型关联配置主键
* @return 结果
*/
@Override
public int deleteMxglpzByIds(Long[] ids)
{
return mxglpzMapper.deleteMxglpzByIds(ids);
}
/**
* 删除模型关联配置信息
*
* @param id 模型关联配置主键
* @return 结果
*/
@Override
public int deleteMxglpzById(Long id)
{
return mxglpzMapper.deleteMxglpzById(id);
}
}
......@@ -511,7 +511,13 @@ public class SjDjjcServiceImpl implements ISjDjjcService
@Override
public int deleteSjDjjcByIds(Long[] ids)
{
return sjDjjcMapper.deleteSjDjjcByIds(ids);
int i = sjDjjcMapper.deleteSjDjjcByIds(ids);
return i;
}
/**
......@@ -523,7 +529,13 @@ public class SjDjjcServiceImpl implements ISjDjjcService
@Override
public int deleteSjDjjcById(Long id)
{
return sjDjjcMapper.deleteSjDjjcById(id);
SjDjjc sjDjjc = selectSjDjjcById(id);
sjDjjcMapper.batchDeleteByJhPrefix(sjDjjc.getJh());
int i = sjDjjcMapper.deleteSjDjjcById(id);
return i;
}
@Override
......
......@@ -220,7 +220,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
List<String> fzqk=new ArrayList<>();
//查询一趟钻率
int kc1=i+1;
List<SjQkztfx> collect1 = sjQkztfxes.stream().filter(it -> it.getKc().equals(kc1 + "")).collect(Collectors.toList());
List<SjQkztfx> collect2 = sjQkztfxes.stream().filter(it -> StringUtils.isNotEmpty(it.getKc())).collect(Collectors.toList());
List<SjQkztfx> collect1 = collect2.stream().filter(it -> it.getKc().equals(kc1 + "")).collect(Collectors.toList());
SjQkztfx sjQkztfx1 = collect1.stream().max(Comparator.comparing(SjQkztfx::getYtzl)).get();
Double ytzl=0.0;
if(sjQkztfx1!=null){
......@@ -309,13 +310,24 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
sjFdsgcs.setZjgccs(zjgccs);
sjFdsgcs.setZjycs(zjycs);
sjFdsgcs.setZyfx(zyfx);
sjFdsgcs.setTzqk(String.join(";",fzqk));
}else {
if(ytzl>0&& ytzl!=100){
String join = String.join(";", fzqk);
if(ytzl>0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%;"+join;
sjFdsgcs.setTzqk(tzqk);
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成;"+join;
sjFdsgcs.setTzqk(tzqk);
}
}else {
if(ytzl>0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%";
sjFdsgcs.setTzqk(tzqk);
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成";
sjFdsgcs.setTzqk(tzqk);
}
String tzqk="邻井一趟钻率为"+ytzl+"%,实现一趟钻完成率为"+ytzl+"%";
sjFdsgcs.setTzqk("结合邻井"+kc+"无复杂数据,可实现一趟钻完成");
}
}
......@@ -419,12 +431,31 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
sjFdsgcs1.setZjgccs(zjgccs);
sjFdsgcs1.setZjycs(zjycs);
sjFdsgcs1.setZyfx(zyfx);
sjFdsgcs1.setTzqk(String.join(";",fzqk));
String join = String.join(";", fzqk);
if(ytzl>=0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%;"+join;
sjFdsgcs1.setTzqk(tzqk);
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成;"+join;
sjFdsgcs1.setTzqk(tzqk);
}
}else {
sjFdsgcs1.setTzqk("结合邻井"+kc+"无复杂数据,可实现一趟钻完成");
if(ytzl>=0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%";
sjFdsgcs1.setTzqk(tzqk);
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成";
sjFdsgcs1.setTzqk(tzqk);
}
}
}else {
sjFdsgcs1.setTzqk("结合邻井"+kc+"无复杂数据,可实现一趟钻完成");
if(ytzl>=0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%";
sjFdsgcs1.setTzqk(tzqk);
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成";
sjFdsgcs1.setTzqk(tzqk);
}
}
sjFdsgcsMapper.updateSjFdsgcs(sjFdsgcs1);
}
......
......@@ -258,6 +258,9 @@ public class DjdcController {
case "getJsgaList":
//获取高指标井
return AjaxResult.success( djdcService.getJsgaList(param));
case "getJskdList":
//获取定向井测斜数据
return AjaxResult.success( djdcService.getJskdList(param));
default:
return AjaxResult.success();
}
......@@ -343,6 +346,12 @@ public class DjdcController {
ExcelUtil<JsgaVo> jsgaExcelUtil = new ExcelUtil<JsgaVo>(JsgaVo.class);
jsgaExcelUtil.exportExcel(response, jsgaList, "Sheet1");
break;
case "exportJskdList":
//导出
List<Jskd> jskdList = djdcService.getJskdList(param);
ExcelUtil<Jskd> jskdExcelUtil = new ExcelUtil<Jskd>(Jskd.class);
jskdExcelUtil.exportExcel(response, jskdList, "Sheet1");
break;
default:
break;
}
......
package com.zjsgfa.project.zt.domain;
import com.zjsgfa.framework.aspectj.lang.annotation.Excel;
import lombok.Data;
@Data
public class Jskd {
@Excel(name = "井号")
private String jh;
@Excel(name = "序号")
private String xh;
@Excel(name = "斜井深")
private Double xjs;
@Excel(name = "段长")
private Double dc;
@Excel(name = "井斜")
private Double jx;
private Double pjjx;
@Excel(name = "方位")
private Double fw;
private Double pjfw;
@Excel(name = "全角变化率")
private Double qjbhl;
private Double czdc;
@Excel(name = "累计垂直井深")
private Double ljczjs;
private Double fdsfwy;
private Double jdhzb1;
private Double jdhzb2;
private Double jdzzb1;
private Double jdzzb2;
@Excel(name = "闭合方位")
private Double bhfw;
@Excel(name = "闭合位移")
private Double bhwy;
private Double wtytjd;
private Double wtytyc;
private String cxfs;
private String bz;
@Excel(name = "井斜变化率")
private Double jxbhl;
@Excel(name = "自然增降斜")
private String zrzjx;
@Excel(name = "关联地层")
private String gldc;
@Excel(name = "关联造斜点")
private String glzxd;
}
\ No newline at end of file
......@@ -59,4 +59,6 @@ public interface DjdcInfoMapper {
List<JsgaVo> getJsgaList(CommonParam param);
List<Jskd> getJskdList(CommonParam param);
}
......@@ -63,4 +63,7 @@ public interface DjdcService {
List<JsgaVo> getJsgaList(CommonParam param);
List<Jskd> getJskdList(CommonParam param);
}
......@@ -1960,6 +1960,16 @@ public class DjdcServiceImpl implements DjdcService {
return list;
}
@Override
public List<Jskd> getJskdList(CommonParam param) {
if(StringUtils.isNotEmpty(param.getJh())){
String[] jhs = param.getJh().split(",");
param.setJhs(jhs);
}
List<Jskd> jskdList=djdcInfoMapper.getJskdList(param);
return jskdList;
}
/**
* 计算斜深
* @param a 层位垂深
......
<?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.zjsgfa.project.zjsgfa.mapper.MxglpzMapper">
<resultMap type="Mxglpz" id="MxglpzResult">
<result property="id" column="id" />
<result property="ffmc" column="ffmc" />
<result property="rc" column="rc" />
<result property="lb" column="lb" />
<result property="url" column="url" />
<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="selectMxglpzVo">
select id, ffmc, rc, lb, url, bz, created_by, created_time, update_by, update_time from mxglpz
</sql>
<select id="selectMxglpzList" parameterType="Mxglpz" resultMap="MxglpzResult">
<include refid="selectMxglpzVo"/>
<where>
<if test="ffmc != null and ffmc != ''"> and ffmc = #{ffmc}</if>
<if test="rc != null and rc != ''"> and rc = #{rc}</if>
<if test="lb != null and lb != ''"> and lb = #{lb}</if>
<if test="url != null and url != ''"> and url = #{url}</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="selectMxglpzById" parameterType="Long" resultMap="MxglpzResult">
<include refid="selectMxglpzVo"/>
where id = #{id}
</select>
<insert id="insertMxglpz" parameterType="Mxglpz" useGeneratedKeys="true" keyProperty="id">
insert into mxglpz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ffmc != null">ffmc,</if>
<if test="rc != null">rc,</if>
<if test="lb != null">lb,</if>
<if test="url != null">url,</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="ffmc != null">#{ffmc},</if>
<if test="rc != null">#{rc},</if>
<if test="lb != null">#{lb},</if>
<if test="url != null">#{url},</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="updateMxglpz" parameterType="Mxglpz">
update mxglpz
<trim prefix="SET" suffixOverrides=",">
<if test="ffmc != null">ffmc = #{ffmc},</if>
<if test="rc != null">rc = #{rc},</if>
<if test="lb != null">lb = #{lb},</if>
<if test="url != null">url = #{url},</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="deleteMxglpzById" parameterType="Long">
delete from mxglpz where id = #{id}
</delete>
<delete id="deleteMxglpzByIds" parameterType="String">
delete from mxglpz where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -199,4 +199,150 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="batchDeleteByJhPrefix" >
<!-- 1. 删除sj_dcfx_dzfc表数据 -->
DELETE FROM sj_dcfx_dzfc WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 2. 删除sj_dcfx_tsyx表数据 -->
DELETE FROM sj_dcfx_tsyx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 4. 删除sj_dzfc表数据 -->
DELETE FROM sj_dzfc WHERE sjjh LIKE CONCAT('%', #{jh}, '%');
<!-- 5. 删除sj_fdfx表数据 -->
DELETE FROM sj_fdfx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 6. 删除sj_fdsgcs表数据 -->
DELETE FROM sj_fdsgcs WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 7. 删除sj_fdsgcs_dcyx表数据 -->
DELETE FROM sj_fdsgcs_dcyx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 8. 删除sj_fdsgcs_ljzjzh表数据 -->
DELETE FROM sj_fdsgcs_ljzjzh WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 9. 删除sj_fdsgcs_tsgj表数据 -->
DELETE FROM sj_fdsgcs_tsgj WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 10. 删除sj_fdsgcs_zjy_fdxnb表数据 -->
DELETE FROM sj_fdsgcs_zjy_fdxnb WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 11. 删除sj_fl表数据 -->
DELETE FROM sj_fl WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 12. 删除sj_gztz表数据 -->
DELETE FROM sj_gztz WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 13. 删除sj_h2s表数据 -->
DELETE FROM sj_h2s WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 14. 删除sj_hse表数据 -->
DELETE FROM sj_hse WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 15. 删除sj_jhzq表数据 -->
DELETE FROM sj_jhzq WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 16. 删除sj_jkzp表数据 -->
DELETE FROM sj_jkzp WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 17. 删除sj_jsjg表数据 -->
DELETE FROM sj_jsjg WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 19. 删除sj_jygj_gdfdcs表数据 -->
DELETE FROM sj_jygj_gdfdcs WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 20. 删除sj_jygj_gdsjgdcs表数据 -->
DELETE FROM sj_jygj_gdsjgdcs WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 21. 删除sj_jygj_info表数据 -->
DELETE FROM sj_jygj_info WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 22. 删除sj_jygjgdsj表数据 -->
DELETE FROM sj_jygjgdsj WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 23. 删除sj_ljjw表数据 -->
DELETE FROM sj_ljjw WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 24. 删除sj_ljsm表数据 -->
DELETE FROM sj_ljsm WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 25. 删除sj_ljtjzt表数据 -->
DELETE FROM sj_ljtjzt WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 26. 删除sj_qkztfx表数据 -->
DELETE FROM sj_qkztfx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 27. 删除sj_sggy_gjsbxnyq表数据 -->
DELETE FROM sj_sggy_gjsbxnyq WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 28. 删除sj_sggy_zjy_cljl表数据 -->
DELETE FROM sj_sggy_zjy_cljl WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 29. 删除sj_sggy_zjy_fdsj表数据 -->
DELETE FROM sj_sggy_zjy_fdsj WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 30. 删除sj_sggy_zjy_fdxnb表数据 -->
DELETE FROM sj_sggy_zjy_fdxnb WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 31. 删除sj_sggy_zjzhcs表数据 -->
DELETE FROM sj_sggy_zjzhcs WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 32. 删除sj_szfxjg表数据 -->
DELETE FROM sj_szfxjg WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 33. 删除sj_tg_tgqdjh表数据 -->
DELETE FROM sj_tg_tgqdjh WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 34. 删除sj_tg_tgxnsj表数据 -->
DELETE FROM sj_tg_tgxnsj WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 35. 删除sj_tg_tgz表数据 -->
DELETE FROM sj_tg_tgz WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 36. 删除sj_zjcsxx表数据 -->
DELETE FROM sj_zjcsxx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 37. 删除sj_zjy_cljl表数据 -->
DELETE FROM sj_zjy_cljl WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 38. 删除sj_zjy_fdsj表数据 -->
DELETE FROM sj_zjy_fdsj WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 39. 删除sj_zjy_fdxnb表数据 -->
DELETE FROM sj_zjy_fdxnb WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 40. 删除sj_zlyq表数据 -->
DELETE FROM sj_zlyq WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 41. 删除sj_zlyq_xx表数据 -->
DELETE FROM sj_zlyq_xx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 42. 删除sj_zlyq_zbyq表数据 -->
DELETE FROM sj_zlyq_zbyq WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 43. 删除sj_zqfx表数据 -->
DELETE FROM sj_zqfx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 44. 删除sj_zsjqk表数据 -->
DELETE FROM sj_zsjqk WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 45. 删除sj_ztcsxx表数据 -->
DELETE FROM sj_ztcsxx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 46. 删除sj_ztgjsj表数据 -->
DELETE FROM sj_ztgjsj WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 47. 删除sj_ztxx表数据 -->
DELETE FROM sj_ztxx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 48. 删除sj_zysx表数据 -->
DELETE FROM sj_zysx WHERE jh LIKE CONCAT('%', #{jh}, '%');
</delete>
</mapper>
\ No newline at end of file
......@@ -798,4 +798,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by a.jh,a.QSJS,b.qyjs
</select>
<select id="getJskdList" resultType="com.zjsgfa.project.zt.domain.Jskd">
SELECT
a.*,
c.cw gldc,
LEAD(a.jx) OVER (PARTITION BY a.jh ORDER BY a.dc) AS nextjx,
LEAD(a.dc) OVER (PARTITION BY a.jh ORDER BY a.dc) AS nextdc,
-- 计算井斜变化率
CASE
WHEN LEAD(a.dc) OVER (PARTITION BY a.jh ORDER BY a.dc) IS NOT NULL
THEN (LEAD(a.jx) OVER (PARTITION BY a.jh ORDER BY a.dc) - a.jx)
/ LEAD(a.dc) OVER (PARTITION BY a.jh ORDER BY a.dc) * 30
ELSE NULL
END AS jxbhl,
-- 根据井斜变化率进行分类
CASE
WHEN LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) IS NULL THEN NULL
-- 自然增:大于0且小于0.1
WHEN (LEAD(jx) OVER (PARTITION BY a.jh ORDER BY dc) - jx)
/ LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) * 30 > 0
AND (LEAD(jx) OVER (PARTITION BY a.jh ORDER BY dc) - jx)
/ LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) * 30
&lt;
0.1
THEN '自然增'
-- 自然降:小于0且大于-0.1
WHEN (LEAD(jx) OVER (PARTITION BY a.jh ORDER BY dc) - jx)
/ LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) * 30
&lt;
0
AND (LEAD(jx) OVER (PARTITION BY a.jh ORDER BY dc) - jx)
/ LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) * 30 > -0.1
THEN '自然降'
-- 人工增:大于1
WHEN (LEAD(jx) OVER (PARTITION BY a.jh ORDER BY dc) - jx)
/ LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) * 30 > 1
THEN '人工增'
-- 人工降:小于-1
WHEN (LEAD(jx) OVER (PARTITION BY a.jh ORDER BY dc) - jx)
/ LEAD(dc) OVER (PARTITION BY a.jh ORDER BY dc) * 30
&lt;
-1
THEN '人工降'
-- 其他情况(如0.1~1之间或-1~-0.1之间)
ELSE null
END AS zrzjx
FROM jskd a
left join (
SELECT
jh,
LAG(SJDJSD2, 1, 0) OVER (PARTITION BY jh ORDER BY SJDJSD2) AS ksjs,
SJDJSD2,CW
FROM jsbb) c on a.JH=c.JH and NVL(a.LJCZJS,0)>=c.ksjs and NVL(a.LJCZJS,0) &lt; c.SJDJSD2
where 1=1
<if test="jhs!=null">
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
ORDER BY a.jh, a.xh
</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