提交代码

dev_xds
姜玉琦 2023-09-26 23:48:50 +08:00
parent eba10b7cb7
commit 5278145ffd
16 changed files with 653 additions and 12 deletions

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 项目数据汇总
export function selectStatisticsProjectList(query) {
return request({
url: '/statistics/project/selectStatisticsProjectList',
method: 'get',
params: query
})
}

View File

@ -149,7 +149,7 @@
<el-table-column
label="操作"
align="center"
width="120"
width="180"
fixed="right"
class-name="small-padding fixed-width"
>

View File

@ -294,7 +294,7 @@
align="center"
fixed="right"
class-name="small-padding fixed-width"
width="150"
width="200"
>
<template slot-scope="scope">
<el-button

View File

@ -290,7 +290,7 @@
align="center"
class-name="small-padding fixed-width"
fixed="right"
width="150"
width="200"
>
<template slot-scope="scope">
<el-button

View File

@ -173,6 +173,7 @@
align="center"
fixed="right"
class-name="small-padding fixed-width"
width="150"
>
<template slot-scope="scope">
<el-button

View File

@ -260,7 +260,7 @@
label="操作"
align="center"
class-name="small-padding fixed-width"
width="150"
width="200"
fixed="right"
>
<template slot-scope="scope">

View File

@ -161,6 +161,7 @@
align="center"
fixed="right"
class-name="small-padding fixed-width"
width="150"
>
<template slot-scope="scope">
<el-button

View File

@ -291,7 +291,7 @@
align="center"
class-name="small-padding fixed-width"
fixed="right"
width="150"
width="200"
>
<template slot-scope="scope">
<el-button

View File

@ -169,7 +169,7 @@
align="center"
fixed="right"
class-name="small-padding fixed-width"
width="120"
width="150"
>
<template slot-scope="scope">
<el-button
@ -219,7 +219,7 @@
@pagination="getList"
/>
<!-- 添加或修改项目举牌测量对话框 -->
<!-- 添加或修改实测实量对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目名称" prop="projectName">
@ -490,7 +490,7 @@ export default {
this.getList();
} else {
this.projectMeasureList = [];
this.$message.error("当前项目未分配总包单位,不能办理举牌测量!");
this.$message.error("当前项目未分配总包单位,不能办理实测实量!");
this.isUnit = false;
}
});
@ -587,9 +587,9 @@ export default {
}
});
this.open = true;
this.title = "添加项目举牌测量";
this.title = "添加实测实量";
} else {
this.$message.error("当前项目未分配总包单位,不能办理举牌测量!");
this.$message.error("当前项目未分配总包单位,不能办理实测实量!");
}
},
/** 修改按钮操作 */
@ -605,7 +605,7 @@ export default {
}
});
this.open = true;
this.title = "修改项目举牌测量";
this.title = "修改实测实量";
});
},
/** 提交按钮 */
@ -635,7 +635,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除项目举牌测量编号为"' + ids + '"的数据项?')
.confirm('是否确认删除实测实量编号为"' + ids + '"的数据项?')
.then(function () {
return delProjectMeasure(ids);
})

View File

