瀏覽代碼

- PSSR检修项目换热器、塔罐、阀门、过滤器导入功能修改
- PSSR检修项目换热器、塔罐、阀门、过滤器导出功能修改
- PSSR检修项目电仪、反应器、裂解炉、其它导入功能
- PSSR检修项目电仪、反应器、裂解炉、其它导出功能

wangggziwen 6 月之前
父節點
當前提交
6de7804c72

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

@@ -358,6 +358,21 @@ public class CommonController extends BaseController
         }else if( type.equals("overhaulFilter") ) {
             downloadname = "PSSR检修项目-过滤器导入模板.xlsx";
             url = "static/template/pssr/overhaulFilter.xlsx";
+        }else if( type.equals("blind") ) {
+            downloadname = "PSSR盲板导入模板.xlsx";
+            url = "static/template/pssr/blind.xlsx";
+        }else if( type.equals("overhaulExchanger2") ) {
+            downloadname = "PSSR检修项目-电仪导入模板.xlsx";
+            url = "static/template/pssr/overhaulExchanger.xlsx";
+        }else if( type.equals("overhaulExchanger3") ) {
+            downloadname = "PSSR检修项目-反应器导入模板.xlsx";
+            url = "static/template/pssr/overhaulExchanger.xlsx";
+        }else if( type.equals("overhaulExchanger4") ) {
+            downloadname = "PSSR检修项目-裂解炉导入模板.xlsx";
+            url = "static/template/pssr/overhaulExchanger.xlsx";
+        }else if( type.equals("overhaulExchanger5") ) {
+            downloadname = "PSSR检修项目-其它导入模板.xlsx";
+            url = "static/template/pssr/overhaulExchanger.xlsx";
         }
 
         InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(url);

+ 22 - 4
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulExchangerController.java

@@ -100,10 +100,10 @@ public class TPssrOverhaulExchangerController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrOverhaulExchanger tPssrOverhaulExchanger) {
         List<TPssrOverhaulExchanger> list = tPssrOverhaulExchangerService.selectTPssrOverhaulExchangerList(tPssrOverhaulExchanger);
-        return AjaxResult.success(exportTmpl(list));
+        return AjaxResult.success(exportTmpl(list, tPssrOverhaulExchanger.getDevType()));
     }
 
-    public String exportTmpl(List<TPssrOverhaulExchanger> list) {
+    public String exportTmpl(List<TPssrOverhaulExchanger> list, Long devType) {
         OutputStream out = null;
         String filename = null;
         try {
@@ -149,7 +149,23 @@ public class TPssrOverhaulExchangerController extends BaseController {
                 num++;
                 rowIndex++;
             }
-            filename = ExcelUtil.encodingFilename("OverhaulExchanger");
+            switch (devType.toString()) {
+                case "1":
+                    filename = ExcelUtil.encodingFilename("OverhaulExchanger");
+                    break;
+                case "2":
+                    filename = ExcelUtil.encodingFilename("OverhaulExchanger2");
+                    break;
+                case "3":
+                    filename = ExcelUtil.encodingFilename("OverhaulExchanger3");
+                    break;
+                case "4":
+                    filename = ExcelUtil.encodingFilename("OverhaulExchanger4");
+                    break;
+                case "5":
+                    filename = ExcelUtil.encodingFilename("OverhaulExchanger5");
+                    break;
+            }
             out = new FileOutputStream(ExcelUtil.getAbsoluteFile(filename));
             wb.write(out);
             wb.close();
@@ -333,7 +349,7 @@ public class TPssrOverhaulExchangerController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('pssr:overhaulExchanger:add')")
     @PostMapping("/importData")
-    public AjaxResult importInterlockData(MultipartFile file, Long subId) throws IOException
+    public AjaxResult importInterlockData(MultipartFile file, Long subId, Long devType) throws IOException
     {
         //获取操作人员ID
         Long userId = getUserId();
@@ -355,6 +371,8 @@ public class TPssrOverhaulExchangerController extends BaseController {
                 TPssrOverhaulExchanger entity = new TPssrOverhaulExchanger();
                 entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
                 entity.setSubId(subId);
+                entity.setDevType(devType);
+                entity.setApproveStatus(0L);
                 for (int j = 0; j < cellNum; j++) {
                     Cell cell = row.getCell(j);
                     String cellValue = ExcelUtils.getCellValue(cell);

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulFilterController.java

@@ -103,6 +103,7 @@ public class TPssrOverhaulFilterController extends BaseController {
                 TPssrOverhaulFilter entity = new TPssrOverhaulFilter();
                 entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
                 entity.setSubId(subId);
+                entity.setApproveStatus(0L);
                 for (int j = 0; j < cellNum; j++) {
                     Cell cell = row.getCell(j);
                     String cellValue = ExcelUtils.getCellValue(cell);

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulTowerController.java

@@ -103,6 +103,7 @@ public class TPssrOverhaulTowerController extends BaseController {
                 TPssrOverhaulTower entity = new TPssrOverhaulTower();
                 entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
                 entity.setSubId(subId);
+                entity.setApproveStatus(0L);
                 for (int j = 0; j < cellNum; j++) {
                     Cell cell = row.getCell(j);
                     String cellValue = ExcelUtils.getCellValue(cell);

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulValveController.java

@@ -103,6 +103,7 @@ public class TPssrOverhaulValveController extends BaseController {
                 TPssrOverhaulValve entity = new TPssrOverhaulValve();
                 entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
                 entity.setSubId(subId);
+                entity.setApproveStatus(0L);
                 for (int j = 0; j < cellNum; j++) {
                     Cell cell = row.getCell(j);
                     String cellValue = ExcelUtils.getCellValue(cell);

+ 1 - 1
master/src/main/resources/mybatis/pssr/TPssrOverhaulExchangerMapper.xml

@@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tagNo != null">#{tagNo},</if>
             <if test="equipmentName != null">#{equipmentName},</if>
             <if test="workDes != null">#{workDes},</if>
-            <if test="devType != null">#{dev_type},</if>
+            <if test="devType != null">#{devType},</if>
             <if test="pidNo != null">#{pidNo},</if>
             <if test="completionDate != null">#{completionDate},</if>
             <if test="confirmedPerson != null">#{confirmedPerson},</if>

+ 18 - 2
ui/src/views/pssr/overhaulExchanger/index.vue

@@ -511,7 +511,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/pssr/overhaulExchanger/importData?subId=" + this.subId
+        url: process.env.VUE_APP_BASE_API + "/pssr/overhaulExchanger/importData?subId=" + this.subId + "&devType=" + this.devType
       },
       // 查询参数
       queryParams: {
@@ -567,6 +567,23 @@ export default {
       this.unitDes = res.data.unitDes
       this.subStatus = res.data.approveStatus
     })
+    switch (this.devType) {
+      case 1:
+        this.upload.type = 'overhaulExchanger';
+        break;
+      case 2:
+        this.upload.type = 'overhaulExchanger2';
+        break;
+      case 3:
+        this.upload.type = 'overhaulExchanger3';
+        break;
+      case 4:
+        this.upload.type = 'overhaulExchanger4';
+        break;
+      case 5:
+        this.upload.type = 'overhaulExchanger5';
+        break;
+    }
   },
   methods: {
     handleTurnDown(val) {
@@ -756,7 +773,6 @@ export default {
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
-      console.log(response)
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();