dev_xds
姜玉琦 2023-11-11 10:11:48 +08:00
parent 004cb4b139
commit 75b93ff7f0
6 changed files with 76 additions and 201 deletions

View File

@ -224,6 +224,8 @@ public class SysDeptServiceImpl implements ISysDeptService
{
throw new ServiceException("部门停用,不允许新增");
}
//单位类型向下继承
dept.setTypeFlag(info.getTypeFlag());
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
return deptMapper.insertDept(dept);
}

View File

@ -44,6 +44,7 @@ const getUserList = (data) => {
})
}
// 查询项目部门信息
const queryUnitList = (query) => {
return request({
url: '/publics/queryUnitList',

View File

@ -102,19 +102,48 @@
show-overflow-tooltip
/>
<el-table-column label="参建单位" align="left" fixed="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 label="项目详情" align="center">
<el-table-column label="劳务实名制" align="center">
<el-table-column label="劳务人员" align="center" prop="lwry" width="90" show-overflow-tooltip/>
<el-table-column label="实名制接入" align="center" prop="lwsm" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.lwsm==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.lwsm==0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="节点预警" align="center" prop="jdyj" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.jdyj==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.jdyj==2" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="环境检测" align="center" prop="hjjc" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.hjjc==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.hjjc==0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="项目预警" align="center">
<el-table-column label="AI预警" align="center" prop="aiyjs" width="90" show-overflow-tooltip/>
<el-table-column label="安全预警" align="center" prop="aqyjs" width="90" show-overflow-tooltip/>
<el-table-column label="质量预警" align="center" prop="zlyjs" width="90" show-overflow-tooltip/>
<el-table-column label="环境预警" align="center" prop="hjyjs" width="90" show-overflow-tooltip/>
</el-table-column>
</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="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" prop="aqyhpc_jfdb" width="90" show-overflow-tooltip/>
<el-table-column label="监理单位" align="center" prop="aqyhpc_jldw" width="90" show-overflow-tooltip/>
@ -124,7 +153,7 @@
<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">
<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/>
@ -135,13 +164,6 @@
<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-column label="劳务实名制" align="center" prop="lwsm" width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.lwsm!=0" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.lwsm==0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="标准化" align="center" prop="bzh" width="90" show-overflow-tooltip/>
<el-table-column label="视频监控" align="center">
<el-table-column label="实时监控" align="center" prop="ssjk" width="90">
<template slot-scope="scope">
@ -151,14 +173,16 @@
</el-table-column>
<el-table-column label="AI监控" align="center" prop="aijk" width="90">
<template slot-scope="scope">
<span v-if="scope.row.aijk!=0">{{scope.row.aijk}}</span>
<el-tag v-if="scope.row.aijk==1" type="success" effect="dark"></el-tag>
<el-tag v-if="scope.row.aijk==0" type="danger" effect="dark"></el-tag>
</template>
</el-table-column>
<el-table-column label="项目延迟摄影" align="center" prop="yssys" width="120" show-overflow-tooltip/>
</el-table-column>
<el-table-column label="工程审批" align="center">
<el-table-column label="进行中" align="center" prop="gcsq" width="90" show-overflow-tooltip/>
<el-table-column label="已完成" align="center" prop="gcsp" width="90" show-overflow-tooltip/>
<el-table-column label="工程管理" align="center">
<el-table-column label="项目标准化" align="center" prop="bzh" width="120" show-overflow-tooltip/>
<el-table-column label="审批进行中" align="center" prop="gcsq" width="120" show-overflow-tooltip/>
<el-table-column label="审批已完成" align="center" prop="gcsp" width="120" show-overflow-tooltip/>
</el-table-column>
</el-table>
</div>
@ -236,7 +260,7 @@
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column.propertykey
let _row = 1;
if([0,4,5,10,11].includes(columnIndex)){
if([0,4,7,8,12,13,18,19,27].includes(columnIndex)){
var spanArr = this.getSpanArr(column.property);
_row = spanArr[rowIndex];
}
@ -278,7 +302,7 @@
}
let url = process.env.VUE_APP_BASE_API + '/statistics/project/exportView';
axios({
method: 'get',
method: 'post',
url: url,
data: this.queryParams,
responseType: 'blob',

View File

@ -58,8 +58,8 @@ public class ProjectViewController extends BaseBuildNodeController{
return getDataTable(list);
}
@GetMapping("/exportView")
public void exportView(HttpServletResponse response, SurProject surProject)
@PostMapping("/exportView")
public void exportView(HttpServletResponse response, @RequestBody SurProject surProject)
{
surProject.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(surProject.getNowRole())){
@ -236,7 +236,7 @@ public class ProjectViewController extends BaseBuildNodeController{
sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 28, 30));//单元格合并
//合计行
sheet.setColumnWidth(0, 450 * 20 + 323);
sheet.setColumnWidth(0, 400 * 20 + 323);
sheet.setColumnWidth(1, 350 * 20 + 323);
sheet.setColumnWidth(2, 150 * 20 + 323);
sheet.setColumnWidth(3, 150 * 20 + 323);
@ -584,9 +584,12 @@ public class ProjectViewController extends BaseBuildNodeController{
if(trindex>0){
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 0, 0));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 4, 4));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 7, 7));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 8, 8));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 12, 12));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 13, 13));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 18, 19));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 18, 18));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 19, 19));//单元格合并
sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 27, 27));//单元格合并
}
trindex=0;
@ -595,168 +598,6 @@ public class ProjectViewController extends BaseBuildNodeController{
}
}
// //合计
// tempRow = sheet.createRow(rowNum++);
// tempRow.setHeight((short) 400);// 设置行高
// tempCell = tempRow.createCell(0);
// tempCell.setCellValue("合计");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(1);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(2);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, 2));//单元格合并
//
// tempCell = tempRow.createCell(3);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(4);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(5);
// tempCell.setCellValue(hj.toString());
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(6);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempRow = sheet.createRow(rowNum++);
// tempRow.setHeight((short) 1200);// 设置行高
// tempCell = tempRow.createCell(0);
// tempCell.setCellValue("神木德林荣泽能源运营股份有限公司(盖章)");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(1);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(2);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, 2));//单元格合并
//
// tempCell = tempRow.createCell(3);
// tempCell.setCellValue(vo.getCusName()+"(盖章)");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(4);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(5);
// tempCell.setCellValue(hj.toString());
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(6);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 3, 6));//单元格合并
//
// //空行
// tempRow = sheet.createRow(rowNum++);
// tempRow.setHeight((short) 400);// 设置行高
// tempCell = tempRow.createCell(0);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(1);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(2);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(3);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(4);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(5);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(6);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, 6));//单元格合并
//
// //经办人
// tempRow = sheet.createRow(rowNum++);
// tempRow.setHeight((short) 400);// 设置行高
// tempCell = tempRow.createCell(0);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(1);
// tempCell.setCellValue("经办人:");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(2);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(3);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(4);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(5);
// tempCell.setCellValue("经办人:");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(6);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// //时间
// tempRow = sheet.createRow(rowNum++);
// tempRow.setHeight((short) 400);// 设置行高
// tempCell = tempRow.createCell(0);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(1);
// tempCell.setCellValue("时 间:");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(2);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(3);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(4);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(5);
// tempCell.setCellValue("时 间:");
// tempCell.setCellStyle(contentStyle);
//
// tempCell = tempRow.createCell(6);
// tempCell.setCellValue("");
// tempCell.setCellStyle(contentStyle);
try {
outputStream =new BufferedOutputStream(response.getOutputStream());
wb.write(outputStream);

View File

@ -146,10 +146,18 @@ PublicsController extends BaseController {
public TableDataInfo queryUnitList(SurProjectUnitInfo surProjectUnitInfo)
{
surProjectUnitInfo.setNowRole(Convert.toStr(getUserFirstRole()));
if(Convert.toInt(surProjectUnitInfo.getNowRole())<5){
//查询所有符合条件的单位
}else{
//查询当前登录人所在单位
// 如果查询当前监理单位 && 当前角色是监理单位则只能查询自己单位
if(surProjectUnitInfo.getUnitTypes()!=null && surProjectUnitInfo.getUnitTypes().contains(4) && (surProjectUnitInfo.getNowRole().equals(SysRoleEnum.JLDW.getCode()) || surProjectUnitInfo.getNowRole().equals(SysRoleEnum.JLDWGR.getCode()))){
surProjectUnitInfo.setUnitId(getDeptId());
}
if(surProjectUnitInfo.getUnitType()!=null && surProjectUnitInfo.getUnitType().equals("4") && (surProjectUnitInfo.getNowRole().equals(SysRoleEnum.JLDW.getCode()) || surProjectUnitInfo.getNowRole().equals(SysRoleEnum.JLDWGR.getCode()))){
surProjectUnitInfo.setUnitId(getDeptId());
}
// 如果查询当前总包单位 && 当前角色是监理单位则只能查询自己单位
if(surProjectUnitInfo.getUnitTypes()!=null && surProjectUnitInfo.getUnitTypes().contains(2) && (surProjectUnitInfo.getNowRole().equals(SysRoleEnum.ZBDW.getCode()) || surProjectUnitInfo.getNowRole().equals(SysRoleEnum.ZBDWGR.getCode()))){
surProjectUnitInfo.setUnitId(getDeptId());
}
if(surProjectUnitInfo.getUnitType()!=null && surProjectUnitInfo.getUnitType().equals("2") && (surProjectUnitInfo.getNowRole().equals(SysRoleEnum.ZBDW.getCode()) || surProjectUnitInfo.getNowRole().equals(SysRoleEnum.ZBDWGR.getCode()))){
surProjectUnitInfo.setUnitId(getDeptId());
}
return getDataTable(surProjectUnitInfoService.selectSurProjectUnitInfoList(surProjectUnitInfo));

View File

@ -42,21 +42,20 @@
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is null)as gcsq,
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp,
(select count(1) from sur_project_standard a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as bzh,
'0' as yssys,
(select count(1) from sur_project_photography a where a.project_id = sp.id and a.is_del=0)as yssys,
'0' as hjjc,
'0' as hjyjs,
'0' as zlyjs,
'0' as aqyjs,
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=1 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as zlyjs,
(select count(1) from smz_ssp_problemmodify a where a.projectId=sp.id and a.infoType=0 and a.isDel=0 and a.checkState!=4 and date(NOW())<![CDATA[ > ]]> date(a.nickedTime)) as aqyjs,
(select CASE when b.plan_end_date &gt; now() then 1 else 2 end as jdyj from vw_sur_project_build_node_data_current b where b.id in (select max(id) from vw_sur_project_build_node_data_current a where LENGTH(a.node_lvl)=2
and a.project_id=sp.id))as jdyj
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
where (pui.del_flag=0 or pui.del_flag is null)
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and sp.deptId = #{deptId}</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>
<!--(select count(1) from sur_project_photography a where a.project_id = sp.id and a.dept_id = pui.unitId and a.state=0)as yssy-->
</mapper>