wangggziwen 2 éve
szülő
commit
d5af9f51ea

+ 3 - 3
master/src/main/java/com/ruoyi/project/common/CommonController.java

@@ -69,9 +69,9 @@ public class CommonController extends BaseController
         } else if( type.equals("publicdocmenu") ) {
             downloadname = "公共文档目录管理导入模板.xlsx";
             url = "static/template/document/publicdocmenu.xlsx";
-        } else if( type.equals("moc") ) {
-            downloadname = "MOC管理导入模板.xlsx";
-            url = "static/template/process/moc.xlsx";
+        } else if( type.equals("permanentMoc") ) {
+            downloadname = "永久MOC导入模板.xlsx";
+            url = "static/template/process/permanentMoc.xlsx";
         } else if( type.equals("accident") ) {
             downloadname = "隐患排查导入模板.xlsx";
             url = "static/template/production/accident.xlsx";

+ 240 - 168
master/src/main/java/com/ruoyi/project/process/controller/TMocController.java

@@ -13,12 +13,15 @@ import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.project.common.domain.DataEntity;
 import com.ruoyi.project.common.domain.TCommonfile;
 import com.ruoyi.project.common.service.ITCommonfileService;
+import com.ruoyi.project.process.controller.export.PermanentMoc;
 import com.ruoyi.project.process.controller.vo.*;
 import com.ruoyi.project.process.mapper.TMocMapper;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.service.ISysDeptService;
 import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.ISysUserService;
 import com.ruoyi.project.training.domain.TTraining;
 import com.ruoyi.project.training.service.ITTrainingService;
 import org.apache.commons.lang.StringUtils;
@@ -51,6 +54,9 @@ public class TMocController extends BaseController
     @Autowired
     private ITMocService tMocService;
 
+    @Autowired
+    private ISysUserService userService;
+
     @Autowired
     private ISysDictTypeService iSysDictTypeService;
 
@@ -66,6 +72,239 @@ public class TMocController extends BaseController
     @Autowired
     private ITCommonfileService commonfileService;
 
+    /**
+     * 导出永久MOC
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:export')")
+    @GetMapping("/exportpermanent")
+    public AjaxResult exportPermanentMoc(TMoc tMoc)
+    {
+        // 当前用户归属部门
+        Long deptId = userService.selectUserById(getUserId()).getDeptId();
+        // 查询条件
+        // 1. 数据归属部门=当前用户归属部门
+        tMoc.setDeptId(deptId);
+        // 2. 时效性=永久
+        tMoc.setTimeliness("1");
+        // 查询总表数据
+        List<TMoc> mocList = tMocService.selectTMocList(tMoc);
+        // 永久MOC数据
+        List<PermanentMoc> permanentMocList = new ArrayList<PermanentMoc>();
+        //字典查询
+        List<SysDictData> mocAreaDict = iSysDictTypeService.selectDictDataByType("MOC_AREA");
+        List<SysDictData> mocTypeDict = iSysDictTypeService.selectDictDataByType("MOC_TYPE");
+        List<SysDictData> mcDetailDict = iSysDictTypeService.selectDictDataByType("MC_DETAIL");
+        List<SysDictData> yesNoEnDict = iSysDictTypeService.selectDictDataByType("YES_NO_EN");
+        // 遍历总表数据,插入永久MOC表
+        for (TMoc moc : mocList) {
+            PermanentMoc permanentMoc = new PermanentMoc();
+            permanentMoc.setMocNo(moc.getMocNo());
+            permanentMoc.setCompanyMocNo(moc.getCompanyMocNo());
+            permanentMoc.setProjectNo(moc.getProjectNo());
+            for (SysDictData sysDictData : mocAreaDict) {
+                System.out.println("sysDictData.getDictValue():" + sysDictData.getDictValue());
+                System.out.println("permanentMoc.getArea():" + permanentMoc.getArea());
+                System.out.println("比对结果:" + sysDictData.getDictValue().equals(permanentMoc.getArea()));
+                if (sysDictData.getDictValue().equals(moc.getArea())) {
+                    permanentMoc.setArea(sysDictData.getDictLabel());
+                }
+            }
+            permanentMoc.setTitle(moc.getTitle());
+            for (SysDictData sysDictData : mocTypeDict) {
+                if (sysDictData.getDictValue().equals(moc.getMocType())) {
+                    permanentMoc.setMocType(sysDictData.getDictLabel());
+                }
+            }
+            permanentMoc.setOwner(moc.getOwner());
+            permanentMoc.setApproveTime(moc.getApproveTime());
+            permanentMoc.setMcTime(moc.getMcTime());
+            for (SysDictData sysDictData : mcDetailDict) {
+                if (sysDictData.getDictValue().equals(moc.getMcDetail())) {
+                    permanentMoc.setMcDetail(sysDictData.getDictLabel());
+                }
+            }
+            permanentMoc.setRemarks(moc.getRemarks());
+            permanentMoc.setRiskLevel(moc.getRiskLevel());
+            permanentMoc.setEhsCheck(moc.getEhsCheck());
+            permanentMoc.setTraining(moc.getTraining());
+            for (SysDictData sysDictData : yesNoEnDict) {
+                if (sysDictData.getDictValue().equals(moc.getSopUpdate())) {
+                    permanentMoc.setSopUpdate(sysDictData.getDictLabel());
+                }
+            }
+            for (SysDictData sysDictData : yesNoEnDict) {
+                if (sysDictData.getDictValue().equals(moc.getPidMaster())) {
+                    permanentMoc.setPidMaster(sysDictData.getDictLabel());
+                }
+            }
+            for (SysDictData sysDictData : yesNoEnDict) {
+                if (sysDictData.getDictValue().equals(moc.getDocUpdate())) {
+                    permanentMoc.setDocUpdate(sysDictData.getDictLabel());
+                }
+            }
+            permanentMoc.setPssr(moc.getPssr());
+            permanentMoc.setPssrNo(moc.getPssrNo());
+            permanentMocList.add(permanentMoc);
+        }
+        ExcelUtil<PermanentMoc> util = new ExcelUtil<PermanentMoc>(PermanentMoc.class);
+        return util.exportExcel(permanentMocList, "永久MOC");
+    }
+
+    /**
+     * 批量导入MOC管理
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:add')")
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException
+    {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow =new ArrayList<Integer>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TMoc> list = new ArrayList<TMoc>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        //字典查询
+        List<SysDictData> plant = iSysDictTypeService.selectDictDataByType("PLANT_DIVIDE");
+        List<SysDictData> state = iSysDictTypeService.selectDictDataByType("MOC_STATE");
+        List<SysDictData> change = iSysDictTypeService.selectDictDataByType("MOC_CHANGE");
+        List<SysDictData> risklevel = iSysDictTypeService.selectDictDataByType("MOC_RISKLEVEL");
+        List<SysDictData> area = iSysDictTypeService.selectDictDataByType("MOC_AREA");
+        List<SysDictData> temporarystate = iSysDictTypeService.selectDictDataByType("MOC_TEMPORARYSTATE");
+        List<SysDictData> yesno = iSysDictTypeService.selectDictDataByType("YES_NO");
+        //部门查询
+        List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 1; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getPhysicalNumberOfCells();
+                TMoc entity = new TMoc();
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    //  cell.setCellType(CellType.STRING);
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        for (SysDictData p : plant) {
+                            if (p.getDictLabel().equals(cellValue.trim())) {
+                                entity.setPlantCode(p.getDictValue());//装置名称
+                            }
+                        }
+                    } else if (j == 1) {
+                        entity.setMocNo(cellValue);//MOC编号
+                    } else if (j == 2) {
+                        for (SysDictData a : area) {
+                            if (a.getDictLabel().equals(cellValue.trim())) {
+                                entity.setArea(a.getDictValue());//区域
+                            }
+                        }
+                    } else if (j == 3) {
+                        entity.setTitle(cellValue);//标题
+                    } else if (j == 4) {
+                        entity.setOwner(cellValue);//负责人
+                    } else if (j == 5) {
+                        if (cellValue.length() > 3) {
+                            entity.setApproveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//申请时间
+                        }
+                    } else if (j == 6) {
+                        if (cellValue.length() > 3) {
+                            entity.setEndtime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//完成时间
+                        }
+                    } else if (j == 7) {
+                        for (SysDictData s : state) {
+                            if (s.getDictLabel().equals(cellValue.trim())) {
+                                entity.setTrueState(s.getDictValue());//实施情况
+                            }
+                        }
+                    } else if (j == 8) {
+                        for (SysDictData c : change) {
+                            if (c.getDictLabel().equals(cellValue.trim())) {
+                                entity.setChangeNature(c.getDictValue());//变更性质
+                            }
+                        }
+                    } else if (j == 9) {
+                        if (cellValue.length() > 3) {
+                            entity.setOverTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//到期时间
+                        }
+                    } else if (j == 10) {
+                        for (SysDictData t : temporarystate) {
+                            if (t.getDictLabel().equals(cellValue.trim())) {
+                                entity.setTemporaryState(t.getDictValue());//临时moc状态
+                            }
+                        }
+                    } else if (j == 11) {
+                        entity.setRemarks(cellValue);//备注
+                    } else if (j == 12) {
+                        for (SysDictData r : risklevel) {
+                            if (r.getDictLabel().equals(cellValue.trim())) {
+                                entity.setRiskLevel(r.getDictValue());//风险等级
+                            }
+                        }
+                    } else if (j == 13) {
+                        if (cellValue.length() > 3) {
+                            entity.setEhsCheck(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//EHS审查
+                        }
+                    } else if (j == 14) {
+                        if (cellValue.length() > 3) {
+                            entity.setTraining(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//培训
+                        }
+                    } else if (j == 15) {
+                        if (cellValue.length() > 3) {
+                            entity.setPssr(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//PSSR
+                        }
+                    } else if (j == 16) {
+                        for (SysDictData y : yesno) {
+                            if (y.getDictLabel().equals(cellValue.trim())) {
+                                entity.setSopUpdate(y.getDictValue());//SOP更新
+                            }
+                        }
+                    } else if (j == 17) {
+                        for (SysDictData y : yesno) {
+                            if (y.getDictLabel().equals(cellValue.trim())) {
+                                entity.setPidMaster(y.getDictValue());//PID更新
+                            }
+                        }
+                    } else if (j == 18) {
+                        for (SysDept d : dept) {
+                            if (d.getDeptName().equals(cellValue.trim())) {
+                                entity.setDeptId(d.getDeptId());//部门编号
+                            }
+                        }
+                    }
+                }
+                entity.setCreaterCode(userId.toString());
+                logger.info("entity:" + entity);
+                list.add(entity);
+            }catch (Exception e){
+                failNumber++;
+                failRow.add(i+1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TMoc t : list
+        ) {
+            failNum++;
+            try {
+                tMocService.insertTMoc(t);
+                successNumber++;
+            }catch (Exception e){
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(failNum+1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" +String.valueOf(successNumber));
+        logger.info("failNumber:" +String.valueOf(failNumber));
+        logger.info("failRow:" +String.valueOf(failRow));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
+
     // 堵漏日期统计
     @GetMapping("/sealDateData")
     public List<DataEntity> sealDateData(SealDateVO sealDateVO)
@@ -439,18 +678,7 @@ public class TMocController extends BaseController
         }
         return list;
     }
-    /**
-     * 导出MOC管理列表
-     */
-    @PreAuthorize("@ss.hasPermi('process:moc:export')")
-    @Log(title = "MOC管理", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(TMoc tMoc)
-    {
-        List<TMoc> list = tMocService.selectTMocList(tMoc);
-        ExcelUtil<TMoc> util = new ExcelUtil<TMoc>(TMoc.class);
-        return util.exportExcel(list, "moc");
-    }
+
 
     /**
      * 获取MOC管理详细信息
@@ -522,160 +750,4 @@ public class TMocController extends BaseController
     {
         return toAjax(tMocService.deleteTMocByIds(ids));
     }
-
-    /**
-     * 批量导入MOC管理
-     */
-    @PreAuthorize("@ss.hasPermi('process:moc:add')")
-    @Log(title = "MOC管理", businessType = BusinessType.INSERT)
-    @PostMapping("/importData")
-    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException
-    {
-        //获取操作人员ID
-        Long userId = getUserId();
-        //报错行数统计
-        List<Integer> failRow =new ArrayList<Integer>();
-        Workbook workbook = ExcelUtils.getWorkBook(file);
-        Sheet sheet = workbook.getSheetAt(0);
-        List<TMoc> list = new ArrayList<TMoc>();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        //字典查询
-        List<SysDictData> plant = iSysDictTypeService.selectDictDataByType("PLANT_DIVIDE");
-        List<SysDictData> state = iSysDictTypeService.selectDictDataByType("MOC_STATE");
-        List<SysDictData> change = iSysDictTypeService.selectDictDataByType("MOC_CHANGE");
-        List<SysDictData> risklevel = iSysDictTypeService.selectDictDataByType("MOC_RISKLEVEL");
-        List<SysDictData> area = iSysDictTypeService.selectDictDataByType("MOC_AREA");
-        List<SysDictData> temporarystate = iSysDictTypeService.selectDictDataByType("MOC_TEMPORARYSTATE");
-        List<SysDictData> yesno = iSysDictTypeService.selectDictDataByType("YES_NO");
-        //部门查询
-        List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
-        int rowNum = sheet.getPhysicalNumberOfRows();
-        int failNumber = 0;
-        for (int i = 1; i < rowNum; i++) {
-            try {
-                logger.info("读取行数:" + i);
-                Row row = sheet.getRow(i);
-                int cellNum = row.getPhysicalNumberOfCells();
-                TMoc entity = new TMoc();
-                for (int j = 0; j < cellNum; j++) {
-                    Cell cell = row.getCell(j);
-                    //  cell.setCellType(CellType.STRING);
-                    String cellValue = ExcelUtils.getCellValue(cell);
-                    logger.info("cellValue:" + cellValue);
-                    if (j == 0) {
-                        for (SysDictData p : plant) {
-                            if (p.getDictLabel().equals(cellValue.trim())) {
-                                entity.setPlantCode(p.getDictValue());//装置名称
-                            }
-                        }
-                    } else if (j == 1) {
-                        entity.setMocNo(cellValue);//MOC编号
-                    } else if (j == 2) {
-                        for (SysDictData a : area) {
-                            if (a.getDictLabel().equals(cellValue.trim())) {
-                                entity.setArea(a.getDictValue());//区域
-                            }
-                        }
-                    } else if (j == 3) {
-                        entity.setTitle(cellValue);//标题
-                    } else if (j == 4) {
-                        entity.setOwner(cellValue);//负责人
-                    } else if (j == 5) {
-                        if (cellValue.length() > 3) {
-                            entity.setApproveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//申请时间
-                        }
-                    } else if (j == 6) {
-                        if (cellValue.length() > 3) {
-                            entity.setEndtime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//完成时间
-                        }
-                    } else if (j == 7) {
-                        for (SysDictData s : state) {
-                            if (s.getDictLabel().equals(cellValue.trim())) {
-                                entity.setTrueState(s.getDictValue());//实施情况
-                            }
-                        }
-                    } else if (j == 8) {
-                        for (SysDictData c : change) {
-                            if (c.getDictLabel().equals(cellValue.trim())) {
-                                entity.setChangeNature(c.getDictValue());//变更性质
-                            }
-                        }
-                    } else if (j == 9) {
-                        if (cellValue.length() > 3) {
-                            entity.setOverTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//到期时间
-                        }
-                    } else if (j == 10) {
-                        for (SysDictData t : temporarystate) {
-                            if (t.getDictLabel().equals(cellValue.trim())) {
-                                entity.setTemporaryState(t.getDictValue());//临时moc状态
-                            }
-                        }
-                    } else if (j == 11) {
-                        entity.setRemarks(cellValue);//备注
-                    } else if (j == 12) {
-                        for (SysDictData r : risklevel) {
-                            if (r.getDictLabel().equals(cellValue.trim())) {
-                                entity.setRiskLevel(r.getDictValue());//风险等级
-                            }
-                        }
-                    } else if (j == 13) {
-                        if (cellValue.length() > 3) {
-                            entity.setEhsCheck(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//EHS审查
-                        }
-                    } else if (j == 14) {
-                        if (cellValue.length() > 3) {
-                            entity.setTraining(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//培训
-                        }
-                    } else if (j == 15) {
-                        if (cellValue.length() > 3) {
-                            entity.setPssr(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//PSSR
-                        }
-                    } else if (j == 16) {
-                        for (SysDictData y : yesno) {
-                            if (y.getDictLabel().equals(cellValue.trim())) {
-                                entity.setSopUpdate(y.getDictValue());//SOP更新
-                            }
-                        }
-                    } else if (j == 17) {
-                        for (SysDictData y : yesno) {
-                            if (y.getDictLabel().equals(cellValue.trim())) {
-                                entity.setPidMaster(y.getDictValue());//PID更新
-                            }
-                        }
-                    } else if (j == 18) {
-                        for (SysDept d : dept) {
-                            if (d.getDeptName().equals(cellValue.trim())) {
-                                entity.setDeptId(d.getDeptId());//部门编号
-                            }
-                        }
-                    }
-                }
-                entity.setCreaterCode(userId.toString());
-                logger.info("entity:" + entity);
-                list.add(entity);
-            }catch (Exception e){
-                failNumber++;
-                failRow.add(i+1);
-            }
-        }
-        int successNumber = 0;
-        int failNum = 0;
-        for (TMoc t : list
-        ) {
-            failNum++;
-            try {
-                tMocService.insertTMoc(t);
-                successNumber++;
-            }catch (Exception e){
-                failNumber++;
-                logger.info("e:" + e);
-                failRow.add(failNum+1);
-            }
-        }
-        logger.info("list:" + JSON.toJSONString(list));
-        logger.info("successNumber:" +String.valueOf(successNumber));
-        logger.info("failNumber:" +String.valueOf(failNumber));
-        logger.info("failRow:" +String.valueOf(failRow));
-        return AjaxResult.success(String.valueOf(successNumber), failRow);
-    }
 }

+ 254 - 0
master/src/main/java/com/ruoyi/project/process/controller/export/PermanentMoc.java

@@ -0,0 +1,254 @@
+package com.ruoyi.project.process.controller.export;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 永久MOC导出字段
+ *
+ * @author Wang Zi Wen
+ * @email wangggziwen@163.com
+ * @date 2023/02/22 14:17:12
+ */
+public class PermanentMoc extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** MOC编号 */
+    @Excel(name = "MOC编号")
+    private String mocNo;
+
+    /** 公司MOC编号 */
+    @Excel(name = "公司MOC编号")
+    private String companyMocNo;
+
+    /** 项目号 */
+    @Excel(name = "项目号")
+    private String projectNo;
+
+    /** 区域 */
+    @Excel(name = "区域")
+    private String area;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    private String title;
+
+    /** MOC类型 */
+    @Excel(name = "MOC类型")
+    private String mocType;
+
+    /** 负责人 */
+    @Excel(name = "负责人")
+    private String owner;
+
+    /** 申请时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date approveTime;
+
+    /** MC时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "MC时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date mcTime;
+
+    /** MC情况 */
+    @Excel(name = "MC情况")
+    private String mcDetail;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 风险等级 */
+    @Excel(name = "风险等级", dictType = "MOC_RISKLEVEL")
+    private String riskLevel;
+
+    /** EHS评估/审查 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "EHS评估/审查", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date ehsCheck;
+
+    /** 培训 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "培训", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date training;
+
+    /** SOP更新 */
+    @Excel(name = "SOP更新")
+    private String sopUpdate;
+
+    /** PID MASTER更新 */
+    @Excel(name = "PID更新")
+    private String pidMaster;
+
+    /** 文档更新 */
+    @Excel(name = "文档更新")
+    private String docUpdate;
+
+    /** PSSR */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "PSSR", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date pssr;
+
+    /** PSSR编号 */
+    @Excel(name = "PSSR编号")
+    private String pssrNo;
+
+    public Date getPssr() {
+        return pssr;
+    }
+
+    public void setPssr(Date pssr) {
+        this.pssr = pssr;
+    }
+
+    public String getMocNo() {
+        return mocNo;
+    }
+
+    public void setMocNo(String mocNo) {
+        this.mocNo = mocNo;
+    }
+
+    public String getCompanyMocNo() {
+        return companyMocNo;
+    }
+
+    public void setCompanyMocNo(String companyMocNo) {
+        this.companyMocNo = companyMocNo;
+    }
+
+    public String getProjectNo() {
+        return projectNo;
+    }
+
+    public void setProjectNo(String projectNo) {
+        this.projectNo = projectNo;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getMocType() {
+        return mocType;
+    }
+
+    public void setMocType(String mocType) {
+        this.mocType = mocType;
+    }
+
+    public String getOwner() {
+        return owner;
+    }
+
+    public void setOwner(String owner) {
+        this.owner = owner;
+    }
+
+    public Date getApproveTime() {
+        return approveTime;
+    }
+
+    public void setApproveTime(Date approveTime) {
+        this.approveTime = approveTime;
+    }
+
+    public Date getMcTime() {
+        return mcTime;
+    }
+
+    public void setMcTime(Date mcTime) {
+        this.mcTime = mcTime;
+    }
+
+    public String getMcDetail() {
+        return mcDetail;
+    }
+
+    public void setMcDetail(String mcDetail) {
+        this.mcDetail = mcDetail;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public String getRiskLevel() {
+        return riskLevel;
+    }
+
+    public void setRiskLevel(String riskLevel) {
+        this.riskLevel = riskLevel;
+    }
+
+    public Date getEhsCheck() {
+        return ehsCheck;
+    }
+
+    public void setEhsCheck(Date ehsCheck) {
+        this.ehsCheck = ehsCheck;
+    }
+
+    public Date getTraining() {
+        return training;
+    }
+
+    public void setTraining(Date training) {
+        this.training = training;
+    }
+
+    public String getSopUpdate() {
+        return sopUpdate;
+    }
+
+    public void setSopUpdate(String sopUpdate) {
+        this.sopUpdate = sopUpdate;
+    }
+
+    public String getPidMaster() {
+        return pidMaster;
+    }
+
+    public void setPidMaster(String pidMaster) {
+        this.pidMaster = pidMaster;
+    }
+
+    public String getDocUpdate() {
+        return docUpdate;
+    }
+
+    public void setDocUpdate(String docUpdate) {
+        this.docUpdate = docUpdate;
+    }
+
+    public String getPssrNo() {
+        return pssrNo;
+    }
+
+    public void setPssrNo(String pssrNo) {
+        this.pssrNo = pssrNo;
+    }
+}

BIN
master/src/main/resources/static/template/process/permanentMoc.xlsx


+ 3 - 4
ui/src/api/process/moc.js

@@ -226,11 +226,10 @@ export function delMoc(id) {
   })
 }
 
-// 导出MOC管理
-export function exportMoc(query) {
+// 导出永久MOC
+export function exportPermanentMoc() {
   return request({
-    url: '/process/moc/export',
+    url: '/process/moc/exportpermanent',
     method: 'get',
-    params: query
   })
 }

+ 22 - 31
ui/src/views/process/moc/permanentMoc/index.vue

@@ -64,32 +64,24 @@
           v-hasPermi="['process:moc:remove']"
         >{{ $t('删除') }}</el-button>
       </el-col>
-        <!--<el-col :span="1.5">-->
-            <!--<el-button-->
-                    <!--type="info"-->
-                    <!--icon="el-icon-upload2"-->
-                    <!--size="mini"-->
-                    <!--@click="handleImport"-->
-                    <!--v-hasPermi="['process:moc:edit']"-->
-            <!--&gt;{{ $t('导入') }}</el-button>-->
-        <!--</el-col>-->
-      <!--<el-col :span="1.5">-->
-        <!--<el-button-->
-          <!--type="warning"-->
-          <!--icon="el-icon-download"-->
-          <!--size="mini"-->
-          <!--@click="handleExport"-->
-          <!--v-hasPermi="['process:moc:export']"-->
-        <!--&gt;{{ $t('导出') }}</el-button>-->
-      <!--</el-col>-->
-      <!--<el-col :span="1.5">-->
-        <!--<el-button-->
-        <!--type="primary"-->
-        <!--icon="el-icon-s-data"-->
-        <!--size="mini"-->
-        <!--@click="handleData"-->
-        <!--&gt;{{ $t('数据分析') }}</el-button>-->
-      <!--</el-col>-->
+        <el-col :span="1.5">
+            <el-button
+                    type="info"
+                    icon="el-icon-upload2"
+                    size="mini"
+                    @click="handleImport"
+                    v-hasPermi="['process:moc:edit']"
+            >{{ $t('导入') }}</el-button>
+        </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['process:moc:export']"
+        >{{ $t('导出') }}</el-button>
+      </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -524,7 +516,7 @@
 </template>
 
 <script>
-import { listPermanent, listTemporary, listAquifier, listFacility, listInterlock, getMoc, delMoc, addMoc, updateMoc, exportMoc } from "@/api/process/moc";
+import { listPermanent, listTemporary, listAquifier, listFacility, listInterlock, getMoc, delMoc, addMoc, updateMoc, exportPermanentMoc } from "@/api/process/moc";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -637,7 +629,7 @@ export default {
         //下载模板请求地址
         downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
         //下载模板类型
-        type: 'moc',
+        type: 'permanentMoc',
         // 是否显示弹出层(用户导入)
         open: false,
         // 弹出层标题(用户导入)
@@ -1069,13 +1061,12 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm(this.$t('是否确认导出所有MOC管理数据项?'), this.$t('警告'), {
+      this.$confirm(this.$t('是否确认导出所有永久MOC数据项?'), this.$t('警告'), {
           confirmButtonText: this.$t('确定'),
           cancelButtonText: this.$t('取消'),
           type: "warning"
         }).then(function() {
-          return exportMoc(queryParams);
+          return exportPermanentMoc();
         }).then(response => {
           this.download(response.msg);
         })