Parcourir la source

-添加环境本底值台账
-修改导入导出功能

jiangbiao il y a 2 ans
Parent
commit
2a9a534081
25 fichiers modifiés avec 1926 ajouts et 182 suppressions
  1. 2 11
      master/src/main/java/com/ruoyi/RuoYiApplication.java
  2. 161 24
      master/src/main/java/com/ruoyi/project/check/controller/TCheckCalibrationController.java
  3. 109 0
      master/src/main/java/com/ruoyi/project/check/controller/TCheckEnvironmentController.java
  4. 1 0
      master/src/main/java/com/ruoyi/project/check/controller/TCheckInstrumentController.java
  5. 3 1
      master/src/main/java/com/ruoyi/project/check/controller/TCheckInstrumentRecordController.java
  6. 1 0
      master/src/main/java/com/ruoyi/project/check/controller/TCheckStandardgasesController.java
  7. 33 33
      master/src/main/java/com/ruoyi/project/check/domain/TCheckCalibration.java
  8. 406 0
      master/src/main/java/com/ruoyi/project/check/domain/TCheckEnvironment.java
  9. 0 3
      master/src/main/java/com/ruoyi/project/check/domain/TCheckInstrument.java
  10. 5 6
      master/src/main/java/com/ruoyi/project/check/domain/TCheckInstrumentRecord.java
  11. 113 99
      master/src/main/java/com/ruoyi/project/check/domain/TCheckStandardgases.java
  12. 61 0
      master/src/main/java/com/ruoyi/project/check/mapper/TCheckEnvironmentMapper.java
  13. 61 0
      master/src/main/java/com/ruoyi/project/check/service/ITCheckEnvironmentService.java
  14. 93 0
      master/src/main/java/com/ruoyi/project/check/service/impl/TCheckEnvironmentServiceImpl.java
  15. 2 0
      master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionController.java
  16. 3 0
      master/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  17. 2 0
      master/src/main/resources/mybatis/check/TCheckCalibrationMapper.xml
  18. 164 0
      master/src/main/resources/mybatis/check/TCheckEnvironmentMapper.xml
  19. BIN
      master/src/main/resources/static/template/base/calibration.xlsx
  20. 44 0
      ui/src/api/check/environment.js
  21. BIN
      ui/src/assets/images/login-background.jpg
  22. 1 1
      ui/src/assets/styles/variables.scss
  23. 107 4
      ui/src/views/check/calibration/index.vue
  24. 539 0
      ui/src/views/check/environment/index.vue
  25. 15 0
      ui/src/views/check/instrument/index.vue

+ 2 - 11
master/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 
 /**
  * 启动程序
- * 
+ *
  * @author ruoyi
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@@ -16,15 +16,6 @@ public class RuoYiApplication
     {
         // System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(RuoYiApplication.class, args);
-        System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙  \n" +
-                " .-------.       ____     __        \n" +
-                " |  _ _   \\      \\   \\   /  /    \n" +
-                " | ( ' )  |       \\  _. /  '       \n" +
-                " |(_ o _) /        _( )_ .'         \n" +
-                " | (_,_).' __  ___(_ o _)'          \n" +
-                " |  |\\ \\  |  ||   |(_,_)'         \n" +
-                " |  | \\ `'   /|   `-'  /           \n" +
-                " |  |  \\    /  \\      /           \n" +
-                " ''-'   `'-'    `-..-'              ");
+        System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙");
     }
 }

+ 161 - 24
master/src/main/java/com/ruoyi/project/check/controller/TCheckCalibrationController.java

@@ -1,17 +1,31 @@
 package com.ruoyi.project.check.controller;
 
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson2.JSON;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
+import com.ruoyi.project.base.domain.TBaseDevice;
+import com.ruoyi.project.base.domain.TBasePlant;
+import com.ruoyi.project.base.domain.TBasePoint;
+import com.ruoyi.project.base.domain.TBaseRegion;
+import com.ruoyi.project.check.domain.TCheckInstrument;
+import com.ruoyi.project.check.service.ITCheckInstrumentService;
+import com.ruoyi.system.service.ISysDictTypeService;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 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 org.springframework.web.bind.annotation.*;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -20,27 +34,32 @@ 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;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 检测仪器校准Controller
- * 
+ *
  * @author ruoyi
  * @date 2022-11-23
  */
 @RestController
 @RequestMapping("/check/calibration")
