From 75b93ff7f0b8bf6397a5ab0ca300f860751e8fd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Sat, 11 Nov 2023 10:11:48 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/SysDeptServiceImpl.java | 2 +
ruoyi-ui/src/api/publics.js | 1 +
.../statistics/statisticsProject/index.vue | 76 +++++---
.../controller/ProjectViewController.java | 173 +-----------------
.../yanzhu/jh/publics/PublicsController.java | 16 +-
.../mapper/project/ProjectViewMapper.xml | 9 +-
6 files changed, 76 insertions(+), 201 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
index 07bded4a..a5bbeb5e 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -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);
}
diff --git a/ruoyi-ui/src/api/publics.js b/ruoyi-ui/src/api/publics.js
index 0f15e766..114c0e52 100644
--- a/ruoyi-ui/src/api/publics.js
+++ b/ruoyi-ui/src/api/publics.js
@@ -44,6 +44,7 @@ const getUserList = (data) => {
})
}
+// 查询项目部门信息
const queryUnitList = (query) => {
return request({
url: '/publics/queryUnitList',
diff --git a/ruoyi-ui/src/views/statistics/statisticsProject/index.vue b/ruoyi-ui/src/views/statistics/statisticsProject/index.vue
index 68675a2c..3f1a10f1 100644
--- a/ruoyi-ui/src/views/statistics/statisticsProject/index.vue
+++ b/ruoyi-ui/src/views/statistics/statisticsProject/index.vue
@@ -102,19 +102,48 @@
show-overflow-tooltip
/>
-
-
- 已办理
- 未办理
-
+
+
+
+
+
+ 已接入
+ 未接入
+
+
+
+
+
+ 正常
+ 滞后
+
+
+
+
+ 已接入
+ 未接入
+
+
+
+
+
+
+
+
-
-
- 已办理
- 未办理
-
-
-
+
+
+
+ 已办理
+ 未办理
+
+
+
+
+ 已办理
+ 未办理
+
+
@@ -124,7 +153,7 @@
-
+
@@ -135,13 +164,6 @@
-
-
- 已开通
- 未开通
-
-
-
@@ -151,14 +173,16 @@
- {{scope.row.aijk}}
+ 已开通
未开通
+
-
-
-
+
+
+
+
@@ -236,7 +260,7 @@
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column.property是表头的key
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',
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java
index bc78a9d1..4a8c6880 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/ProjectViewController.java
@@ -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);
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/publics/PublicsController.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/publics/PublicsController.java
index 29d10dee..00fee7e4 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/publics/PublicsController.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/publics/PublicsController.java
@@ -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));
diff --git a/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml
index c49d15dc..bd3c7070 100644
--- a/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml
+++ b/yanzhu-jh/src/main/resources/mapper/project/ProjectViewMapper.xml
@@ -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()) ]]> 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()) ]]> date(a.nickedTime)) as aqyjs,
(select CASE when b.plan_end_date > 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)
and sp.projectName like concat('%', #{projectName}, '%')
and sp.deptId = #{deptId}
and sp.projectType = #{projectType}
and sp.projectNature = #{projectNature}
ORDER by sp.projectSort
-
\ No newline at end of file