|
@@ -1,6 +1,5 @@
|
|
|
package com.ruoyi.project.pssr.controller;
|
|
|
|
|
|
-import com.deepoove.poi.data.*;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
|
@@ -9,13 +8,16 @@ 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.pssr.domain.TPssrAboveall;
|
|
|
+import com.ruoyi.project.pssr.domain.TPssrPatrol;
|
|
|
import com.ruoyi.project.pssr.domain.TPssrSubcontent;
|
|
|
import com.ruoyi.project.pssr.service.ITPssrAboveallService;
|
|
|
+import com.ruoyi.project.pssr.service.ITPssrPatrolService;
|
|
|
import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -34,6 +36,9 @@ public class TPssrAboveallController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITPssrSubcontentService tPssrSubcontentService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITPssrPatrolService tPssrPatrolService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询PSSR列表
|
|
|
*/
|
|
@@ -90,11 +95,76 @@ public class TPssrAboveallController extends BaseController {
|
|
|
subcontent.setCreatedate(new Date());
|
|
|
subcontent.setCreaterCode(getUserId().toString());
|
|
|
tPssrSubcontentService.insertTPssrSubcontent(subcontent);
|
|
|
+
|
|
|
+ String userId = getUserId().toString();
|
|
|
+ if (subcontent.getForShort().equals("xqf")) {
|
|
|
+ new Thread(() -> {
|
|
|
+ List<TPssrPatrol> tPssrPatrols = new ArrayList<>();
|
|
|
+// 手提式/小推车式灭火器/灭火器材箱检查记录,1
|
|
|
+ tPssrPatrols.add(getEntity(1L, subcontent.getId()));
|
|
|
+// 消防水炮检查记录,2
|
|
|
+ tPssrPatrols.add(getEntity(2L, subcontent.getId()));
|
|
|
+// 地上消火栓检查记录,3
|
|
|
+ tPssrPatrols.add(getEntity(3L, subcontent.getId()));
|
|
|
+// 消防水带箱检查记录,4
|
|
|
+ tPssrPatrols.add(getEntity(4L, subcontent.getId()));
|
|
|
+// 消防竖管检查记录,5
|
|
|
+ tPssrPatrols.add(getEntity(5L, subcontent.getId()));
|
|
|
+// 自动喷淋灭火系统检查记录,6
|
|
|
+ tPssrPatrols.add(getEntity(6L, subcontent.getId()));
|
|
|
+// 应急事故柜检查记录,7
|
|
|
+ tPssrPatrols.add(getEntity(7L, subcontent.getId()));
|
|
|
+// 现场可燃气体检测器/火灾报警系统检查记录,8
|
|
|
+ tPssrPatrols.add(getEntity(8L, subcontent.getId()));
|
|
|
+// CO2气体保护系统检查记录,9
|
|
|
+ tPssrPatrols.add(getEntity(9L, subcontent.getId()));
|
|
|
+// 淋浴洗眼器检查记录,12
|
|
|
+ tPssrPatrols.add(getEntity(12L, subcontent.getId()));
|
|
|
+// 应急沙箱检查记录,13
|
|
|
+ tPssrPatrols.add(getEntity(13L, subcontent.getId()));
|
|
|
+// 常闭式防爆门/防火门检查记录,14
|
|
|
+ tPssrPatrols.add(getEntity(14L, subcontent.getId()));
|
|
|
+// 风向标/风向袋/新风系统正压计检查记录,15
|
|
|
+ tPssrPatrols.add(getEntity(15L, subcontent.getId()));
|
|
|
+// 蒸汽幕检查记录,16
|
|
|
+ tPssrPatrols.add(getEntity(16L, subcontent.getId()));
|
|
|
+ for (TPssrPatrol pssrPatrol : tPssrPatrols) {
|
|
|
+ tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
|
|
|
+ }
|
|
|
+ }, "新增消气防数据").start();
|
|
|
+ } else if (subcontent.getForShort().equals("txjk")) {
|
|
|
+ new Thread(() -> {
|
|
|
+ List<TPssrPatrol> tPssrPatrols = new ArrayList<>();
|
|
|
+// PAGA系统检查记录,10
|
|
|
+ tPssrPatrols.add(getEntity(10L, subcontent.getId()));
|
|
|
+// CCTV系统检查记录,11
|
|
|
+ tPssrPatrols.add(getEntity(11L, subcontent.getId()));
|
|
|
+ for (TPssrPatrol pssrPatrol : tPssrPatrols) {
|
|
|
+ tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
|
|
|
+ }
|
|
|
+ }, "新增通讯监控数据").start();
|
|
|
+ } else if (subcontent.getForShort().equals("bxsjcy")) {
|
|
|
+ new Thread(() -> {
|
|
|
+ List<TPssrPatrol> tPssrPatrols = new ArrayList<>();
|
|
|
+// 四合一/苯系物/硫化氢/二氧化碳/射线一氧化碳检测仪检查记录,18
|
|
|
+ tPssrPatrols.add(getEntity(18L, subcontent.getId()));
|
|
|
+ for (TPssrPatrol pssrPatrol : tPssrPatrols) {
|
|
|
+ tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
|
|
|
+ }
|
|
|
+ }, "新增便携式检测仪数据").start();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
+ private TPssrPatrol getEntity(Long planType, Long subId) {
|
|
|
+ TPssrPatrol tPssrPatrol = new TPssrPatrol();
|
|
|
+ tPssrPatrol.setPlanType(planType);
|
|
|
+ tPssrPatrol.setSubId(subId);
|
|
|
+ return tPssrPatrol;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改PSSR
|
|
|
*/
|