Commit 64e242fa authored by 耿迪迪's avatar 耿迪迪

隐患分类标准

parent d2f07a1e
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.TInsStaInfor;
import com.zehong.system.service.ITInsStaInforService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 监督检查-隐患分类分级标准Controller
*
* @author zehong
* @date 2024-05-17
*/
@RestController
@RequestMapping("/supervision/hideType")
public class TInsStaInforController extends BaseController
{
@Autowired
private ITInsStaInforService tInsStaInforService;
/**
* 查询监督检查-隐患分类分级标准列表
*/
@PreAuthorize("@ss.hasPermi('supervision:hideType:list')")
@GetMapping("/list")
public TableDataInfo list(TInsStaInfor tInsStaInfor)
{
startPage();
List<TInsStaInfor> list = tInsStaInforService.selectTInsStaInforList(tInsStaInfor);
return getDataTable(list);
}
/**
* 导出监督检查-隐患分类分级标准列表
*/
@PreAuthorize("@ss.hasPermi('supervision:hideType:export')")
@Log(title = "监督检查-隐患分类分级标准", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInsStaInfor tInsStaInfor)
{
List<TInsStaInfor> list = tInsStaInforService.selectTInsStaInforList(tInsStaInfor);
ExcelUtil<TInsStaInfor> util = new ExcelUtil<TInsStaInfor>(TInsStaInfor.class);
return util.exportExcel(list, "监督检查-隐患分类分级标准数据");
}
/**
* 获取监督检查-隐患分类分级标准详细信息
*/
@PreAuthorize("@ss.hasPermi('supervision:hideType:query')")
@GetMapping(value = "/{fInsStaInforId}")
public AjaxResult getInfo(@PathVariable("fInsStaInforId") Long fInsStaInforId)
{
return AjaxResult.success(tInsStaInforService.selectTInsStaInforById(fInsStaInforId));
}
/**
* 新增监督检查-隐患分类分级标准
*/
@PreAuthorize("@ss.hasPermi('supervision:hideType:add')")
@Log(title = "监督检查-隐患分类分级标准", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInsStaInfor tInsStaInfor)
{
return toAjax(tInsStaInforService.insertTInsStaInfor(tInsStaInfor));
}
/**
* 修改监督检查-隐患分类分级标准
*/
@PreAuthorize("@ss.hasPermi('supervision:hideType:edit')")
@Log(title = "监督检查-隐患分类分级标准", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInsStaInfor tInsStaInfor)
{
return toAjax(tInsStaInforService.updateTInsStaInfor(tInsStaInfor));
}
/**
* 删除监督检查-隐患分类分级标准
*/
@PreAuthorize("@ss.hasPermi('supervision:hideType:remove')")
@Log(title = "监督检查-隐患分类分级标准", businessType = BusinessType.DELETE)
@DeleteMapping("/{fInsStaInforIds}")
public AjaxResult remove(@PathVariable Long[] fInsStaInforIds)
{
return toAjax(tInsStaInforService.deleteTInsStaInforByIds(fInsStaInforIds));
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInsStaInfor;
/**
* 监督检查-隐患分类分级标准Mapper接口
*
* @author zehong
* @date 2024-05-17
*/
public interface TInsStaInforMapper
{
/**
* 查询监督检查-隐患分类分级标准
*
* @param fInsStaInforId 监督检查-隐患分类分级标准ID
* @return 监督检查-隐患分类分级标准
*/
public TInsStaInfor selectTInsStaInforById(Long fInsStaInforId);
/**
* 查询监督检查-隐患分类分级标准列表
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 监督检查-隐患分类分级标准集合
*/
public List<TInsStaInfor> selectTInsStaInforList(TInsStaInfor tInsStaInfor);
/**
* 新增监督检查-隐患分类分级标准
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 结果
*/
public int insertTInsStaInfor(TInsStaInfor tInsStaInfor);
/**
* 修改监督检查-隐患分类分级标准
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 结果
*/
public int updateTInsStaInfor(TInsStaInfor tInsStaInfor);
/**
* 删除监督检查-隐患分类分级标准
*
* @param fInsStaInforId 监督检查-隐患分类分级标准ID
* @return 结果
*/
public int deleteTInsStaInforById(Long fInsStaInforId);
/**
* 批量删除监督检查-隐患分类分级标准
*
* @param fInsStaInforIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInsStaInforByIds(Long[] fInsStaInforIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInsStaInfor;
/**
* 监督检查-隐患分类分级标准Service接口
*
* @author zehong
* @date 2024-05-17
*/
public interface ITInsStaInforService
{
/**
* 查询监督检查-隐患分类分级标准
*
* @param fInsStaInforId 监督检查-隐患分类分级标准ID
* @return 监督检查-隐患分类分级标准
*/
public TInsStaInfor selectTInsStaInforById(Long fInsStaInforId);
/**
* 查询监督检查-隐患分类分级标准列表
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 监督检查-隐患分类分级标准集合
*/
public List<TInsStaInfor> selectTInsStaInforList(TInsStaInfor tInsStaInfor);
/**
* 新增监督检查-隐患分类分级标准
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 结果
*/
public int insertTInsStaInfor(TInsStaInfor tInsStaInfor);
/**
* 修改监督检查-隐患分类分级标准
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 结果
*/
public int updateTInsStaInfor(TInsStaInfor tInsStaInfor);
/**
* 批量删除监督检查-隐患分类分级标准
*
* @param fInsStaInforIds 需要删除的监督检查-隐患分类分级标准ID
* @return 结果
*/
public int deleteTInsStaInforByIds(Long[] fInsStaInforIds);
/**
* 删除监督检查-隐患分类分级标准信息
*
* @param fInsStaInforId 监督检查-隐患分类分级标准ID
* @return 结果
*/
public int deleteTInsStaInforById(Long fInsStaInforId);
}
package com.zehong.system.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsStaInforMapper;
import com.zehong.system.domain.TInsStaInfor;
import com.zehong.system.service.ITInsStaInforService;
/**
* 监督检查-隐患分类分级标准Service业务层处理
*
* @author zehong
* @date 2024-05-17
*/
@Service
public class TInsStaInforServiceImpl implements ITInsStaInforService
{
@Autowired
private TInsStaInforMapper tInsStaInforMapper;
/**
* 查询监督检查-隐患分类分级标准
*
* @param fInsStaInforId 监督检查-隐患分类分级标准ID
* @return 监督检查-隐患分类分级标准
*/
@Override
public TInsStaInfor selectTInsStaInforById(Long fInsStaInforId)
{
return tInsStaInforMapper.selectTInsStaInforById(fInsStaInforId);
}
/**
* 查询监督检查-隐患分类分级标准列表
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 监督检查-隐患分类分级标准
*/
@Override
public List<TInsStaInfor> selectTInsStaInforList(TInsStaInfor tInsStaInfor)
{
return tInsStaInforMapper.selectTInsStaInforList(tInsStaInfor);
}
/**
* 新增监督检查-隐患分类分级标准
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 结果
*/
@Override
public int insertTInsStaInfor(TInsStaInfor tInsStaInfor)
{
tInsStaInfor.setfCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
tInsStaInfor.setfCreateBy(SecurityUtils.getUsername());
return tInsStaInforMapper.insertTInsStaInfor(tInsStaInfor);
}
/**
* 修改监督检查-隐患分类分级标准
*
* @param tInsStaInfor 监督检查-隐患分类分级标准
* @return 结果
*/
@Override
public int updateTInsStaInfor(TInsStaInfor tInsStaInfor)
{
tInsStaInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
tInsStaInfor.setfUpdateBy(SecurityUtils.getUsername());
return tInsStaInforMapper.updateTInsStaInfor(tInsStaInfor);
}
/**
* 批量删除监督检查-隐患分类分级标准
*
* @param fInsStaInforIds 需要删除的监督检查-隐患分类分级标准ID
* @return 结果
*/
@Override
public int deleteTInsStaInforByIds(Long[] fInsStaInforIds)
{
return tInsStaInforMapper.deleteTInsStaInforByIds(fInsStaInforIds);
}
/**
* 删除监督检查-隐患分类分级标准信息
*
* @param fInsStaInforId 监督检查-隐患分类分级标准ID
* @return 结果
*/
@Override
public int deleteTInsStaInforById(Long fInsStaInforId)
{
return tInsStaInforMapper.deleteTInsStaInforById(fInsStaInforId);
}
}
import request from '@/utils/request'
// 查询监督检查-隐患分类分级标准列表
export function listInfor(query) {
return request({
url: '/supervision/hideType/list',
method: 'get',
params: query
})
}
// 查询监督检查-隐患分类分级标准详细
export function getInfor(fInsStaInforId) {
return request({
url: '/supervision/hideType/' + fInsStaInforId,
method: 'get'
})
}
// 新增监督检查-隐患分类分级标准
export function addInfor(data) {
return request({
url: '/supervision/hideType',
method: 'post',
data: data
})
}
// 修改监督检查-隐患分类分级标准
export function updateInfor(data) {
return request({
url: '/supervision/hideType',
method: 'put',
data: data
})
}
// 删除监督检查-隐患分类分级标准
export function delInfor(fInsStaInforId) {
return request({
url: '/supervision/hideType/' + fInsStaInforId,
method: 'delete'
})
}
// 导出监督检查-隐患分类分级标准
export function exportInfor(query) {
return request({
url: '/supervision/hideType/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="120px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="隐患名称">
<span v-if="detailInfo.fHazardName">{{ detailInfo.fHazardName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患编码">
<span v-if="detailInfo.fHazardCode">{{ detailInfo.fHazardCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患描述">
<span v-if="detailInfo.fHazardDescribe">{{ detailInfo.fHazardDescribe }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="对象分类">
<span v-if="detailInfo.fObjectType">{{ detailInfo.fObjectType }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患类别">
<span v-if="detailInfo.fHazardCategory">{{ $parent.fHazardCategoryFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患环节/部位">
<span v-if="detailInfo.fHazardLink">{{ detailInfo.fHazardLink }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患等级">
<span v-if="detailInfo.fHazardLevel">{{ detailInfo.fHazardLevel }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患定义来源">
<span v-if="detailInfo.fHazardDefinitionSourceCode">{{ detailInfo.fHazardDefinitionSourceCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改责任归属">
<span v-if="detailInfo.fOwnerResponse">{{ detailInfo.fOwnerResponse }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主管部门关联">
<span v-if="detailInfo.fAdministrativeSysOrganizationId">{{ detailInfo.fAdministrativeSysOrganizationId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主管部门名称">
<span v-if="detailInfo.fAdministrativeDepartmentName">{{ detailInfo.fAdministrativeDepartmentName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否强制执法">
<span v-if="detailInfo.fIsEnforcement">{{ $parent.fIsEnforcementFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执法部门id">
<span v-if="detailInfo.fEnforcementSysOrganizationId">{{ detailInfo.fEnforcementSysOrganizationId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执法部门名称">
<span v-if="detailInfo.fEnforcementDepartmentName">{{ detailInfo.fEnforcementDepartmentName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改监督部门">
<span v-if="detailInfo.fSupervisionSysOrganizationId">{{ detailInfo.fSupervisionSysOrganizationId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改部门名称">
<span v-if="detailInfo.fSupervisionDepartmentName">{{ detailInfo.fSupervisionDepartmentName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改要求">
<span v-if="detailInfo.fRectRequire">{{ detailInfo.fRectRequire }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改期限">
<span v-if="detailInfo.fRectDeadline">{{ detailInfo.fRectDeadline }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患排查依据">
<span v-if="detailInfo.fHazardCheckBasis">{{ detailInfo.fHazardCheckBasis }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查项ID">
<span v-if="detailInfo.fCheckItemId">{{ detailInfo.fCheckItemId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查部门">
<span v-if="detailInfo.fCheckDept">{{ detailInfo.fCheckDept }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查方法">
<span v-if="detailInfo.fCheckMethod">{{ detailInfo.fCheckMethod }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执法参考依据">
<span v-if="detailInfo.fEnforcementAccording">{{ detailInfo.fEnforcementAccording }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="删除标记">
<span v-if="detailInfo.fDeleteFlag.toString()">{{ $parent.fDeleteFlagFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间">
<span v-if="detailInfo.fCreateTime">{{ detailInfo.fCreateTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建人">
<span v-if="detailInfo.fCreateBy">{{ detailInfo.fCreateBy }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="修改时间">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="修改人">
<span v-if="detailInfo.fModifyBy">{{ detailInfo.fModifyBy }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import { getInfor } from "@/api/supervision/hideType";
export default {
name: "detail-info",
data(){
return{
detailInfo: {},
detailOpen: false
}
},
methods:{
getDetailInfo(id){
getInfor(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -36,7 +36,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8905/gassafety`,
target: `http://27.128.233.145:8905/gassafety`,
target: `http://localhost:8905/gassafety`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
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