-public class TCheckCalibrationController extends BaseController
-{
+public class TCheckCalibrationController extends BaseController {
     @Autowired
     private ITCheckCalibrationService tCheckCalibrationService;
 
+    @Autowired
+    private ITCheckInstrumentService tCheckInstrumentService;
+
+    @Autowired
+    private ISysDictTypeService isysDictTypeService;
+
     /**
      * 查询检测仪器校准列表
      */
     @PreAuthorize("@ss.hasPermi('check:calibration:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TCheckCalibration tCheckCalibration)
-    {
+    public TableDataInfo list(TCheckCalibration tCheckCalibration) {
         startPage();
         List<TCheckCalibration> list = tCheckCalibrationService.selectTCheckCalibrationList(tCheckCalibration);
         return getDataTable(list);
@@ -52,8 +71,7 @@ public class TCheckCalibrationController extends BaseController
     @PreAuthorize("@ss.hasPermi('check:calibration:export')")
     @Log(title = "检测仪器校准", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, TCheckCalibration tCheckCalibration)
-    {
+    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, "检测仪器校准数据");
@@ -64,8 +82,7 @@ public class TCheckCalibrationController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('check:calibration:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tCheckCalibrationService.selectTCheckCalibrationById(id));
     }
 
@@ -75,8 +92,8 @@ public class TCheckCalibrationController extends BaseController
     @PreAuthorize("@ss.hasPermi('check:calibration:add')")
     @Log(title = "检测仪器校准", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TCheckCalibration tCheckCalibration)
-    {
+    public AjaxResult add(@RequestBody TCheckCalibration tCheckCalibration) {
+        tCheckCalibration.setCreaterCode(getUserId());
         return toAjax(tCheckCalibrationService.insertTCheckCalibration(tCheckCalibration));
     }
 
@@ -86,8 +103,8 @@ public class TCheckCalibrationController extends BaseController
     @PreAuthorize("@ss.hasPermi('check:calibration:edit')")
     @Log(title = "检测仪器校准", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TCheckCalibration tCheckCalibration)
-    {
+    public AjaxResult edit(@RequestBody TCheckCalibration tCheckCalibration) {
+        tCheckCalibration.setUpdaterCode(getUserId());
         return toAjax(tCheckCalibrationService.updateTCheckCalibration(tCheckCalibration));
     }
 
@@ -96,9 +113,129 @@ public class TCheckCalibrationController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('check:calibration:remove')")
     @Log(title = "检测仪器校准", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tCheckCalibrationService.deleteTCheckCalibrationByIds(ids));
     }
+
+
+    @Log(title = "检测仪器标准导入", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow = new ArrayList<>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TCheckCalibration> list = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 1; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TCheckCalibration entity = new TCheckCalibration();
+                Date lifespan = null;
+                Date checkTime;
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    if (cell == null) {
+                        continue;
+                    }
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        //仪器编号
+                        TCheckInstrument tCheckInstrument = new TCheckInstrument();
+                        tCheckInstrument.setCode(cellValue);
+                        List<TCheckInstrument> tCheckInstruments = tCheckInstrumentService.selectTCheckInstrumentList(tCheckInstrument);
+                        if (CollectionUtils.isEmpty(tCheckInstruments)) {
+                            return AjaxResult.success("第 " + (i + 1) + " 行:未找到对应仪器!请检查仪器编号无误后重新提交!", 0);
+                        }
+                        entity.setInstrumentId(tCheckInstruments.get(0).getId());
+                    } else if (j == 4) {
+                        // 标气有效期
+                        lifespan = sdf.parse(cellValue);
+                    } else if (j == 6) {
+                        //标气校准值
+                        entity.setStandardgasesCalibration(cellValue);
+                    } else if (j == 7) {
+                        //零气浓度值
+                        entity.setZerogasConcentration(cellValue);
+                    } else if (j == 8) {
+                        // 流量检查
+                        entity.setFlowCheck(cellValue);
+                    } else if (j == 9) {
+                        // 零气校准值
+                        entity.setZerogasCalibration(cellValue);
+                    } else if (j == 10) {
+                        // 气体钢瓶压力
+                        entity.setPressure(cellValue);
+                    } else if (j == 11) {
+                        // 漂移核查值
+                        entity.setDriftCheck(cellValue);// 设备id
+                    } else if (j == 12) {
+                        // 校准人员
+                        entity.setCalibrationUser(cellValue);
+                    } else if (j == 13) {
+                        // 描述
+                        entity.setRemarks(cellValue);
+                    } else if (j == 14) {
+                        // 校准日期,如果在标气有效期之后,不添加
+                        checkTime = sdf.parse(cellValue);
+                        if (lifespan!=null&&checkTime.after(lifespan)) {
+                            return AjaxResult.success("第 " + (i + 1) + " 行:校准日期超过标气有效期!请检查填写无误后重新提交!", 0);
+                        }
+                        entity.setCalibrationTime(sdf.parse(cellValue));
+                    } else if (j == 15) {
+                        // 过滤片检查
+                        for (SysDictData dictData : isysDictTypeService.selectDictDataByType("yes_no")) {
+                            if (dictData.getDictLabel().equals(cellValue)) {
+                                entity.setFilterCheck(dictData.getDictValue());
+                                break;
+                            }
+                        }
+                    } else if (j == 16) {
+                        //气密性检查
+                        for (SysDictData dictData : isysDictTypeService.selectDictDataByType("airtightness_check")) {
+                            if (dictData.getDictLabel().equals(cellValue)) {
+                                entity.setAirtightnessCheck(dictData.getDictValue());
+                                break;
+                            }
+                        }
+                    }
+                }
+                entity.setCreaterCode(userId);
+                logger.info("entity:" + entity);
+                list.add(entity);
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + JSON.toJSONString(e));
+                failRow.add(i + 1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TCheckCalibration t : list
+        ) {
+            failNum++;
+            try {
+                //进行数据更新
+                add(t);
+                successNumber++;
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(failNum + 1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" + successNumber);
+        logger.info("failNumber:" + failNumber);
+        logger.info("failRow:" + failRow);
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
 }

+ 109 - 0
master/src/main/java/com/ruoyi/project/check/controller/TCheckEnvironmentController.java

@@ -0,0 +1,109 @@
+package com.ruoyi.project.check.controller;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.project.check.domain.TCheckEnvironment;
+import com.ruoyi.project.check.service.ITCheckEnvironmentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+/**
+ * 环境本底值记录Controller
+ *
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+@RestController
+@RequestMapping("/check/environment")
+public class TCheckEnvironmentController extends BaseController
+{
+    @Autowired
+    private ITCheckEnvironmentService tCheckEnvironmentService;
+
+    /**
+     * 查询环境本底值记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('check:environment:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TCheckEnvironment tCheckEnvironment)
+    {
+        startPage();
+        List<TCheckEnvironment> list = tCheckEnvironmentService.selectTCheckEnvironmentList(tCheckEnvironment);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出环境本底值记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('check:environment:export')")
+    @Log(title = "环境本底值记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TCheckEnvironment tCheckEnvironment)
+    {
+        List<TCheckEnvironment> list = tCheckEnvironmentService.selectTCheckEnvironmentList(tCheckEnvironment);
+        ExcelUtil<TCheckEnvironment> util = new ExcelUtil<TCheckEnvironment>(TCheckEnvironment.class);
+        util.exportExcel(response, list, "环境本底值记录数据");
+    }
+
+    /**
+     * 获取环境本底值记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('check:environment:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tCheckEnvironmentService.selectTCheckEnvironmentById(id));
+    }
+
+    /**
+     * 新增环境本底值记录
+     */
+    @PreAuthorize("@ss.hasPermi('check:environment:add')")
+    @Log(title = "环境本底值记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TCheckEnvironment tCheckEnvironment)
+    {
+        tCheckEnvironment.setUpdatedate(new Date());
+        tCheckEnvironment.setUpdaterCode(getUserId());
+        tCheckEnvironment.setCreaterCode(getUserId());
+        return toAjax(tCheckEnvironmentService.insertTCheckEnvironment(tCheckEnvironment));
+    }
+
+    /**
+     * 修改环境本底值记录
+     */
+    @PreAuthorize("@ss.hasPermi('check:environment:edit')")
+    @Log(title = "环境本底值记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TCheckEnvironment tCheckEnvironment)
+    {
+        tCheckEnvironment.setUpdatedate(new Date());
+        tCheckEnvironment.setUpdaterCode(getUserId());
+        return toAjax(tCheckEnvironmentService.updateTCheckEnvironment(tCheckEnvironment));
+    }
+
+    /**
+     * 删除环境本底值记录
+     */
+    @PreAuthorize("@ss.hasPermi('check:environment:remove')")
+    @Log(title = "环境本底值记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tCheckEnvironmentService.deleteTCheckEnvironmentByIds(ids));
+    }
+
+    public static void main(String[] args) {
+        int piles[]={1,2,3,4};
+        int max = Arrays.stream(piles).max().getAsInt();
+        System.out.println(max);
+    }
+}

+ 1 - 0
master/src/main/java/com/ruoyi/project/check/controller/TCheckInstrumentController.java

@@ -86,6 +86,7 @@ public class TCheckInstrumentController extends BaseController
     {
         tCheckInstrument.setUpdatedate(new Date());
         tCheckInstrument.setUpdaterCode(getUserId());
+        tCheckInstrument.setCreaterCode(getUserId());
         return toAjax(tCheckInstrumentService.insertTCheckInstrument(tCheckInstrument));
     }
 

+ 3 - 1
master/src/main/java/com/ruoyi/project/check/controller/TCheckInstrumentRecordController.java

@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * 仪器维护记录Controller
- * 
+ *
  * @author ruoyi
  * @date 2022-11-22
  */
@@ -77,6 +77,7 @@ public class TCheckInstrumentRecordController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody TCheckInstrumentRecord tCheckInstrumentRecord)
     {
+        tCheckInstrumentRecord.setCreaterCode(getUserId());
         return toAjax(tCheckInstrumentRecordService.insertTCheckInstrumentRecord(tCheckInstrumentRecord));
     }
 
@@ -88,6 +89,7 @@ public class TCheckInstrumentRecordController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody TCheckInstrumentRecord tCheckInstrumentRecord)
     {
+        tCheckInstrumentRecord.setUpdaterCode(getUserId());
         return toAjax(tCheckInstrumentRecordService.updateTCheckInstrumentRecord(tCheckInstrumentRecord));
     }
 

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

@@ -86,6 +86,7 @@ public class TCheckStandardgasesController extends BaseController
     {
         tCheckStandardgases.setUpdatedate(new Date());
         tCheckStandardgases.setUpdaterCode(getUserId());
+        tCheckStandardgases.setCreaterCode(getUserId());
         return toAjax(tCheckStandardgasesService.insertTCheckStandardgases(tCheckStandardgases));
     }
 

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

@@ -31,44 +31,67 @@ public class TCheckCalibration extends BaseEntity
     @Excel(name = "校准人员")
     private String calibrationUser;
 
+    @Excel(name = "仪器编号")
+    @TableField(exist = false)
+    private String instrumentCode;
+
+    @Excel(name = "仪器名称")
+    @TableField(exist = false)
+    private String instrumentName;
+
+    @Excel(name = "仪器类型")
+    @TableField(exist = false)
+    private String instrumentType;
+
+    @Excel(name = "标准气名称")
+    @TableField(exist = false)
+    private String standardgasesName;
+
+    @Excel(name = "标准气有效期")
+    @TableField(exist = false)
+    private String standardgasesLifespan;
+
+    @Excel(name = "标准气浓度(ppm)")
+    @TableField(exist = false)
+    private String standardgasesConcentration;
+
+
     /** 仪器id */
-    @Excel(name = "仪器id")
     private Long instrumentId;
 
     /** 标气id */
-    @Excel(name = "标气id")
     private Long standardgasesId;
 
     /** 零气浓度值 */
-    @Excel(name = "零气浓度值")
+    @Excel(name = "零气浓度值(ppm)")
     private String zerogasConcentration;
 
     /** 零气校准值 */
-    @Excel(name = "零气校准值")
+    @Excel(name = "零气校准值(ppm)")
     private String zerogasCalibration;
 
     /** 标气校准值 */
-    @Excel(name = "标气校准值")
+    @Excel(name = "标气校准值(ppm)")
     private String standardgasesCalibration;
 
     /** 漂移核查值 */
-    @Excel(name = "漂移核查值")
+    @Excel(name = "漂移核查值(ppm)")
     private String driftCheck;
 
     /** 过滤片检查 */
-    @Excel(name = "过滤片检查")
+    @Excel(name = "过滤片检查",dictType = "yes_no")
     private String filterCheck;
 
     /** 气密性检查 */
-    @Excel(name = "气密性检查")
+    @Excel(name = "气密性检查",dictType = "airtightness_check")
     private String airtightnessCheck;
 
     /** 流量检查 */
-    @Excel(name = "流量检查")
+    @Excel(name = "流量检查(0.1-3)L/min")
     private String flowCheck;
 
     /** 气体钢瓶压力 */
-    @Excel(name = "气体钢瓶压力")
+    @Excel(name = "气体钢瓶压力(Bar)")
     private String pressure;
 
     /** 备注 */
@@ -76,47 +99,24 @@ public class TCheckCalibration extends BaseEntity
     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() {

+ 406 - 0
master/src/main/java/com/ruoyi/project/check/domain/TCheckEnvironment.java

@@ -0,0 +1,406 @@
+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_environment
+ *
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+public class TCheckEnvironment extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识id */
+    private Long id;
+
+    /** 装置id */
+    private Long plantId;
+
+    /** 仪器id */
+    private Long instrumentId;
+
+
+
+    @TableField(exist = false)
+    @Excel(name = "装置编码")
+    private String plantCode;
+
+    @TableField(exist = false)
+    @Excel(name = "装置名称")
+    private String plantName;
+
+    @TableField(exist = false)
+    @Excel(name = "仪器型号")
+    private String instrumentModel;
+
+    @TableField(exist = false)
+    @Excel(name = "仪器编号")
+    private String instrumentCode;
+
+    /** 组件编码 */
+    @Excel(name = "组件编码")
+    private String assemblyCode;
+
+    /** 环境本底值 */
+    @Excel(name = "环境本底值(ppm)")
+    private String backgroundValue;
+
+    /** 环境温度 */
+    @Excel(name = "环境温度(℃)")
+    private String ambientTemp;
+
+    /** 环境湿度 */
+    @Excel(name = "环境湿度")
+    private String ambientHumidity;
+
+    /** 大气压 */
+    @Excel(name = "大气压(kpa)")
+    private String atmos;
+
+    /** 风向 */
+    @Excel(name = "风向")
+    private String windDirection;
+
+    /** 风速 */
+    @Excel(name = "风速(m/s)")
+    private String windSpeed;
+
+    /** 检测人员 */
+    @Excel(name = "检测人员")
+    private String tester;
+
+    /** 检测日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date testTime;
+
+    @Excel(name = "位置1检测结果")
+    private String position1;
+
+    @Excel(name = "位置2检测结果")
+    private String position2;
+
+    @Excel(name = "位置3检测结果")
+    private String position3;
+
+    @Excel(name = "位置4检测结果")
+    private String position4;
+
+    @Excel(name = "位置5检测结果")
+    private String position5;
+
+    @Excel(name = "最后维护人")
+    @TableField(exist = false)
+    private String updater;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "维护时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    /** 状态 1 :正常 ;0:删除 */
+    private Integer delFlag;
+
+    /** 创建人 */
+    private Long createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    private Long updaterCode;
+
+    public String getUpdater() {
+        return updater;
+    }
+
+    public void setUpdater(String updater) {
+        this.updater = updater;
+    }
+
+    public String getPlantCode() {
+        return plantCode;
+    }
+
+    public void setPlantCode(String plantCode) {
+        this.plantCode = plantCode;
+    }
+
+    public String getPlantName() {
+        return plantName;
+    }
+
+    public void setPlantName(String plantName) {
+        this.plantName = plantName;
+    }
+
+    public String getInstrumentModel() {
+        return instrumentModel;
+    }
+
+    public void setInstrumentModel(String instrumentModel) {
+        this.instrumentModel = instrumentModel;
+    }
+
+    public String getInstrumentCode() {
+        return instrumentCode;
+    }
+
+    public void setInstrumentCode(String instrumentCode) {
+        this.instrumentCode = instrumentCode;
+    }
+
+    public String getPosition1() {
+        return position1;
+    }
+
+    public void setPosition1(String position1) {
+        this.position1 = position1;
+    }
+
+    public String getPosition2() {
+        return position2;
+    }
+
+    public void setPosition2(String position2) {
+        this.position2 = position2;
+    }
+
+    public String getPosition3() {
+        return position3;
+    }
+
+    public void setPosition3(String position3) {
+        this.position3 = position3;
+    }
+
+    public String getPosition4() {
+        return position4;
+    }
+
+    public void setPosition4(String position4) {
+        this.position4 = position4;
+    }
+
+    public String getPosition5() {
+        return position5;
+    }
+
+    public void setPosition5(String position5) {
+        this.position5 = position5;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setPlantId(Long plantId)
+    {
+        this.plantId = plantId;
+    }
+
+    public Long getPlantId()
+    {
+        return plantId;
+    }
+    public void setInstrumentId(Long instrumentId)
+    {
+        this.instrumentId = instrumentId;
+    }
+
+    public Long getInstrumentId()
+    {
+        return instrumentId;
+    }
+    public void setAssemblyCode(String assemblyCode)
+    {
+        this.assemblyCode = assemblyCode;
+    }
+
+    public String getAssemblyCode()
+    {
+        return assemblyCode;
+    }
+    public void setBackgroundValue(String backgroundValue)
+    {
+        this.backgroundValue = backgroundValue;
+    }
+
+    public String getBackgroundValue()
+    {
+        return backgroundValue;
+    }
+    public void setAmbientTemp(String ambientTemp)
+    {
+        this.ambientTemp = ambientTemp;
+    }
+
+    public String getAmbientTemp()
+    {
+        return ambientTemp;
+    }
+    public void setAmbientHumidity(String ambientHumidity)
+    {
+        this.ambientHumidity = ambientHumidity;
+    }
+
+    public String getAmbientHumidity()
+    {
+        return ambientHumidity;
+    }
+    public void setAtmos(String atmos)
+    {
+        this.atmos = atmos;
+    }
+
+    public String getAtmos()
+    {
+        return atmos;
+    }
+    public void setWindDirection(String windDirection)
+    {
+        this.windDirection = windDirection;
+    }
+
+    public String getWindDirection()
+    {
+        return windDirection;
+    }
+    public void setWindSpeed(String windSpeed)
+    {
+        this.windSpeed = windSpeed;
+    }
+
+    public String getWindSpeed()
+    {
+        return windSpeed;
+    }
+    public void setTester(String tester)
+    {
+        this.tester = tester;
+    }
+
+    public String getTester()
+    {
+        return tester;
+    }
+    public void setTestTime(Date testTime)
+    {
+        this.testTime = testTime;
+    }
+
+    public Date getTestTime()
+    {
+        return testTime;
+    }
+    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("plantId", getPlantId())
+            .append("instrumentId", getInstrumentId())
+            .append("assemblyCode", getAssemblyCode())
+            .append("backgroundValue", getBackgroundValue())
+            .append("ambientTemp", getAmbientTemp())
+            .append("ambientHumidity", getAmbientHumidity())
+            .append("atmos", getAtmos())
+            .append("windDirection", getWindDirection())
+            .append("windSpeed", getWindSpeed())
+            .append("tester", getTester())
+            .append("testTime", getTestTime())
+            .append("remarks", getRemarks())
+            .append("deptId", getDeptId())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .toString();
+    }
+}

+ 0 - 3
master/src/main/java/com/ruoyi/project/check/domain/TCheckInstrument.java

@@ -53,19 +53,16 @@ public class TCheckInstrument extends BaseEntity
     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;
 
     /** 修改人 */

+ 5 - 6
master/src/main/java/com/ruoyi/project/check/domain/TCheckInstrumentRecord.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;
@@ -21,20 +23,22 @@ public class TCheckInstrumentRecord extends BaseEntity
     private Long id;
 
     /** 仪器id */
-    @Excel(name = "仪器id")
     private Long instrumentId;
 
 
     /** 仪器类型编号 */
     @Excel(name = "仪器类型编号")
+    @TableField(exist = false)
     private String code;
 
     /** 仪器类型名称 */
     @Excel(name = "仪器类型名称")
+    @TableField(exist = false)
     private String name;
 
     /** 仪器型号 */
     @Excel(name = "仪器型号")
+    @TableField(exist = false)
     private String model;
 
     /** 维护内容 */
@@ -54,28 +58,23 @@ public class TCheckInstrumentRecord extends BaseEntity
     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;
 
     /** 修改时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date updatedate;
 
     public String getCode() {

+ 113 - 99
master/src/main/java/com/ruoyi/project/check/domain/TCheckStandardgases.java

@@ -15,64 +15,98 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2022-11-22
  */
-public class TCheckStandardgases extends BaseEntity
-{
+public class TCheckStandardgases extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 唯一标识id */
+    /**
+     * 唯一标识id
+     */
     private Long id;
 
-    /** 标准气体证书编号 */
+    /**
+     * 标准气体证书编号
+     */
     @Excel(name = "标准气体证书编号")
     private String code;
 
-    /** 标准气体名称 */
+    /**
+     * 标准气体名称
+     */
     @Excel(name = "标准气体名称")
     private String name;
 
-    /** 标准气体浓度 */
+    /**
+     * 标准气体浓度
+     */
     @Excel(name = "标准气体浓度")
     private String concentration;
 
-    /** 标准气体有效期 */
+    /**
+     * 标准气体有效期
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "标准气体有效期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date lifespan;
 
-    /** 生产厂家 */
+    /**
+     * 生产厂家
+     */
     @Excel(name = "生产厂家")
     private String factory;
 
-    /** 钢瓶编号 */
+    /**
+     * 钢瓶编号
+     */
     @Excel(name = "钢瓶编号")
     private String cylinderCode;
 
-    /** 备注 */
+    /**
+     * 备注
+     */
     @Excel(name = "备注")
     private String remarks;
 
-    /** 部门编号 */
-    @Excel(name = "部门编号")
+    /**
+     * 部门编号
+     */
     private Long deptId;
 
-    /** 状态 1 :正常 ;0:删除 */
+    /**
+     * 状态 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;
-    private String  updater;
-    @TableField(exist= false)
-    private String  describe;
+
+    @Excel(name = "修改人")
+    @TableField(exist = false)
+    private String updater;
+
+    @TableField(exist = false)
+    private String describe;
+
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
 
     public String getDescribe() {
         return describe;
@@ -90,155 +124,135 @@ public class TCheckStandardgases extends BaseEntity
         this.updater = updater;
     }
 
-    /** 修改时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date updatedate;
-
-    public void setId(Long id)
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId()
-    {
+    public Long getId() {
         return id;
     }
-    public void setCode(String code)
-    {
+
+    public void setCode(String code) {
         this.code = code;
     }
 
-    public String getCode()
-    {
+    public String getCode() {
         return code;
     }
-    public void setName(String name)
-    {
+
+    public void setName(String name) {
         this.name = name;
     }
 
-    public String getName()
-    {
+    public String getName() {
         return name;
     }
-    public void setConcentration(String concentration)
-    {
+
+    public void setConcentration(String concentration) {
         this.concentration = concentration;
     }
 
-    public String getConcentration()
-    {
+    public String getConcentration() {
         return concentration;
     }
-    public void setLifespan(Date lifespan)
-    {
+
+    public void setLifespan(Date lifespan) {
         this.lifespan = lifespan;
     }
 
-    public Date getLifespan()
-    {
+    public Date getLifespan() {
         return lifespan;
     }
-    public void setFactory(String factory)
-    {
+
+    public void setFactory(String factory) {
         this.factory = factory;
     }
 
-    public String getFactory()
-    {
+    public String getFactory() {
         return factory;
     }
-    public void setCylinderCode(String cylinderCode)
-    {
+
+    public void setCylinderCode(String cylinderCode) {
         this.cylinderCode = cylinderCode;
     }
 
-    public String getCylinderCode()
-    {
+    public String getCylinderCode() {
         return cylinderCode;
     }
-    public void setRemarks(String remarks)
-    {
+
+    public void setRemarks(String remarks) {
         this.remarks = remarks;
     }
 
-    public String getRemarks()
-    {
+    public String getRemarks() {
         return remarks;
     }
-    public void setDeptId(Long deptId)
-    {
+
+    public void setDeptId(Long deptId) {
         this.deptId = deptId;
     }
 
-    public Long getDeptId()
-    {
+    public Long getDeptId() {
         return deptId;
     }
-    public void setDelFlag(Integer delFlag)
-    {
+
+    public void setDelFlag(Integer delFlag) {
         this.delFlag = delFlag;
     }
 
-    public Integer getDelFlag()
-    {
+    public Integer getDelFlag() {
         return delFlag;
     }
-    public void setCreaterCode(Long createrCode)
-    {
+
+    public void setCreaterCode(Long createrCode) {
         this.createrCode = createrCode;
     }
 
-    public Long getCreaterCode()
-    {
+    public Long getCreaterCode() {
         return createrCode;
     }
-    public void setCreatedate(Date createdate)
-    {
+
+    public void setCreatedate(Date createdate) {
         this.createdate = createdate;
     }
 
-    public Date getCreatedate()
-    {
+    public Date getCreatedate() {
         return createdate;
     }
-    public void setUpdaterCode(Long updaterCode)
-    {
+
+    public void setUpdaterCode(Long updaterCode) {
         this.updaterCode = updaterCode;
     }
 
-    public Long getUpdaterCode()
-    {
+    public Long getUpdaterCode() {
         return updaterCode;
     }
-    public void setUpdatedate(Date updatedate)
-    {
+
+    public void setUpdatedate(Date updatedate) {
         this.updatedate = updatedate;
     }
 
-    public Date getUpdatedate()
-    {
+    public Date getUpdatedate() {
         return updatedate;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("code", getCode())
-            .append("name", getName())
-            .append("concentration", getConcentration())
-            .append("lifespan", getLifespan())
-            .append("factory", getFactory())
-            .append("cylinderCode", getCylinderCode())
-            .append("remarks", getRemarks())
-            .append("deptId", getDeptId())
-            .append("delFlag", getDelFlag())
-            .append("createrCode", getCreaterCode())
-            .append("createdate", getCreatedate())
-            .append("updaterCode", getUpdaterCode())
-            .append("updatedate", getUpdatedate())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("code", getCode())
+                .append("name", getName())
+                .append("concentration", getConcentration())
+                .append("lifespan", getLifespan())
+                .append("factory", getFactory())
+                .append("cylinderCode", getCylinderCode())
+                .append("remarks", getRemarks())
+                .append("deptId", getDeptId())
+                .append("delFlag", getDelFlag())
+                .append("createrCode", getCreaterCode())
+                .append("createdate", getCreatedate())
+                .append("updaterCode", getUpdaterCode())
+                .append("updatedate", getUpdatedate())
+                .toString();
     }
 }

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

@@ -0,0 +1,61 @@
+package com.ruoyi.project.check.mapper;
+
+import java.util.List;
+import com.ruoyi.project.check.domain.TCheckEnvironment;
+
+/**
+ * 环境本底值记录Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+public interface TCheckEnvironmentMapper 
+{
+    /**
+     * 查询环境本底值记录
+     * 
+     * @param id 环境本底值记录主键
+     * @return 环境本底值记录
+     */
+    public TCheckEnvironment selectTCheckEnvironmentById(Long id);
+
+    /**
+     * 查询环境本底值记录列表
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 环境本底值记录集合
+     */
+    public List<TCheckEnvironment> selectTCheckEnvironmentList(TCheckEnvironment tCheckEnvironment);
+
+    /**
+     * 新增环境本底值记录
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 结果
+     */
+    public int insertTCheckEnvironment(TCheckEnvironment tCheckEnvironment);
+
+    /**
+     * 修改环境本底值记录
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 结果
+     */
+    public int updateTCheckEnvironment(TCheckEnvironment tCheckEnvironment);
+
+    /**
+     * 删除环境本底值记录
+     * 
+     * @param id 环境本底值记录主键
+     * @return 结果
+     */
+    public int deleteTCheckEnvironmentById(Long id);
+
+    /**
+     * 批量删除环境本底值记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTCheckEnvironmentByIds(Long[] ids);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.project.check.service;
+
+import java.util.List;
+import com.ruoyi.project.check.domain.TCheckEnvironment;
+
+/**
+ * 环境本底值记录Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+public interface ITCheckEnvironmentService 
+{
+    /**
+     * 查询环境本底值记录
+     * 
+     * @param id 环境本底值记录主键
+     * @return 环境本底值记录
+     */
+    public TCheckEnvironment selectTCheckEnvironmentById(Long id);
+
+    /**
+     * 查询环境本底值记录列表
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 环境本底值记录集合
+     */
+    public List<TCheckEnvironment> selectTCheckEnvironmentList(TCheckEnvironment tCheckEnvironment);
+
+    /**
+     * 新增环境本底值记录
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 结果
+     */
+    public int insertTCheckEnvironment(TCheckEnvironment tCheckEnvironment);
+
+    /**
+     * 修改环境本底值记录
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 结果
+     */
+    public int updateTCheckEnvironment(TCheckEnvironment tCheckEnvironment);
+
+    /**
+     * 批量删除环境本底值记录
+     * 
+     * @param ids 需要删除的环境本底值记录主键集合
+     * @return 结果
+     */
+    public int deleteTCheckEnvironmentByIds(Long[] ids);
+
+    /**
+     * 删除环境本底值记录信息
+     * 
+     * @param id 环境本底值记录主键
+     * @return 结果
+     */
+    public int deleteTCheckEnvironmentById(Long id);
+}

+ 93 - 0
master/src/main/java/com/ruoyi/project/check/service/impl/TCheckEnvironmentServiceImpl.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.TCheckEnvironmentMapper;
+import com.ruoyi.project.check.domain.TCheckEnvironment;
+import com.ruoyi.project.check.service.ITCheckEnvironmentService;
+
+/**
+ * 环境本底值记录Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+@Service
+public class TCheckEnvironmentServiceImpl implements ITCheckEnvironmentService 
+{
+    @Autowired
+    private TCheckEnvironmentMapper tCheckEnvironmentMapper;
+
+    /**
+     * 查询环境本底值记录
+     * 
+     * @param id 环境本底值记录主键
+     * @return 环境本底值记录
+     */
+    @Override
+    public TCheckEnvironment selectTCheckEnvironmentById(Long id)
+    {
+        return tCheckEnvironmentMapper.selectTCheckEnvironmentById(id);
+    }
+
+    /**
+     * 查询环境本底值记录列表
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 环境本底值记录
+     */
+    @Override
+    public List<TCheckEnvironment> selectTCheckEnvironmentList(TCheckEnvironment tCheckEnvironment)
+    {
+        return tCheckEnvironmentMapper.selectTCheckEnvironmentList(tCheckEnvironment);
+    }
+
+    /**
+     * 新增环境本底值记录
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 结果
+     */
+    @Override
+    public int insertTCheckEnvironment(TCheckEnvironment tCheckEnvironment)
+    {
+        return tCheckEnvironmentMapper.insertTCheckEnvironment(tCheckEnvironment);
+    }
+
+    /**
+     * 修改环境本底值记录
+     * 
+     * @param tCheckEnvironment 环境本底值记录
+     * @return 结果
+     */
+    @Override
+    public int updateTCheckEnvironment(TCheckEnvironment tCheckEnvironment)
+    {
+        return tCheckEnvironmentMapper.updateTCheckEnvironment(tCheckEnvironment);
+    }
+
+    /**
+     * 批量删除环境本底值记录
+     * 
+     * @param ids 需要删除的环境本底值记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCheckEnvironmentByIds(Long[] ids)
+    {
+        return tCheckEnvironmentMapper.deleteTCheckEnvironmentByIds(ids);
+    }
+
+    /**
+     * 删除环境本底值记录信息
+     * 
+     * @param id 环境本底值记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCheckEnvironmentById(Long id)
+    {
+        return tCheckEnvironmentMapper.deleteTCheckEnvironmentById(id);
+    }
+}

+ 2 - 0
master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionController.java

@@ -91,6 +91,7 @@ public class TTaskInspectionController extends BaseController {
     public AjaxResult add(@RequestBody TTaskInspection tTaskInspection) {
         TTaskInspectionPlan tTaskInspectionPlan = taskInspectionPlanService.selectTTaskInspectionPlanById(tTaskInspection.getPlanId());
         tTaskInspection.setPlantId(tTaskInspectionPlan.getPlantId());
+        tTaskInspection.setCreaterCode(getUserId());
         return toAjax(tTaskInspectionService.insertTTaskInspection(tTaskInspection));
     }
 
@@ -103,6 +104,7 @@ public class TTaskInspectionController extends BaseController {
     public AjaxResult edit(@RequestBody TTaskInspection tTaskInspection) {
         TTaskInspectionPlan tTaskInspectionPlan = taskInspectionPlanService.selectTTaskInspectionPlanById(tTaskInspection.getPlanId());
         tTaskInspection.setPlantId(tTaskInspectionPlan.getPlantId());
+        tTaskInspection.setUpdaterCode(getUserId());
         return toAjax(tTaskInspectionService.updateTTaskInspection(tTaskInspection));
     }
 

+ 3 - 0
master/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -55,6 +55,9 @@ public class CommonController
         }else if ( type.equals("basePoint") ) {
             downloadname = "密封点导入模板.xlsx";
             url = "static/template/base/basePoint.xlsx";
+        }else if ( type.equals("calibration") ) {
+            downloadname = "LDAR仪器校准信息.xlsx";
+            url = "static/template/base/calibration.xlsx";
         }
         InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(url);
 

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

@@ -49,6 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="instrumentName != null  and instrumentName != ''"> and ci.`name` like concat('%',#{instrumentName}, '%')</if>
+            <if test="instrumentCode != null  and instrumentCode != ''"> and ci.`code` like concat('%',#{instrumentCode}, '%')</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>

+ 164 - 0
master/src/main/resources/mybatis/check/TCheckEnvironmentMapper.xml

@@ -0,0 +1,164 @@
+<?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.TCheckEnvironmentMapper">
+
+    <resultMap type="TCheckEnvironment" id="TCheckEnvironmentResult">
+        <result property="id"    column="id"    />
+        <result property="plantId"    column="plant_id"    />
+        <result property="instrumentId"    column="instrument_id"    />
+        <result property="assemblyCode"    column="assembly_code"    />
+        <result property="backgroundValue"    column="background_value"    />
+        <result property="ambientTemp"    column="ambient_temp"    />
+        <result property="ambientHumidity"    column="ambient_humidity"    />
+        <result property="atmos"    column="atmos"    />
+        <result property="windDirection"    column="wind_direction"    />
+        <result property="windSpeed"    column="wind_speed"    />
+        <result property="tester"    column="tester"    />
+        <result property="testTime"    column="test_time"    />
+        <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"    />
+        <result property="position1"    column="position1"    />
+        <result property="position2"    column="position2"    />
+        <result property="position3"    column="position3"    />
+        <result property="position4"    column="position4"    />
+        <result property="position5"    column="position5"    />
+    </resultMap>
+
+    <sql id="selectTCheckEnvironmentVo">
+        select id, plant_id, instrument_id, assembly_code, background_value, ambient_temp, ambient_humidity, atmos, wind_direction, wind_speed, tester, test_time,position1,position2,position3,position4,position5, remarks, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_check_environment
+    </sql>
+
+    <select id="selectTCheckEnvironmentList" parameterType="TCheckEnvironment" resultMap="TCheckEnvironmentResult">
+        select d.*,su.user_name updater,bp.plant_code plantCode,bp.plant_name plantName,ci.model instrumentModel,ci.code instrumentCode from t_check_environment d
+        left join sys_user su on su.user_id=d.updater_code
+        left join t_base_plant bp on bp.id =d.plant_id
+        left join t_check_instrument ci on ci.id=d.instrument_id
+        <where>
+            <if test="plantId != null "> and plant_id = #{plantId}</if>
+            <if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
+            <if test="assemblyCode != null  and assemblyCode != ''"> and assembly_code = #{assemblyCode}</if>
+            <if test="backgroundValue != null  and backgroundValue != ''"> and background_value = #{backgroundValue}</if>
+            <if test="ambientTemp != null  and ambientTemp != ''"> and ambient_temp = #{ambientTemp}</if>
+            <if test="ambientHumidity != null  and ambientHumidity != ''"> and ambient_humidity = #{ambientHumidity}</if>
+            <if test="atmos != null  and atmos != ''"> and atmos = #{atmos}</if>
+            <if test="windDirection != null  and windDirection != ''"> and wind_direction = #{windDirection}</if>
+            <if test="windSpeed != null  and windSpeed != ''"> and wind_speed = #{windSpeed}</if>
+            <if test="tester != null  and tester != ''"> and tester = #{tester}</if>
+            <if test="testTime != null "> and test_time = #{testTime}</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="selectTCheckEnvironmentById" parameterType="Long" resultMap="TCheckEnvironmentResult">
+        <include refid="selectTCheckEnvironmentVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTCheckEnvironment" parameterType="TCheckEnvironment" useGeneratedKeys="true" keyProperty="id">
+        insert into t_check_environment
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="plantId != null">plant_id,</if>
+            <if test="instrumentId != null">instrument_id,</if>
+            <if test="assemblyCode != null">assembly_code,</if>
+            <if test="backgroundValue != null">background_value,</if>
+            <if test="ambientTemp != null">ambient_temp,</if>
+            <if test="ambientHumidity != null">ambient_humidity,</if>
+            <if test="atmos != null">atmos,</if>
+            <if test="windDirection != null">wind_direction,</if>
+            <if test="windSpeed != null">wind_speed,</if>
+            <if test="tester != null">tester,</if>
+            <if test="testTime != null">test_time,</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>
+            <if test="position1 != null">position1,</if>
+            <if test="position2 != null">position2,</if>
+            <if test="position3 != null">position3,</if>
+            <if test="position4 != null">position4,</if>
+            <if test="position5 != null">position5,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="plantId != null">#{plantId},</if>
+            <if test="instrumentId != null">#{instrumentId},</if>
+            <if test="assemblyCode != null">#{assemblyCode},</if>
+            <if test="backgroundValue != null">#{backgroundValue},</if>
+            <if test="ambientTemp != null">#{ambientTemp},</if>
+            <if test="ambientHumidity != null">#{ambientHumidity},</if>
+            <if test="atmos != null">#{atmos},</if>
+            <if test="windDirection != null">#{windDirection},</if>
+            <if test="windSpeed != null">#{windSpeed},</if>
+            <if test="tester != null">#{tester},</if>
+            <if test="testTime != null">#{testTime},</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>
+            <if test="position1 != null">#{position1},</if>
+            <if test="position2 != null">#{position2},</if>
+            <if test="position3 != null">#{position3},</if>
+            <if test="position4 != null">#{position4},</if>
+            <if test="position5 != null">#{position5},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTCheckEnvironment" parameterType="TCheckEnvironment">
+        update t_check_environment
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantId != null">plant_id = #{plantId},</if>
+            <if test="instrumentId != null">instrument_id = #{instrumentId},</if>
+            <if test="assemblyCode != null">assembly_code = #{assemblyCode},</if>
+            <if test="backgroundValue != null">background_value = #{backgroundValue},</if>
+            <if test="ambientTemp != null">ambient_temp = #{ambientTemp},</if>
+            <if test="ambientHumidity != null">ambient_humidity = #{ambientHumidity},</if>
+            <if test="atmos != null">atmos = #{atmos},</if>
+            <if test="windDirection != null">wind_direction = #{windDirection},</if>
+            <if test="windSpeed != null">wind_speed = #{windSpeed},</if>
+            <if test="tester != null">tester = #{tester},</if>
+            <if test="testTime != null">test_time = #{testTime},</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>
+            <if test="position1 != null">position1 = #{position1},</if>
+            <if test="position2 != null">position2 = #{position2},</if>
+            <if test="position3 != null">position3 = #{position3},</if>
+            <if test="position4 != null">position4 = #{position4},</if>
+            <if test="position5 != null">position5 = #{position5},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTCheckEnvironmentById" parameterType="Long">
+        update t_check_environment set del_flag=1 where id = #{id}
+    </delete>
+
+    <delete id="deleteTCheckEnvironmentByIds" parameterType="String">
+        update t_check_environment set del_flag=1 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

BIN
master/src/main/resources/static/template/base/calibration.xlsx


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

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询环境本底值记录列表
+export function listEnvironment(query) {
+  return request({
+    url: '/check/environment/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询环境本底值记录详细
+export function getEnvironment(id) {
+  return request({
+    url: '/check/environment/' + id,
+    method: 'get'
+  })
+}
+
+// 新增环境本底值记录
+export function addEnvironment(data) {
+  return request({
+    url: '/check/environment',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改环境本底值记录
+export function updateEnvironment(data) {
+  return request({
+    url: '/check/environment',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除环境本底值记录
+export function delEnvironment(id) {
+  return request({
+    url: '/check/environment/' + id,
+    method: 'delete'
+  })
+}

BIN
ui/src/assets/images/login-background.jpg


+ 1 - 1
ui/src/assets/styles/variables.scss

@@ -36,7 +36,7 @@ $base-sub-menu-background:#000c17;
 $base-sub-menu-hover:#001528;
 */
 
-$base-sidebar-width: 200px;
+$base-sidebar-width: 215px;
 
 // the :export directive is the magic sauce for webpack
 // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass

+ 107 - 4
ui/src/views/check/calibration/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="仪器类型编号" prop="code">
         <el-input
-          v-model="queryParams.code"
+          v-model="queryParams.instrumentCode"
           placeholder="请输入仪器类型编号"
           clearable
           @change="handleQuery"
@@ -12,7 +12,7 @@
       </el-form-item>
       <el-form-item label="仪器类型名称" prop="name">
         <el-input
-          v-model="queryParams.name"
+          v-model="queryParams.instrumentName"
           placeholder="请输入仪器类型名称"
           clearable
           @change="handleQuery"
@@ -61,6 +61,17 @@
         >删除
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['base:device:add']"
+        >导入
+        </el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -225,6 +236,44 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+          <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
+        </div>
+        <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+          <input name="type" :value="upload.type" hidden/>
+        </form>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm" v-loading.fullscreen.lock="fullscreenLoading">{{
+            $t('确 定')
+          }}
+        </el-button>
+        <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -238,11 +287,29 @@ import {
 } from "@/api/check/calibration";
 import {getAllInstrument} from "@/api/check/instrument";
 import {getAllStandardgases} from "@/api/check/standardgases";
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "Calibration",
   data() {
     return {
+      upload: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: "calibration",
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/check/calibration/importData"
+      },
       instrumentList: [],
       standardgasesList: [],
       yesOrNoOperation: [],
@@ -288,7 +355,9 @@ export default {
         createrCode: null,
         createdate: null,
         updaterCode: null,
-        updatedate: null
+        updatedate: null,
+        instrumentCode:null,
+        instrumentName:null
       },
       // 表单参数
       form: {},
@@ -332,6 +401,40 @@ export default {
     });
   },
   methods: {
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+      this.fullscreenLoading = true;
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = this.$t('用户导入');
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.fullscreenLoading = false;
+      console.log(response)
+      if (response.data === 0) {
+        this.$alert(this.$t('导入失败!') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else if (response.data[0] != null) {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+      this.getList();
+    },
     filterFormat(row, column) {
       return this.selectDictLabel(this.yesOrNoOperation, row.filterCheck);
     },

+ 539 - 0
ui/src/views/check/environment/index.vue

@@ -0,0 +1,539 @@
+<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="plantId">
+        <el-input
+          v-model="queryParams.plantId"
+          placeholder="请输入装置"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="仪器id" prop="instrumentId">
+        <el-input
+          v-model="queryParams.instrumentId"
+          placeholder="请输入仪器id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="检测人员" prop="tester">
+        <el-input
+          v-model="queryParams.tester"
+          placeholder="请输入检测人员"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="检测日期" prop="testTime">
+        <el-date-picker
+          v-model="chooseTime"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
+        </el-date-picker>
+      </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:environment: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:environment: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:environment: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:environment:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="environmentList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" fixed="left"/>
+      <el-table-column label="装置编码" align="center" prop="plantCode" width="100" :show-overflow-tooltip="true"/>
+      <el-table-column label="装置名称" align="center" prop="plantName" width="120" :show-overflow-tooltip="true"/>
+      <el-table-column label="仪器型号" align="center" prop="instrumentModel" width="100"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="仪器编号" align="center" prop="instrumentCode" width="120" :show-overflow-tooltip="true"/>
+      <el-table-column label="组件编码" align="center" prop="assemblyCode" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="环境本底值(ppm)" align="center" prop="backgroundValue" width="130"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="环境温度(℃)" align="center" prop="ambientTemp" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="环境湿度" align="center" prop="ambientHumidity" width="90" :show-overflow-tooltip="true"/>
+      <el-table-column label="大气压(kpa)" align="center" prop="atmos" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="风向" align="center" prop="windDirection" width="90" :show-overflow-tooltip="true"/>
+      <el-table-column label="风速(m/s)" align="center" prop="windSpeed" width="90" :show-overflow-tooltip="true"/>
+      <el-table-column label="检测人员" align="center" prop="tester" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="检测日期" align="center" prop="testTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.testTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="最后维护人" align="center" prop="updater" width="130" :show-overflow-tooltip="true"/>
+      <el-table-column label="维护时间" align="center" prop="updatedate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" width="180" :show-overflow-tooltip="true"/>
+
+      <el-table-column label="操作" align="center" fixed="right" width="130" 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="['check:environment:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['check:environment: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="1000px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="装置" prop="plantId">
+              <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 85%">
+                <el-option
+                  v-for="dict in plantOperation"
+                  :key="dict.id"
+                  :label="dict.plantName"
+                  :value="dict.id"
+                />
+              </el-select>
+              &nbsp;<el-checkbox v-model="checked">特殊</el-checkbox>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <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-col>
+        </el-row>
+        <el-row v-if="checked">
+          <el-col :span="24">
+            <el-form-item label="组件编码" prop="assemblyCode">
+              <el-input v-model="form.assemblyCode" placeholder="请输入组件编码"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="环境温度(℃)" prop="ambientTemp">
+              <el-input v-model="form.ambientTemp" placeholder="请输入环境温度" style="width: 85%"/> ℃
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="环境湿度" prop="ambientHumidity">
+              <el-input v-model="form.ambientHumidity" placeholder="请输入环境湿度" style="width: 85%"/> %RH
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="风速" prop="windSpeed">
+              <el-input v-model="form.windSpeed" placeholder="请输入风速"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="风向(m/s)" prop="windDirection">
+              <el-input v-model="form.windDirection" placeholder="请输入风向" style="width: 85%"/> m/s
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="检测人员" prop="tester">
+              <el-input v-model="form.tester" placeholder="请输入检测人员"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="检测日期" prop="testTime">
+              <el-date-picker clearable
+                              v-model="form.testTime"
+                              type="date"
+                              value-format="yyyy-MM-dd"
+                              placeholder="请选择检测日期"
+                              style="width: 100%"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="位置1检测结果(ppm)" prop="position1" label-width="160px">
+              <el-input-number v-model="form.position1" :precision="1" :step="0.1" @change="getChange"></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="位置2检测结果(ppm)" prop="position2" label-width="160px">
+              <el-input-number v-model="form.position2" :precision="1" :step="0.1" @change="getChange"></el-input-number>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="位置3检测结果(ppm)" prop="position3" label-width="160px">
+              <el-input-number v-model="form.position3" :precision="1" :step="0.1" @change="getChange"></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="位置4检测结果(ppm)" prop="position4" label-width="160px">
+              <el-input-number v-model="form.position4" :precision="1" :step="0.1" @change="getChange"></el-input-number>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="位置5检测结果(ppm)" prop="position5" label-width="160px">
+              <el-input-number v-model="form.position5" :precision="1" :step="0.1" @change="getChange"></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="环境本底值计算结果(ppm)" prop="backgroundValue" label-width="195px">
+              <el-input v-model="form.backgroundValue" disabled placeholder="0.0"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="大气压" prop="atmos">
+              <el-input v-model="form.atmos" placeholder="请输入大气压"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="form.remarks" placeholder="请输入备注"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listEnvironment,
+  getEnvironment,
+  delEnvironment,
+  addEnvironment,
+  updateEnvironment
+} from "@/api/check/environment";
+import {getAllInstrument} from "@/api/check/instrument";
+import {getAllPlantName} from "@/api/base/plant";
+
+export default {
+  name: "Environment",
+  data() {
+    return {
+      checked: false,
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
+      chooseTime: [],
+      plantOperation:[],
+      instrumentList:[],
+      // 页面高度
+      clientHeight: 300,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 环境本底值记录表格数据
+      environmentList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        plantId: null,
+        instrumentId: null,
+        assemblyCode: null,
+        backgroundValue: null,
+        ambientTemp: null,
+        ambientHumidity: null,
+        atmos: null,
+        windDirection: null,
+        windSpeed: null,
+        tester: null,
+        testTime: null,
+        remarks: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        startTime: null,
+        endTime: null,
+
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        plantId: [
+          {required: true, message: '请选择装置', trigger: "blur"}
+        ],
+        instrumentId: [
+          {required: true, message: '请选择仪器', trigger: "blur"}
+        ],
+        backgroundValue: [
+          {required: true, message: this.$t('检测日期') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        assemblyCode: [
+          {required: true, message: this.$t('组件编码') + this.$t('不能为空'), trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    });
+    getAllInstrument().then(response => {
+      this.instrumentList = response.data;
+    });
+    getAllPlantName().then(response => {
+      this.plantOperation = response.data;
+    });
+  },
+  methods: {
+    getChange(){
+      this.form.backgroundValue = ((this.form.position1+this.form.position2+this.form.position3+this.form.position4+this.form.position5)/5).toFixed(1);
+    },
+    /** 查询环境本底值记录列表 */
+    getList() {
+      this.loading = true;
+      listEnvironment(this.queryParams).then(response => {
+        this.environmentList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        plantId: null,
+        instrumentId: null,
+        assemblyCode: null,
+        backgroundValue: 0,
+        ambientTemp: null,
+        ambientHumidity: null,
+        atmos: null,
+        windDirection: null,
+        windSpeed: null,
+        tester: null,
+        testTime: null,
+        remarks: null,
+        deptId: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        position1: 0,
+        position2: 0,
+        position3: 0,
+        position4: 0,
+        position5: 0,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.queryParams.startTime = this.chooseTime[0];
+      this.queryParams.endTime = this.chooseTime[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
+      getEnvironment(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) {
+            updateEnvironment(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addEnvironment(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 delEnvironment(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('check/environment/export', {
+        ...this.queryParams
+      }, `environment_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

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

@@ -72,6 +72,16 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleRecrodExport"
+          v-hasPermi="['check:record:export']"
+        >导出维护记录</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -351,6 +361,11 @@ export default {
         ...this.queryParams
       }, `instrument_${new Date().getTime()}.xlsx`)
     },
+    /** 导出按钮操作 */
+    handleRecrodExport() {
+      this.download('check/record/export', {
+      }, `record_${new Date().getTime()}.xlsx`)
+    },
     getRecordList(row) {
       this.recordVisible = true;
       this.$nextTick(() => {