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

隐患及整改,执法结果

parent a267a551
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.TInsHazRef;
import com.zehong.system.service.ITInsHazRefService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 监督检查-监督检查发现隐患及整改,执法结果Controller
*
* @author zehong
* @date 2024-05-21
*/
@RestController
@RequestMapping("/supervision/rectification")
public class TInsHazRefController extends BaseController
{
@Autowired
private ITInsHazRefService tInsHazRefService;
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果列表
*/
@PreAuthorize("@ss.hasPermi('supervision:rectification:list')")
@GetMapping("/list")
public TableDataInfo list(TInsHazRef tInsHazRef)
{
startPage();
List<TInsHazRef> list = tInsHazRefService.selectTInsHazRefList(tInsHazRef);
return getDataTable(list);
}
/**
* 导出监督检查-监督检查发现隐患及整改,执法结果列表
*/
@PreAuthorize("@ss.hasPermi('supervision:rectification:export')")
@Log(title = "监督检查-监督检查发现隐患及整改,执法结果", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInsHazRef tInsHazRef)
{
List<TInsHazRef> list = tInsHazRefService.selectTInsHazRefList(tInsHazRef);
ExcelUtil<TInsHazRef> util = new ExcelUtil<TInsHazRef>(TInsHazRef.class);
return util.exportExcel(list, "监督检查-监督检查发现隐患及整改,执法结果数据");
}
/**
* 获取监督检查-监督检查发现隐患及整改,执法结果详细信息
*/
@PreAuthorize("@ss.hasPermi('supervision:rectification:query')")
@GetMapping(value = "/{fInsHazRefId}")
public AjaxResult getInfo(@PathVariable("fInsHazRefId") Long fInsHazRefId)
{
return AjaxResult.success(tInsHazRefService.selectTInsHazRefById(fInsHazRefId));
}
/**
* 新增监督检查-监督检查发现隐患及整改,执法结果
*/
@PreAuthorize("@ss.hasPermi('supervision:rectification:add')")
@Log(title = "监督检查-监督检查发现隐患及整改,执法结果", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInsHazRef tInsHazRef)
{
return toAjax(tInsHazRefService.insertTInsHazRef(tInsHazRef));
}
/**
* 修改监督检查-监督检查发现隐患及整改,执法结果
*/
@PreAuthorize("@ss.hasPermi('supervision:rectification:edit')")
@Log(title = "监督检查-监督检查发现隐患及整改,执法结果", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInsHazRef tInsHazRef)
{
return toAjax(tInsHazRefService.updateTInsHazRef(tInsHazRef));
}
/**
* 删除监督检查-监督检查发现隐患及整改,执法结果
*/
@PreAuthorize("@ss.hasPermi('supervision:rectification:remove')")
@Log(title = "监督检查-监督检查发现隐患及整改,执法结果", businessType = BusinessType.DELETE)
@DeleteMapping("/{fInsHazRefIds}")
public AjaxResult remove(@PathVariable Long[] fInsHazRefIds)
{
return toAjax(tInsHazRefService.deleteTInsHazRefByIds(fInsHazRefIds));
}
}
......@@ -45,6 +45,17 @@ public class TInsRecInforController extends BaseController
return getDataTable(list);
}
/**
* 所有记录
* @param tInsRecInfor
* @return
*/
@GetMapping("/recordList")
public AjaxResult recordList(TInsRecInfor tInsRecInfor){
List<TInsRecInfor> list = tInsRecInforService.selectTInsRecInforList(tInsRecInfor);
return AjaxResult.success(list);
}
/**
* 导出监督检查-检查记录列表
*/
......
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_haz_ref
*
* @author zehong
* @date 2024-05-21
*/
public class TInsHazRef extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fInsHazRefId;
/** 隐患唯一编码 */
@Excel(name = "隐患唯一编码")
private String fHazardUniqueCode;
/** 隐患在市级平台系统中的自有编号 */
@Excel(name = "隐患在市级平台系统中的自有编号")
private String fHazardOutUniqueCode;
/** 检查记录编码,关联生成该隐患的检查记录 */
@Excel(name = "检查记录编码,关联生成该隐患的检查记录")
private String fCheckCode;
/** 涉及供气企业编码 */
@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 = "监督检查时间 yyyy-MM-dd hh:mm:ss")
private String fCheckTime;
/** 隐患分类分级编码 */
@Excel(name = "隐患分类分级编码")
private String fHazardTypeLevelId;
/** 隐患分类分级标准中的内容不足以表述隐
患,或隐患分类分级编码对应了“其他”类隐
患的,应该用补充说明把隐患描述完整 */
@Excel(name = "隐患描述")
private String fHazardDesc;
/** 0-未整改,1-已整改,2-已管控,3-部分整改 */
@Excel(name = "整改状态",dictType = "t_rectification_status")
private String fRectificationStatus;
/** 整改资金 单位: 万元 */
@Excel(name = "整改资金 单位: 万元")
private String fRectificationFund;
/** 整改完成日期 yyyy-MM-dd */
@Excel(name = "整改完成日期")
private String fCompletionDate;
/** 整改或管控措施描述 */
@Excel(name = "整改或管控措施描述")
private String fControlMeasure;
/** 隐患整改前照片 */
@Excel(name = "隐患整改前照片")
private String fBeforePicture;
/** 隐患整改后照片 */
@Excel(name = "隐患整改后照片")
private String fAfterPicture;
/** 1 是,0 否 */
@Excel(name = "是否执行",readConverterExp = "1=是,0=否")
private String fIsEnforcement;
/** 1 警告,2 罚款,3 没收违法所得、没收非
法财物,4 责令停产停业,5 暂扣或者吊销
许可证、暂扣或者吊销执照,6 行政拘留,
7 法律、行政法规规定的其他行政处罚 */
@Excel(name = "处罚措施",dictType = "t_enforcement_type")
private String fEnforcementType;
/** 处罚金额,单位:万元 */
@Excel(name = "处罚金额,单位:万元")
private Long fPenaltyAmount;
/** 其他执法情况说明 */
@Excel(name = "其他执法情况说明")
private String fPenaltyDesc;
/** 执法日期 yyyy-MM-dd */
@Excel(name = "执法日期")
private String fPenaltyDate;
/** 备注 */
@Excel(name = "备注")
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "最后修改时间")
private String fLastTime;
public void setfInsHazRefId(Long fInsHazRefId)
{
this.fInsHazRefId = fInsHazRefId;
}
public Long getfInsHazRefId()
{
return fInsHazRefId;
}
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 setfCheckCode(String fCheckCode)
{
this.fCheckCode = fCheckCode;
}
public String getfCheckCode()
{
return fCheckCode;
}
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 setfRectificationStatus(String fRectificationStatus)
{
this.fRectificationStatus = fRectificationStatus;
}
public String getfRectificationStatus()
{
return fRectificationStatus;
}
public void setfRectificationFund(String fRectificationFund)
{
this.fRectificationFund = fRectificationFund;
}
public String getfRectificationFund()
{
return fRectificationFund;
}
public void setfCompletionDate(String fCompletionDate)
{
this.fCompletionDate = fCompletionDate;
}
public String getfCompletionDate()
{
return fCompletionDate;
}
public void setfControlMeasure(String fControlMeasure)
{
this.fControlMeasure = fControlMeasure;
}
public String getfControlMeasure()
{
return fControlMeasure;
}
public void setfBeforePicture(String fBeforePicture)
{
this.fBeforePicture = fBeforePicture;
}
public String getfBeforePicture()
{
return fBeforePicture;
}
public void setfAfterPicture(String fAfterPicture)
{
this.fAfterPicture = fAfterPicture;
}
public String getfAfterPicture()
{
return fAfterPicture;
}
public void setfIsEnforcement(String fIsEnforcement)
{
this.fIsEnforcement = fIsEnforcement;
}
public String getfIsEnforcement()
{
return fIsEnforcement;
}
public void setfEnforcementType(String fEnforcementType)
{
this.fEnforcementType = fEnforcementType;
}
public String getfEnforcementType()
{
return fEnforcementType;
}
public void setfPenaltyAmount(Long fPenaltyAmount)
{
this.fPenaltyAmount = fPenaltyAmount;
}
public Long getfPenaltyAmount()
{
return fPenaltyAmount;
}
public void setfPenaltyDesc(String fPenaltyDesc)
{
this.fPenaltyDesc = fPenaltyDesc;
}
public String getfPenaltyDesc()
{
return fPenaltyDesc;
}
public void setfPenaltyDate(String fPenaltyDate)
{
this.fPenaltyDate = fPenaltyDate;
}
public String getfPenaltyDate()
{
return fPenaltyDate;
}
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("fInsHazRefId", getfInsHazRefId())
.append("fHazardUniqueCode", getfHazardUniqueCode())
.append("fHazardOutUniqueCode", getfHazardOutUniqueCode())
.append("fCheckCode", getfCheckCode())
.append("fInvolveEnterpriseCode", getfInvolveEnterpriseCode())
.append("fObjType", getfObjType())
.append("fObjCode", getfObjCode())
.append("fObjBelongRegionId", getfObjBelongRegionId())
.append("fCheckTime", getfCheckTime())
.append("fHazardTypeLevelId", getfHazardTypeLevelId())
.append("fHazardDesc", getfHazardDesc())
.append("fRectificationStatus", getfRectificationStatus())
.append("fRectificationFund", getfRectificationFund())
.append("fCompletionDate", getfCompletionDate())
.append("fControlMeasure", getfControlMeasure())
.append("fBeforePicture", getfBeforePicture())
.append("fAfterPicture", getfAfterPicture())
.append("fIsEnforcement", getfIsEnforcement())
.append("fEnforcementType", getfEnforcementType())
.append("fPenaltyAmount", getfPenaltyAmount())
.append("fPenaltyDesc", getfPenaltyDesc())
.append("fPenaltyDate", getfPenaltyDate())
.append("fRemark", getfRemark())
.append("fLastTime", getfLastTime())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInsHazRef;
/**
* 监督检查-监督检查发现隐患及整改,执法结果Mapper接口
*
* @author zehong
* @date 2024-05-21
*/
public interface TInsHazRefMapper
{
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果
*
* @param fInsHazRefId 监督检查-监督检查发现隐患及整改,执法结果ID
* @return 监督检查-监督检查发现隐患及整改,执法结果
*/
public TInsHazRef selectTInsHazRefById(Long fInsHazRefId);
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果列表
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 监督检查-监督检查发现隐患及整改,执法结果集合
*/
public List<TInsHazRef> selectTInsHazRefList(TInsHazRef tInsHazRef);
/**
* 新增监督检查-监督检查发现隐患及整改,执法结果
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 结果
*/
public int insertTInsHazRef(TInsHazRef tInsHazRef);
/**
* 修改监督检查-监督检查发现隐患及整改,执法结果
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 结果
*/
public int updateTInsHazRef(TInsHazRef tInsHazRef);
/**
* 删除监督检查-监督检查发现隐患及整改,执法结果
*
* @param fInsHazRefId 监督检查-监督检查发现隐患及整改,执法结果ID
* @return 结果
*/
public int deleteTInsHazRefById(Long fInsHazRefId);
/**
* 批量删除监督检查-监督检查发现隐患及整改,执法结果
*
* @param fInsHazRefIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInsHazRefByIds(Long[] fInsHazRefIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInsHazRef;
/**
* 监督检查-监督检查发现隐患及整改,执法结果Service接口
*
* @author zehong
* @date 2024-05-21
*/
public interface ITInsHazRefService
{
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果
*
* @param fInsHazRefId 监督检查-监督检查发现隐患及整改,执法结果ID
* @return 监督检查-监督检查发现隐患及整改,执法结果
*/
public TInsHazRef selectTInsHazRefById(Long fInsHazRefId);
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果列表
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 监督检查-监督检查发现隐患及整改,执法结果集合
*/
public List<TInsHazRef> selectTInsHazRefList(TInsHazRef tInsHazRef);
/**
* 新增监督检查-监督检查发现隐患及整改,执法结果
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 结果
*/
public int insertTInsHazRef(TInsHazRef tInsHazRef);
/**
* 修改监督检查-监督检查发现隐患及整改,执法结果
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 结果
*/
public int updateTInsHazRef(TInsHazRef tInsHazRef);
/**
* 批量删除监督检查-监督检查发现隐患及整改,执法结果
*
* @param fInsHazRefIds 需要删除的监督检查-监督检查发现隐患及整改,执法结果ID
* @return 结果
*/
public int deleteTInsHazRefByIds(Long[] fInsHazRefIds);
/**
* 删除监督检查-监督检查发现隐患及整改,执法结果信息
*
* @param fInsHazRefId 监督检查-监督检查发现隐患及整改,执法结果ID
* @return 结果
*/
public int deleteTInsHazRefById(Long fInsHazRefId);
}
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.TInsHazRefMapper;
import com.zehong.system.domain.TInsHazRef;
import com.zehong.system.service.ITInsHazRefService;
/**
* 监督检查-监督检查发现隐患及整改,执法结果Service业务层处理
*
* @author zehong
* @date 2024-05-21
*/
@Service
public class TInsHazRefServiceImpl implements ITInsHazRefService
{
@Autowired
private TInsHazRefMapper tInsHazRefMapper;
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果
*
* @param fInsHazRefId 监督检查-监督检查发现隐患及整改,执法结果ID
* @return 监督检查-监督检查发现隐患及整改,执法结果
*/
@Override
public TInsHazRef selectTInsHazRefById(Long fInsHazRefId)
{
return tInsHazRefMapper.selectTInsHazRefById(fInsHazRefId);
}
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果列表
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 监督检查-监督检查发现隐患及整改,执法结果
*/
@Override
public List<TInsHazRef> selectTInsHazRefList(TInsHazRef tInsHazRef)
{
return tInsHazRefMapper.selectTInsHazRefList(tInsHazRef);
}
/**
* 新增监督检查-监督检查发现隐患及整改,执法结果
*
* @param tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 结果
*/
@Override
public int insertTInsHazRef(TInsHazRef tInsHazRef)
{
try{
tInsHazRef.setfLastTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return tInsHazRefMapper.insertTInsHazRef(tInsHazRef);
}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 tInsHazRef 监督检查-监督检查发现隐患及整改,执法结果
* @return 结果
*/
@Override
public int updateTInsHazRef(TInsHazRef tInsHazRef)
{
try{
tInsHazRef.setfLastTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return tInsHazRefMapper.updateTInsHazRef(tInsHazRef);
}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 fInsHazRefIds 需要删除的监督检查-监督检查发现隐患及整改,执法结果ID
* @return 结果
*/
@Override
public int deleteTInsHazRefByIds(Long[] fInsHazRefIds)
{
return tInsHazRefMapper.deleteTInsHazRefByIds(fInsHazRefIds);
}
/**
* 删除监督检查-监督检查发现隐患及整改,执法结果信息
*
* @param fInsHazRefId 监督检查-监督检查发现隐患及整改,执法结果ID
* @return 结果
*/
@Override
public int deleteTInsHazRefById(Long fInsHazRefId)
{
return tInsHazRefMapper.deleteTInsHazRefById(fInsHazRefId);
}
}
<?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.TInsHazRefMapper">
<resultMap type="TInsHazRef" id="TInsHazRefResult">
<result property="fInsHazRefId" column="f_ins_haz_ref_id" />
<result property="fHazardUniqueCode" column="f_hazard_unique_code" />
<result property="fHazardOutUniqueCode" column="f_hazard_out_unique_code" />
<result property="fCheckCode" column="f_check_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="fRectificationStatus" column="f_rectification_status" />
<result property="fRectificationFund" column="f_rectification_fund" />
<result property="fCompletionDate" column="f_completion_date" />
<result property="fControlMeasure" column="f_control_measure" />
<result property="fBeforePicture" column="f_before_picture" />
<result property="fAfterPicture" column="f_after_picture" />
<result property="fIsEnforcement" column="f_is_enforcement" />
<result property="fEnforcementType" column="f_enforcement_type" />
<result property="fPenaltyAmount" column="f_penalty_amount" />
<result property="fPenaltyDesc" column="f_penalty_desc" />
<result property="fPenaltyDate" column="f_penalty_date" />
<result property="fRemark" column="f_remark" />
<result property="fLastTime" column="f_last_time" />
</resultMap>
<sql id="selectTInsHazRefVo">
select f_ins_haz_ref_id, f_hazard_unique_code, f_hazard_out_unique_code, f_check_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_rectification_status, f_rectification_fund, f_completion_date, f_control_measure, f_before_picture, f_after_picture, f_is_enforcement, f_enforcement_type, f_penalty_amount, f_penalty_desc, f_penalty_date, f_remark, f_last_time from t_ins_haz_ref
</sql>
<select id="selectTInsHazRefList" parameterType="TInsHazRef" resultMap="TInsHazRefResult">
<include refid="selectTInsHazRefVo"/>
<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="fHazardTypeLevelId != null and fHazardTypeLevelId != ''"> and f_hazard_type_level_id = #{fHazardTypeLevelId}</if>
<if test="fRectificationStatus != null and fRectificationStatus != ''"> and f_rectification_status = #{fRectificationStatus}</if>
<if test="fIsEnforcement != null and fIsEnforcement != ''"> and f_is_enforcement = #{fIsEnforcement}</if>
<if test="fEnforcementType != null and fEnforcementType != ''"> and f_enforcement_type = #{fEnforcementType}</if>
</where>
</select>
<select id="selectTInsHazRefById" parameterType="Long" resultMap="TInsHazRefResult">
<include refid="selectTInsHazRefVo"/>
where f_ins_haz_ref_id = #{fInsHazRefId}
</select>
<insert id="insertTInsHazRef" parameterType="TInsHazRef" useGeneratedKeys="true" keyProperty="fInsHazRefId">
insert into t_ins_haz_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="fCheckCode != null and fCheckCode != ''">f_check_code,</if>
<if test="fInvolveEnterpriseCode != null">f_involve_enterprise_code,</if>
<if test="fObjType != null and fObjType != ''">f_obj_type,</if>
<if test="fObjCode != null and fObjCode != ''">f_obj_code,</if>
<if test="fObjBelongRegionId != null and fObjBelongRegionId != ''">f_obj_belong_region_id,</if>
<if test="fCheckTime != null and fCheckTime != ''">f_check_time,</if>
<if test="fHazardTypeLevelId != null and fHazardTypeLevelId != ''">f_hazard_type_level_id,</if>
<if test="fHazardDesc != null">f_hazard_desc,</if>
<if test="fRectificationStatus != null">f_rectification_status,</if>
<if test="fRectificationFund != null">f_rectification_fund,</if>
<if test="fCompletionDate != null">f_completion_date,</if>
<if test="fControlMeasure != null">f_control_measure,</if>
<if test="fBeforePicture != null">f_before_picture,</if>
<if test="fAfterPicture != null">f_after_picture,</if>
<if test="fIsEnforcement != null">f_is_enforcement,</if>
<if test="fEnforcementType != null">f_enforcement_type,</if>
<if test="fPenaltyAmount != null">f_penalty_amount,</if>
<if test="fPenaltyDesc != null">f_penalty_desc,</if>
<if test="fPenaltyDate != null">f_penalty_date,</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="fCheckCode != null and fCheckCode != ''">#{fCheckCode},</if>
<if test="fInvolveEnterpriseCode != null">#{fInvolveEnterpriseCode},</if>
<if test="fObjType != null and fObjType != ''">#{fObjType},</if>
<if test="fObjCode != null and fObjCode != ''">#{fObjCode},</if>
<if test="fObjBelongRegionId != null and fObjBelongRegionId != ''">#{fObjBelongRegionId},</if>
<if test="fCheckTime != null and fCheckTime != ''">#{fCheckTime},</if>
<if test="fHazardTypeLevelId != null and fHazardTypeLevelId != ''">#{fHazardTypeLevelId},</if>
<if test="fHazardDesc != null">#{fHazardDesc},</if>
<if test="fRectificationStatus != null">#{fRectificationStatus},</if>
<if test="fRectificationFund != null">#{fRectificationFund},</if>
<if test="fCompletionDate != null">#{fCompletionDate},</if>
<if test="fControlMeasure != null">#{fControlMeasure},</if>
<if test="fBeforePicture != null">#{fBeforePicture},</if>
<if test="fAfterPicture != null">#{fAfterPicture},</if>
<if test="fIsEnforcement != null">#{fIsEnforcement},</if>
<if test="fEnforcementType != null">#{fEnforcementType},</if>
<if test="fPenaltyAmount != null">#{fPenaltyAmount},</if>
<if test="fPenaltyDesc != null">#{fPenaltyDesc},</if>
<if test="fPenaltyDate != null">#{fPenaltyDate},</if>
<if test="fRemark != null">#{fRemark},</if>
<if test="fLastTime != null">#{fLastTime},</if>
</trim>
</insert>
<update id="updateTInsHazRef" parameterType="TInsHazRef">
update t_ins_haz_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="fCheckCode != null and fCheckCode != ''">f_check_code = #{fCheckCode},</if>
<if test="fInvolveEnterpriseCode != null">f_involve_enterprise_code = #{fInvolveEnterpriseCode},</if>
<if test="fObjType != null and fObjType != ''">f_obj_type = #{fObjType},</if>
<if test="fObjCode != null and fObjCode != ''">f_obj_code = #{fObjCode},</if>
<if test="fObjBelongRegionId != null and fObjBelongRegionId != ''">f_obj_belong_region_id = #{fObjBelongRegionId},</if>
<if test="fCheckTime != null and fCheckTime != ''">f_check_time = #{fCheckTime},</if>
<if test="fHazardTypeLevelId != null and fHazardTypeLevelId != ''">f_hazard_type_level_id = #{fHazardTypeLevelId},</if>
<if test="fHazardDesc != null">f_hazard_desc = #{fHazardDesc},</if>
<if test="fRectificationStatus != null">f_rectification_status = #{fRectificationStatus},</if>
<if test="fRectificationFund != null">f_rectification_fund = #{fRectificationFund},</if>
<if test="fCompletionDate != null">f_completion_date = #{fCompletionDate},</if>
<if test="fControlMeasure != null">f_control_measure = #{fControlMeasure},</if>
<if test="fBeforePicture != null">f_before_picture = #{fBeforePicture},</if>
<if test="fAfterPicture != null">f_after_picture = #{fAfterPicture},</if>
<if test="fIsEnforcement != null">f_is_enforcement = #{fIsEnforcement},</if>
<if test="fEnforcementType != null">f_enforcement_type = #{fEnforcementType},</if>
<if test="fPenaltyAmount != null">f_penalty_amount = #{fPenaltyAmount},</if>
<if test="fPenaltyDesc != null">f_penalty_desc = #{fPenaltyDesc},</if>
<if test="fPenaltyDate != null">f_penalty_date = #{fPenaltyDate},</if>
<if test="fRemark != null">f_remark = #{fRemark},</if>
<if test="fLastTime != null">f_last_time = #{fLastTime},</if>
</trim>
where f_ins_haz_ref_id = #{fInsHazRefId}
</update>
<delete id="deleteTInsHazRefById" parameterType="Long">
delete from t_ins_haz_ref where f_ins_haz_ref_id = #{fInsHazRefId}
</delete>
<delete id="deleteTInsHazRefByIds" parameterType="String">
delete from t_ins_haz_ref where f_ins_haz_ref_id in
<foreach item="fInsHazRefId" collection="array" open="(" separator="," close=")">
#{fInsHazRefId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -51,3 +51,12 @@ export function exportInfor(query) {
params: query
})
}
//所有检查记录
export function recordList(query) {
return request({
url: '/supervision/record/recordList',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询监督检查-监督检查发现隐患及整改,执法结果列表
export function listRef(query) {
return request({
url: '/supervision/rectification/list',
method: 'get',
params: query
})
}
// 查询监督检查-监督检查发现隐患及整改,执法结果详细
export function getRef(fInsHazRefId) {
return request({
url: '/supervision/rectification/' + fInsHazRefId,
method: 'get'
})
}
// 新增监督检查-监督检查发现隐患及整改,执法结果
export function addRef(data) {
return request({
url: '/supervision/rectification',
method: 'post',
data: data
})
}
// 修改监督检查-监督检查发现隐患及整改,执法结果
export function updateRef(data) {
return request({
url: '/supervision/rectification',
method: 'put',
data: data
})
}
// 删除监督检查-监督检查发现隐患及整改,执法结果
export function delRef(fInsHazRefId) {
return request({
url: '/supervision/rectification/' + fInsHazRefId,
method: 'delete'
})
}
// 导出监督检查-监督检查发现隐患及整改,执法结果
export function exportRef(query) {
return request({
url: '/supervision/rectification/export',
method: 'get',
params: query
})
}
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="150px">
<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.fCheckCode">{{ detailInfo.fCheckCode }}</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.fRectificationStatus">{{ $parent.fRectificationStatusFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改资金/万元">
<span v-if="detailInfo.fRectificationFund">{{ detailInfo.fRectificationFund }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改完成日期">
<span v-if="detailInfo.fCompletionDate">{{ detailInfo.fCompletionDate }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改或管控措施描述">
<span v-if="detailInfo.fControlMeasure">{{ detailInfo.fControlMeasure }}</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="隐患整改后照片">
<el-image
:src="detailInfo.fAfterPicture"
:preview-src-list="[detailInfo.fAfterPicture]"
v-if="detailInfo.fAfterPicture != '' && detailInfo.fAfterPicture != 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.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="处罚措施">
<span v-if="detailInfo.fEnforcementType">{{ $parent.fEnforcementTypeFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处罚金额/万元">
<span v-if="detailInfo.fPenaltyAmount">{{ detailInfo.fPenaltyAmount }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执法日期">
<span v-if="detailInfo.fPenaltyDate">{{ detailInfo.fPenaltyDate }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他执法情况说明">
<span v-if="detailInfo.fPenaltyDesc">{{ detailInfo.fPenaltyDesc }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="更新时间">
<span v-if="detailInfo.fLastTime">{{ detailInfo.fLastTime }}</span>
<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/rectification";
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>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="隐患唯一编码" prop="fHazardUniqueCode">
<el-input
v-model="queryParams.fHazardUniqueCode"
placeholder="请输入隐患唯一编码"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检查对象分类" prop="fObjType">
<el-select v-model="queryParams.fObjType" placeholder="请选择检查对象分类" clearable size="small">
<el-option
v-for="dict in fObjTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<!--<el-form-item label="隐患分类分级编码" prop="fHazardTypeLevelId">
<el-input
v-model="queryParams.fHazardTypeLevelId"
placeholder="请输入隐患分类分级编码"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="整改状态" prop="fRectificationStatus">
<el-select v-model="queryParams.fRectificationStatus" placeholder="请选择整改状态" clearable size="small">
<el-option
v-for="dict in fRectificationStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="是否执行" prop="fIsEnforcement">
<el-select v-model="queryParams.fIsEnforcement" placeholder="请选择是否执行" clearable size="small">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="处罚措施" prop="fEnforcementType">
<el-select v-model="queryParams.fEnforcementType" placeholder="请选择处罚措施" clearable size="small">
<el-option
v-for="dict in fEnforcementTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['supervision:rectification:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['supervision:rectification:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['supervision:rectification:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['supervision:rectification:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="refList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="隐患唯一编码" align="center" prop="fHazardUniqueCode" />
<el-table-column label="自有编号" align="center" prop="fHazardOutUniqueCode">
<template slot-scope="scope">
<span v-if="scope.row.fHazardOutUniqueCode">{{ scope.row.fHazardOutUniqueCode }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="检查记录编码" align="center" prop="fCheckCode" />
<el-table-column label="检查对象分类" align="center" prop="fObjType" :formatter="fObjTypeFormat" />
<el-table-column label="监督检查时间" align="center" prop="fCheckTime" />
<el-table-column label="整改状态" align="center" prop="fRectificationStatus">
<template slot-scope="scope">
<span v-if="scope.row.fRectificationStatus">{{ fRectificationStatusFormat(scope.row) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="整改资金/万元" align="center" prop="fRectificationFund">
<template slot-scope="scope">
<span v-if="scope.row.fRectificationFund">{{ scope.row.fRectificationFund }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="整改完成日期" align="center" prop="fCompletionDate">
<template slot-scope="scope">
<span v-if="scope.row.fCompletionDate">{{ scope.row.fCompletionDate }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="是否执行" align="center" prop="fIsEnforcement">
<template slot-scope="scope">
<span v-if="scope.row.fIsEnforcement == '1'"></span>
<span v-else-if="scope.row.fIsEnforcement == '0'"></span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="处罚措施" align="center" prop="fEnforcementType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.fEnforcementType">{{ fEnforcementTypeFormat(scope.row) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="执法日期" align="center" prop="fPenaltyDate">
<template slot-scope="scope">
<span v-if="scope.row.fPenaltyDate">{{ scope.row.fPenaltyDate }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleDetail(scope.row)"
v-hasPermi="['supervision:rectification:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['supervision:rectification:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['supervision:rectification:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改隐患及整改,执法结果,执法结果对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="隐患唯一编码" prop="fHazardUniqueCode">
<el-input v-model="form.fHazardUniqueCode" placeholder="请输入隐患唯一编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="自有编号" prop="fHazardOutUniqueCode">
<el-input v-model="form.fHazardOutUniqueCode" placeholder="请输入自有编号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查记录编码" prop="fCheckCode">
<el-select
v-model="form.fCheckCode"
placeholder="请选择检查记录编码"
style="width: 100%"
>
<el-option
v-for="dict in records"
:key="dict.fInsRecInforId"
:label="dict.fCheckTaskCode"
:value="dict.fCheckTaskCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="涉及供气企业编码" prop="fInvolveEnterpriseCode">
<el-input v-model="form.fInvolveEnterpriseCode" placeholder="请输入涉及供气企业编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查对象分类" prop="fObjType">
<el-select
v-model="form.fObjType"
placeholder="请选择检查对象分类"
style="width: 100%"
>
<el-option
v-for="dict in fObjTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="对象编码" prop="fObjCode">
<el-input v-model="form.fObjCode" placeholder="请输入对象编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行政区县级行政区ID" prop="fObjBelongRegionId">
<el-input v-model="form.fObjBelongRegionId" placeholder="请输入行政区县级行政区ID" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="监督检查时间" prop="fCheckTime">
<el-date-picker
style="width: 100%"
v-model="form.fCheckTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择监督检查时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患分类分级编码" prop="fHazardTypeLevelId">
<el-input v-model="form.fHazardTypeLevelId" placeholder="请输入隐患分类分级编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改状态" prop="fRectificationStatus">
<el-select
v-model="form.fRectificationStatus"
placeholder="请选择整改状态"
style="width: 100%"
>
<el-option
v-for="dict in fRectificationStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改资金/万元" prop="fRectificationFund">
<el-input type="number" v-model="form.fRectificationFund" placeholder="请输入整改资金" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改完成日期" prop="fCompletionDate">
<el-date-picker
style="width: 100%"
v-model="form.fCompletionDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择整改完成日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="整改或管控措施描述" prop="fControlMeasure">
<el-input type="textarea" v-model="form.fControlMeasure" placeholder="请输入整改或管控措施描述" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患整改前照片">
<imageUpload v-model="form.fBeforePicture"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患整改后照片">
<imageUpload v-model="form.fAfterPicture"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否执行" prop="fIsEnforcement">
<el-select
v-model="form.fIsEnforcement"
placeholder="请选择是否执行"
style="width: 100%"
>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处罚措施" prop="fEnforcementType">
<el-select
v-model="form.fEnforcementType"
placeholder="请选择处罚措施"
style="width: 100%"
>
<el-option
v-for="dict in fEnforcementTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处罚金额/万元" prop="fPenaltyAmount">
<el-input type="number" v-model="form.fPenaltyAmount" placeholder="请输入处罚金额/万元" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执法日期" prop="fPenaltyDate">
<el-date-picker
style="width: 100%"
v-model="form.fPenaltyDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择执法日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="其他执法情况说明" prop="fPenaltyDesc">
<el-input type="textarea" v-model="form.fPenaltyDesc" placeholder="请输入其他执法情况说明" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="fRemark">
<el-input type="textarea" v-model="form.fRemark" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 详情 -->
<DetailInfo ref="detail"/>
</div>
</template>
<script>
import { listRef, getRef, delRef, addRef, updateRef, exportRef } from "@/api/supervision/rectification";
import ImageUpload from '@/components/ImageUpload';
import { recordList } from "@/api/supervision/record";
import DetailInfo from "./components/DetailInfo";
export default {
name: "Ref",
components: {
ImageUpload,
DetailInfo
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 隐患及整改,执法结果,执法结果表格数据
refList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 检查对象分类,按分类代码表23 分类填写
fObjTypeOptions: [],
// 0-未整改,1-已整改,2-已管控,3-部分整改字典
fRectificationStatusOptions: [],
//处罚措施
fEnforcementTypeOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fHazardUniqueCode: null,
fObjType: null,
fHazardTypeLevelId: null,
fRectificationStatus: null,
fIsEnforcement: null,
fEnforcementType: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
fHazardUniqueCode:[
{ required: true, message: "隐患唯一编码不能为空", trigger: "blur" }
],
fCheckCode: [
{ required: true, message: "请选择检查记录编码", trigger: "change" }
],
fObjType: [
{ required: true, message: "检查对象分类不能为空", trigger: "change" }
],
fObjCode: [
{ required: true, message: "对象编码不能为空", trigger: "blur" }
],
fObjBelongRegionId: [
{ required: true, message: "对象所在行政区,县级行政区ID不能为空", trigger: "blur" }
],
fCheckTime: [
{ required: true, message: "监督检查时间不能为空", trigger: "blur" }
],
fHazardTypeLevelId: [
{ required: true, message: "隐患分类分级编码不能为空", trigger: "blur" }
],
},
records: []
};
},
created() {
this.getList();
this.getDicts("t_type_code").then(response => {
this.fObjTypeOptions = response.data;
});
this.getDicts("t_rectification_status").then(response => {
this.fRectificationStatusOptions = response.data;
});
this.getDicts("t_enforcement_type").then(response => {
this.fEnforcementTypeOptions = response.data;
});
},
methods: {
/** 查询隐患及整改,执法结果,执法结果列表 */
getList() {
this.loading = true;
listRef(this.queryParams).then(response => {
this.refList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 检查对象分类
fObjTypeFormat(row, column) {
return this.selectDictLabel(this.fObjTypeOptions, row.fObjType);
},
// 整改状态
fRectificationStatusFormat(row, column) {
return this.selectDictLabel(this.fRectificationStatusOptions, row.fRectificationStatus);
},
// 处罚措施
fEnforcementTypeFormat(row, column) {
return this.selectDictLabel(this.fEnforcementTypeOptions, row.fEnforcementType);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
fInsHazRefId: null,
fHazardUniqueCode: null,
fHazardOutUniqueCode: null,
fCheckCode: null,
fInvolveEnterpriseCode: null,
fObjType: null,
fObjCode: null,
fObjBelongRegionId: null,
fCheckTime: null,
fHazardTypeLevelId: null,
fHazardDesc: null,
fRectificationStatus: null,
fRectificationFund: null,
fCompletionDate: null,
fControlMeasure: null,
fBeforePicture: null,
fAfterPicture: null,
fIsEnforcement: null,
fEnforcementType: null,
fPenaltyAmount: null,
fPenaltyDesc: null,
fPenaltyDate: null,
fRemark: null,
fLastTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fInsHazRefId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.getRecordList();
this.open = true;
this.title = "添加隐患及整改,执法结果,执法结果";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const fInsHazRefId = row.fInsHazRefId || this.ids
getRef(fInsHazRefId).then(response => {
this.form = response.data;
this.getRecordList();
this.open = true;
this.title = "修改隐患及整改,执法结果,执法结果";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.fInsHazRefId != null) {
updateRef(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRef(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fInsHazRefIds = row.fInsHazRefId || this.ids;
this.$confirm('是否确认删除隐患及整改,执法结果,执法结果编号为"' + fInsHazRefIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delRef(fInsHazRefIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有隐患及整改,执法结果,执法结果数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportRef(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
getRecordList(){
recordList().then(res =>{
if(res.code == 200 && res.data){
this.records = res.data;
}
})
},
//详情
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fInsHazRefId);
},
}
};
</script>
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