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.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);
}
}
......@@ -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>
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