@ -0,0 +1,255 @@
<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="projectName">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目分类" prop="projectType">
<el-select
v-model="queryParams.projectType"
placeholder="请选择项目分类"
clearable
>
<el-option
v-for="dict in dict.type.project_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="建设类型" prop="projectNature">
<el-select
v-model="queryParams.projectNature"
placeholder="请选择项目建设类型"
clearable
>
<el-option
v-for="dict in dict.type.project_build_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="责任主体" prop="deptId">
<el-select v-model="queryParams.deptId" placeholder="请选择责任主体" clearable>
<el-option
v-for="dict in depts"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="汇总时间">
<el-date-picker
v-model="daterangeTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</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="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="dataList"
:span-method="objectSpanMethod"
stripe border
>
<el-table-column
label="项目名称"
align="left"
prop="projectName"
width="180"
class-name="small-padding fixed-width"
fixed="left"
show-overflow-tooltip
/>
<el-table-column label="参建单位" align="left" prop="unitName" width="163" show-overflow-tooltip/>
<el-table-column label="安责险" align="center" prop="azx" width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.azx==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.azx==0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="一切险" align="center" prop="yqx" width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.yqx==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.yqx==0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="安全" align="center">
<el-table-column label="安全隐患排查" align="center">
<el-table-column label="甲方代表" align="center" prop="aqyhpc_jfdb" width="90" show-overflow-tooltip/>
<el-table-column label="监理单位" align="center" prop="aqyhpc_jldw" width="90" show-overflow-tooltip/>
<el-table-column label="总包单位" align="center" prop="aqyhpc_zbdw" width="90" show-overflow-tooltip/>
</el-table-column>
<el-table-column label="特种人员" align="center" prop="tzry" width="90" show-overflow-tooltip/>
<el-table-column label="应急演练" align="center" prop="yjyl" width="90" show-overflow-tooltip/>
<el-table-column label="专项培训" align="center" prop="zxpx" width="90" show-overflow-tooltip/>
</el-table-column>
<el-table-column label="质量" align="center">
<el-table-column label="质量隐患排查" align="center">
<el-table-column label="甲方代表" align="center" prop="zlyhpc_jfdb" width="90" show-overflow-tooltip/>
<el-table-column label="监理单位" align="center" prop="zlyhpc_jldw" width="90" show-overflow-tooltip/>
<el-table-column label="总包单位" align="center" prop="zlyhpc_zbdw" width="90" show-overflow-tooltip/>
</el-table-column>
<el-table-column label="取样复试" align="center" prop="clqyfs" width="90" show-overflow-tooltip/>
<el-table-column label="材料封样" align="center" prop="clfy" width="90" show-overflow-tooltip/>
<el-table-column label="实测实量" align="center" prop="cscl" width="90" show-overflow-tooltip/>
<el-table-column label="举牌验收" align="center" prop="jpys" width="90" show-overflow-tooltip/>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
selectStatisticsProjectList
} from "@/api/statistics/statisticsProject";
export default {
name: "statisticsProject",
components: {},
dicts: [
"project_build_type",
"project_category",
],
data() {
return {
//
loading: true,
//
showSearch: true,
//
total: 0,
//
queryParams: {
projectName: null,
projectType: "1",
projectNature: null,
deptId: null,
},
//
form: {},
//
rules: {},
depts: [],
dataList:[],
daterangeTime:[],
};
},
created() {
this.getList();
this.$api.publics.getZgsDeptList().then((d) => {
this.depts = d?.data || [];
});
},
methods: {
/** 查询项目管理列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeTime && "" != this.daterangeTime) {
this.queryParams.params["beginTime"] = this.daterangeTime[0];
this.queryParams.params["endTime"] = this.daterangeTime[1];
}
selectStatisticsProjectList(this.queryParams).then((response) => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column.propertykey
let _row = 1;
if([0,4,5,10,11].includes(columnIndex)){
var spanArr = this.getSpanArr(column.property);
_row = spanArr[rowIndex];
}
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
},
//
getSpanArr(spanKey) {
let data = this.dataList;
var spanArr = [];
var pos = "";
for (var i = 0; i < data.length; i++) {
if (i === 0) {
spanArr.push(1);
pos = 0;
} else {
//
if (data[i][spanKey] === data[i - 1][spanKey] && data[i].projectId === data[i - 1].projectId) {
spanArr[pos] += 1;
spanArr.push(0);
} else {
spanArr.push(1);
pos = i;
}
}
}
return spanArr;
},
/** 导出按钮操作 */
handleExport() {
this.download(
"statistics/project/exportView",
{
...this.queryParams,
},
`项目数据汇总_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

View File

@ -0,0 +1,51 @@
package com.yanzhu.jh.project.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.yanzhu.jh.project.domain.SurProject;
import com.yanzhu.jh.project.domain.vo.ProjectViewExport;
import com.yanzhu.jh.project.service.IProjectViewService;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* ProjectViewController
*
* @author JiangYuQi
* @date 2023-07-29
*/
@RestController
@RequestMapping("/statistics/project")
public class ProjectViewController extends BaseBuildNodeController{
@Autowired
IProjectViewService projectViewService;
@GetMapping("/selectStatisticsProjectList")
public TableDataInfo selectStatisticsProjectList(SurProject surProject)
{
List<ProjectViewExport> list = projectViewService.selectStatisticsProjectList(surProject);
return getDataTable(list);
}
/**
*
*/
@Log(title = "项目数据汇总", businessType = BusinessType.EXPORT)
@PostMapping("/exportView")
public void exportView(HttpServletResponse response, SurProject surProject)
{
List<ProjectViewExport> list = projectViewService.selectStatisticsProjectList(surProject);
ExcelUtil<ProjectViewExport> util = new ExcelUtil<ProjectViewExport>(ProjectViewExport.class);
util.exportExcel(response, list, "项目数据汇总");
}
}

View File

@ -0,0 +1,198 @@
package com.yanzhu.jh.project.domain.vo;
import com.ruoyi.common.annotation.Excel;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import java.io.Serializable;
public class ProjectViewExport implements Serializable {
private static final long serialVersionUID = 1L;
@Excel(name = "项目名称", width = 30,align = HorizontalAlignment.LEFT)
private String projectName;
@Excel(name = "参建单位", width = 30,align = HorizontalAlignment.LEFT)
private String unitName;
@Excel(name = "安责险", width = 20,align = HorizontalAlignment.CENTER, dictType = "sur_project_insurance_state")
private String azx;
@Excel(name = "一切险", width = 20,align = HorizontalAlignment.CENTER, dictType = "sur_project_insurance_state")
private String yqx;
@Excel(name = "安全隐患-甲方经理", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String aqyhpc_jfdb;
@Excel(name = "安全隐患-监理单位", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String aqyhpc_jldw;
@Excel(name = "安全隐患-总包单位", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String aqyhpc_zbdw;
@Excel(name = "特种人员", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String tzry;
@Excel(name = "应急演练", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String yjyl;
@Excel(name = "专项培训", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String zxpx;
@Excel(name = "质量隐患-甲方经理", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String zlyhpc_jfdb;
@Excel(name = "质量隐患-监理单位", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String zlyhpc_jldw;
@Excel(name = "质量隐患-总包单位", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String zlyhpc_zbdw;
@Excel(name = "材料取样复试", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String clqyfs;
@Excel(name = "材料封样", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String clfy;
@Excel(name = "实测实量", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String cscl;
@Excel(name = "举牌验收", width = 20,align = HorizontalAlignment.CENTER, isStatistics = true)
private String jpys;
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getUnitName() {
return unitName;
}
public void setUnitName(String unitName) {
this.unitName = unitName;
}
public String getAzx() {
return azx;
}
public void setAzx(String azx) {
this.azx = azx;
}
public String getYqx() {
return yqx;
}
public void setYqx(String yqx) {
this.yqx = yqx;
}
public String getAqyhpc_jfdb() {
return aqyhpc_jfdb;
}
public void setAqyhpc_jfdb(String aqyhpc_jfdb) {
this.aqyhpc_jfdb = aqyhpc_jfdb;
}
public String getAqyhpc_jldw() {
return aqyhpc_jldw;
}
public void setAqyhpc_jldw(String aqyhpc_jldw) {
this.aqyhpc_jldw = aqyhpc_jldw;
}
public String getAqyhpc_zbdw() {
return aqyhpc_zbdw;
}
public void setAqyhpc_zbdw(String aqyhpc_zbdw) {
this.aqyhpc_zbdw = aqyhpc_zbdw;
}
public String getTzry() {
return tzry;
}
public void setTzry(String tzry) {
this.tzry = tzry;
}
public String getYjyl() {
return yjyl;
}
public void setYjyl(String yjyl) {
this.yjyl = yjyl;
}
public String getZxpx() {
return zxpx;
}
public void setZxpx(String zxpx) {
this.zxpx = zxpx;
}
public String getZlyhpc_jfdb() {
return zlyhpc_jfdb;
}
public void setZlyhpc_jfdb(String zlyhpc_jfdb) {
this.zlyhpc_jfdb = zlyhpc_jfdb;
}
public String getZlyhpc_jldw() {
return zlyhpc_jldw;
}
public void setZlyhpc_jldw(String zlyhpc_jldw) {
this.zlyhpc_jldw = zlyhpc_jldw;
}
public String getZlyhpc_zbdw() {
return zlyhpc_zbdw;
}
public void setZlyhpc_zbdw(String zlyhpc_zbdw) {
this.zlyhpc_zbdw = zlyhpc_zbdw;
}
public String getClqyfs() {
return clqyfs;
}
public void setClqyfs(String clqyfs) {
this.clqyfs = clqyfs;
}
public String getClfy() {
return clfy;
}
public void setClfy(String clfy) {
this.clfy = clfy;
}
public String getCscl() {
return cscl;
}
public void setCscl(String cscl) {
this.cscl = cscl;
}
public String getJpys() {
return jpys;
}
public void setJpys(String jpys) {
this.jpys = jpys;
}
}

View File

@ -0,0 +1,23 @@
package com.yanzhu.jh.project.mapper;
import com.yanzhu.jh.project.domain.SurProject;
import com.yanzhu.jh.project.domain.vo.ProjectViewExport;
import java.util.List;
/**
* Mapper
*
* @author JiangYuQi
* @date 2023-08-07
*/
public interface ProjectViewMapper {
/**
*
* @param surProject
* @return
*/
public List<ProjectViewExport> selectStatisticsProjectList(SurProject surProject);
}

View File

@ -0,0 +1,22 @@
package com.yanzhu.jh.project.service;
import com.yanzhu.jh.project.domain.SurProject;
import com.yanzhu.jh.project.domain.vo.ProjectViewExport;
import java.util.List;
/**
* IProjectViewService
*
* @author JiangYuQi
* @date 2023-08-05
*/
public interface IProjectViewService {
/**
*
* @param surProject
* @return
*/
public List<ProjectViewExport> selectStatisticsProjectList(SurProject surProject);
}

View File

@ -0,0 +1,33 @@
package com.yanzhu.jh.project.service.impl;
import com.yanzhu.jh.project.domain.SurProject;
import com.yanzhu.jh.project.domain.vo.ProjectViewExport;
import com.yanzhu.jh.project.mapper.ProjectViewMapper;
import com.yanzhu.jh.project.service.IProjectViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* ProjectViewServiceImpl
*
* @author JiangYuQi
* @date 2023-08-07
*/
@Service
public class ProjectViewServiceImpl implements IProjectViewService {
@Autowired
private ProjectViewMapper projectViewMapper;
/**
*
* @param surProject
* @return
*/
@Override
public List<ProjectViewExport> selectStatisticsProjectList(SurProject surProject) {
return projectViewMapper.selectStatisticsProjectList(surProject);
}
}

View File

@ -0,0 +1,47 @@
<?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.ProjectViewMapper">
<!--查询项目总包单位-->
<select id="selectStatisticsProjectList" parameterType="com.yanzhu.jh.project.domain.SurProject" resultType="com.yanzhu.jh.project.domain.vo.ProjectViewExport">
select sp.id as projectId,sp.projectName, pui.unitId,pui.unitName,
(select count(1) from smz_ssp_problemmodify a where a.projectId = sp.id and a.roleType=5 and a.infoType=0 and a.isDel=0
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and a.createTime between #{params.beginTime} and #{params.endTime}</if>
)as aqyhpc_jfdb,
(select count(1) from smz_ssp_problemmodify a where a.projectId = sp.id and a.roleType=6 and a.infoType=0 and a.isDel=0
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and a.createTime between #{params.beginTime} and #{params.endTime}</if>
)as aqyhpc_jldw,
(select count(1) from smz_ssp_problemmodify a LEFT JOIN sys_user u on u.user_name=a.createUser where a.isDel=0 and a.projectId = sp.id and a.roleType=7 and u.dept_id = pui.unitId and a.infoType=0
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and a.createTime between #{params.beginTime} and #{params.endTime}</if>
)as aqyhpc_zbdw,
(select count(1) from work_train a LEFT JOIN work_train_dept b on a.id=b.train_id and b.is_main='Y' where a.project_id=sp.id and b.dept_id=pui.unitId and a.train_type=1 and a.is_del=0 ) as yjyl,
(select count(1) from work_train a LEFT JOIN work_train_dept b on a.id=b.train_id and b.is_main='Y' where a.project_id=sp.id and b.dept_id=pui.unitId and a.train_type=0 and a.is_del=0 ) as zxpx,
(select count(1) from smz_ssp_problemmodify a where a.projectId = sp.id and a.roleType=5 and a.infoType=1 and a.isDel=0
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and a.createTime between #{params.beginTime} and #{params.endTime}</if>
)as zlyhpc_jfdb,
(select count(1) from smz_ssp_problemmodify a where a.projectId = sp.id and a.roleType=6 and a.infoType=1 and a.isDel=0
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and a.createTime between #{params.beginTime} and #{params.endTime}</if>
)as zlyhpc_jldw,
(select count(1) from smz_ssp_problemmodify a LEFT JOIN sys_user u on u.user_name=a.createUser where a.isDel=0 and a.projectId = sp.id and a.roleType=7 and u.dept_id = pui.unitId and a.infoType=1
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and a.createTime between #{params.beginTime} and #{params.endTime}</if>
)as zlyhpc_zbdw,
(select count(1) from sur_project_work_special a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0)as tzry,
(select count(1) from sur_project_check_detection a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0)as clqyfs,
(select count(1) from sur_project_checking a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0)as jpys,
(select count(1) from sur_project_measure a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0)as cscl,
(select count(1) from sur_project_material_seal a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0)as clfy,
(select count(1) from sur_project_insurance a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0 and a.insurance_type=1)as yqx,
(select count(1) from sur_project_insurance a where a.project_id = sp.id and a.dept_id=pui.unitId and a.is_del=0 and a.insurance_type=2)as azx
from sur_project sp
left JOIN sur_project_unit_info pui on sp.id=pui.projectId and pui.unitType=2
where pui.del_flag=0
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
<if test="projectType != null and projectType != ''"> and sp.projectType = #{projectType}</if>
<if test="projectNature != null and projectNature != ''"> and sp.projectNature = #{projectNature}</if>
ORDER by sp.projectSort
</select>
</mapper>