Browse Source

ly 测厚

ly 5 months ago
parent
commit
7951ed6847

+ 121 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureLoopController.java

@@ -0,0 +1,121 @@
+package com.ruoyi.project.sems.controller;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.sems.domain.TMeasureLoop;
+import com.ruoyi.project.sems.mapper.TMeasureLoopMapper;
+import com.ruoyi.project.sems.service.ITMeasureLoopService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 腐蚀回路图管理Controller
+ *
+ * @author ly
+ * @date 2024-12-16
+ */
+@RestController
+@RequestMapping("/sems/loop")
+public class TMeasureLoopController extends BaseController
+{
+    @Autowired
+    private ITMeasureLoopService tMeasureLoopService;
+    @Resource
+    private TMeasureLoopMapper tMeasureLoopMapper;
+    /**
+     * 查询腐蚀回路图管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('sems:loop:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TMeasureLoop tMeasureLoop)
+    {
+        startPage();
+        List<TMeasureLoop> list = tMeasureLoopService.selectTMeasureLoopList(tMeasureLoop);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询腐蚀回路图管理列表
+     */
+    @GetMapping("/getLoopByPlant")
+    public AjaxResult getLoopByPlant(TMeasureLoop tMeasureLoop)
+    {
+        List<TMeasureLoop> list = tMeasureLoopMapper.selectTMeasureLoopByPlant(tMeasureLoop);
+        return AjaxResult.success(list);
+    }
+
+    @GetMapping("/queryUrl")
+    public AjaxResult queryUrl(TMeasureLoop tMeasureLoop)
+    {
+        List<TMeasureLoop> list = tMeasureLoopService.selectTMeasureLoopUrl(tMeasureLoop);
+        if (list.size() > 0) {
+            return AjaxResult.success(list.get(0));
+        }else {
+            return AjaxResult.error("无匹配文件");
+        }
+    }
+
+    /**
+     * 导出腐蚀回路图管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('sems:loop:export')")
+    @Log(title = "腐蚀回路图管理", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TMeasureLoop tMeasureLoop)
+    {
+        List<TMeasureLoop> list = tMeasureLoopService.selectTMeasureLoopList(tMeasureLoop);
+        ExcelUtil<TMeasureLoop> util = new ExcelUtil<TMeasureLoop>(TMeasureLoop.class);
+        return util.exportExcel(list, "loop");
+    }
+
+    /**
+     * 获取腐蚀回路图管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('sems:loop:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tMeasureLoopService.selectTMeasureLoopById(id));
+    }
+
+    /**
+     * 新增腐蚀回路图管理
+     */
+    @PreAuthorize("@ss.hasPermi('sems:loop:add')")
+    @Log(title = "腐蚀回路图管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TMeasureLoop tMeasureLoop)
+    {
+        return toAjax(tMeasureLoopService.insertTMeasureLoop(tMeasureLoop));
+    }
+
+    /**
+     * 修改腐蚀回路图管理
+     */
+    @PreAuthorize("@ss.hasPermi('sems:loop:edit')")
+    @Log(title = "腐蚀回路图管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TMeasureLoop tMeasureLoop)
+    {
+        return toAjax(tMeasureLoopService.updateTMeasureLoop(tMeasureLoop));
+    }
+
+    /**
+     * 删除腐蚀回路图管理
+     */
+    @PreAuthorize("@ss.hasPermi('sems:loop:remove')")
+    @Log(title = "腐蚀回路图管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tMeasureLoopService.deleteTMeasureLoopByIds(ids));
+    }
+}

+ 43 - 45
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureThicknessController.java

@@ -1,12 +1,5 @@
 package com.ruoyi.project.sems.controller;
 
-import java.io.IOException;
-import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.document.ChartUtil;
@@ -14,12 +7,17 @@ import com.ruoyi.common.utils.document.DocumentHandler;
 import com.ruoyi.common.utils.document.PDFTemplateUtil;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.sems.domain.TMeasureRecord;
-import com.ruoyi.project.sems.domain.TSpecdevCc;
+import com.ruoyi.project.sems.domain.TMeasureThickness;
 import com.ruoyi.project.sems.service.ITMeasureRecordService;
-import com.ruoyi.project.system.domain.SysDept;
-import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.sems.service.ITMeasureThicknessService;
 import freemarker.template.Template;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
@@ -27,21 +25,19 @@ import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.jfree.data.category.DefaultCategoryDataset;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-import com.ruoyi.framework.aspectj.lang.annotation.Log;
-import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.sems.domain.TMeasureThickness;
-import com.ruoyi.project.sems.service.ITMeasureThicknessService;
-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;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * 定点测厚Controller
@@ -148,66 +144,68 @@ public class TMeasureThicknessController extends BaseController
                     } else if (j == 4) {
                         entity.setPosition(cellValue);//测厚部位CML
                     } else if (j == 5) {
+                        entity.setLoopNo(cellValue);//回路编号
+                    }else if (j == 6) {
                         entity.setMeasureNo(cellValue);//检测编号
-                    } else if (j == 6) {
-                        entity.setEquipmentName(cellValue);//设备/管线名称
                     } else if (j == 7) {
-                        entity.setMaterial(cellValue);//材质
+                        entity.setEquipmentName(cellValue);//设备/管线名称
                     } else if (j == 8) {
-                        entity.setNominalTickness(cellValue);//公称壁厚(mm)
+                        entity.setMaterial(cellValue);//材质
                     } else if (j == 9) {
-                        entity.setThicknessMin(cellValue);//最小允许壁厚(mm)
+                        entity.setNominalTickness(cellValue);//公称壁厚(mm)
                     } else if (j == 10) {
-                        entity.setStCorrosion(cellValue);//短期腐蚀速率(mm/year)
+                        entity.setThicknessMin(cellValue);//最小允许壁厚(mm)
                     } else if (j == 11) {
-                        entity.setLtCorrosion(cellValue);//长期腐蚀速率(mm/year)
+                        entity.setStCorrosion(cellValue);//短期腐蚀速率(mm/year)
                     } else if (j == 12) {
-                        entity.setMeasureCycle(cellValue);//长期腐蚀速率(mm/year)
+                        entity.setLtCorrosion(cellValue);//长期腐蚀速率(mm/year)
                     } else if (j == 13) {
+                        entity.setMeasureCycle(cellValue);//长期腐蚀速率(mm/year)
+                    } else if (j == 14) {
                         if (cellValue.length() > 3) {//下次测厚日期
                             entity.setNextWarnDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
                         }
-                    }  else if (j == 14) {
-                        entity.setInspectionMethod(cellValue);//检测方法
                     }  else if (j == 15) {
+                        entity.setInspectionMethod(cellValue);//检测方法
+                    }  else if (j == 16) {
                         entity.setCorAllowance(cellValue);//腐蚀裕度(mm)
-                    } else if (j == 16) {
-                        entity.setOriginalThickness(cellValue);//原始壁厚(mm)
                     } else if (j == 17) {
-                        entity.setMedium(cellValue);//介质
+                        entity.setOriginalThickness(cellValue);//原始壁厚(mm)
                     } else if (j == 18) {
-                        entity.setPressure(cellValue);//压力(MPa)
+                        entity.setMedium(cellValue);//介质
                     } else if (j == 19) {
-                        entity.setSpecification(cellValue); //规格
+                        entity.setPressure(cellValue);//压力(MPa)
                     } else if (j == 20) {
-                        entity.setFlowRate(cellValue);//流速(m/s)
+                        entity.setSpecification(cellValue); //规格
                     } else if (j == 21) {
+                        entity.setFlowRate(cellValue);//流速(m/s)
+                    } else if (j == 22) {
                         //温度(℃)
                          entity.setTemperature(cellValue);
-                    } else if (j == 22) {
+                    } else if (j == 23) {
                         //腐蚀类型
                         entity.setCorrosionType(cellValue);
-                    } else if (j == 23) {
+                    } else if (j == 24) {
                         entity.setAnalysis(cellValue);//原因分析
-                    }else if (j == 24) {
+                    }else if (j == 25) {
                         entity.setMethodCause(cellValue);//治理方法及依据
-                    } else if (j == 25) {
+                    } else if (j == 26) {
                         entity.setEffectTracing(cellValue); //效果跟踪
-                    }else if (j == 26) {
-                        entity.setRaiser(cellValue);//提出人
                     }else if (j == 27) {
+                        entity.setRaiser(cellValue);//提出人
+                    }else if (j == 28) {
                         if (cellValue.length() > 3) {//提出时间
                             entity.setRaiserDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
                         }
-                    }else if (j == 28) {
-                        entity.setOtherContent(cellValue);//其他检测方法内容
                     }else if (j == 29) {
-                        entity.setRecorder(cellValue);//记录人
+                        entity.setOtherContent(cellValue);//其他检测方法内容
                     }else if (j == 30) {
+                        entity.setRecorder(cellValue);//记录人
+                    }else if (j == 31) {
                         if (cellValue.length() > 3) {//记录时间
                             entity.setRecorderDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
                         }
-                    }else if (j == 31) {
+                    }else if (j == 32) {
                         entity.setRemarks(cellValue);//备注
                     }
                 }

