Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
497054c1ec
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询项目成本产值列表
|
||||||
|
export function listCostOutput(query) {
|
||||||
|
return request({
|
||||||
|
url: '/project/costOutput/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询项目成本产值详细
|
||||||
|
export function getCostOutput(id) {
|
||||||
|
return request({
|
||||||
|
url: '/project/costOutput/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增项目成本产值
|
||||||
|
export function addCostOutput(data) {
|
||||||
|
return request({
|
||||||
|
url: '/project/costOutput',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改项目成本产值
|
||||||
|
export function updateCostOutput(data) {
|
||||||
|
return request({
|
||||||
|
url: '/project/costOutput',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除项目成本产值
|
||||||
|
export function delCostOutput(id) {
|
||||||
|
return request({
|
||||||
|
url: '/project/costOutput/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,188 @@
|
||||||
|
<template>
|
||||||
|
<div class="project-cost-outpu-drawer" v-if="isOpen">
|
||||||
|
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="60%" style="padding-left: 20px">
|
||||||
|
<template slot="title">
|
||||||
|
<div>{{ title + " 【计划节点】" }}</div>
|
||||||
|
<right-toolbar @queryTable="loadData" :search="false">
|
||||||
|
<template slot="left">
|
||||||
|
<el-button type="primary" @click="doExport"
|
||||||
|
v-hasPermi="['project:build_node_data:export']">导出</el-button>
|
||||||
|
<el-popover placement="top-start" title="提示" trigger="hover" content="请选择导出的模板修改后的文件。">
|
||||||
|
<el-button type="success" slot="reference" @click="doImport"
|
||||||
|
v-hasPermi="['project:build_node_data:import']" style="margin: 0px 12px">导入</el-button>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
|
</template>
|
||||||
|
<el-tabs v-model="activeName">
|
||||||
|
<el-tab-pane :label="'' + it.nodeText" :name="'' + it.id" :key="idx" v-for="(it, idx) in nodes">
|
||||||
|
<node-item :item="it" :showLabel="false" style="border-bottom: solid 1px #ccc"></node-item>
|
||||||
|
<div v-for="(it2, idx) in it.children" :key="idx" class="lvl-2">
|
||||||
|
<node-item :item="it2"></node-item>
|
||||||
|
<div v-for="(it3, idx) in it2.children" :key="idx" v-if="it2.children.length > 0"
|
||||||
|
style="padding-left: 40px" class="lvl-3">
|
||||||
|
<node-item :item="it3"></node-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-drawer>
|
||||||
|
<!-- 用户导入对话框 -->
|
||||||
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="600px" :close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false" append-to-body
|
||||||
|
:custom-class="'build-node-import-dlg file-' + upload.files.length">
|
||||||
|
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :multiple="false"
|
||||||
|
:on-change="uploadChange" :action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||||
|
:disabled="upload.isUploading" :on-remove="uploadChange" :on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
|
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
||||||
|
@click="doExport">下载模板</el-link>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listByProject } from "@/api/project/build_node_data.js";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
import NodeItem from "./nodeItem.vue";
|
||||||
|
export default {
|
||||||
|
name: "RuoyiUiBuildNodeDrawer",
|
||||||
|
components: {
|
||||||
|
NodeItem,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpen: false,
|
||||||
|
prj: null,
|
||||||
|
nodes: [],
|
||||||
|
activeName: "",
|
||||||
|
// 用户导入参数
|
||||||
|
upload: {
|
||||||
|
files: [],
|
||||||
|
// 是否显示弹出层(用户导入)
|
||||||
|
open: false,
|
||||||
|
// 弹出层标题(用户导入)
|
||||||
|
title: "",
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 是否更新已经存在的用户数据
|
||||||
|
updateSupport: 0,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + "/project/build_node_data/importData",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() { },
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
uploadChange(a, b, c) {
|
||||||
|
this.upload.files = b;
|
||||||
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
this.upload.open = false;
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
this.$alert(
|
||||||
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||||
|
response.msg +
|
||||||
|
"</div>",
|
||||||
|
"导入结果",
|
||||||
|
{ dangerouslyUseHTMLString: true }
|
||||||
|
);
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
submitFileForm() {
|
||||||
|
this.$refs.upload.submit();
|
||||||
|
},
|
||||||
|
doImport() {
|
||||||
|
this.upload.title = `${this.prj.projectName}_项目计划节点导入`;
|
||||||
|
this.upload.open = true;
|
||||||
|
},
|
||||||
|
doExport() {
|
||||||
|
this.download(
|
||||||
|
"project/build_node_data/export",
|
||||||
|
{
|
||||||
|
projectId: this.prj.id,
|
||||||
|
},
|
||||||
|
`${this.prj.projectName}_项目计划节点.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
loadData(init) {
|
||||||
|
listByProject(this.prj.id).then((d) => {
|
||||||
|
let tmps = (d.data || []).map((it) => {
|
||||||
|
it.lvl = it.baseBuildNode.nodeLvl;
|
||||||
|
it.parentLvl = it.lvl.substring(0, it.lvl.length - 2);
|
||||||
|
it.nodeText = it.baseBuildNode.nodeText;
|
||||||
|
it.file = this.$tryToJson(it.files, []);
|
||||||
|
return it;
|
||||||
|
});
|
||||||
|
let objs = tmps.filter((d) => d.parentLvl.length == 0);
|
||||||
|
objs.forEach((it) => {
|
||||||
|
it.children = tmps.filter((item) => item.parentLvl == it.lvl);
|
||||||
|
it.children.forEach((item) => {
|
||||||
|
item.children = tmps.filter((item3) => item3.parentLvl == item.lvl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.nodes = objs;
|
||||||
|
if (init) {
|
||||||
|
this.activeName = objs.length > 0 ? objs[0].id + "" : "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
show(prj) {
|
||||||
|
this.prj = prj;
|
||||||
|
this.title = prj.projectName;
|
||||||
|
this.isOpen = true;
|
||||||
|
this.loadData(true);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.project-cost-outpu-drawer {
|
||||||
|
::v-deep .el-drawer {
|
||||||
|
min-width: 1600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-drawer__header {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-drawer__body {
|
||||||
|
padding: 0px 24px;
|
||||||
|
|
||||||
|
.el-form {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 15px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lvl-3 {
|
||||||
|
.lbl-title {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,313 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="项目编号" prop="projectId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.projectId"
|
||||||
|
placeholder="请输入项目编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="金额" prop="money">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.money"
|
||||||
|
placeholder="请输入金额"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="年份" prop="year">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.year"
|
||||||
|
placeholder="请输入年份"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="月份" prop="month">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.month"
|
||||||
|
placeholder="请输入月份"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="isDel">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.isDel"
|
||||||
|
placeholder="请输入${comment}"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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="['project:costOutput: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="['project:costOutput: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="['project:costOutput: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="['project:costOutput:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="costOutputList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="id" />
|
||||||
|
<el-table-column label="项目编号" align="center" prop="projectId" />
|
||||||
|
<el-table-column label="金额" align="center" prop="money" />
|
||||||
|
<el-table-column label="年份" align="center" prop="year" />
|
||||||
|
<el-table-column label="月份" align="center" prop="month" />
|
||||||
|
<el-table-column label="类型,字典project_cost_output_type" align="center" prop="costType" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||||
|
<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="['project:costOutput:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['project:costOutput: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="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="项目编号" prop="projectId">
|
||||||
|
<el-input v-model="form.projectId" placeholder="请输入项目编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="金额" prop="money">
|
||||||
|
<el-input v-model="form.money" placeholder="请输入金额" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="年份" prop="year">
|
||||||
|
<el-input v-model="form.year" placeholder="请输入年份" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="月份" prop="month">
|
||||||
|
<el-input v-model="form.month" placeholder="请输入月份" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="isDel">
|
||||||
|
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||||
|
</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 { listCostOutput, getCostOutput, delCostOutput, addCostOutput, updateCostOutput } from "@/api/project/costOutput";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "CostOutput",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 项目成本产值表格数据
|
||||||
|
costOutputList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: null,
|
||||||
|
money: null,
|
||||||
|
year: null,
|
||||||
|
month: null,
|
||||||
|
costType: null,
|
||||||
|
isDel: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询项目成本产值列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCostOutput(this.queryParams).then(response => {
|
||||||
|
this.costOutputList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
projectId: null,
|
||||||
|
money: null,
|
||||||
|
year: null,
|
||||||
|
month: null,
|
||||||
|
costType: null,
|
||||||
|
remark: null,
|
||||||
|
isDel: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: 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
|
||||||
|
getCostOutput(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) {
|
||||||
|
updateCostOutput(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCostOutput(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 delCostOutput(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('project/costOutput/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `costOutput_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -385,8 +385,7 @@
|
||||||
command="handleAssess"
|
command="handleAssess"
|
||||||
icon="el-icon-coordinate"
|
icon="el-icon-coordinate"
|
||||||
v-hasPermi="['project:assess:list']"
|
v-hasPermi="['project:assess:list']"
|
||||||
>季度考核管理</el-dropdown-item
|
>季度考核管理</el-dropdown-item>
|
||||||
>
|
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleBuildNode"
|
command="handleBuildNode"
|
||||||
icon="el-icon-data-analysis"
|
icon="el-icon-data-analysis"
|
||||||
|
@ -453,12 +452,17 @@
|
||||||
v-hasPermi="['video:videoConfig:list']"
|
v-hasPermi="['video:videoConfig:list']"
|
||||||
>视频配置</el-dropdown-item
|
>视频配置</el-dropdown-item
|
||||||
>
|
>
|
||||||
|
<el-dropdown-item
|
||||||
|
command="handleCostOutput"
|
||||||
|
icon="el-icon-money"
|
||||||
|
v-hasPermi="['project:costOutput:edit']"
|
||||||
|
>项目成本产值管理</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleDelete"
|
command="handleDelete"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-hasPermi="['project:surProject:remove']"
|
v-hasPermi="['project:surProject:remove']"
|
||||||
>删除项目</el-dropdown-item
|
>删除项目</el-dropdown-item>
|
||||||
>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
@ -795,6 +799,7 @@
|
||||||
<materialSealDrawer ref="materialSeal"></materialSealDrawer>
|
<materialSealDrawer ref="materialSeal"></materialSealDrawer>
|
||||||
<projectMeasureDrawer ref="projectMeasure"></projectMeasureDrawer>
|
<projectMeasureDrawer ref="projectMeasure"></projectMeasureDrawer>
|
||||||
<videoConfigDrawer ref="videoConfig"></videoConfigDrawer>
|
<videoConfigDrawer ref="videoConfig"></videoConfigDrawer>
|
||||||
|
<costOutputDrawer ref="costOutput"></costOutputDrawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -820,9 +825,10 @@ import attendanceDrawer from "../surProjectAttendance/attendanceDrawer.vue";
|
||||||
import projectDeptWroksDrawer from "../projectDeptWroks/projectDeptWroksDrawer.vue";
|
import projectDeptWroksDrawer from "../projectDeptWroks/projectDeptWroksDrawer.vue";
|
||||||
import insuranceDrawer from "../surProjectInsurance/insuranceDrawer.vue";
|
import insuranceDrawer from "../surProjectInsurance/insuranceDrawer.vue";
|
||||||
import projectCheckingDrawer from "../projectChecking/projectCheckingDrawer.vue";
|
import projectCheckingDrawer from "../projectChecking/projectCheckingDrawer.vue";
|
||||||
import materialSealDrawer from "../materialSeal/projectMaterialSealDrawer.vue";
|
import materialSealDrawer from "@/views/project/materialSeal/projectMaterialSealDrawer.vue";
|
||||||
import projectMeasureDrawer from "../projectMeasure/projectMeasureDrawer.vue";
|
import projectMeasureDrawer from "../projectMeasure/projectMeasureDrawer.vue";
|
||||||
import videoConfigDrawer from "@/views/video/videoConfig/videoConfigDrawer";
|
import videoConfigDrawer from "@/views/video/videoConfig/videoConfigDrawer";
|
||||||
|
import costOutputDrawer from '@/views/project/costOutput/costOutputDrawer.vue'
|
||||||
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -843,6 +849,7 @@ export default {
|
||||||
materialSealDrawer,
|
materialSealDrawer,
|
||||||
projectMeasureDrawer,
|
projectMeasureDrawer,
|
||||||
videoConfigDrawer,
|
videoConfigDrawer,
|
||||||
|
costOutputDrawer
|
||||||
},
|
},
|
||||||
dicts: [
|
dicts: [
|
||||||
"sys_check_state",
|
"sys_check_state",
|
||||||
|
@ -1092,6 +1099,9 @@ export default {
|
||||||
case "handleVideoConfig":
|
case "handleVideoConfig":
|
||||||
this.$refs.videoConfig.show(row);
|
this.$refs.videoConfig.show(row);
|
||||||
break;
|
break;
|
||||||
|
case "handleCostOutput":
|
||||||
|
this.$refs.costOutput.show(row);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,48 +138,36 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tool-bar">
|
<div class="tool-bar">
|
||||||
<el-button
|
<el-button type="primary" @click="doPrjUserMgr" v-hasPermi="['project:surProjectUserInfo:edit']"
|
||||||
type="primary"
|
icon="el-icon-time">项目人员</el-button>
|
||||||
@click="doPrjProcessMgr"
|
<el-button type="primary" @click="doPrjProcessMgr" v-hasPermi="['project:surProject:edit']"
|
||||||
v-hasPermi="['project:surProject:edit']"
|
icon="el-icon-time">进度管理</el-button>
|
||||||
icon="el-icon-time"
|
<el-button type="primary" @click="doPrjAssess" v-hasPermi="['project:assess:list']"
|
||||||
>进度管理</el-button
|
icon="el-icon-coordinate">季度考核管理</el-button>
|
||||||
>
|
<el-button type="primary" @click="doPrjBuildNode" v-hasPermi="['project:build_node_data:list']"
|
||||||
<el-button
|
icon="el-icon-data-analysis">计划节点管理</el-button>
|
||||||
type="primary"
|
<el-button type="primary" @click="doPrjAttendance" v-hasPermi="['project:surProjectAttendance:add']"
|
||||||
@click="doPrjAssess"
|
icon="el-icon-s-check">今日出勤</el-button>
|
||||||
v-hasPermi="['project:assess:list']"
|
<el-button type="primary" @click="doPrjCostOutput" v-hasPermi="['project:costOutput:edit']"
|
||||||
icon="el-icon-coordinate"
|
icon="el-icon-money">项目成本产值管理</el-button>
|
||||||
>季度考核管理</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="doPrjBuildNode"
|
|
||||||
v-hasPermi="['project:build_node_data:list']"
|
|
||||||
icon="el-icon-data-analysis"
|
|
||||||
>计划节点管理</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="doPrjAttendance"
|
|
||||||
v-hasPermi="['project:surProjectAttendance:add']"
|
|
||||||
icon="el-icon-s-check"
|
|
||||||
>今日出勤</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<ProjectScheduleDlg ref="prjSchDlg"></ProjectScheduleDlg>
|
<ProjectScheduleDlg ref="prjSchDlg"></ProjectScheduleDlg>
|
||||||
<assess-drawer ref="assessDrawer"></assess-drawer>
|
<assess-drawer ref="assessDrawer"></assess-drawer>
|
||||||
<build-node-drawer ref="nodeDrawer"></build-node-drawer>
|
<build-node-drawer ref="nodeDrawer"></build-node-drawer>
|
||||||
<attendance-drawer ref="attDrawer"></attendance-drawer>
|
<attendance-drawer ref="attDrawer"></attendance-drawer>
|
||||||
|
<projectUserInfoDrawer ref="prjUser" size="50%" :visible.sync="showPrjUser" :form-data="prj"/>
|
||||||
|
<costOutputDrawer ref="costOutput"></costOutputDrawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listSurProject } from "@/api/project/surProject";
|
import { listSurProject } from "@/api/project/surProject";
|
||||||
|
import projectUserInfoDrawer from "@/views/project/surProjectUserInfo/projectUserInfoDrawer.vue";
|
||||||
import ProjectScheduleDlg from "../surProjectSchedule/ProjectScheduleDlg.vue";
|
import ProjectScheduleDlg from "../surProjectSchedule/ProjectScheduleDlg.vue";
|
||||||
import AssessDrawer from "../surProjectQuarterlyAssess/assessDrawer.vue";
|
import AssessDrawer from "../surProjectQuarterlyAssess/assessDrawer.vue";
|
||||||
import buildNodeDrawer from "../surBuildNode/buildNodeDrawer.vue";
|
import buildNodeDrawer from "../surBuildNode/buildNodeDrawer.vue";
|
||||||
import attendanceDrawer from "../surProjectAttendance/attendanceDrawer.vue";
|
import attendanceDrawer from "../surProjectAttendance/attendanceDrawer.vue";
|
||||||
|
import costOutputDrawer from '@/views/project/costOutput/costOutputDrawer.vue'
|
||||||
export default {
|
export default {
|
||||||
dicts: [
|
dicts: [
|
||||||
"sys_check_state",
|
"sys_check_state",
|
||||||
|
@ -196,12 +184,15 @@ export default {
|
||||||
AssessDrawer,
|
AssessDrawer,
|
||||||
buildNodeDrawer,
|
buildNodeDrawer,
|
||||||
attendanceDrawer,
|
attendanceDrawer,
|
||||||
|
projectUserInfoDrawer,
|
||||||
|
costOutputDrawer
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
prjs: [],
|
prjs: [],
|
||||||
selPrj: 0,
|
selPrj: 0,
|
||||||
prj: {},
|
prj: {},
|
||||||
|
showPrjUser:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -210,6 +201,13 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
doPrjCostOutput(){
|
||||||
|
this.$refs.costOutput.show(this.prj);
|
||||||
|
},
|
||||||
|
doPrjUserMgr(){
|
||||||
|
this.prj.projectId=this.prj.id;
|
||||||
|
this.showPrjUser=true;
|
||||||
|
},
|
||||||
doPrjAttendance() {
|
doPrjAttendance() {
|
||||||
this.$refs.attDrawer.show(this.prj);
|
this.$refs.attDrawer.show(this.prj);
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
package com.yanzhu.jh.project.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectCostOutput;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectCostOutputService;
|
||||||
|
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.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目成本产值Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/costOutput")
|
||||||
|
public class SurProjectCostOutputController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISurProjectCostOutputService surProjectCostOutputService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:costOutput:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SurProjectCostOutput> list = surProjectCostOutputService.selectSurProjectCostOutputList(surProjectCostOutput);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出项目成本产值列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:costOutput:export')")
|
||||||
|
@Log(title = "项目成本产值", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
List<SurProjectCostOutput> list = surProjectCostOutputService.selectSurProjectCostOutputList(surProjectCostOutput);
|
||||||
|
ExcelUtil<SurProjectCostOutput> util = new ExcelUtil<SurProjectCostOutput>(SurProjectCostOutput.class);
|
||||||
|
util.exportExcel(response, list, "项目成本产值数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目成本产值详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:costOutput:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(surProjectCostOutputService.selectSurProjectCostOutputById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目成本产值
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:costOutput:add')")
|
||||||
|
@Log(title = "项目成本产值", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectCostOutputService.insertSurProjectCostOutput(surProjectCostOutput));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目成本产值
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:costOutput:edit')")
|
||||||
|
@Log(title = "项目成本产值", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectCostOutputService.updateSurProjectCostOutput(surProjectCostOutput));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目成本产值
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:costOutput:remove')")
|
||||||
|
@Log(title = "项目成本产值", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(surProjectCostOutputService.deleteSurProjectCostOutputByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.yanzhu.jh.project.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目成本产值对象 sur_project_cost_output
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-27
|
||||||
|
*/
|
||||||
|
public class SurProjectCostOutput extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 项目编号 */
|
||||||
|
@Excel(name = "项目编号")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/** 金额 */
|
||||||
|
@Excel(name = "金额")
|
||||||
|
private Long money;
|
||||||
|
|
||||||
|
/** 年份 */
|
||||||
|
@Excel(name = "年份")
|
||||||
|
private Long year;
|
||||||
|
|
||||||
|
/** 月份 */
|
||||||
|
@Excel(name = "月份")
|
||||||
|
private Long month;
|
||||||
|
|
||||||
|
/** 类型,字典project_cost_output_type */
|
||||||
|
@Excel(name = "类型,字典project_cost_output_type")
|
||||||
|
private Long costType;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setProjectId(Long projectId)
|
||||||
|
{
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProjectId()
|
||||||
|
{
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
public void setMoney(Long money)
|
||||||
|
{
|
||||||
|
this.money = money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMoney()
|
||||||
|
{
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
public void setYear(Long year)
|
||||||
|
{
|
||||||
|
this.year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getYear()
|
||||||
|
{
|
||||||
|
return year;
|
||||||
|
}
|
||||||
|
public void setMonth(Long month)
|
||||||
|
{
|
||||||
|
this.month = month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMonth()
|
||||||
|
{
|
||||||
|
return month;
|
||||||
|
}
|
||||||
|
public void setCostType(Long costType)
|
||||||
|
{
|
||||||
|
this.costType = costType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCostType()
|
||||||
|
{
|
||||||
|
return costType;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsDel()
|
||||||
|
{
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("projectId", getProjectId())
|
||||||
|
.append("money", getMoney())
|
||||||
|
.append("year", getYear())
|
||||||
|
.append("month", getMonth())
|
||||||
|
.append("costType", getCostType())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("isDel", getIsDel())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.yanzhu.jh.project.mapper;
|
||||||
|
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectCostOutput;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目成本产值Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-27
|
||||||
|
*/
|
||||||
|
public interface SurProjectCostOutputMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值
|
||||||
|
*
|
||||||
|
* @param id 项目成本产值主键
|
||||||
|
* @return 项目成本产值
|
||||||
|
*/
|
||||||
|
public SurProjectCostOutput selectSurProjectCostOutputById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值列表
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 项目成本产值集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectCostOutput> selectSurProjectCostOutputList(SurProjectCostOutput surProjectCostOutput);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目成本产值
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectCostOutput(SurProjectCostOutput surProjectCostOutput);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目成本产值
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectCostOutput(SurProjectCostOutput surProjectCostOutput);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目成本产值
|
||||||
|
*
|
||||||
|
* @param id 项目成本产值主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCostOutputById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目成本产值
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCostOutputByIds(Long[] ids);
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.yanzhu.jh.project.service;
|
||||||
|
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectCostOutput;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目成本产值Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-27
|
||||||
|
*/
|
||||||
|
public interface ISurProjectCostOutputService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值
|
||||||
|
*
|
||||||
|
* @param id 项目成本产值主键
|
||||||
|
* @return 项目成本产值
|
||||||
|
*/
|
||||||
|
public SurProjectCostOutput selectSurProjectCostOutputById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值列表
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 项目成本产值集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectCostOutput> selectSurProjectCostOutputList(SurProjectCostOutput surProjectCostOutput);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目成本产值
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectCostOutput(SurProjectCostOutput surProjectCostOutput);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目成本产值
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectCostOutput(SurProjectCostOutput surProjectCostOutput);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目成本产值
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的项目成本产值主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCostOutputByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目成本产值信息
|
||||||
|
*
|
||||||
|
* @param id 项目成本产值主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectCostOutputById(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.yanzhu.jh.project.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.yanzhu.jh.project.domain.SurProjectCostOutput;
|
||||||
|
import com.yanzhu.jh.project.mapper.SurProjectCostOutputMapper;
|
||||||
|
import com.yanzhu.jh.project.service.ISurProjectCostOutputService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
/**
|
||||||
|
* 项目成本产值Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SurProjectCostOutputServiceImpl implements ISurProjectCostOutputService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SurProjectCostOutputMapper surProjectCostOutputMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值
|
||||||
|
*
|
||||||
|
* @param id 项目成本产值主键
|
||||||
|
* @return 项目成本产值
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SurProjectCostOutput selectSurProjectCostOutputById(Long id)
|
||||||
|
{
|
||||||
|
return surProjectCostOutputMapper.selectSurProjectCostOutputById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目成本产值列表
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 项目成本产值
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurProjectCostOutput> selectSurProjectCostOutputList(SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
return surProjectCostOutputMapper.selectSurProjectCostOutputList(surProjectCostOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增项目成本产值
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSurProjectCostOutput(SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
surProjectCostOutput.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
surProjectCostOutput.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return surProjectCostOutputMapper.insertSurProjectCostOutput(surProjectCostOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目成本产值
|
||||||
|
*
|
||||||
|
* @param surProjectCostOutput 项目成本产值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSurProjectCostOutput(SurProjectCostOutput surProjectCostOutput)
|
||||||
|
{
|
||||||
|
surProjectCostOutput.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
surProjectCostOutput.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return surProjectCostOutputMapper.updateSurProjectCostOutput(surProjectCostOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目成本产值
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的项目成本产值主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectCostOutputByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return surProjectCostOutputMapper.deleteSurProjectCostOutputByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目成本产值信息
|
||||||
|
*
|
||||||
|
* @param id 项目成本产值主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectCostOutputById(Long id)
|
||||||
|
{
|
||||||
|
return surProjectCostOutputMapper.deleteSurProjectCostOutputById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?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.yanzhu.jh.project.mapper.SurProjectCostOutputMapper">
|
||||||
|
|
||||||
|
<resultMap type="SurProjectCostOutput" id="SurProjectCostOutputResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="projectId" column="project_id" />
|
||||||
|
<result property="money" column="money" />
|
||||||
|
<result property="year" column="year" />
|
||||||
|
<result property="month" column="month" />
|
||||||
|
<result property="costType" column="cost_type" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="isDel" column="is_del" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSurProjectCostOutputVo">
|
||||||
|
select id, project_id, money, year, month, cost_type, remark, is_del, create_by, create_time, update_by, update_time from sur_project_cost_output
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSurProjectCostOutputList" parameterType="SurProjectCostOutput" resultMap="SurProjectCostOutputResult">
|
||||||
|
<include refid="selectSurProjectCostOutputVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||||
|
<if test="money != null "> and money = #{money}</if>
|
||||||
|
<if test="year != null "> and year = #{year}</if>
|
||||||
|
<if test="month != null "> and month = #{month}</if>
|
||||||
|
<if test="costType != null "> and cost_type = #{costType}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSurProjectCostOutputById" parameterType="Long" resultMap="SurProjectCostOutputResult">
|
||||||
|
<include refid="selectSurProjectCostOutputVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSurProjectCostOutput" parameterType="SurProjectCostOutput" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sur_project_cost_output
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">project_id,</if>
|
||||||
|
<if test="money != null">money,</if>
|
||||||
|
<if test="year != null">year,</if>
|
||||||
|
<if test="month != null">month,</if>
|
||||||
|
<if test="costType != null">cost_type,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="isDel != null">is_del,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">#{projectId},</if>
|
||||||
|
<if test="money != null">#{money},</if>
|
||||||
|
<if test="year != null">#{year},</if>
|
||||||
|
<if test="month != null">#{month},</if>
|
||||||
|
<if test="costType != null">#{costType},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="isDel != null">#{isDel},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurProjectCostOutput" parameterType="SurProjectCostOutput">
|
||||||
|
update sur_project_cost_output
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||||||
|
<if test="money != null">money = #{money},</if>
|
||||||
|
<if test="year != null">year = #{year},</if>
|
||||||
|
<if test="month != null">month = #{month},</if>
|
||||||
|
<if test="costType != null">cost_type = #{costType},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectCostOutputById" parameterType="Long">
|
||||||
|
delete from sur_project_cost_output where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectCostOutputByIds" parameterType="String">
|
||||||
|
delete from sur_project_cost_output where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
|
@ -371,7 +371,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ON a.dict_value=b.danger_type ORDER BY cnt DESC,a.dict_value+0
|
ON a.dict_value=b.danger_type ORDER BY cnt DESC,a.dict_value+0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSummaryByProject" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
<select id="selectSummaryByProject" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
||||||
select a.projectId,a.prjName projectName,a.proble id,if(b.timoutNoComp is null,0,b.timoutNoComp) infoType,if(c.timoutComp is null,0,c.timoutComp) checkState from
|
select a.projectId,a.prjName projectName,a.proble id,if(b.timoutNoComp is null,0,b.timoutNoComp) infoType,
|
||||||
|
if(c.timoutComp is null,0,c.timoutComp) checkState,
|
||||||
|
if(d.comp is null,0,d.comp) isDel
|
||||||
|
from
|
||||||
(
|
(
|
||||||
select projectId,prjName,count(1) proble from vw_smz_ssp_problemmodify_audit
|
select projectId,prjName,count(1) proble from vw_smz_ssp_problemmodify_audit
|
||||||
where infoType=#{infoType}
|
where infoType=#{infoType}
|
||||||
|
@ -395,6 +398,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
group by projectId
|
group by projectId
|
||||||
|
|
||||||
) b on a.projectId=b.projectId
|
) b on a.projectId=b.projectId
|
||||||
|
|
||||||
left join (
|
left join (
|
||||||
SELECT projectid,COUNT(1) timoutComp FROM vw_smz_ssp_problemmodify_audit WHERE (updateTime is null and date(nickedTime) < date(now()) )
|
SELECT projectid,COUNT(1) timoutComp FROM vw_smz_ssp_problemmodify_audit WHERE (updateTime is null and date(nickedTime) < date(now()) )
|
||||||
and infoType=#{infoType}
|
and infoType=#{infoType}
|
||||||
|
@ -406,6 +410,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
GROUP BY projectid
|
GROUP BY projectid
|
||||||
|
|
||||||
) c on a.projectId=c.projectId
|
) c on a.projectId=c.projectId
|
||||||
|
|
||||||
|
left join(
|
||||||
|
select projectid,count(1) comp from vw_smz_ssp_problemmodify_audit where
|
||||||
|
checkState=4
|
||||||
|
and infoType=#{infoType}
|
||||||
|
<if test="projectId>0">and projectId=#{projectId}</if>
|
||||||
|
<if test="deptId >0 ">AND deptid = #{deptId}</if>
|
||||||
|
<if test="roleType > 0">AND roletype=#{roleType}</if>
|
||||||
|
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||||
|
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||||
|
group by projectId
|
||||||
|
|
||||||
|
) d on a.projectId=d.projectId
|
||||||
|
|
||||||
order by a.proble desc
|
order by a.proble desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue