ly 2 сар өмнө
parent
commit
8c52888111
67 өөрчлөгдсөн 4891 нэмэгдсэн , 275 устгасан
  1. 42 2
      master/src/main/java/com/ruoyi/project/listener/yearSemsApprove/YearEndSucessListener.java
  2. 103 0
      master/src/main/java/com/ruoyi/project/sems/controller/TMeasureStressController.java
  3. 98 1
      master/src/main/java/com/ruoyi/project/sems/controller/TMeasureThicknessController.java
  4. 13 13
      master/src/main/java/com/ruoyi/project/sems/controller/TReportYlgdController.java
  5. 32 32
      master/src/main/java/com/ruoyi/project/sems/controller/TReportYlrqController.java
  6. 50 1
      master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevCcController.java
  7. 50 1
      master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevDtController.java
  8. 49 0
      master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevDzsbController.java
  9. 50 0
      master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevGlController.java
  10. 51 0
      master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevYlgdController.java
  11. 4 6
      master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevYlrqController.java
  12. 474 0
      master/src/main/java/com/ruoyi/project/sems/domain/TMeasureStress.java
  13. 38 0
      master/src/main/java/com/ruoyi/project/sems/domain/TMeasureThickness.java
  14. 23 0
      master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevCc.java
  15. 23 0
      master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevDt.java
  16. 23 0
      master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevDzsb.java
  17. 23 0
      master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevGl.java
  18. 21 0
      master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevYlgd.java
  19. 67 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TMeasureStressMapper.java
  20. 3 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TReportYlgdMapper.java
  21. 3 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TReportYlrqMapper.java
  22. 2 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevCcMapper.java
  23. 2 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevDtMapper.java
  24. 2 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevDzsbMapper.java
  25. 3 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevGlMapper.java
  26. 2 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevYlgdMapper.java
  27. 61 0
      master/src/main/java/com/ruoyi/project/sems/service/ITMeasureStressService.java
  28. 3 1
      master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevCcService.java
  29. 3 1
      master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevDtService.java
  30. 3 1
      master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevDzsbService.java
  31. 3 1
      master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevGlService.java
  32. 3 0
      master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevYlgdService.java
  33. 1 2
      master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevYlrqService.java
  34. 93 0
      master/src/main/java/com/ruoyi/project/sems/service/impl/TMeasureStressServiceImpl.java
  35. 61 5
      master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevCcServiceImpl.java
  36. 60 5
      master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevDtServiceImpl.java
  37. 61 5
      master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevDzsbServiceImpl.java
  38. 61 4
      master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevGlServiceImpl.java
  39. 59 3
      master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevYlgdServiceImpl.java
  40. 27 29
      master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevYlrqServiceImpl.java
  41. 1 1
      master/src/main/resources/freeMaker/measureFMaker.ftl
  42. BIN
      master/src/main/resources/freeMaker/seal.png
  43. 1 1
      master/src/main/resources/freeMaker/yearYlgdFMaker.ftl
  44. 1 1
      master/src/main/resources/freeMaker/yearYlrqFMaker.ftl
  45. 192 0
      master/src/main/resources/mybatis/sems/TMeasureStressMapper.xml
  46. 23 2
      master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml
  47. 68 51
      master/src/main/resources/mybatis/sems/TSpecdevCcMapper.xml
  48. 16 1
      master/src/main/resources/mybatis/sems/TSpecdevDtMapper.xml
  49. 15 1
      master/src/main/resources/mybatis/sems/TSpecdevDzsbMapper.xml
  50. 15 2
      master/src/main/resources/mybatis/sems/TSpecdevGlMapper.xml
  51. 15 0
      master/src/main/resources/mybatis/sems/TSpecdevYlgdMapper.xml
  52. 0 48
      master/src/main/resources/mybatis/sems/TSpecdevYlrqMapper.xml
  53. 19 0
      ui/src/api/sems/specCc.js
  54. 19 0
      ui/src/api/sems/specDt.js
  55. 19 0
      ui/src/api/sems/specDzsb.js
  56. 18 0
      ui/src/api/sems/specGl.js
  57. 17 0
      ui/src/api/sems/specYlgd.js
  58. 53 0
      ui/src/api/sems/stress.js
  59. BIN
      ui/src/assets/images/aerial.png
  60. 393 2
      ui/src/views/sems/specCc/index.vue
  61. 391 2
      ui/src/views/sems/specDt/index.vue
  62. 393 2
      ui/src/views/sems/specDzsb/index.vue
  63. 390 2
      ui/src/views/sems/specGl/index.vue
  64. 499 2
      ui/src/views/sems/specYlgd/index.vue
  65. 31 43
      ui/src/views/sems/specYlrq/index.vue
  66. 523 0
      ui/src/views/sems/thickness/stress/index.vue
  67. 29 1
      ui/src/views/sems/thickness/thicknessData/index.vue

+ 42 - 2
master/src/main/java/com/ruoyi/project/listener/yearSemsApprove/YearEndSucessListener.java

@@ -8,6 +8,8 @@ import com.ruoyi.common.utils.SpringContextUtils;
 import com.ruoyi.project.sems.domain.TApprove;
 import com.ruoyi.project.sems.domain.TReportYlgd;
 import com.ruoyi.project.sems.domain.TReportYlrq;
+import com.ruoyi.project.sems.mapper.TReportYlgdMapper;
+import com.ruoyi.project.sems.mapper.TReportYlrqMapper;
 import com.ruoyi.project.sems.service.*;
 import com.ruoyi.project.system.service.ISysUserService;
 import org.activiti.engine.delegate.DelegateExecution;
@@ -17,6 +19,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import java.io.Serializable;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.Map;
 