+ 167 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TMeasureLoop.java

@@ -0,0 +1,167 @@
+package com.ruoyi.project.sems.domain;
+
+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;
+
+import java.util.Date;
+
+/**
+ * 腐蚀回路图管理对象 t_measure_loop
+ *
+ * @author ly
+ * @date 2024-12-16
+ */
+public class TMeasureLoop extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识ID */
+    private Long id;
+
+    /** 装置名称 */
+    @Excel(name = "装置名称")
+    private String plantCode;
+
+    /** 回路图编号 */
+    @Excel(name = "回路图编号")
+    private String loopNo;
+
+    /** 回路图URL */
+    @Excel(name = "回路图URL")
+    private String loopUrl;
+
+    /** 状态 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 setPlantCode(String plantCode)
+    {
+        this.plantCode = plantCode;
+    }
+
+    public String getPlantCode()
+    {
+        return plantCode;
+    }
+    public void setLoopNo(String loopNo)
+    {
+        this.loopNo = loopNo;
+    }
+
+    public String getLoopNo()
+    {
+        return loopNo;
+    }
+    public void setLoopUrl(String loopUrl)
+    {
+        this.loopUrl = loopUrl;
+    }
+
+    public String getLoopUrl()
+    {
+        return loopUrl;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("plantCode", getPlantCode())
+            .append("loopNo", getLoopNo())
+            .append("loopUrl", getLoopUrl())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("remarks", getRemarks())
+            .toString();
+    }
+}

+ 51 - 2
master/src/main/java/com/ruoyi/project/sems/domain/TMeasureThickness.java

@@ -1,7 +1,5 @@
 package com.ruoyi.project.sems.domain;
 
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -10,6 +8,8 @@ import com.ruoyi.framework.web.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import java.util.Date;
+
 /**
  * 定点测厚对象 t_measure_thickness
  *
@@ -249,6 +249,31 @@ public class TMeasureThickness extends BaseEntity
     /** 是否发送过预警 */
     private Integer isSend;
 
