Commit 06c00f6f by jiang'yun

修改

parent 71078a0e
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.Mxfxjgb;
import com.zjsgfa.project.zjsgfa.service.IMxfxjgbService;
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-10-22
*/
@RestController
@RequestMapping("/system/mxfxjgb")
public class MxfxjgbController extends BaseController
{
@Autowired
private IMxfxjgbService mxfxjgbService;
/**
* 查询大模型分析列表
*/
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:list')")
@GetMapping("/list")
public TableDataInfo list(Mxfxjgb mxfxjgb)
{
startPage();
List<Mxfxjgb> list = mxfxjgbService.selectMxfxjgbList(mxfxjgb);
return getDataTable(list);
}
/**
* 导出大模型分析列表
*/
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:export')")
@Log(title = "大模型分析", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Mxfxjgb mxfxjgb)
{
List<Mxfxjgb> list = mxfxjgbService.selectMxfxjgbList(mxfxjgb);
ExcelUtil<Mxfxjgb> util = new ExcelUtil<Mxfxjgb>(Mxfxjgb.class);
util.exportExcel(response, list, "大模型分析数据");
}
/**
* 获取大模型分析详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(mxfxjgbService.selectMxfxjgbById(id));
}
/**
* 新增大模型分析
*/
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:add')")
@Log(title = "大模型分析", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Mxfxjgb mxfxjgb)
{
return toAjax(mxfxjgbService.insertMxfxjgb(mxfxjgb));
}
/**
* 修改大模型分析
*/
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:edit')")
@Log(title = "大模型分析", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Mxfxjgb mxfxjgb)
{
return toAjax(mxfxjgbService.updateMxfxjgb(mxfxjgb));
}
/**
* 删除大模型分析
*/
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:remove')")
@Log(title = "大模型分析", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(mxfxjgbService.deleteMxfxjgbByIds(ids));
}
}
......@@ -43,11 +43,20 @@ public class SgfambKcSggyController extends BaseController
@GetMapping("/list")
public TableDataInfo list(SgfambKcSggy sgfambKcSggy)
{
startPage();
// startPage();
List<SgfambKcSggy> list = sgfambKcSggyService.selectSgfambKcSggyList(sgfambKcSggy);
return getDataTable(list);
}
@GetMapping("/getListByQk")
public TableDataInfo getListByQk(SgfambKcSggy sgfambKcSggy)
{
// startPage();
List<SgfambKcSggy> list = sgfambKcSggyService.selectSgfambKcSggyListByQk(sgfambKcSggy);
return getDataTable(list);
}
/**
* 导出施工方案模板管理—开次-施工概要列表
*/
......
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;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 大模型分析对象 mxfxjgb
*
* @author ruoyi
* @date 2025-10-22
*/
@Data
public class Mxfxjgb extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 模块类型 */
@Excel(name = "模块类型")
private String mklx;
/** 任务类型(方案优化/文本优化) */
@Excel(name = "任务类型(方案优化/文本优化)")
private String rwlx;
/** 任务名称 */
@Excel(name = "任务名称")
private String rwmc;
/** 任务时间 */
@Excel(name = "任务时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date rwsj;
/** 解析状态 */
@Excel(name = "解析状态")
private String jxzt;
/** 返回结果 */
@Excel(name = "返回结果")
private String fhjg;
/** 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;
}
......@@ -31,6 +31,8 @@ public class SjFdsgcs extends BaseEntity
/** 一趟钻情况 */
@Excel(name = "一趟钻情况")
private String tzqk;
//邻井复杂情况
private String ljfzqk;
/** 井段情况 */
@Excel(name = "井段情况")
......
package com.zjsgfa.project.zjsgfa.mapper;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.Mxfxjgb;
/**
* 大模型分析Mapper接口
*
* @author ruoyi
* @date 2025-10-22
*/
public interface MxfxjgbMapper
{
/**
* 查询大模型分析
*
* @param id 大模型分析主键
* @return 大模型分析
*/
public Mxfxjgb selectMxfxjgbById(Long id);
/**
* 查询大模型分析列表
*
* @param mxfxjgb 大模型分析
* @return 大模型分析集合
*/
public List<Mxfxjgb> selectMxfxjgbList(Mxfxjgb mxfxjgb);
/**
* 新增大模型分析
*
* @param mxfxjgb 大模型分析
* @return 结果
*/
public int insertMxfxjgb(Mxfxjgb mxfxjgb);
/**
* 修改大模型分析
*
* @param mxfxjgb 大模型分析
* @return 结果
*/
public int updateMxfxjgb(Mxfxjgb mxfxjgb);
/**
* 删除大模型分析
*
* @param id 大模型分析主键
* @return 结果
*/
public int deleteMxfxjgbById(Long id);
/**
* 批量删除大模型分析
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMxfxjgbByIds(Long[] ids);
}
package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.Mxfxjgb;
/**
* 大模型分析Service接口
*
* @author ruoyi
* @date 2025-10-22
*/
public interface IMxfxjgbService
{
/**
* 查询大模型分析
*
* @param id 大模型分析主键
* @return 大模型分析
*/
public Mxfxjgb selectMxfxjgbById(Long id);
/**
* 查询大模型分析列表
*
* @param mxfxjgb 大模型分析
* @return 大模型分析集合
*/
public List<Mxfxjgb> selectMxfxjgbList(Mxfxjgb mxfxjgb);
/**
* 新增大模型分析
*
* @param mxfxjgb 大模型分析
* @return 结果
*/
public int insertMxfxjgb(Mxfxjgb mxfxjgb);
/**
* 修改大模型分析
*
* @param mxfxjgb 大模型分析
* @return 结果
*/
public int updateMxfxjgb(Mxfxjgb mxfxjgb);
/**
* 批量删除大模型分析
*
* @param ids 需要删除的大模型分析主键集合
* @return 结果
*/
public int deleteMxfxjgbByIds(Long[] ids);
/**
* 删除大模型分析信息
*
* @param id 大模型分析主键
* @return 结果
*/
public int deleteMxfxjgbById(Long id);
}
......@@ -58,4 +58,7 @@ public interface ISgfambKcSggyService
* @return 结果
*/
public int deleteSgfambKcSggyById(Long id);
List<SgfambKcSggy> selectSgfambKcSggyListByQk(SgfambKcSggy sgfambKcSggy);
}
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.MxfxjgbMapper;
import com.zjsgfa.project.zjsgfa.domain.Mxfxjgb;
import com.zjsgfa.project.zjsgfa.service.IMxfxjgbService;
/**
* 大模型分析Service业务层处理
*
* @author ruoyi
* @date 2025-10-22
*/
@Service
public class MxfxjgbServiceImpl implements IMxfxjgbService
{
@Autowired
private MxfxjgbMapper mxfxjgbMapper;
/**
* 查询大模型分析
*
* @param id 大模型分析主键
* @return 大模型分析
*/
@Override
public Mxfxjgb selectMxfxjgbById(Long id)
{
return mxfxjgbMapper.selectMxfxjgbById(id);
}
/**
* 查询大模型分析列表
*
* @param mxfxjgb 大模型分析
* @return 大模型分析
*/
@Override
public List<Mxfxjgb> selectMxfxjgbList(Mxfxjgb mxfxjgb)
{
return mxfxjgbMapper.selectMxfxjgbList(mxfxjgb);
}
/**
* 新增大模型分析
*
* @param mxfxjgb 大模型分析
* @return 结果
*/
@Override
public int insertMxfxjgb(Mxfxjgb mxfxjgb)
{
return mxfxjgbMapper.insertMxfxjgb(mxfxjgb);
}
/**
* 修改大模型分析
*
* @param mxfxjgb 大模型分析
* @return 结果
*/
@Override
public int updateMxfxjgb(Mxfxjgb mxfxjgb)
{
mxfxjgb.setUpdateTime(DateUtils.getNowDate());
return mxfxjgbMapper.updateMxfxjgb(mxfxjgb);
}
/**
* 批量删除大模型分析
*
* @param ids 需要删除的大模型分析主键
* @return 结果
*/
@Override
public int deleteMxfxjgbByIds(Long[] ids)
{
return mxfxjgbMapper.deleteMxfxjgbByIds(ids);
}
/**
* 删除大模型分析信息
*
* @param id 大模型分析主键
* @return 结果
*/
@Override
public int deleteMxfxjgbById(Long id)
{
return mxfxjgbMapper.deleteMxfxjgbById(id);
}
}
......@@ -129,4 +129,9 @@ public class SgfambKcSggyServiceImpl implements ISgfambKcSggyService
{
return sgfambKcSggyMapper.deleteSgfambKcSggyById(id);
}
@Override
public List<SgfambKcSggy> selectSgfambKcSggyListByQk(SgfambKcSggy sgfambKcSggy) {
return sgfambKcSggyMapper.selectSgfambKcSggyListByQk(sgfambKcSggy);
}
}
......@@ -1028,11 +1028,34 @@ public class SjDjjcServiceImpl implements ISjDjjcService
list2.addAll(value.stream().map(DjZqsjfx::getJh).collect(Collectors.toList()));
}
Map<String,Object> map =new HashMap<>();
map.put("gzbjhList",list2.stream().distinct().limit(5).collect(Collectors.toList()));
if(list2.size()>0){
List<String> collect2 = list2.stream().distinct().limit(5).collect(Collectors.toList());
map.put("gzbjhList",collect2);
String[] collect2Array = list2.stream().distinct().limit(5).toArray(String[]::new);
param.setJhs(collect2Array);
param.setJdhzb(sjDjjc1.getJkhzb());
param.setJdzzb(sjDjjc1.getJkzzb());
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
map.put("gzbjhJson",ljjwList2);
}else {
map.put("gzbjhList",new ArrayList<>());
map.put("gzbjhJson",new ArrayList<>());
}
//查询复杂井
List<Jsqa> jsqaList = djdcService.getJsqaList(param2);
List<String> collect1 = jsqaList.stream().map(Jsqa::getJh).collect(Collectors.toList());
map.put("fzsgjhList",collect1.stream().distinct().limit(5).collect(Collectors.toList()));
if(jsqaList.size()>0){
List<String> collect1 = jsqaList.stream().map(Jsqa::getJh).collect(Collectors.toList());
map.put("fzsgjhList",collect1.stream().distinct().limit(5).collect(Collectors.toList()));
String[] collect3Array = collect1.stream().distinct().limit(5).toArray(String[]::new);
param.setJhs(collect3Array);
List<Ljjw> ljjwList3=djdcService.getLjjwList3(param);
map.put("fzsgjhJson",ljjwList3);
}else {
map.put("fzsgjhList",new ArrayList<>());
map.put("fzsgjhJson",new ArrayList<>());
}
return AjaxResult.success(map);
}else {
......
......@@ -71,4 +71,6 @@ public interface DjdcInfoMapper {
JswaVo getJswaSum(CommonParam param);
List<Ljjw> getLjjwList3(CommonParam param);
}
......@@ -81,4 +81,7 @@ public interface DjdcService {
JswaVo getJswaSum(CommonParam param);
List<Ljjw> getLjjwList3(CommonParam param);
}
......@@ -2047,6 +2047,12 @@ public class DjdcServiceImpl implements DjdcService {
return djdcInfoMapper.getJswaSum(param);
}
@Override
public List<Ljjw> getLjjwList3(CommonParam param) {
return djdcInfoMapper.getLjjwList3(param);
}
/**
* 计算斜深
* @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.MxfxjgbMapper">
<resultMap type="Mxfxjgb" id="MxfxjgbResult">
<result property="id" column="id" />
<result property="mklx" column="mklx" />
<result property="rwlx" column="rwlx" />
<result property="rwmc" column="rwmc" />
<result property="rwsj" column="rwsj" />
<result property="jxzt" column="jxzt" />
<result property="fhjg" column="fhjg" />
<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="selectMxfxjgbVo">
select id, mklx, rwlx, rwmc, rwsj, jxzt, fhjg, url, bz, created_by, created_time, update_by, update_time from mxfxjgb
</sql>
<select id="selectMxfxjgbList" parameterType="Mxfxjgb" resultMap="MxfxjgbResult">
<include refid="selectMxfxjgbVo"/>
<where>
<if test="mklx != null and mklx != ''"> and mklx = #{mklx}</if>
<if test="rwlx != null and rwlx != ''"> and rwlx = #{rwlx}</if>
<if test="rwmc != null and rwmc != ''"> and rwmc = #{rwmc}</if>
<if test="rwsj != null and rwsj != ''"> and rwsj = #{rwsj}</if>
<if test="jxzt != null and jxzt != ''"> and jxzt = #{jxzt}</if>
<if test="fhjg != null and fhjg != ''"> and fhjg = #{fhjg}</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="selectMxfxjgbById" parameterType="Long" resultMap="MxfxjgbResult">
<include refid="selectMxfxjgbVo"/>
where id = #{id}
</select>
<insert id="insertMxfxjgb" parameterType="Mxfxjgb" useGeneratedKeys="true" keyProperty="id">
insert into mxfxjgb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mklx != null">mklx,</if>
<if test="rwlx != null">rwlx,</if>
<if test="rwmc != null">rwmc,</if>
<if test="rwsj != null">rwsj,</if>
<if test="jxzt != null">jxzt,</if>
<if test="fhjg != null">fhjg,</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="mklx != null">#{mklx},</if>
<if test="rwlx != null">#{rwlx},</if>
<if test="rwmc != null">#{rwmc},</if>
<if test="rwsj != null">#{rwsj},</if>
<if test="jxzt != null">#{jxzt},</if>
<if test="fhjg != null">#{fhjg},</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="updateMxfxjgb" parameterType="Mxfxjgb">
update mxfxjgb
<trim prefix="SET" suffixOverrides=",">
<if test="mklx != null">mklx = #{mklx},</if>
<if test="rwlx != null">rwlx = #{rwlx},</if>
<if test="rwmc != null">rwmc = #{rwmc},</if>
<if test="rwsj != null">rwsj = #{rwsj},</if>
<if test="jxzt != null">jxzt = #{jxzt},</if>
<if test="fhjg != null">fhjg = #{fhjg},</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="deleteMxfxjgbById" parameterType="Long">
delete from mxfxjgb where id = #{id}
</delete>
<delete id="deleteMxfxjgbByIds" parameterType="String">
delete from mxfxjgb where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -78,6 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="qk != null">
and qk = #{qk}
</if>
<if test="kc != null ">
and a.kc = #{kc}
</if>
</select>
<insert id="insertSgfambKcSggy" parameterType="SgfambKcSggy" useGeneratedKeys="true" keyProperty="id">
......
......@@ -19,10 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="zjgccs" column="zjgccs" />
<result property="zjzh" column="zjzh" />
<result property="zjzhzysx" column="zjzhzysx" />
<result property="ljfzqk" column="ljfzqk" />
</resultMap>
<sql id="selectSjFdsgcsVo">
select id, jh, kc, tzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs, zjycs, zjgccs,zjzh,zjzhzysx from sj_fdsgcs
select id, jh, kc, tzqk,ljfzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs, zjycs, zjgccs,zjzh,zjzhzysx from sj_fdsgcs
</sql>
<select id="selectSjFdsgcsList" parameterType="SjFdsgcs" resultMap="SjFdsgcsResult">
......@@ -38,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zyfx != null and zyfx != ''"> and zyfx = #{zyfx}</if>
<if test="fxgkcs != null and fxgkcs != ''"> and fxgkcs = #{fxgkcs}</if>
</where>
order by kc
</select>
<select id="selectSjFdsgcsById" parameterType="Long" resultMap="SjFdsgcsResult">
......@@ -45,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selectSjFdsgcsByJhAndKc" resultType="com.zjsgfa.project.zjsgfa.domain.SjFdsgcs">
select id, jh, kc, tzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs, zjycs, zjgccs,zjzh,zjzhzysx from sj_fdsgcs where jh = #{jh} and kc = #{kc}
select id, jh, kc, tzqk, ljfzqk,jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs, zjycs, zjgccs,zjzh,zjzhzysx from sj_fdsgcs where jh = #{jh} and kc = #{kc}
</select>
<insert id="insertSjFdsgcs" parameterType="SjFdsgcs" useGeneratedKeys="true" keyProperty="id">
......@@ -64,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zjgccs != null">zjgccs,</if>
<if test="zjzh != null">zjzh,</if>
<if test="zjzhzysx != null">zjzhzysx,</if>
<if test="ljfzqk != null">ljfzqk,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
......@@ -79,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zjgccs != null">#{zjgccs},</if>
<if test="zjzh != null">#{zjzh},</if>
<if test="zjzhzysx != null">#{zjzhzysx},</if>
<if test="ljfzqk != null">#{ljfzqk},</if>
</trim>
</insert>
......@@ -98,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zjgccs != null">zjgccs = #{zjgccs},</if>
<if test="zjzh != null">zjzh = #{zjzh},</if>
<if test="zjzhzysx != null">zjzhzysx = #{zjzhzysx},</if>
<if test="ljfzqk != null">ljfzqk = #{ljfzqk},</if>
</trim>
where id = #{id}
</update>
......
......@@ -909,7 +909,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.jh not like '%侧%'
and a.jkhzb - #{jkhzb} &lt; #{jl}
AND a.jkzzb - #{jkzzb} &lt; #{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
order by jkjl asc
</select>
......@@ -935,4 +934,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
) a
</select>
<select id="getLjjwList3" resultType="com.zjsgfa.project.zt.domain.Ljjw">
SELECT a.jh,
a.jkhzb,
a.jkzzb,
a.jdhzb,
a.jdzzb,
a.jx,
a.jb,
b.wjjs,
b.wjczjs,
b.wzcw,
kc.kc,
zjzq.wjzq,
zjzq.zjzq,
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
round(power(power(a.jdhzb - ${jdhzb}
, 2) + power(a.jdzzb - ${jdzzb}, 2), 0.5), 2) as jdjl,
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl
FROM JSBA a
left join jsaa b
on a.jh = b.jh
left join
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh = a.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%'
group by jh) kc
on a.jh = kc.jh
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jdhzb - #{jdhzb} &lt; #{jl}
AND a.jdzzb - #{jdzzb} &lt; #{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if test="jhs!=null">
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
order by jkjl asc
</select>
</mapper>
\ No newline at end of file
......@@ -21,17 +21,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getJsqaByjhAndJs" resultType="com.zjsgfa.project.zt.domain.Jsqa">
select jh,js, FZQK from JSQA where 1=1
select a.jh,js, FZQK,cw,sjhd from JSQA a left join (
SELECT jh,
LAG(SJDJSD, 1, 0) OVER (PARTITION BY jh ORDER BY SJDJSD) AS ksjs,
SJDJSD,
CW,
SJHD
FROM jsbb )b on a.jh=b.JH and a.JS>ksjs and a.js &lt;=SJDJSD where 1=1
<if test="jhs.size()>0">
and jh in
and a.jh in
<foreach item="jh" collection="jhs"
open="(" separator="," close=")">
#{jh}
</foreach>
</if>
<if test="js!=null">
and JS &lt;=#{js}
and a.JS &lt;=#{js}
</if>
</select>
......
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