@@ -40,6 +43,9 @@ public class YearEndSucessListener implements Serializable, ExecutionListener {
         ITReportHiYlgdService tReportHiYlgdService = (ITReportHiYlgdService) SpringContextUtils.getBean("tReportHiYlgdService");
         ISysUserService sysUserService = (ISysUserService) SpringContextUtils.getBean("sysUserService");
         IMailService mailService = (IMailService) SpringContextUtils.getBean("mailService");
+        TReportYlrqMapper tReportYlrqMapper = (TReportYlrqMapper) SpringContextUtils.getBean("tReportYlrqMapper");
+        TReportYlgdMapper tReportYlgdMapper = (TReportYlgdMapper) SpringContextUtils.getBean("tReportYlgdMapper");
+
 
         TApprove approveEntity = tApproveService.getById(id);
         approveEntity.setStatus(1l);
@@ -55,7 +61,23 @@ public class YearEndSucessListener implements Serializable, ExecutionListener {
                     reportYlrqEntity.setApproveStatus(0l);
                     //更新检查日期
 //                    reportYlrqEntity.setCheckDate(approveEntity.getCheckDate());
+                    Calendar cal = Calendar.getInstance();
+                    cal.setTime(new Date());
+                    cal.add(Calendar.DAY_OF_YEAR, -180);
+                    Date threshold = cal.getTime();
+
+                    if (reportYlrqEntity.getCheckDate() == null || reportYlrqEntity.getCheckDate().before(threshold)) {
+                        reportYlrqEntity.setCheckDate(new Date());
+                    }
+
+                    cal.setTime(reportYlrqEntity.getCheckDate());
+                    cal.add(Calendar.YEAR, 1);
+                    reportYlrqEntity.setNextCheckDate(cal.getTime());
+
                     tReportYlrqService.updateTReportYlrq(reportYlrqEntity);
+                    new Thread(() -> {
+                        tReportYlrqMapper.sysnReport(reportYlrqEntity);
+                    }, "压力容器年检报告修改同步").start();
                     //审批通过新增历史年度报告数据
                     reportYlrqEntity.setBuildDate(new Date());
                     reportYlrqEntity.setApproveId(approveEntity.getProcessId());
@@ -69,9 +91,25 @@ public class YearEndSucessListener implements Serializable, ExecutionListener {
                 ) {
                     TReportYlgd reportYlgdEntity = tReportYlgdService.selectTReportYlgdById(Long.parseLong(i));
                     reportYlgdEntity.setApproveStatus(0l);
-                    //更新检查日期
-//                    reportYlgdEntity.setCheckDate(approveEntity.getCheckDate());
+
+                    Calendar cal = Calendar.getInstance();
+                    cal.setTime(new Date());
+                    cal.add(Calendar.DAY_OF_YEAR, -180);
+                    Date threshold = cal.getTime();
+
+                    if (reportYlgdEntity.getCheckDate() == null || reportYlgdEntity.getCheckDate().before(threshold)) {
+                        reportYlgdEntity.setCheckDate(new Date());
+                    }
+
+                    cal.setTime(reportYlgdEntity.getCheckDate());
+                    cal.add(Calendar.YEAR, 1);
+                    reportYlgdEntity.setNextCheckDate(cal.getTime());
                     tReportYlgdService.updateTReportYlgd(reportYlgdEntity);
+
+                    new Thread(() -> {
+                        tReportYlgdMapper.sysnReport(reportYlgdEntity);
+                    }, "压力管道年检报告修改同步").start();
+
                     //审批通过新增历史年度报告数据
                     reportYlgdEntity.setBuildDate(new Date());
                     reportYlgdEntity.setApproveId(approveEntity.getProcessId());
@@ -149,4 +187,6 @@ public class YearEndSucessListener implements Serializable, ExecutionListener {
             logger.error("邮件发送失败" + JSON.toJSONString(e));
         }
     }
+
+
 }

+ 103 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureStressController.java

@@ -0,0 +1,103 @@
+package com.ruoyi.project.sems.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.project.sems.domain.TMeasureStress;
+import com.ruoyi.project.sems.service.ITMeasureStressService;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.web.page.TableDataInfo;
+
+/**
+ * 材料应力Controller
+ *
+ * @author ssy
+ * @date 2025-03-19
+ */
+@RestController
+@RequestMapping("/sems/stress")
+public class TMeasureStressController extends BaseController
+{
+    @Autowired
+    private ITMeasureStressService tMeasureStressService;
+
+    /**
+     * 查询材料应力列表
+     */
+    @PreAuthorize("@ss.hasPermi('sems:stress:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TMeasureStress tMeasureStress)
+    {
+        startPage();
+        List<TMeasureStress> list = tMeasureStressService.selectTMeasureStressList(tMeasureStress);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出材料应力列表
+     */
+    @PreAuthorize("@ss.hasPermi('sems:stress:export')")
+    @Log(title = "材料应力", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TMeasureStress tMeasureStress)
+    {
+        List<TMeasureStress> list = tMeasureStressService.selectTMeasureStressList(tMeasureStress);
+        ExcelUtil<TMeasureStress> util = new ExcelUtil<TMeasureStress>(TMeasureStress.class);
+        return util.exportExcel(list, "stress");
+    }
+
+    /**
+     * 获取材料应力详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('sems:stress:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tMeasureStressService.selectTMeasureStressById(id));
+    }
+
+    /**
+     * 新增材料应力
+     */
+    @PreAuthorize("@ss.hasPermi('sems:stress:add')")
+    @Log(title = "材料应力", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TMeasureStress tMeasureStress)
+    {
+        return toAjax(tMeasureStressService.insertTMeasureStress(tMeasureStress));
+    }
+
+    /**
+     * 修改材料应力
+     */
+    @PreAuthorize("@ss.hasPermi('sems:stress:edit')")
+    @Log(title = "材料应力", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TMeasureStress tMeasureStress)
+    {
+        return toAjax(tMeasureStressService.updateTMeasureStress(tMeasureStress));
+    }
+
+    /**
+     * 删除材料应力
+     */
+    @PreAuthorize("@ss.hasPermi('sems:stress:remove')")
+    @Log(title = "材料应力", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tMeasureStressService.deleteTMeasureStressByIds(ids));
+    }
+}

+ 98 - 1
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureThicknessController.java

@@ -19,7 +19,9 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.officeConvert.OfficeConvertController;
 import com.ruoyi.project.sems.domain.TMeasureRecord;
+import com.ruoyi.project.sems.domain.TMeasureStress;
 import com.ruoyi.project.sems.domain.TMeasureThickness;
+import com.ruoyi.project.sems.mapper.TMeasureStressMapper;
 import com.ruoyi.project.sems.service.ITMeasureRecordService;
 import com.ruoyi.project.sems.service.ITMeasureThicknessService;
 import freemarker.template.Template;
@@ -35,6 +37,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
@@ -45,6 +48,8 @@ import java.math.BigDecimal;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.text.DateFormat;
+import java.text.NumberFormat;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -64,7 +69,31 @@ public class TMeasureThicknessController extends BaseController
     private ITMeasureRecordService tMeasureRecordService;
     @Autowired
     private OfficeConvertController officeConvertController;
-
+    @Resource
+    private TMeasureStressMapper tMeasureStressMapper;
+
+    // 美标(ASME)与国标B系列外径对照表(单位:mm)
+    private static final Map<Double, Double> INCH_TO_MM_MAP = new HashMap<>();
+    static {
+        // 基础尺寸(0.5"~4")
+        INCH_TO_MM_MAP.put(0.5, 21.3);   // 1/2英寸 → 21.3mm(国标B系列与ASME一致)[1,2](@ref)
+        INCH_TO_MM_MAP.put(0.75, 26.7);  // 3/4英寸 → 26.7mm(国标B系列与ASME一致)
+        INCH_TO_MM_MAP.put(1.0, 33.4);   // 1英寸 → 33.4mm(国标B系列与ASME一致)[1,2](@ref)
+        INCH_TO_MM_MAP.put(1.5, 48.3);   // 1.5英寸 → 48.3mm(国标B系列与ASME一致)[1,2](@ref)
+        INCH_TO_MM_MAP.put(2.0, 57.0);   // 2英寸 → 国标B系列57.0mm(ASME为60.3mm)[2,3](@ref)
+        INCH_TO_MM_MAP.put(3.0, 88.9);   // 3英寸 → 88.9mm(国标B系列与ASME一致)[1,2](@ref)
+        INCH_TO_MM_MAP.put(4.0, 114.3);  // 4英寸 → 114.3mm(国标B系列与ASME一致)
+
+        // 扩展尺寸(6"~20")
+        INCH_TO_MM_MAP.put(6.0, 168.3);  // 6英寸 → 168.3mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(8.0, 219.1);  // 8英寸 → 219.1mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(10.0, 273.0); // 10英寸 → 273.0mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(12.0, 323.9); // 12英寸 → 323.9mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(14.0, 355.6); // 14英寸 → 355.6mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(16.0, 406.4); // 16英寸 → 406.4mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(18.0, 457.0); // 18英寸 → 457.0mm(国标B系列与ASME一致)[2](@ref)
+        INCH_TO_MM_MAP.put(20.0, 508.0); // 20英寸 → 508.0mm(国标B系列与ASME一致)[2](@ref)
+    }
 
     private final Long alarmtype = 1080L;//特种设备预警ID
     /**
@@ -78,6 +107,7 @@ public class TMeasureThicknessController extends BaseController
         startPage();
         List<TMeasureThickness> list = tMeasureThicknessService.selectTMeasureThicknessList(tMeasureThickness);
         for (TMeasureThickness m : list) {
+            //最新测厚
             List<TMeasureRecord> measureRecords = tMeasureRecordService.queryRecords(m.getId().toString());
             if (measureRecords.size() > 0) {
                 m.setFirstMeasureDate(measureRecords.get(measureRecords.size() - 1).getMeasureDate());
@@ -656,4 +686,71 @@ public class TMeasureThicknessController extends BaseController
         return pathName;
     }
 
+    /**
+     * 将字符串转换为 double 数值,支持多种格式(如逗号/小数点分隔符、千位分隔符等)
+     * @param valueStr 输入的字符串(如 "2.5", "1,200.75", "3,14")
+     * @return 转换后的 double 数值
+     * @throws ParseException 如果无法解析字符串
+     */
+    public static double parseStringToDouble(String valueStr) throws ParseException {
+        // 移除可能的千位分隔符(如 "1,000" -> "1000")
+        String sanitized = valueStr.replaceAll("[,']", ""); // 适配逗号或单引号作为千位分隔符
+
+        // 适配不同地区的小数点格式(如 "3,14" 转换为 3.14)
+        NumberFormat format = NumberFormat.getInstance(Locale.getDefault());
+        return format.parse(sanitized).doubleValue();
+    }
+
+
+    /**
+     * 将带单位的英寸字符串转换为国标B系列外径(毫米)
+     * @param input 输入字符串(如 "6\"", "2.5in", "3.14inch")
+     * @return 国标B系列对应的外径(毫米)
+     * @throws ParseException 如果输入格式无法解析
+     * @throws IllegalArgumentException 如果尺寸未在对照表中定义
+     */
+    public static double convertInchStringToMillimeters(String input) throws ParseException, IllegalArgumentException {
+        // 1. 移除单位符号和空格
+        String sanitized = input.trim()
+                .replaceAll("[\"iInN]$", "")  // 移除末尾的 "、in、inch
+                .replaceAll("\\s+", "");      // 移除中间空格
+
+        // 2. 解析为 double 类型的英寸值
+        double inches = parseStringToDouble(sanitized);
+
+        // 3. 查找对照表并返回毫米值
+        if (INCH_TO_MM_MAP.containsKey(inches)) {
+            return INCH_TO_MM_MAP.get(inches);
+        } else {
+            throw new IllegalArgumentException("尺寸 " + inches + " 英寸未在对照表中定义");
+        }
+    }
+
+    /**
+     * 计算管道壁厚的通用方法(输入参数均为 String 类型)
+     */
+    public double calculateTsd(TMeasureThickness thickness)
+            throws ParseException {
+        // 转换所有参数为 double
+        double p = parseStringToDouble(thickness.getDesPressure());
+        double d0 = convertInchStringToMillimeters(thickness.getSpecification());
+        double ej = 1;
+        double y = 0.4;
+
+        TMeasureStress stress = tMeasureStressMapper.selectTMeasureStressByName(thickness.getMaterial());
+        double c2 = 1.5;
+        if (stress.getIsSteel() == 1) {
+             c2 = 1 ;
+        }
+
+        double sT = 0;
+
+
+        // 计算壁厚公式
+        double numerator = p * d0;
+        double denominator = 2 * (sT * ej + p * y);
+        return (numerator / denominator) + c2;
+    }
+
+
 }

+ 13 - 13
master/src/main/java/com/ruoyi/project/sems/controller/TReportYlgdController.java

@@ -117,19 +117,19 @@ public class TReportYlgdController extends BaseController {
         row0.createCell(0).setCellValue("使用证");
         row0.createCell(1).setCellValue("注册编号");
         row0.createCell(2).setCellValue("位号");
-        row0.createCell(3).setCellValue("1");
-        row0.createCell(4).setCellValue("2");
-        row0.createCell(5).setCellValue("3");
-        row0.createCell(6).setCellValue("4");
-        row0.createCell(7).setCellValue("5");
+        row0.createCell(3).setCellValue("1安全管理情况");
+        row0.createCell(4).setCellValue("2设计图纸文档、维修记录、质量证明等资料");
+        row0.createCell(5).setCellValue("3作业人员定期培训情况");
+        row0.createCell(6).setCellValue("4管道本体及支架");
+        row0.createCell(7).setCellValue("5管道运行情况");
         row0.createCell(8).setCellValue("安全附件仪表及检查情况");
         row0.createCell(9);
         row0.createCell(10);
         row0.createCell(11);
         row0.createCell(12);
         row0.createCell(13);
-        row0.createCell(14).setCellValue("12");
-        row0.createCell(15).setCellValue("13");
+        row0.createCell(14).setCellValue("12电阻值测量");
+        row0.createCell(15).setCellValue("13壁厚测定");
         row0.createCell(16).setCellValue("14");
         row0.createCell(17).setCellValue("15");
         row0.createCell(18).setCellValue("16");
@@ -150,12 +150,12 @@ public class TReportYlgdController extends BaseController {
         row1.createCell(5);
         row1.createCell(6);
         row1.createCell(7);
-        row1.createCell(8).setCellValue("6");
-        row1.createCell(9).setCellValue("7");
-        row1.createCell(10).setCellValue("8");
-        row1.createCell(11).setCellValue("9");
-        row1.createCell(12).setCellValue("10");
-        row1.createCell(13).setCellValue("11");
+        row1.createCell(8).setCellValue("6安全阀");
+        row1.createCell(9).setCellValue("7爆破片装置");
+        row1.createCell(10).setCellValue("8阻火器装置");
+        row1.createCell(11).setCellValue("9紧急切断阀");
+        row1.createCell(12).setCellValue("10压力表");
+        row1.createCell(13).setCellValue("11测温仪表");
         row1.createCell(14);
         row1.createCell(15);
         row1.createCell(16);

+ 32 - 32
master/src/main/java/com/ruoyi/project/sems/controller/TReportYlrqController.java

@@ -159,38 +159,38 @@ public class TReportYlrqController extends BaseController {
         row1.createCell(0);
         row1.createCell(1);
         row1.createCell(2);
-        row1.createCell(3).setCellValue("1");
-        row1.createCell(4).setCellValue("2");
-        row1.createCell(5).setCellValue("3");
-        row1.createCell(6).setCellValue("4");
-        row1.createCell(7).setCellValue("5");
-        row1.createCell(8).setCellValue("6");
-        row1.createCell(9).setCellValue("7");
-        row1.createCell(10).setCellValue("8");
-        row1.createCell(11).setCellValue("9");
-        row1.createCell(12).setCellValue("10");
-        row1.createCell(13).setCellValue("11");
-        row1.createCell(14).setCellValue("12");
-        row1.createCell(15).setCellValue("13");
-        row1.createCell(16).setCellValue("14");
-        row1.createCell(17).setCellValue("15");
-        row1.createCell(18).setCellValue("16");
-        row1.createCell(19).setCellValue("17");
-        row1.createCell(20).setCellValue("18");
-        row1.createCell(21).setCellValue("19");
-        row1.createCell(22).setCellValue("20");
-        row1.createCell(23).setCellValue("21");
-        row1.createCell(24).setCellValue("22");
-        row1.createCell(25).setCellValue("23");
-        row1.createCell(26).setCellValue("24");
-        row1.createCell(27).setCellValue("25");
-        row1.createCell(28).setCellValue("26");
-        row1.createCell(29).setCellValue("27");
-        row1.createCell(30).setCellValue("28");
-        row1.createCell(31).setCellValue("29");
-        row1.createCell(32).setCellValue("30");
-        row1.createCell(33).setCellValue("31");
-        row1.createCell(34).setCellValue("32");
+        row1.createCell(3).setCellValue("1管理制度、操作规程、运行记录");
+        row1.createCell(4).setCellValue("2设计文件、竣工图样、产品合格证、质量证明文件、安装使用说明");
+        row1.createCell(5).setCellValue("3监督检验证书以及安装、改造、修理等资料");
+        row1.createCell(6).setCellValue("4使用登记证,使用登记表是否与实际相符");
+        row1.createCell(7).setCellValue("5日常维护保养、定期安全检查记录");
+        row1.createCell(8).setCellValue("6年度检查、定期检验报告齐全,报告中问题解决");
+        row1.createCell(9).setCellValue("7作业人员定期培训情况");
+        row1.createCell(10).setCellValue("8设备铭牌、漆色、标志、使用证号码");
+        row1.createCell(11).setCellValue("9本体裂、过热、变形、泄漏、损伤情况");
+        row1.createCell(12).setCellValue("10接口部位、焊接接头等裂纹、泄漏、损伤情况");
+        row1.createCell(13).setCellValue("11外表面腐蚀、异常结霜、结露情况");
+        row1.createCell(14).setCellValue("12保温层、隔热层、衬里情况");
+        row1.createCell(15).setCellValue("13检漏孔、信号孔");
+        row1.createCell(16).setCellValue("14容器与相邻管道、构件间异常振动、响声、摩擦");
+        row1.createCell(17).setCellValue("15支承、支座、基础、紧固螺栓");
+        row1.createCell(18).setCellValue("16遮阳罩、操作台紧固");
+        row1.createCell(19).setCellValue("17罐体与底盘等连接");
+        row1.createCell(20).setCellValue("18波板、罐内扶梯与罐体连接");
+        row1.createCell(21).setCellValue("19罐车拉紧带、鞍座、中间支座");
+        row1.createCell(22).setCellValue("20气液相管及其它管路");
+        row1.createCell(23).setCellValue("21疏水、排放、排污装置");
+        row1.createCell(24).setCellValue("22设备运行稳定情况");
+        row1.createCell(25).setCellValue("23接地装置");
+        row1.createCell(26).setCellValue("24安全状况等级为4级的压力容器的监控措施");
+        row1.createCell(27).setCellValue("25安全阀");
+        row1.createCell(28).setCellValue("26压力表");
+        row1.createCell(29).setCellValue("27爆破片");
+        row1.createCell(30).setCellValue("28测温仪表");
+        row1.createCell(31).setCellValue("29液位计");
+        row1.createCell(32).setCellValue("30快开门安全联锁装置");
+        row1.createCell(33).setCellValue("31紧急切断装置");
+        row1.createCell(34).setCellValue("32装卸软管、装卸阀门");
         row1.createCell(35);
         row1.createCell(36);
         row1.createCell(37);

+ 50 - 1
master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevCcController.java

@@ -4,16 +4,20 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.document.ZipUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 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.security.LoginUser;
 import com.ruoyi.framework.security.service.TokenService;
 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.sems.domain.ParamData;
 import com.ruoyi.project.sems.domain.TSpecCheck;
 import com.ruoyi.project.sems.domain.TSpecdevCc;
@@ -43,9 +47,13 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -80,7 +88,8 @@ public class TSpecdevCcController extends BaseController {
     private ITAlarmtypeService tAlarmtypeService;
     @Resource
     private SysPlantMapper sysPlantMapper;
-
+    @Autowired
+    private ITCommonfileService tCommonfileService;
     /**
      * 查询特种设备叉车台账列表
      */
@@ -681,4 +690,44 @@ public class TSpecdevCcController extends BaseController {
         this.tSpecdevCcService.updateTSpecdevCc(tSpecdevCc);
     }
 
+    /**
+     * 批量导入文件
+     */
+    @Log(title = "特种设备文件导入", businessType = BusinessType.OTHER)
+    @PostMapping("/importFiles")
+    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws Exception {
+        tSpecdevCcService.importFiles(files,plantCode,fileType,getUserId().toString());
+
+        return AjaxResult.success();
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     */
+    @RequestMapping("/downloadFileZip")
+    public AjaxResult downloadFileZip(@RequestParam String id, String type, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        String[] stringIds = id.split(",");
+
+        TCommonfile tCommonfile = new TCommonfile();
+        tCommonfile.setpType("sems-cc-" + type);
+        tCommonfile.setpIds(stringIds);
+        List<TCommonfile> fileList = tCommonfileService.selectAllFileListFuzzy(tCommonfile);
+
+        OutputStream out = null;
+        out = response.getOutputStream();
+        //存放所有文件路径
+        List<String> urlList = new ArrayList<>();
+        for (TCommonfile t:fileList
+        ) {
+            // 将路径字符串转换为Path对象
+            Path path = Paths.get(t.getFileUrl());
+            // 获取文件名
+            String fileName = path.getFileName().toString();
+            urlList.add(t.getFileUrl().replace("/profile",""));
+        }
+        logger.info(JSON.toJSONString(urlList));
+        return ZipUtil.createZip(RuoYiConfig.getProfile(), "",  "特种设备.zip", urlList, response);
+    }
+
 }

+ 50 - 1
master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevDtController.java

@@ -3,6 +3,8 @@ package com.ruoyi.project.sems.controller;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -11,10 +13,14 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.document.ZipUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.framework.security.LoginUser;
 import com.ruoyi.framework.security.service.TokenService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import com.ruoyi.project.sems.domain.*;
 import com.ruoyi.project.sems.his.controller.TApproveSpecModifyController;
 import com.ruoyi.project.sems.his.controller.TSpechiDtController;
@@ -50,6 +56,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * 特种设备电梯台账Controller
@@ -83,7 +91,8 @@ public class TSpecdevDtController extends BaseController {
     private SysPlantMapper sysPlantMapper;
     @Resource
     private TSpecdevDtMapper tSpecdevDtMapper;
-
+    @Autowired
+    private ITCommonfileService tCommonfileService;
     /**
      * 查询特种设备电梯台账列表
      */
@@ -696,4 +705,44 @@ public class TSpecdevDtController extends BaseController {
         this.tSpecdevDtService.updateTSpecdevDt(tSpecdevDt);
     }
 
+    /**
+     * 批量导入文件
+     */
+    @Log(title = "特种设备文件导入", businessType = BusinessType.OTHER)
+    @PostMapping("/importFiles")
+    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws Exception {
+        tSpecdevDtService.importFiles(files,plantCode,fileType,getUserId().toString());
+
+        return AjaxResult.success();
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     */
+    @RequestMapping("/downloadFileZip")
+    public AjaxResult downloadFileZip(@RequestParam String id, String type, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        String[] stringIds = id.split(",");
+
+        TCommonfile tCommonfile = new TCommonfile();
+        tCommonfile.setpType("sems-dt-" + type);
+        tCommonfile.setpIds(stringIds);
+        List<TCommonfile> fileList = tCommonfileService.selectAllFileListFuzzy(tCommonfile);
+
+        OutputStream out = null;
+        out = response.getOutputStream();
+        //存放所有文件路径
+        List<String> urlList = new ArrayList<>();
+        for (TCommonfile t:fileList
+        ) {
+            // 将路径字符串转换为Path对象
+            Path path = Paths.get(t.getFileUrl());
+            // 获取文件名
+            String fileName = path.getFileName().toString();
+            urlList.add(t.getFileUrl().replace("/profile",""));
+        }
+        logger.info(JSON.toJSONString(urlList));
+        return ZipUtil.createZip(RuoYiConfig.getProfile(), "",  "特种设备.zip", urlList, response);
+    }
+
 }

+ 49 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevDzsbController.java

@@ -4,16 +4,20 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.document.ZipUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 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.security.LoginUser;
 import com.ruoyi.framework.security.service.TokenService;
 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.sems.domain.ParamData;
 import com.ruoyi.project.sems.domain.TSpecCheck;
 import com.ruoyi.project.sems.domain.TSpecdevDzsb;
@@ -44,9 +48,13 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -84,6 +92,8 @@ public class TSpecdevDzsbController extends BaseController {
     private SysPlantMapper sysPlantMapper;
     @Resource
     private TSpecdevDzsbMapper tSpecdevDzsbMapper;
+    @Autowired
+    private ITCommonfileService tCommonfileService;
     /**
      * 查询特种设备吊装设备台账列表
      */
@@ -704,5 +714,44 @@ public class TSpecdevDzsbController extends BaseController {
         this.tSpecdevDzsbService.updateTSpecdevDzsb(tSpecdevDzsb);
     }
 
+    /**
+     * 批量导入文件
+     */
+    @Log(title = "特种设备文件导入", businessType = BusinessType.OTHER)
+    @PostMapping("/importFiles")
+    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws Exception {
+        tSpecdevDzsbService.importFiles(files,plantCode,fileType,getUserId().toString());
+
+        return AjaxResult.success();
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     */
+    @RequestMapping("/downloadFileZip")
+    public AjaxResult downloadFileZip(@RequestParam String id, String type, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        String[] stringIds = id.split(",");
+
+        TCommonfile tCommonfile = new TCommonfile();
+        tCommonfile.setpType("sems-dzsb-" + type);
+        tCommonfile.setpIds(stringIds);
+        List<TCommonfile> fileList = tCommonfileService.selectAllFileListFuzzy(tCommonfile);
+
+        OutputStream out = null;
+        out = response.getOutputStream();
+        //存放所有文件路径
+        List<String> urlList = new ArrayList<>();
+        for (TCommonfile t:fileList
+        ) {
+            // 将路径字符串转换为Path对象
+            Path path = Paths.get(t.getFileUrl());
+            // 获取文件名
+            String fileName = path.getFileName().toString();
+            urlList.add(t.getFileUrl().replace("/profile",""));
+        }
+        logger.info(JSON.toJSONString(urlList));
+        return ZipUtil.createZip(RuoYiConfig.getProfile(), "",  "特种设备.zip", urlList, response);
+    }
 
 }

+ 50 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevGlController.java

@@ -3,6 +3,8 @@ package com.ruoyi.project.sems.controller;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -11,10 +13,14 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.document.ZipUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.framework.security.LoginUser;
 import com.ruoyi.framework.security.service.TokenService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
 import com.ruoyi.project.sems.domain.*;
 import com.ruoyi.project.sems.his.controller.TApproveSpecModifyController;
 import com.ruoyi.project.sems.his.controller.TSpechiDzsbController;
@@ -50,6 +56,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * 特种设备锅炉台账Controller
@@ -84,6 +92,8 @@ public class TSpecdevGlController extends BaseController
     private SysPlantMapper sysPlantMapper;
     @Autowired
     private TSpecdevGlMapper tSpecdevGlMapper;
+    @Autowired
+    private ITCommonfileService tCommonfileService;
     /**
      * 查询特种设备锅炉台账列表
      */
@@ -759,4 +769,44 @@ public class TSpecdevGlController extends BaseController
         tSpecdevGl.setWarnFlag(flag);
         this.tSpecdevGlService.updateTSpecdevGl(tSpecdevGl);
     }
+
+    /**
+     * 批量导入文件
+     */
+    @Log(title = "特种设备文件导入", businessType = BusinessType.OTHER)
+    @PostMapping("/importFiles")
+    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws Exception {
+        tSpecdevGlService.importFiles(files,plantCode,fileType,getUserId().toString());
+
+        return AjaxResult.success();
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     */
+    @RequestMapping("/downloadFileZip")
+    public AjaxResult downloadFileZip(@RequestParam String id, String type, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        String[] stringIds = id.split(",");
+
+        TCommonfile tCommonfile = new TCommonfile();
+        tCommonfile.setpType("sems-gl-" + type);
+        tCommonfile.setpIds(stringIds);
+        List<TCommonfile> fileList = tCommonfileService.selectAllFileListFuzzy(tCommonfile);
+
+        OutputStream out = null;
+        out = response.getOutputStream();
+        //存放所有文件路径
+        List<String> urlList = new ArrayList<>();
+        for (TCommonfile t:fileList
+        ) {
+            // 将路径字符串转换为Path对象
+            Path path = Paths.get(t.getFileUrl());
+            // 获取文件名
+            String fileName = path.getFileName().toString();
+            urlList.add(t.getFileUrl().replace("/profile",""));
+        }
+        logger.info(JSON.toJSONString(urlList));
+        return ZipUtil.createZip(RuoYiConfig.getProfile(), "",  "特种设备.zip", urlList, response);
+    }
 }

+ 51 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevYlgdController.java

@@ -4,17 +4,21 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.document.ZipUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 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.interceptor.annotation.RepeatSubmit;
 import com.ruoyi.framework.security.LoginUser;
 import com.ruoyi.framework.security.service.TokenService;
 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.sems.domain.ParamData;
 import com.ruoyi.project.sems.domain.TSpecCheck;
 import com.ruoyi.project.sems.domain.TSpecdevYlgd;
@@ -45,9 +49,13 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -90,6 +98,9 @@ public class TSpecdevYlgdController extends BaseController {
     //注入特种设备预警接口
     @Autowired
     private ITAlarmtypeService tAlarmtypeService;
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
     /**
      * 查询特种设备压力管道台账列表
      */
@@ -844,4 +855,44 @@ public class TSpecdevYlgdController extends BaseController {
         tSpecdevYlgd.setWarnFlag(flag);
         this.tSpecdevYlgdService.updateTSpecdevYlgd(tSpecdevYlgd);
     }
+
+    /**
+     * 批量导入文件
+     */
+    @Log(title = "特种设备文件导入", businessType = BusinessType.OTHER)
+    @PostMapping("/importFiles")
+    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws Exception {
+        tSpecdevYlgdService.importFiles(files,plantCode,fileType,getUserId().toString());
+
+        return AjaxResult.success();
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     */
+    @RequestMapping("/downloadFileZip")
+    public AjaxResult downloadFileZip(@RequestParam String id, String type, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        String[] stringIds = id.split(",");
+
+        TCommonfile tCommonfile = new TCommonfile();
+        tCommonfile.setpType("sems-ylgd-" + type);
+        tCommonfile.setpIds(stringIds);
+        List<TCommonfile> fileList = tCommonfileService.selectAllFileListFuzzy(tCommonfile);
+
+        OutputStream out = null;
+        out = response.getOutputStream();
+        //存放所有文件路径
+        List<String> urlList = new ArrayList<>();
+        for (TCommonfile t:fileList
+        ) {
+            // 将路径字符串转换为Path对象
+            Path path = Paths.get(t.getFileUrl());
+            // 获取文件名
+            String fileName = path.getFileName().toString();
+            urlList.add(t.getFileUrl().replace("/profile",""));
+        }
+        logger.info(JSON.toJSONString(urlList));
+        return ZipUtil.createZip(RuoYiConfig.getProfile(), "",  "特种设备.zip", urlList, response);
+    }
 }

+ 4 - 6
master/src/main/java/com/ruoyi/project/sems/controller/TSpecdevYlrqController.java

@@ -848,12 +848,11 @@ public class TSpecdevYlrqController extends BaseController {
     }
 
     /**
-     * 批量导入
+     * 批量导入文件
      */
-    @PreAuthorize("@ss.hasPermi('sems:specYlrq:add')")
     @Log(title = "特种设备文件导入", businessType = BusinessType.OTHER)
     @PostMapping("/importFiles")
-    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws IOException, ParseException {
+    public AjaxResult importFiles(@RequestParam("file") List<MultipartFile> files,@RequestParam("plantCode") String plantCode,@RequestParam("fileType") String fileType) throws Exception {
         tSpecdevYlrqService.importFiles(files,plantCode,fileType,getUserId().toString());
 
         return AjaxResult.success();
@@ -864,11 +863,11 @@ public class TSpecdevYlrqController extends BaseController {
      * @throws IOException
      */
     @RequestMapping("/downloadFileZip")
-    public AjaxResult downloadFileZip(@RequestParam String id, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public AjaxResult downloadFileZip(@RequestParam String id,String type, HttpServletRequest request, HttpServletResponse response) throws Exception {
         String[] stringIds = id.split(",");
 
         TCommonfile tCommonfile = new TCommonfile();
-        tCommonfile.setpType("sems-ylrq-");
+        tCommonfile.setpType("sems-ylrq-" + type);
         tCommonfile.setpIds(stringIds);
         List<TCommonfile> fileList = tCommonfileService.selectAllFileListFuzzy(tCommonfile);
 
@@ -884,7 +883,6 @@ public class TSpecdevYlrqController extends BaseController {
             String fileName = path.getFileName().toString();
             urlList.add(t.getFileUrl().replace("/profile",""));
         }
-
         logger.info(JSON.toJSONString(urlList));
         return ZipUtil.createZip(RuoYiConfig.getProfile(), "",  "特种设备.zip", urlList, response);
     }

+ 474 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TMeasureStress.java

@@ -0,0 +1,474 @@
+package com.ruoyi.project.sems.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 材料应力对象 t_measure_stress
+ *
+ * @author ssy
+ * @date 2025-03-19
+ */
+public class TMeasureStress extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识ID */
+    private Long id;
+
+    /** 材料名称 */
+    @Excel(name = "材料名称")
+    private String name;
+
+    /** 是否不锈钢 */
+
+    @Excel(name = "是否不锈钢")
+    private Long isSteel;
+
+
+    /** 40 */
+    @Excel(name = "40")
+    private String c40;
+
+    /** 65 */
+    @Excel(name = "65")
+    private String c65;
+
+    /** 100 */
+    @Excel(name = "100")
+    private String c100;
+
+    /** 125 */
+    @Excel(name = "125")
+    private String c125;
+
+    /** 150 */
+    @Excel(name = "150")
+    private String c150;
+
+    /** 175 */
+    @Excel(name = "175")
+    private String c175;
+
+    /** 200 */
+    @Excel(name = "200")
+    private String c200;
+
+    /** 225 */
+    @Excel(name = "225")
+    private String c225;
+
+    /** 250 */
+    @Excel(name = "250")
+    private String c250;
+
+    /** 275 */
+    @Excel(name = "275")
+    private String c275;
+
+    /** 300 */
+    @Excel(name = "300")
+    private String c300;
+
+    /** 325 */
+    @Excel(name = "325")
+    private String c325;
+
+    /** 350 */
+    @Excel(name = "350")
+    private String c350;
+
+    /** 375 */
+    @Excel(name = "375")
+    private String c375;
+
+    /** 400 */
+    @Excel(name = "400")
+    private String c400;
+
+    /** 425 */
+    @Excel(name = "425")
+    private String c425;
+
+    /** 450 */
+    @Excel(name = "450")
+    private String c450;
+
+    /** 475 */
+    @Excel(name = "475")
+    private String c475;
+
+    /** 500 */
+    @Excel(name = "500")
+    private String c500;
+
+    /** 525 */
+    @Excel(name = "525")
+    private String c525;
+
+    /** 550 */
+    @Excel(name = "550")
+    private String c550;
+
+    /** 575 */
+    @Excel(name = "575")
+    private String c575;
+
+    /** 600 */
+    @Excel(name = "600")
+    private String c600;
+
+    /** 状态 0 :正常 ;-1:删除 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private Long createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private Long updaterCode;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+    public void setC40(String c40)
+    {
+        this.c40 = c40;
+    }
+
+    public String getC40()
+    {
+        return c40;
+    }
+    public void setC65(String c65)
+    {
+        this.c65 = c65;
+    }
+
+    public String getC65()
+    {
+        return c65;
+    }
+    public void setC100(String c100)
+    {
+        this.c100 = c100;
+    }
+
+    public String getC100()
+    {
+        return c100;
+    }
+    public void setC125(String c125)
+    {
+        this.c125 = c125;
+    }
+
+    public String getC125()
+    {
+        return c125;
+    }
+    public void setC150(String c150)
+    {
+        this.c150 = c150;
+    }
+
+    public String getC150()
+    {
+        return c150;
+    }
+    public void setC175(String c175)
+    {
+        this.c175 = c175;
+    }
+
+    public String getC175()
+    {
+        return c175;
+    }
+    public void setC200(String c200)
+    {
+        this.c200 = c200;
+    }
+
+    public String getC200()
+    {
+        return c200;
+    }
+    public void setC225(String c225)
+    {
+        this.c225 = c225;
+    }
+
+    public String getC225()
+    {
+        return c225;
+    }
+    public void setC250(String c250)
+    {
+        this.c250 = c250;
+    }
+
+    public String getC250()
+    {
+        return c250;
+    }
+    public void setC275(String c275)
+    {
+        this.c275 = c275;
+    }
+
+    public String getC275()
+    {
+        return c275;
+    }
+    public void setC300(String c300)
+    {
+        this.c300 = c300;
+    }
+
+    public String getC300()
+    {
+        return c300;
+    }
+    public void setC325(String c325)
+    {
+        this.c325 = c325;
+    }
+
+    public String getC325()
+    {
+        return c325;
+    }
+    public void setC350(String c350)
+    {
+        this.c350 = c350;
+    }
+
+    public String getC350()
+    {
+        return c350;
+    }
+    public void setC375(String c375)
+    {
+        this.c375 = c375;
+    }
+
+    public String getC375()
+    {
+        return c375;
+    }
+    public void setC400(String c400)
+    {
+        this.c400 = c400;
+    }
+
+    public String getC400()
+    {
+        return c400;
+    }
+    public void setC425(String c425)
+    {
+        this.c425 = c425;
+    }
+
+    public String getC425()
+    {
+        return c425;
+    }
+    public void setC450(String c450)
+    {
+        this.c450 = c450;
+    }
+
+    public String getC450()
+    {
+        return c450;
+    }
+    public void setC475(String c475)
+    {
+        this.c475 = c475;
+    }
+
+    public String getC475()
+    {
+        return c475;
+    }
+    public void setC500(String c500)
+    {
+        this.c500 = c500;
+    }
+
+    public String getC500()
+    {
+        return c500;
+    }
+    public void setC525(String c525)
+    {
+        this.c525 = c525;
+    }
+
+    public String getC525()
+    {
+        return c525;
+    }
+    public void setC550(String c550)
+    {
+        this.c550 = c550;
+    }
+
+    public String getC550()
+    {
+        return c550;
+    }
+    public void setC575(String c575)
+    {
+        this.c575 = c575;
+    }
+
+    public String getC575()
+    {
+        return c575;
+    }
+    public void setC600(String c600)
+    {
+        this.c600 = c600;
+    }
+
+    public String getC600()
+    {
+        return c600;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(Long createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public Long getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(Long updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public Long getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+
+    public Long getIsSteel() {
+        return isSteel;
+    }
+
+    public void setIsSteel(Long isSteel) {
+        this.isSteel = isSteel;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("c40", getC40())
+            .append("c65", getC65())
+            .append("c100", getC100())
+            .append("c125", getC125())
+            .append("c150", getC150())
+            .append("c175", getC175())
+            .append("c200", getC200())
+            .append("c225", getC225())
+            .append("c250", getC250())
+            .append("c275", getC275())
+            .append("c300", getC300())
+            .append("c325", getC325())
+            .append("c350", getC350())
+            .append("c375", getC375())
+            .append("c400", getC400())
+            .append("c425", getC425())
+            .append("c450", getC450())
+            .append("c475", getC475())
+            .append("c500", getC500())
+            .append("c525", getC525())
+            .append("c550", getC550())
+            .append("c575", getC575())
+            .append("c600", getC600())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("remarks", getRemarks())
+            .toString();
+    }
+}

+ 38 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TMeasureThickness.java

@@ -67,6 +67,12 @@ public class TMeasureThickness extends BaseEntity
     @Excel(name = "设备/管线名称")
     private String equipmentName;
 
+    /** 设备类型 */
+    @Excel(name = "设备类型")
+    private String devType;
+
+
+
     /** 材质 */
     @Excel(name = "材质")
     private String material;
@@ -140,6 +146,14 @@ public class TMeasureThickness extends BaseEntity
     @Excel(name = "介质")
     private String medium;
 
+    /** 设计压力 */
+    @Excel(name = "设计压力")
+    private String desPressure;
+
+    /** 设计温度 */
+    @Excel(name = "设计温度")
+    private String desTemp;
+
     /** 压力 */
     @Excel(name = "压力(MPa)")
     private String pressure;
@@ -783,6 +797,30 @@ public class TMeasureThickness extends BaseEntity
         this.measureDateWarn = measureDateWarn;
     }
 
+    public String getDevType() {
+        return devType;
+    }
+
+    public void setDevType(String devType) {
+        this.devType = devType;
+    }
+
+    public String getDesPressure() {
+        return desPressure;
+    }
+
+    public void setDesPressure(String desPressure) {
+        this.desPressure = desPressure;
+    }
+
+    public String getDesTemp() {
+        return desTemp;
+    }
+
+    public void setDesTemp(String desTemp) {
+        this.desTemp = desTemp;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 23 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevCc.java

@@ -233,6 +233,13 @@ public class TSpecdevCc extends BaseEntity
 
     private Long isRepeat;
 
+
+    @TableField(exist = false)
+    private String infoNum;
+
+    @TableField(exist = false)
+    private String reportNum;
+
     public Long getIsRepeat() {
         return isRepeat;
     }
@@ -721,6 +728,22 @@ public class TSpecdevCc extends BaseEntity
         this.ids = ids;
     }
 
+    public String getInfoNum() {
+        return infoNum;
+    }
+
+    public void setInfoNum(String infoNum) {
+        this.infoNum = infoNum;
+    }
+
+    public String getReportNum() {
+        return reportNum;
+    }
+
+    public void setReportNum(String reportNum) {
+        this.reportNum = reportNum;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 23 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevDt.java

@@ -207,6 +207,13 @@ public class TSpecdevDt extends BaseEntity
 
     private Long isRepeat;
 
+
+    @TableField(exist = false)
+    private String infoNum;
+
+    @TableField(exist = false)
+    private String reportNum;
+
     public Long getIsRepeat() {
         return isRepeat;
     }
@@ -635,6 +642,22 @@ public class TSpecdevDt extends BaseEntity
         this.ids = ids;
     }
 
+    public String getInfoNum() {
+        return infoNum;
+    }
+
+    public void setInfoNum(String infoNum) {
+        this.infoNum = infoNum;
+    }
+
+    public String getReportNum() {
+        return reportNum;
+    }
+
+    public void setReportNum(String reportNum) {
+        this.reportNum = reportNum;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 23 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevDzsb.java

@@ -208,6 +208,13 @@ public class TSpecdevDzsb extends BaseEntity
 
     private Long isRepeat;
 
+
+    @TableField(exist = false)
+    private String infoNum;
+
+    @TableField(exist = false)
+    private String reportNum;
+
     public Long getIsRepeat() {
         return isRepeat;
     }
@@ -635,6 +642,22 @@ public class TSpecdevDzsb extends BaseEntity
         this.ids = ids;
     }
 
+    public String getInfoNum() {
+        return infoNum;
+    }
+
+    public void setInfoNum(String infoNum) {
+        this.infoNum = infoNum;
+    }
+
+    public String getReportNum() {
+        return reportNum;
+    }
+
+    public void setReportNum(String reportNum) {
+        this.reportNum = reportNum;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 23 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevGl.java

@@ -224,6 +224,13 @@ public class TSpecdevGl extends BaseEntity
     @TableField(exist = false)
     private String wxjl;
 
+
+    @TableField(exist = false)
+    private String infoNum;
+
+    @TableField(exist = false)
+    private String reportNum;
+
     public String getWxjl() {
         return wxjl;
     }
@@ -691,6 +698,22 @@ public class TSpecdevGl extends BaseEntity
         this.ids = ids;
     }
 
+    public String getInfoNum() {
+        return infoNum;
+    }
+
+    public void setInfoNum(String infoNum) {
+        this.infoNum = infoNum;
+    }
+
+    public String getReportNum() {
+        return reportNum;
+    }
+
+    public void setReportNum(String reportNum) {
+        this.reportNum = reportNum;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 21 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TSpecdevYlgd.java

@@ -273,6 +273,11 @@ public class TSpecdevYlgd extends BaseEntity
     @TableField(exist = false)
     private String wxjl;
 
+    @TableField(exist = false)
+    private String infoNum;
+
+    @TableField(exist = false)
+    private String reportNum;
 
     public String getWxjl() {
         return wxjl;
@@ -845,6 +850,22 @@ public class TSpecdevYlgd extends BaseEntity
         this.ids = ids;
     }
 
+    public String getInfoNum() {
+        return infoNum;
+    }
+
+    public void setInfoNum(String infoNum) {
+        this.infoNum = infoNum;
+    }
+
+    public String getReportNum() {
+        return reportNum;
+    }
+
+    public void setReportNum(String reportNum) {
+        this.reportNum = reportNum;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 67 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TMeasureStressMapper.java

@@ -0,0 +1,67 @@
+package com.ruoyi.project.sems.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.sems.domain.TMeasureStress;
+
+/**
+ * 材料应力Mapper接口
+ *
+ * @author ssy
+ * @date 2025-03-19
+ */
+public interface TMeasureStressMapper
+{
+    /**
+     * 查询材料应力
+     *
+     * @param id 材料应力ID
+     * @return 材料应力
+     */
+    public TMeasureStress selectTMeasureStressById(Long id);
+
+    public TMeasureStress selectTMeasureStressByName(String name);
+
+    /**
+     * 查询材料应力列表
+     *
+     * @param tMeasureStress 材料应力
+     * @return 材料应力集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TMeasureStress> selectTMeasureStressList(TMeasureStress tMeasureStress);
+
+    /**
+     * 新增材料应力
+     *
+     * @param tMeasureStress 材料应力
+     * @return 结果
+     */
+    public int insertTMeasureStress(TMeasureStress tMeasureStress);
+
+    /**
+     * 修改材料应力
+     *
+     * @param tMeasureStress 材料应力
+     * @return 结果
+     */
+    public int updateTMeasureStress(TMeasureStress tMeasureStress);
+
+    /**
+     * 删除材料应力
+     *
+     * @param id 材料应力ID
+     * @return 结果
+     */
+    public int deleteTMeasureStressById(Long id);
+
+    /**
+     * 批量删除材料应力
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTMeasureStressByIds(Long[] ids);
+
+
+}

+ 3 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TReportYlgdMapper.java

@@ -7,6 +7,8 @@ import com.ruoyi.framework.aspectj.lang.annotation.DataScopePlant;
 import com.ruoyi.project.sems.domain.TReportYlgd;
 import com.ruoyi.project.sems.domain.TReportYlrq;
 import com.ruoyi.project.sems.domain.TSpecdevYlgd;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
 
 /**
  * 压力管道年检报告Mapper接口
@@ -14,6 +16,7 @@ import com.ruoyi.project.sems.domain.TSpecdevYlgd;
  * @author ruoyi
  * @date 2021-09-02
  */
+@Component("tReportYlgdMapper")
 public interface TReportYlgdMapper {
 
     /**

+ 3 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TReportYlrqMapper.java

@@ -5,6 +5,8 @@ import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScopePlant;
 import com.ruoyi.project.sems.domain.TReportYlrq;
 import com.ruoyi.project.sems.domain.TSpecdevYlrq;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
 
 import java.util.List;
 
@@ -14,6 +16,7 @@ import java.util.List;
  * @author ruoyi
  * @date 2021-09-02
  */
+@Component("tReportYlrqMapper")
 public interface TReportYlrqMapper extends BaseMapper<TReportYlrq> {
 
     /**

+ 2 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevCcMapper.java

@@ -76,4 +76,6 @@ public interface TSpecdevCcMapper extends BaseMapper<TSpecdevCc>
     void duplicateTSpecdevCc();
 
     List<TSpecdevCc> selectExpiredCc(Integer month);
+
+    List<TSpecdevCc> selectTSpecdevCcListByDevNo(TSpecdevCc param);
 }

+ 2 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevDtMapper.java

@@ -79,4 +79,6 @@ public interface TSpecdevDtMapper extends BaseMapper<TSpecdevDt>
     List<TSpecdevDt> selectExpiredDt(Integer month);
 
     void updateTSpecdevDtByIds(TSpecdevDt tSpecdevDt);
+
+    List<TSpecdevDt> selectTSpecdevDtListByDevNo(TSpecdevDt param);
 }

+ 2 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevDzsbMapper.java

@@ -79,4 +79,6 @@ public interface TSpecdevDzsbMapper extends BaseMapper<TSpecdevDzsb>
     List<TSpecdevDzsb> selectExpiredDzsb(Integer month);
 
     void updateTSpecdevDzsbByIds(TSpecdevDzsb tSpecdevDzsb);
+
+    List<TSpecdevDzsb> selectTSpecdevDzsbListByDevNo(TSpecdevDzsb param);
 }

+ 3 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevGlMapper.java

@@ -7,6 +7,7 @@ import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScopePlant;
 import com.ruoyi.project.sems.domain.TSpecdevDzsb;
 import com.ruoyi.project.sems.domain.TSpecdevGl;
+import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.his.domain.TSpechiGl;
 
 /**
@@ -75,4 +76,6 @@ public interface TSpecdevGlMapper extends BaseMapper<TSpecdevGl>
     List<TSpecdevGl> selectExpiredGl(Integer month);
 
     void updateTSpecdevGlByIds(TSpecdevGl tSpecdevGl);
+
+    List<TSpecdevGl> selectTSpecdevGlListByDevNo(TSpecdevGl param);
 }

+ 2 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TSpecdevYlgdMapper.java

@@ -87,4 +87,6 @@ public interface TSpecdevYlgdMapper extends BaseMapper<TSpecdevYlgd> {
     List<TSpecdevYlgd> selectTSpecdevYlgdListForPssr(TSpecdevYlgd tSpecdevYlgd);
 
     void updateTSpecdevYlgdByIds(TSpecdevYlgd tSpecdevYlgd);
+
+    List<TSpecdevYlgd> selectTSpecdevYlgdListByDevNo(TSpecdevYlgd param);
 }

+ 61 - 0
master/src/main/java/com/ruoyi/project/sems/service/ITMeasureStressService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.sems.service;
+
+import java.util.List;
+import com.ruoyi.project.sems.domain.TMeasureStress;
+
+/**
+ * 材料应力Service接口
+ *
+ * @author ssy
+ * @date 2025-03-19
+ */
+public interface ITMeasureStressService
+{
+    /**
+     * 查询材料应力
+     *
+     * @param id 材料应力ID
+     * @return 材料应力
+     */
+    public TMeasureStress selectTMeasureStressById(Long id);
+
+    /**
+     * 查询材料应力列表
+     *
+     * @param tMeasureStress 材料应力
+     * @return 材料应力集合
+     */
+    public List<TMeasureStress> selectTMeasureStressList(TMeasureStress tMeasureStress);
+
+    /**
+     * 新增材料应力
+     *
+     * @param tMeasureStress 材料应力
+     * @return 结果
+     */
+    public int insertTMeasureStress(TMeasureStress tMeasureStress);
+
+    /**
+     * 修改材料应力
+     *
+     * @param tMeasureStress 材料应力
+     * @return 结果
+     */
+    public int updateTMeasureStress(TMeasureStress tMeasureStress);
+
+    /**
+     * 批量删除材料应力
+     *
+     * @param ids 需要删除的材料应力ID
+     * @return 结果
+     */
+    public int deleteTMeasureStressByIds(Long[] ids);
+
+    /**
+     * 删除材料应力信息
+     *
+     * @param id 材料应力ID
+     * @return 结果
+     */
+    public int deleteTMeasureStressById(Long id);
+}

+ 3 - 1
master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevCcService.java

@@ -5,9 +5,9 @@ import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.sems.domain.DevData;
-import com.ruoyi.project.sems.domain.TMeasureRecord;
 import com.ruoyi.project.sems.domain.TSpecdevCc;
 import com.ruoyi.project.sems.his.domain.TSpechiCc;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 特种设备叉车台账Service接口
@@ -71,4 +71,6 @@ public interface ITSpecdevCcService extends IService<TSpecdevCc>
     int updateTSpecdevCcByHi(TSpechiCc hientity);
 
     void duplicateTSpecdevCc();
+
+    int importFiles(List<MultipartFile> files, String plantCode, String fileType, String toString) throws Exception;
 }

+ 3 - 1
master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevDtService.java

@@ -5,9 +5,9 @@ import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.sems.domain.DevData;
-import com.ruoyi.project.sems.domain.TSpecdevCc;
 import com.ruoyi.project.sems.domain.TSpecdevDt;
 import com.ruoyi.project.sems.his.domain.TSpechiDt;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 特种设备电梯台账Service接口
@@ -73,4 +73,6 @@ public interface ITSpecdevDtService extends IService<TSpecdevDt>
 
 
     void duplicateTSpecdevDt();
+
+    int importFiles(List<MultipartFile> files, String plantCode, String fileType, String toString) throws Exception;
 }

+ 3 - 1
master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevDzsbService.java

@@ -5,9 +5,9 @@ import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.sems.domain.DevData;
-import com.ruoyi.project.sems.domain.TSpecdevDt;
 import com.ruoyi.project.sems.domain.TSpecdevDzsb;
 import com.ruoyi.project.sems.his.domain.TSpechiDzsb;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 特种设备吊装设备台账Service接口
@@ -72,4 +72,6 @@ public interface ITSpecdevDzsbService extends IService<TSpecdevDzsb>
 
 
     void duplicateTSpecdevDzsb();
+
+    int importFiles(List<MultipartFile> files, String plantCode, String fileType, String toString) throws Exception;
 }

+ 3 - 1
master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevGlService.java

@@ -3,9 +3,9 @@ package com.ruoyi.project.sems.service;
 import java.util.List;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.project.sems.domain.TSpecdevDzsb;
 import com.ruoyi.project.sems.domain.TSpecdevGl;
 import com.ruoyi.project.sems.his.domain.TSpechiGl;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 特种设备锅炉台账Service接口
@@ -67,4 +67,6 @@ public interface ITSpecdevGlService extends IService<TSpecdevGl>
 
 
     void duplicateTSpecdevGl();
+
+    int importFiles(List<MultipartFile> files, String plantCode, String fileType, String toString) throws Exception;
 }

+ 3 - 0
master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevYlgdService.java

@@ -3,6 +3,7 @@ package com.ruoyi.project.sems.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.his.domain.TSpechiYlgd;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
@@ -67,4 +68,6 @@ public interface ITSpecdevYlgdService extends IService<TSpecdevYlgd>
 
 
     void duplicateTSpecdevYlgd();
+
+    int importFiles(List<MultipartFile> files, String plantCode, String fileType, String toString) throws Exception;
 }

+ 1 - 2
master/src/main/java/com/ruoyi/project/sems/service/ITSpecdevYlrqService.java

@@ -3,7 +3,6 @@ package com.ruoyi.project.sems.service;
 import java.util.List;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.domain.TSpecdevYlrq;
 import com.ruoyi.project.sems.his.domain.TSpechiYlrq;
 import org.springframework.web.multipart.MultipartFile;
@@ -69,5 +68,5 @@ public interface ITSpecdevYlrqService extends IService<TSpecdevYlrq>
 
     void duplicateTSpecdevYlrq();
 
-    void importFiles(List<MultipartFile> files, String plantCode, String fileType,String userId);
+    int importFiles(List<MultipartFile> files, String plantCode, String fileType, String userId) throws Exception;
 }

+ 93 - 0
master/src/main/java/com/ruoyi/project/sems/service/impl/TMeasureStressServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.sems.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.sems.mapper.TMeasureStressMapper;
+import com.ruoyi.project.sems.domain.TMeasureStress;
+import com.ruoyi.project.sems.service.ITMeasureStressService;
+
+/**
+ * 材料应力Service业务层处理
+ *
+ * @author ssy
+ * @date 2025-03-19
+ */
+@Service
+public class TMeasureStressServiceImpl implements ITMeasureStressService
+{
+    @Autowired
+    private TMeasureStressMapper tMeasureStressMapper;
+
+    /**
+     * 查询材料应力
+     *
+     * @param id 材料应力ID
+     * @return 材料应力
+     */
+    @Override
+    public TMeasureStress selectTMeasureStressById(Long id)
+    {
+        return tMeasureStressMapper.selectTMeasureStressById(id);
+    }
+
+    /**
+     * 查询材料应力列表
+     *
+     * @param tMeasureStress 材料应力
+     * @return 材料应力
+     */
+    @Override
+    public List<TMeasureStress> selectTMeasureStressList(TMeasureStress tMeasureStress)
+    {
+        return tMeasureStressMapper.selectTMeasureStressList(tMeasureStress);
+    }
+
+    /**
+     * 新增材料应力
+     *
+     * @param tMeasureStress 材料应力
+     * @return 结果
+     */
+    @Override
+    public int insertTMeasureStress(TMeasureStress tMeasureStress)
+    {
+        return tMeasureStressMapper.insertTMeasureStress(tMeasureStress);
+    }
+
+    /**
+     * 修改材料应力
+     *
+     * @param tMeasureStress 材料应力
+     * @return 结果
+     */
+    @Override
+    public int updateTMeasureStress(TMeasureStress tMeasureStress)
+    {
+        return tMeasureStressMapper.updateTMeasureStress(tMeasureStress);
+    }
+
+    /**
+     * 批量删除材料应力
+     *
+     * @param ids 需要删除的材料应力ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTMeasureStressByIds(Long[] ids)
+    {
+        return tMeasureStressMapper.deleteTMeasureStressByIds(ids);
+    }
+
+    /**
+     * 删除材料应力信息
+     *
+     * @param id 材料应力ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTMeasureStressById(Long id)
+    {
+        return tMeasureStressMapper.deleteTMeasureStressById(id);
+    }
+}

+ 61 - 5
master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevCcServiceImpl.java

@@ -1,18 +1,27 @@
 package com.ruoyi.project.sems.service.impl;
 
+import java.io.IOException;
+import java.time.LocalDate;
 import java.util.List;
 import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.mapper.TCommonfileMapper;
 import com.ruoyi.project.sems.domain.DevData;
-import com.ruoyi.project.sems.domain.TMeasureRecord;
+import com.ruoyi.project.sems.domain.TSpecdevDt;
 import com.ruoyi.project.sems.his.domain.TSpechiCc;
-import com.ruoyi.project.sems.mapper.TMeasureRecordMapper;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.sems.mapper.TSpecdevCcMapper;
 import com.ruoyi.project.sems.domain.TSpecdevCc;
 import com.ruoyi.project.sems.service.ITSpecdevCcService;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
 
 /**
  * 特种设备叉车台账Service业务层处理
@@ -23,9 +32,10 @@ import com.ruoyi.project.sems.service.ITSpecdevCcService;
 @Service("tSpecdevCcService")
 public class TSpecdevCcServiceImpl extends ServiceImpl<TSpecdevCcMapper, TSpecdevCc> implements ITSpecdevCcService
 {
-    @Autowired
+    @Resource
     private TSpecdevCcMapper tSpecdevCcMapper;
-
+    @Resource
+    private TCommonfileMapper tCommonfileMapper;
     /**
      * 查询特种设备叉车台账
      *
@@ -117,4 +127,50 @@ public class TSpecdevCcServiceImpl extends ServiceImpl<TSpecdevCcMapper, TSpecde
     public void duplicateTSpecdevCc() {
         tSpecdevCcMapper.duplicateTSpecdevCc();
     }
+
+    @Override
+    @Transactional
+    public int importFiles(List<MultipartFile> files, String plantCode, String fileType , String userId) throws Exception {
+        for (MultipartFile file : files) {
+            if (!file.isEmpty()) {
+                String input = file.getOriginalFilename();
+                int index = input.indexOf('_');
+                String weiHao = (index != -1) ? input.substring(0, index) : input;
+                System.out.println(weiHao); // 输出: 位号
+                TSpecdevCc param = new TSpecdevCc();
+                param.setRegno(weiHao);
+                param.setPlantCode(plantCode);
+                List<TSpecdevCc> list = tSpecdevCcMapper.selectTSpecdevCcListByDevNo(param);
+                if (list.size() > 0) {
+                    for (TSpecdevCc t: list
+                    ) {
+                        Long id = t.getId();
+                        // 获取当前日期
+                        LocalDate currentDate = LocalDate.now();
+                        // 获取年份
+                        int year = currentDate.getYear();
+                        String dir = "/sems-cc-" + fileType + "/" + year;
+                        String url = null;
+                        try {
+                            url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        long size = file.getSize()/1024;
+                        TCommonfile tCommonfile = new TCommonfile();
+                        tCommonfile.setFileUrl(url);
+                        tCommonfile.setFileName(file.getOriginalFilename());
+                        tCommonfile.setCreaterCode(userId);
+                        tCommonfile.setpId(id);
+                        tCommonfile.setpType("sems-cc-"+fileType);
+                        tCommonfile.setFileSize(String.valueOf(size));
+                        tCommonfileMapper.insertTCommonfile(tCommonfile);
+                    }
+                }else {
+                    throw new Exception( StringUtils.format(input +":无法找到对应设备"));
+                }
+            }
+        }
+        return 1;
+    }
 }

+ 60 - 5
master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevDtServiceImpl.java

@@ -1,18 +1,26 @@
 package com.ruoyi.project.sems.service.impl;
 
+import java.io.IOException;
+import java.time.LocalDate;
 import java.util.List;
 import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.mapper.TCommonfileMapper;
 import com.ruoyi.project.sems.domain.DevData;
-import com.ruoyi.project.sems.domain.TSpecdevCc;
 import com.ruoyi.project.sems.his.domain.TSpechiDt;
-import com.ruoyi.project.sems.mapper.TSpecdevCcMapper;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.sems.mapper.TSpecdevDtMapper;
 import com.ruoyi.project.sems.domain.TSpecdevDt;
 import com.ruoyi.project.sems.service.ITSpecdevDtService;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
 
 /**
  * 特种设备电梯台账Service业务层处理
@@ -23,9 +31,10 @@ import com.ruoyi.project.sems.service.ITSpecdevDtService;
 @Service("tSpecdevDtService")
 public class TSpecdevDtServiceImpl extends ServiceImpl<TSpecdevDtMapper, TSpecdevDt> implements ITSpecdevDtService
 {
-    @Autowired
+    @Resource
     private TSpecdevDtMapper tSpecdevDtMapper;
-
+    @Resource
+    private TCommonfileMapper tCommonfileMapper;
     /**
      * 查询特种设备电梯台账
      *
@@ -117,4 +126,50 @@ public class TSpecdevDtServiceImpl extends ServiceImpl<TSpecdevDtMapper, TSpecde
     public void duplicateTSpecdevDt() {
         tSpecdevDtMapper.duplicateTSpecdevDt();
     }
+
+    @Override
+    @Transactional
+    public int importFiles(List<MultipartFile> files, String plantCode, String fileType , String userId) throws Exception {
+        for (MultipartFile file : files) {
+            if (!file.isEmpty()) {
+                String input = file.getOriginalFilename();
+                int index = input.indexOf('_');
+                String weiHao = (index != -1) ? input.substring(0, index) : input;
+                System.out.println(weiHao); // 输出: 位号
+                TSpecdevDt param = new TSpecdevDt();
+                param.setRegno(weiHao);
+                param.setPlantCode(plantCode);
+                List<TSpecdevDt> list = tSpecdevDtMapper.selectTSpecdevDtListByDevNo(param);
+                if (list.size() > 0) {
+                    for (TSpecdevDt t: list
+                    ) {
+                        Long id = t.getId();
+                        // 获取当前日期
+                        LocalDate currentDate = LocalDate.now();
+                        // 获取年份
+                        int year = currentDate.getYear();
+                        String dir = "/sems-dt-" + fileType + "/" + year;
+                        String url = null;
+                        try {
+                            url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        long size = file.getSize()/1024;
+                        TCommonfile tCommonfile = new TCommonfile();
+                        tCommonfile.setFileUrl(url);
+                        tCommonfile.setFileName(file.getOriginalFilename());
+                        tCommonfile.setCreaterCode(userId);
+                        tCommonfile.setpId(id);
+                        tCommonfile.setpType("sems-dt-"+fileType);
+                        tCommonfile.setFileSize(String.valueOf(size));
+                        tCommonfileMapper.insertTCommonfile(tCommonfile);
+                    }
+                }else {
+                    throw new Exception( StringUtils.format(input +":无法找到对应设备"));
+                }
+            }
+        }
+        return 1;
+    }
 }

+ 61 - 5
master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevDzsbServiceImpl.java

@@ -1,18 +1,27 @@
 package com.ruoyi.project.sems.service.impl;
 
+import java.io.IOException;
+import java.time.LocalDate;
 import java.util.List;
 import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.mapper.TCommonfileMapper;
 import com.ruoyi.project.sems.domain.DevData;
-import com.ruoyi.project.sems.domain.TSpecdevDt;
+import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.his.domain.TSpechiDzsb;
-import com.ruoyi.project.sems.mapper.TSpecdevDtMapper;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.sems.mapper.TSpecdevDzsbMapper;
 import com.ruoyi.project.sems.domain.TSpecdevDzsb;
 import com.ruoyi.project.sems.service.ITSpecdevDzsbService;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
 
 /**
  * 特种设备吊装设备台账Service业务层处理
@@ -23,9 +32,10 @@ import com.ruoyi.project.sems.service.ITSpecdevDzsbService;
 @Service("tSpecdevDzsbService")
 public class TSpecdevDzsbServiceImpl extends ServiceImpl<TSpecdevDzsbMapper, TSpecdevDzsb> implements ITSpecdevDzsbService
 {
-    @Autowired
+    @Resource
     private TSpecdevDzsbMapper tSpecdevDzsbMapper;
-
+    @Resource
+    private TCommonfileMapper tCommonfileMapper;
     /**
      * 查询特种设备吊装设备台账
      *
@@ -117,4 +127,50 @@ public class TSpecdevDzsbServiceImpl extends ServiceImpl<TSpecdevDzsbMapper, TSp
     public void duplicateTSpecdevDzsb() {
         tSpecdevDzsbMapper.duplicateTSpecdevDzsb();
     }
+
+    @Override
+    @Transactional
+    public int importFiles(List<MultipartFile> files, String plantCode, String fileType , String userId) throws Exception {
+        for (MultipartFile file : files) {
+            if (!file.isEmpty()) {
+                String input = file.getOriginalFilename();
+                int index = input.indexOf('_');
+                String weiHao = (index != -1) ? input.substring(0, index) : input;
+                System.out.println(weiHao); // 输出: 位号
+                TSpecdevDzsb param = new TSpecdevDzsb();
+                param.setDevno(weiHao);
+                param.setPlantCode(plantCode);
+                List<TSpecdevDzsb> list = tSpecdevDzsbMapper.selectTSpecdevDzsbListByDevNo(param);
+                if (list.size() > 0) {
+                    for (TSpecdevDzsb t: list
+                    ) {
+                        Long id = t.getId();
+                        // 获取当前日期
+                        LocalDate currentDate = LocalDate.now();
+                        // 获取年份
+                        int year = currentDate.getYear();
+                        String dir = "/sems-dzsb-" + fileType + "/" + year;
+                        String url = null;
+                        try {
+                            url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        long size = file.getSize()/1024;
+                        TCommonfile tCommonfile = new TCommonfile();
+                        tCommonfile.setFileUrl(url);
+                        tCommonfile.setFileName(file.getOriginalFilename());
+                        tCommonfile.setCreaterCode(userId);
+                        tCommonfile.setpId(id);
+                        tCommonfile.setpType("sems-dzsb-"+fileType);
+                        tCommonfile.setFileSize(String.valueOf(size));
+                        tCommonfileMapper.insertTCommonfile(tCommonfile);
+                    }
+                }else {
+                    throw new Exception( StringUtils.format(input +":无法找到对应设备"));
+                }
+            }
+        }
+        return 1;
+    }
 }

+ 61 - 4
master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevGlServiceImpl.java

@@ -1,16 +1,26 @@
 package com.ruoyi.project.sems.service.impl;
 
+import java.io.IOException;
+import java.time.LocalDate;
 import java.util.List;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.project.sems.domain.TSpecdevDzsb;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.mapper.TCommonfileMapper;
+import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.his.domain.TSpechiGl;
-import com.ruoyi.project.sems.mapper.TSpecdevDzsbMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.sems.mapper.TSpecdevGlMapper;
 import com.ruoyi.project.sems.domain.TSpecdevGl;
 import com.ruoyi.project.sems.service.ITSpecdevGlService;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
 
 /**
  * 特种设备锅炉台账Service业务层处理
@@ -21,9 +31,10 @@ import com.ruoyi.project.sems.service.ITSpecdevGlService;
 @Service("tSpecdevGlService")
 public class TSpecdevGlServiceImpl extends ServiceImpl<TSpecdevGlMapper, TSpecdevGl> implements ITSpecdevGlService
 {
-    @Autowired
+    @Resource
     private TSpecdevGlMapper tSpecdevGlMapper;
-
+    @Resource
+    private TCommonfileMapper tCommonfileMapper;
     /**
      * 查询特种设备锅炉台账
      *
@@ -110,4 +121,50 @@ public class TSpecdevGlServiceImpl extends ServiceImpl<TSpecdevGlMapper, TSpecde
     public void duplicateTSpecdevGl() {
         tSpecdevGlMapper.duplicateTSpecdevGl();
     }
+
+    @Override
+    @Transactional
+    public int importFiles(List<MultipartFile> files, String plantCode, String fileType , String userId) throws Exception {
+        for (MultipartFile file : files) {
+            if (!file.isEmpty()) {
+                String input = file.getOriginalFilename();
+                int index = input.indexOf('_');
+                String weiHao = (index != -1) ? input.substring(0, index) : input;
+                System.out.println(weiHao); // 输出: 位号
+                TSpecdevGl param = new TSpecdevGl();
+                param.setDevno(weiHao);
+                param.setPlantCode(plantCode);
+                List<TSpecdevGl> list = tSpecdevGlMapper.selectTSpecdevGlListByDevNo(param);
+                if (list.size() > 0) {
+                    for (TSpecdevGl t: list
+                    ) {
+                        Long id = t.getId();
+                        // 获取当前日期
+                        LocalDate currentDate = LocalDate.now();
+                        // 获取年份
+                        int year = currentDate.getYear();
+                        String dir = "/sems-gl-" + fileType + "/" + year;
+                        String url = null;
+                        try {
+                            url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        long size = file.getSize()/1024;
+                        TCommonfile tCommonfile = new TCommonfile();
+                        tCommonfile.setFileUrl(url);
+                        tCommonfile.setFileName(file.getOriginalFilename());
+                        tCommonfile.setCreaterCode(userId);
+                        tCommonfile.setpId(id);
+                        tCommonfile.setpType("sems-gl-"+fileType);
+                        tCommonfile.setFileSize(String.valueOf(size));
+                        tCommonfileMapper.insertTCommonfile(tCommonfile);
+                    }
+                }else {
+                    throw new Exception( StringUtils.format(input +":无法找到对应设备"));
+                }
+            }
+        }
+        return 1;
+    }
 }

+ 59 - 3
master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevYlgdServiceImpl.java

@@ -1,13 +1,22 @@
 package com.ruoyi.project.sems.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.mapper.TCommonfileMapper;
 import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.his.domain.TSpechiYlgd;
 import com.ruoyi.project.sems.mapper.TSpecdevYlgdMapper;
 import com.ruoyi.project.sems.service.ITSpecdevYlgdService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.time.LocalDate;
 import java.util.List;
 
 /**
@@ -19,9 +28,10 @@ import java.util.List;
 @Service("tSpecdevYlgdService")
 public class TSpecdevYlgdServiceImpl extends ServiceImpl<TSpecdevYlgdMapper, TSpecdevYlgd> implements ITSpecdevYlgdService
 {
-    @Autowired
+    @Resource
     private TSpecdevYlgdMapper tSpecdevYlgdMapper;
-
+    @Resource
+    private TCommonfileMapper tCommonfileMapper;
     /**
      * 查询特种设备压力管道台账
      *
@@ -114,4 +124,50 @@ public class TSpecdevYlgdServiceImpl extends ServiceImpl<TSpecdevYlgdMapper, TSp
     public void duplicateTSpecdevYlgd() {
         tSpecdevYlgdMapper.duplicateTSpecdevYlgd();
     }
+
+    @Override
+    @Transactional
+    public int importFiles(List<MultipartFile> files, String plantCode, String fileType , String userId) throws Exception {
+        for (MultipartFile file : files) {
+            if (!file.isEmpty()) {
+                String input = file.getOriginalFilename();
+                int index = input.indexOf('_');
+                String weiHao = (index != -1) ? input.substring(0, index) : input;
+                System.out.println(weiHao); // 输出: 位号
+                TSpecdevYlgd param = new TSpecdevYlgd();
+                param.setDevno(weiHao);
+                param.setPlantCode(plantCode);
+                List<TSpecdevYlgd> list = tSpecdevYlgdMapper.selectTSpecdevYlgdListByDevNo(param);
+                if (list.size() > 0) {
+                    for (TSpecdevYlgd t: list
+                    ) {
+                        Long id = t.getId();
+                        // 获取当前日期
+                        LocalDate currentDate = LocalDate.now();
+                        // 获取年份
+                        int year = currentDate.getYear();
+                        String dir = "/sems-ylgd-" + fileType + "/" + year;
+                        String url = null;
+                        try {
+                            url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        long size = file.getSize()/1024;
+                        TCommonfile tCommonfile = new TCommonfile();
+                        tCommonfile.setFileUrl(url);
+                        tCommonfile.setFileName(file.getOriginalFilename());
+                        tCommonfile.setCreaterCode(userId);
+                        tCommonfile.setpId(id);
+                        tCommonfile.setpType("sems-ylgd-"+fileType);
+                        tCommonfile.setFileSize(String.valueOf(size));
+                        tCommonfileMapper.insertTCommonfile(tCommonfile);
+                    }
+                }else {
+                    throw new Exception( StringUtils.format(input +":无法找到对应设备"));
+                }
+            }
+        }
+        return 1;
+    }
 }

+ 27 - 29
master/src/main/java/com/ruoyi/project/sems/service/impl/TSpecdevYlrqServiceImpl.java

@@ -5,17 +5,14 @@ import java.time.LocalDate;
 import java.util.List;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.framework.config.RuoYiConfig;
-import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.project.common.domain.TCommonfile;
 import com.ruoyi.project.common.mapper.TCommonfileMapper;
-import com.ruoyi.project.sems.domain.TSpecdevYlgd;
 import com.ruoyi.project.sems.his.domain.TSpechiYlrq;
-import com.ruoyi.project.sems.mapper.TSpecdevYlgdMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.sems.mapper.TSpecdevYlrqMapper;
 import com.ruoyi.project.sems.domain.TSpecdevYlrq;
@@ -129,7 +126,7 @@ public class TSpecdevYlrqServiceImpl extends ServiceImpl<TSpecdevYlrqMapper, TSp
 
     @Override
     @Transactional
-    public void importFiles(List<MultipartFile> files, String plantCode, String fileType ,String userId) {
+    public int importFiles(List<MultipartFile> files, String plantCode, String fileType , String userId) throws Exception {
         for (MultipartFile file : files) {
             if (!file.isEmpty()) {
                 String input = file.getOriginalFilename();
@@ -141,34 +138,35 @@ public class TSpecdevYlrqServiceImpl extends ServiceImpl<TSpecdevYlrqMapper, TSp
                 param.setPlantCode(plantCode);
                 List<TSpecdevYlrq> list = tSpecdevYlrqMapper.selectTSpecdevYlrqListByDevNo(param);
                 if (list.size() > 0) {
-                    TSpecdevYlrq t  = list.get(0);
-                    Long id = t.getId();
-                    // 获取当前日期
-                    LocalDate currentDate = LocalDate.now();
-                    // 获取年份
-                    int year = currentDate.getYear();
-                    String dir = "/semsylrqfile/" + year;
-                    String url = null;
-                    try {
-                        url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
-                    } catch (IOException e) {
-                        e.printStackTrace();
+                    for (TSpecdevYlrq t: list
+                         ) {
+                        Long id = t.getId();
+                        // 获取当前日期
+                        LocalDate currentDate = LocalDate.now();
+                        // 获取年份
+                        int year = currentDate.getYear();
+                        String dir = "/sems-ylrq-" + fileType + "/" + year;
+                        String url = null;
+                        try {
+                            url = FileUploadUtils.upload(RuoYiConfig.getFilePath(dir), file);
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        long size = file.getSize()/1024;
+                        TCommonfile tCommonfile = new TCommonfile();
+                        tCommonfile.setFileUrl(url);
+                        tCommonfile.setFileName(file.getOriginalFilename());
+                        tCommonfile.setCreaterCode(userId);
+                        tCommonfile.setpId(id);
+                        tCommonfile.setpType("sems-ylrq-"+fileType);
+                        tCommonfile.setFileSize(String.valueOf(size));
+                        tCommonfileMapper.insertTCommonfile(tCommonfile);
                     }
-                    long size = file.getSize()/1024;
-                    TCommonfile tCommonfile = new TCommonfile();
-                    tCommonfile.setFileUrl(url);
-                    tCommonfile.setFileName(file.getOriginalFilename());
-                    tCommonfile.setCreaterCode(userId);
-                    tCommonfile.setpId(id);
-                    tCommonfile.setpType("sems-ylrq-"+fileType);
-                    tCommonfile.setFileSize(String.valueOf(size));
-                    tCommonfileMapper.insertTCommonfile(tCommonfile);
                 }else {
-
+                    throw new Exception( StringUtils.format(input +":无法找到对应设备"));
                 }
             }
-            // 上传并返回新文件名称
-
         }
+        return 1;
     }
 }

+ 1 - 1
master/src/main/resources/freeMaker/measureFMaker.ftl

@@ -861,7 +861,7 @@
 							<span style="font-family:SimSun; font-size:10pt; font-weight:bold">壁厚报警的取值方法:</span>
 						</p>
 						<p style="margin:0pt">
-							<img src="measure.png" style="width: 300pt"/>
+							<img src="file:///u03/cpmsfile/uploadPath/measure.png" style="width: 300pt"/>
 						</p>
 					</td>
 				</tr>

BIN
master/src/main/resources/freeMaker/seal.png


+ 1 - 1
master/src/main/resources/freeMaker/yearYlgdFMaker.ftl

@@ -516,7 +516,7 @@
 				</td>
 				<td colspan="7" rowspan="5" style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:middle; width:170.6pt">
 					<p style="margin:0pt; text-align:center">
-						<img src="seal.png"/>
+						<img src="file:///u03/cpmsfile/uploadPath/seal.png"/>
 					</p>
 				</td>
 			</tr>

+ 1 - 1
master/src/main/resources/freeMaker/yearYlrqFMaker.ftl

@@ -495,7 +495,7 @@
 				</td>
 				<td colspan="6" rowspan="5" style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:middle; width:170.6pt">
 					<p style="margin:0pt; text-align:center">
-						<img src="seal.png" style="height: 150pt"/>
+						<img src="file:///u03/cpmsfile/uploadPath/seal.png" style="height: 150pt"/>
 					</p>
 				</td>
 			</tr>

+ 192 - 0
master/src/main/resources/mybatis/sems/TMeasureStressMapper.xml

@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.sems.mapper.TMeasureStressMapper">
+
+    <resultMap type="TMeasureStress" id="TMeasureStressResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="c40"    column="c40"    />
+        <result property="c65"    column="c65"    />
+        <result property="c100"    column="c100"    />
+        <result property="c125"    column="c125"    />
+        <result property="c150"    column="c150"    />
+        <result property="c175"    column="c175"    />
+        <result property="c200"    column="c200"    />
+        <result property="c225"    column="c225"    />
+        <result property="c250"    column="c250"    />
+        <result property="c275"    column="c275"    />
+        <result property="c300"    column="c300"    />
+        <result property="c325"    column="c325"    />
+        <result property="c350"    column="c350"    />
+        <result property="c375"    column="c375"    />
+        <result property="c400"    column="c400"    />
+        <result property="c425"    column="c425"    />
+        <result property="c450"    column="c450"    />
+        <result property="c475"    column="c475"    />
+        <result property="c500"    column="c500"    />
+        <result property="c525"    column="c525"    />
+        <result property="c550"    column="c550"    />
+        <result property="c575"    column="c575"    />
+        <result property="c600"    column="c600"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="isSteel"    column="is_steel"    />
+    </resultMap>
+
+    <sql id="selectTMeasureStressVo">
+        select d.id, d.name, d.c40, d.c65, d.c100, d.c125, d.c150, d.c175, d.c200, d.c225, d.c250, d.c275, d.c300, d.c325, d.c350, d.c375, d.c400, d.c425, d.c450, d.c475, d.c500, d.c525, d.c550, d.c575, d.c600, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.is_steel from t_measure_stress d
+    </sql>
+
+    <select id="selectTMeasureStressList" parameterType="TMeasureStress" resultMap="TMeasureStressResult">
+        <include refid="selectTMeasureStressVo"/>
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="remarks != null  and remarks != ''"> and remarks like concat(concat('%', #{remarks}), '%')</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        order by d.id desc
+    </select>
+
+    <select id="selectTMeasureStressById" parameterType="Long" resultMap="TMeasureStressResult">
+        <include refid="selectTMeasureStressVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectTMeasureStressByName" parameterType="String" resultMap="TMeasureStressResult">
+        <include refid="selectTMeasureStressVo"/>
+        where name = #{name}
+    </select>
+
+
+    <insert id="insertTMeasureStress" parameterType="TMeasureStress">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_measure_stress.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_measure_stress
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="name != null and name != ''">name,</if>
+            <if test="c40 != null">c40,</if>
+            <if test="c65 != null">c65,</if>
+            <if test="c100 != null">c100,</if>
+            <if test="c125 != null">c125,</if>
+            <if test="c150 != null">c150,</if>
+            <if test="c175 != null">c175,</if>
+            <if test="c200 != null">c200,</if>
+            <if test="c225 != null">c225,</if>
+            <if test="c250 != null">c250,</if>
+            <if test="c275 != null">c275,</if>
+            <if test="c300 != null">c300,</if>
+            <if test="c325 != null">c325,</if>
+            <if test="c350 != null">c350,</if>
+            <if test="c375 != null">c375,</if>
+            <if test="c400 != null">c400,</if>
+            <if test="c425 != null">c425,</if>
+            <if test="c450 != null">c450,</if>
+            <if test="c475 != null">c475,</if>
+            <if test="c500 != null">c500,</if>
+            <if test="c525 != null">c525,</if>
+            <if test="c550 != null">c550,</if>
+            <if test="c575 != null">c575,</if>
+            <if test="c600 != null">c600,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="isSteel != null">is_steel,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="c40 != null">#{c40},</if>
+            <if test="c65 != null">#{c65},</if>
+            <if test="c100 != null">#{c100},</if>
+            <if test="c125 != null">#{c125},</if>
+            <if test="c150 != null">#{c150},</if>
+            <if test="c175 != null">#{c175},</if>
+            <if test="c200 != null">#{c200},</if>
+            <if test="c225 != null">#{c225},</if>
+            <if test="c250 != null">#{c250},</if>
+            <if test="c275 != null">#{c275},</if>
+            <if test="c300 != null">#{c300},</if>
+            <if test="c325 != null">#{c325},</if>
+            <if test="c350 != null">#{c350},</if>
+            <if test="c375 != null">#{c375},</if>
+            <if test="c400 != null">#{c400},</if>
+            <if test="c425 != null">#{c425},</if>
+            <if test="c450 != null">#{c450},</if>
+            <if test="c475 != null">#{c475},</if>
+            <if test="c500 != null">#{c500},</if>
+            <if test="c525 != null">#{c525},</if>
+            <if test="c550 != null">#{c550},</if>
+            <if test="c575 != null">#{c575},</if>
+            <if test="c600 != null">#{c600},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="isSteel != null">#{isSteel},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTMeasureStress" parameterType="TMeasureStress">
+        update t_measure_stress
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="c40 != null">c40 = #{c40},</if>
+            <if test="c65 != null">c65 = #{c65},</if>
+            <if test="c100 != null">c100 = #{c100},</if>
+            <if test="c125 != null">c125 = #{c125},</if>
+            <if test="c150 != null">c150 = #{c150},</if>
+            <if test="c175 != null">c175 = #{c175},</if>
+            <if test="c200 != null">c200 = #{c200},</if>
+            <if test="c225 != null">c225 = #{c225},</if>
+            <if test="c250 != null">c250 = #{c250},</if>
+            <if test="c275 != null">c275 = #{c275},</if>
+            <if test="c300 != null">c300 = #{c300},</if>
+            <if test="c325 != null">c325 = #{c325},</if>
+            <if test="c350 != null">c350 = #{c350},</if>
+            <if test="c375 != null">c375 = #{c375},</if>
+            <if test="c400 != null">c400 = #{c400},</if>
+            <if test="c425 != null">c425 = #{c425},</if>
+            <if test="c450 != null">c450 = #{c450},</if>
+            <if test="c475 != null">c475 = #{c475},</if>
+            <if test="c500 != null">c500 = #{c500},</if>
+            <if test="c525 != null">c525 = #{c525},</if>
+            <if test="c550 != null">c550 = #{c550},</if>
+            <if test="c575 != null">c575 = #{c575},</if>
+            <if test="c600 != null">c600 = #{c600},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="isSteel != null">is_steel = #{isSteel},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTMeasureStressById" parameterType="Long">
+        update t_measure_stress set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTMeasureStressByIds" parameterType="String">
+        update t_measure_stress set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+</mapper>

+ 23 - 2
master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml

@@ -54,7 +54,9 @@
         <result property="installDate" column="install_date"/>
         <result property="checkUrl" column="check_url"/>
         <result property="singleUrl" column="single_url"/>
-
+        <result property="devType"    column="dev_type"    />
+        <result property="desPressure"    column="des_pressure"    />
+        <result property="desTemp"    column="des_temp"    />
     </resultMap>
 
     <sql id="selectTMeasureThicknessVo">
@@ -106,7 +108,10 @@
                d.install_date,
                d.check_url,
                d.single_url,
-               s.dept_name
+               d.dev_type,
+               d.des_pressure,
+               d.des_temp,
+            s.dept_name
         from t_measure_thickness d
                  left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -157,6 +162,9 @@
             <if test="otherContent != null  and otherContent != ''">and other_content = #{otherContent}</if>
             <if test="loopNo != null  and loopNo != ''">and loop_no = #{loopNo}</if>
             <if test="installDate != null ">and install_date = #{installDate}</if>
+            <if test="devType != null  and devType != ''"> and dev_type = #{devType}</if>
+            <if test="desPressure != null  and desPressure != ''"> and des_pressure = #{desPressure}</if>
+            <if test="desTemp != null  and desTemp != ''"> and des_temp = #{desTemp}</if>
             <if test="searchValue != null  and searchValue != ''">
                 and
                 (plant_code like concat(concat('%', #{searchValue}), '%')
@@ -176,6 +184,9 @@
                 or flow_rate like concat(concat('%', #{searchValue}), '%')
                 or temperature like concat(concat('%', #{searchValue}), '%')
                 or loop_no like concat(concat('%', #{searchValue}), '%')
+                or devType like concat(concat('%', #{searchValue}), '%')
+                or desPressure like concat(concat('%', #{searchValue}), '%')
+                or desTemp like concat(concat('%', #{searchValue}), '%')
                 )
             </if>
             <if test="estRemainWarn != null and estRemainWarn != '' "> and TO_NUMBER(#{estRemainWarn}) > est_remain </if>
@@ -191,6 +202,7 @@
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScopePlant}
+        order by d.plant_code , d.id
     </select>
 
     <select id="selectTMeasureThicknessById" parameterType="Long" resultMap="TMeasureThicknessResult">
@@ -277,6 +289,9 @@
             <if test="installDate != null">install_date,</if>
             <if test="checkUrl != null">check_url,</if>
             <if test="singleUrl != null">single_url,</if>
+            <if test="devType != null">dev_type,</if>
+            <if test="desPressure != null">des_pressure,</if>
+            <if test="desTemp != null">des_temp,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -326,6 +341,9 @@
             <if test="installDate != null">#{installDate},</if>
             <if test="checkUrl != null">#{checkUrl},</if>
             <if test="singleUrl != null">#{singleUrl},</if>
+            <if test="devType != null">#{devType},</if>
+            <if test="desPressure != null">#{desPressure},</if>
+            <if test="desTemp != null">#{desTemp},</if>
         </trim>
     </insert>
 
@@ -381,6 +399,9 @@
             <if test="installDate != null">install_date = #{installDate},</if>
             <if test="checkUrl != null">check_url = #{checkUrl},</if>
             <if test="singleUrl != null">single_url = #{singleUrl},</if>
+            <if test="devType != null">dev_type = #{devType},</if>
+            <if test="desPressure != null">des_pressure = #{desPressure},</if>
+            <if test="desTemp != null">des_temp = #{desTemp},</if>
         </trim>
         where id = #{id}
     </update>

+ 68 - 51
master/src/main/resources/mybatis/sems/TSpecdevCcMapper.xml

@@ -103,9 +103,14 @@
                d.asset_owner,
                s.dept_name,
                (SELECT COUNT(1) from T_SPECHI_CC h where h.DEV_ID = d.id and HI_TYPE = 0) as hiFlag,
-               per_test_conclusion
-                ,
-               d.is_repeat
+               per_test_conclusion,
+               d.is_repeat,
+               (SELECT COUNT(1)
+                from T_COMMONFILE f
+                where f.P_ID = d.id and f.P_TYPE = 'sems-cc-info' and f.DEL_FLAG = 0)   as infoNum,
+               (SELECT COUNT(1)
+                from T_COMMONFILE f
+                where f.P_ID = d.id and f.P_TYPE = 'sems-cc-report' and f.DEL_FLAG = 0) as reportNum
         from t_specdev_cc d
                  left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -156,57 +161,57 @@
 
     <select id="selectExpiredCc" parameterType="Integer" resultMap="TSpecdevCcResult">
         select d.id,
-               d.plant_code,
-               d.unit,
-               d.car_no,
-               d.devname,
-               d.devno,
-               d.submitdate,
-               d.status,
-               d.del_flag,
-               d.creater_code,
-               d.createdate,
-               d.plant_maint,
-               d.updater_code,
-               d.updatedate,
-               d.dept_id,
-               d.remarks,
-               d.remarks2,
-               d.approve_status,
-               d.regno,
-               d.useno,
-               d.warn_date,
-               d.warn_cycle,
-               d.next_warn_date,
-               d.warn_flag,
-               d.create_unit,
-               d.check_strategy,
-               d.first_warn_date,
-               d.check_unit,
-               d.docno,
-               d.approve_time,
-               d.change_time,
-               d.engine_no,
-               d.color,
-               d.capacity,
-               d.model,
-               d.engine_type,
-               d.dev_class,
-               d.ex_unit,
-               d.use_dept,
-               d.engineer,
-               d.ex_grade,
-               d.report_no,
-               d.frame_no,
-               d.product_no,
-               d.asset_owner,
-               per_test_conclusion
-                ,
-               d.is_repeat
+        d.plant_code,
+        d.unit,
+        d.car_no,
+        d.devname,
+        d.devno,
+        d.submitdate,
+        d.status,
+        d.del_flag,
+        d.creater_code,
+        d.createdate,
+        d.plant_maint,
+        d.updater_code,
+        d.updatedate,
+        d.dept_id,
+        d.remarks,
+        d.remarks2,
+        d.approve_status,
+        d.regno,
+        d.useno,
+        d.warn_date,
+        d.warn_cycle,
+        d.next_warn_date,
+        d.warn_flag,
+        d.create_unit,
+        d.check_strategy,
+        d.first_warn_date,
+        d.check_unit,
+        d.docno,
+        d.approve_time,
+        d.change_time,
+        d.engine_no,
+        d.color,
+        d.capacity,
+        d.model,
+        d.engine_type,
+        d.dev_class,
+        d.ex_unit,
+        d.use_dept,
+        d.engineer,
+        d.ex_grade,
+        d.report_no,
+        d.frame_no,
+        d.product_no,
+        d.asset_owner,
+        per_test_conclusion
+        ,
+        d.is_repeat
         from t_specdev_cc d
         <where>
             <if test="month == 0 ">and SYSDATE > NEXT_WARN_DATE</if>
-            <if test="month == 3 ">and SYSDATE + INTERVAL '3' MONTH   >  NEXT_WARN_DATE and NEXT_WARN_DATE > SYSDATE </if>
+            <if test="month == 3 ">and SYSDATE + INTERVAL '3' MONTH > NEXT_WARN_DATE and NEXT_WARN_DATE > SYSDATE</if>
             and DEL_FLAG = 0
             and STATUS = 1
         </where>
@@ -507,4 +512,16 @@
         )
     </update>
 
+    <select id="selectTSpecdevCcListByDevNo" parameterType="TSpecdevCc" resultMap="TSpecdevCcResult">
+        select d.id
+        from t_specdev_cc d
+        <where>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode}</if>
+            <if test="devname != null  and devname != ''">and devname like concat(concat('%', #{devname}), '%')</if>
+            <if test="regno != null  and regno != ''">and regno like concat(concat('%', #{regno}), '%')</if>
+            and DEL_FLAG = 0
+        </where>
+        order by d.id desc
+    </select>
+
 </mapper>

+ 16 - 1
master/src/main/resources/mybatis/sems/TSpecdevDtMapper.xml

@@ -52,7 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectTSpecdevDtVo">
         select d.id, d.plant_code,d.plant_maint,d.use_dept, d.unit, d.devname, d.devno, d.createdate, d.submitdate, d.status, d.del_flag, d.creater_code, d.creater_date, d.updater_code, d.updater_date, d.dept_id, d.remarks,d.remarks2,  d.approve_status, d.regno, d.useno, d.warn_date, d.warn_cycle, d.next_warn_date, d.warn_flag, d.model, d.capacity, d.floor, d.create_unit, d.maint_contractor, d.location, d.check_strategy, d.first_warn_date, d.check_unit, d.docno, d.approve_time, d.change_time, d.report_no ,s.dept_name,
         (SELECT COUNT(1) from T_SPECHI_DT h  where h.DEV_ID = d.id and HI_TYPE = 0 ) as hiFlag, per_test_conclusion
-        ,d.is_repeat
+        ,d.is_repeat,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-dt-info' and f.DEL_FLAG = 0 ) as infoNum,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-dt-report' and f.DEL_FLAG = 0 ) as reportNum
         from t_specdev_dt d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -376,4 +378,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         and T_SPECDEV_DT.APPROVE_STATUS = 0
         )
     </update>
+
+    <select id="selectTSpecdevDtListByDevNo" parameterType="TSpecdevDt" resultMap="TSpecdevDtResult">
+        select d.id
+        from t_specdev_dt d
+        <where>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode} </if>
+            <if test="devname != null  and devname != ''">and devname like concat(concat('%', #{devname}), '%')</if>
+            <if test="regno != null  and regno != ''">and regno like concat(concat('%', #{regno}), '%') </if>
+            and DEL_FLAG = 0
+        </where>
+        order by d.id desc
+    </select>
+
 </mapper>

+ 15 - 1
master/src/main/resources/mybatis/sems/TSpecdevDzsbMapper.xml

@@ -51,7 +51,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectTSpecdevDzsbVo">
         select d.id, d.plant_code, d.unit, d.devname,d.dev_code,d.factory_no, d.devno, d.submitdate, d.status, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks,d.remarks2, d.approve_status, d.regno, d.useno, d.warn_date, d.warn_cycle, d.next_warn_date, d.warn_flag, d.plant_maint, d.docno, d.model, d.capacity, d.location, d.create_unit, d.check_strategy, d.year_maint, d.report_no, d.approve_time, d.change_time, d.check_unit, d.engineer, d.is_ex  ,s.dept_name,
         (SELECT COUNT(1) from T_SPECHI_DZSB h  where h.DEV_ID = d.id and HI_TYPE = 0 ) as hiFlag, per_test_conclusion
-                ,d.is_repeat
+                ,d.is_repeat,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-dzsb-info' and f.DEL_FLAG = 0 ) as infoNum,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-dzsb-report' and f.DEL_FLAG = 0 ) as reportNum
         from t_specdev_dzsb d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -371,4 +373,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         )
     </update>
 
+    <select id="selectTSpecdevDzsbListByDevNo" parameterType="TSpecdevDzsb" resultMap="TSpecdevDzsbResult">
+        select d.id
+        from t_specdev_dzsb d
+        <where>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode} </if>
+            <if test="devname != null  and devname != ''">and devname like concat(concat('%', #{devname}), '%')</if>
+            <if test="devno != null  and devno != ''">and devno like concat(concat('%', #{devno}), '%') </if>
+            and DEL_FLAG = 0
+        </where>
+        order by d.id desc
+    </select>
+
 </mapper>

+ 15 - 2
master/src/main/resources/mybatis/sems/TSpecdevGlMapper.xml

@@ -54,8 +54,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectTSpecdevGlVo">
         select d.id, d.plant_code, d.unit, d.devname, d.devno, d.submitdate, d.status, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks,d.remarks2, d.approve_status, d.regno, d.useno, d.warn_date, d.warn_cycle, d.next_warn_date, d.warn_flag, d.create_unit, d.burn_mode, d.burn_kind, d.rated_power, d.des_pressure, d.des_temp, d.opt_pressure, d.opt_temp, d.check_unit, d.check_conclusion, d.model, d.water_mode, d.report_no, d.approve_time, d.change_time, d.plant_maint, d.out_warn_date, d.out_next_warn_date, d.out_check_conclusion, d.out_report_no, d.engineer ,s.dept_name,
-        (SELECT COUNT(1) from T_SPECHI_GL h  where h.DEV_ID = d.id and HI_TYPE = 0 ) as hiFlag
-        ,d.is_repeat
+        (SELECT COUNT(1) from T_SPECHI_GL h  where h.DEV_ID = d.id and HI_TYPE = 0 ) as hiFlag,d.is_repeat,
+                   (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-gl-info' and f.DEL_FLAG = 0 ) as infoNum,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-gl-report' and f.DEL_FLAG = 0 ) as reportNum
         from t_specdev_gl d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -400,4 +401,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         )
     </update>
 
+    <select id="selectTSpecdevGlListByDevNo" parameterType="TSpecdevGl" resultMap="TSpecdevGlResult">
+        select d.id
+        from t_specdev_gl d
+        <where>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode} </if>
+            <if test="devname != null  and devname != ''">and devname like concat(concat('%', #{devname}), '%')</if>
+            <if test="devno != null  and devno != ''">and devno like concat(concat('%', #{devno}), '%') </if>
+            and DEL_FLAG = 0
+        </where>
+        order by d.id desc
+    </select>
+
 </mapper>

+ 15 - 0
master/src/main/resources/mybatis/sems/TSpecdevYlgdMapper.xml

@@ -121,6 +121,8 @@
                d.year_report_no,
                s.dept_name,
                (SELECT COUNT(1) from T_SPECHI_YLGD h  where h.DEV_ID = d.id and HI_TYPE = 0 ) as hiFlag,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-ylgd-info' and f.DEL_FLAG = 0 ) as infoNum,
+               (SELECT COUNT(1) from T_COMMONFILE f  where f.P_ID = d.id and f.P_TYPE= 'sems-ylgd-report' and f.DEL_FLAG = 0 ) as reportNum,
                d.is_repeat
         from t_specdev_ylgd d
                  left join sys_dept s on s.dept_id = d.dept_id
@@ -676,4 +678,17 @@
         </where>
         order by d.plant_code asc
     </select>
+
+    <select id="selectTSpecdevYlgdListByDevNo" parameterType="TSpecdevYlgd" resultMap="TSpecdevYlgdResult">
+        select d.id
+        from t_specdev_ylgd d
+        <where>
+            <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode} </if>
+            <if test="devname != null  and devname != ''">and devname like concat(concat('%', #{devname}), '%')</if>
+            <if test="devno != null  and devno != ''">and devno like concat(concat('%', #{devno}), '%') </if>
+            and DEL_FLAG = 0
+        </where>
+        order by d.id desc
+    </select>
+
 </mapper>

+ 0 - 48
master/src/main/resources/mybatis/sems/TSpecdevYlrqMapper.xml

@@ -521,54 +521,6 @@
 
     <select id="selectTSpecdevYlrqListByDevNo" parameterType="TSpecdevYlrq" resultMap="TSpecdevYlrqResult">
         select d.id,
-        d.plant_code,
-        d.unit,
-        d.devname,
-        d.factory_no,
-        d.devno,
-        d.submitdate,
-        d.status,
-        d.del_flag,
-        d.creater_code,
-        d.createdate,
-        d.updater_code,
-        d.updatedate,
-        d.dept_id,
-        d.remarks,
-        d.remarks2,
-        d.approve_status,
-        d.regno,
-        d.useno,
-        d.warn_date,
-        d.warn_cycle,
-        d.next_warn_date,
-        d.warn_flag,
-        d.plant_maint,
-        d.engineer,
-        d.vessel_type,
-        d.is_key,
-        d.create_unit,
-        d.nation,
-        d.out_size,
-        d.material,
-        d.medium,
-        d.des_pressure,
-        d.des_temp,
-        d.opt_pressure,
-        d.opt_temp,
-        d.check_unit,
-        d.report_no,
-        d.is_danger,
-        d.is_overlife,
-        d.safe_class,
-        d.approve_time,
-        d.change_time,
-        d.des_year,
-        d.year_warn_date,
-        d.check_conclusion,
-        d.year_next_warn_date,
-        d.year_report_no,
-        d.is_repeat
         from t_specdev_ylrq d
         <where>
             <if test="plantCode != null  and plantCode != ''">and plant_code = #{plantCode} </if>

+ 19 - 0
ui/src/api/sems/specCc.js

@@ -97,3 +97,22 @@ export function duplicate(query) {
     params: query
   })
 }
+
+//批量导入文件
+export function importFiles(data) {
+  return request({
+    url: '/sems/specCc/importFiles',
+    method: 'post',
+    data: data
+  })
+}
+
+// 导出zip
+export function downloadFileZip(query) {
+  return request({
+    url: '/sems/specCc/downloadFileZip',
+    method: 'get',
+    params: query,
+    responseType: 'blob' //
+  })
+}

+ 19 - 0
ui/src/api/sems/specDt.js

@@ -97,3 +97,22 @@ export function duplicate(query) {
     params: query
   })
 }
+
+//批量导入文件
+export function importFiles(data) {
+  return request({
+    url: '/sems/specDt/importFiles',
+    method: 'post',
+    data: data
+  })
+}
+
+// 导出zip
+export function downloadFileZip(query) {
+  return request({
+    url: '/sems/specDt/downloadFileZip',
+    method: 'get',
+    params: query,
+    responseType: 'blob' //
+  })
+}

+ 19 - 0
ui/src/api/sems/specDzsb.js

@@ -97,3 +97,22 @@ export function duplicate(query) {
     params: query
   })
 }
+
+//批量导入文件
+export function importFiles(data) {
+  return request({
+    url: '/sems/specDzsb/importFiles',
+    method: 'post',
+    data: data
+  })
+}
+
+// 导出zip
+export function downloadFileZip(query) {
+  return request({
+    url: '/sems/specDzsb/downloadFileZip',
+    method: 'get',
+    params: query,
+    responseType: 'blob' //
+  })
+}

+ 18 - 0
ui/src/api/sems/specGl.js

@@ -97,3 +97,21 @@ export function duplicate(query) {
     params: query
   })
 }
+//批量导入文件
+export function importFiles(data) {
+  return request({
+    url: '/sems/specGl/importFiles',
+    method: 'post',
+    data: data
+  })
+}
+
+// 导出zip
+export function downloadFileZip(query) {
+  return request({
+    url: '/sems/specGl/downloadFileZip',
+    method: 'get',
+    params: query,
+    responseType: 'blob' //
+  })
+}

+ 17 - 0
ui/src/api/sems/specYlgd.js

@@ -98,3 +98,20 @@ export function duplicate(query) {
   })
 }
 
+export function importFiles(data) {
+  return request({
+    url: '/sems/specYlgd/importFiles',
+    method: 'post',
+    data: data
+  })
+}
+
+// 导出zip
+export function downloadFileZip(query) {
+  return request({
+    url: '/sems/specYlgd/downloadFileZip',
+    method: 'get',
+    params: query,
+    responseType: 'blob' //
+  })
+}

+ 53 - 0
ui/src/api/sems/stress.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询材料应力列表
+export function listStress(query) {
+  return request({
+    url: '/sems/stress/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询材料应力详细
+export function getStress(id) {
+  return request({
+    url: '/sems/stress/' + id,
+    method: 'get'
+  })
+}
+
+// 新增材料应力
+export function addStress(data) {
+  return request({
+    url: '/sems/stress',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改材料应力
+export function updateStress(data) {
+  return request({
+    url: '/sems/stress',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除材料应力
+export function delStress(id) {
+  return request({
+    url: '/sems/stress/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出材料应力
+export function exportStress(query) {
+  return request({
+    url: '/sems/stress/export',
+    method: 'get',
+    params: query
+  })
+}

BIN
ui/src/assets/images/aerial.png


+ 393 - 2
ui/src/views/sems/specCc/index.vue

@@ -168,6 +168,27 @@
         >{{ $t('数据去重') }}
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImportFile"
+          v-hasPermi="['sems:specCc:edit']"
+        >文件上传
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-dropdown trigger="click" @command="handleDownloadZip">
+          <el-button type="warning" :disabled="multiple">
+            文件下载<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="info" >注册登记资料</el-dropdown-item>
+            <el-dropdown-item command="report" >全面检验报告</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -220,7 +241,38 @@
       <el-table-column :label="$t('资产归属形式')" align="center" prop="assetOwner" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('备注2')" align="center" prop="remarks2" :render-header="remarksHeader" :show-overflow-tooltip="true"/>
-
+      <el-table-column label="注册登记资料" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.infoNum"
+            :hidden="scope.row.infoNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button
+              size="small"
+              icon="el-icon-folder"
+              style="color:#6e96fa;"
+              @click="handleDoc(scope.row , 'sems-cc-info')"
+              circle>
+            </el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
+      <el-table-column label="全面检验报告" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.reportNum"
+            :hidden="scope.row.reportNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button  icon="el-icon-folder"
+                        size="small"
+                        style="color:#6e96fa;" @click="handleDoc(scope.row , 'sems-cc-report')" circle></el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('操作')" align="center" fixed="right" width="140"
                        class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -614,6 +666,132 @@
       </el-form>
       <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
     </el-dialog>
+
+    <!-- 文件导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="uploadFile.title" :visible.sync="uploadFile.open" width="400px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        装  置
+        <el-select v-model="uploadFile.plantCode" :placeholder="$t('请选择')+ $t('装置')" filterable clearable size="small">
+          <el-option
+            v-for="dict in plantOptions"
+            :key="dict.name"
+            :label="dict.name"
+            :value="dict.name"
+          />
+        </el-select>
+      </div>
+      <div style="margin-bottom: 20px;">
+        文件类型
+        <el-select v-model="uploadFile.fileType" :placeholder="$t('请选择')+ $t('文件类型')" filterable clearable
+                   size="small">
+          <el-option
+            key="info"
+            label="注册登记资料"
+            value="info"
+          />
+          <el-option
+            key="report"
+            label="全面检验报告"
+            value="report"
+          />
+        </el-select>
+      </div>
+      <el-upload
+        :limit="100"
+        :headers="uploadFile.headers"
+        :action="uploadFile.url"
+        :on-success="handleFileSuccess2"
+        :on-change="handleFileChange"
+        :auto-upload="false"
+        ref="uploadFile"
+        drag
+        multiple
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:文件名为 设备代码_XXX.xxx') }}</div>
+
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
+        <el-button type="primary" @click="submitFileForm2" :loading="fullscreenLoading">{{
+            $t('确定')
+          }}
+        </el-button>
+        <el-button @click="uploadFile.open = false">{{ $t('取消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button   type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
     <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
     <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
     <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
@@ -631,6 +809,8 @@ import {
   updateSpecCcPre,
   exportSpecList,
   duplicate,
+  importFiles,
+  downloadFileZip,
   updateSpecCcBatch
 } from "@/api/sems/specCc";
 import {treeselect} from "@/api/system/dept";
@@ -644,7 +824,7 @@ import HisCheck from "../check/check"
 import {addModify} from "@/api/sems/his/modify";
 import {listPostUser} from "@/api/system/user";
 import HisReform from "./specCc-hisReform";
-import {updateSpecDtBatch} from "@/api/sems/specDt";
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
 
 export default {
   name: "SpecCc",
@@ -716,6 +896,67 @@ export default {
         url: process.env.VUE_APP_BASE_API + "/sems/specCc/importData",
         submitData: {wxjl: null}
       },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      // 用户导入参数
+      uploadFile: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        type: "specCc",
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        fileList: [],
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken(),"Content-Type": "multipart/form-data"},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specCc/importFiles",
+        fileType: null,
+        plantCode: null,
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      downloadForm: {
+        id: '',
+        type: ''
+      },
+      downloadZipAction: process.env.VUE_APP_BASE_API + '/sems/specCc/downloadFileZip',
+      fileList: [],
       // 查询参数
       queryParams: {
         searchValue: null,
@@ -947,6 +1188,7 @@ export default {
               this.msgSuccess(this.$t('修改成功'));
               this.open = false;
               this.getList();
+              this.$refs.deviceTable.clearSelection();
             });
           } else {
             addSpecCc(this.form).then(response => {
@@ -1243,6 +1485,155 @@ export default {
         )
       ]
     },
+    /** 导入按钮操作 */
+    handleImportFile() {
+      this.uploadFile.title = "文件导入";
+      this.uploadFile.open = true;
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row , fileType) {
+      var workType = "";
+      if (fileType === "byxworklicense-boiler"){
+        workType = this.$t('裂解(裂化)');
+      }else if (fileType === "byxworklicense-compression"){
+        workType = this.$t('压力容器');
+      }else if (fileType === "byxworklicense-separation"){
+        workType = this.$t('压力管道');
+      }else if (fileType === "byxworklicense-pguaeu"){
+        workType = '';
+      }
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = this.$t('附件') ;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList (){
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf(){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    handleDownloadZip(type) {
+      const ids = this.ids;
+      this.downloadForm.id = ids.join(',')
+      this.downloadForm.type = type
+      downloadFileZip(this.downloadForm).then(response => {
+        // 创建临时链接
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement('a');
+        link.href = url;
+        link.setAttribute('download', '文件.zip'); // 和后端返回的文件名一致
+        document.body.appendChild(link);
+
+        // 模拟点击下载
+        link.click();
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress2(event, file, fileList) {
+      this.uploadFile.fileList = fileList;
+      this.uploadFile.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess2(response, file, fileList) {
+      if (response.code == 200) {
+        this.msgSuccess("导入成功");
+        this.$refs.uploadFile.clearFiles();
+        this.uploadFile.open = false
+      }
+    },
+    handleFileChange(file, fileList) {
+      console.log('文件变动:', file);
+      console.log(fileList)
+      this.fileList = fileList; // 更新文件列表
+      console.log(this.fileList)
+    },
+    // 提交上传文件
+    submitFileForm2() {  // 导入
+      let formData = new FormData();  //  用FormData存放上传文件
+      console.log(this.fileList)
+      this.fileList.forEach(file => {
+        formData.append('file', file.raw)
+      })
+      formData.append("plantCode", this.uploadFile.plantCode)
+      formData.append("fileType", this.uploadFile.fileType)
+      // importCase是上传接口
+      importFiles(formData).then((res) => {
+        this.fullscreenLoading = true
+        //手动上传无法触发成功或失败的钩子函数,因此这里手动调用
+        if (res.code == 200) {
+          this.msgSuccess("导入成功");
+          this.$refs.uploadFile.clearFiles();
+          this.uploadFile.open = false
+          this.getList();
+        }
+        this.fullscreenLoading = false
+      }, (err) => {
+
+      })
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
   }
 };
 </script>

+ 391 - 2
ui/src/views/sems/specDt/index.vue

@@ -178,6 +178,27 @@
         >{{ $t('数据去重') }}
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImportFile"
+          v-hasPermi="['sems:specDt:edit']"
+        >文件上传
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-dropdown trigger="click" @command="handleDownloadZip">
+          <el-button type="warning" :disabled="multiple">
+            文件下载<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="info" >注册登记资料</el-dropdown-item>
+            <el-dropdown-item command="report" >全面检验报告</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -226,7 +247,38 @@
 
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('备注2')" align="center" prop="remarks2" :render-header="remarksHeader" :show-overflow-tooltip="true"/>
-
+      <el-table-column label="注册登记资料" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.infoNum"
+            :hidden="scope.row.infoNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button
+              size="small"
+              icon="el-icon-folder"
+              style="color:#6e96fa;"
+              @click="handleDoc(scope.row , 'sems-dt-info')"
+              circle>
+            </el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
+      <el-table-column label="全面检验报告" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.reportNum"
+            :hidden="scope.row.reportNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button  icon="el-icon-folder"
+                        size="small"
+                        style="color:#6e96fa;" @click="handleDoc(scope.row , 'sems-dt-report')" circle></el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('操作')" align="center" fixed="right" width="140"
                        class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -571,7 +623,131 @@
       </el-form>
       <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
     </el-dialog>
+    <!-- 文件导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="uploadFile.title" :visible.sync="uploadFile.open" width="400px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        装  置
+        <el-select v-model="uploadFile.plantCode" :placeholder="$t('请选择')+ $t('装置')" filterable clearable size="small">
+          <el-option
+            v-for="dict in plantOptions"
+            :key="dict.name"
+            :label="dict.name"
+            :value="dict.name"
+          />
+        </el-select>
+      </div>
+      <div style="margin-bottom: 20px;">
+        文件类型
+        <el-select v-model="uploadFile.fileType" :placeholder="$t('请选择')+ $t('文件类型')" filterable clearable
+                   size="small">
+          <el-option
+            key="info"
+            label="注册登记资料"
+            value="info"
+          />
+          <el-option
+            key="report"
+            label="全面检验报告"
+            value="report"
+          />
+        </el-select>
+      </div>
+      <el-upload
+        :limit="100"
+        :headers="uploadFile.headers"
+        :action="uploadFile.url"
+        :on-success="handleFileSuccess2"
+        :on-change="handleFileChange"
+        :auto-upload="false"
+        ref="uploadFile"
+        drag
+        multiple
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:文件名为 设备代码_XXXXX.xxx') }}</div>
+
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
+        <el-button type="primary" @click="submitFileForm2" :loading="fullscreenLoading">{{
+            $t('确定')
+          }}
+        </el-button>
+        <el-button @click="uploadFile.open = false">{{ $t('取消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button   type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
 
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
     <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
     <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
     <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
@@ -588,6 +764,8 @@ import {
   getSpecDt,
   listSpecDt,
   updateSpecDt,
+  importFiles,
+  downloadFileZip,
   exportSpecList,
   updateSpecDtBatch
 } from "@/api/sems/specDt";
@@ -602,7 +780,7 @@ import HisCheck from "../check/check"
 import {listPostUser} from "@/api/system/user";
 import {addModify} from "@/api/sems/his/modify";
 import HisReform from "./specDt-hisReform";
-import {updateSpecDzsbBatch} from "@/api/sems/specDzsb";
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
 
 export default {
   name: "SpecDt",
@@ -672,6 +850,67 @@ export default {
         url: process.env.VUE_APP_BASE_API + "/sems/specDt/importData",
         submitData: {wxjl: null}
       },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      // 用户导入参数
+      uploadFile: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        type: "specDt",
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        fileList: [],
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken(),"Content-Type": "multipart/form-data"},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specDt/importFiles",
+        fileType: null,
+        plantCode: null,
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      downloadForm: {
+        id: '',
+        type: ''
+      },
+      downloadZipAction: process.env.VUE_APP_BASE_API + '/sems/specDt/downloadFileZip',
+      fileList: [],
       // 查询参数
       queryParams: {
         searchValue: null,
@@ -898,6 +1137,7 @@ export default {
               this.msgSuccess(this.$t('修改成功'));
               this.open = false;
               this.getList();
+              this.$refs.deviceTable.clearSelection();
             });
             /*updateSpecDtPre(this.form).then(response => {
               this.open = false;
@@ -1177,6 +1417,155 @@ export default {
         )
       ]
     },
+    /** 导入按钮操作 */
+    handleImportFile() {
+      this.uploadFile.title = "文件导入";
+      this.uploadFile.open = true;
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row , fileType) {
+      var workType = "";
+      if (fileType === "byxworklicense-boiler"){
+        workType = this.$t('裂解(裂化)');
+      }else if (fileType === "byxworklicense-compression"){
+        workType = this.$t('压力容器');
+      }else if (fileType === "byxworklicense-separation"){
+        workType = this.$t('压力管道');
+      }else if (fileType === "byxworklicense-pguaeu"){
+        workType = '';
+      }
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = this.$t('附件') ;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList (){
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf(){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    handleDownloadZip(type) {
+      const ids = this.ids;
+      this.downloadForm.id = ids.join(',')
+      this.downloadForm.type = type
+      downloadFileZip(this.downloadForm).then(response => {
+        // 创建临时链接
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement('a');
+        link.href = url;
+        link.setAttribute('download', '文件.zip'); // 和后端返回的文件名一致
+        document.body.appendChild(link);
+
+        // 模拟点击下载
+        link.click();
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress2(event, file, fileList) {
+      this.uploadFile.fileList = fileList;
+      this.uploadFile.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess2(response, file, fileList) {
+      if (response.code == 200) {
+        this.msgSuccess("导入成功");
+        this.$refs.uploadFile.clearFiles();
+        this.uploadFile.open = false
+      }
+    },
+    handleFileChange(file, fileList) {
+      console.log('文件变动:', file);
+      console.log(fileList)
+      this.fileList = fileList; // 更新文件列表
+      console.log(this.fileList)
+    },
+    // 提交上传文件
+    submitFileForm2() {  // 导入
+      let formData = new FormData();  //  用FormData存放上传文件
+      console.log(this.fileList)
+      this.fileList.forEach(file => {
+        formData.append('file', file.raw)
+      })
+      formData.append("plantCode", this.uploadFile.plantCode)
+      formData.append("fileType", this.uploadFile.fileType)
+      // importCase是上传接口
+      importFiles(formData).then((res) => {
+        this.fullscreenLoading = true
+        //手动上传无法触发成功或失败的钩子函数,因此这里手动调用
+        if (res.code == 200) {
+          this.msgSuccess("导入成功");
+          this.$refs.uploadFile.clearFiles();
+          this.uploadFile.open = false
+          this.getList();
+        }
+        this.fullscreenLoading = false
+      }, (err) => {
+
+      })
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
   }
 };
 </script>

+ 393 - 2
ui/src/views/sems/specDzsb/index.vue

@@ -177,6 +177,27 @@
         >{{ $t('数据去重') }}
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImportFile"
+          v-hasPermi="['sems:specDzsb:edit']"
+        >文件上传
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-dropdown trigger="click" @command="handleDownloadZip">
+          <el-button type="warning" :disabled="multiple">
+            文件下载<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="info" >注册登记资料</el-dropdown-item>
+            <el-dropdown-item command="report" >全面检验报告</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -226,7 +247,38 @@
       <el-table-column :label="$t('定期检验结论')" align="center" prop="perTestConclusion" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('备注2')" align="center" prop="remarks2" :render-header="remarksHeader" :show-overflow-tooltip="true"/>
-
+      <el-table-column label="注册登记资料" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.infoNum"
+            :hidden="scope.row.infoNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button
+              size="small"
+              icon="el-icon-folder"
+              style="color:#6e96fa;"
+              @click="handleDoc(scope.row , 'sems-dzsb-info')"
+              circle>
+            </el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
+      <el-table-column label="全面检验报告" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.reportNum"
+            :hidden="scope.row.reportNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button  icon="el-icon-folder"
+                        size="small"
+                        style="color:#6e96fa;" @click="handleDoc(scope.row , 'sems-dzsb-report')" circle></el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('操作')" align="center" fixed="right" width="140"
                        class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -594,6 +646,131 @@
       </el-form>
       <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
     </el-dialog>
+    <!-- 文件导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="uploadFile.title" :visible.sync="uploadFile.open" width="400px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        装  置
+        <el-select v-model="uploadFile.plantCode" :placeholder="$t('请选择')+ $t('装置')" filterable clearable size="small">
+          <el-option
+            v-for="dict in plantOptions"
+            :key="dict.name"
+            :label="dict.name"
+            :value="dict.name"
+          />
+        </el-select>
+      </div>
+      <div style="margin-bottom: 20px;">
+        文件类型
+        <el-select v-model="uploadFile.fileType" :placeholder="$t('请选择')+ $t('文件类型')" filterable clearable
+                   size="small">
+          <el-option
+            key="info"
+            label="注册登记资料"
+            value="info"
+          />
+          <el-option
+            key="report"
+            label="全面检验报告"
+            value="report"
+          />
+        </el-select>
+      </div>
+      <el-upload
+        :limit="100"
+        :headers="uploadFile.headers"
+        :action="uploadFile.url"
+        :on-success="handleFileSuccess2"
+        :on-change="handleFileChange"
+        :auto-upload="false"
+        ref="uploadFile"
+        drag
+        multiple
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:文件名为 位号_XXXXX.xxx') }}</div>
+
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
+        <el-button type="primary" @click="submitFileForm2" :loading="fullscreenLoading">{{
+            $t('确定')
+          }}
+        </el-button>
+        <el-button @click="uploadFile.open = false">{{ $t('取消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button   type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
     <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
     <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
     <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
@@ -608,6 +785,8 @@ import {
   exportSpecDzsb,
   getSpecDzsb,
   listSpecDzsb,
+  importFiles,
+  downloadFileZip,
   updateSpecDzsb, duplicate,
   updateSpecDzsbBatch
 } from "@/api/sems/specDzsb";
@@ -622,7 +801,8 @@ import HisCheck from "../check/check";
 import {addModify} from "@/api/sems/his/modify";
 import {listPostUser} from "@/api/system/user";
 import HisReform from "./specDzsb-hisReform";
-import {updateSpecGlBatch} from "@/api/sems/specGl";
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
+
 
 export default {
   name: "SpecDzsb",
@@ -692,6 +872,67 @@ export default {
         url: process.env.VUE_APP_BASE_API + "/sems/specDzsb/importData",
         submitData: {wxjl: null}
       },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      // 用户导入参数
+      uploadFile: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        type: "specDzsb",
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        fileList: [],
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken(),"Content-Type": "multipart/form-data"},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specDzsb/importFiles",
+        fileType: null,
+        plantCode: null,
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      downloadForm: {
+        id: '',
+        type: ''
+      },
+      downloadZipAction: process.env.VUE_APP_BASE_API + '/sems/specDzsb/downloadFileZip',
+      fileList: [],
       // 查询参数
       queryParams: {
         searchValue: null,
@@ -921,6 +1162,7 @@ export default {
               this.msgSuccess(this.$t('修改成功'));
               this.open = false;
               this.getList();
+              this.$refs.deviceTable.clearSelection();
             });
             /* updateSpecDzsbPre(this.form).then(response => {
                this.open = false;
@@ -1213,6 +1455,155 @@ export default {
         )
       ]
     },
+    /** 导入按钮操作 */
+    handleImportFile() {
+      this.uploadFile.title = "文件导入";
+      this.uploadFile.open = true;
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row , fileType) {
+      var workType = "";
+      if (fileType === "byxworklicense-boiler"){
+        workType = this.$t('裂解(裂化)');
+      }else if (fileType === "byxworklicense-compression"){
+        workType = this.$t('压力容器');
+      }else if (fileType === "byxworklicense-separation"){
+        workType = this.$t('压力管道');
+      }else if (fileType === "byxworklicense-pguaeu"){
+        workType = '';
+      }
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = this.$t('附件') ;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList (){
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf(){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    handleDownloadZip(type) {
+      const ids = this.ids;
+      this.downloadForm.id = ids.join(',')
+      this.downloadForm.type = type
+      downloadFileZip(this.downloadForm).then(response => {
+        // 创建临时链接
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement('a');
+        link.href = url;
+        link.setAttribute('download', '文件.zip'); // 和后端返回的文件名一致
+        document.body.appendChild(link);
+
+        // 模拟点击下载
+        link.click();
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress2(event, file, fileList) {
+      this.uploadFile.fileList = fileList;
+      this.uploadFile.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess2(response, file, fileList) {
+      if (response.code == 200) {
+        this.msgSuccess("导入成功");
+        this.$refs.uploadFile.clearFiles();
+        this.uploadFile.open = false
+      }
+    },
+    handleFileChange(file, fileList) {
+      console.log('文件变动:', file);
+      console.log(fileList)
+      this.fileList = fileList; // 更新文件列表
+      console.log(this.fileList)
+    },
+    // 提交上传文件
+    submitFileForm2() {  // 导入
+      let formData = new FormData();  //  用FormData存放上传文件
+      console.log(this.fileList)
+      this.fileList.forEach(file => {
+        formData.append('file', file.raw)
+      })
+      formData.append("plantCode", this.uploadFile.plantCode)
+      formData.append("fileType", this.uploadFile.fileType)
+      // importCase是上传接口
+      importFiles(formData).then((res) => {
+        this.fullscreenLoading = true
+        //手动上传无法触发成功或失败的钩子函数,因此这里手动调用
+        if (res.code == 200) {
+          this.msgSuccess("导入成功");
+          this.$refs.uploadFile.clearFiles();
+          this.uploadFile.open = false
+          this.getList();
+        }
+        this.fullscreenLoading = false
+      }, (err) => {
+
+      })
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
   }
 };
 </script>

+ 390 - 2
ui/src/views/sems/specGl/index.vue

@@ -186,6 +186,27 @@
         >{{ $t('数据去重') }}
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImportFile"
+          v-hasPermi="['sems:specGl:edit']"
+        >文件上传
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-dropdown trigger="click" @command="handleDownloadZip">
+          <el-button type="warning" :disabled="multiple">
+            文件下载<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="info" >注册登记资料</el-dropdown-item>
+            <el-dropdown-item command="report" >全面检验报告</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -251,7 +272,38 @@
       </el-table-column>
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('备注2')" align="center" prop="remarks2" :render-header="remarksHeader" :show-overflow-tooltip="true"/>
-
+      <el-table-column label="注册登记资料" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.infoNum"
+            :hidden="scope.row.infoNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button
+              size="small"
+              icon="el-icon-folder"
+              style="color:#6e96fa;"
+              @click="handleDoc(scope.row , 'sems-gl-info')"
+              circle>
+            </el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
+      <el-table-column label="全面检验报告" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.reportNum"
+            :hidden="scope.row.reportNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button  icon="el-icon-folder"
+                        size="small"
+                        style="color:#6e96fa;" @click="handleDoc(scope.row , 'sems-gl-report')" circle></el-button>
+          </el-badge>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('操作')" align="center" fixed="right" width="140"
                        class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -669,7 +721,131 @@
       </el-form>
       <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
     </el-dialog>
+    <!-- 文件导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="uploadFile.title" :visible.sync="uploadFile.open" width="400px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        装  置
+        <el-select v-model="uploadFile.plantCode" :placeholder="$t('请选择')+ $t('装置')" filterable clearable size="small">
+          <el-option
+            v-for="dict in plantOptions"
+            :key="dict.name"
+            :label="dict.name"
+            :value="dict.name"
+          />
+        </el-select>
+      </div>
+      <div style="margin-bottom: 20px;">
+        文件类型
+        <el-select v-model="uploadFile.fileType" :placeholder="$t('请选择')+ $t('文件类型')" filterable clearable
+                   size="small">
+          <el-option
+            key="info"
+            label="注册登记资料"
+            value="info"
+          />
+          <el-option
+            key="report"
+            label="全面检验报告"
+            value="report"
+          />
+        </el-select>
+      </div>
+      <el-upload
+        :limit="100"
+        :headers="uploadFile.headers"
+        :action="uploadFile.url"
+        :on-success="handleFileSuccess2"
+        :on-change="handleFileChange"
+        :auto-upload="false"
+        ref="uploadFile"
+        drag
+        multiple
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:文件名为 位号_XXXXX.xxx') }}</div>
+
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
+        <el-button type="primary" @click="submitFileForm2" :loading="fullscreenLoading">{{
+            $t('确定')
+          }}
+        </el-button>
+        <el-button @click="uploadFile.open = false">{{ $t('取消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button   type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
 
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
     <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
     <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
     <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
@@ -687,6 +863,8 @@ import {
   updateSpecGl,
   updateSpecGlPre,
   duplicate,
+  importFiles,
+  downloadFileZip,
   updateSpecGlBatch
 } from "@/api/sems/specGl";
 import {treeselect} from "@/api/system/dept";
@@ -700,7 +878,7 @@ import HisCheck from "../check/check"
 import {listPostUser} from "@/api/system/user";
 import {addModify} from "@/api/sems/his/modify";
 import HisReform from "./specGl-hisReform";
-import {updateSpecYlgdBatch} from "@/api/sems/specYlgd";
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
 
 export default {
   name: "SpecGl",
@@ -770,6 +948,67 @@ export default {
         url: process.env.VUE_APP_BASE_API + "/sems/specGl/importData",
         submitData: {wxjl: null}
       },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      // 用户导入参数
+      uploadFile: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        type: "specGl",
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        fileList: [],
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken(),"Content-Type": "multipart/form-data"},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specGl/importFiles",
+        fileType: null,
+        plantCode: null,
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      downloadForm: {
+        id: '',
+        type: ''
+      },
+      downloadZipAction: process.env.VUE_APP_BASE_API + '/sems/specGl/downloadFileZip',
+      fileList: [],
       // 查询参数
       queryParams: {
         searchValue: null,
@@ -1302,6 +1541,155 @@ export default {
         )
       ]
     },
+    /** 导入按钮操作 */
+    handleImportFile() {
+      this.uploadFile.title = "文件导入";
+      this.uploadFile.open = true;
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row , fileType) {
+      var workType = "";
+      if (fileType === "byxworklicense-boiler"){
+        workType = this.$t('裂解(裂化)');
+      }else if (fileType === "byxworklicense-compression"){
+        workType = this.$t('压力容器');
+      }else if (fileType === "byxworklicense-separation"){
+        workType = this.$t('压力管道');
+      }else if (fileType === "byxworklicense-pguaeu"){
+        workType = '';
+      }
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = this.$t('附件') ;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList (){
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf(){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    handleDownloadZip(type) {
+      const ids = this.ids;
+      this.downloadForm.id = ids.join(',')
+      this.downloadForm.type = type
+      downloadFileZip(this.downloadForm).then(response => {
+        // 创建临时链接
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement('a');
+        link.href = url;
+        link.setAttribute('download', '文件.zip'); // 和后端返回的文件名一致
+        document.body.appendChild(link);
+
+        // 模拟点击下载
+        link.click();
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress2(event, file, fileList) {
+      this.uploadFile.fileList = fileList;
+      this.uploadFile.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess2(response, file, fileList) {
+      if (response.code == 200) {
+        this.msgSuccess("导入成功");
+        this.$refs.uploadFile.clearFiles();
+        this.uploadFile.open = false
+      }
+    },
+    handleFileChange(file, fileList) {
+      console.log('文件变动:', file);
+      console.log(fileList)
+      this.fileList = fileList; // 更新文件列表
+      console.log(this.fileList)
+    },
+    // 提交上传文件
+    submitFileForm2() {  // 导入
+      let formData = new FormData();  //  用FormData存放上传文件
+      console.log(this.fileList)
+      this.fileList.forEach(file => {
+        formData.append('file', file.raw)
+      })
+      formData.append("plantCode", this.uploadFile.plantCode)
+      formData.append("fileType", this.uploadFile.fileType)
+      // importCase是上传接口
+      importFiles(formData).then((res) => {
+        this.fullscreenLoading = true
+        //手动上传无法触发成功或失败的钩子函数,因此这里手动调用
+        if (res.code == 200) {
+          this.msgSuccess("导入成功");
+          this.$refs.uploadFile.clearFiles();
+          this.uploadFile.open = false
+          this.getList();
+        }
+        this.fullscreenLoading = false
+      }, (err) => {
+
+      })
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
   }
 };
 </script>

+ 499 - 2
ui/src/views/sems/specYlgd/index.vue

@@ -239,6 +239,27 @@
         >{{ $t('数据去重') }}
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImportFile"
+          v-hasPermi="['sems:specYlgd:edit']"
+        >文件上传
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-dropdown trigger="click" @command="handleDownloadZip">
+          <el-button type="warning" :disabled="multiple">
+            文件下载<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="info" >注册登记资料</el-dropdown-item>
+            <el-dropdown-item command="report" >全面检验报告</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -320,6 +341,38 @@
       <u-table-column :label="$t('年度检查报告编号')" align="center" prop="yearReportNo" :show-overflow-tooltip="true"/>
       <u-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <u-table-column :label="$t('备注2')" align="center" prop="remarks2" :render-header="remarksHeader" :show-overflow-tooltip="true"/>
+      <u-table-column label="注册登记资料" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.infoNum"
+            :hidden="scope.row.infoNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button
+              size="small"
+              icon="el-icon-folder"
+              style="color:#6e96fa;"
+              @click="handleDoc(scope.row , 'sems-ylgd-info')"
+              circle>
+            </el-button>
+          </el-badge>
+        </template>
+      </u-table-column>
+      <u-table-column label="全面检验报告" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-badge
+            :value="scope.row.reportNum"
+            :hidden="scope.row.reportNum == 0"
+            :type="'primary'"
+            :offset="[-5, 5]"
+          >
+            <el-button  icon="el-icon-folder"
+                        size="small"
+                        style="color:#6e96fa;" @click="handleDoc(scope.row , 'sems-ylgd-report')" circle></el-button>
+          </el-badge>
+        </template>
+      </u-table-column>
       <u-table-column :label="$t('操作')" align="center" fixed="right" width="170" class-name="small-padding">
         <template slot-scope="scope">
           <el-button
@@ -798,6 +851,236 @@
       </el-form>
       <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
     </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        {{ $t('确认人') }}
+        <el-select v-model="upload.submitData.wxjl" :placeholder="$t('请选择')+ $t('装置维修经理')" filterable clearable
+                   size="small">
+          <el-option
+            v-for="dict in wxjlList"
+            :key="dict.userId"
+            :label="dict.nickName"
+            :value="dict.userId"
+          />
+        </el-select>
+      </div>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :data="upload.submitData"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <!--                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+          <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
+        </div>
+        <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+          <input name="type" :value="upload.type" hidden/>
+        </form>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+        <div class="el-upload__tip" style="color:red" slot="tip"> Excel单元格式为文本格式 </div>
+
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
+        <el-button type="primary" @click="submitFileForm" v-loading.fullscreen.lock="fullscreenLoading">{{
+            $t('确定')
+          }}
+        </el-button>
+        <el-button @click="upload.open = false">{{ $t('取消') }}</el-button>
+      </div>
+    </el-dialog>
+    <form ref="downloadDevForm" :action="downloadDevAction" target="FORMSUBMIT">
+      <input name="devType" v-model="devType" hidden/>
+      <input name="ids" v-model="ids" hidden/>
+      <input name="downloadType" v-model="downloadType" hidden/>
+    </form>
+    <form ref="downloadForm" :action="downloadZipAction" target="FORMSUBMIT">
+      <input name="id" v-model="downloadForm.id" hidden/>
+    </form>
+    <el-dialog  :close-on-click-modal="false" :title="$t('检验更新')" width="30%" :visible.sync="inspectionInformation">
+      <el-form ref="dateform" label-width="120px">
+        <el-form-item>
+          <span>{{ $t('已选择') }} {{ dataListSelections.length }}</span>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" :disabled="dataListSelections.length <= 0" @click="downloadDev(2)">
+            {{ $t('downloadSelect') }}
+          </el-button>
+        </el-form-item>
+        <el-upload
+          class="upload-demo"
+          drag
+          ref="upload"
+          :limit="5"
+          :show-file-list="false"
+          :on-success="handleFileSuccess"
+          :auto-upload="true"
+          :headers="upload.headers"
+          :action="uploadUrl(2)"
+          multiple>
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">{{ $t('文件') }}<em>{{ $t('点击上传') }}</em></div>
+          <div class="el-upload__tip" slot="tip">{{ $t('仅支持excel格式') }}</div>
+        </el-upload>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="inspectionInformation = false">{{ $t('返回') }}</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="modifyTitle" :visible.sync="modifyVisible" width="550px" append-to-body>
+      <el-form ref="modifyForm" :model="modifyForm" :rules="modifyRules">
+        <el-form-item :label="$t('确认人')" prop="wxjl">
+          <el-select v-model="modifyForm.wxjl" :placeholder="$t('请选择')+ $t('装置维修经理')" filterable clearable size="small">
+            <el-option
+              v-for="dict in wxjlList"
+              :key="dict.userId"
+              :label="dict.nickName"
+              :value="dict.userId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
+    </el-dialog>
+    <!-- 文件导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="uploadFile.title" :visible.sync="uploadFile.open" width="400px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        装  置
+        <el-select v-model="uploadFile.plantCode" :placeholder="$t('请选择')+ $t('装置')" filterable clearable size="small">
+          <el-option
+            v-for="dict in plantOptions"
+            :key="dict.name"
+            :label="dict.name"
+            :value="dict.name"
+          />
+        </el-select>
+      </div>
+      <div style="margin-bottom: 20px;">
+        文件类型
+        <el-select v-model="uploadFile.fileType" :placeholder="$t('请选择')+ $t('文件类型')" filterable clearable
+                   size="small">
+          <el-option
+            key="info"
+            label="注册登记资料"
+            value="info"
+          />
+          <el-option
+            key="report"
+            label="全面检验报告"
+            value="report"
+          />
+        </el-select>
+      </div>
+      <el-upload
+        :limit="100"
+        :headers="uploadFile.headers"
+        :action="uploadFile.url"
+        :on-success="handleFileSuccess2"
+        :on-change="handleFileChange"
+        :auto-upload="false"
+        ref="uploadFile"
+        drag
+        multiple
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:文件名为 管道编号_XXXXX.xxx') }}</div>
+
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
+        <el-button type="primary" @click="submitFileForm2" :loading="fullscreenLoading">{{
+            $t('确定')
+          }}
+        </el-button>
+        <el-button @click="uploadFile.open = false">{{ $t('取消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload
+                 ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+                 :disabled="doc.isUploading"
+                 :on-progress="handleFileDocProgress"
+                 :on-success="handleFileDocSuccess"
+                 :auto-upload="true"
+                 drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button   type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
     <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
     <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
     <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
@@ -815,7 +1098,9 @@ import {
   exportSpecYlgd,
   updateSpecYlgdPre,
   duplicate,
-  updateSpecYlgdBatch
+  importFiles,
+  updateSpecYlgdBatch,
+  downloadFileZip
 } from "@/api/sems/specYlgd";
 import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
@@ -828,7 +1113,7 @@ import HisCheck from "../check/check"
 import {addModify} from "@/api/sems/his/modify";
 import {listPostUser} from "@/api/system/user";
 import HisReform from "./specYlgd-hisReform";
-import {updateSpecYlrqBatch} from "@/api/sems/specYlrq";
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
 
 export default {
   name: "SpecYlgd",
@@ -898,6 +1183,67 @@ export default {
         url: process.env.VUE_APP_BASE_API + "/sems/specYlgd/importData",
         submitData: {wxjl: null}
       },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      // 用户导入参数
+      uploadFile: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        type: "specYlgd",
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        fileList: [],
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken(),"Content-Type": "multipart/form-data"},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specYlgd/importFiles",
+        fileType: null,
+        plantCode: null,
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      downloadForm: {
+        id: '',
+        type: ''
+      },
+      downloadZipAction: process.env.VUE_APP_BASE_API + '/sems/specYlgd/downloadFileZip',
+      fileList: [],
       // 查询参数
       queryParams: {
         searchValue: null,
@@ -1159,6 +1505,7 @@ export default {
               this.msgSuccess(this.$t('修改成功'));
               this.open = false;
               this.getList();
+              this.$refs.deviceTable.clearSelection();
             });
             /*updateSpecYlgdPre(this.form).then(response => {
               this.open = false;
@@ -1452,6 +1799,156 @@ export default {
         )
       ]
     },
+
+    /** 导入按钮操作 */
+    handleImportFile() {
+      this.uploadFile.title = "文件导入";
+      this.uploadFile.open = true;
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row , fileType) {
+      var workType = "";
+      if (fileType === "byxworklicense-boiler"){
+        workType = this.$t('裂解(裂化)');
+      }else if (fileType === "byxworklicense-compression"){
+        workType = this.$t('压力容器');
+      }else if (fileType === "byxworklicense-separation"){
+        workType = this.$t('压力管道');
+      }else if (fileType === "byxworklicense-pguaeu"){
+        workType = '';
+      }
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = this.$t('附件') ;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList (){
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf(){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    handleDownloadZip(type) {
+      const ids = this.ids;
+      this.downloadForm.id = ids.join(',')
+      this.downloadForm.type = type
+      downloadFileZip(this.downloadForm).then(response => {
+        // 创建临时链接
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement('a');
+        link.href = url;
+        link.setAttribute('download', '文件.zip'); // 和后端返回的文件名一致
+        document.body.appendChild(link);
+
+        // 模拟点击下载
+        link.click();
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress2(event, file, fileList) {
+      this.uploadFile.fileList = fileList;
+      this.uploadFile.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess2(response, file, fileList) {
+      if (response.code == 200) {
+        this.msgSuccess("导入成功");
+        this.$refs.uploadFile.clearFiles();
+        this.uploadFile.open = false
+      }
+    },
+    handleFileChange(file, fileList) {
+      console.log('文件变动:', file);
+      console.log(fileList)
+      this.fileList = fileList; // 更新文件列表
+      console.log(this.fileList)
+    },
+    // 提交上传文件
+    submitFileForm2() {  // 导入
+      let formData = new FormData();  //  用FormData存放上传文件
+      console.log(this.fileList)
+      this.fileList.forEach(file => {
+        formData.append('file', file.raw)
+      })
+      formData.append("plantCode", this.uploadFile.plantCode)
+      formData.append("fileType", this.uploadFile.fileType)
+      // importCase是上传接口
+      importFiles(formData).then((res) => {
+        this.fullscreenLoading = true
+        //手动上传无法触发成功或失败的钩子函数,因此这里手动调用
+        if (res.code == 200) {
+          this.msgSuccess("导入成功");
+          this.$refs.uploadFile.clearFiles();
+          this.uploadFile.open = false
+          this.getList();
+        }
+        this.fullscreenLoading = false
+      }, (err) => {
+
+      })
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
   }
 };
 </script>

+ 31 - 43
ui/src/views/sems/specYlrq/index.vue

@@ -188,14 +188,15 @@
         </el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDownloadZip"
-        >文件下载
-        </el-button>
+        <el-dropdown trigger="click" @command="handleDownloadZip">
+          <el-button type="warning" :disabled="multiple">
+            文件下载<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="info" >注册登记资料</el-dropdown-item>
+            <el-dropdown-item command="report" >全面检验报告</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -295,7 +296,6 @@
               @click="handleDoc(scope.row , 'sems-ylrq-info')"
               circle>
             </el-button>
-
           </el-badge>
         </template>
       </u-table-column>
@@ -310,7 +310,6 @@
           <el-button  icon="el-icon-folder"
                       size="small"
                style="color:#6e96fa;" @click="handleDoc(scope.row , 'sems-ylrq-report')" circle></el-button>
-
           </el-badge>
         </template>
       </u-table-column>
@@ -825,6 +824,7 @@
         :on-success="handleFileSuccess2"
         :on-change="handleFileChange"
         :auto-upload="false"
+        ref="uploadFile"
         drag
         multiple
       >
@@ -833,12 +833,12 @@
           {{ $t('将文件拖到此处,或') }}
           <em>{{ $t('点击上传') }}</em>
         </div>
-        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:文件名为 位号_XXXXX.xxx') }}</div>
 
       </el-upload>
       <div slot="footer" class="dialog-footer">
         <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
-        <el-button type="primary" @click="submitFileForm2" v-loading.fullscreen.lock="fullscreenLoading">{{
+        <el-button type="primary" @click="submitFileForm2" :loading="fullscreenLoading">{{
             $t('确定')
           }}
         </el-button>
@@ -847,7 +847,7 @@
     </el-dialog>
     <!-- 报告附件对话框 -->
     <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
-      <el-upload v-hasPermi="['training:trainingrecords:file']"
+      <el-upload
                  ref="doc"
                  :limit="50"
                  :headers="doc.headers"
@@ -874,18 +874,6 @@
         </el-table-column>
         <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
         <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
-        <!--        <el-table-column :label="$t('培训日期')" align="center" prop="pDate"  width="150">-->
-        <!--          <template slot-scope="scope">-->
-        <!--            <el-date-picker-->
-        <!--              v-if="scope.row.isEdit"-->
-        <!--              v-model="scope.row.pDate"-->
-        <!--              type="date"-->
-        <!--              value-format="yyyy-MM-dd"-->
-        <!--              placeholder="日期">-->
-        <!--            </el-date-picker>-->
-        <!--            <span v-else>{{ parseTime(scope.row.pDate, '{y}-{m}-{d}') }}</span>-->
-        <!--          </template>-->
-        <!--        </el-table-column>-->
         <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
@@ -895,9 +883,8 @@
               icon="el-icon-view"
               @click="handleSee(scope.row)"
             >{{ $t('预览') }}</el-button>
-            <el-button v-hasPermi="['training:trainingrecords:file']"  type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
+            <el-button   type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
             <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
-            <!--            <el-button v-hasPermi="['training:trainingrecords:file']" v-if="!scope.row.isEdit" @click="edit(scope.row)" icon="el-icon-edit" type="text" size="mini">编辑</el-button>-->
             <el-button
               size="mini"
               type="text"
@@ -909,7 +896,6 @@
               type="text"
               icon="el-icon-delete"
               @click="handleDeleteDoc(scope.row)"
-              v-hasPermi="['training:trainingrecords:file']"
             >{{ $t('删除') }}</el-button>
           </template>
         </el-table-column>
@@ -1086,6 +1072,7 @@ export default {
       },
       downloadForm: {
         id: '',
+        type: ''
       },
       downloadZipAction: process.env.VUE_APP_BASE_API + '/sems/specYlrq/downloadFileZip',
       fileList: [],
@@ -1326,6 +1313,7 @@ export default {
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
+              this.$refs.deviceTable.clearSelection();
             });
 
           } else {
@@ -1515,9 +1503,10 @@ export default {
         this.msgSuccess(this.$t('删除成功'));
       })
     },
-    handleDownloadZip() {
+    handleDownloadZip(type) {
       const ids = this.ids;
       this.downloadForm.id = ids.join(',')
+      this.downloadForm.type = type
       downloadFileZip(this.downloadForm).then(response => {
         // 创建临时链接
         const url = window.URL.createObjectURL(new Blob([response]));
@@ -1548,7 +1537,11 @@ export default {
     },
     // 文件上传成功处理
     handleFileSuccess2(response, file, fileList) {
-
+      if (response.code == 200) {
+        this.msgSuccess("导入成功");
+        this.$refs.uploadFile.clearFiles();
+        this.uploadFile.open = false
+      }
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
@@ -1596,8 +1589,15 @@ export default {
       formData.append("fileType", this.uploadFile.fileType)
       // importCase是上传接口
       importFiles(formData).then((res) => {
+        this.fullscreenLoading = true
         //手动上传无法触发成功或失败的钩子函数,因此这里手动调用
-
+        if (res.code == 200) {
+          this.msgSuccess("导入成功");
+          this.$refs.uploadFile.clearFiles();
+          this.uploadFile.open = false
+          this.getList();
+        }
+        this.fullscreenLoading = false
       }, (err) => {
 
       })
@@ -1650,18 +1650,6 @@ export default {
       exportSpecList(queryParams).then(response => {
         this.download(response.msg);
       })
-      // var rows = this.dataListSelections.map(item => {
-      //   return item.id
-      // })
-      // this.ids = rows
-      // if (type == 1){
-      //   this.downloadType = 1
-      // }else if (type == 2){
-      //   this.downloadType = 2
-      // }
-      // this.$nextTick(() => {
-      //   this.$refs['downloadDevForm'].submit()
-      // })
     },
     uploadUrl(uploadType) {
       return process.env.VUE_APP_BASE_API + "/sems/specYlrq/updateData"

+ 523 - 0
ui/src/views/sems/thickness/stress/index.vue

@@ -0,0 +1,523 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="材料名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入材料名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="备注" prop="remarks">
+        <el-input
+          v-model="queryParams.remarks"
+          placeholder="请输入备注"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['sems:stress:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['sems:stress:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['sems:stress:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['sems:stress:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="stressList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="材料名称" align="center" prop="name" width="150" />
+      <el-table-column label="是否不锈钢" align="center" prop="isSteel" :show-overflow-tooltip="true"/>
+      <el-table-column label="是否不锈钢" align="center" prop="isSteel" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          {{ scope.row.isSteel == 1 ? '是' : '否' }}
+        </template>
+      </el-table-column>
+      <el-table-column label="40" align="center" prop="c40" :show-overflow-tooltip="true"/>
+      <el-table-column label="65" align="center" prop="c65" :show-overflow-tooltip="true"/>
+      <el-table-column label="100" align="center" prop="c100" :show-overflow-tooltip="true"/>
+      <el-table-column label="125" align="center" prop="c125" :show-overflow-tooltip="true"/>
+      <el-table-column label="150" align="center" prop="c150" :show-overflow-tooltip="true"/>
+      <el-table-column label="175" align="center" prop="c175" :show-overflow-tooltip="true"/>
+      <el-table-column label="200" align="center" prop="c200" :show-overflow-tooltip="true"/>
+      <el-table-column label="225" align="center" prop="c225" :show-overflow-tooltip="true"/>
+      <el-table-column label="250" align="center" prop="c250" :show-overflow-tooltip="true"/>
+      <el-table-column label="275" align="center" prop="c275" :show-overflow-tooltip="true"/>
+      <el-table-column label="300" align="center" prop="c300" :show-overflow-tooltip="true"/>
+      <el-table-column label="325" align="center" prop="c325" :show-overflow-tooltip="true"/>
+      <el-table-column label="350" align="center" prop="c350" :show-overflow-tooltip="true"/>
+      <el-table-column label="375" align="center" prop="c375" :show-overflow-tooltip="true"/>
+      <el-table-column label="400" align="center" prop="c400" :show-overflow-tooltip="true"/>
+      <el-table-column label="425" align="center" prop="c425" :show-overflow-tooltip="true"/>
+      <el-table-column label="450" align="center" prop="c450" :show-overflow-tooltip="true"/>
+      <el-table-column label="475" align="center" prop="c475" :show-overflow-tooltip="true"/>
+      <el-table-column label="500" align="center" prop="c500" :show-overflow-tooltip="true"/>
+      <el-table-column label="525" align="center" prop="c525" :show-overflow-tooltip="true"/>
+      <el-table-column label="550" align="center" prop="c550" :show-overflow-tooltip="true"/>
+      <el-table-column label="575" align="center" prop="c575" :show-overflow-tooltip="true"/>
+      <el-table-column label="600" align="center" prop="c600" :show-overflow-tooltip="true"/>
+      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
+      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
+      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['sems:stress:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['sems:stress:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改材料应力对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row :gutter="20">
+          <!-- 左列 -->
+          <el-col :span="12">
+            <el-form-item label="材料名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入材料名称" />
+            </el-form-item>
+            <el-form-item label="是否不锈钢" prop="isSteel">
+              <el-select v-model="form.isSteel" placeholder="请选择是否不锈钢">
+                <el-option label="否" value="0" />
+                <el-option label="是" value="1" />
+              </el-select>
+
+            </el-form-item>
+
+            <el-form-item label="40" prop="c40">
+              <el-input v-model="form.c40" placeholder="请输入40" />
+            </el-form-item>
+            <el-form-item label="65" prop="c65">
+              <el-input v-model="form.c65" placeholder="请输入65" />
+            </el-form-item>
+            <el-form-item label="100" prop="c100">
+              <el-input v-model="form.c100" placeholder="请输入100" />
+            </el-form-item>
+            <el-form-item label="125" prop="c125">
+              <el-input v-model="form.c125" placeholder="请输入125" />
+            </el-form-item>
+            <el-form-item label="150" prop="c150">
+              <el-input v-model="form.c150" placeholder="请输入150" />
+            </el-form-item>
+            <el-form-item label="175" prop="c175">
+              <el-input v-model="form.c175" placeholder="请输入175" />
+            </el-form-item>
+            <el-form-item label="200" prop="c200">
+              <el-input v-model="form.c200" placeholder="请输入200" />
+            </el-form-item>
+            <el-form-item label="225" prop="c225">
+              <el-input v-model="form.c225" placeholder="请输入225" />
+            </el-form-item>
+            <el-form-item label="250" prop="c250">
+              <el-input v-model="form.c250" placeholder="请输入250" />
+            </el-form-item>
+            <el-form-item label="275" prop="c275">
+              <el-input v-model="form.c275" placeholder="请输入275" />
+            </el-form-item>
+            <el-form-item label="300" prop="c300">
+              <el-input v-model="form.c300" placeholder="请输入300" />
+            </el-form-item>
+          </el-col>
+
+          <!-- 右列 -->
+          <el-col :span="12">
+            <el-form-item label="325" prop="c325">
+              <el-input v-model="form.c325" placeholder="请输入325" />
+            </el-form-item>
+            <el-form-item label="350" prop="c350">
+              <el-input v-model="form.c350" placeholder="请输入350" />
+            </el-form-item>
+            <el-form-item label="375" prop="c375">
+              <el-input v-model="form.c375" placeholder="请输入375" />
+            </el-form-item>
+            <el-form-item label="400" prop="c400">
+              <el-input v-model="form.c400" placeholder="请输入400" />
+            </el-form-item>
+            <el-form-item label="425" prop="c425">
+              <el-input v-model="form.c425" placeholder="请输入425" />
+            </el-form-item>
+            <el-form-item label="450" prop="c450">
+              <el-input v-model="form.c450" placeholder="请输入450" />
+            </el-form-item>
+            <el-form-item label="475" prop="c475">
+              <el-input v-model="form.c475" placeholder="请输入475" />
+            </el-form-item>
+            <el-form-item label="500" prop="c500">
+              <el-input v-model="form.c500" placeholder="请输入500" />
+            </el-form-item>
+            <el-form-item label="525" prop="c525">
+              <el-input v-model="form.c525" placeholder="请输入525" />
+            </el-form-item>
+            <el-form-item label="550" prop="c550">
+              <el-input v-model="form.c550" placeholder="请输入550" />
+            </el-form-item>
+            <el-form-item label="575" prop="c575">
+              <el-input v-model="form.c575" placeholder="请输入575" />
+            </el-form-item>
+            <el-form-item label="600" prop="c600">
+              <el-input v-model="form.c600" placeholder="请输入600" />
+            </el-form-item>
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="form.remarks" placeholder="请输入备注" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+      <!-- 用户导入对话框 -->
+      <el-dialog :title="upload.title" :visible.sync="upload.open" width="600px" append-to-body>
+          <el-upload
+                  ref="upload"
+                  :limit="1"
+                  accept=".xlsx, .xls"
+                  :headers="upload.headers"
+                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
+                  :disabled="upload.isUploading"
+                  :on-progress="handleFileUploadProgress"
+                  :on-success="handleFileSuccess"
+                  :auto-upload="false"
+                  drag
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
+                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+              </div>
+              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitFileForm">确 定</el-button>
+              <el-button @click="upload.open = false">取 消</el-button>
+          </div>
+      </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listStress, getStress, delStress, addStress, updateStress, exportStress, importTemplate} from "@/api/sems/stress";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+export default {
+  name: "Stress",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 材料应力表格数据
+      stressList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+        // 用户导入参数
+        upload: {
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/sems/stress/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        name: null,
+        remarks: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          { required: true, message: "材料名称不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询材料应力列表 */
+    getList() {
+      this.loading = true;
+      listStress(this.queryParams).then(response => {
+        this.stressList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        c40: null,
+        c65: null,
+        c100: null,
+        c125: null,
+        c150: null,
+        c175: null,
+        c200: null,
+        c225: null,
+        c250: null,
+        c275: null,
+        c300: null,
+        c325: null,
+        c350: null,
+        c375: null,
+        c400: null,
+        c425: null,
+        c450: null,
+        c475: null,
+        c500: null,
+        c525: null,
+        c550: null,
+        c575: null,
+        c600: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        remarks: null,
+        isSteel: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加材料应力";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getStress(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改材料应力";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateStress(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addStress(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delStress(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有材料应力数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportStress(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+          importTemplate().then(response => {
+              this.download(response.msg);
+          });
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</script>

+ 29 - 1
ui/src/views/sems/thickness/thicknessData/index.vue

@@ -41,6 +41,12 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="设备类型" prop="devType">
+        <el-select v-model="queryParams.devType" placeholder="请选择设备类型" clearable size="small">
+          <el-option label="管道" value="管道" />
+          <el-option label="设备" value="设备" />
+        </el-select>
+      </el-form-item>
 
       <el-form-item :label="$t('测厚部位CML')" prop="position">
         <el-input
@@ -257,7 +263,7 @@
 
     <!-- 添加或修改定点测厚对话框 -->
     <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="open" width="70%" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
         <el-row>
           <el-col :span="6">
           <el-form-item :label="$t('装置名称')" prop="plantCode">
@@ -338,6 +344,28 @@
         </el-form-item>
           </el-col>
         </el-row>
+
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="设备类型" prop="devType">
+              <el-select v-model="form.devType" placeholder="请选择设备类型">
+                <el-option label="管道" value="管道" />
+                <el-option label="设备" value="设备" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="设计压力" prop="desPressure">
+              <el-input v-model="form.desPressure" placeholder="请输入设计压力" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="设计温度" prop="desTemp">
+              <el-input v-model="form.desTemp" placeholder="请输入设计温度" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
         <el-row>
           <el-col :span="8">
         <el-form-item :label="$t('原始壁厚(mm)')" prop="originalThickness">