KeXuCong 1 week ago
parent
commit
cbef1c650f
  1. 53
      jwtech-admin-page/src/api/stat/project.js
  2. 53
      jwtech-admin-page/src/api/stat/template.js
  3. 534
      jwtech-admin-page/src/views/stat/project/index.vue
  4. 452
      jwtech-admin-page/src/views/stat/template/index.vue
  5. 24
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiHazardRecordController.java
  6. 7
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiHazardRecord.java
  7. 114
      jwtech-system/src/main/java/com/kms/stat/controller/BsSgcYxjdStatisticsProjectController.java
  8. 114
      jwtech-system/src/main/java/com/kms/stat/controller/BsSgcYxjdStatisticsTemplateController.java
  9. 73
      jwtech-system/src/main/java/com/kms/stat/domain/BsSgcYxjdStatisticsProject.java
  10. 54
      jwtech-system/src/main/java/com/kms/stat/domain/BsSgcYxjdStatisticsTemplate.java
  11. 16
      jwtech-system/src/main/java/com/kms/stat/mapper/BsSgcYxjdStatisticsProjectMapper.java
  12. 16
      jwtech-system/src/main/java/com/kms/stat/mapper/BsSgcYxjdStatisticsTemplateMapper.java
  13. 17
      jwtech-system/src/main/java/com/kms/stat/service/BsSgcYxjdStatisticsProjectService.java
  14. 17
      jwtech-system/src/main/java/com/kms/stat/service/BsSgcYxjdStatisticsTemplateService.java

53
jwtech-admin-page/src/api/stat/project.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询项目统计信息列表
export function listProject(query) {
return request({
url: '/stat/project/list',
method: 'post',
data: query
})
}
// 查询项目统计信息详细
export function getProject(id) {
return request({
url: '/stat/project/' + id,
method: 'get'
})
}
// 新增项目统计信息
export function addProject(data) {
return request({
url: '/stat/project',
method: 'post',
data: data
})
}
// 修改项目统计信息
export function updateProject(data) {
return request({
url: '/stat/project',
method: 'put',
data: data
})
}
// 删除项目统计信息
export function delProject(id) {
return request({
url: '/stat/project/' + id,
method: 'delete'
})
}
// 导出项目统计信息
export function exportProject(query) {
return request({
url: '/stat/project/export',
method: 'get',
params: query
})
}

53
jwtech-admin-page/src/api/stat/template.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询统计模板列表
export function listTemplate(query) {
return request({
url: '/stat/template/list',
method: 'post',
data: query
})
}
// 查询统计模板详细
export function getTemplate(id) {
return request({
url: '/stat/template/' + id,
method: 'get'
})
}
// 新增统计模板
export function addTemplate(data) {
return request({
url: '/stat/template',
method: 'post',
data: data
})
}
// 修改统计模板
export function updateTemplate(data) {
return request({
url: '/stat/template',
method: 'put',
data: data
})
}
// 删除统计模板
export function delTemplate(id) {
return request({
url: '/stat/template/' + id,
method: 'delete'
})
}
// 导出统计模板
export function exportTemplate(query) {
return request({
url: '/stat/template/export',
method: 'get',
params: query
})
}

534
jwtech-admin-page/src/views/stat/project/index.vue

