Memory_LG 1 год назад
Родитель
Сommit
e9e1328ff5

+ 44 - 0
data-ui/src/api/data/housingconstruction/storagetank.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询储罐存储数据列表
+export function listStoragetank(query) {
+  return request({
+    url: '/sooka-sponest-center-data/storagetank/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询储罐存储数据详细
+export function getStoragetank(id) {
+  return request({
+    url: '/sooka-sponest-center-data/storagetank/' + id,
+    method: 'get'
+  })
+}
+
+// 新增储罐存储数据
+export function addStoragetank(data) {
+  return request({
+    url: '/sooka-sponest-center-data/storagetank',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改储罐存储数据
+export function updateStoragetank(data) {
+  return request({
+    url: '/sooka-sponest-center-data/storagetank',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除储罐存储数据
+export function delStoragetank(id) {
+  return request({
+    url: '/sooka-sponest-center-data/storagetank/' + id,
+    method: 'delete'
+  })
+}

+ 473 - 0
data-ui/src/views/data/housingconstruction/storagetank/index.vue

@@ -0,0 +1,473 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="储罐名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入储罐名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="所属企业" prop="enterpriseId">
+        <el-select v-model="queryParams.enterpriseId" placeholder="请选择所属企业">
+          <el-option
+            v-for="data in enterpriseList"
+            :key="data.id"
+            :label="data.enterpriseName"
+            :value="data.id"
+          ></el-option>
+        </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="['Housingconstruction:storagetank: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="['Housingconstruction:storagetank: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="['Housingconstruction:storagetank:remove']"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['Housingconstruction:storagetank:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="storagetankList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="储罐名称" align="center" prop="name"/>
+      <el-table-column label="所属企业" align="center" prop="enterpriseName"/>
+      <!-- 存储量列 -->
+      <el-table-column
+        label="存储量"
+        align="center"
+        prop="storageCapacity"
+        :formatter="formatStorageCapacity"
+      />
+
+      <!-- 液体液位上限列 -->
+      <el-table-column
+        label="液体液位上限"
+        align="center"
+        prop="levelCeiling"
+        :formatter="formatLevelCeiling"
+      />
+
+      <!-- 液体液位下限列 -->
+      <el-table-column
+        label="液体液位下限"
+        align="center"
+        prop="levelFloor"
+        :formatter="formatLevelFloor"
+      />
+
+      <!-- 温度列 -->
+      <el-table-column
+        label="温度"
+        align="center"
+        prop="heat"
+        :formatter="formatHeat"
+      />
+
+      <!-- 内部气压列 -->
+      <el-table-column
+        label="内部气压"
+        align="center"
+        prop="pressure"
+        :formatter="formatPressure"
+      />
+      <el-table-column label="周边可燃性气体泄漏" align="center" prop="gasLeak"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['Housingconstruction:storagetank:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['Housingconstruction:storagetank: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="1000px" append-to-body class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="所属企业" prop="enterpriseId">
+              <el-select v-model="form.enterpriseId" placeholder="请选择所属企业" @change="handleEnterpriseChange">
+                <el-option
+                  v-for="data in enterpriseList"
+                  :key="data.id"
+                  :label="data.enterpriseName"
+                  :value="data.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="储罐名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入储罐名称"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="存储量" prop="storageCapacity">
+              <el-input v-model="form.storageCapacity" placeholder="请输入存储量(单位为: t)"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="温度" prop="heat">
+              <el-input v-model="form.heat" placeholder="请输入温度(单位为: ℃)"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="液体液位上限" prop="levelCeiling">
+              <el-input v-model="form.levelCeiling" placeholder="请输入液体液位上限(单位为: L)"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="液体液位下限" prop="levelFloor">
+              <el-input v-model="form.levelFloor" placeholder="请输入液体液位下限(单位为: L)"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="内部气压" prop="pressure">
+              <el-input v-model="form.pressure" placeholder="请输入内部气压(单位为: Pa)"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="周边可燃性气体泄漏" prop="gasLeak">
+              <el-input v-model="form.gasLeak" placeholder="请输入周边可燃性气体泄漏"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="所属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
+                          placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
+            </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>
+  </div>
+</template>
+
+<script>
+import {
+  addStoragetank,
+  delStoragetank,
+  getStoragetank,
+  listStoragetank,
+  updateStoragetank
+} from "@/api/data/housingconstruction/storagetank";
+import {getListAll} from "@/api/data/housingconstruction/enterprise";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {treeselect} from "@/api/system/dept";
+import deptselector from "@/views/components/deptselector.vue";
+
+export default {
+  name: "Storagetank",
+  components: {deptselector, Treeselect},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 储罐存储数据表格数据
+      storagetankList: [],
+      //企业信息列表
+      enterpriseList: [],
+      // 部门树选项
+      deptOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        enterpriseId: null,
+        enterpriseName: null,
+        storageCapacity: null,
+        levelCeiling: null,
+        levelFloor: null,
+        heat: null,
+        pressure: null,
+        gasLeak: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        enterpriseId: [
+          {required: true, message: "所属企业不能为空", trigger: "blur"}
+        ],
+        name: [
+          {required: true, message: "储罐名称不能为空", trigger: "blur"}
+        ],
+        storageCapacity: [
+          {required: true, message: "存储量不能为空", trigger: "blur"}
+        ],
+        levelCeiling: [
+          {required: true, message: "液体液位上限不能为空", trigger: "blur"}
+        ],
+        levelFloor: [
+          {required: true, message: "液体液位下限不能为空", trigger: "blur"}
+        ],
+        heat: [
+          {required: true, message: "温度不能为空", trigger: "blur"}
+        ],
+        pressure: [
+          {required: true, message: "内部气压不能为空", trigger: "blur"}
+        ],
+        gasLeak: [
+          {required: true, message: "周边可燃性气体泄漏不能为空", trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+    this.getEnterpriseList();
+  },
+  methods: {
+    handleEnterpriseChange(newId) {
+      const selectedEnterprise = this.enterpriseList.find(item => item.id === newId);
+      if (selectedEnterprise) {
+        this.form.enterpriseName = selectedEnterprise.enterpriseName;
+      } else {
+        this.form.enterpriseName = '';
+      }
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    hx(node) {
+      this.form.dataDeptId = node.id
+      this.form.deptId = node.id
+      this.form.deptName = node.label
+      this.$refs.form.validateField("deptId")
+    },
+    getEnterpriseName(id) {
+      const enterprise = this.enterpriseList.find(e => e.id === id);
+      return enterprise ? enterprise.enterpriseName : '未知企业';
+    },
+    getEnterpriseList(){
+      getListAll().then(res=>{
+        this.enterpriseList = res.data
+      })
+    },
+    /** 查询储罐存储数据列表 */
+    getList() {
+      this.loading = true;
+      listStoragetank(this.queryParams).then(response => {
+        this.storagetankList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        deptId: null,
+        deptName: null,
+        name: null,
+        enterpriseId: null,
+        enterpriseName: null,
+        storageCapacity: null,
+        levelCeiling: null,
+        levelFloor: null,
+        heat: null,
+        pressure: null,
+        gasLeak: 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.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加储罐存储数据";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getStoragetank(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改储罐存储数据";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateStoragetank(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addStoragetank(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除储罐存储数据编号为"' + ids + '"的数据项?').then(function () {
+        return delStoragetank(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/storagetank/export', {
+        ...this.queryParams
+      }, `storagetank_${new Date().getTime()}.xlsx`)
+    },
+    formatStorageCapacity(cellValue) {
+      return `${cellValue.storageCapacity} t`;
+    },
+    formatLevelCeiling(cellValue) {
+      return `${cellValue.levelCeiling} L`;
+    },
+    formatLevelFloor(cellValue) {
+      return `${cellValue.levelFloor} L`;
+    },
+    formatHeat(cellValue) {
+      return `${cellValue.heat} ℃`;
+    },
+    formatPressure(cellValue) {
+      return `${cellValue.pressure} Pa`;
+    }
+  }
+};
+</script>

+ 91 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/controller/CenterdataTHousingconstructionStoragetankController.java

@@ -0,0 +1,91 @@
+package com.sooka.sponest.data.housingconstruction.controller;
+
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionStoragetank;
+import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionStoragetankService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 储罐存储数据Controller
+ *
+ * @author LG
+ * @date 2024-08-01
+ */
+@RestController
+@RequestMapping("/storagetank")
+public class CenterdataTHousingconstructionStoragetankController extends BaseController {
+    @Autowired
+    private ICenterdataTHousingconstructionStoragetankService centerdataTHousingconstructionStoragetankService;
+
+    /**
+     * 查询储罐存储数据列表
+     */
+    @RequiresPermissions("Housingconstruction:storagetank:list")
+    @GetMapping("/list")
+    public TableDataInfo list(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        startPage();
+        List<CenterdataTHousingconstructionStoragetank> list = centerdataTHousingconstructionStoragetankService.selectCenterdataTHousingconstructionStoragetankList(centerdataTHousingconstructionStoragetank);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出储罐存储数据列表
+     */
+    @RequiresPermissions("Housingconstruction:storagetank:export")
+    @Log(title = "储罐存储数据", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        List<CenterdataTHousingconstructionStoragetank> list = centerdataTHousingconstructionStoragetankService.selectCenterdataTHousingconstructionStoragetankList(centerdataTHousingconstructionStoragetank);
+        ExcelUtil<CenterdataTHousingconstructionStoragetank> util = new ExcelUtil<CenterdataTHousingconstructionStoragetank>(CenterdataTHousingconstructionStoragetank.class);
+        util.exportExcel(response, list, "储罐存储数据数据");
+    }
+
+    /**
+     * 获取储罐存储数据详细信息
+     */
+    @RequiresPermissions("Housingconstruction:storagetank:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id) {
+        return AjaxResult.success(centerdataTHousingconstructionStoragetankService.selectCenterdataTHousingconstructionStoragetankById(id));
+    }
+
+    /**
+     * 新增储罐存储数据
+     */
+    @RequiresPermissions("Housingconstruction:storagetank:add")
+    @Log(title = "储罐存储数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        return toAjax(centerdataTHousingconstructionStoragetankService.insertCenterdataTHousingconstructionStoragetank(centerdataTHousingconstructionStoragetank));
+    }
+
+    /**
+     * 修改储罐存储数据
+     */
+    @RequiresPermissions("Housingconstruction:storagetank:edit")
+    @Log(title = "储罐存储数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        return toAjax(centerdataTHousingconstructionStoragetankService.updateCenterdataTHousingconstructionStoragetank(centerdataTHousingconstructionStoragetank));
+    }
+
+    /**
+     * 删除储罐存储数据
+     */
+    @RequiresPermissions("Housingconstruction:storagetank:remove")
+    @Log(title = "储罐存储数据", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids) {
+        return toAjax(centerdataTHousingconstructionStoragetankService.deleteCenterdataTHousingconstructionStoragetankByIds(ids));
+    }
+}

+ 118 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/domain/CenterdataTHousingconstructionStoragetank.java

@@ -0,0 +1,118 @@
+package com.sooka.sponest.data.housingconstruction.domain;
+
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import com.sooka.sponest.data.base.domain.BaseBusinessEntity;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 储罐存储数据对象 centerdata_t_housingconstruction_storagetank
+ *
+ * @author LG
+ * @date 2024-08-01
+ */
+@Getter
+@Setter
+@AllArgsConstructor
+@NoArgsConstructor
+public class CenterdataTHousingconstructionStoragetank extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 部门id
+     */
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    private String deptName;
+
+    /**
+     * 储罐名称
+     */
+    @Excel(name = "储罐名称")
+    private String name;
+
+    /**
+     * 企业id
+     */
+    @Excel(name = "企业id")
+    private String enterpriseId;
+
+    /**
+     * 企业名称
+     */
+    @Excel(name = "企业名称")
+    private String enterpriseName;
+
+    /**
+     * 存储量
+     */
+    @Excel(name = "存储量")
+    private Integer storageCapacity;
+
+    /**
+     * 液体液位上限
+     */
+    @Excel(name = "液体液位上限")
+    private Integer levelCeiling;
+
+    /**
+     * 液体液位下限
+     */
+    @Excel(name = "液体液位下限")
+    private Integer levelFloor;
+
+    /**
+     * 温度
+     */
+    @Excel(name = "温度")
+    private Integer heat;
+
+    /**
+     * 内部气压
+     */
+    @Excel(name = "内部气压")
+    private Integer pressure;
+
+    /**
+     * 周边可燃性气体泄漏
+     */
+    @Excel(name = "周边可燃性气体泄漏")
+    private Integer gasLeak;
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("createBy", getCreateBy())
+                .append("createName", getCreateName())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateName", getUpdateName())
+                .append("updateTime", getUpdateTime())
+                .append("deptId", getDeptId())
+                .append("deptName", getDeptName())
+                .append("name", getName())
+                .append("enterpriseId", getEnterpriseId())
+                .append("enterpriseName", getEnterpriseName())
+                .append("storageCapacity", getStorageCapacity())
+                .append("levelCeiling", getLevelCeiling())
+                .append("levelFloor", getLevelFloor())
+                .append("heat", getHeat())
+                .append("pressure", getPressure())
+                .append("gasLeak", getGasLeak())
+                .toString();
+    }
+}

+ 61 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/mapper/CenterdataTHousingconstructionStoragetankMapper.java

@@ -0,0 +1,61 @@
+package com.sooka.sponest.data.housingconstruction.mapper;
+
+import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionStoragetank;
+
+import java.util.List;
+
+/**
+ * 储罐存储数据Mapper接口
+ *
+ * @author LG
+ * @date 2024-08-01
+ */
+public interface CenterdataTHousingconstructionStoragetankMapper {
+    /**
+     * 查询储罐存储数据
+     *
+     * @param id 储罐存储数据主键
+     * @return 储罐存储数据
+     */
+    public CenterdataTHousingconstructionStoragetank selectCenterdataTHousingconstructionStoragetankById(String id);
+
+    /**
+     * 查询储罐存储数据列表
+     *
+     * @param centerdataTHousingconstructionStoragetank 储罐存储数据
+     * @return 储罐存储数据集合
+     */
+    public List<CenterdataTHousingconstructionStoragetank> selectCenterdataTHousingconstructionStoragetankList(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank);
+
+    /**
+     * 新增储罐存储数据
+     *
+     * @param centerdataTHousingconstructionStoragetank 储罐存储数据
+     * @return 结果
+     */
+    public int insertCenterdataTHousingconstructionStoragetank(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank);
+
+    /**
+     * 修改储罐存储数据
+     *
+     * @param centerdataTHousingconstructionStoragetank 储罐存储数据
+     * @return 结果
+     */
+    public int updateCenterdataTHousingconstructionStoragetank(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank);
+
+    /**
+     * 删除储罐存储数据
+     *
+     * @param id 储罐存储数据主键
+     * @return 结果
+     */
+    public int deleteCenterdataTHousingconstructionStoragetankById(String id);
+
+    /**
+     * 批量删除储罐存储数据
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCenterdataTHousingconstructionStoragetankByIds(String[] ids);
+}

+ 97 - 0
src/main/java/com/sooka/sponest/data/housingconstruction/service/impl/CenterdataTHousingconstructionStoragetankServiceImpl.java

@@ -0,0 +1,97 @@
+package com.sooka.sponest.data.housingconstruction.service.impl;
+
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionStoragetank;
+import com.sooka.sponest.data.housingconstruction.mapper.CenterdataTHousingconstructionStoragetankMapper;
+import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionStoragetankService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 储罐存储数据Service业务层处理
+ *
+ * @author LG
+ * @date 2024-08-01
+ */
+@Service
+public class CenterdataTHousingconstructionStoragetankServiceImpl implements ICenterdataTHousingconstructionStoragetankService {
+    @Autowired
+    private CenterdataTHousingconstructionStoragetankMapper centerdataTHousingconstructionStoragetankMapper;
+
+    /**
+     * 查询储罐存储数据
+     *
+     * @param id 储罐存储数据主键
+     * @return 储罐存储数据
+     */
+    @Override
+    public CenterdataTHousingconstructionStoragetank selectCenterdataTHousingconstructionStoragetankById(String id) {
+        return centerdataTHousingconstructionStoragetankMapper.selectCenterdataTHousingconstructionStoragetankById(id);
+    }
+
+    /**
+     * 查询储罐存储数据列表
+     *
+     * @param centerdataTHousingconstructionStoragetank 储罐存储数据
+     * @return 储罐存储数据
+     */
+    @Override
+    public List<CenterdataTHousingconstructionStoragetank> selectCenterdataTHousingconstructionStoragetankList(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        return centerdataTHousingconstructionStoragetankMapper.selectCenterdataTHousingconstructionStoragetankList(centerdataTHousingconstructionStoragetank);
+    }
+
+    /**
+     * 新增储罐存储数据
+     *
+     * @param centerdataTHousingconstructionStoragetank 储罐存储数据
+     * @return 结果
+     */
+    @Override
+    public int insertCenterdataTHousingconstructionStoragetank(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        centerdataTHousingconstructionStoragetank.setId(IdUtils.fastSimpleUUID());
+        centerdataTHousingconstructionStoragetank.setCreateTime(DateUtils.getNowDate());
+        centerdataTHousingconstructionStoragetank.setCreateBy(SecurityUtils.getUserId().toString());
+        centerdataTHousingconstructionStoragetank.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+        return centerdataTHousingconstructionStoragetankMapper.insertCenterdataTHousingconstructionStoragetank(centerdataTHousingconstructionStoragetank);
+    }
+
+    /**
+     * 修改储罐存储数据
+     *
+     * @param centerdataTHousingconstructionStoragetank 储罐存储数据
+     * @return 结果
+     */
+    @Override
+    public int updateCenterdataTHousingconstructionStoragetank(CenterdataTHousingconstructionStoragetank centerdataTHousingconstructionStoragetank) {
+        centerdataTHousingconstructionStoragetank.setUpdateTime(DateUtils.getNowDate());
+        centerdataTHousingconstructionStoragetank.setUpdateBy(SecurityUtils.getUserId());
+        centerdataTHousingconstructionStoragetank.setUpdateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+        return centerdataTHousingconstructionStoragetankMapper.updateCenterdataTHousingconstructionStoragetank(centerdataTHousingconstructionStoragetank);
+    }
+
+    /**
+     * 批量删除储罐存储数据
+     *
+     * @param ids 需要删除的储罐存储数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCenterdataTHousingconstructionStoragetankByIds(String[] ids) {
+        return centerdataTHousingconstructionStoragetankMapper.deleteCenterdataTHousingconstructionStoragetankByIds(ids);
+    }
+
+    /**
+     * 删除储罐存储数据信息
+     *
+     * @param id 储罐存储数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCenterdataTHousingconstructionStoragetankById(String id) {
+        return centerdataTHousingconstructionStoragetankMapper.deleteCenterdataTHousingconstructionStoragetankById(id);
+    }
+}

+ 157 - 0
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionStoragetankMapper.xml

@@ -0,0 +1,157 @@
+<?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.sooka.sponest.data.housingconstruction.mapper.CenterdataTHousingconstructionStoragetankMapper">
+
+    <resultMap type="CenterdataTHousingconstructionStoragetank" id="CenterdataTHousingconstructionStoragetankResult">
+        <result property="id" column="id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createName" column="create_name"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateName" column="update_name"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="name" column="name"/>
+        <result property="enterpriseId" column="enterprise_id"/>
+        <result property="enterpriseName" column="enterprise_name"/>
+        <result property="storageCapacity" column="storage_capacity"/>
+        <result property="levelCeiling" column="level_ceiling"/>
+        <result property="levelFloor" column="level_floor"/>
+        <result property="heat" column="heat"/>
+        <result property="pressure" column="pressure"/>
+        <result property="gasLeak" column="gas_leak"/>
+    </resultMap>
+
+    <sql id="selectCenterdataTHousingconstructionStoragetankVo">
+        select id,
+               create_by,
+               create_name,
+               create_time,
+               update_by,
+               update_name,
+               update_time,
+               dept_id,
+               dept_name,
+               name,
+               enterprise_id,
+               enterprise_name,
+               storage_capacity,
+               level_ceiling,
+               level_floor,
+               heat,
+               pressure,
+               gas_leak
+        from centerdata_t_housingconstruction_storagetank
+    </sql>
+
+    <select id="selectCenterdataTHousingconstructionStoragetankList"
+            parameterType="CenterdataTHousingconstructionStoragetank"
+            resultMap="CenterdataTHousingconstructionStoragetankResult">
+        <include refid="selectCenterdataTHousingconstructionStoragetankVo"/>
+        <where>
+            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="enterpriseId != null  and enterpriseId != ''">and enterprise_id = #{enterpriseId}</if>
+            <if test="enterpriseName != null  and enterpriseName != ''">and enterprise_name like concat('%',
+                #{enterpriseName}, '%')
+            </if>
+            <if test="storageCapacity != null ">and storage_capacity = #{storageCapacity}</if>
+            <if test="levelCeiling != null ">and level_ceiling = #{levelCeiling}</if>
+            <if test="levelFloor != null ">and level_floor = #{levelFloor}</if>
+            <if test="heat != null ">and heat = #{heat}</if>
+            <if test="pressure != null ">and pressure = #{pressure}</if>
+            <if test="gasLeak != null ">and gas_leak = #{gasLeak}</if>
+        </where>
+    </select>
+
+    <select id="selectCenterdataTHousingconstructionStoragetankById" parameterType="String"
+            resultMap="CenterdataTHousingconstructionStoragetankResult">
+        <include refid="selectCenterdataTHousingconstructionStoragetankVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertCenterdataTHousingconstructionStoragetank"
+            parameterType="CenterdataTHousingconstructionStoragetank">
+        insert into centerdata_t_housingconstruction_storagetank
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createName != null">create_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateName != null">update_name,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="name != null">name,</if>
+            <if test="enterpriseId != null">enterprise_id,</if>
+            <if test="enterpriseName != null">enterprise_name,</if>
+            <if test="storageCapacity != null">storage_capacity,</if>
+            <if test="levelCeiling != null">level_ceiling,</if>
+            <if test="levelFloor != null">level_floor,</if>
+            <if test="heat != null">heat,</if>
+            <if test="pressure != null">pressure,</if>
+            <if test="gasLeak != null">gas_leak,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">#{id},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createName != null">#{createName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateName != null">#{updateName},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="name != null">#{name},</if>
+            <if test="enterpriseId != null">#{enterpriseId},</if>
+            <if test="enterpriseName != null">#{enterpriseName},</if>
+            <if test="storageCapacity != null">#{storageCapacity},</if>
+            <if test="levelCeiling != null">#{levelCeiling},</if>
+            <if test="levelFloor != null">#{levelFloor},</if>
+            <if test="heat != null">#{heat},</if>
+            <if test="pressure != null">#{pressure},</if>
+            <if test="gasLeak != null">#{gasLeak},</if>
+        </trim>
+    </insert>
+
+    <update id="updateCenterdataTHousingconstructionStoragetank"
+            parameterType="CenterdataTHousingconstructionStoragetank">
+        update centerdata_t_housingconstruction_storagetank
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createName != null">create_name = #{createName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateName != null">update_name = #{updateName},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
+            <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
+            <if test="storageCapacity != null">storage_capacity = #{storageCapacity},</if>
+            <if test="levelCeiling != null">level_ceiling = #{levelCeiling},</if>
+            <if test="levelFloor != null">level_floor = #{levelFloor},</if>
+            <if test="heat != null">heat = #{heat},</if>
+            <if test="pressure != null">pressure = #{pressure},</if>
+            <if test="gasLeak != null">gas_leak = #{gasLeak},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCenterdataTHousingconstructionStoragetankById" parameterType="String">
+        delete
+        from centerdata_t_housingconstruction_storagetank
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteCenterdataTHousingconstructionStoragetankByIds" parameterType="String">
+        delete from centerdata_t_housingconstruction_storagetank where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>