package com.ruoyi.project.patrol.emergency.controller;

import com.alibaba.fastjson.JSON;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.ExcelUtils;
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.interceptor.annotation.RepeatSubmit;
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.patrol.emergency.domain.TEmergencyEyewash;
import com.ruoyi.project.patrol.emergency.service.ITEmergencyEyewashService;
import com.ruoyi.project.patrol.patrol.domain.TPatrolIssues;
import com.ruoyi.project.patrol.patrol.domain.TPatrolPlan;
import com.ruoyi.project.patrol.patrol.service.ITPatrolIssuesService;
import com.ruoyi.project.patrol.patrol.service.ITPatrolPlanService;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.service.ISysUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
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 java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * 洗眼器检查记录Controller
 *
 * @author ruoyi
 * @date 2023-09-04
 */
@RestController
@RequestMapping("/emergency/eyewash")
public class TEmergencyEyewashController extends BaseController {
    @Autowired
    private ITEmergencyEyewashService tEmergencyEyewashService;

    @Autowired
    private ITPatrolPlanService tPatrolPlanService;

    @Autowired
    private ITPatrolIssuesService tPatrolIssuesService;

    @Autowired
    private ISysUserService sysUserService;

    /**
     * 查询洗眼器检查记录列表
     */
    @PreAuthorize("@ss.hasPermi('emergency:eyewash:list')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.OTHER)
    @GetMapping("/list")
    public TableDataInfo list(TEmergencyEyewash tEmergencyEyewash) {
        logger.info("=============洗眼器检查记录查询参数：{}", JSON.toJSONString(tEmergencyEyewash));
        startPage();
        if (StringUtils.isEmpty(tEmergencyEyewash.getIssuesFlag()))
            tEmergencyEyewash.setIssuesFlag("0");
        List<TEmergencyEyewash> list = tEmergencyEyewashService.selectTEmergencyEyewashList(tEmergencyEyewash);
        return getDataTable(list);
    }

    /**
     * 导出洗眼器检查记录列表
     */
    
    @Log(title = "洗眼器检查记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public AjaxResult export(TEmergencyEyewash tEmergencyEyewash) throws Exception {
        tEmergencyEyewash.setIssuesFlag("0");
        List<TEmergencyEyewash> list = tEmergencyEyewashService.selectTEmergencyEyewashList(tEmergencyEyewash);
        if (list.size() == 0) {
            return AjaxResult.error("暂无可导出数据");
        }
        XSSFWorkbook workbook = new XSSFWorkbook();
        // 创建工作簿
        XSSFSheet sheet = workbook.createSheet();
        // 设置列宽
        sheet.setColumnWidth(0, 1200);
        sheet.setColumnWidth(1, 2800);
        sheet.setColumnWidth(2, 4500);
        sheet.setColumnWidth(3, 3500);
        sheet.setColumnWidth(4, 3500);
        sheet.setColumnWidth(5, 3500);
        sheet.setColumnWidth(6, 3500);
        sheet.setColumnWidth(7, 3500);
        sheet.setColumnWidth(8, 3500);
        sheet.setColumnWidth(9, 3500);
        sheet.setColumnWidth(10, 3500);
        sheet.setColumnWidth(11, 3500);
        sheet.setColumnWidth(12, 3500);
        sheet.setColumnWidth(13, 3500);
        sheet.setColumnWidth(14, 3500);
        sheet.setColumnWidth(15, 2560);
        //第一行
        XSSFRow row1 = sheet.createRow(0);
        row1.createCell(0).setCellValue("CBP-6.3.0-SCFSH-020.14  Rev:04  2021/10/01");
        ExcelUtils.createVoidCell(1, 15, row1);
        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 15));//合并
        //第二行
        XSSFRow row2 = sheet.createRow(1);
        row2.setHeightInPoints(30);
        row2.createCell(0).setCellValue("淋浴洗眼器检查记录");
        ExcelUtils.createVoidCell(1, 15, row2);
        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 15));
        //第三行
        XSSFRow row3 = sheet.createRow(2);
        row3.createCell(0).setCellValue("年度：" + tEmergencyEyewash.getYear());
        sheet.addMergedRegion(new CellRangeAddress(2, 2, 0, 2));
        row3.createCell(3).setCellValue("检查频率：1次/月");
        ExcelUtils.createVoidCell(1, 2, row3);
        ExcelUtils.createVoidCell(4, 15, row3);
        sheet.addMergedRegion(new CellRangeAddress(2, 2, 3, 15));
        //第四行
        XSSFRow row4 = sheet.createRow(3);
        XSSFCell row4Cell1 = row4.createCell(0);
        row4Cell1.setCellValue("序号");
        XSSFCell row4Cell2 = row4.createCell(1);
        row4Cell2.setCellValue("位号");
        XSSFCell row4Cell3 = row4.createCell(2);
        row4Cell3.setCellValue("位置");
        XSSFCell row4Cell4 = row4.createCell(3);
        row4Cell4.setCellValue("检查内容");
        ExcelUtils.createVoidCell(4, 15, row4);
        sheet.addMergedRegion(new CellRangeAddress(3, 3, 3, 15));
        //第五行
        XSSFRow row5 = sheet.createRow(4);
        row5.setHeightInPoints(100);
        sheet.addMergedRegion(new CellRangeAddress(3, 4, 0, 0));
        sheet.addMergedRegion(new CellRangeAddress(3, 4, 1, 1));
        sheet.addMergedRegion(new CellRangeAddress(3, 4, 2, 2));
        ExcelUtils.createVoidCell(0, 2, row5);
        row5.createCell(3).setCellValue("洗眼器标识醒目并处于良好状况");
        row5.createCell(4).setCellValue("洗眼器周围2米内无障碍物，易接近");
        row5.createCell(5).setCellValue("所处区域有良好的照明，且没有被遮挡");
        row5.createCell(6).setCellValue("洗眼器配件没有损坏或丢失，也没有可见的腐蚀");
        row5.createCell(7).setCellValue("洗眼器上游手阀处于全开状态，并采取常开保护措施");
        row5.createCell(8).setCellValue("洗眼器从出水点起高度在10-30厘米并均匀流动");
        row5.createCell(9).setCellValue("洗眼器出水干净不黑无污染，没有颗粒");
        row5.createCell(10).setCellValue("洗眼器出水温度不高于25℃");
        row5.createCell(11).setCellValue("洗眼器手推板、脚踏板及喷淋拉杆灵活，能保持全开");
        row5.createCell(12).setCellValue("洗眼器测试前已通知ERC");
        row5.createCell(13).setCellValue("现场声光报警装置工作正常");
        row5.createCell(14).setCellValue("ERC接收到洗眼器报警测试信号，报警信号已反馈至DCS和中控室迷你盘");
        row5.createCell(15).setCellValue("检查人");
        Long planId = null;
        //遍历数组赋值
        for (int i = 0; i < list.size(); i++) {
            TEmergencyEyewash eyewash = list.get(i);
            planId = eyewash.getPlanId();
            XSSFRow row = sheet.createRow(5 + i);
            row.createCell(0).setCellValue(i + 1);
            row.createCell(1).setCellValue(eyewash.getDevNo());
            row.createCell(2).setCellValue(eyewash.getPosition());
            row.createCell(3).setCellValue("1".equals(eyewash.getIdentifying()) ? "√" : eyewash.getIdentifying());
            row.createCell(4).setCellValue("1".equals(eyewash.getNoObstacle()) ? "√" : eyewash.getNoObstacle());
            row.createCell(5).setCellValue("1".equals(eyewash.getNoOcclusion()) ? "√" : eyewash.getNoOcclusion());
            row.createCell(6).setCellValue("1".equals(eyewash.getNoDamage()) ? "√" : eyewash.getNoDamage());
            row.createCell(7).setCellValue("1".equals(eyewash.getInSafe()) ? "√" : eyewash.getInSafe());
            row.createCell(8).setCellValue("1".equals(eyewash.getExitPoint()) ? "√" : eyewash.getExitPoint());
            row.createCell(9).setCellValue("1".equals(eyewash.getExitClean()) ? "√" : eyewash.getExitClean());
            row.createCell(10).setCellValue("1".equals(eyewash.getExitTemp()) ? "√" : eyewash.getExitTemp());
            row.createCell(11).setCellValue("1".equals(eyewash.getKeepOpen()) ? "√" : eyewash.getKeepOpen());
            row.createCell(12).setCellValue("1".equals(eyewash.getNoticed()) ? "√" : eyewash.getNoticed());
            row.createCell(13).setCellValue("1".equals(eyewash.getNormalOperation()) ? "√" : eyewash.getNormalOperation());
            row.createCell(14).setCellValue("1".equals(eyewash.getFeedback()) ? "√" : eyewash.getFeedback());
            XSSFCell cell15 = row.createCell(15);
            if (StringUtils.isNotEmpty(eyewash.getUpdaterCode())) {
                SysUser sysUser = sysUserService.selectUserById(Long.valueOf(eyewash.getUpdaterCode()));
                cell15.setCellValue(sysUser == null ? "" : sysUser.getNickName());
            }
        }
        String confirmed = "";
        Date confirmedDate = null;
        TPatrolPlan tPatrolPlan = tPatrolPlanService.selectTPatrolPlanById(planId);
        if (Objects.nonNull(tPatrolPlan) && Objects.nonNull(tPatrolPlan.getConfirmed())) {
            SysUser sysUser = sysUserService.selectUserById(Long.valueOf(tPatrolPlan.getConfirmed()));
            if (sysUser != null) {
                confirmed = sysUser.getSignUrl();
                confirmedDate = tPatrolPlan.getConfirmDate();
            }
        }
        // 28行
        int nextRowNum = 5 + list.size();
        XSSFRow row28 = sheet.createRow(nextRowNum);
        row28.setHeightInPoints(30);
        XSSFCell row28Cell1 = row28.createCell(0);
        row28Cell1.setCellValue("签名");
        ExcelUtils.createVoidCell(1, 2, row28);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 2));
        XSSFCell row28Cell3 = row28.createCell(3);
        if (StringUtils.isNotEmpty(confirmed))
            ExcelUtils.insertPicture(workbook, sheet, confirmed, nextRowNum, 9, 1, 1);
        ExcelUtils.createVoidCell(3, 15, row28);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 3, 15));
        //29行
        nextRowNum++;
        XSSFRow row29 = sheet.createRow(nextRowNum);
        row29.setHeightInPoints(30);
        XSSFCell row29Cell1 = row29.createCell(0);
        row29Cell1.setCellValue("日期");
        ExcelUtils.createVoidCell(1, 2, row29);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 2));
        XSSFCell row29Cell3 = row29.createCell(3);
        row29Cell3.setCellValue(confirmedDate != null ? new SimpleDateFormat("yyyy-MM-dd").format(confirmedDate) : "");
        ExcelUtils.createVoidCell(4, 15, row29);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 3, 15));

        // 设置单元格样式
        // 文字居中，自动换行，四周边框
        CellStyle style = workbook.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        style.setWrapText(true);
        style.setBorderTop(BorderStyle.THIN);
        style.setBorderBottom(BorderStyle.THIN);
        style.setBorderLeft(BorderStyle.THIN);
        style.setBorderRight(BorderStyle.THIN);

        // 设置垂直居中，四周边框
        CellStyle style2 = workbook.createCellStyle();
        style2.setVerticalAlignment(VerticalAlignment.CENTER);
        style2.setBorderTop(BorderStyle.THIN);
        style2.setBorderBottom(BorderStyle.THIN);
        style2.setBorderLeft(BorderStyle.THIN);
        style2.setBorderRight(BorderStyle.THIN);
        for (Row row : sheet) {
            if (row.getRowNum() == 0) {
                continue;
            }
            if (row.getRowNum() == 2) {
                for (Cell cell : row) {
                    if (cell.getColumnIndex() == 0 || cell.getColumnIndex() == 1 || cell.getColumnIndex() == 2)
                        cell.setCellStyle(style2);
                    else
                        cell.setCellStyle(style);
                }
            } else {
                for (Cell cell : row) {
                    cell.setCellStyle(style);
                }
            }
        }

        nextRowNum++;
        XSSFRow row30 = sheet.createRow(nextRowNum);
        row30.createCell(0).setCellValue("说明：");
        ExcelUtils.createVoidCell(1, 15, row30);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 15));

        nextRowNum++;
        XSSFRow row31 = sheet.createRow(nextRowNum);
        row31.createCell(0).setCellValue("1.检查正常打“√”。");
        ExcelUtils.createVoidCell(1, 15, row31);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 15));

        nextRowNum++;
        XSSFRow row32 = sheet.createRow(nextRowNum);
        row32.createCell(0).setCellValue("2.检查有不正常情况打“X”，并记录存在问题，处理结果及完成时间。");
        ExcelUtils.createVoidCell(1, 15, row32);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 15));

        nextRowNum++;
        XSSFRow row33 = sheet.createRow(nextRowNum);
        row33.createCell(0).setCellValue("3.检查频率为每一个月检查维护一次。");
        ExcelUtils.createVoidCell(1, 15, row33);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 15));

        nextRowNum++;
        XSSFRow row34 = sheet.createRow(nextRowNum);
        row34.createCell(0).setCellValue("4.230EW101洗眼器检查，化验室参与人及日期：");
        ExcelUtils.createVoidCell(1, 15, row34);
        sheet.addMergedRegion(new CellRangeAddress(nextRowNum, nextRowNum, 0, 15));

        //返回
        String fileName = "PSSR_13_消气防设施_淋浴洗眼器检查记录.xlsx";
        OutputStream os = Files.newOutputStream(Paths.get(ExcelUtil.getAbsoluteFile(fileName)));
        workbook.write(os);
        workbook.close();
        return AjaxResult.success(fileName);
    }

    /**
     * 获取洗眼器检查记录详细信息
     */
    @PreAuthorize("@ss.hasPermi('emergency:eyewash:query')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.OTHER)
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return AjaxResult.success(tEmergencyEyewashService.selectTEmergencyEyewashById(id));
    }

    @PreAuthorize("@ss.hasPermi('emergency:eyewash:query')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.OTHER)
    @GetMapping(value = "/info")
    public AjaxResult getInfo(TEmergencyEyewash tEmergencyEyewash) {
        logger.info("=============根据位号查询洗眼器参数：{}", tEmergencyEyewash);
        if (StringUtils.isEmpty(tEmergencyEyewash.getDevNo()) || StringUtils.isNull(tEmergencyEyewash.getPlanId())) {
            return AjaxResult.error("位号或计划id不能为空！");
        }
        TEmergencyEyewash item = new TEmergencyEyewash();
        item.setPlanId(tEmergencyEyewash.getPlanId());
        item.setPrecision(tEmergencyEyewash.getDevNo());
        item.setIssuesFlag("0");
        List<TEmergencyEyewash> list = tEmergencyEyewashService.selectTEmergencyEyewashList(item);
        if (CollectionUtils.isNotEmpty(list))
            return AjaxResult.success(list.get(0));
        return AjaxResult.error("此设备不在当前巡检计划中!");
    }

    @PreAuthorize("@ss.hasPermi('emergency:eyewash:query')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.OTHER)
    @GetMapping(value = "/infoByDevNo/{devNo}")
    public AjaxResult getInfoByDevNo(@PathVariable("devNo") String devNo) {
        logger.info("=============根据位号查询洗眼器参数：{}", devNo);
        TEmergencyEyewash tEmergencyEyewash = new TEmergencyEyewash();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        tEmergencyEyewash.setYear((long) calendar.get(Calendar.YEAR));
        tEmergencyEyewash.setMonth((long) calendar.get(Calendar.MONTH) + 1);
        tEmergencyEyewash.setDevNo(devNo);
        tEmergencyEyewash.setIssuesFlag("0");
        List<TEmergencyEyewash> tEmergencyEyewashes = tEmergencyEyewashService.selectTEmergencyEyewashList(tEmergencyEyewash);
        if (CollectionUtils.isNotEmpty(tEmergencyEyewashes)) {
            return AjaxResult.success(tEmergencyEyewashes.get(0));
        }
        return AjaxResult.error("此设备不在当前巡检计划中！");
    }

    /**
     * 新增洗眼器检查记录
     */
    @PreAuthorize("@ss.hasPermi('emergency:eyewash:add')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TEmergencyEyewash tEmergencyEyewash) {
        return toAjax(tEmergencyEyewashService.insertTEmergencyEyewash(tEmergencyEyewash));
    }

    /**
     * 修改洗眼器检查记录
     */
    @PreAuthorize("@ss.hasPermi('emergency:eyewash:edit')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.UPDATE)
    @PutMapping
    @RepeatSubmit
    public AjaxResult edit(@RequestBody TEmergencyEyewash tEmergencyEyewash) {
        logger.info("=============修改洗眼器检查记录参数：{}", JSON.toJSONString(tEmergencyEyewash));
        tEmergencyEyewash.setUpdaterCode(getUserId().toString());
        tEmergencyEyewash.setUpdatedate(new Date());
        tEmergencyEyewash.setCheckStatus("1");
        tEmergencyEyewash.setCheckDate(new Date());
        TEmergencyEyewash eyewash = tEmergencyEyewashService.selectTEmergencyEyewashById(tEmergencyEyewash.getId());
        TPatrolPlan tPatrolPlan = tPatrolPlanService.selectTPatrolPlanById(tEmergencyEyewash.getPlanId());
        if (tPatrolPlan.getStatus() == 1) {
            return AjaxResult.error("当前选择的计划已确认！");
        }
        if (!"1".equals(eyewash.getCheckStatus())) {
            tPatrolPlan.setUncheckedNum(tPatrolPlan.getUncheckedNum() - 1);
            tPatrolPlan.setCheckedNum(tPatrolPlan.getCheckedNum() + 1);
            tPatrolPlanService.updateTPatrolPlan(tPatrolPlan);
        }
        if ((!"1".equals(tEmergencyEyewash.getIdentifying()) && StringUtils.isNotEmpty(tEmergencyEyewash.getIdentifying())) ||
                (!"1".equals(tEmergencyEyewash.getNoObstacle()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getNoOcclusion()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getNoDamage()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getInSafe()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getExitPoint()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getExitClean()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getExitTemp()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getKeepOpen()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getNoticed()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getNormalOperation()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback())) ||
                (!"1".equals(tEmergencyEyewash.getFeedback()) && StringUtils.isNotEmpty(tEmergencyEyewash.getFeedback()))) {
            tEmergencyEyewash.setIssuesStatus("1");
            tEmergencyEyewash.setCheckStatus("0");
            tEmergencyEyewashService.updateTEmergencyEyewash(tEmergencyEyewash);
            tEmergencyEyewash.setIssuesFlag("1");
            tEmergencyEyewash.setCheckStatus("1");
            tEmergencyEyewash.setCreaterCode(getUserId().toString());
            tEmergencyEyewash.setCreatedate(new Date());
            tEmergencyEyewashService.insertTEmergencyEyewash(tEmergencyEyewash);
            TPatrolIssues tPatrolIssues = new TPatrolIssues();
            tPatrolIssues.setPatrolType("12");
            tPatrolIssues.setDevDescribe(tEmergencyEyewash.getDevNo() + " " + tEmergencyEyewash.getPosition());
            tPatrolIssues.setLinkId(tEmergencyEyewash.getId());
            tPatrolIssues.setStatus(0L);
            tPatrolIssuesService.insertTPatrolIssues(tPatrolIssues);
        } else {
            if ("1".equals(eyewash.getIssuesStatus())) {
                TPatrolIssues tPatrolIssues = new TPatrolIssues();
                tPatrolIssues.setPatrolType("12");
                tPatrolIssues.setDevDescribe(eyewash.getDevNo() + " " + eyewash.getPosition());
                tPatrolIssues.setCreatedate(new Date());
                for (TPatrolIssues patrolIssues : tPatrolIssuesService.selectTPatrolIssuesList(tPatrolIssues)) {
                    patrolIssues.setStatus(1L);
                    tPatrolIssuesService.updateTPatrolIssues(patrolIssues);
                }
            }
            tEmergencyEyewash.setIssuesStatus("0");
            tEmergencyEyewashService.updateTEmergencyEyewash(tEmergencyEyewash);
        }
        return AjaxResult.success();
    }

    /**
     * 删除洗眼器检查记录
     */
    @PreAuthorize("@ss.hasPermi('emergency:eyewash:remove')")
    @Log(title = "洗眼器检查记录", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(tEmergencyEyewashService.deleteTEmergencyEyewashByIds(ids));
    }
}
