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

安检记录

parent f41cd490
package com.zehong.web.controller.lpgRegulation;
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.TLpgSafeCheckRecord;
import com.zehong.system.service.ITLpgSafeCheckRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 液化石油安检记录Controller
*
* @author zehong
* @date 2024-07-22
*/
@RestController
@RequestMapping("/lpg/check")
public class TLpgSafeCheckRecordController extends BaseController
{
@Autowired
private ITLpgSafeCheckRecordService tLpgSafeCheckRecordService;
/**
* 查询液化石油安检记录列表
*/
@GetMapping("/list")
public TableDataInfo list(TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
startPage();
List<TLpgSafeCheckRecord> list = tLpgSafeCheckRecordService.selectTLpgSafeCheckRecordList(tLpgSafeCheckRecord);
return getDataTable(list);
}
/**
* 导出液化石油安检记录列表
*/
@Log(title = "液化石油安检记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
List<TLpgSafeCheckRecord> list = tLpgSafeCheckRecordService.selectTLpgSafeCheckRecordList(tLpgSafeCheckRecord);
ExcelUtil<TLpgSafeCheckRecord> util = new ExcelUtil<TLpgSafeCheckRecord>(TLpgSafeCheckRecord.class);
return util.exportExcel(list, "液化石油安检记录数据");
}
/**
* 获取液化石油安检记录详细信息
*/
@GetMapping(value = "/{safeCheckId}")
public AjaxResult getInfo(@PathVariable("safeCheckId") Long safeCheckId)
{
return AjaxResult.success(tLpgSafeCheckRecordService.selectTLpgSafeCheckRecordById(safeCheckId));
}
/**
* 新增液化石油安检记录
*/
@Log(title = "液化石油安检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
return toAjax(tLpgSafeCheckRecordService.insertTLpgSafeCheckRecord(tLpgSafeCheckRecord));
}
/**
* 修改液化石油安检记录
*/
@Log(title = "液化石油安检记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
return toAjax(tLpgSafeCheckRecordService.updateTLpgSafeCheckRecord(tLpgSafeCheckRecord));
}
/**
* 删除液化石油安检记录
*/
@Log(title = "液化石油安检记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{safeCheckIds}")
public AjaxResult remove(@PathVariable Long[] safeCheckIds)
{
return toAjax(tLpgSafeCheckRecordService.deleteTLpgSafeCheckRecordByIds(safeCheckIds));
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TLpgSafeCheckRecord;
/**
* 液化石油安检记录Mapper接口
*
* @author zehong
* @date 2024-07-22
*/
public interface TLpgSafeCheckRecordMapper
{
/**
* 查询液化石油安检记录
*
* @param safeCheckId 液化石油安检记录ID
* @return 液化石油安检记录
*/
public TLpgSafeCheckRecord selectTLpgSafeCheckRecordById(Long safeCheckId);
/**
* 查询液化石油安检记录列表
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 液化石油安检记录集合
*/
public List<TLpgSafeCheckRecord> selectTLpgSafeCheckRecordList(TLpgSafeCheckRecord tLpgSafeCheckRecord);
/**
* 新增液化石油安检记录
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 结果
*/
public int insertTLpgSafeCheckRecord(TLpgSafeCheckRecord tLpgSafeCheckRecord);
/**
* 修改液化石油安检记录
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 结果
*/
public int updateTLpgSafeCheckRecord(TLpgSafeCheckRecord tLpgSafeCheckRecord);
/**
* 删除液化石油安检记录
*
* @param safeCheckId 液化石油安检记录ID
* @return 结果
*/
public int deleteTLpgSafeCheckRecordById(Long safeCheckId);
/**
* 批量删除液化石油安检记录
*
* @param safeCheckIds 需要删除的数据ID
* @return 结果
*/
public int deleteTLpgSafeCheckRecordByIds(Long[] safeCheckIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TLpgSafeCheckRecord;
/**
* 液化石油安检记录Service接口
*
* @author zehong
* @date 2024-07-22
*/
public interface ITLpgSafeCheckRecordService
{
/**
* 查询液化石油安检记录
*
* @param safeCheckId 液化石油安检记录ID
* @return 液化石油安检记录
*/
public TLpgSafeCheckRecord selectTLpgSafeCheckRecordById(Long safeCheckId);
/**
* 查询液化石油安检记录列表
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 液化石油安检记录集合
*/
public List<TLpgSafeCheckRecord> selectTLpgSafeCheckRecordList(TLpgSafeCheckRecord tLpgSafeCheckRecord);
/**
* 新增液化石油安检记录
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 结果
*/
public int insertTLpgSafeCheckRecord(TLpgSafeCheckRecord tLpgSafeCheckRecord);
/**
* 修改液化石油安检记录
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 结果
*/
public int updateTLpgSafeCheckRecord(TLpgSafeCheckRecord tLpgSafeCheckRecord);
/**
* 批量删除液化石油安检记录
*
* @param safeCheckIds 需要删除的液化石油安检记录ID
* @return 结果
*/
public int deleteTLpgSafeCheckRecordByIds(Long[] safeCheckIds);
/**
* 删除液化石油安检记录信息
*
* @param safeCheckId 液化石油安检记录ID
* @return 结果
*/
public int deleteTLpgSafeCheckRecordById(Long safeCheckId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TLpgSafeCheckRecordMapper;
import com.zehong.system.domain.TLpgSafeCheckRecord;
import com.zehong.system.service.ITLpgSafeCheckRecordService;
/**
* 液化石油安检记录Service业务层处理
*
* @author zehong
* @date 2024-07-22
*/
@Service
public class TLpgSafeCheckRecordServiceImpl implements ITLpgSafeCheckRecordService
{
@Autowired
private TLpgSafeCheckRecordMapper tLpgSafeCheckRecordMapper;
/**
* 查询液化石油安检记录
*
* @param safeCheckId 液化石油安检记录ID
* @return 液化石油安检记录
*/
@Override
public TLpgSafeCheckRecord selectTLpgSafeCheckRecordById(Long safeCheckId)
{
return tLpgSafeCheckRecordMapper.selectTLpgSafeCheckRecordById(safeCheckId);
}
/**
* 查询液化石油安检记录列表
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 液化石油安检记录
*/
@Override
public List<TLpgSafeCheckRecord> selectTLpgSafeCheckRecordList(TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
return tLpgSafeCheckRecordMapper.selectTLpgSafeCheckRecordList(tLpgSafeCheckRecord);
}
/**
* 新增液化石油安检记录
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 结果
*/
@Override
public int insertTLpgSafeCheckRecord(TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
tLpgSafeCheckRecord.setCreateTime(DateUtils.getNowDate());
return tLpgSafeCheckRecordMapper.insertTLpgSafeCheckRecord(tLpgSafeCheckRecord);
}
/**
* 修改液化石油安检记录
*
* @param tLpgSafeCheckRecord 液化石油安检记录
* @return 结果
*/
@Override
public int updateTLpgSafeCheckRecord(TLpgSafeCheckRecord tLpgSafeCheckRecord)
{
tLpgSafeCheckRecord.setUpdateTime(DateUtils.getNowDate());
return tLpgSafeCheckRecordMapper.updateTLpgSafeCheckRecord(tLpgSafeCheckRecord);
}
/**
* 批量删除液化石油安检记录
*
* @param safeCheckIds 需要删除的液化石油安检记录ID
* @return 结果
*/
@Override
public int deleteTLpgSafeCheckRecordByIds(Long[] safeCheckIds)
{
return tLpgSafeCheckRecordMapper.deleteTLpgSafeCheckRecordByIds(safeCheckIds);
}
/**
* 删除液化石油安检记录信息
*
* @param safeCheckId 液化石油安检记录ID
* @return 结果
*/
@Override
public int deleteTLpgSafeCheckRecordById(Long safeCheckId)
{
return tLpgSafeCheckRecordMapper.deleteTLpgSafeCheckRecordById(safeCheckId);
}
}
import request from '@/utils/request'
// 查询液化石油安检记录列表
export function listRecord(query) {
return request({
url: '/lpg/check/list',
method: 'get',
params: query
})
}
// 查询液化石油安检记录详细
export function getRecord(safeCheckId) {
return request({
url: '/lpg/check/' + safeCheckId,
method: 'get'
})
}
// 新增液化石油安检记录
export function addRecord(data) {
return request({
url: '/lpg/check',
method: 'post',
data: data
})
}
// 修改液化石油安检记录
export function updateRecord(data) {
return request({
url: '/lpg/check',
method: 'put',
data: data
})
}
// 删除液化石油安检记录
export function delRecord(safeCheckId) {
return request({
url: '/lpg/check/' + safeCheckId,
method: 'delete'
})
}
// 导出液化石油安检记录
export function exportRecord(query) {
return request({
url: '/lpg/check/export',
method: 'get',
params: query
})
}
<template>
<el-dialog title="安检记录详情" :visible.sync="detailOpen" width="900px" append-to-body>
<el-form label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="储配站">
<span>{{ detailInfo.stationName}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户名称">
<span>{{ detailInfo.gasUser}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="用户类型">
<span v-if="detailInfo.gasUserType == '0'">居民</span>
<span v-if="detailInfo.gasUserType == '1'">非居民</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式">
<span>{{ detailInfo.telNum}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="安检时间">
<span>{{ detailInfo.safeCheckDate}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="安检人">
<span>{{ detailInfo.safeCheckPerson}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="入户状态">
<span v-if="detailInfo.checkInStatus == '0'">正常入户</span>
<span v-if="detailInfo.checkInStatus == '1'">拒绝安检</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户地址">
<span>{{ detailInfo.gasUserAddress}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-if="detailInfo.stoveCheckStatus">
<el-form-item label="燃气灶具检查情况">
<div v-if="detailInfo.stoveCheckStatus == '0'">合格</div>
<div v-if="detailInfo.stoveCheckStatus == '1'">无3C认证</div>
<div v-if="detailInfo.stoveCheckStatus == '2'">无熄火保护装置</div>
<el-image v-if="detailInfo.stoveCheckPic" :src="detailInfo.stoveCheckPic" :preview-src-list="[detailInfo.stoveCheckPic]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="连接软管检查情况" v-if="detailInfo.hoseCheckStatus">
<div v-if="detailInfo.hoseCheckStatus == '0'">合格</div>
<div v-if="detailInfo.hoseCheckStatus == '1'">普通橡胶软管</div>
<div v-if="detailInfo.hoseCheckStatus == '2'">三通连接软管</div>
<div v-if="detailInfo.hoseCheckStatus == '3'">长度超过两米且未使用硬质钢管链接</div>
<div v-if="detailInfo.hoseCheckStatus == '4'">穿越墙体、门窗顶棚和地面</div>
<el-image v-if="detailInfo.hoseCheckPic" :src="detailInfo.hoseCheckPic" :preview-src-list="[detailInfo.hoseCheckPic]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-if="detailInfo.valveCheckStatus">
<el-form-item label="减压阀检查情况">
<div v-if="detailInfo.valveCheckStatus == '0'">合格</div>
<div v-if="detailInfo.valveCheckStatus == '1'">可调节</div>
<div v-if="detailInfo.valveCheckStatus == '2'">五自闭功能</div>
<el-image v-if="detailInfo.valveCheckPic" :src="detailInfo.valveCheckPic" :preview-src-list="[detailInfo.valveCheckPic]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailInfo.bottleCheckStatus">
<el-form-item label="液化气钢瓶检查情况">
<div v-if="detailInfo.bottleCheckStatus == '0'">合格</div>
<div v-if="detailInfo.bottleCheckStatus == '1'">部分有码且可追溯</div>
<div v-if="detailInfo.bottleCheckStatus == '2'">有码但不可追溯</div>
<div v-if="detailInfo.bottleCheckStatus == '3'">钢瓶无码</div>
<el-image v-if="detailInfo.bottleCheckPic" :src="detailInfo.bottleCheckPic" :preview-src-list="[detailInfo.bottleCheckPic]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-if="detailInfo.alarmCheckStatus">
<el-form-item label="报警器加电磁切断阀检查情况">
<div v-if="detailInfo.alarmCheckStatus == '0'">合格</div>
<div v-if="detailInfo.alarmCheckStatus == '1'">有但未使用</div>
<div v-if="detailInfo.alarmCheckStatus == '2'">有但未实现联动</div>
<div v-if="detailInfo.alarmCheckStatus == '3'"></div>
<div v-if="detailInfo.alarmCheckStatus == '4'">非液化气专用报警器</div>
<div v-if="detailInfo.alarmCheckStatus == '5'">安装位置大于0.3米</div>
<el-image v-if="detailInfo.alarmCheckPic" :src="detailInfo.alarmCheckPic" :preview-src-list="[detailInfo.alarmCheckPic]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailInfo.placeCheckStatus">
<el-form-item label="液化气钢瓶检查情况">
<div v-if="detailInfo.placeCheckStatus == '0'">合格</div>
<div v-if="detailInfo.placeCheckStatus == '1'">高层建筑(裙房)</div>
<div v-if="detailInfo.placeCheckStatus == '2'">地下(半地下)室 </div>
<div v-if="detailInfo.placeCheckStatus == '3'">车库或半地下车库 </div>
<div v-if="detailInfo.placeCheckStatus == '4'">通风不良的场所 5.50公斤钢瓶超过两只或15公斤钢瓶超过七只未设置独立的气瓶间 </div>
<el-image v-if="detailInfo.placeCheckPic" :src="detailInfo.placeCheckPic" :preview-src-list="[detailInfo.placeCheckPic]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-if="detailInfo.checkPersonSign">
<el-form-item label="安检人员签名">
<el-image v-if="detailInfo.checkPersonSign" :src="detailInfo.checkPersonSign" :preview-src-list="[detailInfo.checkPersonSign]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailInfo.gasUserSign">
<el-form-item label="用户签字">
<el-image v-if="detailInfo.gasUserSign" :src="detailInfo.gasUserSign" :preview-src-list="[detailInfo.gasUserSign]" :z-index="9999" style="width: 230px;height: 170px;"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import { getRecord } from "@/api/lpgRegulation/check";
export default {
name: "index",
data(){
return{
detailOpen: false,
detailInfo: {}
}
},
methods:{
getDetailInfo(id){
getRecord(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped lang="scss">
.detailInfo{
height: 350px;
overflow-y: auto;
&::-webkit-scrollbar {
/* 设置滚动条宽度 */
width: 4px;
/* 设置滚动条背景色 */
//background: black;
}
//滚动条轨道
&::-webkit-scrollbar-track {
background-color:transparent;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius:2em;
}
//滚动条滑块
&::-webkit-scrollbar-thumb {
background-color: rgb(147,147,153,0.5);
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius:2em;
}
}
</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