+    /** 安装日期 */
+
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+
+    @Excel(name = "安装日期", width = 30, dateFormat = "yyyy-MM-dd")
+
+    private Date installDate;
+
+
+
+    /** 测厚位置 */
+
+    @Excel(name = "测厚位置")
+
+    private String checkUrl;
+
+
+
+    /** 单线图 */
+
+    @Excel(name = "单线图")
+
+    private String singleUrl;
+
+
     public Date getNextWarnDate() {
         return nextWarnDate;
     }
@@ -723,6 +748,30 @@ public class TMeasureThickness extends BaseEntity
         this.loopNo = loopNo;
     }
 
+    public Date getInstallDate() {
+        return installDate;
+    }
+
+    public void setInstallDate(Date installDate) {
+        this.installDate = installDate;
+    }
+
+    public String getCheckUrl() {
+        return checkUrl;
+    }
+
+    public void setCheckUrl(String checkUrl) {
+        this.checkUrl = checkUrl;
+    }
+
+    public String getSingleUrl() {
+        return singleUrl;
+    }
+
+    public void setSingleUrl(String singleUrl) {
+        this.singleUrl = singleUrl;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 68 - 0
master/src/main/java/com/ruoyi/project/sems/mapper/TMeasureLoopMapper.java

@@ -0,0 +1,68 @@
+package com.ruoyi.project.sems.mapper;
+
+import com.ruoyi.framework.aspectj.lang.annotation.DataScopePlant;
+import com.ruoyi.project.sems.domain.TMeasureLoop;
+
+import java.util.List;
+
+/**
+ * 腐蚀回路图管理Mapper接口
+ *
+ * @author ly
+ * @date 2024-12-16
+ */
+public interface TMeasureLoopMapper
+{
+    /**
+     * 查询腐蚀回路图管理
+     *
+     * @param id 腐蚀回路图管理ID
+     * @return 腐蚀回路图管理
+     */
+    public TMeasureLoop selectTMeasureLoopById(Long id);
+
+    /**
+     * 查询腐蚀回路图管理列表
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 腐蚀回路图管理集合
+     */
+    @DataScopePlant(deptAlias = "d")
+    public List<TMeasureLoop> selectTMeasureLoopList(TMeasureLoop tMeasureLoop);
+
+    /**
+     * 新增腐蚀回路图管理
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 结果
+     */
+    public int insertTMeasureLoop(TMeasureLoop tMeasureLoop);
+
+    /**
+     * 修改腐蚀回路图管理
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 结果
+     */
+    public int updateTMeasureLoop(TMeasureLoop tMeasureLoop);
+
+    /**
+     * 删除腐蚀回路图管理
+     *
+     * @param id 腐蚀回路图管理ID
+     * @return 结果
+     */
+    public int deleteTMeasureLoopById(Long id);
+
+    /**
+     * 批量删除腐蚀回路图管理
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTMeasureLoopByIds(Long[] ids);
+
+    List<TMeasureLoop> selectTMeasureLoopUrl(TMeasureLoop tMeasureLoop);
+
+    List<TMeasureLoop> selectTMeasureLoopByPlant(TMeasureLoop tMeasureLoop);
+}

+ 64 - 0
master/src/main/java/com/ruoyi/project/sems/service/ITMeasureLoopService.java

@@ -0,0 +1,64 @@
+package com.ruoyi.project.sems.service;
+
+import com.ruoyi.project.sems.domain.TMeasureLoop;
+
+import java.util.List;
+
+/**
+ * 腐蚀回路图管理Service接口
+ *
+ * @author ly
+ * @date 2024-12-16
+ */
+public interface ITMeasureLoopService
+{
+    /**
+     * 查询腐蚀回路图管理
+     *
+     * @param id 腐蚀回路图管理ID
+     * @return 腐蚀回路图管理
+     */
+    public TMeasureLoop selectTMeasureLoopById(Long id);
+
+    /**
+     * 查询腐蚀回路图管理列表
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 腐蚀回路图管理集合
+     */
+    public List<TMeasureLoop> selectTMeasureLoopList(TMeasureLoop tMeasureLoop);
+
+    /**
+     * 新增腐蚀回路图管理
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 结果
+     */
+    public int insertTMeasureLoop(TMeasureLoop tMeasureLoop);
+
+    /**
+     * 修改腐蚀回路图管理
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 结果
+     */
+    public int updateTMeasureLoop(TMeasureLoop tMeasureLoop);
+
+    /**
+     * 批量删除腐蚀回路图管理
+     *
+     * @param ids 需要删除的腐蚀回路图管理ID
+     * @return 结果
+     */
+    public int deleteTMeasureLoopByIds(Long[] ids);
+
+    /**
+     * 删除腐蚀回路图管理信息
+     *
+     * @param id 腐蚀回路图管理ID
+     * @return 结果
+     */
+    public int deleteTMeasureLoopById(Long id);
+
+    List<TMeasureLoop> selectTMeasureLoopUrl(TMeasureLoop tMeasureLoop);
+}

+ 99 - 0
master/src/main/java/com/ruoyi/project/sems/service/impl/TMeasureLoopServiceImpl.java

@@ -0,0 +1,99 @@
+package com.ruoyi.project.sems.service.impl;
+
+import com.ruoyi.project.sems.domain.TMeasureLoop;
+import com.ruoyi.project.sems.mapper.TMeasureLoopMapper;
+import com.ruoyi.project.sems.service.ITMeasureLoopService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 腐蚀回路图管理Service业务层处理
+ *
+ * @author ly
+ * @date 2024-12-16
+ */
+@Service
+public class TMeasureLoopServiceImpl implements ITMeasureLoopService
+{
+    @Autowired
+    private TMeasureLoopMapper tMeasureLoopMapper;
+
+    /**
+     * 查询腐蚀回路图管理
+     *
+     * @param id 腐蚀回路图管理ID
+     * @return 腐蚀回路图管理
+     */
+    @Override
+    public TMeasureLoop selectTMeasureLoopById(Long id)
+    {
+        return tMeasureLoopMapper.selectTMeasureLoopById(id);
+    }
+
+    /**
+     * 查询腐蚀回路图管理列表
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 腐蚀回路图管理
+     */
+    @Override
+    public List<TMeasureLoop> selectTMeasureLoopList(TMeasureLoop tMeasureLoop)
+    {
+        return tMeasureLoopMapper.selectTMeasureLoopList(tMeasureLoop);
+    }
+
+    /**
+     * 新增腐蚀回路图管理
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 结果
+     */
+    @Override
+    public int insertTMeasureLoop(TMeasureLoop tMeasureLoop)
+    {
+        return tMeasureLoopMapper.insertTMeasureLoop(tMeasureLoop);
+    }
+
+    /**
+     * 修改腐蚀回路图管理
+     *
+     * @param tMeasureLoop 腐蚀回路图管理
+     * @return 结果
+     */
+    @Override
+    public int updateTMeasureLoop(TMeasureLoop tMeasureLoop)
+    {
+        return tMeasureLoopMapper.updateTMeasureLoop(tMeasureLoop);
+    }
+
+    /**
+     * 批量删除腐蚀回路图管理
+     *
+     * @param ids 需要删除的腐蚀回路图管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTMeasureLoopByIds(Long[] ids)
+    {
+        return tMeasureLoopMapper.deleteTMeasureLoopByIds(ids);
+    }
+
+    /**
+     * 删除腐蚀回路图管理信息
+     *
+     * @param id 腐蚀回路图管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTMeasureLoopById(Long id)
+    {
+        return tMeasureLoopMapper.deleteTMeasureLoopById(id);
+    }
+
+    @Override
+    public List<TMeasureLoop> selectTMeasureLoopUrl(TMeasureLoop tMeasureLoop) {
+        return tMeasureLoopMapper.selectTMeasureLoopUrl(tMeasureLoop);
+    }
+}

+ 3 - 3
master/src/main/resources/application.yml

@@ -13,8 +13,8 @@ ruoyi:
   profile: D:/ruoyi/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/cpms/index.html#,服务器:http://47.114.101.16:8080/cpms/index.html# https://cpms.basf-ypc.net.cn/cpms/index.html#)
   requestJumpPath: https://cpms.basf-ypc.net.cn/cpms/index.html#
-  # 图像识别地址
-  imagePath: http://1.13.182.229:7089/detection_web
+  # 图像识别地址http://1.13.182.229:7089/detection_web
+  imagePath: http://127.0.0.1:8096/detection_web
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证
@@ -203,7 +203,7 @@ gen:
   # 作者
   author: ssy
   # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
-  packageName: com.ruoyi.project.pssr # 自动去除表前缀,默认是true
+  packageName: com.ruoyi.project.sems # 自动去除表前缀,默认是true
   autoRemovePre: false
   # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
   tablePrefix: sys_

+ 117 - 0
master/src/main/resources/mybatis/sems/TMeasureLoopMapper.xml

@@ -0,0 +1,117 @@
+<?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.TMeasureLoopMapper">
+
+    <resultMap type="TMeasureLoop" id="TMeasureLoopResult">
+        <result property="id"    column="id"    />
+        <result property="plantCode"    column="plant_code"    />
+        <result property="loopNo"    column="loop_no"    />
+        <result property="loopUrl"    column="loop_url"    />
+        <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"    />
+    </resultMap>
+
+    <sql id="selectTMeasureLoopVo">
+        select d.id, d.plant_code, d.loop_no, d.loop_url, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks  from t_measure_loop d
+    </sql>
+
+    <select id="selectTMeasureLoopList" parameterType="TMeasureLoop" resultMap="TMeasureLoopResult">
+        <include refid="selectTMeasureLoopVo"/>
+        <where>
+            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
+            <if test="loopNo != null  and loopNo != ''"> and loop_no = #{loopNo}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScopePlant}
+    </select>
+
+    <select id="selectTMeasureLoopByPlant" parameterType="TMeasureLoop" resultMap="TMeasureLoopResult">
+        <include refid="selectTMeasureLoopVo"/>
+        <where>
+            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
+            <if test="loopNo != null  and loopNo != ''"> and loop_no = #{loopNo}</if>
+            and d.del_flag = 0
+        </where>
+    </select>
+
+    <select id="selectTMeasureLoopUrl" parameterType="TMeasureLoop" resultMap="TMeasureLoopResult">
+        <include refid="selectTMeasureLoopVo"/>
+        <where>
+             plant_code = #{plantCode}
+             and loop_no = #{loopNo}
+            and d.del_flag = 0
+        </where>
+    </select>
+
+
+    <select id="selectTMeasureLoopById" parameterType="Long" resultMap="TMeasureLoopResult">
+        <include refid="selectTMeasureLoopVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTMeasureLoop" parameterType="TMeasureLoop">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_measure_loop.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_measure_loop
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="plantCode != null">plant_code,</if>
+            <if test="loopNo != null">loop_no,</if>
+            <if test="loopUrl != null">loop_url,</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>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="plantCode != null">#{plantCode},</if>
+            <if test="loopNo != null">#{loopNo},</if>
+            <if test="loopUrl != null">#{loopUrl},</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>
+         </trim>
+    </insert>
+
+    <update id="updateTMeasureLoop" parameterType="TMeasureLoop">
+        update t_measure_loop
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantCode != null">plant_code = #{plantCode},</if>
+            <if test="loopNo != null">loop_no = #{loopNo},</if>
+            <if test="loopUrl != null">loop_url = #{loopUrl},</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>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTMeasureLoopById" parameterType="Long">
+        update t_measure_loop set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTMeasureLoopByIds" parameterType="String">
+        update t_measure_loop set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+</mapper>

+ 44 - 4
master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml

@@ -51,10 +51,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isSend"    column="is_send"    />
         <result property="deptName" column="dept_name" />
         <result property="loopNo"    column="loop_no"    />
+        <result property="installDate"    column="install_date"    />
+
+        <result property="checkUrl"    column="check_url"    />
+
+        <result property="singleUrl"    column="single_url"    />
+
     </resultMap>
 
     <sql id="selectTMeasureThicknessVo">
-        select d.id,d.next_warn_date, d.plant_code, d.unit_code,d.loop_no, d.tagno, d.status, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.position, d.recorder, d.recorder_date, d.equipment_name, d.material, d.cor_allowance, d.original_thickness, d.medium, d.pressure, d.specification, d.flow_rate, d.temperature, d.corrosion_type, d.inspection_method, d.photo, d.analysis, d.nominal_tickness, d.thickness_min, d.st_corrosion, d.lt_corrosion, d.est_remain, d.method_cause, d.effect_tracing, d.raiser, d.raiser_date, d.del_flag, d.location_url, d.analysis_url, d.measure_cycle, d.record_url, d.other_content ,d.measure_no, d.is_send,s.dept_name from t_measure_thickness d
+        select d.id,d.next_warn_date, d.plant_code, d.unit_code,d.loop_no, d.tagno, d.status, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.position, d.recorder, d.recorder_date, d.equipment_name, d.material, d.cor_allowance, d.original_thickness, d.medium, d.pressure, d.specification, d.flow_rate, d.temperature, d.corrosion_type, d.inspection_method, d.photo, d.analysis, d.nominal_tickness, d.thickness_min, d.st_corrosion, d.lt_corrosion, d.est_remain, d.method_cause, d.effect_tracing, d.raiser, d.raiser_date, d.del_flag, d.location_url, d.analysis_url, d.measure_cycle, d.record_url, d.other_content ,d.measure_no, d.is_send,d.install_date, d.check_url, d.single_url ,s.dept_name from t_measure_thickness d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -96,6 +102,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="measureCycle != null  and measureCycle != ''"> and measure_cycle = #{measureCycle}</if>
             <if test="recordUrl != null  and recordUrl != ''"> and record_url = #{recordUrl}</if>
             <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="searchValue != null  and searchValue != ''">
+                and
+                (plant_code like concat(concat('%', #{searchValue}), '%')
+                or unit_code like concat(concat('%', #{searchValue}), '%')
+                or remarks like concat(concat('%', #{searchValue}), '%')
+                or tagno like concat(concat('%', #{searchValue}), '%')
+                or remarks like concat(concat('%', #{searchValue}), '%')
+                or position like concat(concat('%', #{searchValue}), '%')
+                or recorder like concat(concat('%', #{searchValue}), '%')
+                or equipment_name like concat(concat('%', #{searchValue}), '%')
+                or material like concat(concat('%', #{searchValue}), '%')
+                or cor_allowance like concat(concat('%', #{searchValue}), '%')
+                or original_thickness like concat(concat('%', #{searchValue}), '%')
+                or medium like concat(concat('%', #{searchValue}), '%')
+                or pressure like concat(concat('%', #{searchValue}), '%')
+                or specification like concat(concat('%', #{searchValue}), '%')
+                or flow_rate like concat(concat('%', #{searchValue}), '%')
+                or temperature like concat(concat('%', #{searchValue}), '%')
+                )
+            </if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -177,8 +205,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="recordUrl != null">record_url,</if>
             <if test="otherContent != null and otherContent != ''">other_content,</if>
             <if test="measureNo != null">measure_no,</if>
+            <if test="loopNo != null">loop_no,</if>
             <if test="nextWarnDate != null">next_warn_date,</if>
-         </trim>
+            <if test="installDate != null">install_date,</if>
+            <if test="checkUrl != null">check_url,</if>
+            <if test="singleUrl != null">single_url,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
@@ -222,8 +254,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="recordUrl != null">#{recordUrl},</if>
             <if test="otherContent != null and otherContent != ''">#{otherContent},</if>
             <if test="measureNo != null">#{measureNo},</if>
+            <if test="loopNo != null">#{loopNo},</if>
             <if test="nextWarnDate != null">#{nextWarnDate},</if>
-         </trim>
+            <if test="installDate != null">#{installDate},</if>
+            <if test="checkUrl != null">#{checkUrl},</if>
+            <if test="singleUrl != null">#{singleUrl},</if>
+        </trim>
     </insert>
 
     <update id="updateTMeasureThickness" parameterType="TMeasureThickness">
@@ -270,9 +306,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="recordUrl != null">record_url = #{recordUrl},</if>
             <if test="otherContent != null and otherContent != ''">other_content = #{otherContent},</if>
             <if test="measureNo != null">measure_no = #{measureNo},</if>
+            <if test="loopNo != null">loop_no = #{loopNo},</if>
             <if test="nextWarnDate != null">next_warn_date = #{nextWarnDate},</if>
             <if test="isSend != null">is_send = #{isSend},</if>
-            </trim>
+            <if test="installDate != null">install_date = #{installDate},</if>
+            <if test="checkUrl != null">check_url = #{checkUrl},</if>
+            <if test="singleUrl != null">single_url = #{singleUrl},</if>
+        </trim>
         where id = #{id}
     </update>
 

BIN
master/src/main/resources/static/template/sems/thicknessData.xlsx


+ 72 - 0
ui/src/api/sems/measure-loop.js

@@ -0,0 +1,72 @@
+import request from '@/utils/request'
+
+// 查询腐蚀回路图管理列表
+export function listLoop(query) {
+  return request({
+    url: '/sems/loop/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function getLoopByPlant(query) {
+  return request({
+    url: '/sems/loop/getLoopByPlant',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询腐蚀回路图
+export function queryUrl(query) {
+  return request({
+    url: '/sems/loop/queryUrl',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询腐蚀回路图管理详细
+export function getLoop(id) {
+  return request({
+    url: '/sems/loop/' + id,
+    method: 'get'
+  })
+}
+
+// 新增腐蚀回路图管理
+export function addLoop(data) {
+  return request({
+    url: '/sems/loop',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改腐蚀回路图管理
+export function updateLoop(data) {
+  return request({
+    url: '/sems/loop',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除腐蚀回路图管理
+export function delLoop(id) {
+  return request({
+    url: '/sems/loop/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出腐蚀回路图管理
+export function exportLoop(query) {
+  return request({
+    url: '/sems/loop/export',
+    method: 'get',
+    params: query
+  })
+}

+ 15 - 0
ui/src/views/sems/reportYlgd/yearapprove.vue

@@ -235,6 +235,21 @@ export default {
         ],
         content: [
           { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        inspectorOne: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        inspectorTwo: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        inspectorThree: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        auditor: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        approver: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
         ]
       },
       approveOption: [],

+ 15 - 0
ui/src/views/sems/reportYlrq/yearapprove.vue

@@ -526,6 +526,21 @@ export default {
         ],
         content: [
           { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        inspectorOne: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        inspectorTwo: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        inspectorThree: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        auditor: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        approver: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
         ]
       },
       approveOption: [],

+ 120 - 130
ui/src/views/sems/thickness/index.vue

@@ -1,14 +1,26 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
       <el-form-item :label="$t('装置名称')" prop="plantCode">
-        <el-input
-          v-model="queryParams.plantCode"
-          :placeholder="$t('请输入') + $t('装置名称')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
+        <el-select v-model="queryParams.plantCode" @change="handleLoop" :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>
+      </el-form-item>
+      <el-form-item :label="$t('腐蚀回路图')" prop="loopNo">
+        <el-select v-model="queryParams.loopNo" @change="handleQuery" placeholder="请选择腐蚀回路图号" filterable clearable size="small">
+          <el-option
+            v-for="dict in loopOptions"
+            :key="dict.loopNo"
+            :label="dict.loopNo"
+            :value="dict.loopNo"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item :label="$t('单元名称')" prop="unitCode">
         <el-input
@@ -19,15 +31,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item :label="$t('腐蚀回路图')" prop="loopNo">
-        <el-input
-          v-model="queryParams.loopNo"
-          :placeholder="$t('请输入') + $t('腐蚀回路图号')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+
       <el-form-item :label="$t('单位内编号')" prop="tagno">
         <el-input
           v-model="queryParams.tagno"
@@ -47,108 +51,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item :label="$t('记录人')" prop="recorder">
-        <el-input
-          v-model="queryParams.recorder"
-          :placeholder="$t('请输入') + $t('记录人')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('记录时间')" prop="recorderDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.recorderDate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          :placeholder="$t('请选择') + $t('记录时间')">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item :label="$t('设备/管线名称')" prop="equipmentName">
-        <el-input
-          v-model="queryParams.equipmentName"
-          :placeholder="$t('请输入') + $t('设备/管线名称')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('材质')" prop="material">
-        <el-input
-          v-model="queryParams.material"
-          :placeholder="$t('请输入') + $t('材质')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('腐蚀裕度(mm)')" prop="corAllowance">
-        <el-input
-          v-model="queryParams.corAllowance"
-          :placeholder="$t('请输入') + $t('腐蚀裕度(mm)')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('原始壁厚(mm)')" prop="originalThickness">
-        <el-input
-          v-model="queryParams.originalThickness"
-          :placeholder="$t('请输入') + $t('原始壁厚(mm)')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('介质')" prop="medium">
-        <el-input
-          v-model="queryParams.medium"
-          :placeholder="$t('请输入') + $t('介质')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('压力(MPa)')" prop="pressure">
-        <el-input
-          v-model="queryParams.pressure"
-          :placeholder="$t('请输入') + $t('压力(MPa)')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('规格')" prop="specification">
+      <el-form-item :label="$t('关键字')" prop="searchValue" label-width="50">
         <el-input
-          v-model="queryParams.specification"
-          :placeholder="$t('请输入') + $t('规格')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('流速(m/s)')" prop="flowRate">
-        <el-input
-          v-model="queryParams.flowRate"
-          :placeholder="$t('请输入') + $t('流速(m/s)')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('温度(℃)')" prop="temperature">
-        <el-input
-          v-model="queryParams.temperature"
-          :placeholder="$t('请输入') + $t('温度(℃)')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('公称壁厚(mm)')" prop="nominalTickness">
-        <el-input
-          v-model="queryParams.nominalTickness"
-          :placeholder="$t('请输入') + $t('公称壁厚(mm)')"
+          v-model="queryParams.searchValue"
+          :placeholder="$t('请输入') + $t('关键字')"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -231,7 +137,7 @@
       <el-table-column :label="$t('单元名称')" align="center" prop="unitCode" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('腐蚀回路图号')" align="center" prop="loopNo" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <a style="color: #0000ff; text-decoration: underline;" :href="scope.row.loopNo"> {{ scope.row.loopNo }} </a>
+          <a style="text-decoration: underline;" class="link-type" @click="handleSee(scope.row)" > {{ scope.row.loopNo }} </a>
         </template>
       </el-table-column>
 
@@ -269,7 +175,7 @@
         :label="$t('测厚周期(月)')">
       </el-table-column>
       <el-table-column
-        prop="firstMeasureDate"
+        prop="installDate"
         header-align="center"
         align="center"
         :label="$t('安装日期')">
@@ -332,10 +238,10 @@
     />
 
     <!-- 添加或修改定点测厚对话框 -->
-    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="open" width="1200" append-to-body>
+    <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-row>
-          <el-col :span="8">
+          <el-col :span="6">
           <el-form-item :label="$t('装置名称')" prop="plantCode">
             <el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置')" filterable clearable size="small">
               <el-option
@@ -347,33 +253,50 @@
             </el-select>
           </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="6">
           <el-form-item :label="$t('单元名称')" prop="unitCode">
             <el-input v-model="form.unitCode" :placeholder="$t('请输入') + $t('单元名称')" />
           </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="6">
+            <el-form-item label="腐蚀回路图号" prop="loopNo">
+              <el-input v-model="form.loopNo" placeholder="请输入腐蚀回路图号" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
           <el-form-item :label="$t('单位内编号')" prop="tagno">
             <el-input v-model="form.tagno" :placeholder="$t('请输入') + $t('单位内编号')" />
           </el-form-item>
           </el-col>
       </el-row>
         <el-row>
-          <el-col :span="8">
+          <el-col :span="6">
             <el-form-item :label="$t('测厚部位CML')" prop="position">
               <el-input v-model="form.position" :placeholder="$t('请输入') + $t('测厚部位CML')" />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="6">
+            <el-form-item :label="$t('安装日期')" prop="installDate" >
+              <el-date-picker clearable size="mini"
+                              style="width: 100%;"
+                              v-model="form.installDate"
+                              type="date"
+                              value-format="yyyy-MM-dd"
+                              :placeholder="$t('请选择') + $t('安装日期')">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
             <el-form-item :label="$t('记录人')" prop="recorder">
               <el-input v-model="form.recorder" :placeholder="$t('请输入') + $t('记录人')" />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
-            <el-form-item :label="$t('记录时间')" prop="recorderDate">
-              <el-date-picker clearable size="small" style="width: 119.85px"
+          <el-col :span="6">
+            <el-form-item :label="$t('记录时间')" prop="recorderDate" >
+              <el-date-picker clearable size="mini"
                               v-model="form.recorderDate"
                               type="date"
+                              style="width: 100%;"
                               value-format="yyyy-MM-dd"
                               :placeholder="$t('请选择') + $t('记录时间')">
               </el-date-picker>
@@ -441,6 +364,24 @@
             >{{dict.dictLabel}}</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item :label="$t('测厚位置')"  prop="checkUrl">
+          <el-upload
+            :action="check.url"
+            :headers="check.headers"
+            :file-list="locationList"
+            :limit="3"
+            :on-success="handleAvatarSuccess"
+            :on-exceed="handleExceed"
+            :before-upload="beforeAvatarUpload"
+            list-type="picture-card"
+            :on-preview="handlePictureCardPreview"
+            :on-remove="handleRemove">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
+            <img width="100%" :src="dialogImageUrl" alt="">
+          </el-dialog>
+        </el-form-item>
         <el-form-item :label="$t('腐蚀位置')"  prop="locationUrl">
           <el-upload
             :action="locationpic.url"
@@ -939,6 +880,15 @@
         <input name="type" :value="upload.type" hidden/>
       </form>
     </el-dialog>
+    <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>
     <record v-if="recordVisible" ref="record" @refreshDataList="getList" :showFlag="showFlag" @closeChildDialog="closeChildDialog"></record>
   </div>
 </template>
@@ -954,6 +904,7 @@ import request from "@/utils/request";
 import record from './record'
 import {listMeasurerecord} from "@/api/sems/measure-record";
 import {listPlant, mylistPlant} from "@/api/system/plant";
+import {queryUrl ,getLoopByPlant} from "@/api/sems/measure-loop";
 
 export default {
   name: "Thickness",
@@ -991,6 +942,7 @@ export default {
       inspectionMethodOptions: [],
       statusOptions:[],
       plantOptions: [],
+      loopOptions: [],
       // 用户导入参数
       upload: {
           //模板下载路由
@@ -1034,6 +986,14 @@ export default {
         key: ''
       },
       downloadAction: process.env.VUE_APP_BASE_API +'/sems/thickness/measure/exportPDF',
+      check: {
+        imageUrl: '',
+        fileList: [],
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/thickness/uploadFile",
+      },
       locationpic: {
         imageUrl: '',
         fileList: [],
@@ -1070,6 +1030,15 @@ export default {
         pType: 'traning',
         pId: null
       },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
       locationList: [],
       photoList: [],
       dialogImageUrl: '',
@@ -1331,6 +1300,14 @@ export default {
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
+    handleLoop(val){
+      let paramLoop = {
+        plantCode: val,
+      }
+      getLoopByPlant(paramLoop).then(response => {
+        this.loopOptions = response.data;
+      });
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
@@ -1596,7 +1573,20 @@ export default {
         return "color: rgba(255, 26, 26, 0.98) "
       }
     },
-
+    handleSee(row) {
+        let paramLoop = {
+          plantCode: row.plantCode,
+          loopNo: row.loopNo
+      }
+      queryUrl(paramLoop).then(response => {
+        this.pdf.open = true
+        this.pdf.title = response.data.loopNo
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + response.data.loopUrl
+      });
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
   }
 };
 </script>

+ 449 - 0
ui/src/views/sems/thickness/loop/index.vue

@@ -0,0 +1,449 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="装置名称" prop="plantCode">
+        <el-input
+          v-model="queryParams.plantCode"
+          placeholder="请输入装置名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="回路图编号" prop="loopNo">
+        <el-input
+          v-model="queryParams.loopNo"
+          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:loop: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:loop: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:loop:remove']"
+        >删除</el-button>
+      </el-col>
+
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="loopList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="装置名称" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
+      <el-table-column label="回路图编号" align="center" prop="loopNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="回路图" align="center" prop="loopUrl" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <a style=" text-decoration: underline;" class="link-type" @click="handleSee(scope.row)">
+            <span>{{ scope.row.loopNo }}</span>
+          </a>
+        </template>
+      </el-table-column>
+      <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="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:loop:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['sems:loop: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-form-item :label="$t('装置名称')" prop="plantCode">
+          <el-select v-model="form.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>
+        </el-form-item>
+        <el-form-item label="回路图编号" prop="loopNo">
+          <el-input v-model="form.loopNo" placeholder="请输入回路图编号" />
+        </el-form-item>
+
+        <el-form-item label="回路图" prop="loopUrl" >
+          <el-upload
+            ref="doc"
+            :headers="doc.headers"
+            :action="doc.url"
+            :disabled="doc.isUploading"
+            :on-progress="handleFileDocProgress"
+            :on-success="handleFileDocSuccess"
+            :on-remove="handleRemove"
+            :auto-upload="true"
+            multiple
+            drag
+          >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">
+              {{ $t('将文件拖到此处,或') }}
+              <em>{{ $t('点击上传') }}</em>
+            </div>
+          </el-upload>
+        </el-form-item>
+
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </el-form-item>
+
+      </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 :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>
+</template>
+
+<script>
+import { listLoop, getLoop, delLoop, addLoop, updateLoop, exportLoop, importTemplate} from "@/api/sems/measure-loop";
+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";
+import {mylistPlant} from "@/api/system/plant";
+
+export default {
+  name: "Loop",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 腐蚀回路图管理表格数据
+      loopList: [],
+      plantOptions: [],
+      // 弹出层标题
+      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/loop/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        plantCode: null,
+        loopNo: null,
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    let plantParams = {
+      pType: 1
+    }
+    mylistPlant(plantParams).then(response => {
+      this.plantOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询腐蚀回路图管理列表 */
+    getList() {
+      this.loading = true;
+      listLoop(this.queryParams).then(response => {
+        this.loopList = 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,
+        plantCode: null,
+        loopNo: null,
+        loopUrl: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        remarks: 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
+      getLoop(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) {
+            updateLoop(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLoop(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 delLoop(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有腐蚀回路图管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportLoop(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) {
+          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();
+      },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+    },
+    handleRemove (file, fileList) {
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file) {
+        console.log(response)
+      console.log(file)
+      if (response.code == 200){
+        this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        this.form.loopUrl = response.msg
+      }else {
+        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }
+    },
+    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.loopNo
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.loopUrl
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+  }
+};
+</script>