소스 검색

Merge branch 'master' of http://47.114.101.16:7070/ssy/newcpms

 Conflicts:
	master/src/main/java/com/ruoyi/config/ActivitiConfig.java
	master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java
	master/src/main/java/com/ruoyi/project/intact/domain/TIntactYsj.java
	master/src/main/java/com/ruoyi/project/intact/mapper/TIntactGylMapper.java
	master/src/main/java/com/ruoyi/project/intact/mapper/TIntactYsjMapper.java
	master/src/main/java/com/ruoyi/project/intact/service/ITIntactGylService.java
	master/src/main/java/com/ruoyi/project/intact/service/ITIntactYsjService.java
	master/src/main/java/com/ruoyi/project/intact/service/impl/TIntactGylServiceImpl.java
	master/src/main/java/com/ruoyi/project/intact/service/impl/TIntactYsjServiceImpl.java
zhangding 3 년 전
부모
커밋
52cdf40ef9
36개의 변경된 파일2789개의 추가작업 그리고 167개의 파일을 삭제
  1. 3 2
      master/src/main/java/com/ruoyi/config/ActivitiConfig.java
  2. 10 7
      master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java
  3. 310 0
      master/src/main/java/com/ruoyi/project/intact/controller/TApproveMaintenanceController.java
  4. 274 0
      master/src/main/java/com/ruoyi/project/intact/domain/TApproveMaintenance.java
  5. 1 0
      master/src/main/java/com/ruoyi/project/intact/domain/TIntactGyl.java
  6. 0 28
      master/src/main/java/com/ruoyi/project/intact/domain/TIntactYsj.java
  7. 63 0
      master/src/main/java/com/ruoyi/project/intact/mapper/TApproveMaintenanceMapper.java
  8. 1 4
      master/src/main/java/com/ruoyi/project/intact/mapper/TIntactGylMapper.java
  9. 1 4
      master/src/main/java/com/ruoyi/project/intact/mapper/TIntactYsjMapper.java
  10. 61 0
      master/src/main/java/com/ruoyi/project/intact/service/ITApproveMaintenanceService.java
  11. 1 5
      master/src/main/java/com/ruoyi/project/intact/service/ITIntactGylService.java
  12. 1 5
      master/src/main/java/com/ruoyi/project/intact/service/ITIntactYsjService.java
  13. 93 0
      master/src/main/java/com/ruoyi/project/intact/service/impl/TApproveMaintenanceServiceImpl.java
  14. 1 5
      master/src/main/java/com/ruoyi/project/intact/service/impl/TIntactGylServiceImpl.java
  15. 1 5
      master/src/main/java/com/ruoyi/project/intact/service/impl/TIntactYsjServiceImpl.java
  16. 12 0
      master/src/main/java/com/ruoyi/project/plant/domain/TStaffmgr.java
  17. 17 9
      master/src/main/java/com/ruoyi/project/sems/controller/TMeasureRecordController.java
  18. 62 0
      master/src/main/java/com/ruoyi/project/sems/domain/TMeasureRecord.java
  19. 3 0
      master/src/main/java/com/ruoyi/project/sems/mapper/TMeasureThicknessMapper.java
  20. 14 14
      master/src/main/resources/application.yml
  21. 136 0
      master/src/main/resources/mybatis/intact/TApproveMaintenanceMapper.xml
  22. 11 1
      master/src/main/resources/mybatis/intact/TIntactYsjMapper.xml
  23. 3 2
      master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml
  24. 14 0
      master/src/main/resources/mybatis/sems/TMeasureThicknessMapper.xml
  25. 1 1
      master/src/main/resources/mybatis/training/TTrainingMapper.xml
  26. 50 0
      master/src/main/resources/processes/maintenance.bpmn
  27. BIN
      master/src/main/resources/static/template/sems/thickness.xlsx
  28. 26 0
      ui/src/api/intact/approve.js
  29. 670 0
      ui/src/views/approve/approveDetail/specMaintenance-detail.vue
  30. 10 2
      ui/src/views/approve/myapprove/index.vue
  31. 6 0
      ui/src/views/approve/pending/index.vue
  32. 760 0
      ui/src/views/intact/approve/tapprove-maintenance-add.vue
  33. 89 43
      ui/src/views/intact/gyl/index.vue
  34. 3 3
      ui/src/views/intact/pump/index.vue
  35. 76 27
      ui/src/views/intact/ysj/index.vue
  36. 5 0
      ui/src/views/plant/staffmgr/index.vue

+ 3 - 2
master/src/main/java/com/ruoyi/config/ActivitiConfig.java

@@ -122,8 +122,9 @@ public class ActivitiConfig {
         deploymentBuilder7.enableDuplicateFiltering().addInputStream(spec7.getFilename(), spec7.getInputStream()).name("专项培训计划审核").deploy();//按流程id部署
 
         DeploymentBuilder deploymentBuilder8 = repositoryService().createDeployment();
-        Resource spec8 = resourceLoader.getResource("classpath:/processes/intact/intactChangeApplicationProcess.bpmn"); //加载流程图资源文件
-        deploymentBuilder8.enableDuplicateFiltering().addInputStream(spec8.getFilename(), spec8.getInputStream()).name("设备变更申请流程").deploy();//按流程id部署
+        Resource spec8 = resourceLoader.getResource("classpath:/processes/maintenance.bpmn"); //加载流程图资源文件
+        deploymentBuilder8.enableDuplicateFiltering().addInputStream(spec8.getFilename(), spec8.getInputStream()).name("设备维修审核").deploy();//按流程id部署
+
     }
 }
 

+ 10 - 7
master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java

@@ -17,8 +17,8 @@ import com.ruoyi.project.common.domain.TCommonfile;
 import com.ruoyi.project.common.service.ITCommonfileService;
 import com.ruoyi.project.ehs.domain.TApproveAccident;
 import com.ruoyi.project.ehs.service.ITApproveAccidentService;
-import com.ruoyi.project.intact.domain.TIntactApprove;
-import com.ruoyi.project.intact.service.ITIntactApproveService;
+import com.ruoyi.project.intact.domain.TApproveMaintenance;
+import com.ruoyi.project.intact.service.ITApproveMaintenanceService;
 import com.ruoyi.project.listener.*;
 import com.ruoyi.project.sems.domain.TApprove;
 import com.ruoyi.project.sems.his.domain.TApproveSpecModify;
@@ -100,7 +100,7 @@ public class TApproveDangerController extends BaseController
     @Autowired
     private RepositoryService repositoryService;
     @Autowired
-    private ITIntactApproveService tIntactApproveService;
+    private ITApproveMaintenanceService tApproveMaintenanceService;
     /**
      * 任务申请
      */
@@ -247,6 +247,10 @@ public class TApproveDangerController extends BaseController
                     TStApprove approve = tStApproveService.selectTStApproveById(Long.parseLong(pi.getBusinessKey()));
                     devProcess.setApproveObject(approve);
                     devProcess.setApNo(approve.getApNo());
+                }else if(pi.getProcessDefinitionName().equals("设备维修审批流程")){
+                    TApproveMaintenance approve = tApproveMaintenanceService.selectTApproveMaintenanceById(Long.parseLong(pi.getBusinessKey()));
+                    devProcess.setApproveObject(approve);
+                    devProcess.setApNo(approve.getApNo());
                 }
                 devProcess.setBusinessKey(pi.getBusinessKey());
                 devProcess.setProcessCreateTime(pi.getStartTime());
@@ -330,13 +334,12 @@ public class TApproveDangerController extends BaseController
                     logger.info("专项培训计划审核" +JSON.toJSONString(approve));
                     devTask.setApproveObj(approve);
                     devTask.setApNo(approve.getApNo());
-                }else if (pi.getProcessDefinitionName().equals("设备变更申请流程")) {
-                    TIntactApprove approve = tIntactApproveService.selectTIntactApproveById(Long.parseLong(pi.getBusinessKey()));
-                    logger.info("设备变更申请流程" +JSON.toJSONString(approve));
+                }else if (pi.getProcessDefinitionName().equals("设备维修审批流程")) {
+                    TApproveMaintenance approve = tApproveMaintenanceService.selectTApproveMaintenanceById(Long.parseLong(pi.getBusinessKey()));
+                    logger.info("设备维修审批流程" +JSON.toJSONString(approve));
                     devTask.setApproveObj(approve);
                     devTask.setApNo(approve.getApNo());
                 }
-
                 list.add(devTask);
             }
         }

+ 310 - 0
master/src/main/java/com/ruoyi/project/intact/controller/TApproveMaintenanceController.java

