Commit a70101d9 by jiang'yun

修改

parent 7f11f763
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.ClYxsj;
import com.zjsgfa.project.zjsgfa.service.IClYxsjService;
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-22
*/
@RestController
@RequestMapping("/system/clYxsj")
public class ClYxsjController extends BaseController
{
@Autowired
private IClYxsjService clYxsjService;
/**
* 查询常量-岩性数据列表
*/
@PreAuthorize("@ss.hasPermi('system:clYxsj:list')")
@GetMapping("/list")
public TableDataInfo list(ClYxsj clYxsj)
{
startPage();
List<ClYxsj> list = clYxsjService.selectClYxsjList(clYxsj);
return getDataTable(list);
}
/**
* 导出常量-岩性数据列表
*/
@PreAuthorize("@ss.hasPermi('system:clYxsj:export')")
@Log(title = "常量-岩性数据", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ClYxsj clYxsj)
{
List<ClYxsj> list = clYxsjService.selectClYxsjList(clYxsj);
ExcelUtil<ClYxsj> util = new ExcelUtil<ClYxsj>(ClYxsj.class);
util.exportExcel(response, list, "常量-岩性数据数据");
}
/**
* 获取常量-岩性数据详细信息
*/
@PreAuthorize("@ss.hasPermi('system:clYxsj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(clYxsjService.selectClYxsjById(id));
}
/**
* 新增常量-岩性数据
*/
@PreAuthorize("@ss.hasPermi('system:clYxsj:add')")
@Log(title = "常量-岩性数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ClYxsj clYxsj)
{
return toAjax(clYxsjService.insertClYxsj(clYxsj));
}
/**
* 修改常量-岩性数据
*/
@PreAuthorize("@ss.hasPermi('system:clYxsj:edit')")
@Log(title = "常量-岩性数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ClYxsj clYxsj)
{
return toAjax(clYxsjService.updateClYxsj(clYxsj));
}
/**
* 删除常量-岩性数据
*/
@PreAuthorize("@ss.hasPermi('system:clYxsj:remove')")
@Log(title = "常量-岩性数据", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(clYxsjService.deleteClYxsjByIds(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;
/**
* 常量-岩性数据对象 cl_yxsj
*
* @author ruoyi
* @date 2025-09-22
*/
@Data
public class ClYxsj extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 地质分层 */
@Excel(name = "地质分层")
private String dzfc;
/** 地层代号 */
@Excel(name = "地层代号")
private String dcdh;
/** 接触面 */
@Excel(name = "接触面")
private String jcm;
/** 主要岩性 */
@Excel(name = "主要岩性")
private String zyyx;
/** 岩性描述 */
@Excel(name = "岩性描述")
private String yxms;
/** 特殊岩性 */
@Excel(name = "特殊岩性")
private String tsyx;
/** 最小厚度 */
@Excel(name = "最小厚度")
private String zxhd;
/** 最大厚度 */
@Excel(name = "最大厚度")
private String zdhd;
/** 备注 */
@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 setDzfc(String dzfc)
{
this.dzfc = dzfc;
}
public String getDzfc()
{
return dzfc;
}
public void setDcdh(String dcdh)
{
this.dcdh = dcdh;
}
public String getDcdh()
{
return dcdh;
}
public void setJcm(String jcm)
{
this.jcm = jcm;
}
public String getJcm()
{
return jcm;
}
public void setZyyx(String zyyx)
{
this.zyyx = zyyx;
}
public String getZyyx()
{
return zyyx;
}
public void setYxms(String yxms)
{
this.yxms = yxms;
}
public String getYxms()
{
return yxms;
}
public void setTsyx(String tsyx)
{
this.tsyx = tsyx;
}
public String getTsyx()
{
return tsyx;
}
public void setZxhd(String zxhd)
{
this.zxhd = zxhd;
}
public String getZxhd()
{
return zxhd;
}
public void setZdhd(String zdhd)
{
this.zdhd = zdhd;
}
public String getZdhd()
{
return zdhd;
}
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;
}
}
package com.zjsgfa.project.zjsgfa.mapper;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.ClYxsj;
/**
* 常量-岩性数据Mapper接口
*
* @author ruoyi
* @date 2025-09-22
*/
public interface ClYxsjMapper
{
/**
* 查询常量-岩性数据
*
* @param id 常量-岩性数据主键
* @return 常量-岩性数据
*/
public ClYxsj selectClYxsjById(Long id);
/**
* 查询常量-岩性数据列表
*
* @param clYxsj 常量-岩性数据
* @return 常量-岩性数据集合
*/
public List<ClYxsj> selectClYxsjList(ClYxsj clYxsj);
/**
* 新增常量-岩性数据
*
* @param clYxsj 常量-岩性数据
* @return 结果
*/
public int insertClYxsj(ClYxsj clYxsj);
/**
* 修改常量-岩性数据
*
* @param clYxsj 常量-岩性数据
* @return 结果
*/
public int updateClYxsj(ClYxsj clYxsj);
/**
* 删除常量-岩性数据
*
* @param id 常量-岩性数据主键
* @return 结果
*/
public int deleteClYxsjById(Long id);
/**
* 批量删除常量-岩性数据
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteClYxsjByIds(Long[] ids);
}
package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.ClYxsj;
/**
* 常量-岩性数据Service接口
*
* @author ruoyi
* @date 2025-09-22
*/
public interface IClYxsjService
{
/**
* 查询常量-岩性数据
*
* @param id 常量-岩性数据主键
* @return 常量-岩性数据
*/
public ClYxsj selectClYxsjById(Long id);
/**
* 查询常量-岩性数据列表
*
* @param clYxsj 常量-岩性数据
* @return 常量-岩性数据集合
*/
public List<ClYxsj> selectClYxsjList(ClYxsj clYxsj);
/**
* 新增常量-岩性数据
*
* @param clYxsj 常量-岩性数据
* @return 结果
*/
public int insertClYxsj(ClYxsj clYxsj);
/**
* 修改常量-岩性数据
*
* @param clYxsj 常量-岩性数据
* @return 结果
*/
public int updateClYxsj(ClYxsj clYxsj);
/**
* 批量删除常量-岩性数据
*
* @param ids 需要删除的常量-岩性数据主键集合
* @return 结果
*/
public int deleteClYxsjByIds(Long[] ids);
/**
* 删除常量-岩性数据信息
*
* @param id 常量-岩性数据主键
* @return 结果
*/
public int deleteClYxsjById(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.ClYxsjMapper;
import com.zjsgfa.project.zjsgfa.domain.ClYxsj;
import com.zjsgfa.project.zjsgfa.service.IClYxsjService;
/**
* 常量-岩性数据Service业务层处理
*
* @author ruoyi
* @date 2025-09-22
*/
@Service
public class ClYxsjServiceImpl implements IClYxsjService
{
@Autowired
private ClYxsjMapper clYxsjMapper;
/**
* 查询常量-岩性数据
*
* @param id 常量-岩性数据主键
* @return 常量-岩性数据
*/
@Override
public ClYxsj selectClYxsjById(Long id)
{
return clYxsjMapper.selectClYxsjById(id);
}
/**
* 查询常量-岩性数据列表
*
* @param clYxsj 常量-岩性数据
* @return 常量-岩性数据
*/
@Override
public List<ClYxsj> selectClYxsjList(ClYxsj clYxsj)
{
return clYxsjMapper.selectClYxsjList(clYxsj);
}
/**
* 新增常量-岩性数据
*
* @param clYxsj 常量-岩性数据
* @return 结果
*/
@Override
public int insertClYxsj(ClYxsj clYxsj)
{
return clYxsjMapper.insertClYxsj(clYxsj);
}
/**
* 修改常量-岩性数据
*
* @param clYxsj 常量-岩性数据
* @return 结果
*/
@Override
public int updateClYxsj(ClYxsj clYxsj)
{
clYxsj.setUpdateTime(DateUtils.getNowDate());
return clYxsjMapper.updateClYxsj(clYxsj);
}
/**
* 批量删除常量-岩性数据
*
* @param ids 需要删除的常量-岩性数据主键
* @return 结果
*/
@Override
public int deleteClYxsjByIds(Long[] ids)
{
return clYxsjMapper.deleteClYxsjByIds(ids);
}
/**
* 删除常量-岩性数据信息
*
* @param id 常量-岩性数据主键
* @return 结果
*/
@Override
public int deleteClYxsjById(Long id)
{
return clYxsjMapper.deleteClYxsjById(id);
}
}
<?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.ClYxsjMapper">
<resultMap type="ClYxsj" id="ClYxsjResult">
<result property="id" column="id" />
<result property="dzfc" column="dzfc" />
<result property="dcdh" column="dcdh" />
<result property="jcm" column="jcm" />
<result property="zyyx" column="zyyx" />
<result property="yxms" column="yxms" />
<result property="tsyx" column="tsyx" />
<result property="zxhd" column="zxhd" />
<result property="zdhd" column="zdhd" />
<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="selectClYxsjVo">
select id, dzfc, dcdh, jcm, zyyx, yxms, tsyx, zxhd, zdhd, bz, created_by, created_time, update_by, update_time from cl_yxsj
</sql>
<select id="selectClYxsjList" parameterType="ClYxsj" resultMap="ClYxsjResult">
<include refid="selectClYxsjVo"/>
<where>
<if test="dzfc != null and dzfc != ''"> and dzfc = #{dzfc}</if>
<if test="dcdh != null and dcdh != ''"> and dcdh = #{dcdh}</if>
<if test="jcm != null and jcm != ''"> and jcm = #{jcm}</if>
<if test="zyyx != null and zyyx != ''"> and zyyx = #{zyyx}</if>
<if test="yxms != null and yxms != ''"> and yxms = #{yxms}</if>
<if test="tsyx != null and tsyx != ''"> and tsyx = #{tsyx}</if>
<if test="zxhd != null and zxhd != ''"> and zxhd = #{zxhd}</if>
<if test="zdhd != null and zdhd != ''"> and zdhd = #{zdhd}</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="selectClYxsjById" parameterType="Long" resultMap="ClYxsjResult">
<include refid="selectClYxsjVo"/>
where id = #{id}
</select>
<insert id="insertClYxsj" parameterType="ClYxsj" useGeneratedKeys="true" keyProperty="id">
insert into cl_yxsj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dzfc != null">dzfc,</if>
<if test="dcdh != null">dcdh,</if>
<if test="jcm != null">jcm,</if>
<if test="zyyx != null">zyyx,</if>
<if test="yxms != null">yxms,</if>
<if test="tsyx != null">tsyx,</if>
<if test="zxhd != null">zxhd,</if>
<if test="zdhd != null">zdhd,</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="dzfc != null">#{dzfc},</if>
<if test="dcdh != null">#{dcdh},</if>
<if test="jcm != null">#{jcm},</if>
<if test="zyyx != null">#{zyyx},</if>
<if test="yxms != null">#{yxms},</if>
<if test="tsyx != null">#{tsyx},</if>
<if test="zxhd != null">#{zxhd},</if>
<if test="zdhd != null">#{zdhd},</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="updateClYxsj" parameterType="ClYxsj">
update cl_yxsj
<trim prefix="SET" suffixOverrides=",">
<if test="dzfc != null">dzfc = #{dzfc},</if>
<if test="dcdh != null">dcdh = #{dcdh},</if>
<if test="jcm != null">jcm = #{jcm},</if>
<if test="zyyx != null">zyyx = #{zyyx},</if>
<if test="yxms != null">yxms = #{yxms},</if>
<if test="tsyx != null">tsyx = #{tsyx},</if>
<if test="zxhd != null">zxhd = #{zxhd},</if>
<if test="zdhd != null">zdhd = #{zdhd},</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="deleteClYxsjById" parameterType="Long">
delete from cl_yxsj where id = #{id}
</delete>
<delete id="deleteClYxsjByIds" parameterType="String">
delete from cl_yxsj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -232,20 +232,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -232,20 +232,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from JSBA a from JSBA a
left join jsaa b on a.jh = b.jh left join jsaa b on a.jh = b.jh
left join ( left join (
select * from (SELECT jh,
0 AS kc,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
where jsdb.tgcc like '%导管%'
UNION all
SELECT jh, SELECT jh,
ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc, ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,
JS, JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb FROM JSDB jsdb
where jsdb.tgcc not like '%导管%' where jsdb.tgcc not like '%导管%'
order by jh)) c on a.jh=c.jh order by jh) c on a.jh=c.jh
where 1=1 where 1=1
<if test="jdhzb!=null"> <if test="jdhzb!=null">
......
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