|
@@ -1,27 +1,18 @@
|
|
|
package com.ruoyi.project.pssr.controller;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
-import com.ruoyi.common.utils.document.PDFTemplateUtil;
|
|
|
import com.ruoyi.common.utils.document.ZipUtil;
|
|
|
-import com.ruoyi.common.utils.file.FileUtils;
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
|
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
|
|
-import com.ruoyi.framework.config.RuoYiConfig;
|
|
|
import com.ruoyi.framework.web.controller.BaseController;
|
|
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
|
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
|
|
import com.ruoyi.project.approve.damain.DevTask;
|
|
|
-import com.ruoyi.project.listener.invoiceApprove.YhzgTaskCreateListener;
|
|
|
import com.ruoyi.project.listener.pssr.ConfirmTaskCreateListener;
|
|
|
import com.ruoyi.project.patrol.commonuse.controller.TCommonuseTesterController;
|
|
|
import com.ruoyi.project.patrol.commonuse.domain.TCommonuseTester;
|
|
|
-import com.ruoyi.project.patrol.dev.controller.TDevCctvController;
|
|
|
-import com.ruoyi.project.patrol.dev.controller.TDevPagaController;
|
|
|
-import com.ruoyi.project.patrol.dev.domain.TDevCctv;
|
|
|
-import com.ruoyi.project.patrol.dev.domain.TDevPaga;
|
|
|
import com.ruoyi.project.patrol.emergency.controller.TEmergencyCabinetController;
|
|
|
import com.ruoyi.project.patrol.emergency.controller.TEmergencyCctvController;
|
|
|
import com.ruoyi.project.patrol.emergency.controller.TEmergencyEyewashController;
|
|
@@ -34,44 +25,28 @@ import com.ruoyi.project.patrol.fire.controller.*;
|
|
|
import com.ruoyi.project.patrol.fire.domain.*;
|
|
|
import com.ruoyi.project.plant.domain.TStaffmgr;
|
|
|
import com.ruoyi.project.pssr.domain.*;
|
|
|
+import com.ruoyi.project.pssr.domain.dto.TPssrApproveDto;
|
|
|
import com.ruoyi.project.pssr.service.*;
|
|
|
-import com.ruoyi.project.sems.domain.TReportHiYlgd;
|
|
|
-import com.ruoyi.project.sems.domain.TReportYlgd;
|
|
|
-import com.ruoyi.project.sems.domain.TSpecdevYlgd;
|
|
|
-import com.ruoyi.project.system.domain.SysDictData;
|
|
|
import com.ruoyi.project.system.domain.SysUser;
|
|
|
import com.ruoyi.project.system.mapper.SysUserMapper;
|
|
|
import com.ruoyi.project.system.service.ISysUserService;
|
|
|
import org.activiti.engine.*;
|
|
|
-import org.activiti.engine.history.HistoricTaskInstance;
|
|
|
-import org.activiti.engine.history.HistoricTaskInstanceQuery;
|
|
|
import org.activiti.engine.impl.identity.Authentication;
|
|
|
import org.activiti.engine.impl.util.CollectionUtil;
|
|
|
import org.activiti.engine.runtime.ProcessInstance;
|
|
|
import org.activiti.engine.task.Task;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
-import org.apache.poi.ss.usermodel.Cell;
|
|
|
-import org.apache.poi.ss.usermodel.Row;
|
|
|
-import org.apache.poi.ss.usermodel.Sheet;
|
|
|
-import org.apache.poi.ss.usermodel.Workbook;
|
|
|
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.File;
|
|
|
-import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
|
-import java.io.OutputStream;
|
|
|
-import java.nio.file.*;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
+import java.nio.file.Files;
|
|
|
+import java.nio.file.Paths;
|
|
|
+import java.nio.file.StandardCopyOption;
|
|
|
import java.util.*;
|
|
|
-import java.util.concurrent.CountDownLatch;
|
|
|
-import java.util.concurrent.ExecutorService;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
|
|
|
import static com.ruoyi.framework.config.RuoYiConfig.getProfile;
|
|
|
|
|
@@ -304,6 +279,9 @@ public class TPssrApproveController extends BaseController {
|
|
|
@Autowired
|
|
|
private TPssrNitrogenController nitrogenController;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TPssrSafetyController safetyController;
|
|
|
+
|
|
|
@Autowired
|
|
|
private TPssrPatrolController patrolController;
|
|
|
|
|
@@ -406,6 +384,184 @@ public class TPssrApproveController extends BaseController {
|
|
|
@Autowired
|
|
|
private TPssrTorchvocController torchvocController;
|
|
|
|
|
|
+ @PutMapping("/handleConfirm")
|
|
|
+ public AjaxResult handleConfirm(@RequestBody TPssrApproveDto dto) {
|
|
|
+ TPssrSubcontent tPssrSubcontent = tPssrSubcontentService.selectTPssrSubcontentById(dto.getSubId());
|
|
|
+ switch (tPssrSubcontent.getForShort()) {
|
|
|
+ case "jxxm"://检修项目
|
|
|
+ switch (dto.getSubName()) {
|
|
|
+ case "exchanger":
|
|
|
+ TPssrOverhaulExchanger exchanger = new TPssrOverhaulExchanger();
|
|
|
+ exchanger.setSubId(dto.getSubId());
|
|
|
+ exchanger.setIds(dto.getIds());
|
|
|
+ return exchangerController.confirmExchanger(exchanger);
|
|
|
+ case "filter":
|
|
|
+ TPssrOverhaulFilter filter = new TPssrOverhaulFilter();
|
|
|
+ filter.setSubId(dto.getSubId());
|
|
|
+ filter.setIds(dto.getIds());
|
|
|
+ return filterController.confirmFilter(filter);
|
|
|
+ case "tower":
|
|
|
+ TPssrOverhaulTower tower = new TPssrOverhaulTower();
|
|
|
+ tower.setSubId(dto.getSubId());
|
|
|
+ tower.setIds(dto.getIds());
|
|
|
+ return towerController.confirmTower(tower);
|
|
|
+ case "valve":
|
|
|
+ TPssrOverhaulValve valve = new TPssrOverhaulValve();
|
|
|
+ valve.setSubId(dto.getSubId());
|
|
|
+ valve.setIds(dto.getIds());
|
|
|
+ return valveController.confirmValve(valve);
|
|
|
+ }
|
|
|
+ return AjaxResult.error("确认失败!");
|
|
|
+ case "kgfa"://开工方案
|
|
|
+ TPssrProgramme programme = new TPssrProgramme();
|
|
|
+ programme.setSubId(dto.getSubId());
|
|
|
+ programme.setIds(dto.getIds());
|
|
|
+ programme.setTaskType(dto.getTaskType());
|
|
|
+ return programmeController.confirmProgramme(programme);
|
|
|
+ case "sjbg"://设计变更
|
|
|
+ TPssrMoc moc = new TPssrMoc();
|
|
|
+ moc.setSubId(dto.getSubId());
|
|
|
+ moc.setIds(dto.getIds());
|
|
|
+ moc.setTaskType(dto.getTaskType());
|
|
|
+ return mocController.confirmMoc(moc);
|
|
|
+ case "mb"://盲板
|
|
|
+ TPssrBlind blind = new TPssrBlind();
|
|
|
+ blind.setSubId(dto.getSubId());
|
|
|
+ blind.setIds(dto.getIds());
|
|
|
+ blind.setTaskType(dto.getTaskType());
|
|
|
+ return blindController.confirmBlind(blind);
|
|
|
+ case "xcws"://现场卫生
|
|
|
+ TPssrHygiene hygiene = new TPssrHygiene();
|
|
|
+ hygiene.setSubId(dto.getSubId());
|
|
|
+ hygiene.setIds(dto.getIds());
|
|
|
+ hygiene.setTaskType(dto.getTaskType());
|
|
|
+ return hygieneController.confirmHygiene(hygiene);
|
|
|
+ case "rsfh"://人身防护
|
|
|
+ switch (dto.getSubName()) {
|
|
|
+ case "protection":
|
|
|
+ TPssrProtection protection = new TPssrProtection();
|
|
|
+ protection.setSubId(dto.getSubId());
|
|
|
+ protection.setIds(dto.getIds());
|
|
|
+ protection.setTaskType(dto.getTaskType());
|
|
|
+ return protectionController.confirmProtection(protection);
|
|
|
+ case "measure":
|
|
|
+ TPssrMeasure measure = new TPssrMeasure();
|
|
|
+ measure.setSubId(dto.getSubId());
|
|
|
+ measure.setIds(dto.getIds());
|
|
|
+ measure.setTaskType(dto.getTaskType());
|
|
|
+ return measureController.confirmMeasure(measure);
|
|
|
+ }
|
|
|
+ return AjaxResult.error("确认失败!");
|
|
|
+ case "sbqjd"://设备清洁度
|
|
|
+ TPssrCleaning cleaning = new TPssrCleaning();
|
|
|
+ cleaning.setSubId(dto.getSubId());
|
|
|
+ cleaning.setIds(dto.getIds());
|
|
|
+ cleaning.setTaskType(dto.getTaskType());
|
|
|
+ return cleaningController.confirmCleaning(cleaning);
|
|
|
+ case "qm"://气密
|
|
|
+ TPssrAirtight airtight = new TPssrAirtight();
|
|
|
+ airtight.setSubId(dto.getSubId());
|
|
|
+ airtight.setIds(dto.getIds());
|
|
|
+ airtight.setTaskType(dto.getTaskType());
|
|
|
+ return airtightController.confirmAirtight(airtight);
|
|
|
+ case "sksgfmzt"://锁开锁关阀门状态
|
|
|
+ TPssrLock lock = new TPssrLock();
|
|
|
+ lock.setSubId(dto.getSubId());
|
|
|
+ lock.setIds(dto.getIds());
|
|
|
+ lock.setTaskType(dto.getTaskType());
|
|
|
+ return lockController.confirmLock(lock);
|
|
|
+ case "sys"://实验室
|
|
|
+ TPssrLaboratory laboratory = new TPssrLaboratory();
|
|
|
+ laboratory.setSubId(dto.getSubId());
|
|
|
+ laboratory.setIds(dto.getIds());
|
|
|
+ laboratory.setTaskType(dto.getTaskType());
|
|
|
+ return laboratoryController.confirmLaboratory(laboratory);
|
|
|
+ case "dj"://短接
|
|
|
+ TPssrCircuit circuit = new TPssrCircuit();
|
|
|
+ circuit.setSubId(dto.getSubId());
|
|
|
+ circuit.setIds(dto.getIds());
|
|
|
+ circuit.setTaskType(dto.getTaskType());
|
|
|
+ return circuitController.confirmCircuit(circuit);
|
|
|
+ case "dqzh"://氮气置换
|
|
|
+ TPssrNitrogen nitrogen = new TPssrNitrogen();
|
|
|
+ nitrogen.setSubId(dto.getSubId());
|
|
|
+ nitrogen.setIds(dto.getIds());
|
|
|
+ nitrogen.setTaskType(dto.getTaskType());
|
|
|
+ return nitrogenController.confirmNitrogen(nitrogen);
|
|
|
+ case "xqf"://消气防设施
|
|
|
+ return AjaxResult.success();
|
|
|
+ case "aqss"://安全设施
|
|
|
+ switch (dto.getSubName()) {
|
|
|
+ case "bleed":
|
|
|
+ TPssrSafetyBleed bleed = new TPssrSafetyBleed();
|
|
|
+ bleed.setSubId(dto.getSubId());
|
|
|
+ bleed.setIds(dto.getIds());
|
|
|
+ bleed.setTaskType(dto.getTaskType());
|
|
|
+ return safetyController.confirmBleed(bleed);
|
|
|
+ case "breath":
|
|
|
+ TPssrSafetyBreath breath = new TPssrSafetyBreath();
|
|
|
+ breath.setSubId(dto.getSubId());
|
|
|
+ breath.setIds(dto.getIds());
|
|
|
+ breath.setTaskType(dto.getTaskType());
|
|
|
+ return safetyController.confirmBreath(breath);
|
|
|
+ case "brust":
|
|
|
+ TPssrSafetyBrust brust = new TPssrSafetyBrust();
|
|
|
+ brust.setSubId(dto.getSubId());
|
|
|
+ brust.setIds(dto.getIds());
|
|
|
+ brust.setTaskType(dto.getTaskType());
|
|
|
+ return safetyController.confirmBrust(brust);
|
|
|
+ case "flamearrester":
|
|
|
+ TPssrSafetyFlamearrester flamearrester = new TPssrSafetyFlamearrester();
|
|
|
+ flamearrester.setSubId(dto.getSubId());
|
|
|
+ flamearrester.setIds(dto.getIds());
|
|
|
+ flamearrester.setTaskType(dto.getTaskType());
|
|
|
+ return safetyController.confirmFlamearrester(flamearrester);
|
|
|
+ case "valve":
|
|
|
+ TPssrSafetyValve safetyValve = new TPssrSafetyValve();
|
|
|
+ safetyValve.setSubId(dto.getSubId());
|
|
|
+ safetyValve.setIds(dto.getIds());
|
|
|
+ safetyValve.setTaskType(dto.getTaskType());
|
|
|
+ return safetyController.confirmValve(safetyValve);
|
|
|
+ }
|
|
|
+ case "txjk"://通讯监控
|
|
|
+ return AjaxResult.success();
|
|
|
+ case "bxsjcy"://便携式检测仪
|
|
|
+ return AjaxResult.success();
|
|
|
+ case "gygc"://公用工程
|
|
|
+ TPssrPublic pssrPublic = new TPssrPublic();
|
|
|
+ pssrPublic.setSubId(dto.getSubId());
|
|
|
+ pssrPublic.setIds(dto.getIds());
|
|
|
+ pssrPublic.setTaskType(dto.getTaskType());
|
|
|
+ return publicController.confirmPublic(pssrPublic);
|
|
|
+ case "hbss"://环保设施
|
|
|
+ TPssrTorchvoc torchvoc = new TPssrTorchvoc();
|
|
|
+ torchvoc.setSubId(dto.getSubId());
|
|
|
+ torchvoc.setIds(dto.getIds());
|
|
|
+ torchvoc.setTaskType(dto.getTaskType());
|
|
|
+ return torchvocController.confirmTorchvoc(torchvoc);
|
|
|
+ case "yfl"://原辅料
|
|
|
+ case "jb"://机泵
|
|
|
+ case "zdj"://支吊架
|
|
|
+ case "tzsb"://特种设备
|
|
|
+ case "ybjy"://仪表校验
|
|
|
+ case "yblscs"://仪表联锁测试
|
|
|
+ case "bjlszqr"://报警联锁值确认
|
|
|
+ case "lsdy"://临时电源
|
|
|
+ case "djsb"://电机设备
|
|
|
+ case "zmdbr"://照明、电伴热
|
|
|
+ case "jdjdkj"://静电接地、跨接
|
|
|
+ case "qtjcy"://气体检测仪
|
|
|
+ case "zxfxy"://在线分析仪
|
|
|
+ default:
|
|
|
+ return AjaxResult.error("确认失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @PutMapping("/handleTurndown")
|
|
|
+ public AjaxResult handleTurndown(@RequestBody TPssrApproveDto dto) {
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 子项内容确认
|
|
|
*/
|
|
@@ -607,7 +763,7 @@ public class TPssrApproveController extends BaseController {
|
|
|
subcontent.setAboveallId(sub.getAboveallId());
|
|
|
List<String> forShorts = new ArrayList<>();
|
|
|
if ("jb,ybjy".contains(sub.getForShort())) {
|
|
|
- } else if ("sbqjd".contains(sub.getForShort())){
|
|
|
+ } else if ("sbqjd".contains(sub.getForShort())) {
|
|
|
forShorts.add("jb");
|
|
|
forShorts.add("ybjy");
|
|
|
} else if ("jxxm,kgfa,sjbg".contains(sub.getForShort())) {
|
|
@@ -922,7 +1078,7 @@ public class TPssrApproveController extends BaseController {
|
|
|
List<TPssrProgramme> tPssrProgrammes = tPssrProgrammeService.selectTPssrProgrammeList(programme);
|
|
|
for (TPssrProgramme tPssrProgramme : tPssrProgrammes) {
|
|
|
String fileUrl = tPssrProgramme.getFileUrl();
|
|
|
- String newFileUrl = getProfile() + fileUrl.replace("/profile","");
|
|
|
+ String newFileUrl = getProfile() + fileUrl.replace("/profile", "");
|
|
|
Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
}
|
|
|
break;
|
|
@@ -1376,7 +1532,7 @@ public class TPssrApproveController extends BaseController {
|
|
|
List<TPssrInstrumentTest> instrumentTests = tPssrInstrumentTestService.selectTPssrInstrumentTestList(instrumentTest);
|
|
|
for (TPssrInstrumentTest test : instrumentTests) {
|
|
|
String fileUrl = test.getFileUrl();
|
|
|
- String newFileUrl = getProfile() + fileUrl.replace("/profile","");
|
|
|
+ String newFileUrl = getProfile() + fileUrl.replace("/profile", "");
|
|
|
Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
}
|
|
|
break;
|
|
@@ -1388,7 +1544,7 @@ public class TPssrApproveController extends BaseController {
|
|
|
List<TPssrAlarm> alarms = tPssrAlarmService.selectTPssrAlarmList(pssrAlarm);
|
|
|
for (TPssrAlarm a : alarms) {
|
|
|
String fileUrl = a.getFileUrl();
|
|
|
- String newFileUrl = getProfile() + fileUrl.replace("/profile","");
|
|
|
+ String newFileUrl = getProfile() + fileUrl.replace("/profile", "");
|
|
|
Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
}
|
|
|
break;
|