@@ -0,0 +1,310 @@
+package com.ruoyi.project.intact.controller;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.project.approve.damain.DevTask;
+import com.ruoyi.project.intact.domain.TIntactGyl;
+import com.ruoyi.project.intact.domain.TIntactYsj;
+import com.ruoyi.project.intact.service.*;
+import com.ruoyi.project.sems.domain.*;
+import com.ruoyi.project.sems.his.domain.*;
+import org.activiti.engine.*;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.project.intact.domain.TApproveMaintenance;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.web.page.TableDataInfo;
+
+/**
+ * 设备完整性维修申请Controller
+ *
+ * @author ruoyi
+ * @date 2022-06-27
+ */
+@RestController
+@RequestMapping("/intact/maintenance")
+public class TApproveMaintenanceController extends BaseController
+{
+    @Autowired
+    private ITApproveMaintenanceService tApproveMaintenanceService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    private HistoryService historyService;
+    @Autowired
+    private TaskService taskService;
+
+    @Autowired
+    private ITIntactGylService gylService;
+    @Autowired
+    private ITIntactYsjService ysjService;
+    @Autowired
+    private ITIntactGjService gjService;
+    @Autowired
+    private ITIntactPumpService pumpService;
+
+    /**
+     * 查询设备完整性维修申请列表
+     */
+    @PreAuthorize("@ss.hasPermi('intact:maintenance:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TApproveMaintenance tApproveMaintenance)
+    {
+        startPage();
+        List<TApproveMaintenance> list = tApproveMaintenanceService.selectTApproveMaintenanceList(tApproveMaintenance);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备完整性维修申请列表
+     */
+    @PreAuthorize("@ss.hasPermi('intact:maintenance:export')")
+    @Log(title = "设备完整性维修申请", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TApproveMaintenance tApproveMaintenance)
+    {
+        List<TApproveMaintenance> list = tApproveMaintenanceService.selectTApproveMaintenanceList(tApproveMaintenance);
+        ExcelUtil<TApproveMaintenance> util = new ExcelUtil<TApproveMaintenance>(TApproveMaintenance.class);
+        return util.exportExcel(list, "maintenance");
+    }
+
+    /**
+     * 获取设备完整性维修申请详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('intact:maintenance:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tApproveMaintenanceService.selectTApproveMaintenanceById(id));
+    }
+
+    /**
+     * 获取特种设备变更申请详细信息
+     */
+    @GetMapping(value = "info/{id}")
+    public AjaxResult info(@PathVariable("id") Long id)
+    {
+        TApproveMaintenance tApprove = tApproveMaintenanceService.selectTApproveMaintenanceById(id);
+        String[] ids;
+        ids = tApprove.getDevId().split(",");
+        List<Object> devList = new ArrayList<>();
+        switch (Integer.parseInt(tApprove.getDevType().toString())) {
+            case 1:
+                for (String i : ids
+                ) {
+                    TIntactGyl gylEntity = gylService.getById(i);
+                    devList.add(gylEntity);
+                }
+                break;
+            case 2:
+                for (String i : ids
+                ) {
+                    TIntactYsj ysjEntity = ysjService.getById(i);
+                    devList.add(ysjEntity);
+                }
+                break;
+//            case 3:
+//                for (String i : ids
+//                ) {
+//                    TSpecdevDzsb dzsbEntity = tSpecdevDzsbService.getById(i);
+//                    devList.add(dzsbEntity);
+//                }
+//                break;
+//            case 4:
+//                for (String i : ids
+//                ) {
+//                    TSpecdevGl glEntity = tSpecdevGlService.getById(i);
+//                    devList.add(glEntity);
+//                }
+//                break;
+            default:
+                break;
+        }
+        tApprove.setDevList(devList);
+        return AjaxResult.success(tApprove);
+    }
+
+    /**
+     * 新增设备完整性维修申请
+     */
+//    @PreAuthorize("@ss.hasPermi('intact:maintenance:add')")
+    @Log(title = "设备完整性维修申请", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TApproveMaintenance tApproveMaintenance)
+    {
+        Long userid = getUserId();
+        tApproveMaintenance.setUserId(userid);
+//        tApproveSpecModify.setApNo(tApproveSpecModify.getHisId().toString());
+        //审批编号
+        Date dt = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
+        String data = sdf.format(dt) + userid;
+        tApproveMaintenance.setApNo(data);
+        //
+        Authentication.setAuthenticatedUserId(userid.toString());
+        tApproveMaintenanceService.insertTApproveMaintenance(tApproveMaintenance);
+        long bussniseeKey = tApproveMaintenance.getId();
+        String[] ids;
+        ids = tApproveMaintenance.getDevId().split(",");
+        switch (Integer.parseInt(tApproveMaintenance.getDevType().toString())){
+            case 1:
+                for (String i : ids
+                ) {
+                    TIntactGyl gylEntity = gylService.getById(i);
+//                    gylEntity.setApproveStatus(tApproveMaintenance.getApproveType()+ 19);
+                    gylEntity.setApproveTime(new Date());
+                    gylService.updateById(gylEntity);
+                }
+                break;
+            case 2:
+                for (String i : ids
+                ) {
+                    TIntactYsj ysjEntity = ysjService.getById(i);
+//                    ylgdEntity.setApproveStatus(tApproveSpecModify.getApproveType() + 19);
+                    ysjEntity.setApproveTime(new Date());
+                    ysjService.updateById(ysjEntity);
+                }
+                break;
+//            case 3:
+//                for (String i : ids
+//                ) {
+//                    TSpecdevDzsb dzsbEntity = tSpecdevDzsbService.getById(i);
+//                    dzsbEntity.setApproveStatus(tApproveSpecModify.getApproveType()+ 19);
+//                    dzsbEntity.setApproveTime(new Date());
+//                    tSpecdevDzsbService.updateById(dzsbEntity);
+//                }
+//                break;
+//            case 4:
+//                for (String i : ids
+//                ) {
+//                    TSpecdevGl glEntity = tSpecdevGlService.getById(i);
+//                    glEntity.setApproveStatus(tApproveSpecModify.getApproveType()+ 19);
+//                    glEntity.setApproveTime(new Date());
+//                    tSpecdevGlService.updateById(glEntity);
+//                }
+//                break;
+            default:
+                break;
+        }
+        //开始工作流、监听
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("applyUser", userid.toString());
+        variables.put("wxjlusers", tApproveMaintenance.getWxjl());
+        //采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("maintenance", String.valueOf(bussniseeKey), variables);
+        logger.info("流程部署id:" + pi.getDeploymentId());
+        logger.info("流程定义id:" + pi.getProcessDefinitionId());
+        logger.info("流程实例id:" + pi.getProcessInstanceId());
+        tApproveMaintenance.setProcessId(pi.getProcessInstanceId());
+        tApproveMaintenanceService.updateTApproveMaintenance(tApproveMaintenance);
+        return AjaxResult.success();
+    }
+
+    @Log(title = "设备完整性维修审核处理", businessType = BusinessType.UPDATE)
+    @PutMapping("/handle")
+    public AjaxResult handle(@RequestBody DevTask devTask) {
+        //流程审批意见
+        String symbol= "";
+        if (devTask.getComment() != "") {
+            symbol = ",";
+        }
+        //使用任务服务完成任务(提交任务)
+        String taskId = devTask.getTaskId();
+        // 使用任务id,获取任务对象,获取流程实例id
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+        //利用任务对象,获取流程实例id
+        String processInstancesId = task.getProcessInstanceId();
+        TApproveMaintenance tApproveMaintenance = tApproveMaintenanceService.selectTApproveMaintenanceById(Long.parseLong(devTask.getBusinessKey()));
+        if (devTask.getCondition().equals("1")) {
+            devTask.setComment("通过" + symbol + devTask.getComment());
+            tApproveMaintenance.setStatus(1L);
+        }else if (devTask.getCondition().equals("0")) {
+            devTask.setComment("未通过" + symbol + devTask.getComment());
+            tApproveMaintenance.setStatus(2L);
+        }
+        String[] ids;
+        ids = tApproveMaintenance.getDevId().split(",");
+        switch (Integer.parseInt(tApproveMaintenance.getDevType().toString())){
+            case 1://修改工业炉台账
+                for (String i : ids
+                ) {
+                    TIntactGyl gylEntity = gylService.getById(i);
+                    gylEntity.setApproveStatus(0L);
+                    gylService.updateById(gylEntity);
+                    tApproveMaintenanceService.updateTApproveMaintenance(tApproveMaintenance);
+                }
+                break;
+//            case 2://修改压力管道台账
+//                for (String i : ids
+//                ) {
+//
+//                }
+//                break;
+//            case 3:
+//                for (String i : ids
+//                ) {
+//
+//                }
+//                break;
+//            case 4:
+//                for (String i : ids
+//                ) {
+//
+//                }
+//                break;
+            default:
+                break;
+        }
+        Map<String, Object> param = new HashMap<>();
+        param.put("condition", devTask.getCondition());
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        //认领任务
+        processEngine.getTaskService()
+                .claim(taskId, getUserId().toString());
+        taskService.addComment(taskId, processInstancesId, devTask.getComment());
+        taskService.complete(taskId, param);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 修改设备完整性维修申请
+     */
+    @PreAuthorize("@ss.hasPermi('intact:maintenance:edit')")
+    @Log(title = "设备完整性维修申请", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TApproveMaintenance tApproveMaintenance)
+    {
+        return toAjax(tApproveMaintenanceService.updateTApproveMaintenance(tApproveMaintenance));
+    }
+
+    /**
+     * 删除设备完整性维修申请
+     */
+    @PreAuthorize("@ss.hasPermi('intact:maintenance:remove')")
+    @Log(title = "设备完整性维修申请", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tApproveMaintenanceService.deleteTApproveMaintenanceByIds(ids));
+    }
+}

+ 274 - 0
master/src/main/java/com/ruoyi/project/intact/domain/TApproveMaintenance.java

@@ -0,0 +1,274 @@
+package com.ruoyi.project.intact.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 设备完整性维修申请对象 t_approve_maintenance
+ *
+ * @author ruoyi
+ * @date 2022-06-27
+ */
+public class TApproveMaintenance extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 申请人id */
+    @Excel(name = "申请人id")
+    private Long userId;
+
+    /** 设备ids */
+    @Excel(name = "设备ids")
+    private String devId;
+
+    /** 设备类型: */
+    @Excel(name = "设备类型:")
+    private Long devType;
+
+    /** 审批类型 */
+    @Excel(name = "审批类型")
+    private Long approveType;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    private String content;
+
+    /** 附件url */
+    @Excel(name = "附件url")
+    private String fileUrls;
+
+    /** 申请状态 0:审批中 1-通过 2-拒绝 */
+    @Excel(name = "申请状态 0:审批中 1-通过 2-拒绝")
+    private Long status;
+
+    /** 开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date creattime;
+
+    /** 结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date endtime;
+
+    /** 流程id */
+    @Excel(name = "流程id")
+    private String processId;
+
+    /** 申请编号(唯一) */
+    @Excel(name = "申请编号", readConverterExp = "唯=一")
+    private String apNo;
+
+    /** 报告ids */
+    @Excel(name = "报告ids")
+    private String reportId;
+
+    /** 月报告ids */
+    @Excel(name = "月报告ids")
+    private String monthId;
+
+    /** 删除标识 */
+    private Long delFlag;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    private Long wxjl;
+
+    @TableField(exist = false)
+    private List<Object> devList;
+
+    public List<Object> getDevList() {
+        return devList;
+    }
+
+    public void setDevList(List<Object> devList) {
+        this.devList = devList;
+    }
+
+    public Long getWxjl() {
+        return wxjl;
+    }
+
+    public void setWxjl(Long wxjl) {
+        this.wxjl = wxjl;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setUserId(Long userId)
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId()
+    {
+        return userId;
+    }
+    public void setDevId(String devId)
+    {
+        this.devId = devId;
+    }
+
+    public String getDevId()
+    {
+        return devId;
+    }
+    public void setDevType(Long devType)
+    {
+        this.devType = devType;
+    }
+
+    public Long getDevType()
+    {
+        return devType;
+    }
+    public void setApproveType(Long approveType)
+    {
+        this.approveType = approveType;
+    }
+
+    public Long getApproveType()
+    {
+        return approveType;
+    }
+    public void setContent(String content)
+    {
+        this.content = content;
+    }
+
+    public String getContent()
+    {
+        return content;
+    }
+    public void setFileUrls(String fileUrls)
+    {
+        this.fileUrls = fileUrls;
+    }
+
+    public String getFileUrls()
+    {
+        return fileUrls;
+    }
+    public void setStatus(Long status)
+    {
+        this.status = status;
+    }
+
+    public Long getStatus()
+    {
+        return status;
+    }
+    public void setCreattime(Date creattime)
+    {
+        this.creattime = creattime;
+    }
+
+    public Date getCreattime()
+    {
+        return creattime;
+    }
+    public void setEndtime(Date endtime)
+    {
+        this.endtime = endtime;
+    }
+
+    public Date getEndtime()
+    {
+        return endtime;
+    }
+    public void setProcessId(String processId)
+    {
+        this.processId = processId;
+    }
+
+    public String getProcessId()
+    {
+        return processId;
+    }
+    public void setApNo(String apNo)
+    {
+        this.apNo = apNo;
+    }
+
+    public String getApNo()
+    {
+        return apNo;
+    }
+    public void setReportId(String reportId)
+    {
+        this.reportId = reportId;
+    }
+
+    public String getReportId()
+    {
+        return reportId;
+    }
+    public void setMonthId(String monthId)
+    {
+        this.monthId = monthId;
+    }
+
+    public String getMonthId()
+    {
+        return monthId;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("userId", getUserId())
+            .append("devId", getDevId())
+            .append("devType", getDevType())
+            .append("approveType", getApproveType())
+            .append("content", getContent())
+            .append("fileUrls", getFileUrls())
+            .append("status", getStatus())
+            .append("creattime", getCreattime())
+            .append("endtime", getEndtime())
+            .append("processId", getProcessId())
+            .append("apNo", getApNo())
+            .append("reportId", getReportId())
+            .append("monthId", getMonthId())
+            .append("delFlag", getDelFlag())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 1 - 0
master/src/main/java/com/ruoyi/project/intact/domain/TIntactGyl.java

@@ -232,6 +232,7 @@ public class TIntactGyl extends BaseEntity
 
     /** 档案 */
     @Excel(name = "档案")
+    @TableField(exist = false)
     private String archives;
 
     /** 部门名称 */

+ 0 - 28
master/src/main/java/com/ruoyi/project/intact/domain/TIntactYsj.java

@@ -120,14 +120,6 @@ public class TIntactYsj extends BaseEntity
     @TableField(exist = false)
     private String deptName;
 
-    /** 审核状态 */
-    @Excel(name = "审核状态")
-    private Long approveStatus;
-
-    /** 最新申请时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "最新申请时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date approveTime;
 
 
 
@@ -357,26 +349,6 @@ public class TIntactYsj extends BaseEntity
         return archives;
     }
 
-    public void setApproveStatus(Long approveStatus)
-    {
-        this.approveStatus = approveStatus;
-    }
-
-    public Long getApproveStatus()
-    {
-        return approveStatus;
-    }
-
-    public void setApproveTime(Date approveTime)
-    {
-        this.approveTime = approveTime;
-    }
-
-    public Date getApproveTime()
-    {
-        return approveTime;
-    }
-
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 63 - 0
master/src/main/java/com/ruoyi/project/intact/mapper/TApproveMaintenanceMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.intact.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.intact.domain.TApproveMaintenance;
+
+/**
+ * 设备完整性维修申请Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-06-27
+ */
+public interface TApproveMaintenanceMapper 
+{
+    /**
+     * 查询设备完整性维修申请
+     * 
+     * @param id 设备完整性维修申请ID
+     * @return 设备完整性维修申请
+     */
+    public TApproveMaintenance selectTApproveMaintenanceById(Long id);
+
+    /**
+     * 查询设备完整性维修申请列表
+     * 
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 设备完整性维修申请集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TApproveMaintenance> selectTApproveMaintenanceList(TApproveMaintenance tApproveMaintenance);
+
+    /**
+     * 新增设备完整性维修申请
+     * 
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 结果
+     */
+    public int insertTApproveMaintenance(TApproveMaintenance tApproveMaintenance);
+
+    /**
+     * 修改设备完整性维修申请
+     * 
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 结果
+     */
+    public int updateTApproveMaintenance(TApproveMaintenance tApproveMaintenance);
+
+    /**
+     * 删除设备完整性维修申请
+     * 
+     * @param id 设备完整性维修申请ID
+     * @return 结果
+     */
+    public int deleteTApproveMaintenanceById(Long id);
+
+    /**
+     * 批量删除设备完整性维修申请
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTApproveMaintenanceByIds(Long[] ids);
+}

+ 1 - 4
master/src/main/java/com/ruoyi/project/intact/mapper/TIntactGylMapper.java

@@ -1,10 +1,7 @@
 package com.ruoyi.project.intact.mapper;
 
 import java.util.List;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
-import com.ruoyi.project.intact.domain.TIntactApprove;
 import com.ruoyi.project.intact.domain.TIntactGyl;
 
 /**
@@ -13,7 +10,7 @@ import com.ruoyi.project.intact.domain.TIntactGyl;
  * @author ruoyi
  * @date 2022-06-21
  */
-public interface TIntactGylMapper  extends BaseMapper<TIntactGyl>
+public interface TIntactGylMapper 
 {
     /**
      * 查询设备完整性工业炉台账

+ 1 - 4
master/src/main/java/com/ruoyi/project/intact/mapper/TIntactYsjMapper.java

@@ -1,10 +1,7 @@
 package com.ruoyi.project.intact.mapper;
 
 import java.util.List;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
-import com.ruoyi.project.intact.domain.TIntactApprove;
 import com.ruoyi.project.intact.domain.TIntactYsj;
 
 /**
@@ -13,7 +10,7 @@ import com.ruoyi.project.intact.domain.TIntactYsj;
  * @author ruoyi
  * @date 2022-06-21
  */
-public interface TIntactYsjMapper  extends BaseMapper<TIntactYsj>
+public interface TIntactYsjMapper 
 {
     /**
      * 查询设备完整性压缩机台账

+ 61 - 0
master/src/main/java/com/ruoyi/project/intact/service/ITApproveMaintenanceService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.intact.service;
+
+import java.util.List;
+import com.ruoyi.project.intact.domain.TApproveMaintenance;
+
+/**
+ * 设备完整性维修申请Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-06-27
+ */
+public interface ITApproveMaintenanceService 
+{
+    /**
+     * 查询设备完整性维修申请
+     * 
+     * @param id 设备完整性维修申请ID
+     * @return 设备完整性维修申请
+     */
+    public TApproveMaintenance selectTApproveMaintenanceById(Long id);
+
+    /**
+     * 查询设备完整性维修申请列表
+     * 
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 设备完整性维修申请集合
+     */
+    public List<TApproveMaintenance> selectTApproveMaintenanceList(TApproveMaintenance tApproveMaintenance);
+
+    /**
+     * 新增设备完整性维修申请
+     * 
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 结果
+     */
+    public int insertTApproveMaintenance(TApproveMaintenance tApproveMaintenance);
+
+    /**
+     * 修改设备完整性维修申请
+     * 
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 结果
+     */
+    public int updateTApproveMaintenance(TApproveMaintenance tApproveMaintenance);
+
+    /**
+     * 批量删除设备完整性维修申请
+     * 
+     * @param ids 需要删除的设备完整性维修申请ID
+     * @return 结果
+     */
+    public int deleteTApproveMaintenanceByIds(Long[] ids);
+
+    /**
+     * 删除设备完整性维修申请信息
+     * 
+     * @param id 设备完整性维修申请ID
+     * @return 结果
+     */
+    public int deleteTApproveMaintenanceById(Long id);
+}

+ 1 - 5
master/src/main/java/com/ruoyi/project/intact/service/ITIntactGylService.java

@@ -1,11 +1,7 @@
 package com.ruoyi.project.intact.service;
 
 import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.intact.domain.TIntactGyl;
-import com.ruoyi.project.intact.domain.TIntactPump;
-import com.ruoyi.project.sems.domain.TSpecdevYlrq;
 
 /**
  * 设备完整性工业炉台账Service接口
@@ -13,7 +9,7 @@ import com.ruoyi.project.sems.domain.TSpecdevYlrq;
  * @author ruoyi
  * @date 2022-06-21
  */
-public interface ITIntactGylService extends IService<TIntactGyl>
+public interface ITIntactGylService 
 {
     /**
      * 查询设备完整性工业炉台账

+ 1 - 5
master/src/main/java/com/ruoyi/project/intact/service/ITIntactYsjService.java

@@ -1,11 +1,7 @@
 package com.ruoyi.project.intact.service;
 
 import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.project.intact.domain.TIntactPump;
 import com.ruoyi.project.intact.domain.TIntactYsj;
-import com.ruoyi.project.sems.domain.TSpecdevYlrq;
 
 /**
  * 设备完整性压缩机台账Service接口
@@ -13,7 +9,7 @@ import com.ruoyi.project.sems.domain.TSpecdevYlrq;
  * @author ruoyi
  * @date 2022-06-21
  */
-public interface ITIntactYsjService  extends IService<TIntactYsj>
+public interface ITIntactYsjService 
 {
     /**
      * 查询设备完整性压缩机台账

+ 93 - 0
master/src/main/java/com/ruoyi/project/intact/service/impl/TApproveMaintenanceServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.intact.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.intact.mapper.TApproveMaintenanceMapper;
+import com.ruoyi.project.intact.domain.TApproveMaintenance;
+import com.ruoyi.project.intact.service.ITApproveMaintenanceService;
+
+/**
+ * 设备完整性维修申请Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-06-27
+ */
+@Service
+public class TApproveMaintenanceServiceImpl implements ITApproveMaintenanceService
+{
+    @Autowired
+    private TApproveMaintenanceMapper tApproveMaintenanceMapper;
+
+    /**
+     * 查询设备完整性维修申请
+     *
+     * @param id 设备完整性维修申请ID
+     * @return 设备完整性维修申请
+     */
+    @Override
+    public TApproveMaintenance selectTApproveMaintenanceById(Long id)
+    {
+        return tApproveMaintenanceMapper.selectTApproveMaintenanceById(id);
+    }
+
+    /**
+     * 查询设备完整性维修申请列表
+     *
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 设备完整性维修申请
+     */
+    @Override
+    public List<TApproveMaintenance> selectTApproveMaintenanceList(TApproveMaintenance tApproveMaintenance)
+    {
+        return tApproveMaintenanceMapper.selectTApproveMaintenanceList(tApproveMaintenance);
+    }
+
+    /**
+     * 新增设备完整性维修申请
+     *
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 结果
+     */
+    @Override
+    public int insertTApproveMaintenance(TApproveMaintenance tApproveMaintenance)
+    {
+        return tApproveMaintenanceMapper.insertTApproveMaintenance(tApproveMaintenance);
+    }
+
+    /**
+     * 修改设备完整性维修申请
+     *
+     * @param tApproveMaintenance 设备完整性维修申请
+     * @return 结果
+     */
+    @Override
+    public int updateTApproveMaintenance(TApproveMaintenance tApproveMaintenance)
+    {
+        return tApproveMaintenanceMapper.updateTApproveMaintenance(tApproveMaintenance);
+    }
+
+    /**
+     * 批量删除设备完整性维修申请
+     *
+     * @param ids 需要删除的设备完整性维修申请ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTApproveMaintenanceByIds(Long[] ids)
+    {
+        return tApproveMaintenanceMapper.deleteTApproveMaintenanceByIds(ids);
+    }
+
+    /**
+     * 删除设备完整性维修申请信息
+     *
+     * @param id 设备完整性维修申请ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTApproveMaintenanceById(Long id)
+    {
+        return tApproveMaintenanceMapper.deleteTApproveMaintenanceById(id);
+    }
+}

+ 1 - 5
master/src/main/java/com/ruoyi/project/intact/service/impl/TIntactGylServiceImpl.java

@@ -1,10 +1,6 @@
 package com.ruoyi.project.intact.service.impl;
 
 import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.project.sems.domain.TApprove;
-import com.ruoyi.project.sems.mapper.TApproveMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.intact.mapper.TIntactGylMapper;
@@ -18,7 +14,7 @@ import com.ruoyi.project.intact.service.ITIntactGylService;
  * @date 2022-06-21
  */
 @Service
-public class TIntactGylServiceImpl extends ServiceImpl<TIntactGylMapper, TIntactGyl> implements ITIntactGylService
+public class TIntactGylServiceImpl implements ITIntactGylService
 {
     @Autowired
     private TIntactGylMapper tIntactGylMapper;

+ 1 - 5
master/src/main/java/com/ruoyi/project/intact/service/impl/TIntactYsjServiceImpl.java

@@ -1,10 +1,6 @@
 package com.ruoyi.project.intact.service.impl;
 
 import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.project.sems.domain.TApprove;
-import com.ruoyi.project.sems.mapper.TApproveMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.intact.mapper.TIntactYsjMapper;
@@ -18,7 +14,7 @@ import com.ruoyi.project.intact.service.ITIntactYsjService;
  * @date 2022-06-21
  */
 @Service
-public class TIntactYsjServiceImpl extends ServiceImpl<TIntactYsjMapper, TIntactYsj> implements ITIntactYsjService
+public class TIntactYsjServiceImpl implements ITIntactYsjService
 {
     @Autowired
     private TIntactYsjMapper tIntactYsjMapper;

+ 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 - 14
master/src/main/resources/application.yml

@@ -93,24 +93,24 @@ spring:
         max-wait: -1ms
   # 邮箱配置
   mail:
-#    host: smtpout.basf-it-services.com
-#    protocol: smtp
-#    default-encoding: UTF-8
-#    password:
-#    username:
-#    port: 25
-#    properties.mail.stmp.socketFactory.class: javax.net.ssl.SSLSocketFactory
-#    properties.mail.debug: true
-#    from: CPMS.byc@BASF-YPC.com.cn
-    host: smtp.exmail.qq.com
+    host: smtpout.basf-it-services.com
     protocol: smtp
     default-encoding: UTF-8
-    password: vvTAT8hciG7FLk4C
-    username: email@seashoreept.com
-    port: 587
+    password:
+    username:
+    port: 25
     properties.mail.stmp.socketFactory.class: javax.net.ssl.SSLSocketFactory
     properties.mail.debug: true
-    from: email@seashoreept.com
+    from: CPMS.byc@BASF-YPC.com.cn
+#    host: smtp.exmail.qq.com
+#    protocol: smtp
+#    default-encoding: UTF-8
+#    password: vvTAT8hciG7FLk4C
+#    username: email@seashoreept.com
+#    port: 587
+#    properties.mail.stmp.socketFactory.class: javax.net.ssl.SSLSocketFactory
+#    properties.mail.debug: true
+#    from: email@seashoreept.com
 # token配置
 token:
     # 令牌自定义标识

+ 136 - 0
master/src/main/resources/mybatis/intact/TApproveMaintenanceMapper.xml

@@ -0,0 +1,136 @@
+<?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.intact.mapper.TApproveMaintenanceMapper">
+    
+    <resultMap type="TApproveMaintenance" id="TApproveMaintenanceResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="devId"    column="dev_id"    />
+        <result property="devType"    column="dev_type"    />
+        <result property="approveType"    column="approve_type"    />
+        <result property="content"    column="content"    />
+        <result property="fileUrls"    column="file_urls"    />
+        <result property="status"    column="status"    />
+        <result property="creattime"    column="creattime"    />
+        <result property="endtime"    column="endtime"    />
+        <result property="processId"    column="process_id"    />
+        <result property="apNo"    column="ap_no"    />
+        <result property="reportId"    column="report_id"    />
+        <result property="monthId"    column="month_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTApproveMaintenanceVo">
+        select d.id, d.user_id, d.dev_id, d.dev_type, d.approve_type, d.content, d.file_urls, d.status, d.creattime, d.endtime, d.process_id, d.ap_no, d.report_id, d.month_id, d.del_flag, d.dept_id ,s.dept_name from t_approve_maintenance d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTApproveMaintenanceList" parameterType="TApproveMaintenance" resultMap="TApproveMaintenanceResult">
+        <include refid="selectTApproveMaintenanceVo"/>
+        <where>  
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="devId != null  and devId != ''"> and dev_id = #{devId}</if>
+            <if test="devType != null "> and dev_type = #{devType}</if>
+            <if test="approveType != null "> and approve_type = #{approveType}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="fileUrls != null  and fileUrls != ''"> and file_urls = #{fileUrls}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="creattime != null "> and creattime = #{creattime}</if>
+            <if test="endtime != null "> and endtime = #{endtime}</if>
+            <if test="processId != null  and processId != ''"> and process_id = #{processId}</if>
+            <if test="apNo != null  and apNo != ''"> and ap_no = #{apNo}</if>
+            <if test="reportId != null  and reportId != ''"> and report_id = #{reportId}</if>
+            <if test="monthId != null  and monthId != ''"> and month_id = #{monthId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTApproveMaintenanceById" parameterType="Long" resultMap="TApproveMaintenanceResult">
+        <include refid="selectTApproveMaintenanceVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTApproveMaintenance" parameterType="TApproveMaintenance">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_approve_maintenance.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_approve_maintenance
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="devId != null">dev_id,</if>
+            <if test="devType != null">dev_type,</if>
+            <if test="approveType != null">approve_type,</if>
+            <if test="content != null">content,</if>
+            <if test="fileUrls != null">file_urls,</if>
+            <if test="status != null">status,</if>
+            <if test="creattime != null">creattime,</if>
+            <if test="endtime != null">endtime,</if>
+            <if test="processId != null">process_id,</if>
+            <if test="apNo != null">ap_no,</if>
+            <if test="reportId != null">report_id,</if>
+            <if test="monthId != null">month_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="deptId != null">dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="devId != null">#{devId},</if>
+            <if test="devType != null">#{devType},</if>
+            <if test="approveType != null">#{approveType},</if>
+            <if test="content != null">#{content},</if>
+            <if test="fileUrls != null">#{fileUrls},</if>
+            <if test="status != null">#{status},</if>
+            <if test="creattime != null">#{creattime},</if>
+            <if test="endtime != null">#{endtime},</if>
+            <if test="processId != null">#{processId},</if>
+            <if test="apNo != null">#{apNo},</if>
+            <if test="reportId != null">#{reportId},</if>
+            <if test="monthId != null">#{monthId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="deptId != null">#{deptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTApproveMaintenance" parameterType="TApproveMaintenance">
+        update t_approve_maintenance
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="devId != null">dev_id = #{devId},</if>
+            <if test="devType != null">dev_type = #{devType},</if>
+            <if test="approveType != null">approve_type = #{approveType},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="fileUrls != null">file_urls = #{fileUrls},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="creattime != null">creattime = #{creattime},</if>
+            <if test="endtime != null">endtime = #{endtime},</if>
+            <if test="processId != null">process_id = #{processId},</if>
+            <if test="apNo != null">ap_no = #{apNo},</if>
+            <if test="reportId != null">report_id = #{reportId},</if>
+            <if test="monthId != null">month_id = #{monthId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTApproveMaintenanceById" parameterType="Long">
+        update t_approve_maintenance set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTApproveMaintenanceByIds" parameterType="String">
+        update t_approve_maintenance set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 11 - 1
master/src/main/resources/mybatis/intact/TIntactYsjMapper.xml

@@ -30,10 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updatedate"    column="updatedate"    />
         <result property="deptId"    column="dept_id"    />
         <result property="deptName" column="dept_name" />
+        <result property="approveTime" column="approve_time" />
+        <result property="approveStatus" column="approve_status" />
     </resultMap>
 
     <sql id="selectTIntactYsjVo">
-        select d.id, d.type, d.plant_code, d.unit, d.devname, d.devno, d.position, d.device_size, d.des_pressure, d.des_temp, d.opt_pressure, d.opt_temp, d.medium, d.leakage_mode, d.data_no, d.book_no, d.manufactor, d.remark, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id ,s.dept_name from t_intact_ysj d
+        select d.id, d.type, d.plant_code, d.unit, d.devname, d.devno, d.position, d.device_size, d.des_pressure, d.des_temp, d.opt_pressure, d.opt_temp, d.medium, d.leakage_mode, d.data_no, d.book_no, d.manufactor, d.remark, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id ,d.approve_status, d.approve_time,s.dept_name from t_intact_ysj d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -61,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
             <if test="updatedate != null "> and updatedate = #{updatedate}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="approveTime != null "> and approve_time, = #{approveTime}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -102,6 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterCode != null">updater_code,</if>
             <if test="updatedate != null">updatedate,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="approveTime != null">approve_time,</if>
+            <if test="approveStatus != null">approve_status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -128,6 +134,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterCode != null">#{updaterCode},</if>
             <if test="updatedate != null">#{updatedate},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="approveTime != null">#{approveTime},</if>
+            <if test="approveStatus != null">#{approveStatus},</if>
          </trim>
     </insert>
 
@@ -157,6 +165,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="approveTime != null">approve_time = #{approveTime},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
         </trim>
         where id = #{id}
     </update>

+ 3 - 2
master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml

@@ -31,10 +31,11 @@
         <result property="photo"    column="photo"    />
         <result property="pId"    column="p_id"    />
         <result property="specialDuty"    column="special_duty"    />
+        <result property="leftDate"    column="left_date"    />
     </resultMap>
 
     <sql id="selectTStaffmgrVo">
-         select d.id, d.plant_code, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, s.dept_name from t_staffmgr d
+         select d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, s.dept_name from t_staffmgr d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -288,7 +289,7 @@
     </update>
 
     <update id="deleteLeftTStaffmgrByIds" parameterType="Long">
-        update t_staffmgr set del_flag = 9 where id = #{id}
+        update t_staffmgr set del_flag = 9 , LEFT_DATE = SYSDATE  where id = #{id}
     </update>
 
     <update id="reLeftTStaffmgrByIds" parameterType="Long">

+ 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

+ 1 - 1
master/src/main/resources/mybatis/training/TTrainingMapper.xml

@@ -51,7 +51,7 @@
 
   <select id="selectTTrainingList" parameterType="TTraining" resultMap="TTrainingResult">
     select
-    (select count(1) from t_staffmgr st where st.del_flag = 0 and st.ACTUALPOST in (SELECT REGEXP_SUBSTR (d.POSITION, '[^,]+', 1,rownum) FROM DUAL CONNECT BY ROWNUM <![CDATA[<=]]> LENGTH (d.POSITION) - LENGTH (REPLACE (d.POSITION, ',', ''))+1)) as positionNum,
+    (select count(1) from t_staffmgr st where (st.del_flag = 0 or (st.del_flag = 9 and st.LEFT_DATE > d.COURSE_STARTDATE ) ) and st.ACTUALPOST in (SELECT REGEXP_SUBSTR (d.POSITION, '[^,]+', 1,rownum) FROM DUAL CONNECT BY ROWNUM <![CDATA[<=]]> LENGTH (d.POSITION) - LENGTH (REPLACE (d.POSITION, ',', ''))+1)) as positionNum,
     d.id, d.regular_id, d.content, d.unit, d.training_type, d.pic_url, d.plant_code, d.course, d.courseid, d.period, d.duration, d.trainer, d.position, d.designated_position, d.designated_staff, d.years, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.course_startdate, d.course_enddate, d.isfinish, d.confirmor , d.non_participants, s.dept_name from t_training d
     left join sys_dept s on s.dept_id = d.dept_id
     <where>

+ 50 - 0
master/src/main/resources/processes/maintenance.bpmn

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+    <process id="maintenance" name="设备维修审批流程" isExecutable="true">
+        <startEvent id="startmaintenance" name="开始" activiti:initiator="${applyUserId}"></startEvent>
+        <userTask id="wxjlTask" name="装置维修经理" activiti:assignee="#{wxjlusers}"></userTask>
+        <endEvent id="endmaintenance" name="End"></endEvent>
+        <sequenceFlow id="flow1" sourceRef="startmaintenance" targetRef="wxjlTask"></sequenceFlow>
+        <sequenceFlow id="flow2" name="通过" sourceRef="wxjlTask" targetRef="endmaintenance">
+            <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+        </sequenceFlow>
+        <endEvent id="endmaintenance2" name="End"></endEvent>
+        <sequenceFlow id="flow3" name="不通过" sourceRef="wxjlTask" targetRef="endmaintenance2">
+            <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
+        </sequenceFlow>
+    </process>
+    <bpmndi:BPMNDiagram id="BPMNDiagram_maintenance">
+        <bpmndi:BPMNPlane bpmnElement="maintenance" id="BPMNPlane_maintenance">
+            <bpmndi:BPMNShape bpmnElement="startmaintenance" id="BPMNShape_startmaintenance">
+                <omgdc:Bounds height="35.0" width="35.0" x="70.0" y="60.0"></omgdc:Bounds>
+            </bpmndi:BPMNShape>
+            <bpmndi:BPMNShape bpmnElement="wxjlTask" id="BPMNShape_wxjlTask">
+                <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="50.0"></omgdc:Bounds>
+            </bpmndi:BPMNShape>
+            <bpmndi:BPMNShape bpmnElement="endmaintenance" id="BPMNShape_endmaintenance">
+                <omgdc:Bounds height="35.0" width="35.0" x="340.0" y="60.0"></omgdc:Bounds>
+            </bpmndi:BPMNShape>
+            <bpmndi:BPMNShape bpmnElement="endmaintenance2" id="BPMNShape_endmaintenance2">
+                <omgdc:Bounds height="35.0" width="35.0" x="205.0" y="140.0"></omgdc:Bounds>
+            </bpmndi:BPMNShape>
+            <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+                <omgdi:waypoint x="105.0" y="77.0"></omgdi:waypoint>
+                <omgdi:waypoint x="170.0" y="77.0"></omgdi:waypoint>
+            </bpmndi:BPMNEdge>
+            <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
+                <omgdi:waypoint x="275.0" y="77.0"></omgdi:waypoint>
+                <omgdi:waypoint x="340.0" y="77.0"></omgdi:waypoint>
+                <bpmndi:BPMNLabel>
+                    <omgdc:Bounds height="16.0" width="100.0" x="289.0" y="79.0"></omgdc:Bounds>
+                </bpmndi:BPMNLabel>
+            </bpmndi:BPMNEdge>
+            <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
+                <omgdi:waypoint x="222.0" y="105.0"></omgdi:waypoint>
+                <omgdi:waypoint x="222.0" y="140.0"></omgdi:waypoint>
+                <bpmndi:BPMNLabel>
+                    <omgdc:Bounds height="16.0" width="48.0" x="227.0" y="109.0"></omgdc:Bounds>
+                </bpmndi:BPMNLabel>
+            </bpmndi:BPMNEdge>
+        </bpmndi:BPMNPlane>
+    </bpmndi:BPMNDiagram>
+</definitions>

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


+ 26 - 0
ui/src/api/intact/approve.js

@@ -0,0 +1,26 @@
+// 新增设备维修申请
+import request from "@/utils/request";
+
+export function addApprove(data) {
+  return request({
+    url: '/intact/maintenance',
+    method: 'post',
+    data: data
+  })
+}
+// 查询
+export function getApprove(id) {
+  return request({
+    url: '/intact/approve/' + id,
+    method: 'get'
+  })
+}
+
+// 查询设备维修申请详细
+export function getApproveInfo(id) {
+  return request({
+    url: '/intact/maintenance/info/' + id,
+    method: 'get'
+  })
+}
+

+ 670 - 0
ui/src/views/approve/approveDetail/specMaintenance-detail.vue

@@ -0,0 +1,670 @@
+<template>
+  <el-dialog
+    :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="taskForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
+      <el-form-item :label="$t('设备')">
+        <el-table
+          v-show="dataForm.approveType != 7 && dataForm.devType == 1"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px" >
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="devno"
+            header-align="center"
+            align="center"
+            :label="$t('位号')">
+          </el-table-column>
+          <el-table-column
+            prop="devname"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="150"
+            :label="$t('设备名称')">
+          </el-table-column>
+          <el-table-column
+            prop="useno"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('使用证编号')">
+          </el-table-column>
+          <el-table-column
+            prop="medium"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('介质')">
+          </el-table-column>
+          <el-table-column
+            prop="desPressure"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('设计压力')+'(MPa)'">
+          </el-table-column>
+          <el-table-column
+            prop="desTemp"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('设计温度')+'(℃)'">
+          </el-table-column>
+        </el-table>
+        <el-table
+          v-show="dataForm.approveType != 7 && dataForm.devType == 2"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px">
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            width="100"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="devno"
+            header-align="center"
+            align="center"
+            width="120"
+            :label="$t('位号')">
+          </el-table-column>
+<!--          <el-table-column-->
+<!--            prop="starting"-->
+<!--            header-align="center"-->
+<!--            align="center"-->
+<!--            width="100"-->
+<!--            :show-overflow-tooltip="true"-->
+<!--            :label="$t('起点')">-->
+<!--          </el-table-column>-->
+<!--          <el-table-column-->
+<!--            prop="ending"-->
+<!--            header-align="center"-->
+<!--            align="center"-->
+<!--            width="100"-->
+<!--            :show-overflow-tooltip="true"-->
+<!--            :label="$t('终点')">-->
+<!--          </el-table-column>-->
+          <el-table-column
+            prop="medium"
+            header-align="center"
+            align="center"
+            width="100"
+            :show-overflow-tooltip="true"
+            :label="$t('介质')">
+          </el-table-column>
+          <el-table-column
+            prop="desPressure"
+            header-align="center"
+            align="center"
+            :label="$t('设计压力')">
+          </el-table-column>
+          <el-table-column
+            prop="desTemp"
+            header-align="center"
+            align="center"
+            :label="$t('设计温度')">
+          </el-table-column>
+          <el-table-column
+            prop="optPressure"
+            header-align="center"
+            align="center"
+            :label="$t('工作压力')">
+          </el-table-column>
+          <el-table-column
+            prop="optTemp"
+            header-align="center"
+            align="center"
+            width="100"
+            :show-overflow-tooltip="true"
+            :label="$t('工作温度')">
+          </el-table-column>
+        </el-table>
+        <el-table
+          v-show="dataForm.devType == 3"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px">
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="docno"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('档案号')">
+          </el-table-column>
+          <el-table-column
+            prop="devname"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="150"
+            :label="$t('设备名称')">
+          </el-table-column>
+          <el-table-column
+            prop="capacity"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('起吊重量')+'(ton)'">
+          </el-table-column>
+          <el-table-column
+            prop="location"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('使用地点')">
+          </el-table-column>
+        </el-table>
+        <el-table
+          v-show="dataForm.devType == 4"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px">
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="devno"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('位号')">
+          </el-table-column>
+          <el-table-column
+            prop="devname"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('设备名称')">
+          </el-table-column>
+          <el-table-column
+            prop="useno"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('使用证编号')">
+          </el-table-column>
+          <el-table-column
+            prop="desTemp"
+            header-align="center"
+            align="center"
+            :label="$t('设计温度')+'(℃)'">
+          </el-table-column>
+          <el-table-column
+            prop="desPressure"
+            header-align="center"
+            align="center"
+            :label="$t('设计压力')+'(MPa)'">
+          </el-table-column>
+        </el-table>
+        <el-table
+          v-show="dataForm.devType == 5"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px">
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="docno"
+            header-align="center"
+            align="center"
+            :label="$t('docNo')">
+          </el-table-column>
+          <el-table-column
+            prop="devname"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="150"
+            :label="$t('设备名称')">
+          </el-table-column>
+          <el-table-column
+            prop="model"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('型号')">
+          </el-table-column>
+          <el-table-column
+            prop="location"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            :label="$t('使用地点')">
+          </el-table-column>
+        </el-table>
+        <el-table
+          v-show="dataForm.devType == 6"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px">
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="useDept"
+            header-align="center"
+            align="center"
+            :label="$t('dept')">
+          </el-table-column>
+          <el-table-column
+            prop="carNo"
+            header-align="center"
+            align="center"
+            :label="$t('plateNo')">
+          </el-table-column>
+          <el-table-column
+            prop="docno"
+            header-align="center"
+            align="center"
+            :label="$t('docNo')">
+          </el-table-column>
+          <el-table-column
+            prop="model"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('model')">
+          </el-table-column>
+        </el-table>
+        <el-table
+          v-show="dataForm.devType == 7"
+          :data="devList"
+          border
+          style="width: 100%; height: 95px">
+          <el-table-column
+            prop="plantCode"
+            header-align="center"
+            align="center"
+            :label="$t('装置名称')">
+          </el-table-column>
+          <el-table-column
+            prop="unit"
+            header-align="center"
+            align="center"
+            :label="$t('单元')">
+          </el-table-column>
+          <el-table-column
+            prop="devno"
+            header-align="center"
+            align="center"
+            :label="$t('位号')">
+          </el-table-column>
+          <el-table-column
+            prop="devname"
+            header-align="center"
+            align="center"
+            :label="$t('名称')">
+          </el-table-column>
+          <el-table-column
+            prop="createno"
+            header-align="center"
+            align="center"
+            :label="$t('制造编号')">
+          </el-table-column>
+          <el-table-column
+            prop="indiameter"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('内径')+' mm'">
+          </el-table-column>
+          <el-table-column
+            prop="height"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('高(长)')+' mm'">
+          </el-table-column>
+          <el-table-column
+            prop="chickness"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('壁厚(mm)')">
+          </el-table-column>
+          <el-table-column
+            prop="volume"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('容积mm³')">
+          </el-table-column>
+          <el-table-column
+            prop="medium"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('介质')">
+          </el-table-column>
+          <el-table-column
+            prop="material"
+            header-align="center"
+            align="center"
+            :show-overflow-tooltip="true"
+            width="120"
+            :label="$t('材料')">
+          </el-table-column>
+        </el-table>
+        <el-button @click="recordHandle(devList,dataForm)" type="text" v-if="devList.length >1">{{$t('更多条目')}}</el-button>
+      </el-form-item>
+      <el-row>
+        <el-col :span="8" v-if="dataForm.approveType != 8">
+          <el-form-item :label="$t('设备类型')" prop="devType">
+            <el-select v-model="dataForm.devType" :placeholder="$t('message.select')" disabled>
+              <el-option
+                v-for="dict in devTypeOption"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="parseInt(dict.dictValue)">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item :label="$t('申请类型')" prop="approveType">
+            <el-select v-model="dataForm.approveType" :placeholder="$t('message.select')" disabled>
+              <el-option>
+                维修
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item :label="$t('申请时间')" prop="creattime">
+        <el-input v-model="dataForm.creattime" disabled></el-input>
+      </el-form-item>
+    </el-form>
+    <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
+      <input name="approveId" v-model="dataForm.id"  hidden  />
+      <input name="processId" v-model="dataForm.processId"  hidden  />
+    </form>
+    <span slot="footer" class="dialog-footer">
+      <el-button v-if="this.taskForm.taskId == ''" @click="visible = false">{{$t('message.return')}}</el-button>
+      <el-button v-if="!this.taskForm.taskId == ''" type="primary" @click="dataFormSubmit(1)" :disabled="submitDisabled">{{$t('通过')}}</el-button>
+      <el-button v-if="!this.taskForm.taskId == ''" type="danger" @click="dataFormSubmit(0)" :disabled="submitDisabled">{{$t('拒绝')}}</el-button>
+    </span>
+<!--    <div>-->
+<!--      <span>{{$t('流转详情')}}</span>-->
+<!--      <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">-->
+<!--        <el-table-column prop="taskName" header-align="center" align="center" :label="$t('流程进度')"></el-table-column>-->
+<!--        <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>-->
+<!--        <el-table-column prop="taskCreateTime" header-align="center" align="center" :label="$t('开始时间')"></el-table-column>-->
+<!--        <el-table-column prop="taskEndTime" header-align="center" align="center" :label="$t('结束时间')"></el-table-column>-->
+<!--        <el-table-column prop="comment" header-align="center" align="center" :label="$t('审批意见')"></el-table-column>-->
+<!--      </el-table>-->
+<!--    </div>-->
+    <record v-if="recordVisible" ref="recordDeal"></record>
+  </el-dialog>
+</template>
+
+<script>
+  import {getToken} from "@/utils/auth";
+  import {getHistorylist} from "@/api/ehs/approvedanger";
+  import {getApproveInfo, handleApprove} from "@/api/intact/approve";
+  import record from "./spec-itemDetail";
+
+
+  export default {
+  name: "spec-maintenance",
+  components: {record},
+  data() {
+    return {
+      loading: true,
+      // 总条数
+      total: 0,
+      approvedangerList: [],
+      recordVisible: false,
+      // 遮罩层
+      historyLoading: false,
+      //显示详细列表
+      IfDataIndex: false,
+      //流转列表
+      historyList: [],
+      visible: false,
+      devList: [],
+      recordList: [],
+      dataList: [],
+      fileTips: '',
+      showDelay: false,
+      submitDisabled: false,
+      dataListLoading:true,
+      taskName: '',
+      dataForm: {
+        id: 0,
+        userId: '',
+        devId: '',
+        devType: '',
+        approveType: '',
+        content: '',
+        fileUrls: '',
+        reUrls: '',
+        status: '',
+        creattime: '',
+        plantCode: '',
+        unit: '',
+        devname: '',
+        devno: '',
+        files: [],
+        delayDate: '',
+        delayReason: '',
+        delayMeasure: '',
+        delayNotice: ''
+      },
+      taskForm: {
+        comment: '',
+        taskId: '',
+        files: '',
+        govDate: '',
+        govFileList: []
+      },
+      // 查询参数
+      queryParams: {
+        processId: null,
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      dataRule: {
+        approveType: [
+          { required: true, message: this.$t('approveType') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        content: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ]
+      },
+      downloadAction: process.env.VUE_APP_BASE_API +'/sems/approve/exportPDF',
+      approveOption: [],
+      devTypeOption: [{dictValue:1,dictLabel:'工业炉'},{dictValue:2,dictLabel:'压缩机'},{},{}],
+      belong: '',
+      fileList: [],
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    init (id, taskId, processId,taskName) {
+      this.getDicts("spec_approve_modify_type").then(response => {
+        this.approveOption = response.data;
+      });
+      this.getDicts("spec_dev_type").then(response => {
+        // this.devTypeOption = response.data;
+      });
+      this.dataForm.processId = processId
+      this.taskName = taskName
+      this.taskForm.taskId = taskId
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.queryParams.processId = processId;
+      getHistorylist(this.queryParams).then(response => {
+        this.historyList = response.rows;
+        this.historyLoading = false
+      });
+      getApproveInfo(id).then(response => {
+        this.taskForm.businessKey = response.data.id
+        this.dataForm.userId = response.data.userId
+        this.dataForm.devId = response.data.devId
+        this.dataForm.devType = response.data.devType
+        // this.dataForm.approveType = response.data.approveType
+        this.dataForm.approveType = '维修'
+        this.dataForm.content = response.data.content
+        this.dataForm.fileUrls = response.data.fileUrls
+        this.dataForm.reUrls = response.data.reUrls
+        this.dataForm.status = response.data.status
+        this.dataForm.creattime = response.data.creattime
+        this.dataForm.plantCode = response.data.plantCode
+        this.dataForm.unit = response.data.unit
+        this.dataForm.devname = response.data.devname
+        this.dataForm.devno = response.data.devno
+        this.dataForm.files = response.data.files
+        this.devList = response.data.devList
+        this.dataForm.delayDate = response.data.delayDate
+        this.dataForm.delayReason = response.data.delayReason
+        this.dataForm.delayMeasure = response.data.delayMeasure
+        this.dataForm.delayNotice = response.data.delayNotice
+      });
+
+    },
+    // 设备类型:字典翻译
+    devTypeFormat(row, column) {
+      // return this.selectDictLabel(this.devTypeOptions, row.devType);
+    },
+    // 审批类型字典翻译
+    approveTypeFormat(row, column) {
+      return this.selectDictLabel(this.approveTypeOptions, row.approveType);
+    },
+
+    // 取消按钮
+    cancel() {
+      this.visible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: 0,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        delFlag: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+
+    /** 提交按钮 */
+    // 表单提交
+    dataFormSubmit (val) {
+      this.submitDisabled = true
+      console.log(this.taskForm.govFileList)
+      this.dataForm.files = []
+      if (this.taskForm.govFileList.length > 0) {
+        for (let i = 0; i < this.taskForm.govFileList.length; i++) {
+          let obj = {}
+          obj.fileName = this.taskForm.govFileList[i].response.fileName
+          obj.fileUrl = this.taskForm.govFileList[i].response.url
+          this.dataForm.files.push(obj)
+        }
+      }
+      this.taskForm.condition = val
+      this.taskForm.govFiles = this.dataForm.files
+      handleApprove(this.taskForm).then(response => {
+        this.submitDisabled = false
+        this.msgSuccess(this.$t('处理成功'));
+        this.visible = false;
+        this.$emit('refreshDataList')
+      });
+      this.$nextTick(function () {
+        this.comment = ''
+      })
+    },
+    recordHandle(devList,dataForm){
+      this.recordVisible = true
+      this.$nextTick(() => {
+        this.$refs.recordDeal.init(devList,dataForm);
+      })
+    },
+}
+}
+
+
+</script>
+
+<style scoped>
+
+</style>

+ 10 - 2
ui/src/views/approve/myapprove/index.vue

@@ -45,7 +45,7 @@
     <add-or-update v-if="specDealVisible" ref="specDeal" @refreshDataList="getList"></add-or-update>
     <spec-modify v-if="specModifyDealVisible" ref="specModifyDeal" @refreshDataList="getList"></spec-modify>
     <spec-training-plan v-if="specTrainingPlanVisible" ref="specTrainingPlan" @refreshDataList="getList"></spec-training-plan>
-
+    <spec-maintenance v-if="specMaintenanceVisible" ref="specMaintenance" @refreshDataList="getList"></spec-maintenance>
   </div>
 </template>
 
@@ -58,10 +58,11 @@
   import AddOrUpdate from '../approveDetail/spec-detail';
   import SpecModify from '../approveDetail/specModify-detail';
   import SpecTrainingPlan from '../approveDetail/specTrainingPlan-detaill';
+  import SpecMaintenance from '../approveDetail/specMaintenance-detail';
 
   export default {
     name: "Myapprove",
-    components: { Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan},
+    components: { Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan,SpecMaintenance},
     data() {
       return {
         // 遮罩层
@@ -70,6 +71,7 @@
         specDealVisible: false,
         specModifyDealVisible: false,
         specTrainingPlanVisible: false,
+        specMaintenanceVisible: false,
         // 选中数组
         ids: [],
         // 非单个禁用
@@ -171,6 +173,12 @@
             console.log(row.taskName)
             this.$refs.specTrainingPlan.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
           })
+        }else if (row.processName == "设备维修审批流程") {
+          this.specMaintenanceVisible = true
+          this.$nextTick(() => {
+            console.log(row.taskName)
+            this.$refs.specMaintenance.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
+          })
         }else {
           this.approveInfo = row;
           this.infoTaskName = row.taskName;

+ 6 - 0
ui/src/views/approve/pending/index.vue

@@ -349,6 +349,12 @@
             console.log(row.taskName)
             this.$refs.specTrainingPlanDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
           })
+        }else if (row.processName == "设备维修审批流程"){
+          this.specModifyDealVisible = true
+          this.$nextTick(() => {
+            console.log(row.taskName)
+            this.$refs.specModifyDeal.init(row.approveObj.id, row.taskId, row.processId,row.taskName)
+          })
         }else {
           this.approveInfo = row;
           this.infoTaskName = row.taskName;

+ 760 - 0
ui/src/views/intact/approve/tapprove-maintenance-add.vue

@@ -0,0 +1,760 @@
+<template>
+  <!-- 添加或修改特种设备申请对话框 -->
+  <el-dialog :title="$t('提交申请')" :visible.sync="visible" width="1200px" append-to-body>
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
+    <el-form-item :label="$t('申请设备')">
+      <el-table
+        v-show="dataForm.approveType != 7 && dataForm.devType == 1"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          :label="$t('位号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="150"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="useno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用证号码')">
+        </el-table-column>
+        <el-table-column
+          prop="medium"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('介质')">
+        </el-table-column>
+        <el-table-column
+          prop="desPressure"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('设计压力')+'(MPa)'">
+        </el-table-column>
+        <el-table-column
+          prop="desTemp"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('设计温度')+'(℃)'">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.approveType != 7 && dataForm.devType == 2"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          width="100"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          width="120"
+          :label="$t('位号')">
+        </el-table-column>
+<!--        <el-table-column-->
+<!--          prop="starting"-->
+<!--          header-align="center"-->
+<!--          align="center"-->
+<!--          width="100"-->
+<!--          :show-overflow-tooltip="true"-->
+<!--          :label="$t('起点')">-->
+<!--        </el-table-column>-->
+<!--        <el-table-column-->
+<!--          prop="ending"-->
+<!--          header-align="center"-->
+<!--          align="center"-->
+<!--          width="100"-->
+<!--          :show-overflow-tooltip="true"-->
+<!--          :label="$t('终点')">-->
+<!--        </el-table-column>-->
+        <el-table-column
+          prop="medium"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-overflow-tooltip="true"
+          :label="$t('介质')">
+        </el-table-column>
+        <el-table-column
+          prop="desPressure"
+          header-align="center"
+          align="center"
+          :label="$t('设计压力')">
+        </el-table-column>
+        <el-table-column
+          prop="desTemp"
+          header-align="center"
+          align="center"
+          :label="$t('设计温度')">
+        </el-table-column>
+        <el-table-column
+          prop="optPressure"
+          header-align="center"
+          align="center"
+          :label="$t('工作压力')">
+        </el-table-column>
+        <el-table-column
+          prop="optTemp"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-overflow-tooltip="true"
+          :label="$t('工作温度')">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 3"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="docno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('档案号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="150"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="capacity"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('起吊重量')+'(ton)'">
+        </el-table-column>
+        <el-table-column
+          prop="location"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用地点')">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 4"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('位号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="useno"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用证号码')">
+        </el-table-column>
+        <el-table-column
+          prop="desTemp"
+          header-align="center"
+          align="center"
+          :label="$t('设计温度')+'(℃)'">
+        </el-table-column>
+        <el-table-column
+          prop="desPressure"
+          header-align="center"
+          align="center"
+          :label="$t('设计压力')+'(MPa)'">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 5"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="docno"
+          header-align="center"
+          align="center"
+          :label="$t('docNo')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="150"
+          :label="$t('设备名称')">
+        </el-table-column>
+        <el-table-column
+          prop="model"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('型号')">
+        </el-table-column>
+        <el-table-column
+          prop="location"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          :label="$t('使用地点')">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 6"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="useDept"
+          header-align="center"
+          align="center"
+          :label="$t('dept')">
+        </el-table-column>
+        <el-table-column
+          prop="carNo"
+          header-align="center"
+          align="center"
+          :label="$t('plateNo')">
+        </el-table-column>
+        <el-table-column
+          prop="docno"
+          header-align="center"
+          align="center"
+          :label="$t('docNo')">
+        </el-table-column>
+        <el-table-column
+          prop="model"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('model')">
+        </el-table-column>
+      </el-table>
+      <el-table
+        v-show="dataForm.devType == 7"
+        :data="devList"
+        border
+        style="width: 100%;">
+        <el-table-column
+          prop="plantCode"
+          header-align="center"
+          align="center"
+          :label="$t('装置名称')">
+        </el-table-column>
+        <el-table-column
+          prop="unit"
+          header-align="center"
+          align="center"
+          :label="$t('单元')">
+        </el-table-column>
+        <el-table-column
+          prop="devno"
+          header-align="center"
+          align="center"
+          :label="$t('位号')">
+        </el-table-column>
+        <el-table-column
+          prop="devname"
+          header-align="center"
+          align="center"
+          :label="$t('名称')">
+        </el-table-column>
+        <el-table-column
+          prop="createno"
+          header-align="center"
+          align="center"
+          :label="$t('制造编号')">
+        </el-table-column>
+        <el-table-column
+          prop="indiameter"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('内径')+'mm'">
+        </el-table-column>
+        <el-table-column
+          prop="height"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('高(长)')+'mm'">
+        </el-table-column>
+        <el-table-column
+          prop="chickness"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('壁厚(mm)')">
+        </el-table-column>
+        <el-table-column
+          prop="volume"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('容积mm³')">
+        </el-table-column>
+        <el-table-column
+          prop="medium"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('介质')">
+        </el-table-column>
+        <el-table-column
+          prop="material"
+          header-align="center"
+          align="center"
+          :show-overflow-tooltip="true"
+          width="120"
+          :label="$t('材料')">
+        </el-table-column>
+      </el-table>
+    </el-form-item>
+<!--      <el-form-item :label="$t('审批类型')" prop="approveType">-->
+<!--        <el-select v-model="dataForm.approveType" :placeholder="$t('审批类型')" @change="handleChange">-->
+<!--          <el-option-->
+<!--            v-for="dict in approveOption"-->
+<!--            :key="dict.dictValue"-->
+<!--            :label="dict.dictLabel"-->
+<!--            :value="parseInt(dict.dictValue)">-->
+<!--          </el-option>-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <el-form-item v-if="!this.showDelay" :label="$t('原因')+$t('空格')+$t('描述')" prop="content">
+        <el-input type="textarea" :placeholder="$t('原因')+$t('空格')+$t('描述')"
+                  v-model="dataForm.content"
+                  maxlength="200" show-word-limit
+                  :autosize="{ minRows: 2, maxRows: 10}"></el-input>
+      </el-form-item>
+      <el-form-item :label="$t('附件')" prop="fileUrl">
+        <el-upload
+          ref="doc"
+          :limit="5"
+          :headers="doc.headers"
+          :action="doc.url"
+          :disabled="doc.isUploading"
+          :on-progress="handleFileDocProgress"
+          :on-success="handleFileDocSuccess"
+          :on-remove="handleRemove"
+          :auto-upload="true"
+          :file-list="fileList"
+          drag
+        >
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">
+            {{ $t('将文件拖到此处,或') }}
+            <em>{{ $t('点击上传') }}</em>
+          </div>
+          <div v-if="showDelay" class="el-upload__tip" slot="tip">{{ this.fileTips }}</div>
+        </el-upload>
+      </el-form-item>
+      <el-form-item :label="$t('维修经理')" prop="wxjl">
+        <el-select v-model="dataForm.wxjl" filterable :placeholder="$t('请选择') + $t('维修经理')">
+          <el-option
+            v-for="item in wxjlOption"
+            :key="item.userId"
+            :label="item.nickName"
+            :value="item.userId"
+            :disabled="item.disabled">
+          </el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">{{ $t('提交') }}</el-button>
+      <el-button @click="cancel">{{ $t('取消') }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import {getToken} from "@/utils/auth";
+  import {addApprove, getApprove} from "@/api/intact/approve";
+  import {listPostUser} from "@/api/system/user";
+
+  export default {
+  name: "tapprove-add",
+  data() {
+    return {
+      visible: false,
+      devList: [],
+      wxjlOption:[],
+      gyjlOption:[],
+      gyzjOption:[],
+      wxzjOption:[],
+      zfOption:[],
+      fileTips: '',
+      showDelay: false,
+      dataForm: {
+        id: 0,
+        userId: '',
+        devId: '',
+        devType: '',
+        approveType: 1,
+        content: '',
+        fileUrls: '',
+        reUrls: '',
+        status: '',
+        createTime: '',
+        plantCode: '',
+        unit: '',
+        devname: '',
+        devno: '',
+        files: [],
+        delayDate: '',
+        delayReason: '',
+        delayMeasure: '',
+        delayNotice: '',
+        wxjl: '',
+        gyzj: '',
+        gyjl: '',
+        wxzj: '',
+        zf: ''
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      dataRule: {
+        approveType: [
+          { required: true, message: this.$t('approveType') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        content: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        wxjl: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        wxzj: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        gyjl: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        gyzj: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        zf: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ]
+      },
+      approveOption: [],
+      belong: '',
+      fileList: [],
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    init (rows, type) {
+      this.fileList = []
+      this.devList = rows
+
+      listPostUser({
+        // postCode: 'wxjl'
+      }).then(response => {
+        this.wxjlOption = response;
+      });
+      listPostUser({
+        // postCode: 'gyjl'
+      }).then(response => {
+        this.gyjlOption = response;
+      });
+      listPostUser({
+        // postCode: 'gyzj'
+      }).then(response => {
+        this.gyzjOption = response;
+      });
+      listPostUser({
+        // postCode: 'wxzj'
+      }).then(response => {
+        this.wxzjOption = response;
+      });
+      listPostUser({
+        // postCode: 'sems'
+      }).then(response => {
+        this.zfOption = response;
+      });
+      console.log(type)
+      this.getDicts("spec_approve_type").then(response => {
+        this.approveOption = response.data;
+        for (let i = 0; i < this.approveOption.length ; i++) {
+          if(this.approveOption[i].dictValue == this.devList[0].status){
+            this.approveOption.splice(i ,1)
+          }if (this.approveOption[i].dictLabel == "年度检查报告申请") {
+            this.approveOption.splice(i ,1)
+          }if (this.approveOption[i].dictLabel == "月度检查报告申请") {
+            this.approveOption.splice(i ,1)
+          }
+        }
+      });
+
+      this.visible = true
+      this.dataForm.devType = type.toString()
+      for (let i = 0; i < rows.length; i++) {
+        if (i == 0){
+          this.dataForm.devId = rows[i].id
+        }else {
+          this.dataForm.devId += ',' + rows[i].id
+        }
+      }
+      this.belong = type + '_'  + '/' + new Date().getTime()
+    },
+    // 设备类型:字典翻译
+    devTypeFormat(row, column) {
+      return this.selectDictLabel(this.devTypeOptions, row.devType);
+    },
+    // 审批类型字典翻译
+    approveTypeFormat(row, column) {
+      return this.selectDictLabel(this.approveTypeOptions, row.approveType);
+    },
+    // 取消按钮
+    cancel() {
+      this.$emit('refreshDataList')
+      this.visible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: 0,
+        creattime: null,
+        endtime: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        delFlag: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = this.$t('添加特种设备申请');
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getApprove(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = this.$t('修改特种设备申请');
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+    },
+    handleRemove (file, fileList) {
+      this.fileList = fileList
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.fileList = fileList
+      if (response.code == 200){
+        this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }else {
+        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      }
+
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.dataForm.files = []
+      console.log(this.fileList)
+      if (this.fileList.length > 0) {
+        for (let i = 0; i < this.fileList.length; i++) {
+          let obj = {}
+          obj.fileName = this.fileList[i].name
+          obj.fileUrl = this.fileList[i].response.msg
+          this.dataForm.files.push(obj)
+        }
+      }
+      this.$refs["dataForm"].validate(valid => {
+        if (valid) {
+          console.log("ccccc")
+          console.log(this.dataForm);
+            addApprove(this.dataForm).then(response => {
+              this.msgSuccess(this.$t('新增成功'));
+              this.visible = false;
+            });
+        }
+      });
+      this.$emit('refreshDataList')
+    },
+    handleChange(value) {
+      this.showDelay = false
+      if (value == -1) {
+        this.fileTips = '提示:请提供相关支持文件'
+      }else if (value == 1) {
+        this.fileTips = '提示:请提供启用前检查报告'
+      }else if (value == 2) {
+        this.fileTips = ''
+      }else if (value == 3) {
+        this.fileTips = '提示:请提供设备主体破坏后的照片,防止被其他单位买走重新使用'
+      }else if (value == 4) {
+        this.fileTips = '提示:请提供相关支持文件'
+      }else if (value == 5) {
+        this.showDelay = true
+        this.fileTips = '提示:延期发起的会议纪要等背景情况'
+        this.dataForm.delayReason=
+          '根据2015年压力管道检验报告,清单中的相关管道材质中度球化,安全等级定为3级,下次检验日期定为2018年5月。\n' +
+          '由于这些管道连接电厂蒸汽母管,无法单独隔绝,只有在2020年扬巴大修期间才有机会停车检验,因此提出延期申请。\n'
+        this.dataForm.delayMeasure=
+          '(生产部门,应该根据实际情况,组织机械,电仪各专业,制定具体的运行监控措施描述)\n' +
+          '\n' +
+          '工艺部门:\n' +
+          '维持相关管道操作稳定\n' +
+          '持续监控相关管道操作压力和温度\n' +
+          '按照法规要求,定期开展应急演练\n' +
+          '\n' +
+          '\n' +
+          '机修部门:\n' +
+          '每月对相关管道进行走线巡检,对管道支吊架,保温目视检查。如有问题,记录在巡检记录中\n' +
+          '及时报告管道使用情况及需要解决的问题\n' +
+          '发生事故及时组织调查处理,并配合写出事故报告书\n' +
+          '\n' +
+          '电仪部门:\n' +
+          'XXXXXXXXXXX描述电仪方面的维护或监控措施\n'
+        this.dataForm.delayNotice=
+          '我单位/装置,已制定相应预防措施和应急预案,并保证落实安全管理责任、操作人员持证上岗、安全附件和安全保护装置在有效期内。在检验延期期间,将对以上设备加强巡查和实施有效安全监控,做好监控记录,对延期期间的设备安全负完全责任;在延期期满前,我单位将申报并安排以上设备实施定期检验。'
+      }else if (value == 6) {
+        this.fileTips = '提示:请提供安全评估报告'
+      }else {
+        this.fileTips = ''
+      }
+    },
+}
+}
+
+
+</script>
+
+<style scoped>
+
+</style>

+ 89 - 43
ui/src/views/intact/gyl/index.vue

@@ -277,14 +277,14 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="最新申请时间" prop="approveTime">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.approveTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择最新申请时间">
-        </el-date-picker>
-      </el-form-item>
+<!--      <el-form-item label="最新申请时间" prop="approveTime">-->
+<!--        <el-date-picker clearable size="small" style="width: 200px"-->
+<!--          v-model="queryParams.approveTime"-->
+<!--          type="date"-->
+<!--          value-format="yyyy-MM-dd"-->
+<!--          placeholder="选择最新申请时间">-->
+<!--        </el-date-picker>-->
+<!--      </el-form-item>-->
       <el-form-item label="状态修改时间" prop="changeTime">
         <el-date-picker clearable size="small" style="width: 200px"
           v-model="queryParams.changeTime"
@@ -494,8 +494,8 @@
         </template>
       </el-table-column>
             <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>
@@ -576,7 +576,7 @@
       <el-table-column label="数据表文件号" align="center" prop="dataNo" :show-overflow-tooltip="true"/>
       <el-table-column label="计算书文件号" align="center" prop="bookNo" :show-overflow-tooltip="true"/>
       <el-table-column label="厂家" align="center" prop="manufactor" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" fixed="right" width="140" class-name="small-padding fixed-width">
         <template slot-scope="scope">
 <!--          <el-button-->
 <!--            size="mini"-->
@@ -595,31 +595,24 @@
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-document"
             @click="toInspectionRecord(scope.row.devno,scope.row.position)"
             v-hasPermi="['intact:gyl:query']"
           >巡检记录</el-button>
-          <el-dialog title="巡检记录" :visible.sync="openRecord" :append-to-body="true" :before-close="cleanRecordList">
-            <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-              <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="region" :show-overflow-tooltip="true"/>
-              <el-table-column label="原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
-              <el-table-column label="巡检时间" align="center" prop="inspectionTime" width="100">
-                <template slot-scope="scope">
-                  <span>{{ parseTime(scope.row.inspectionTime, '{y}-{m}-{d}') }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="消故时间" align="center" prop="pastTime" width="100">
-                <template slot-scope="scope">
-                  <span>{{ parseTime(scope.row.pastTime, '{y}-{m}-{d}') }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="消故人" align="center" prop="pasterCode" :show-overflow-tooltip="true"/>
-              <el-table-column label="处理情况" align="center" prop="treatment" :show-overflow-tooltip="true"/>
-              <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-            </el-table>
-          </el-dialog>
+          <el-button
+            v-if="scope.row.approveTime != null"
+            type="text"
+            size="mini"
+            @click="hisApprove(scope.row,devType)"
+          > {{ $t('维修记录') }}<br>
+          </el-button>
+          <el-button
+            type="text"
+            size="mini"
+            @click="addAprrove(scope.row,devType)"
+          >{{ $t('提交维修申请') }}
+          </el-button>
+          <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
+          <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
         </template>
       </el-table-column>
     </el-table>
@@ -632,6 +625,29 @@
       @pagination="getList"
     />
 
+    <el-dialog title="巡检记录" :visible.sync="openRecord" :append-to-body="true" :before-close="cleanRecordList">
+      <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange"
+                :height="clientHeight" border>
+        <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="region" :show-overflow-tooltip="true"/>
+        <el-table-column label="原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
+        <el-table-column label="巡检时间" align="center" prop="inspectionTime" width="100">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.inspectionTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="消故时间" align="center" prop="pastTime" width="100">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.pastTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="消故人" align="center" prop="pasterCode" :show-overflow-tooltip="true"/>
+        <el-table-column label="处理情况" align="center" prop="treatment" :show-overflow-tooltip="true"/>
+        <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      </el-table>
+    </el-dialog>
+
     <!-- 添加或修改设备完整性工业炉台账对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -773,14 +789,14 @@
         <el-form-item label="报告编号" prop="reportNo">
           <el-input v-model="form.reportNo" placeholder="请输入报告编号" />
         </el-form-item>
-        <el-form-item label="最新申请时间" prop="approveTime">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.approveTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择最新申请时间">
-          </el-date-picker>
-        </el-form-item>
+<!--        <el-form-item label="最新申请时间" prop="approveTime">-->
+<!--          <el-date-picker clearable size="small" style="width: 200px"-->
+<!--            v-model="form.approveTime"-->
+<!--            type="date"-->
+<!--            value-format="yyyy-MM-dd"-->
+<!--            placeholder="选择最新申请时间">-->
+<!--          </el-date-picker>-->
+<!--        </el-form-item>-->
         <el-form-item label="状态修改时间" prop="changeTime">
           <el-date-picker clearable size="small" style="width: 200px"
             v-model="form.changeTime"
@@ -956,10 +972,12 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import HisApprove from "@/views/sems/approve/tapprove-his";
+import AddApprove from "../approve/tapprove-maintenance-add"
 
 export default {
   name: "Gyl",
-  components: { Treeselect },
+  components: {Treeselect, AddApprove, HisApprove},
   data() {
     return {
       devType: 4,
@@ -967,6 +985,7 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      devType: 1,
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -1101,6 +1120,8 @@ export default {
       },
       // 巡检记录表格数据
       recordList: [],
+      addAprroveVisible: false,
+      hisAprroveVisible: false,
       openRecord : false
     };
   },
@@ -1132,6 +1153,31 @@ export default {
         this.openRecord=true;
       });
     },
+    addAprrove(row, type) {
+      var rows = row ? [row] : this.recordList.map(item => {
+        return item
+      })
+      for (let i = 0; i < rows.length; i++) {
+        if (rows[i].approveStatus != 0) {
+          this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
+            type: 'warning'
+          })
+          return
+        }
+      }
+      this.addAprroveVisible = true
+      console.log(rows)
+      console.log(type)
+      this.$nextTick(() => {
+        this.$refs.addApprove.init(rows, type)
+      })
+    },
+    hisApprove(row, type) {
+      this.hisAprroveVisible = true
+      this.$nextTick(() => {
+        this.$refs.hisApprove.init(row, type)
+      })
+    },
     cleanRecordList(done){
       this.recordList= []
       this.openRecord=false;
@@ -1275,7 +1321,7 @@ export default {
         }
       });
     },
-    
+
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;

+ 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

+ 76 - 27
ui/src/views/intact/ysj/index.vue

@@ -258,8 +258,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>
@@ -289,7 +289,7 @@
 <!--      </el-table-column>-->
 <!--      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>-->
       <el-table-column label="部门名称" align="center" prop="deptName" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" fixed="right" width="140" class-name="small-padding fixed-width">
         <template slot-scope="scope">
 <!--          <el-button-->
 <!--            size="mini"-->
@@ -310,32 +310,24 @@
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-document"
             @click="toInspectionRecord(scope.row.devno,scope.row.position)"
             v-hasPermi="['intact:gyl:query']"
           >巡检记录</el-button>
-          <el-dialog title="巡检记录" :visible.sync="openRecord" :before-close="cleanRecordList" :append-to-body="true">
-            <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-              <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="region" :show-overflow-tooltip="true"/>
-              <el-table-column label="原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
-              <el-table-column label="巡检时间" align="center" prop="inspectionTime" width="100">
-                <template slot-scope="scope">
-                  <span>{{ parseTime(scope.row.inspectionTime, '{y}-{m}-{d}') }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="消故时间" align="center" prop="pastTime" width="100">
-                <template slot-scope="scope">
-                  <span>{{ parseTime(scope.row.pastTime, '{y}-{m}-{d}') }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="消故人" align="center" prop="pasterCode" :show-overflow-tooltip="true"/>
-              <el-table-column label="处理情况" align="center" prop="treatment" :show-overflow-tooltip="true"/>
-              <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-              <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-            </el-table>
-          </el-dialog>
+          <el-button
+            v-if="scope.row.approveTime != null"
+            type="text"
+            size="mini"
+            @click="hisApprove(scope.row,devType)"
+          > {{ $t('维修记录') }}<br>
+          </el-button>
+          <el-button
+            type="text"
+            size="mini"
+            @click="addAprrove(scope.row,devType)"
+          >{{ $t('提交维修申请') }}
+          </el-button>
+          <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
+          <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
         </template>
       </el-table-column>
     </el-table>
@@ -348,6 +340,29 @@
       @pagination="getList"
     />
 
+    <el-dialog title="巡检记录" :visible.sync="openRecord" :before-close="cleanRecordList" :append-to-body="true">
+      <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+        <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="region" :show-overflow-tooltip="true"/>
+        <el-table-column label="原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
+        <el-table-column label="巡检时间" align="center" prop="inspectionTime" width="100">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.inspectionTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="消故时间" align="center" prop="pastTime" width="100">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.pastTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="消故人" align="center" prop="pasterCode" :show-overflow-tooltip="true"/>
+        <el-table-column label="处理情况" align="center" prop="treatment" :show-overflow-tooltip="true"/>
+        <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
+        <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      </el-table>
+    </el-dialog>
+
     <!-- 添加或修改设备完整性压缩机台账对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -551,10 +566,12 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {listRecord} from "@/api/inspection/record";
+import AddApprove from "../approve/tapprove-maintenance-add"
+import HisApprove from "@/views/sems/approve/tapprove-his";
 
 export default {
   name: "Ysj",
-  components: {Treeselect},
+  components: {Treeselect, AddApprove, HisApprove},
   data() {
     return {
       devType: 3,
@@ -653,6 +670,8 @@ export default {
         updaterCode: null,
         updatedate: null,
         deptId: null,
+        approveStatus: null,
+        approveTime: null,
         deptName: null
       },
       // 表单参数
@@ -668,6 +687,9 @@ export default {
       },
       // 巡检记录表格数据
       recordList: [],
+      devType: 2,
+      addAprroveVisible: false,
+      hisAprroveVisible: false,
       openRecord:false
       };
   },
@@ -699,6 +721,31 @@ export default {
         this.openRecord=true;
       });
     },
+    addAprrove(row, type) {
+      var rows = row ? [row] : this.recordList.map(item => {
+        return item
+      })
+      for (let i = 0; i < rows.length; i++) {
+        if (rows[i].approveStatus != 0) {
+          this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
+            type: 'warning'
+          })
+          return
+        }
+      }
+      this.addAprroveVisible = true
+      console.log(rows)
+      console.log(type)
+      this.$nextTick(() => {
+        this.$refs.addApprove.init(rows, type)
+      })
+    },
+    hisApprove(row, type) {
+      this.hisAprroveVisible = true
+      this.$nextTick(() => {
+        this.$refs.hisApprove.init(row, type)
+      })
+    },
     cleanRecordList(done) {
       this.recordList = []
       this.openRecord=false;
@@ -759,6 +806,8 @@ export default {
         createdate: null,
         updaterCode: null,
         updatedate: null,
+        approveStatus: null,
+        approveTime: null,
         deptId: null
       };
       this.resetForm("form");

+ 5 - 0
ui/src/views/plant/staffmgr/index.vue

@@ -522,6 +522,11 @@
         <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :formatter="plantCodeFormat" />
         <el-table-column :label="$t('员工编号')" align="center" prop="staffid" :show-overflow-tooltip="true"/>
         <el-table-column :label="$t('员工姓名')" align="center" prop="name" :show-overflow-tooltip="true"/>
+        <el-table-column :label="$t('离职日期')" align="center" prop="leftDate" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.leftDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
         <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button