From d6262c7f4b5f228e77cfaa3c1192d6a459358558 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: Mon, 13 May 2024 22:05:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/statisticsProject/index.vue | 15 +- .../controller/ProjectViewController.java | 180 +++++++++--------- .../impl/SurProjectScheduleServiceImpl.java | 10 +- 3 files changed, 96 insertions(+), 109 deletions(-) diff --git a/ruoyi-ui/src/views/statistics/statisticsProject/index.vue b/ruoyi-ui/src/views/statistics/statisticsProject/index.vue index 5b1ab52d..f776daab 100644 --- a/ruoyi-ui/src/views/statistics/statisticsProject/index.vue +++ b/ruoyi-ui/src/views/statistics/statisticsProject/index.vue @@ -137,13 +137,6 @@ 滞后 - + /> @@ -448,7 +441,7 @@ export default { objectSpanMethod({ row, column, rowIndex, columnIndex }) { // column.property是表头的key let _row = 1; - if ([0, 4, 7, 8, 12, 13, 18, 19, 27].includes(columnIndex)) { + if ([0, 4, 6, 7, 11, 12, 13, 14, 19, 20, 21, 22, 26].includes(columnIndex)) { var spanArr = this.getSpanArr(column.property); _row = spanArr[rowIndex]; } 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 65f78c96..50999e51 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 @@ -155,14 +155,14 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 2, 8));//单元格合并 + tempCell = tempRow.createCell(9); - tempCell.setCellValue(""); + tempCell.setCellValue("安全管理"); tempCell.setCellStyle(headerStyle); - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 2, 9));//单元格合并 - tempCell = tempRow.createCell(10); - tempCell.setCellValue("安全管理"); + tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(11); @@ -197,14 +197,14 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 9, 18));//单元格合并 + tempCell = tempRow.createCell(19); - tempCell.setCellValue(""); + tempCell.setCellValue("质量管理"); tempCell.setCellStyle(headerStyle); - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 10, 19));//单元格合并 - tempCell = tempRow.createCell(20); - tempCell.setCellValue("质量管理"); + tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(21); @@ -235,39 +235,35 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 19, 27));//单元格合并 + tempCell = tempRow.createCell(28); - tempCell.setCellValue(""); + tempCell.setCellValue("视频管理"); tempCell.setCellStyle(headerStyle); - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 20, 28));//单元格合并 - tempCell = tempRow.createCell(29); - tempCell.setCellValue("视频管理"); + tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(30); tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 28, 30));//单元格合并 + tempCell = tempRow.createCell(31); - tempCell.setCellValue(""); + tempCell.setCellValue("工程管理"); tempCell.setCellStyle(headerStyle); - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 29, 31));//单元格合并 - tempCell = tempRow.createCell(32); - tempCell.setCellValue("工程管理"); + tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(33); tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(34); - tempCell.setCellValue(""); - tempCell.setCellStyle(headerStyle); - - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 32, 34));//单元格合并 + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 31, 33));//单元格合并 //合计行 sheet.setColumnWidth(0, 400 * 20 + 323); @@ -304,7 +300,6 @@ public class ProjectViewController extends BaseBuildNodeController{ sheet.setColumnWidth(31, 150 * 20 + 323); sheet.setColumnWidth(32, 150 * 20 + 323); sheet.setColumnWidth(33, 150 * 20 + 323); - sheet.setColumnWidth(34, 150 * 20 + 323); tempRow = sheet.createRow(rowNum++); tempRow.setHeight((short) 400);// 设置行高 @@ -331,11 +326,11 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(5); - tempCell.setCellValue("劳资预警"); + tempCell.setCellValue("项目预警"); tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(6); - tempCell.setCellValue("项目预警"); + tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); tempCell = tempRow.createCell(7); @@ -346,24 +341,24 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 5, 8));//单元格合并 + tempCell = tempRow.createCell(9); - tempCell.setCellValue(""); - tempCell.setCellStyle(headerStyle); - - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 6, 9));//单元格合并 - - tempCell = tempRow.createCell(10); tempCell.setCellValue("安责险"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(11); + tempCell = tempRow.createCell(10); tempCell.setCellValue("一切险"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(12); + tempCell = tempRow.createCell(11); tempCell.setCellValue("安全隐患排查"); tempCell.setCellStyle(headerStyle); + tempCell = tempRow.createCell(12); + tempCell.setCellValue(""); + tempCell.setCellStyle(headerStyle); + tempCell = tempRow.createCell(13); tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); @@ -376,28 +371,28 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 11, 15));//单元格合并 + tempCell = tempRow.createCell(16); - tempCell.setCellValue(""); - tempCell.setCellStyle(headerStyle); - - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 12, 16));//单元格合并 - - tempCell = tempRow.createCell(17); tempCell.setCellValue("特种人员"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(18); + tempCell = tempRow.createCell(17); tempCell.setCellValue("应急演练"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(19); + tempCell = tempRow.createCell(18); tempCell.setCellValue("教育培训"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(20); + tempCell = tempRow.createCell(19); tempCell.setCellValue("质量隐患排查"); tempCell.setCellStyle(headerStyle); + tempCell = tempRow.createCell(20); + tempCell.setCellValue(""); + tempCell.setCellStyle(headerStyle); + tempCell = tempRow.createCell(21); tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); @@ -410,49 +405,45 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellValue(""); tempCell.setCellStyle(headerStyle); + sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 19, 23));//单元格合并 + tempCell = tempRow.createCell(24); - tempCell.setCellValue(""); - tempCell.setCellStyle(headerStyle); - - sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 20, 24));//单元格合并 - - tempCell = tempRow.createCell(25); tempCell.setCellValue("材料取样复试"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(26); + tempCell = tempRow.createCell(25); tempCell.setCellValue("材料封样"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(27); + tempCell = tempRow.createCell(26); tempCell.setCellValue("实测实量"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(28); + tempCell = tempRow.createCell(27); tempCell.setCellValue("举牌验收"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(29); + tempCell = tempRow.createCell(28); tempCell.setCellValue("视频监控"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(30); + tempCell = tempRow.createCell(29); tempCell.setCellValue("AI监控"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(31); + tempCell = tempRow.createCell(30); tempCell.setCellValue("项目全景"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(32); + tempCell = tempRow.createCell(31); tempCell.setCellValue("项目标准化"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(33); + tempCell = tempRow.createCell(32); tempCell.setCellValue("审批进行中"); tempCell.setCellStyle(headerStyle); - tempCell = tempRow.createCell(34); + tempCell = tempRow.createCell(33); tempCell.setCellValue("审批已完成"); tempCell.setCellStyle(headerStyle); @@ -462,11 +453,10 @@ public class ProjectViewController extends BaseBuildNodeController{ headArrays.add("劳务人员"); headArrays.add("实名制接入"); headArrays.add(""); - headArrays.add(""); headArrays.add("AI预警"); headArrays.add("安全预警"); headArrays.add("质量预警"); - headArrays.add("环境预警"); + headArrays.add("劳资预警"); headArrays.add(""); headArrays.add(""); headArrays.add("集团公司"); @@ -503,7 +493,7 @@ public class ProjectViewController extends BaseBuildNodeController{ if(i<2){ sheet.addMergedRegion(new CellRangeAddress(rowNum-3, rowNum - 1, i, i));//单元格合并 } - if((i>3 && i<6) || (i>9 && i<12) || (i>16 && i<20) || i>24){ + if((i>3 && i<5) || (i>8 && i<11) || (i>15 && i<19) || i>23){ sheet.addMergedRegion(new CellRangeAddress(rowNum-2, rowNum - 1, i, i));//单元格合并 } } @@ -535,122 +525,118 @@ public class ProjectViewController extends BaseBuildNodeController{ tempCell.setCellStyle(contentStyle); tempCell = tempRow.createCell(5); - tempCell.setCellValue(Convert.toStr(view.getLzyjs(),"0")); - tempCell.setCellStyle(contentStyle); - - tempCell = tempRow.createCell(6); tempCell.setCellValue(view.getAiyjs()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(7); + tempCell = tempRow.createCell(6); tempCell.setCellValue(view.getAqyjs()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(8); - tempCell.setCellValue(view.getZlyjs()); + tempCell = tempRow.createCell(7); + tempCell.setCellValue(Convert.toStr(view.getLzyjs(),"0")); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(9); + tempCell = tempRow.createCell(8); tempCell.setCellValue(view.getHjyjs()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(10); + tempCell = tempRow.createCell(9); tempCell.setCellValue(view.getAzx().equals("0")?"未办理":"已办理"); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(11); + tempCell = tempRow.createCell(10); tempCell.setCellValue(view.getYqx().equals("0")?"未办理":"已办理"); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(12); + tempCell = tempRow.createCell(11); tempCell.setCellValue(view.getAqyhpc_jtgs()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(13); + tempCell = tempRow.createCell(12); tempCell.setCellValue(view.getAqyhpc_zrzt()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(14); + tempCell = tempRow.createCell(13); tempCell.setCellValue(view.getAqyhpc_jfdb()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(15); + tempCell = tempRow.createCell(14); tempCell.setCellValue(view.getAqyhpc_jldw()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(16); + tempCell = tempRow.createCell(15); tempCell.setCellValue(view.getAqyhpc_zbdw()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(17); + tempCell = tempRow.createCell(16); tempCell.setCellValue(view.getTzry()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(18); + tempCell = tempRow.createCell(17); tempCell.setCellValue(view.getYjyl()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(19); + tempCell = tempRow.createCell(18); tempCell.setCellValue(view.getZxpx()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(20); + tempCell = tempRow.createCell(19); tempCell.setCellValue(view.getZlyhpc_jtgs()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(21); + tempCell = tempRow.createCell(20); tempCell.setCellValue(view.getZlyhpc_zrzt()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(22); + tempCell = tempRow.createCell(21); tempCell.setCellValue(view.getZlyhpc_jfdb()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(23); + tempCell = tempRow.createCell(22); tempCell.setCellValue(view.getZlyhpc_jldw()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(24); + tempCell = tempRow.createCell(23); tempCell.setCellValue(view.getZlyhpc_zbdw()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(25); + tempCell = tempRow.createCell(24); tempCell.setCellValue(view.getClqyfs()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(26); + tempCell = tempRow.createCell(25); tempCell.setCellValue(view.getClfy()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(27); + tempCell = tempRow.createCell(26); tempCell.setCellValue(view.getCscl()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(28); + tempCell = tempRow.createCell(27); tempCell.setCellValue(view.getJpys()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(29); + tempCell = tempRow.createCell(28); tempCell.setCellValue(view.getSsjk().equals("0")?"未接入":"已接入"); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(30); + tempCell = tempRow.createCell(29); tempCell.setCellValue(view.getAijk().equals("0")?"未接入":"已接入"); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(31); + tempCell = tempRow.createCell(30); tempCell.setCellValue(view.getYssys()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(32); + tempCell = tempRow.createCell(31); tempCell.setCellValue(view.getBzh()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(33); + tempCell = tempRow.createCell(32); tempCell.setCellValue(view.getGcsq()); tempCell.setCellStyle(contentStyle); - tempCell = tempRow.createCell(34); + tempCell = tempRow.createCell(33); tempCell.setCellValue(view.getGcsp()); tempCell.setCellStyle(contentStyle); @@ -658,13 +644,17 @@ 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, 6, 6));//单元格合并 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, 11, 11));//单元格合并 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, 18));//单元格合并 + sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 14, 14));//单元格合并 sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 19, 19));//单元格合并 - sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 27, 27));//单元格合并 + sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 20, 20));//单元格合并 + sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 21, 21));//单元格合并 + sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 22, 22));//单元格合并 + sheet.addMergedRegion(new CellRangeAddress(rowNum-(1+trindex), rowNum - 1, 26, 26));//单元格合并 } trindex=0; }else{ diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectScheduleServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectScheduleServiceImpl.java index dd442b61..76dcca37 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectScheduleServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectScheduleServiceImpl.java @@ -72,7 +72,9 @@ public class SurProjectScheduleServiceImpl implements ISurProjectScheduleService SurProject surProject = surProjectMapper.selectSurProjectById(surProjectSchedule.getProjectId()); surProjectSchedule.setDataTemplate(surProject.getProjectType()); } - surProjectSchedule.setCreateBy(SecurityUtils.getUsername()); + if(StringUtils.isEmpty(surProjectSchedule.getCreateBy())){ + surProjectSchedule.setCreateBy(SecurityUtils.getUsername()); + } surProjectSchedule.setCreateTime(DateUtils.getNowDate()); surProjectSchedule.setIsDel(0l); return surProjectScheduleMapper.insertSurProjectSchedule(surProjectSchedule); @@ -87,8 +89,10 @@ public class SurProjectScheduleServiceImpl implements ISurProjectScheduleService @Override public int updateSurProjectSchedule(SurProjectSchedule surProjectSchedule) { + if(StringUtils.isEmpty(surProjectSchedule.getUpdateBy())){ + surProjectSchedule.setUpdateBy(SecurityUtils.getUsername()); + } surProjectSchedule.setUpdateTime(DateUtils.getNowDate()); - surProjectSchedule.setUpdateBy(SecurityUtils.getUsername()); return surProjectScheduleMapper.updateSurProjectSchedule(surProjectSchedule); } @@ -118,7 +122,7 @@ public class SurProjectScheduleServiceImpl implements ISurProjectScheduleService /** * 按项目类型查询形象进度数据 - * @param type + * @param where * @return */ @Override