Ver Fonte

-添加仪器管理台账
-添加标准气体管理台账
-添加检测仪器标准台账

jiangbiao há 2 anos atrás
pai
commit
5a63ef2dc1

+ 104 - 0
master/src/main/java/com/ruoyi/project/check/controller/TCheckCalibrationController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.project.check.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.project.check.domain.TCheckCalibration;
+import com.ruoyi.project.check.service.ITCheckCalibrationService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 检测仪器校准Controller
+ * 
+ * @author ruoyi
+ * @date 2022-11-23
+ */
+@RestController
+@RequestMapping("/check/calibration")
+public class TCheckCalibrationController extends BaseController
+{
+    @Autowired
+    private ITCheckCalibrationService tCheckCalibrationService;
+
+    /**
+     * 查询检测仪器校准列表
+     */
+    @PreAuthorize("@ss.hasPermi('check:calibration:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TCheckCalibration tCheckCalibration)
+    {
+        startPage();
+        List<TCheckCalibration> list = tCheckCalibrationService.selectTCheckCalibrationList(tCheckCalibration);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出检测仪器校准列表
+     */
+    @PreAuthorize("@ss.hasPermi('check:calibration:export')")
+    @Log(title = "检测仪器校准", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TCheckCalibration tCheckCalibration)
+    {
+        List<TCheckCalibration> list = tCheckCalibrationService.selectTCheckCalibrationList(tCheckCalibration);
+        ExcelUtil<TCheckCalibration> util = new ExcelUtil<TCheckCalibration>(TCheckCalibration.class);
+        util.exportExcel(response, list, "检测仪器校准数据");
+    }
+
+    /**
+     * 获取检测仪器校准详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('check:calibration:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tCheckCalibrationService.selectTCheckCalibrationById(id));
+    }
+
+    /**
+     * 新增检测仪器校准
+     */
+    @PreAuthorize("@ss.hasPermi('check:calibration:add')")
+    @Log(title = "检测仪器校准", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TCheckCalibration tCheckCalibration)
+    {
+        return toAjax(tCheckCalibrationService.insertTCheckCalibration(tCheckCalibration));
+    }
+
+    /**
+     * 修改检测仪器校准
+     */
+    @PreAuthorize("@ss.hasPermi('check:calibration:edit')")
+    @Log(title = "检测仪器校准", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TCheckCalibration tCheckCalibration)
+    {
+        return toAjax(tCheckCalibrationService.updateTCheckCalibration(tCheckCalibration));
+    }
+
+    /**
+     * 删除检测仪器校准
+     */
+    @PreAuthorize("@ss.hasPermi('check:calibration:remove')")
+    @Log(title = "检测仪器校准", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tCheckCalibrationService.deleteTCheckCalibrationByIds(ids));
+    }
+}

+ 6 - 0
master/src/main/java/com/ruoyi/project/check/controller/TCheckStandardgasesController.java

@@ -47,6 +47,12 @@ public class TCheckStandardgasesController extends BaseController
         return getDataTable(list);
     }
 
+    @GetMapping("/allStandardgases")
+    public AjaxResult allStandardgases()
+    {
+        return AjaxResult.success(tCheckStandardgasesService.selectAllStandardgases());
+    }
+
     /**
      * 导出标准气体列表
      */

+ 376 - 0
master/src/main/java/com/ruoyi/project/check/domain/TCheckCalibration.java

