|
|
@@ -6,6 +6,8 @@ import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
|
|
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.common.domain.TCommonfile;
|
|
|
+import com.ruoyi.project.common.service.ITCommonfileService;
|
|
|
import com.ruoyi.project.ps.inspection.domain.TPsInspectionAlarm;
|
|
|
import com.ruoyi.project.ps.inspection.service.ITPsInspectionAlarmService;
|
|
|
import com.ruoyi.project.ps.patrol.domain.TPsPatrolIssues;
|
|
|
@@ -46,6 +48,9 @@ public class TPsInspectionAlarmController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITPsPatrolIssuesService tPsPatrolIssuesService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITCommonfileService tCommonfileService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询手动启动火灾报警器检查记录列表
|
|
|
*/
|
|
|
@@ -176,6 +181,16 @@ public class TPsInspectionAlarmController extends BaseController {
|
|
|
issues.setDevDescribe(alarm.getDevNo() + "_" + alarm.getPosition());
|
|
|
issues.setStatus(0L);// 待处理
|
|
|
tPsPatrolIssuesService.insertTPsPatrolIssues(issues);
|
|
|
+
|
|
|
+ // 修改巡检记录绑定的附件
|
|
|
+ TCommonfile tCommonfile = new TCommonfile();
|
|
|
+ tCommonfile.setpType("ps-alarm");
|
|
|
+ tCommonfile.setpId(tPsInspectionAlarm.getId());
|
|
|
+ for (TCommonfile item : tCommonfileService.selectAllFileList(tCommonfile)) {
|
|
|
+ item.setpId(entity.getId());
|
|
|
+ tCommonfileService.updateTCommonfile(item);
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
// 若之前标记为问题但现在恢复正常,则清除问题状态及相关记录
|
|
|
if (alarm.getIssuesStatus() == 1) {
|
|
|
@@ -224,18 +239,20 @@ public class TPsInspectionAlarmController extends BaseController {
|
|
|
String tempUrl = "static/word/ps/alarm.xlsx"; // 模板文件
|
|
|
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(tempUrl);
|
|
|
XSSFWorkbook wb = new XSSFWorkbook(is);
|
|
|
- XSSFSheet sheet1 = wb.getSheetAt(0);
|
|
|
+ XSSFSheet sheet = wb.getSheetAt(0);
|
|
|
|
|
|
//填充数据
|
|
|
- int rowIndex1 = 7;
|
|
|
+ int rowIndex1 = 6;
|
|
|
int num1 = 1;
|
|
|
|
|
|
- Row originalRow1 = sheet1.getRow(7);
|
|
|
+ Row originalRow1 = sheet.getRow(2);
|
|
|
Cell originalcell1 = originalRow1.getCell(0);
|
|
|
+
|
|
|
+ originalRow1.getCell(0).setCellValue("年度: 年 检查频率:1次/月(月底前完成)");
|
|
|
// 获取单元格样式
|
|
|
CellStyle originalStyle1 = originalcell1.getCellStyle();
|
|
|
if (!list.isEmpty()) {
|
|
|
- Row line1 = sheet1.getRow(0);
|
|
|
+ Row line1 = sheet.getRow(rowIndex1);
|
|
|
line1.getCell(0).setCellValue(list.get(0).getPlant() + "装置滚动问题清单和行动计划");
|
|
|
}
|
|
|
} catch (Exception e) {
|