Commit e5cab16a authored by 耿迪迪's avatar 耿迪迪

抽查隐患

parent d415cbe2
package com.zehong.web.controller.supervision;
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.TInsSpotHazardRef;
import com.zehong.system.service.ITInsSpotHazardRefService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 监督检查-抽查隐患Controller
*
* @author zehong
* @date 2024-05-21
*/
@RestController
@RequestMapping("/supervision/spot")
public class TInsSpotHazardRefController extends BaseController
{
@Autowired
private ITInsSpotHazardRefService tInsSpotHazardRefService;
/**
* 查询监督检查-抽查隐患列表
*/
@PreAuthorize("@ss.hasPermi('supervision:spot:list')")
@GetMapping("/list")
public TableDataInfo list(TInsSpotHazardRef tInsSpotHazardRef)
{
startPage();
List<TInsSpotHazardRef> list = tInsSpotHazardRefService.selectTInsSpotHazardRefList(tInsSpotHazardRef);
return getDataTable(list);
}
/**
* 导出监督检查-抽查隐患列表
*/
@PreAuthorize("@ss.hasPermi('supervision:spot:export')")
@Log(title = "监督检查-抽查隐患", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInsSpotHazardRef tInsSpotHazardRef)
{
List<TInsSpotHazardRef> list = tInsSpotHazardRefService.selectTInsSpotHazardRefList(tInsSpotHazardRef);
ExcelUtil<TInsSpotHazardRef> util = new ExcelUtil<TInsSpotHazardRef>(TInsSpotHazardRef.class);
return util.exportExcel(list, "监督检查-抽查隐患数据");
}
/**
* 获取监督检查-抽查隐患详细信息
*/
@PreAuthorize("@ss.hasPermi('supervision:spot:query')")
@GetMapping(value = "/{fInsSpotHazardRefId}")
public AjaxResult getInfo(@PathVariable("fInsSpotHazardRefId") Long fInsSpotHazardRefId)
{
return AjaxResult.success(tInsSpotHazardRefService.selectTInsSpotHazardRefById(fInsSpotHazardRefId));
}
/**
* 新增监督检查-抽查隐患
*/
@PreAuthorize("@ss.hasPermi('supervision:spot:add')")
@Log(title = "监督检查-抽查隐患", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInsSpotHazardRef tInsSpotHazardRef)
{
return toAjax(tInsSpotHazardRefService.insertTInsSpotHazardRef(tInsSpotHazardRef));
}
/**
* 修改监督检查-抽查隐患
*/
@PreAuthorize("@ss.hasPermi('supervision:spot:edit')")
@Log(title = "监督检查-抽查隐患", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInsSpotHazardRef tInsSpotHazardRef)
{
return toAjax(tInsSpotHazardRefService.updateTInsSpotHazardRef(tInsSpotHazardRef));
}
/**
* 删除监督检查-抽查隐患
*/
@PreAuthorize("@ss.hasPermi('supervision:spot:remove')")
@Log(title = "监督检查-抽查隐患", businessType = BusinessType.DELETE)
@DeleteMapping("/{fInsSpotHazardRefIds}")
public AjaxResult remove(@PathVariable Long[] fInsSpotHazardRefIds)
{
return toAjax(tInsSpotHazardRefService.deleteTInsSpotHazardRefByIds(fInsSpotHazardRefIds));
}
}
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_ins_spot_hazard_ref
*
* @author zehong
* @date 2024-05-21
*/
public class TInsSpotHazardRef extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fInsSpotHazardRefId;
/** 隐患唯一编码 */
@Excel(name = "隐患唯一编码")
private String fHazardUniqueCode;
/** 隐患在市级平台系统中的自有编号 */
@Excel(name = "隐患在市级平台系统中的自有编号")
private String fHazardOutUniqueCode;
/** 设计供气企业编码 */
@Excel(name = "设计供气企业编码")
private String fInvolveEnterpriseCode;
/** 检查对象分类,按分类代码表23 分类填写
23-0100 :气代煤
23-0200-0201:传统电代煤
23-0200-0202:石墨烯
23-0200-0203:聚能
23-0200-0204:空气源热泵
23-0200-0205:地源热泵
23-9900-0301:集中供热
23-9900-0302:光伏+
23-9900-0303:光热+
23-9900-0304:醇基燃料
23-9900-0305:生物质 */
@Excel(name = "检查对象分类",dictType = "t_type_code")
private String fObjType;
/** 对象编码 */
@Excel(name = "对象编码")
private String fObjCode;
/** 对象所在行政区,县级行政区ID */
@Excel(name = "对象所在行政区,县级行政区ID")
private String fObjBelongRegionId;
/** 监督检查时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "监督检查时间")
private String fCheckTime;
/** 隐患分类分级编码 */
@Excel(name = "隐患分类分级编码")
private String fHazardTypeLevelId;
/** 隐患分类分级标准中的内容不足以表述隐患,或隐患
分类分级编码对应了“其他”类隐患的,应该用补充说
明把隐患描述完整 */
@Excel(name = "隐患描述")
private String fHazardDesc;
/** 隐患整改前照片 */
@Excel(name = "隐患整改前照片")
private String fBeforePicture;
/** 是否执行:1 是 0 否 */
@Excel(name = "是否执行:1 是 0 否",readConverterExp = "1=是,0=否")
private String fIsEnforcement;
/** 备注 */
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
private String fLastTime;
public void setfInsSpotHazardRefId(Long fInsSpotHazardRefId)
{
this.fInsSpotHazardRefId = fInsSpotHazardRefId;
}
public Long getfInsSpotHazardRefId()
{
return fInsSpotHazardRefId;
}
public void setfHazardUniqueCode(String fHazardUniqueCode)
{
this.fHazardUniqueCode = fHazardUniqueCode;
}
public String getfHazardUniqueCode()
{
return fHazardUniqueCode;
}
public void setfHazardOutUniqueCode(String fHazardOutUniqueCode)
{
this.fHazardOutUniqueCode = fHazardOutUniqueCode;
}
public String getfHazardOutUniqueCode()
{
return fHazardOutUniqueCode;
}
public void setfInvolveEnterpriseCode(String fInvolveEnterpriseCode)
{
this.fInvolveEnterpriseCode = fInvolveEnterpriseCode;
}
public String getfInvolveEnterpriseCode()
{
return fInvolveEnterpriseCode;
}
public void setfObjType(String fObjType)
{
this.fObjType = fObjType;
}
public String getfObjType()
{
return fObjType;
}
public void setfObjCode(String fObjCode)
{
this.fObjCode = fObjCode;
}
public String getfObjCode()
{
return fObjCode;
}
public void setfObjBelongRegionId(String fObjBelongRegionId)
{
this.fObjBelongRegionId = fObjBelongRegionId;
}
public String getfObjBelongRegionId()
{
return fObjBelongRegionId;
}
public void setfCheckTime(String fCheckTime)
{
this.fCheckTime = fCheckTime;
}
public String getfCheckTime()
{
return fCheckTime;
}
public void setfHazardTypeLevelId(String fHazardTypeLevelId)
{
this.fHazardTypeLevelId = fHazardTypeLevelId;
}
public String getfHazardTypeLevelId()
{
return fHazardTypeLevelId;
}
public void setfHazardDesc(String fHazardDesc)
{
this.fHazardDesc = fHazardDesc;
}
public String getfHazardDesc()
{
return fHazardDesc;
}
public void setfBeforePicture(String fBeforePicture)
{
this.fBeforePicture = fBeforePicture;
}
public String getfBeforePicture()
{
return fBeforePicture;
}
public void setfIsEnforcement(String fIsEnforcement)
{
this.fIsEnforcement = fIsEnforcement;
}
public String getfIsEnforcement()
{
return fIsEnforcement;
}
public void setfRemark(String fRemark)
{
this.fRemark = fRemark;
}
public String getfRemark()
{
return fRemark;
}
public void setfLastTime(String fLastTime)
{
this.fLastTime = fLastTime;
}
public String getfLastTime()
{
return fLastTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fInsSpotHazardRefId", getfInsSpotHazardRefId())
.append("fHazardUniqueCode", getfHazardUniqueCode())
.append("fHazardOutUniqueCode", getfHazardOutUniqueCode())
.append("fInvolveEnterpriseCode", getfInvolveEnterpriseCode())
.append("fObjType", getfObjType())
.append("fObjCode", getfObjCode())
.append("fObjBelongRegionId", getfObjBelongRegionId())
.append("fCheckTime", getfCheckTime())
.append("fHazardTypeLevelId", getfHazardTypeLevelId())
.append("fHazardDesc", getfHazardDesc())
.append("fBeforePicture", getfBeforePicture())
.append("fIsEnforcement", getfIsEnforcement())
.append("fRemark", getfRemark())
.append("fLastTime", getfLastTime())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInsSpotHazardRef;
/**
* 监督检查-抽查隐患Mapper接口
*
* @author zehong
* @date 2024-05-21
*/
public interface TInsSpotHazardRefMapper
{
/**
* 查询监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 监督检查-抽查隐患
*/
public TInsSpotHazardRef selectTInsSpotHazardRefById(Long fInsSpotHazardRefId);
/**
* 查询监督检查-抽查隐患列表
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 监督检查-抽查隐患集合
*/
public List<TInsSpotHazardRef> selectTInsSpotHazardRefList(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 新增监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public int insertTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 修改监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public int updateTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 结果
*/
public int deleteTInsSpotHazardRefById(Long fInsSpotHazardRefId);
/**
* 批量删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInsSpotHazardRefByIds(Long[] fInsSpotHazardRefIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInsSpotHazardRef;
/**
* 监督检查-抽查隐患Service接口
*
* @author zehong
* @date 2024-05-21
*/
public interface ITInsSpotHazardRefService
{
/**
* 查询监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 监督检查-抽查隐患
*/
public TInsSpotHazardRef selectTInsSpotHazardRefById(Long fInsSpotHazardRefId);
/**
* 查询监督检查-抽查隐患列表
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 监督检查-抽查隐患集合
*/
public List<TInsSpotHazardRef> selectTInsSpotHazardRefList(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 新增监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public int insertTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 修改监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public int updateTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 批量删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefIds 需要删除的监督检查-抽查隐患ID
* @return 结果
*/
public int deleteTInsSpotHazardRefByIds(Long[] fInsSpotHazardRefIds);
/**
* 删除监督检查-抽查隐患信息
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 结果
*/
public int deleteTInsSpotHazardRefById(Long fInsSpotHazardRefId);
}
package com.zehong.system.service.impl;
import java.sql.SQLIntegrityConstraintViolationException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsSpotHazardRefMapper;
import com.zehong.system.domain.TInsSpotHazardRef;
import com.zehong.system.service.ITInsSpotHazardRefService;
/**
* 监督检查-抽查隐患Service业务层处理
*
* @author zehong
* @date 2024-05-21
*/
@Service
public class TInsSpotHazardRefServiceImpl implements ITInsSpotHazardRefService
{
@Autowired
private TInsSpotHazardRefMapper tInsSpotHazardRefMapper;
/**
* 查询监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 监督检查-抽查隐患
*/
@Override
public TInsSpotHazardRef selectTInsSpotHazardRefById(Long fInsSpotHazardRefId)
{
return tInsSpotHazardRefMapper.selectTInsSpotHazardRefById(fInsSpotHazardRefId);
}
/**
* 查询监督检查-抽查隐患列表
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 监督检查-抽查隐患
*/
@Override
public List<TInsSpotHazardRef> selectTInsSpotHazardRefList(TInsSpotHazardRef tInsSpotHazardRef)
{
return tInsSpotHazardRefMapper.selectTInsSpotHazardRefList(tInsSpotHazardRef);
}
/**
* 新增监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
@Override
public int insertTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef)
{
try{
tInsSpotHazardRef.setfLastTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return tInsSpotHazardRefMapper.insertTInsSpotHazardRef(tInsSpotHazardRef);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_hazard_unique_code")){
throw new CustomException("隐患唯一编码不唯一");
}
}
return 0;
}
}
/**
* 修改监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
@Override
public int updateTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef)
{
try{
tInsSpotHazardRef.setfLastTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return tInsSpotHazardRefMapper.updateTInsSpotHazardRef(tInsSpotHazardRef);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_hazard_unique_code")){
throw new CustomException("隐患唯一编码不唯一");
}
}
return 0;
}
}
/**
* 批量删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefIds 需要删除的监督检查-抽查隐患ID
* @return 结果
*/
@Override
public int deleteTInsSpotHazardRefByIds(Long[] fInsSpotHazardRefIds)
{
return tInsSpotHazardRefMapper.deleteTInsSpotHazardRefByIds(fInsSpotHazardRefIds);
}
/**
* 删除监督检查-抽查隐患信息
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 结果
*/
@Override
public int deleteTInsSpotHazardRefById(Long fInsSpotHazardRefId)
{
return tInsSpotHazardRefMapper.deleteTInsSpotHazardRefById(fInsSpotHazardRefId);
}
}
<?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.TInsSpotHazardRefMapper">
<resultMap type="TInsSpotHazardRef" id="TInsSpotHazardRefResult">
<result property="fInsSpotHazardRefId" column="f_ins_spot_hazard_ref_id" />
<result property="fHazardUniqueCode" column="f_hazard_unique_code" />
<result property="fHazardOutUniqueCode" column="f_hazard_out_unique_code" />
<result property="fInvolveEnterpriseCode" column="f_involve_enterprise_code" />
<result property="fObjType" column="f_obj_type" />
<result property="fObjCode" column="f_obj_code" />
<result property="fObjBelongRegionId" column="f_obj_belong_region_id" />
<result property="fCheckTime" column="f_check_time" />
<result property="fHazardTypeLevelId" column="f_hazard_type_level_id" />
<result property="fHazardDesc" column="f_hazard_desc" />
<result property="fBeforePicture" column="f_before_picture" />
<result property="fIsEnforcement" column="f_is_enforcement" />
<result property="fRemark" column="f_remark" />
<result property="fLastTime" column="f_last_time" />
</resultMap>
<sql id="selectTInsSpotHazardRefVo">
select f_ins_spot_hazard_ref_id, f_hazard_unique_code, f_hazard_out_unique_code, f_involve_enterprise_code, f_obj_type, f_obj_code, f_obj_belong_region_id, f_check_time, f_hazard_type_level_id, f_hazard_desc, f_before_picture, f_is_enforcement, f_remark, f_last_time from t_ins_spot_hazard_ref
</sql>
<select id="selectTInsSpotHazardRefList" parameterType="TInsSpotHazardRef" resultMap="TInsSpotHazardRefResult">
<include refid="selectTInsSpotHazardRefVo"/>
<where>
<if test="fHazardUniqueCode != null and fHazardUniqueCode != ''"> and f_hazard_unique_code like concat('%', #{fHazardUniqueCode}, '%')</if>
<if test="fObjType != null and fObjType != ''"> and f_obj_type = #{fObjType}</if>
<if test="fIsEnforcement != null and fIsEnforcement != ''"> and f_is_enforcement = #{fIsEnforcement}</if>
</where>
</select>
<select id="selectTInsSpotHazardRefById" parameterType="Long" resultMap="TInsSpotHazardRefResult">
<include refid="selectTInsSpotHazardRefVo"/>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</select>
<insert id="insertTInsSpotHazardRef" parameterType="TInsSpotHazardRef" useGeneratedKeys="true" keyProperty="fInsSpotHazardRefId">
insert into t_ins_spot_hazard_ref
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fHazardUniqueCode != null">f_hazard_unique_code,</if>
<if test="fHazardOutUniqueCode != null">f_hazard_out_unique_code,</if>
<if test="fInvolveEnterpriseCode != null">f_involve_enterprise_code,</if>
<if test="fObjType != null">f_obj_type,</if>
<if test="fObjCode != null">f_obj_code,</if>
<if test="fObjBelongRegionId != null">f_obj_belong_region_id,</if>
<if test="fCheckTime != null">f_check_time,</if>
<if test="fHazardTypeLevelId != null">f_hazard_type_level_id,</if>
<if test="fHazardDesc != null">f_hazard_desc,</if>
<if test="fBeforePicture != null">f_before_picture,</if>
<if test="fIsEnforcement != null">f_is_enforcement,</if>
<if test="fRemark != null">f_remark,</if>
<if test="fLastTime != null">f_last_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fHazardUniqueCode != null">#{fHazardUniqueCode},</if>
<if test="fHazardOutUniqueCode != null">#{fHazardOutUniqueCode},</if>
<if test="fInvolveEnterpriseCode != null">#{fInvolveEnterpriseCode},</if>
<if test="fObjType != null">#{fObjType},</if>
<if test="fObjCode != null">#{fObjCode},</if>
<if test="fObjBelongRegionId != null">#{fObjBelongRegionId},</if>
<if test="fCheckTime != null">#{fCheckTime},</if>
<if test="fHazardTypeLevelId != null">#{fHazardTypeLevelId},</if>
<if test="fHazardDesc != null">#{fHazardDesc},</if>
<if test="fBeforePicture != null">#{fBeforePicture},</if>
<if test="fIsEnforcement != null">#{fIsEnforcement},</if>
<if test="fRemark != null">#{fRemark},</if>
<if test="fLastTime != null">#{fLastTime},</if>
</trim>
</insert>
<update id="updateTInsSpotHazardRef" parameterType="TInsSpotHazardRef">
update t_ins_spot_hazard_ref
<trim prefix="SET" suffixOverrides=",">
<if test="fHazardUniqueCode != null">f_hazard_unique_code = #{fHazardUniqueCode},</if>
<if test="fHazardOutUniqueCode != null">f_hazard_out_unique_code = #{fHazardOutUniqueCode},</if>
<if test="fInvolveEnterpriseCode != null">f_involve_enterprise_code = #{fInvolveEnterpriseCode},</if>
<if test="fObjType != null">f_obj_type = #{fObjType},</if>
<if test="fObjCode != null">f_obj_code = #{fObjCode},</if>
<if test="fObjBelongRegionId != null">f_obj_belong_region_id = #{fObjBelongRegionId},</if>
<if test="fCheckTime != null">f_check_time = #{fCheckTime},</if>
<if test="fHazardTypeLevelId != null">f_hazard_type_level_id = #{fHazardTypeLevelId},</if>
<if test="fHazardDesc != null">f_hazard_desc = #{fHazardDesc},</if>
<if test="fBeforePicture != null">f_before_picture = #{fBeforePicture},</if>
<if test="fIsEnforcement != null">f_is_enforcement = #{fIsEnforcement},</if>
<if test="fRemark != null">f_remark = #{fRemark},</if>
<if test="fLastTime != null">f_last_time = #{fLastTime},</if>
</trim>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</update>
<delete id="deleteTInsSpotHazardRefById" parameterType="Long">
delete from t_ins_spot_hazard_ref where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</delete>
<delete id="deleteTInsSpotHazardRefByIds" parameterType="String">
delete from t_ins_spot_hazard_ref where f_ins_spot_hazard_ref_id in
<foreach item="fInsSpotHazardRefId" collection="array" open="(" separator="," close=")">
#{fInsSpotHazardRefId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询监督检查-抽查隐患列表
export function listRef(query) {
return request({
url: '/supervision/spot/list',
method: 'get',
params: query
})
}
// 查询监督检查-抽查隐患详细
export function getRef(fInsSpotHazardRefId) {
return request({
url: '/supervision/spot/' + fInsSpotHazardRefId,
method: 'get'
})
}
// 新增监督检查-抽查隐患
export function addRef(data) {
return request({
url: '/supervision/spot',
method: 'post',
data: data
})
}
// 修改监督检查-抽查隐患
export function updateRef(data) {
return request({
url: '/supervision/spot',
method: 'put',
data: data
})
}
// 删除监督检查-抽查隐患
export function delRef(fInsSpotHazardRefId) {
return request({
url: '/supervision/spot/' + fInsSpotHazardRefId,
method: 'delete'
})
}
// 导出监督检查-抽查隐患
export function exportRef(query) {
return request({
url: '/supervision/spot/export',
method: 'get',
params: query
})
}
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整改完成日期" align="center" prop="fCompletionDate"> <el-table-column label="整改完成日期" align="center" prop="fCompletionDate" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fCompletionDate">{{ scope.row.fCompletionDate }}</span> <span v-if="scope.row.fCompletionDate">{{ scope.row.fCompletionDate }}</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="执法日期" align="center" prop="fPenaltyDate"> <el-table-column label="执法日期" align="center" prop="fPenaltyDate" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fPenaltyDate">{{ scope.row.fPenaltyDate }}</span> <span v-if="scope.row.fPenaltyDate">{{ scope.row.fPenaltyDate }}</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -265,8 +265,8 @@ ...@@ -265,8 +265,8 @@
<el-date-picker <el-date-picker
style="width: 100%" style="width: 100%"
v-model="form.fCheckTime" v-model="form.fCheckTime"
type="date" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择监督检查时间"> placeholder="选择监督检查时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -306,8 +306,8 @@ ...@@ -306,8 +306,8 @@
<el-date-picker <el-date-picker
style="width: 100%" style="width: 100%"
v-model="form.fCompletionDate" v-model="form.fCompletionDate"
type="date" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择整改完成日期"> placeholder="选择整改完成日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -465,7 +465,7 @@ export default { ...@@ -465,7 +465,7 @@ export default {
{ required: true, message: "请选择检查记录编码", trigger: "change" } { required: true, message: "请选择检查记录编码", trigger: "change" }
], ],
fObjType: [ fObjType: [
{ required: true, message: "检查对象分类不能为空", trigger: "change" } { required: true, message: "请选择检查对象分类", trigger: "change" }
], ],
fObjCode: [ fObjCode: [
{ required: true, message: "对象编码不能为空", trigger: "blur" } { required: true, message: "对象编码不能为空", trigger: "blur" }
......
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="140px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="隐患唯一编码">
<span v-if="detailInfo.fHazardUniqueCode">{{ detailInfo.fHazardUniqueCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患自有编号">
<span v-if="detailInfo.fHazardOutUniqueCode">{{ detailInfo.fHazardOutUniqueCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设计供气企业编码">
<span v-if="detailInfo.fInvolveEnterpriseCode">{{ detailInfo.fInvolveEnterpriseCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查对象分类">
<span v-if="detailInfo.fObjType">{{ $parent.fObjTypeFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="对象编码">
<span v-if="detailInfo.fObjCode">{{ detailInfo.fObjCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行政区县级行政区ID">
<span v-if="detailInfo.fObjBelongRegionId">{{ detailInfo.fObjBelongRegionId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="监督检查时间">
<span v-if="detailInfo.fCheckTime">{{ detailInfo.fCheckTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患分类分级编码">
<span v-if="detailInfo.fHazardTypeLevelId">{{ detailInfo.fHazardTypeLevelId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患描述">
<span v-if="detailInfo.fHazardDesc">{{ detailInfo.fHazardDesc }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否执行" prop="fIsEnforcement">
<span v-if="detailInfo.fIsEnforcement == '1'"></span>
<span v-else-if="detailInfo.fIsEnforcement == '0'"></span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患整改前照片">
<el-image
:src="detailInfo.fBeforePicture"
:preview-src-list="[detailInfo.fBeforePicture]"
v-if="detailInfo.fBeforePicture != '' && detailInfo.fBeforePicture != null"
:z-index=5000
style="width: 200px;height: 200px;"
></el-image>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import { getRef } from "@/api/supervision/spot";
export default {
name: "detail-info",
data(){
return{
detailInfo: {
fDeleteFlag: 0
},
detailOpen: false
}
},
methods:{
getDetailInfo(id){
getRef(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped>
</style>
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