ly 3 tahun lalu
induk
melakukan
a0a9c71f8f

+ 12 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TStaffmgr.java

@@ -124,6 +124,18 @@ public class TStaffmgr extends BaseEntity
     /** 特殊职能 */
     private String specialDuty;
 
+    /** 离职日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date leftDate;
+
+    public Date getLeftDate() {
+        return leftDate;
+    }
+
+    public void setLeftDate(Date leftDate) {
+        this.leftDate = leftDate;
+    }
+
     public String getEducations() {
         return educations;
     }

+ 17 - 9
master/src/main/java/com/ruoyi/project/sems/controller/TMeasureRecordController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.sems.domain.TMeasureRecord;
 import com.ruoyi.project.sems.domain.TMeasureThickness;
+import com.ruoyi.project.sems.mapper.TMeasureThicknessMapper;
 import com.ruoyi.project.sems.service.ITMeasureRecordService;
 import com.ruoyi.project.sems.service.ITMeasureThicknessService;
 import org.apache.poi.ss.usermodel.Cell;
@@ -20,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.DateFormat;
@@ -41,6 +43,8 @@ public class TMeasureRecordController extends BaseController {
     private ITMeasureRecordService tMeasureRecordService;
     @Autowired
     private ITMeasureThicknessService tMeasureThicknessService;
+    @Resource
+    private TMeasureThicknessMapper tMeasureThicknessMapper;
 
     /**
      * 查询测厚记录列表
@@ -205,13 +209,19 @@ public class TMeasureRecordController extends BaseController {
                     }
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
-                    if (j == 0) {
-                        entity.setMeasureId(cellValue);
-                    } else if (j == 1) {
-                        entity.setMeasureId(entity.getMeasureId() + "," + cellValue);
-                    } else if (j == 2) {
+                    if (j == 0) { //装置
+                        entity.setPlantCode(cellValue);
+                    }else if (j == 1) {//单元
+                        entity.setUnitCode(cellValue);
+                    }else if (j == 2) {//单位内编号
+                        entity.setTagno(cellValue);
+                    }else if (j == 3) {//侧厚部位
+                        entity.setTagno(cellValue);
+                    } else if (j == 4) {//检测编号
+                        entity.setMeasureNo(cellValue);
+                    } else if (j == 5) {//数值
                         entity.setMeasureValue(Double.parseDouble(cellValue));
-                    } else if (j == 3) {
+                    } else if (j == 6) {//时间
                         entity.setMeasureDate(sdf.parse(cellValue));
                     }
                 }
@@ -230,9 +240,7 @@ public class TMeasureRecordController extends BaseController {
             failNum++;
             try {
                 //保存测厚记录
-                String measureId = t.getMeasureId();
-                String[] split = measureId.split(",");
-                Long id = this.tMeasureThicknessService.selectByTagNo(split[0], split[1]);
+                Long id = this.tMeasureThicknessMapper.selectByRecord(t);
                 logger.info(id.toString());
                 t.setMeasureId(id.toString());
                 this.tMeasureRecordService.insertTMeasureRecord(t);

+ 62 - 0
master/src/main/java/com/ruoyi/project/sems/domain/TMeasureRecord.java

@@ -2,6 +2,7 @@ package com.ruoyi.project.sems.domain;
 
 import java.util.Date;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -53,6 +54,67 @@ public class TMeasureRecord extends BaseEntity
     @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date measureDate;
 
+    /** 装置名称 */
+    @TableField(exist = false)
+    private String plantCode;
+
+    /** 单元名称 */
+    @TableField(exist = false)
+    private String unitCode;
+
+    /** 单位内编号 */
+    @TableField(exist = false)
+    private String tagno;
+
+    /** 测厚部位CML */
+    @TableField(exist = false)
+    private String position;
+
+    /** 检测编号 */
+    @TableField(exist = false)
+    private String measureNo;
+
+
+    public String getPlantCode() {
+        return plantCode;
+    }
+
+    public void setPlantCode(String plantCode) {
+        this.plantCode = plantCode;
+    }
+
+    public String getUnitCode() {
+        return unitCode;
+    }
+
+    public void setUnitCode(String unitCode) {
+        this.unitCode = unitCode;
+    }
+
+    public String getTagno() {
+        return tagno;
+    }
+
+    public void setTagno(String tagno) {
+        this.tagno = tagno;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public String getMeasureNo() {
+        return measureNo;
+    }
+
+    public void setMeasureNo(String measureNo) {
+        this.measureNo = measureNo;
+    }
+
     public void setMeasureDate(Date measureDate) {
         this.measureDate = measureDate;
     }

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

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScopePlant;
+import com.ruoyi.project.sems.domain.TMeasureRecord;
 import com.ruoyi.project.sems.domain.TMeasureThickness;
 import org.apache.ibatis.annotations.Param;
 
@@ -31,6 +32,8 @@ public interface TMeasureThicknessMapper {
      */
     public Long selectByTagNo(@Param("tagNo") String tagNo, @Param("position") String position);
 
+    public Long selectByRecord(TMeasureRecord record);
+
     /**
      * 查询定点测厚列表
      *

+ 14 - 0
master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml

@@ -115,6 +115,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     </select>
 
+    <select id="selectByRecord" resultType="Long" parameterType="TMeasureRecord">
+        select id from t_measure_thickness
+        <where>
+            del_flag = 0
+
+            <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
+            <if test="unitCode != null  and unitCode != ''"> and unit_code = #{unitCode}</if>
+            <if test="tagNo != null  and tagNo != ''"> and tagno = #{tagNo}</if>
+            <if test="position != null  and position != ''"> and position = #{position}</if>
+            <if test="measureNo != null  and measureNo != ''"> and measure_no = #{measureNo}</if>
+        </where>
+
+    </select>
+
     <insert id="insertTMeasureThickness" parameterType="TMeasureThickness">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_measure_thickness.NEXTVAL as id FROM DUAL

TEMPAT SAMPAH
master/src/main/resources/static/template/sems/thickness.xlsx


+ 3 - 3
ui/src/views/intact/pump/index.vue

@@ -572,8 +572,8 @@
       <el-table-column label="设备名称" align="center" prop="devname" :show-overflow-tooltip="true"/>
       <el-table-column label="设备位号" align="center" prop="devno" :show-overflow-tooltip="true"/>
          <el-table-column label="档案" align="center" prop="archives" :show-overflow-tooltip="true" >
-       <template slot-scope="scope">  
-      
+       <template slot-scope="scope">
+
          <el-button icon="el-icon-folder" style="color:#6e96fa;"  @click="handleDoc(scope.row)"  ></el-button>
        </template>
       </el-table-column>
@@ -669,7 +669,7 @@
       <el-table-column label="安装位置" align="center" prop="position" :show-overflow-tooltip="true"/>
       <el-table-column label="尺寸" align="center" prop="deviceSize" :show-overflow-tooltip="true"/>
       <el-table-column label="泄空方式" align="center" prop="leakageMode" :show-overflow-tooltip="true"/>
-   
+
       <el-table-column :label="$t('操作')" align="center" fixed="right" width="140" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button