@ -0,0 +1,534 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="统计名称" prop="taskName">
<el-input
v-model="queryParams.data.taskName"
placeholder="请输入统计名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<!-- <el-form-item label="模板名称" prop="templateId">
<el-input
v-model="queryParams.data.templateId"
placeholder="请输入模板名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="项目类型" prop="proType">
<el-select v-model="queryParams.data.proType" placeholder="请选择项目类型" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="项目行政区划" prop="proXzqh">
<el-input
v-model="queryParams.data.proXzqh"
placeholder="请输入项目行政区划"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="工程等级" prop="proGrade">
<el-input
v-model="queryParams.data.proGrade"
placeholder="请输入工程等级"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="是否重大项目" prop="majorPro">
<el-input
v-model="queryParams.data.majorPro"
placeholder="请输入是否重大项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="是否为安全度汛重点工程" prop="floodPro">
<el-input
v-model="queryParams.data.floodPro"
placeholder="请输入是否为安全度汛重点工程"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="创建人" prop="createUid">
<el-input
v-model="queryParams.data.createUid"
placeholder="请输入创建人"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.createTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateUid">
<el-input
v-model="queryParams.data.updateUid"
placeholder="请输入更新人"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.updateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择更新时间">
</el-date-picker>
</el-form-item>-->
<el-form-item>
<el-button type="cyan" 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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['project:project:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['project:project:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['project:project:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['project:project:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="统计名称" align="center" prop="taskName" min-width="120"/>
<el-table-column label="模板名称" align="center" prop="templateId" min-width="120"/>
<el-table-column label="项目类型" align="center" prop="proType" min-width="120"/>
<el-table-column label="项目行政区划" align="center" prop="proXzqh" min-width="120"/>
<el-table-column label="工程等级" align="center" prop="proGrade" min-width="120"/>
<el-table-column label="是否重大项目" align="center" prop="majorPro" min-width="120"/>
<el-table-column label="是否为安全度汛重点工程" align="center" prop="floodPro" min-width="120"/>
<el-table-column label="创建人" align="center" prop="createUid" min-width="120"/>
<el-table-column label="创建时间" align="center" prop="createTime" min-width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateUid" min-width="120"/>
<el-table-column label="更新时间" align="center" prop="updateTime" min-width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['project:project:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['project:project: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="1200px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="统计名称" prop="taskName">
<el-input v-model="form.taskName" placeholder="请输入统计名称" />
</el-form-item>
<el-form-item label="模板名称" prop="templateId">
<el-input v-model="form.templateId" placeholder="请输入模板名称" />
</el-form-item>
<el-form-item label="项目类型" prop="proType">
<el-select v-model="form.proType" placeholder="请选择项目类型" style="width: 100%">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="项目行政区划" prop="proXzqh">
<el-input v-model="form.proXzqh" placeholder="请输入项目行政区划" />
</el-form-item>
<el-form-item label="工程等级" prop="proGrade">
<el-input v-model="form.proGrade" placeholder="请输入工程等级" />
</el-form-item>
<el-form-item label="是否重大项目" prop="majorPro">
<el-input v-model="form.majorPro" placeholder="请输入是否重大项目" />
</el-form-item>
<el-form-item label="是否为安全度汛重点工程" prop="floodPro">
<el-input v-model="form.floodPro" placeholder="请输入是否为安全度汛重点工程" />
</el-form-item>
<el-form-item label="创建人" prop="createUid">
<el-input v-model="form.createUid" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="更新人" prop="updateUid">
<el-input v-model="form.updateUid" placeholder="请输入更新人" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</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 { listProject, getProject, delProject, addProject, updateProject, exportProject } from "@/api/stat/project";
export default {
name: "Project",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
projectList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
taskName: null,
templateId: null,
proType: null,
proXzqh: null,
proGrade: null,
majorPro: null,
floodPro: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询项目统计信息列表 */
getList() {
this.loading = true;
listProject(this.queryParams).then(response => {
this.projectList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
taskName: null,
templateId: null,
proType: null,
proXzqh: null,
proGrade: null,
majorPro: null,
floodPro: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
taskName: null,
templateId: null,
proType: null,
proXzqh: null,
proGrade: null,
majorPro: null,
floodPro: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getProject(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) {
updateProject(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addProject(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delProject(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportProject(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

452
jwtech-admin-page/src/views/stat/template/index.vue

@ -0,0 +1,452 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="模板名称" prop="templateName">
<el-input
v-model="queryParams.data.templateName"
placeholder="请输入模板名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<!-- <el-form-item label="typeIds" prop="typeIds">
<el-input
v-model="queryParams.data.typeIds"
placeholder="请输入typeIds"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="typeNames" prop="typeNames">
<el-input
v-model="queryParams.data.typeNames"
placeholder="请输入typeNames"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="创建人" prop="createUid">
<el-input
v-model="queryParams.data.createUid"
placeholder="请输入创建人"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.createTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateUid">
<el-input
v-model="queryParams.data.updateUid"
placeholder="请输入更新人"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.updateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择更新时间">
</el-date-picker>
</el-form-item>-->
<el-form-item>
<el-button type="cyan" 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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['template:template:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['template:template:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['template:template:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['template:template:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="templateList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="模板名称" align="center" prop="templateName" min-width="120"/>
<!-- <el-table-column label="模板名称" align="center" prop="typeIds" min-width="120"/>-->
<el-table-column label="typeNames" align="center" prop="typeNames" min-width="120"/>
<el-table-column label="创建人" align="center" prop="createUid" min-width="120"/>
<el-table-column label="创建时间" align="center" prop="createTime" min-width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateUid" min-width="120"/>
<el-table-column label="更新时间" align="center" prop="updateTime" min-width="120">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['template:template:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['template:template: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="1200px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="模板名称" prop="templateName">
<el-input v-model="form.templateName" placeholder="请输入模板名称" />
</el-form-item>
<el-form-item label="typeIds" prop="typeIds">
<el-input v-model="form.typeIds" placeholder="请输入typeIds" />
</el-form-item>
<el-form-item label="typeNames" prop="typeNames">
<el-input v-model="form.typeNames" placeholder="请输入typeNames" />
</el-form-item>
<el-form-item label="创建人" prop="createUid">
<el-input v-model="form.createUid" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="更新人" prop="updateUid">
<el-input v-model="form.updateUid" placeholder="请输入更新人" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</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 { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate, exportTemplate } from "@/api/stat/template";
export default {
name: "Template",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
templateList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
cv:{
"name": "templateName",
"type": "like"
},
data:{
templateName: null,
typeIds: null,
typeNames: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询统计模板列表 */
getList() {
this.loading = true;
listTemplate(this.queryParams).then(response => {
this.templateList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
templateName: null,
typeIds: null,
typeNames: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
templateName: null,
typeIds: null,
typeNames: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getTemplate(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) {
updateTemplate(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addTemplate(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delTemplate(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportTemplate(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

24
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiHazardRecordController.java

@ -3,11 +3,15 @@ package com.kms.build.controller;
import java.util.Arrays;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.jianwei.common.core.controller.BaseController;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.utils.poi.ExcelUtil;
import com.kms.build.domain.BsSgcJsjdBuiHazardRecord;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.service.BsSgcJsjdBuiHazardRecordService;
import com.kms.build.service.BsSgcjsjdBuiProInfoService;
import com.kms.common.utils.BaseEntityUtils;
@ -46,6 +50,9 @@ public class BsSgcJsjdBuiHazardRecordController extends BaseController
@Autowired
private BsSgcJsjdBuiHazardRecordService bsSgcJsjdBuiHazardRecordService;
@Autowired
private BsSgcjsjdBuiProInfoService bsSgcjsjdBuiProInfoService;
/**
* 查询隐患记录登记信息列表
*/
@ -53,7 +60,22 @@ public class BsSgcJsjdBuiHazardRecordController extends BaseController
@ApiOperation("隐患记录登记信息列表")
public IPage list(@RequestBody SearchParam<BsSgcJsjdBuiHazardRecord> sp)
{
return bsSgcJsjdBuiHazardRecordService.selectPage(sp);
IPage<BsSgcJsjdBuiHazardRecord> page = bsSgcJsjdBuiHazardRecordService.selectPage(sp);
if(page.getRecords()!=null){
for(BsSgcJsjdBuiHazardRecord record: page.getRecords()){
String proNo = record.getProNo();
QueryWrapper<BsSgcjsjdBuiProInfo> wrapper = Wrappers.query();
wrapper.eq("pro_no",proNo);
wrapper.last("LIMIT 1"); // 限制返回 10 条
List<BsSgcjsjdBuiProInfo> list2 = bsSgcjsjdBuiProInfoService.list(wrapper);
if(list2!=null&&list2.size()>0){
record.setProId(list2.get(0).getId());
}
}
}
return page;
}
/**

7
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiHazardRecord.java

@ -1,5 +1,6 @@
package com.kms.build.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -120,4 +121,10 @@ public class BsSgcJsjdBuiHazardRecord extends BaseEntity
@ApiModelProperty("附件")
private String hazardAttachment;
/**
* 补充项目id
*/
@TableField(exist = false)
private String proId;
}

114
jwtech-system/src/main/java/com/kms/stat/controller/BsSgcYxjdStatisticsProjectController.java

@ -0,0 +1,114 @@
package com.kms.stat.controller;
import java.util.Arrays;
import java.util.List;
import com.jianwei.common.core.controller.BaseController;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.utils.poi.ExcelUtil;
import com.kms.common.utils.BaseEntityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.baomidou.mybatisplus.core.metadata.IPage;
import com.jianwei.common.mybaitsplus.BeanToWrapper;
import com.jianwei.common.annotation.Log;
import com.jianwei.common.core.domain.AjaxResult;
import com.jianwei.common.enums.BusinessType;
import com.kms.stat.domain.BsSgcYxjdStatisticsProject;
import com.kms.stat.service.BsSgcYxjdStatisticsProjectService;
/**
* 项目统计信息Controller
*
* @author kms
* @date 2025-04-09
*/
@RestController
@RequestMapping("/stat/project")
@Api(tags = "项目统计信息")
public class BsSgcYxjdStatisticsProjectController extends BaseController
{
@Autowired
private BsSgcYxjdStatisticsProjectService bsSgcYxjdStatisticsProjectService;
/**
* 查询项目统计信息列表
*/
@PostMapping("/list")
@ApiOperation("项目统计信息列表")
public IPage list(@RequestBody SearchParam<BsSgcYxjdStatisticsProject> sp)
{
return bsSgcYxjdStatisticsProjectService.selectPage(sp);
}
/**
* 导出项目统计信息列表
*/
@Log(title = "项目统计信息导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("项目统计信息导出")
public AjaxResult export(@RequestBody BsSgcYxjdStatisticsProject bsSgcYxjdStatisticsProject)
{
List<BsSgcYxjdStatisticsProject> list = bsSgcYxjdStatisticsProjectService.listByIds(bsSgcYxjdStatisticsProject.getIds());
ExcelUtil<BsSgcYxjdStatisticsProject> util = new ExcelUtil<>(BsSgcYxjdStatisticsProject.class);
return util.exportExcel(list, "project");
}
/**
* 获取项目统计信息详细信息
*/
@ApiOperation(" 项目统计信息详情")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(bsSgcYxjdStatisticsProjectService.getById(id));
}
/**
* 新增项目统计信息
*/
@Log(title = "项目统计信息新增", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("项目统计信息新增")
public AjaxResult add(@RequestBody BsSgcYxjdStatisticsProject bsSgcYxjdStatisticsProject)
{
BaseEntityUtils.preInsert(bsSgcYxjdStatisticsProject);
return toAjax(bsSgcYxjdStatisticsProjectService.save(bsSgcYxjdStatisticsProject));
}
/**
* 修改项目统计信息
*/
@ApiOperation("项目统计信息修改")
@Log(title = "项目统计信息修改", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BsSgcYxjdStatisticsProject bsSgcYxjdStatisticsProject)
{
return toAjax(bsSgcYxjdStatisticsProjectService.updateById(bsSgcYxjdStatisticsProject));
}
/**
* 删除项目统计信息
*/
@ApiOperation("项目统计信息删除")
@Log(title = "项目统计信息删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(bsSgcYxjdStatisticsProjectService.removeByIds(Arrays.asList(ids)));
}
}

114
jwtech-system/src/main/java/com/kms/stat/controller/BsSgcYxjdStatisticsTemplateController.java

@ -0,0 +1,114 @@
package com.kms.stat.controller;
import java.util.Arrays;
import java.util.List;
import com.jianwei.common.core.controller.BaseController;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.utils.poi.ExcelUtil;
import com.kms.common.utils.BaseEntityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.baomidou.mybatisplus.core.metadata.IPage;
import com.jianwei.common.mybaitsplus.BeanToWrapper;
import com.jianwei.common.annotation.Log;
import com.jianwei.common.core.domain.AjaxResult;
import com.jianwei.common.enums.BusinessType;
import com.kms.stat.domain.BsSgcYxjdStatisticsTemplate;
import com.kms.stat.service.BsSgcYxjdStatisticsTemplateService;
/**
* 统计模板Controller
*
* @author kms
* @date 2025-04-09
*/
@RestController
@RequestMapping("/stat/template")
@Api(tags = "统计模板")
public class BsSgcYxjdStatisticsTemplateController extends BaseController
{
@Autowired
private BsSgcYxjdStatisticsTemplateService bsSgcYxjdStatisticsTemplateService;
/**
* 查询统计模板列表
*/
@PostMapping("/list")
@ApiOperation("统计模板列表")
public IPage list(@RequestBody SearchParam<BsSgcYxjdStatisticsTemplate> sp)
{
return bsSgcYxjdStatisticsTemplateService.selectPage(sp);
}
/**
* 导出统计模板列表
*/
@Log(title = "统计模板导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("统计模板导出")
public AjaxResult export(@RequestBody BsSgcYxjdStatisticsTemplate bsSgcYxjdStatisticsTemplate)
{
List<BsSgcYxjdStatisticsTemplate> list = bsSgcYxjdStatisticsTemplateService.listByIds(bsSgcYxjdStatisticsTemplate.getIds());
ExcelUtil<BsSgcYxjdStatisticsTemplate> util = new ExcelUtil<>(BsSgcYxjdStatisticsTemplate.class);
return util.exportExcel(list, "template");
}
/**
* 获取统计模板详细信息
*/
@ApiOperation(" 统计模板详情")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(bsSgcYxjdStatisticsTemplateService.getById(id));
}
/**
* 新增统计模板
*/
@Log(title = "统计模板新增", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("统计模板新增")
public AjaxResult add(@RequestBody BsSgcYxjdStatisticsTemplate bsSgcYxjdStatisticsTemplate)
{
BaseEntityUtils.preInsert(bsSgcYxjdStatisticsTemplate);
return toAjax(bsSgcYxjdStatisticsTemplateService.save(bsSgcYxjdStatisticsTemplate));
}
/**
* 修改统计模板
*/
@ApiOperation("统计模板修改")
@Log(title = "统计模板修改", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BsSgcYxjdStatisticsTemplate bsSgcYxjdStatisticsTemplate)
{
return toAjax(bsSgcYxjdStatisticsTemplateService.updateById(bsSgcYxjdStatisticsTemplate));
}
/**
* 删除统计模板
*/
@ApiOperation("统计模板删除")
@Log(title = "统计模板删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(bsSgcYxjdStatisticsTemplateService.removeByIds(Arrays.asList(ids)));
}
}

73
jwtech-system/src/main/java/com/kms/stat/domain/BsSgcYxjdStatisticsProject.java

@ -0,0 +1,73 @@
package com.kms.stat.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jianwei.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jianwei.common.core.domain.BaseEntity;
/**
* 项目统计信息对象 bs_sgc_yxjd_statistics_project
*
* @author kms
* @date 2025-04-09
*/
@TableName("bs_sgc_yxjd_statistics_project")
@Data
@ApiModel("项目统计信息")
public class BsSgcYxjdStatisticsProject extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 统计名称 */
@Excel(name = "统计名称")
@ApiModelProperty("统计名称")
private String taskName;
/** 模板名称 */
@Excel(name = "模板名称")
@ApiModelProperty("模板名称")
private String templateId;
/** 项目类型 */
@Excel(name = "项目类型")
@ApiModelProperty("项目类型")
private String proType;
/** 项目行政区划 */
@Excel(name = "项目行政区划")
@ApiModelProperty("项目行政区划")
private String proXzqh;
/** 工程等级 */
@Excel(name = "工程等级")
@ApiModelProperty("工程等级")
private String proGrade;
/** 是否重大项目 */
@Excel(name = "是否重大项目")
@ApiModelProperty("是否重大项目")
private String majorPro;
/** 是否为安全度汛重点工程 */
@Excel(name = "是否为安全度汛重点工程")
@ApiModelProperty("是否为安全度汛重点工程")
private String floodPro;
/** 创建人 */
@Excel(name = "创建人")
@ApiModelProperty("创建人")
private String createUid;
/** 更新人 */
@Excel(name = "更新人")
@ApiModelProperty("更新人")
private String updateUid;
}

54
jwtech-system/src/main/java/com/kms/stat/domain/BsSgcYxjdStatisticsTemplate.java

@ -0,0 +1,54 @@
package com.kms.stat.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jianwei.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jianwei.common.core.domain.BaseEntity;
/**
* 统计模板对象 bs_sgc_yxjd_statistics_template
*
* @author kms
* @date 2025-04-09
*/
@TableName("bs_sgc_yxjd_statistics_template")
@Data
@ApiModel("统计模板")
public class BsSgcYxjdStatisticsTemplate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 模板名称 */
@Excel(name = "模板名称")
@ApiModelProperty("模板名称")
private String templateName;
/** $column.columnComment */
@Excel(name = "模板名称")
@ApiModelProperty("模板名称")
private String typeIds;
/** $column.columnComment */
@Excel(name = "模板名称")
@ApiModelProperty("模板名称")
private String typeNames;
/** 创建人 */
@Excel(name = "创建人")
@ApiModelProperty("创建人")
private String createUid;
/** 更新人 */
@Excel(name = "更新人")
@ApiModelProperty("更新人")
private String updateUid;
}

16
jwtech-system/src/main/java/com/kms/stat/mapper/BsSgcYxjdStatisticsProjectMapper.java

@ -0,0 +1,16 @@
package com.kms.stat.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kms.stat.domain.BsSgcYxjdStatisticsProject;
/**
* 项目统计信息Mapper接口
*
* @author kms
* @date 2025-04-09
*/
@Repository
public interface BsSgcYxjdStatisticsProjectMapper extends BaseMapper<BsSgcYxjdStatisticsProject> {
}

16
jwtech-system/src/main/java/com/kms/stat/mapper/BsSgcYxjdStatisticsTemplateMapper.java

@ -0,0 +1,16 @@
package com.kms.stat.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kms.stat.domain.BsSgcYxjdStatisticsTemplate;
/**
* 统计模板Mapper接口
*
* @author kms
* @date 2025-04-09
*/
@Repository
public interface BsSgcYxjdStatisticsTemplateMapper extends BaseMapper<BsSgcYxjdStatisticsTemplate> {
}

17
jwtech-system/src/main/java/com/kms/stat/service/BsSgcYxjdStatisticsProjectService.java

@ -0,0 +1,17 @@
package com.kms.stat.service;
import org.springframework.stereotype.Service;
import com.jianwei.common.core.service.BaseService;
import com.kms.stat.mapper.BsSgcYxjdStatisticsProjectMapper;
import com.kms.stat.domain.BsSgcYxjdStatisticsProject;
/**
* 项目统计信息Service接口
*
* @author kms
* @date 2025-04-09
*/
@Service
public class BsSgcYxjdStatisticsProjectService extends BaseService<BsSgcYxjdStatisticsProjectMapper, BsSgcYxjdStatisticsProject>{
}

17
jwtech-system/src/main/java/com/kms/stat/service/BsSgcYxjdStatisticsTemplateService.java

@ -0,0 +1,17 @@
package com.kms.stat.service;
import org.springframework.stereotype.Service;
import com.jianwei.common.core.service.BaseService;
import com.kms.stat.mapper.BsSgcYxjdStatisticsTemplateMapper;
import com.kms.stat.domain.BsSgcYxjdStatisticsTemplate;
/**
* 统计模板Service接口
*
* @author kms
* @date 2025-04-09
*/
@Service
public class BsSgcYxjdStatisticsTemplateService extends BaseService<BsSgcYxjdStatisticsTemplateMapper, BsSgcYxjdStatisticsTemplate>{
}
Loading…
Cancel
Save