@@ -0,0 +1,376 @@
+package com.ruoyi.project.check.domain;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 检测仪器校准对象 t_check_calibration
+ *
+ * @author ruoyi
+ * @date 2022-11-23
+ */
+public class TCheckCalibration extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识id */
+    private Long id;
+
+    /** 校准时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "校准时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date calibrationTime;
+
+    /** 校准人员 */
+    @Excel(name = "校准人员")
+    private String calibrationUser;
+
+    /** 仪器id */
+    @Excel(name = "仪器id")
+    private Long instrumentId;
+
+    /** 标气id */
+    @Excel(name = "标气id")
+    private Long standardgasesId;
+
+    /** 零气浓度值 */
+    @Excel(name = "零气浓度值")
+    private String zerogasConcentration;
+
+    /** 零气校准值 */
+    @Excel(name = "零气校准值")
+    private String zerogasCalibration;
+
+    /** 标气校准值 */
+    @Excel(name = "标气校准值")
+    private String standardgasesCalibration;
+
+    /** 漂移核查值 */
+    @Excel(name = "漂移核查值")
+    private String driftCheck;
+
+    /** 过滤片检查 */
+    @Excel(name = "过滤片检查")
+    private String filterCheck;
+
+    /** 气密性检查 */
+    @Excel(name = "气密性检查")
+    private String airtightnessCheck;
+
+    /** 流量检查 */
+    @Excel(name = "流量检查")
+    private String flowCheck;
+
+    /** 气体钢瓶压力 */
+    @Excel(name = "气体钢瓶压力")
+    private String pressure;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    /** 状态 1 :正常 ;0:删除 */
+    private Integer delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private Long createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private Long updaterCode;
+
+    @TableField(exist = false)
+    private String standardgasesConcentration;
+
+    @TableField(exist = false)
+    private String standardgasesLifespan;
+
+    @TableField(exist = false)
+    private String standardgasesName;
+
+    @TableField(exist = false)
+    private String instrumentCode;
+
+    @TableField(exist = false)
+    private String instrumentName;
+
+    @TableField(exist = false)
+    private String instrumentType;
+
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    public String getStandardgasesConcentration() {
+        return standardgasesConcentration;
+    }
+
+    public void setStandardgasesConcentration(String standardgasesConcentration) {
+        this.standardgasesConcentration = standardgasesConcentration;
+    }
+
+    public String getstandardgasesLifespan() {
+        return standardgasesLifespan;
+    }
+
+    public void setstandardgasesLifespan(String standardgasesLifespan) {
+        this.standardgasesLifespan = standardgasesLifespan;
+    }
+
+    public String getStandardgasesName() {
+        return standardgasesName;
+    }
+
+    public void setStandardgasesName(String standardgasesName) {
+        this.standardgasesName = standardgasesName;
+    }
+
+    public String getInstrumentCode() {
+        return instrumentCode;
+    }
+
+    public void setInstrumentCode(String instrumentCode) {
+        this.instrumentCode = instrumentCode;
+    }
+
+    public String getInstrumentName() {
+        return instrumentName;
+    }
+
+    public void setInstrumentName(String instrumentName) {
+        this.instrumentName = instrumentName;
+    }
+
+    public String getInstrumentType() {
+        return instrumentType;
+    }
+
+    public void setInstrumentType(String instrumentType) {
+        this.instrumentType = instrumentType;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setCalibrationTime(Date calibrationTime)
+    {
+        this.calibrationTime = calibrationTime;
+    }
+
+    public Date getCalibrationTime()
+    {
+        return calibrationTime;
+    }
+    public void setCalibrationUser(String calibrationUser)
+    {
+        this.calibrationUser = calibrationUser;
+    }
+
+    public String getCalibrationUser()
+    {
+        return calibrationUser;
+    }
+    public void setInstrumentId(Long instrumentId)
+    {
+        this.instrumentId = instrumentId;
+    }
+
+    public Long getInstrumentId()
+    {
+        return instrumentId;
+    }
+    public void setStandardgasesId(Long standardgasesId)
+    {
+        this.standardgasesId = standardgasesId;
+    }
+
+    public Long getStandardgasesId()
+    {
+        return standardgasesId;
+    }
+    public void setZerogasConcentration(String zerogasConcentration)
+    {
+        this.zerogasConcentration = zerogasConcentration;
+    }
+
+    public String getZerogasConcentration()
+    {
+        return zerogasConcentration;
+    }
+    public void setZerogasCalibration(String zerogasCalibration)
+    {
+        this.zerogasCalibration = zerogasCalibration;
+    }
+
+    public String getZerogasCalibration()
+    {
+        return zerogasCalibration;
+    }
+    public void setStandardgasesCalibration(String standardgasesCalibration)
+    {
+        this.standardgasesCalibration = standardgasesCalibration;
+    }
+
+    public String getStandardgasesCalibration()
+    {
+        return standardgasesCalibration;
+    }
+    public void setDriftCheck(String driftCheck)
+    {
+        this.driftCheck = driftCheck;
+    }
+
+    public String getDriftCheck()
+    {
+        return driftCheck;
+    }
+    public void setFilterCheck(String filterCheck)
+    {
+        this.filterCheck = filterCheck;
+    }
+
+    public String getFilterCheck()
+    {
+        return filterCheck;
+    }
+    public void setAirtightnessCheck(String airtightnessCheck)
+    {
+        this.airtightnessCheck = airtightnessCheck;
+    }
+
+    public String getAirtightnessCheck()
+    {
+        return airtightnessCheck;
+    }
+    public void setFlowCheck(String flowCheck)
+    {
+        this.flowCheck = flowCheck;
+    }
+
+    public String getFlowCheck()
+    {
+        return flowCheck;
+    }
+    public void setPressure(String pressure)
+    {
+        this.pressure = pressure;
+    }
+
+    public String getPressure()
+    {
+        return pressure;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setDelFlag(Integer delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Integer 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;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("calibrationTime", getCalibrationTime())
+            .append("calibrationUser", getCalibrationUser())
+            .append("instrumentId", getInstrumentId())
+            .append("standardgasesId", getStandardgasesId())
+            .append("zerogasConcentration", getZerogasConcentration())
+            .append("zerogasCalibration", getZerogasCalibration())
+            .append("standardgasesCalibration", getStandardgasesCalibration())
+            .append("driftCheck", getDriftCheck())
+            .append("filterCheck", getFilterCheck())
+            .append("airtightnessCheck", getAirtightnessCheck())
+            .append("flowCheck", getFlowCheck())
+            .append("pressure", getPressure())
+            .append("remarks", getRemarks())
+            .append("deptId", getDeptId())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .toString();
+    }
+}

+ 17 - 4
master/src/main/java/com/ruoyi/project/check/domain/TCheckStandardgases.java

@@ -1,6 +1,8 @@
 package com.ruoyi.project.check.domain;
 
 import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -33,8 +35,9 @@ public class TCheckStandardgases extends BaseEntity
     private String concentration;
 
     /** 标准气体有效期 */
-    @Excel(name = "标准气体有效期")
-    private String lifespan;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "标准气体有效期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date lifespan;
 
     /** 生产厂家 */
     @Excel(name = "生产厂家")
@@ -68,6 +71,16 @@ public class TCheckStandardgases extends BaseEntity
     @Excel(name = "修改人")
     private Long updaterCode;
     private String  updater;
+    @TableField(exist= false)
+    private String  describe;
+
+    public String getDescribe() {
+        return describe;
+    }
+
+    public void setDescribe(String describe) {
+        this.describe = describe;
+    }
 
     public String getUpdater() {
         return updater;
@@ -118,12 +131,12 @@ public class TCheckStandardgases extends BaseEntity
     {
         return concentration;
     }
-    public void setLifespan(String lifespan)
+    public void setLifespan(Date lifespan)
     {
         this.lifespan = lifespan;
     }
 
-    public String getLifespan()
+    public Date getLifespan()
     {
         return lifespan;
     }

+ 61 - 0
master/src/main/java/com/ruoyi/project/check/mapper/TCheckCalibrationMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.check.mapper;
+
+import java.util.List;
+import com.ruoyi.project.check.domain.TCheckCalibration;
+
+/**
+ * 检测仪器校准Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-11-23
+ */
+public interface TCheckCalibrationMapper 
+{
+    /**
+     * 查询检测仪器校准
+     * 
+     * @param id 检测仪器校准主键
+     * @return 检测仪器校准
+     */
+    public TCheckCalibration selectTCheckCalibrationById(Long id);
+
+    /**
+     * 查询检测仪器校准列表
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 检测仪器校准集合
+     */
+    public List<TCheckCalibration> selectTCheckCalibrationList(TCheckCalibration tCheckCalibration);
+
+    /**
+     * 新增检测仪器校准
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 结果
+     */
+    public int insertTCheckCalibration(TCheckCalibration tCheckCalibration);
+
+    /**
+     * 修改检测仪器校准
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 结果
+     */
+    public int updateTCheckCalibration(TCheckCalibration tCheckCalibration);
+
+    /**
+     * 删除检测仪器校准
+     * 
+     * @param id 检测仪器校准主键
+     * @return 结果
+     */
+    public int deleteTCheckCalibrationById(Long id);
+
+    /**
+     * 批量删除检测仪器校准
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTCheckCalibrationByIds(Long[] ids);
+}

+ 9 - 8
master/src/main/java/com/ruoyi/project/check/mapper/TCheckStandardgasesMapper.java

@@ -5,15 +5,15 @@ import com.ruoyi.project.check.domain.TCheckStandardgases;
 
 /**
  * 标准气体Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2022-11-22
  */
-public interface TCheckStandardgasesMapper 
+public interface TCheckStandardgasesMapper
 {
     /**
      * 查询标准气体
-     * 
+     *
      * @param id 标准气体主键
      * @return 标准气体
      */
@@ -21,15 +21,16 @@ public interface TCheckStandardgasesMapper
 
     /**
      * 查询标准气体列表
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 标准气体集合
      */
     public List<TCheckStandardgases> selectTCheckStandardgasesList(TCheckStandardgases tCheckStandardgases);
+    public List<TCheckStandardgases> selectAllStandardgases();
 
     /**
      * 新增标准气体
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 结果
      */
@@ -37,7 +38,7 @@ public interface TCheckStandardgasesMapper
 
     /**
      * 修改标准气体
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 结果
      */
@@ -45,7 +46,7 @@ public interface TCheckStandardgasesMapper
 
     /**
      * 删除标准气体
-     * 
+     *
      * @param id 标准气体主键
      * @return 结果
      */
@@ -53,7 +54,7 @@ public interface TCheckStandardgasesMapper
 
     /**
      * 批量删除标准气体
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 61 - 0
master/src/main/java/com/ruoyi/project/check/service/ITCheckCalibrationService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.check.service;
+
+import java.util.List;
+import com.ruoyi.project.check.domain.TCheckCalibration;
+
+/**
+ * 检测仪器校准Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-11-23
+ */
+public interface ITCheckCalibrationService 
+{
+    /**
+     * 查询检测仪器校准
+     * 
+     * @param id 检测仪器校准主键
+     * @return 检测仪器校准
+     */
+    public TCheckCalibration selectTCheckCalibrationById(Long id);
+
+    /**
+     * 查询检测仪器校准列表
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 检测仪器校准集合
+     */
+    public List<TCheckCalibration> selectTCheckCalibrationList(TCheckCalibration tCheckCalibration);
+
+    /**
+     * 新增检测仪器校准
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 结果
+     */
+    public int insertTCheckCalibration(TCheckCalibration tCheckCalibration);
+
+    /**
+     * 修改检测仪器校准
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 结果
+     */
+    public int updateTCheckCalibration(TCheckCalibration tCheckCalibration);
+
+    /**
+     * 批量删除检测仪器校准
+     * 
+     * @param ids 需要删除的检测仪器校准主键集合
+     * @return 结果
+     */
+    public int deleteTCheckCalibrationByIds(Long[] ids);
+
+    /**
+     * 删除检测仪器校准信息
+     * 
+     * @param id 检测仪器校准主键
+     * @return 结果
+     */
+    public int deleteTCheckCalibrationById(Long id);
+}

+ 9 - 8
master/src/main/java/com/ruoyi/project/check/service/ITCheckStandardgasesService.java

@@ -5,15 +5,15 @@ import com.ruoyi.project.check.domain.TCheckStandardgases;
 
 /**
  * 标准气体Service接口
- * 
+ *
  * @author ruoyi
  * @date 2022-11-22
  */
-public interface ITCheckStandardgasesService 
+public interface ITCheckStandardgasesService
 {
     /**
      * 查询标准气体
-     * 
+     *
      * @param id 标准气体主键
      * @return 标准气体
      */
@@ -21,15 +21,16 @@ public interface ITCheckStandardgasesService
 
     /**
      * 查询标准气体列表
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 标准气体集合
      */
     public List<TCheckStandardgases> selectTCheckStandardgasesList(TCheckStandardgases tCheckStandardgases);
+    public List<TCheckStandardgases> selectAllStandardgases();
 
     /**
      * 新增标准气体
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 结果
      */
@@ -37,7 +38,7 @@ public interface ITCheckStandardgasesService
 
     /**
      * 修改标准气体
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 结果
      */
@@ -45,7 +46,7 @@ public interface ITCheckStandardgasesService
 
     /**
      * 批量删除标准气体
-     * 
+     *
      * @param ids 需要删除的标准气体主键集合
      * @return 结果
      */
@@ -53,7 +54,7 @@ public interface ITCheckStandardgasesService
 
     /**
      * 删除标准气体信息
-     * 
+     *
      * @param id 标准气体主键
      * @return 结果
      */

+ 93 - 0
master/src/main/java/com/ruoyi/project/check/service/impl/TCheckCalibrationServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.check.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.check.mapper.TCheckCalibrationMapper;
+import com.ruoyi.project.check.domain.TCheckCalibration;
+import com.ruoyi.project.check.service.ITCheckCalibrationService;
+
+/**
+ * 检测仪器校准Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2022-11-23
+ */
+@Service
+public class TCheckCalibrationServiceImpl implements ITCheckCalibrationService 
+{
+    @Autowired
+    private TCheckCalibrationMapper tCheckCalibrationMapper;
+
+    /**
+     * 查询检测仪器校准
+     * 
+     * @param id 检测仪器校准主键
+     * @return 检测仪器校准
+     */
+    @Override
+    public TCheckCalibration selectTCheckCalibrationById(Long id)
+    {
+        return tCheckCalibrationMapper.selectTCheckCalibrationById(id);
+    }
+
+    /**
+     * 查询检测仪器校准列表
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 检测仪器校准
+     */
+    @Override
+    public List<TCheckCalibration> selectTCheckCalibrationList(TCheckCalibration tCheckCalibration)
+    {
+        return tCheckCalibrationMapper.selectTCheckCalibrationList(tCheckCalibration);
+    }
+
+    /**
+     * 新增检测仪器校准
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 结果
+     */
+    @Override
+    public int insertTCheckCalibration(TCheckCalibration tCheckCalibration)
+    {
+        return tCheckCalibrationMapper.insertTCheckCalibration(tCheckCalibration);
+    }
+
+    /**
+     * 修改检测仪器校准
+     * 
+     * @param tCheckCalibration 检测仪器校准
+     * @return 结果
+     */
+    @Override
+    public int updateTCheckCalibration(TCheckCalibration tCheckCalibration)
+    {
+        return tCheckCalibrationMapper.updateTCheckCalibration(tCheckCalibration);
+    }
+
+    /**
+     * 批量删除检测仪器校准
+     * 
+     * @param ids 需要删除的检测仪器校准主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCheckCalibrationByIds(Long[] ids)
+    {
+        return tCheckCalibrationMapper.deleteTCheckCalibrationByIds(ids);
+    }
+
+    /**
+     * 删除检测仪器校准信息
+     * 
+     * @param id 检测仪器校准主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCheckCalibrationById(Long id)
+    {
+        return tCheckCalibrationMapper.deleteTCheckCalibrationById(id);
+    }
+}

+ 14 - 8
master/src/main/java/com/ruoyi/project/check/service/impl/TCheckStandardgasesServiceImpl.java

@@ -9,19 +9,19 @@ import com.ruoyi.project.check.service.ITCheckStandardgasesService;
 
 /**
  * 标准气体Service业务层处理
- * 
+ *
  * @author ruoyi
  * @date 2022-11-22
  */
 @Service
-public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesService 
+public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesService
 {
     @Autowired
     private TCheckStandardgasesMapper tCheckStandardgasesMapper;
 
     /**
      * 查询标准气体
-     * 
+     *
      * @param id 标准气体主键
      * @return 标准气体
      */
@@ -33,7 +33,7 @@ public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesServi
 
     /**
      * 查询标准气体列表
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 标准气体
      */
@@ -43,9 +43,15 @@ public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesServi
         return tCheckStandardgasesMapper.selectTCheckStandardgasesList(tCheckStandardgases);
     }
 
+    @Override
+    public List<TCheckStandardgases> selectAllStandardgases()
+    {
+        return tCheckStandardgasesMapper.selectAllStandardgases();
+    }
+
     /**
      * 新增标准气体
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 结果
      */
@@ -57,7 +63,7 @@ public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesServi
 
     /**
      * 修改标准气体
-     * 
+     *
      * @param tCheckStandardgases 标准气体
      * @return 结果
      */
@@ -69,7 +75,7 @@ public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesServi
 
     /**
      * 批量删除标准气体
-     * 
+     *
      * @param ids 需要删除的标准气体主键
      * @return 结果
      */
@@ -81,7 +87,7 @@ public class TCheckStandardgasesServiceImpl implements ITCheckStandardgasesServi
 
     /**
      * 删除标准气体信息
-     * 
+     *
      * @param id 标准气体主键
      * @return 结果
      */

+ 148 - 0
master/src/main/resources/mybatis/check/TCheckCalibrationMapper.xml

@@ -0,0 +1,148 @@
+<?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.check.mapper.TCheckCalibrationMapper">
+
+    <resultMap type="TCheckCalibration" id="TCheckCalibrationResult">
+        <result property="id"    column="id"    />
+        <result property="calibrationTime"    column="calibration_time"    />
+        <result property="calibrationUser"    column="calibration_user"    />
+        <result property="instrumentId"    column="instrument_id"    />
+        <result property="standardgasesId"    column="standardgases_id"    />
+        <result property="zerogasConcentration"    column="zerogas_concentration"    />
+        <result property="zerogasCalibration"    column="zerogas_calibration"    />
+        <result property="standardgasesCalibration"    column="standardgases_calibration"    />
+        <result property="driftCheck"    column="drift_check"    />
+        <result property="filterCheck"    column="filter_check"    />
+        <result property="airtightnessCheck"    column="airtightness_check"    />
+        <result property="flowCheck"    column="flow_check"    />
+        <result property="pressure"    column="pressure"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="deptId"    column="dept_id"    />
+        <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"    />
+    </resultMap>
+
+    <sql id="selectTCheckCalibrationVo">
+        select id, calibration_time, calibration_user, instrument_id, standardgases_id, zerogas_concentration, zerogas_calibration, standardgases_calibration, drift_check, filter_check, airtightness_check, flow_check, pressure, remarks, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_check_calibration
+    </sql>
+
+    <select id="selectTCheckCalibrationList" parameterType="TCheckCalibration" resultMap="TCheckCalibrationResult">
+        select d.*,ci.name instrumentName,ci.code instrumentCode,ci.model instrumentType,cs.name standardgasesName,cs.concentration standardgasesConcentration,cs.lifespan standardgasesLifespan from t_check_calibration d
+        left join t_check_instrument ci on ci.id= d.instrument_id
+        left join t_check_standardgases cs on cs.id=d.standardgases_id
+        <where>
+            <if test="calibrationTime != null "> and calibration_time = #{calibrationTime}</if>
+            <if test="calibrationUser != null  and calibrationUser != ''"> and calibration_user = #{calibrationUser}</if>
+            <if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
+            <if test="standardgasesId != null "> and standardgases_id = #{standardgasesId}</if>
+            <if test="zerogasConcentration != null  and zerogasConcentration != ''"> and zerogas_concentration = #{zerogasConcentration}</if>
+            <if test="zerogasCalibration != null  and zerogasCalibration != ''"> and zerogas_calibration = #{zerogasCalibration}</if>
+            <if test="standardgasesCalibration != null  and standardgasesCalibration != ''"> and standardgases_calibration = #{standardgasesCalibration}</if>
+            <if test="driftCheck != null  and driftCheck != ''"> and drift_check = #{driftCheck}</if>
+            <if test="filterCheck != null  and filterCheck != ''"> and filter_check = #{filterCheck}</if>
+            <if test="airtightnessCheck != null  and airtightnessCheck != ''"> and airtightness_check = #{airtightnessCheck}</if>
+            <if test="flowCheck != null  and flowCheck != ''"> and flow_check = #{flowCheck}</if>
+            <if test="pressure != null  and pressure != ''"> and pressure = #{pressure}</if>
+            <if test="remarks != null  and remarks != ''"> and d.remarks = #{remarks}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="createrCode != null "> and d.creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and d.createdate = #{createdate}</if>
+            <if test="updaterCode != null "> and d.updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
+        and d.del_flag = 0
+        </where>
+    </select>
+
+    <select id="selectTCheckCalibrationById" parameterType="Long" resultMap="TCheckCalibrationResult">
+        <include refid="selectTCheckCalibrationVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTCheckCalibration" parameterType="TCheckCalibration" useGeneratedKeys="true" keyProperty="id">
+        insert into t_check_calibration
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="calibrationTime != null">calibration_time,</if>
+            <if test="calibrationUser != null">calibration_user,</if>
+            <if test="instrumentId != null">instrument_id,</if>
+            <if test="standardgasesId != null">standardgases_id,</if>
+            <if test="zerogasConcentration != null">zerogas_concentration,</if>
+            <if test="zerogasCalibration != null">zerogas_calibration,</if>
+            <if test="standardgasesCalibration != null">standardgases_calibration,</if>
+            <if test="driftCheck != null">drift_check,</if>
+            <if test="filterCheck != null">filter_check,</if>
+            <if test="airtightnessCheck != null">airtightness_check,</if>
+            <if test="flowCheck != null">flow_check,</if>
+            <if test="pressure != null">pressure,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="deptId != null">dept_id,</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>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="calibrationTime != null">#{calibrationTime},</if>
+            <if test="calibrationUser != null">#{calibrationUser},</if>
+            <if test="instrumentId != null">#{instrumentId},</if>
+            <if test="standardgasesId != null">#{standardgasesId},</if>
+            <if test="zerogasConcentration != null">#{zerogasConcentration},</if>
+            <if test="zerogasCalibration != null">#{zerogasCalibration},</if>
+            <if test="standardgasesCalibration != null">#{standardgasesCalibration},</if>
+            <if test="driftCheck != null">#{driftCheck},</if>
+            <if test="filterCheck != null">#{filterCheck},</if>
+            <if test="airtightnessCheck != null">#{airtightnessCheck},</if>
+            <if test="flowCheck != null">#{flowCheck},</if>
+            <if test="pressure != null">#{pressure},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="deptId != null">#{deptId},</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>
+         </trim>
+    </insert>
+
+    <update id="updateTCheckCalibration" parameterType="TCheckCalibration">
+        update t_check_calibration
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="calibrationTime != null">calibration_time = #{calibrationTime},</if>
+            <if test="calibrationUser != null">calibration_user = #{calibrationUser},</if>
+            <if test="instrumentId != null">instrument_id = #{instrumentId},</if>
+            <if test="standardgasesId != null">standardgases_id = #{standardgasesId},</if>
+            <if test="zerogasConcentration != null">zerogas_concentration = #{zerogasConcentration},</if>
+            <if test="zerogasCalibration != null">zerogas_calibration = #{zerogasCalibration},</if>
+            <if test="standardgasesCalibration != null">standardgases_calibration = #{standardgasesCalibration},</if>
+            <if test="driftCheck != null">drift_check = #{driftCheck},</if>
+            <if test="filterCheck != null">filter_check = #{filterCheck},</if>
+            <if test="airtightnessCheck != null">airtightness_check = #{airtightnessCheck},</if>
+            <if test="flowCheck != null">flow_check = #{flowCheck},</if>
+            <if test="pressure != null">pressure = #{pressure},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="deptId != null">dept_id = #{deptId},</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>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTCheckCalibrationById" parameterType="Long">
+        update t_check_calibration set del_flag=1 where id = #{id}
+    </delete>
+
+    <delete id="deleteTCheckCalibrationByIds" parameterType="String">
+        update t_check_calibration set del_flag=1 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 5 - 0
master/src/main/resources/mybatis/check/TCheckStandardgasesMapper.xml

@@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updaterCode"    column="updater_code"    />
         <result property="updater"    column="user_name"    />
         <result property="updatedate"    column="updatedate"    />
+        <result property="describe"    column="describe"    />
     </resultMap>
 
     <sql id="selectTCheckStandardgasesVo">
@@ -46,6 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <select id="selectAllStandardgases"  resultMap="TCheckStandardgasesResult">
+        select d.*,concat(d.name, '_',d.code) `describe` from t_check_standardgases d where d.del_flag = 0
+    </select>
+
     <select id="selectTCheckStandardgasesById" parameterType="Long" resultMap="TCheckStandardgasesResult">
         <include refid="selectTCheckStandardgasesVo"/>
         where id = #{id}

+ 44 - 0
ui/src/api/check/calibration.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询检测仪器校准列表
+export function listCalibration(query) {
+  return request({
+    url: '/check/calibration/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询检测仪器校准详细
+export function getCalibration(id) {
+  return request({
+    url: '/check/calibration/' + id,
+    method: 'get'
+  })
+}
+
+// 新增检测仪器校准
+export function addCalibration(data) {
+  return request({
+    url: '/check/calibration',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改检测仪器校准
+export function updateCalibration(data) {
+  return request({
+    url: '/check/calibration',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除检测仪器校准
+export function delCalibration(id) {
+  return request({
+    url: '/check/calibration/' + id,
+    method: 'delete'
+  })
+}

+ 6 - 0
ui/src/api/check/standardgases.js

@@ -8,6 +8,12 @@ export function listStandardgases(query) {
     params: query
   })
 }
+export function getAllStandardgases() {
+  return request({
+    url: '/check/standardgases/allStandardgases',
+    method: 'get',
+  })
+}
 
 // 查询标准气体详细
 export function getStandardgases(id) {

+ 452 - 0
ui/src/views/check/calibration/index.vue

@@ -0,0 +1,452 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="仪器类型编号" prop="code">
+        <el-input
+          v-model="queryParams.code"
+          placeholder="请输入仪器类型编号"
+          clearable
+          @change="handleQuery"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="仪器类型名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入仪器类型名称"
+          clearable
+          @change="handleQuery"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" 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"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['check:calibration:add']"
+        >新增
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['check:calibration:edit']"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['check:calibration:remove']"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['check:calibration:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="calibrationList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" fixed="left" align="center"/>
+      <el-table-column label="校准时间" align="center" prop="calibrationTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.calibrationTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="校准人员" align="center" prop="calibrationUser" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="仪器编号" align="center" prop="instrumentCode" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="仪器名称" align="center" prop="instrumentName" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="仪器类型" align="center" prop="instrumentType" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="标准气名称" align="center" prop="standardgasesName" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="标准气有效期" align="center" prop="standardgasesLifespan" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.standardgasesLifespan, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="标准气浓度(ppm)" align="center" prop="standardgasesConcentration" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="零气浓度值(ppm)" align="center" prop="zerogasConcentration" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="零气校准值(ppm)" align="center" prop="zerogasCalibration" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="标气校准值(ppm)" align="center" prop="standardgasesCalibration" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="漂移核查值(ppm)" align="center" prop="driftCheck" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="过滤片检查" align="center" prop="filterCheck" width="130" :show-overflow-tooltip="true" :formatter="filterFormat"/>
+      <el-table-column label="气密性检查" align="center" prop="airtightnessCheck" width="130"
+                       :show-overflow-tooltip="true" :formatter="airFormat"/>
+      <el-table-column label="流量检查(0.1-3)L/min" align="center" prop="flowCheck" width="180"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="气体钢瓶压力(Bar)" align="center" prop="pressure" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="备注" align="center" prop="remarks" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="150">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['check:calibration:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['check:calibration: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="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
+        <el-form-item label="校准时间" prop="calibrationTime">
+          <el-date-picker clearable
+                          v-model="form.calibrationTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="请选择校准时间"
+                          style="width: 100%">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="校准人员" prop="calibrationUser">
+          <el-input v-model="form.calibrationUser" placeholder="请输入校准人员"/>
+        </el-form-item>
+        <el-form-item label="仪器" prop="instrumentId">
+          <el-select v-model="form.instrumentId" placeholder="请选择仪器" clearable size="small" style="width: 100%">
+            <el-option
+              v-for="dict in instrumentList"
+              :key="dict.id"
+              :label="dict.name"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="标准气体" prop="standardgasesId">
+          <el-select v-model="form.standardgasesId" placeholder="请选择标气" clearable size="small" style="width: 100%">
+            <el-option
+              v-for="dict in standardgasesList"
+              :key="dict.id"
+              :label="dict.describe"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="零气浓度值(ppm)" prop="zerogasConcentration">
+          <el-input v-model="form.zerogasConcentration" placeholder="请输入零气浓度值"/>
+        </el-form-item>
+        <el-form-item label="零气校准值(ppm)" prop="zerogasCalibration">
+          <el-input v-model="form.zerogasCalibration" placeholder="请输入零气校准值"/>
+        </el-form-item>
+        <el-form-item label="标气校准值(ppm)" prop="standardgasesCalibration">
+          <el-input v-model="form.standardgasesCalibration" placeholder="请输入标气校准值"/>
+        </el-form-item>
+        <el-form-item label="漂移核查值(ppm)" prop="driftCheck">
+          <el-input v-model="form.driftCheck" placeholder="请输入漂移核查值"/>
+        </el-form-item>
+        <el-form-item label="过滤片检查" prop="filterCheck">
+          <el-select v-model="form.filterCheck" placeholder="请选择是/否" clearable size="small" style="width: 100%">
+            <el-option
+              v-for="dict in yesOrNoOperation"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="气密性检查" prop="airtightnessCheck">
+          <el-select v-model="form.airtightnessCheck" placeholder="请选择气密性状态" clearable size="small" style="width: 100%">
+            <el-option
+              v-for="dict in checkOperation"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="流量检查(0.1-3)L/min" prop="flowCheck">
+          <el-input v-model="form.flowCheck" placeholder="请输入流量检查"/>
+        </el-form-item>
+        <el-form-item label="气体钢瓶压力(Bar)" prop="pressure">
+          <el-input v-model="form.pressure" placeholder="请输入气体钢瓶压力"/>
+        </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>
+  </div>
+</template>
+
+<script>
+import {
+  listCalibration,
+  getCalibration,
+  delCalibration,
+  addCalibration,
+  updateCalibration
+} from "@/api/check/calibration";
+import {getAllInstrument} from "@/api/check/instrument";
+import {getAllStandardgases} from "@/api/check/standardgases";
+
+export default {
+  name: "Calibration",
+  data() {
+    return {
+      instrumentList: [],
+      standardgasesList: [],
+      yesOrNoOperation: [],
+      checkOperation: [],
+      // 页面高度
+      clientHeight: 300,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 检测仪器校准表格数据
+      calibrationList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        calibrationTime: null,
+        calibrationUser: null,
+        instrumentId: null,
+        standardgasesId: null,
+        zerogasConcentration: null,
+        zerogasCalibration: null,
+        standardgasesCalibration: null,
+        driftCheck: null,
+        filterCheck: null,
+        airtightnessCheck: null,
+        flowCheck: null,
+        pressure: null,
+        remarks: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        calibrationTime: [
+          {required: true, message: '校准时间不能为空', trigger: "blur"}
+        ],
+        filterCheck: [
+          {required: true, message: '过滤片检查不能为空', trigger: "blur"}
+        ],
+        instrumentId: [
+          {required: true, message: '请选择仪器', trigger: "blur"}
+        ],
+        standardgasesId: [
+          {required: true, message: '请选择标气', trigger: "blur"}
+        ],
+        airtightnessCheck: [
+          {required: true, message: '气密性检查不能为空', trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    });
+    getAllInstrument().then(response => {
+      this.instrumentList = response.data;
+    });
+    getAllStandardgases().then(response => {
+      this.standardgasesList = response.data;
+    });
+    this.getDicts("yes_no").then(response => {
+      this.yesOrNoOperation = response.data;
+    });
+    this.getDicts("airtightness_check").then(response => {
+      this.checkOperation = response.data;
+    });
+  },
+  methods: {
+    filterFormat(row, column) {
+      return this.selectDictLabel(this.yesOrNoOperation, row.filterCheck);
+    },
+    airFormat(row, column) {
+      return this.selectDictLabel(this.checkOperation, row.airtightnessCheck);
+    },
+    /** 查询检测仪器校准列表 */
+    getList() {
+      this.loading = true;
+      listCalibration(this.queryParams).then(response => {
+        this.calibrationList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        calibrationTime: null,
+        calibrationUser: null,
+        instrumentId: null,
+        standardgasesId: null,
+        zerogasConcentration: null,
+        zerogasCalibration: null,
+        standardgasesCalibration: null,
+        driftCheck: null,
+        filterCheck: null,
+        airtightnessCheck: null,
+        flowCheck: null,
+        pressure: null,
+        remarks: null,
+        deptId: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: 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
+      getCalibration(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) {
+            updateCalibration(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCalibration(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除检测仪器校准编号为"' + ids + '"的数据项?').then(function () {
+        return delCalibration(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('check/calibration/export', {
+        ...this.queryParams
+      }, `calibration_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 9 - 0
ui/src/views/check/instrument/index.vue

@@ -10,6 +10,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="仪器类型名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入仪器类型名称"
+          clearable
+          @change="handleQuery"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>

+ 12 - 2
ui/src/views/check/standardgases/index.vue

@@ -74,7 +74,11 @@
       <el-table-column label="标准气体证书编号" align="center" prop="code" />
       <el-table-column label="标准气体名称" align="center" prop="name" />
       <el-table-column label="标准气体浓度" align="center" prop="concentration" />
-      <el-table-column label="标准气体有效期" align="center" prop="lifespan" />
+      <el-table-column label="标准气体有效期" align="center" prop="lifespan"  width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.lifespan, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="生产厂家" align="center" prop="factory" />
       <el-table-column label="钢瓶编号" align="center" prop="cylinderCode" />
       <el-table-column label="备注" align="center" prop="remarks" />
@@ -125,7 +129,13 @@
           <el-input v-model="form.concentration" placeholder="请输入标准气体浓度" />
         </el-form-item>
         <el-form-item label="标准气体有效期" prop="lifespan">
-          <el-input v-model="form.lifespan" placeholder="请输入标准气体有效期" />
+          <el-date-picker clearable
+                          v-model="form.lifespan"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="请选择标准气体有效期"
+                          style="width: 100%">
+          </el-date-picker>
         </el-form-item>
         <el-form-item label="生产厂家" prop="factory">
           <el-input v-model="form.factory" placeholder="请输入生产厂家" />