Commit 4a360a85 by jiang'yun

修改

parent c78d96e8
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.SjDcfxTsyx;
import com.ruoyi.project.zjsgfa.service.ISjDcfxTsyxService;
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-08-08
*/
@RestController
@RequestMapping("/system/sjDcfxTsyx")
public class SjDcfxTsyxController extends BaseController
{
@Autowired
private ISjDcfxTsyxService sjDcfxTsyxService;
/**
* 查询设计-地层分析-特殊岩性提示列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:list')")
@GetMapping("/list")
public TableDataInfo list(SjDcfxTsyx sjDcfxTsyx)
{
// startPage();
List<SjDcfxTsyx> list = sjDcfxTsyxService.selectSjDcfxTsyxList(sjDcfxTsyx);
return getDataTable(list);
}
/**
* 导出设计-地层分析-特殊岩性提示列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:export')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjDcfxTsyx sjDcfxTsyx)
{
List<SjDcfxTsyx> list = sjDcfxTsyxService.selectSjDcfxTsyxList(sjDcfxTsyx);
ExcelUtil<SjDcfxTsyx> util = new ExcelUtil<SjDcfxTsyx>(SjDcfxTsyx.class);
util.exportExcel(response, list, "设计-地层分析-特殊岩性提示数据");
}
/**
* 获取设计-地层分析-特殊岩性提示详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjDcfxTsyxService.selectSjDcfxTsyxById(id));
}
/**
* 新增设计-地层分析-特殊岩性提示
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:add')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjDcfxTsyx sjDcfxTsyx)
{
return toAjax(sjDcfxTsyxService.insertSjDcfxTsyx(sjDcfxTsyx));
}
/**
* 修改设计-地层分析-特殊岩性提示
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:edit')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjDcfxTsyx sjDcfxTsyx)
{
return toAjax(sjDcfxTsyxService.updateSjDcfxTsyx(sjDcfxTsyx));
}
/**
* 删除设计-地层分析-特殊岩性提示
*/
//@PreAuthorize("@ss.hasPermi('system:sjDcfxTsyx:remove')")
@Log(title = "设计-地层分析-特殊岩性提示", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjDcfxTsyxService.deleteSjDcfxTsyxByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.domain;
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_dcfx_tsyx
*
* @author ruoyi
* @date 2025-08-08
*/
public class SjDcfxTsyx extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 井号 */
@Excel(name = "井号")
private String jh;
/** 特殊岩性 */
@Excel(name = "特殊岩性")
private String tsyx;
/** 层位 */
@Excel(name = "层位")
private String cw;
/** 距顶深 */
@Excel(name = "距顶深")
private Double jds;
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 setTsyx(String tsyx)
{
this.tsyx = tsyx;
}
public String getTsyx()
{
return tsyx;
}
public void setCw(String cw)
{
this.cw = cw;
}
public String getCw()
{
return cw;
}
public void setJds(Double jds)
{
this.jds = jds;
}
public Double getJds()
{
return jds;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("jh", getJh())
.append("tsyx", getTsyx())
.append("cw", getCw())
.append("jds", getJds())
.toString();
}
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjDcfxTsyx;
/**
* 设计-地层分析-特殊岩性提示Mapper接口
*
* @author ruoyi
* @date 2025-08-08
*/
public interface SjDcfxTsyxMapper
{
/**
* 查询设计-地层分析-特殊岩性提示
*
* @param id 设计-地层分析-特殊岩性提示主键
* @return 设计-地层分析-特殊岩性提示
*/
public SjDcfxTsyx selectSjDcfxTsyxById(Long id);
/**
* 查询设计-地层分析-特殊岩性提示列表
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 设计-地层分析-特殊岩性提示集合
*/
public List<SjDcfxTsyx> selectSjDcfxTsyxList(SjDcfxTsyx sjDcfxTsyx);
/**
* 新增设计-地层分析-特殊岩性提示
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 结果
*/
public int insertSjDcfxTsyx(SjDcfxTsyx sjDcfxTsyx);
/**
* 修改设计-地层分析-特殊岩性提示
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 结果
*/
public int updateSjDcfxTsyx(SjDcfxTsyx sjDcfxTsyx);
/**
* 删除设计-地层分析-特殊岩性提示
*
* @param id 设计-地层分析-特殊岩性提示主键
* @return 结果
*/
public int deleteSjDcfxTsyxById(Long id);
/**
* 批量删除设计-地层分析-特殊岩性提示
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjDcfxTsyxByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjDcfxTsyx;
/**
* 设计-地层分析-特殊岩性提示Service接口
*
* @author ruoyi
* @date 2025-08-08
*/
public interface ISjDcfxTsyxService
{
/**
* 查询设计-地层分析-特殊岩性提示
*
* @param id 设计-地层分析-特殊岩性提示主键
* @return 设计-地层分析-特殊岩性提示
*/
public SjDcfxTsyx selectSjDcfxTsyxById(Long id);
/**
* 查询设计-地层分析-特殊岩性提示列表
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 设计-地层分析-特殊岩性提示集合
*/
public List<SjDcfxTsyx> selectSjDcfxTsyxList(SjDcfxTsyx sjDcfxTsyx);
/**
* 新增设计-地层分析-特殊岩性提示
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 结果
*/
public int insertSjDcfxTsyx(SjDcfxTsyx sjDcfxTsyx);
/**
* 修改设计-地层分析-特殊岩性提示
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 结果
*/
public int updateSjDcfxTsyx(SjDcfxTsyx sjDcfxTsyx);
/**
* 批量删除设计-地层分析-特殊岩性提示
*
* @param ids 需要删除的设计-地层分析-特殊岩性提示主键集合
* @return 结果
*/
public int deleteSjDcfxTsyxByIds(Long[] ids);
/**
* 删除设计-地层分析-特殊岩性提示信息
*
* @param id 设计-地层分析-特殊岩性提示主键
* @return 结果
*/
public int deleteSjDcfxTsyxById(Long id);
}
package com.ruoyi.project.zjsgfa.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zjsgfa.mapper.SjDcfxTsyxMapper;
import com.ruoyi.project.zjsgfa.domain.SjDcfxTsyx;
import com.ruoyi.project.zjsgfa.service.ISjDcfxTsyxService;
/**
* 设计-地层分析-特殊岩性提示Service业务层处理
*
* @author ruoyi
* @date 2025-08-08
*/
@Service
public class SjDcfxTsyxServiceImpl implements ISjDcfxTsyxService
{
@Autowired
private SjDcfxTsyxMapper sjDcfxTsyxMapper;
/**
* 查询设计-地层分析-特殊岩性提示
*
* @param id 设计-地层分析-特殊岩性提示主键
* @return 设计-地层分析-特殊岩性提示
*/
@Override
public SjDcfxTsyx selectSjDcfxTsyxById(Long id)
{
return sjDcfxTsyxMapper.selectSjDcfxTsyxById(id);
}
/**
* 查询设计-地层分析-特殊岩性提示列表
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 设计-地层分析-特殊岩性提示
*/
@Override
public List<SjDcfxTsyx> selectSjDcfxTsyxList(SjDcfxTsyx sjDcfxTsyx)
{
return sjDcfxTsyxMapper.selectSjDcfxTsyxList(sjDcfxTsyx);
}
/**
* 新增设计-地层分析-特殊岩性提示
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 结果
*/
@Override
public int insertSjDcfxTsyx(SjDcfxTsyx sjDcfxTsyx)
{
return sjDcfxTsyxMapper.insertSjDcfxTsyx(sjDcfxTsyx);
}
/**
* 修改设计-地层分析-特殊岩性提示
*
* @param sjDcfxTsyx 设计-地层分析-特殊岩性提示
* @return 结果
*/
@Override
public int updateSjDcfxTsyx(SjDcfxTsyx sjDcfxTsyx)
{
return sjDcfxTsyxMapper.updateSjDcfxTsyx(sjDcfxTsyx);
}
/**
* 批量删除设计-地层分析-特殊岩性提示
*
* @param ids 需要删除的设计-地层分析-特殊岩性提示主键
* @return 结果
*/
@Override
public int deleteSjDcfxTsyxByIds(Long[] ids)
{
return sjDcfxTsyxMapper.deleteSjDcfxTsyxByIds(ids);
}
/**
* 删除设计-地层分析-特殊岩性提示信息
*
* @param id 设计-地层分析-特殊岩性提示主键
* @return 结果
*/
@Override
public int deleteSjDcfxTsyxById(Long id)
{
return sjDcfxTsyxMapper.deleteSjDcfxTsyxById(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.ruoyi.project.zjsgfa.mapper.SjDcfxTsyxMapper">
<resultMap type="SjDcfxTsyx" id="SjDcfxTsyxResult">
<result property="id" column="id" />
<result property="jh" column="jh" />
<result property="tsyx" column="tsyx" />
<result property="cw" column="cw" />
<result property="jds" column="jds" />
</resultMap>
<sql id="selectSjDcfxTsyxVo">
select id, jh, tsyx, cw, jds from sj_dcfx_tsyx
</sql>
<select id="selectSjDcfxTsyxList" parameterType="SjDcfxTsyx" resultMap="SjDcfxTsyxResult">
<include refid="selectSjDcfxTsyxVo"/>
<where>
<if test="jh != null and jh != ''"> and jh = #{jh}</if>
<if test="tsyx != null and tsyx != ''"> and tsyx = #{tsyx}</if>
<if test="cw != null and cw != ''"> and cw = #{cw}</if>
<if test="jds != null "> and jds = #{jds}</if>
</where>
</select>
<select id="selectSjDcfxTsyxById" parameterType="Long" resultMap="SjDcfxTsyxResult">
<include refid="selectSjDcfxTsyxVo"/>
where id = #{id}
</select>
<insert id="insertSjDcfxTsyx" parameterType="SjDcfxTsyx" useGeneratedKeys="true" keyProperty="id">
insert into sj_dcfx_tsyx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jh != null">jh,</if>
<if test="tsyx != null">tsyx,</if>
<if test="cw != null">cw,</if>
<if test="jds != null">jds,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
<if test="tsyx != null">#{tsyx},</if>
<if test="cw != null">#{cw},</if>
<if test="jds != null">#{jds},</if>
</trim>
</insert>
<update id="updateSjDcfxTsyx" parameterType="SjDcfxTsyx">
update sj_dcfx_tsyx
<trim prefix="SET" suffixOverrides=",">
<if test="jh != null">jh = #{jh},</if>
<if test="tsyx != null">tsyx = #{tsyx},</if>
<if test="cw != null">cw = #{cw},</if>
<if test="jds != null">jds = #{jds},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSjDcfxTsyxById" parameterType="Long">
delete from sj_dcfx_tsyx where id = #{id}
</delete>
<delete id="deleteSjDcfxTsyxByIds" parameterType="String">
delete from sj_dcfx_tsyx where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</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