Commit 2dc91e00 authored by 耿迪迪's avatar 耿迪迪

第三方施工意外事件后台

parent fc620f45
package com.zehong.web.controller.thirdbuild;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TConGasProInc;
import com.zehong.system.service.ITConGasProIncService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 第三方施工-涉气第三方施工意外事件Controller
*
* @author zehong
* @date 2024-06-27
*/
@RestController
@RequestMapping("/third/accident")
public class TConGasProIncController extends BaseController
{
@Autowired
private ITConGasProIncService tConGasProIncService;
/**
* 查询第三方施工-涉气第三方施工意外事件列表
*/
@GetMapping("/list")
public TableDataInfo list(TConGasProInc tConGasProInc)
{
startPage();
List<TConGasProInc> list = tConGasProIncService.selectTConGasProIncList(tConGasProInc);
return getDataTable(list);
}
/**
* 导出第三方施工-涉气第三方施工意外事件列表
*/
@Log(title = "第三方施工-涉气第三方施工意外事件", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TConGasProInc tConGasProInc)
{
List<TConGasProInc> list = tConGasProIncService.selectTConGasProIncList(tConGasProInc);
ExcelUtil<TConGasProInc> util = new ExcelUtil<TConGasProInc>(TConGasProInc.class);
return util.exportExcel(list, "第三方施工-涉气第三方施工意外事件数据");
}
/**
* 获取第三方施工-涉气第三方施工意外事件详细信息
*/
@GetMapping(value = "/{fConGasProIncId}")
public AjaxResult getInfo(@PathVariable("fConGasProIncId") Long fConGasProIncId)
{
return AjaxResult.success(tConGasProIncService.selectTConGasProIncById(fConGasProIncId));
}
/**
* 新增第三方施工-涉气第三方施工意外事件
*/
@Log(title = "第三方施工-涉气第三方施工意外事件", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TConGasProInc tConGasProInc)
{
return toAjax(tConGasProIncService.insertTConGasProInc(tConGasProInc));
}
/**
* 修改第三方施工-涉气第三方施工意外事件
*/
@Log(title = "第三方施工-涉气第三方施工意外事件", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TConGasProInc tConGasProInc)
{
return toAjax(tConGasProIncService.updateTConGasProInc(tConGasProInc));
}
/**
* 删除第三方施工-涉气第三方施工意外事件
*/
@Log(title = "第三方施工-涉气第三方施工意外事件", businessType = BusinessType.DELETE)
@DeleteMapping("/{fConGasProIncIds}")
public AjaxResult remove(@PathVariable Long[] fConGasProIncIds)
{
return toAjax(tConGasProIncService.deleteTConGasProIncByIds(fConGasProIncIds));
}
}
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 第三方施工-涉气第三方施工意外事件对象 t_con_gas_pro_inc
*
* @author zehong
* @date 2024-06-27
*/
public class TConGasProInc extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fConGasProIncId;
/** 项目编码 */
@Excel(name = "项目编码")
private String fIntersectConstructionId;
/** 意外事件标题 */
@Excel(name = "意外事件标题")
private String fTitle;
/** 意外事件描述,施工过程中发生了燃气管道破坏的情况,但及时妥善处置,未发生事故的详细情况 */
@Excel(name = "意外事件描述,施工过程中发生了燃气管道破坏的情况,但及时妥善处置,未发生事故的详细情况")
private String fDescription;
/** 意外事件发生事件 yyyy-MM-dd hh:mm:ss */
@Excel(name = "意外事件发生事件 yyyy-MM-dd hh:mm:ss")
private String fOccurrenctTime;
/** 附件 */
@Excel(name = "附件")
private String fAttachment;
/** 备注 */
@Excel(name = "备注")
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "最后修改时间 yyyy-MM-dd hh:mm:ss")
private String fUpdateTime;
public void setfConGasProIncId(Long fConGasProIncId)
{
this.fConGasProIncId = fConGasProIncId;
}
public Long getfConGasProIncId()
{
return fConGasProIncId;
}
public void setfIntersectConstructionId(String fIntersectConstructionId)
{
this.fIntersectConstructionId = fIntersectConstructionId;
}
public String getfIntersectConstructionId()
{
return fIntersectConstructionId;
}
public void setfTitle(String fTitle)
{
this.fTitle = fTitle;
}
public String getfTitle()
{
return fTitle;
}
public void setfDescription(String fDescription)
{
this.fDescription = fDescription;
}
public String getfDescription()
{
return fDescription;
}
public void setfOccurrenctTime(String fOccurrenctTime)
{
this.fOccurrenctTime = fOccurrenctTime;
}
public String getfOccurrenctTime()
{
return fOccurrenctTime;
}
public void setfAttachment(String fAttachment)
{
this.fAttachment = fAttachment;
}
public String getfAttachment()
{
return fAttachment;
}
public void setfRemark(String fRemark)
{
this.fRemark = fRemark;
}
public String getfRemark()
{
return fRemark;
}
public void setfUpdateTime(String fUpdateTime)
{
this.fUpdateTime = fUpdateTime;
}
public String getfUpdateTime()
{
return fUpdateTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fConGasProIncId", getfConGasProIncId())
.append("fIntersectConstructionId", getfIntersectConstructionId())
.append("fTitle", getfTitle())
.append("fDescription", getfDescription())
.append("fOccurrenctTime", getfOccurrenctTime())
.append("fAttachment", getfAttachment())
.append("fRemark", getfRemark())
.append("fUpdateTime", getfUpdateTime())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TConGasProInc;
/**
* 第三方施工-涉气第三方施工意外事件Mapper接口
*
* @author zehong
* @date 2024-06-27
*/
public interface TConGasProIncMapper
{
/**
* 查询第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncId 第三方施工-涉气第三方施工意外事件ID
* @return 第三方施工-涉气第三方施工意外事件
*/
public TConGasProInc selectTConGasProIncById(Long fConGasProIncId);
/**
* 查询第三方施工-涉气第三方施工意外事件列表
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 第三方施工-涉气第三方施工意外事件集合
*/
public List<TConGasProInc> selectTConGasProIncList(TConGasProInc tConGasProInc);
/**
* 新增第三方施工-涉气第三方施工意外事件
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 结果
*/
public int insertTConGasProInc(TConGasProInc tConGasProInc);
/**
* 修改第三方施工-涉气第三方施工意外事件
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 结果
*/
public int updateTConGasProInc(TConGasProInc tConGasProInc);
/**
* 删除第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncId 第三方施工-涉气第三方施工意外事件ID
* @return 结果
*/
public int deleteTConGasProIncById(Long fConGasProIncId);
/**
* 批量删除第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncIds 需要删除的数据ID
* @return 结果
*/
public int deleteTConGasProIncByIds(Long[] fConGasProIncIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TConGasProInc;
/**
* 第三方施工-涉气第三方施工意外事件Service接口
*
* @author zehong
* @date 2024-06-27
*/
public interface ITConGasProIncService
{
/**
* 查询第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncId 第三方施工-涉气第三方施工意外事件ID
* @return 第三方施工-涉气第三方施工意外事件
*/
public TConGasProInc selectTConGasProIncById(Long fConGasProIncId);
/**
* 查询第三方施工-涉气第三方施工意外事件列表
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 第三方施工-涉气第三方施工意外事件集合
*/
public List<TConGasProInc> selectTConGasProIncList(TConGasProInc tConGasProInc);
/**
* 新增第三方施工-涉气第三方施工意外事件
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 结果
*/
public int insertTConGasProInc(TConGasProInc tConGasProInc);
/**
* 修改第三方施工-涉气第三方施工意外事件
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 结果
*/
public int updateTConGasProInc(TConGasProInc tConGasProInc);
/**
* 批量删除第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncIds 需要删除的第三方施工-涉气第三方施工意外事件ID
* @return 结果
*/
public int deleteTConGasProIncByIds(Long[] fConGasProIncIds);
/**
* 删除第三方施工-涉气第三方施工意外事件信息
*
* @param fConGasProIncId 第三方施工-涉气第三方施工意外事件ID
* @return 结果
*/
public int deleteTConGasProIncById(Long fConGasProIncId);
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TConGasProIncMapper;
import com.zehong.system.domain.TConGasProInc;
import com.zehong.system.service.ITConGasProIncService;
/**
* 第三方施工-涉气第三方施工意外事件Service业务层处理
*
* @author zehong
* @date 2024-06-27
*/
@Service
public class TConGasProIncServiceImpl implements ITConGasProIncService
{
@Autowired
private TConGasProIncMapper tConGasProIncMapper;
/**
* 查询第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncId 第三方施工-涉气第三方施工意外事件ID
* @return 第三方施工-涉气第三方施工意外事件
*/
@Override
public TConGasProInc selectTConGasProIncById(Long fConGasProIncId)
{
return tConGasProIncMapper.selectTConGasProIncById(fConGasProIncId);
}
/**
* 查询第三方施工-涉气第三方施工意外事件列表
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 第三方施工-涉气第三方施工意外事件
*/
@Override
public List<TConGasProInc> selectTConGasProIncList(TConGasProInc tConGasProInc)
{
return tConGasProIncMapper.selectTConGasProIncList(tConGasProInc);
}
/**
* 新增第三方施工-涉气第三方施工意外事件
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 结果
*/
@Override
public int insertTConGasProInc(TConGasProInc tConGasProInc)
{
return tConGasProIncMapper.insertTConGasProInc(tConGasProInc);
}
/**
* 修改第三方施工-涉气第三方施工意外事件
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 结果
*/
@Override
public int updateTConGasProInc(TConGasProInc tConGasProInc)
{
return tConGasProIncMapper.updateTConGasProInc(tConGasProInc);
}
/**
* 批量删除第三方施工-涉气第三方施工意外事件
*
* @param fConGasProIncIds 需要删除的第三方施工-涉气第三方施工意外事件ID
* @return 结果
*/
@Override
public int deleteTConGasProIncByIds(Long[] fConGasProIncIds)
{
return tConGasProIncMapper.deleteTConGasProIncByIds(fConGasProIncIds);
}
/**
* 删除第三方施工-涉气第三方施工意外事件信息
*
* @param fConGasProIncId 第三方施工-涉气第三方施工意外事件ID
* @return 结果
*/
@Override
public int deleteTConGasProIncById(Long fConGasProIncId)
{
return tConGasProIncMapper.deleteTConGasProIncById(fConGasProIncId);
}
}
<?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.zehong.system.mapper.TConGasProIncMapper">
<resultMap type="TConGasProInc" id="TConGasProIncResult">
<result property="fConGasProIncId" column="f_con_gas_pro_inc_id" />
<result property="fIntersectConstructionId" column="f_intersect_construction_id" />
<result property="fTitle" column="f_title" />
<result property="fDescription" column="f_description" />
<result property="fOccurrenctTime" column="f_occurrenct_time" />
<result property="fAttachment" column="f_attachment" />
<result property="fRemark" column="f_remark" />
<result property="fUpdateTime" column="f_update_time" />
</resultMap>
<sql id="selectTConGasProIncVo">
select f_con_gas_pro_inc_id, f_intersect_construction_id, f_title, f_description, f_occurrenct_time, f_attachment, f_remark, f_update_time from t_con_gas_pro_inc
</sql>
<select id="selectTConGasProIncList" parameterType="TConGasProInc" resultMap="TConGasProIncResult">
<include refid="selectTConGasProIncVo"/>
<where>
<if test="fIntersectConstructionId != null and fIntersectConstructionId != ''"> and f_intersect_construction_id = #{fIntersectConstructionId}</if>
<if test="fTitle != null and fTitle != ''"> and f_title = #{fTitle}</if>
<if test="fDescription != null and fDescription != ''"> and f_description = #{fDescription}</if>
<if test="fOccurrenctTime != null and fOccurrenctTime != ''"> and f_occurrenct_time = #{fOccurrenctTime}</if>
<if test="fAttachment != null and fAttachment != ''"> and f_attachment = #{fAttachment}</if>
<if test="fRemark != null and fRemark != ''"> and f_remark = #{fRemark}</if>
<if test="fUpdateTime != null and fUpdateTime != ''"> and f_update_time = #{fUpdateTime}</if>
</where>
</select>
<select id="selectTConGasProIncById" parameterType="Long" resultMap="TConGasProIncResult">
<include refid="selectTConGasProIncVo"/>
where f_con_gas_pro_inc_id = #{fConGasProIncId}
</select>
<insert id="insertTConGasProInc" parameterType="TConGasProInc" useGeneratedKeys="true" keyProperty="fConGasProIncId">
insert into t_con_gas_pro_inc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fIntersectConstructionId != null and fIntersectConstructionId != ''">f_intersect_construction_id,</if>
<if test="fTitle != null and fTitle != ''">f_title,</if>
<if test="fDescription != null and fDescription != ''">f_description,</if>
<if test="fOccurrenctTime != null and fOccurrenctTime != ''">f_occurrenct_time,</if>
<if test="fAttachment != null and fAttachment != ''">f_attachment,</if>
<if test="fRemark != null and fRemark != ''">f_remark,</if>
<if test="fUpdateTime != null and fUpdateTime != ''">f_update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fIntersectConstructionId != null and fIntersectConstructionId != ''">#{fIntersectConstructionId},</if>
<if test="fTitle != null and fTitle != ''">#{fTitle},</if>
<if test="fDescription != null and fDescription != ''">#{fDescription},</if>
<if test="fOccurrenctTime != null and fOccurrenctTime != ''">#{fOccurrenctTime},</if>
<if test="fAttachment != null and fAttachment != ''">#{fAttachment},</if>
<if test="fRemark != null and fRemark != ''">#{fRemark},</if>
<if test="fUpdateTime != null and fUpdateTime != ''">#{fUpdateTime},</if>
</trim>
</insert>
<update id="updateTConGasProInc" parameterType="TConGasProInc">
update t_con_gas_pro_inc
<trim prefix="SET" suffixOverrides=",">
<if test="fIntersectConstructionId != null and fIntersectConstructionId != ''">f_intersect_construction_id = #{fIntersectConstructionId},</if>
<if test="fTitle != null and fTitle != ''">f_title = #{fTitle},</if>
<if test="fDescription != null and fDescription != ''">f_description = #{fDescription},</if>
<if test="fOccurrenctTime != null and fOccurrenctTime != ''">f_occurrenct_time = #{fOccurrenctTime},</if>
<if test="fAttachment != null and fAttachment != ''">f_attachment = #{fAttachment},</if>
<if test="fRemark != null and fRemark != ''">f_remark = #{fRemark},</if>
<if test="fUpdateTime != null and fUpdateTime != ''">f_update_time = #{fUpdateTime},</if>
</trim>
where f_con_gas_pro_inc_id = #{fConGasProIncId}
</update>
<delete id="deleteTConGasProIncById" parameterType="Long">
delete from t_con_gas_pro_inc where f_con_gas_pro_inc_id = #{fConGasProIncId}
</delete>
<delete id="deleteTConGasProIncByIds" parameterType="String">
delete from t_con_gas_pro_inc where f_con_gas_pro_inc_id in
<foreach item="fConGasProIncId" collection="array" open="(" separator="," close=")">
#{fConGasProIncId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询第三方施工-涉气第三方施工意外事件列表
export function listInc(query) {
return request({
url: '/third/accident/list',
method: 'get',
params: query
})
}
// 查询第三方施工-涉气第三方施工意外事件详细
export function getInc(fConGasProIncId) {
return request({
url: '/third/accident/' + fConGasProIncId,
method: 'get'
})
}
// 新增第三方施工-涉气第三方施工意外事件
export function addInc(data) {
return request({
url: '/third/accident',
method: 'post',
data: data
})
}
// 修改第三方施工-涉气第三方施工意外事件
export function updateInc(data) {
return request({
url: '/third/accident',
method: 'put',
data: data
})
}
// 删除第三方施工-涉气第三方施工意外事件
export function delInc(fConGasProIncId) {
return request({
url: '/third/accident/' + fConGasProIncId,
method: 'delete'
})
}
// 导出第三方施工-涉气第三方施工意外事件
export function exportInc(query) {
return request({
url: '/third/accident/export',
method: 'get',
params: query
})
}
This diff is collapsed.
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