Forráskód Böngészése

pssr人身防护
pssr原辅料

jiangbiao 10 hónapja
szülő
commit
3219690b6f
67 módosított fájl, 4603 hozzáadás és 727 törlés
  1. 26 0
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAboveallController.java
  2. 96 12
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java
  3. 193 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialController.java
  4. 267 0
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialRawController.java
  5. 276 0
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMeasureController.java
  6. 189 29
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrProtectionController.java
  7. 5 5
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyController.java
  8. 48 6
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrMaterial.java
  9. 318 0
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrMaterialRaw.java
  10. 330 0
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrMeasure.java
  11. 20 0
      master/src/main/java/com/ruoyi/project/pssr/domain/TPssrProtection.java
  12. 1 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMaterialMapper.java
  13. 65 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMaterialRawMapper.java
  14. 64 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMeasureMapper.java
  15. 3 0
      master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrProtectionMapper.java
  16. 63 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrMaterialRawService.java
  17. 1 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrMaterialService.java
  18. 62 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrMeasureService.java
  19. 2 0
      master/src/main/java/com/ruoyi/project/pssr/service/ITPssrProtectionService.java
  20. 99 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrMaterialRawServiceImpl.java
  21. 5 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrMaterialServiceImpl.java
  22. 105 0
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrMeasureServiceImpl.java
  23. 22 18
      master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrProtectionServiceImpl.java
  24. 25 6
      master/src/main/resources/mybatis/pssr/TPssrMaterialMapper.xml
  25. 160 0
      master/src/main/resources/mybatis/pssr/TPssrMaterialRawMapper.xml
  26. 167 0
      master/src/main/resources/mybatis/pssr/TPssrMeasureMapper.xml
  27. 26 1
      master/src/main/resources/mybatis/pssr/TPssrProtectionMapper.xml
  28. 20 1
      ui/src/api/pssr/material.js
  29. 72 0
      ui/src/api/pssr/materialRaw.js
  30. 71 0
      ui/src/api/pssr/measure.js
  31. 19 1
      ui/src/api/pssr/protection.js
  32. 1 0
      ui/src/views/pssr/airtight/index.vue
  33. 1 0
      ui/src/views/pssr/analyzer/index.vue
  34. 5 4
      ui/src/views/pssr/blind/index.vue
  35. 1 0
      ui/src/views/pssr/circuit/index.vue
  36. 1 0
      ui/src/views/pssr/cleaning/index.vue
  37. 1 0
      ui/src/views/pssr/frame/index.vue
  38. 1 0
      ui/src/views/pssr/franklinism/index.vue
  39. 1 0
      ui/src/views/pssr/gasdetector/index.vue
  40. 3 1
      ui/src/views/pssr/hygiene/index.vue
  41. 1 0
      ui/src/views/pssr/instrumentCalibration/index.vue
  42. 3 1
      ui/src/views/pssr/laboratory/index.vue
  43. 3 1
      ui/src/views/pssr/lock/index.vue
  44. 240 284
      ui/src/views/pssr/material/index.vue
  45. 552 0
      ui/src/views/pssr/materialRaw/index.vue
  46. 603 0
      ui/src/views/pssr/measure/index.vue
  47. 1 0
      ui/src/views/pssr/moc/index.vue
  48. 1 0
      ui/src/views/pssr/motor/index.vue
  49. 1 0
      ui/src/views/pssr/nitrogen/index.vue
  50. 4 2
      ui/src/views/pssr/overhaulExchanger/index.vue
  51. 3 1
      ui/src/views/pssr/overhaulFilter/index.vue
  52. 3 1
      ui/src/views/pssr/overhaulPipe/index.vue
  53. 3 1
      ui/src/views/pssr/overhaulPump/index.vue
  54. 3 1
      ui/src/views/pssr/overhaulTower/index.vue
  55. 3 1
      ui/src/views/pssr/overhaulValve/index.vue
  56. 13 6
      ui/src/views/pssr/pipe/index.vue
  57. 1 0
      ui/src/views/pssr/power/index.vue
  58. 279 297
      ui/src/views/pssr/protection/index.vue
  59. 1 0
      ui/src/views/pssr/public/index.vue
  60. 4 2
      ui/src/views/pssr/region/index.vue
  61. 1 0
      ui/src/views/pssr/safetyBleed/index.vue
  62. 1 0
      ui/src/views/pssr/safetyBreath/index.vue
  63. 1 0
      ui/src/views/pssr/safetyBrust/index.vue
  64. 1 0
      ui/src/views/pssr/safetyFlamearrester/index.vue
  65. 1 0
      ui/src/views/pssr/safetyValve/index.vue
  66. 2 1
      ui/src/views/pssr/subcontent/index.vue
  67. 39 15
      ui/src/views/pssr/subitem/index.vue

+ 26 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAboveallController.java

@@ -8,9 +8,11 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.pssr.domain.TPssrAboveall;
+import com.ruoyi.project.pssr.domain.TPssrMaterial;
 import com.ruoyi.project.pssr.domain.TPssrPatrol;
 import com.ruoyi.project.pssr.domain.TPssrSubcontent;
 import com.ruoyi.project.pssr.service.ITPssrAboveallService;
+import com.ruoyi.project.pssr.service.ITPssrMaterialService;
 import com.ruoyi.project.pssr.service.ITPssrPatrolService;
 import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -39,6 +41,9 @@ public class TPssrAboveallController extends BaseController {
     @Autowired
     private ITPssrPatrolService tPssrPatrolService;
 
+    @Autowired
+    private ITPssrMaterialService tPssrMaterialService;
+
     /**
      * 查询PSSR列表
      */
@@ -153,6 +158,10 @@ public class TPssrAboveallController extends BaseController {
                             tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
                         }
                     }, "新增便携式检测仪数据").start();
+                }else if (subcontent.getForShort().equals("yfl")) {
+                    new Thread(() -> {
+                        genYfl(subcontent.getId());
+                    }, "新增原辅料数据").start();
                 }
             }
         }
@@ -166,6 +175,23 @@ public class TPssrAboveallController extends BaseController {
         return tPssrPatrol;
     }
 
+    private void genYfl(Long subId) {
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Electr. Power", "MWH", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "LP steam", "/", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "MP steam", "/", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "HP steam", "Ton", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Potable water", "Ton", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "production water", "Ton", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "LP fire water", "/", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "HP fire water", "/", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Cooling water", "Ton", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Demine Water", "Ton", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Nitrogen", "Nm3", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Plant Air", "Nm3", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "Instrument Air", "Nm3", getUserId().toString(), new Date(), 0L));
+        tPssrMaterialService.insertTPssrMaterial(new TPssrMaterial(subId, "WW(only quantity)", "Ton", getUserId().toString(), new Date(), 0L));
+    }
+
     /**
      * 修改PSSR
      */

+ 96 - 12
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java

@@ -110,19 +110,19 @@ public class TPssrApproveController extends BaseController {
     private ITPssrPublicService tPssrPublicService;
 
     @Autowired
-    private ITPssrSafetyBleedService tPssrSafetyBleedServeice;
+    private ITPssrSafetyBleedService tPssrSafetyBleedService;
 
     @Autowired
-    private ITPssrSafetyBreathService tPssrSafetyBreathServeice;
+    private ITPssrSafetyBreathService tPssrSafetyBreathService;
 
     @Autowired
-    private ITPssrSafetyBrustService tPssrSafetyBrustServeice;
+    private ITPssrSafetyBrustService tPssrSafetyBrustService;
 
     @Autowired
-    private ITPssrSafetyFlamearresterService tPssrSafetyFlamearresterServeice;
+    private ITPssrSafetyFlamearresterService tPssrSafetyFlamearresterService;
 
     @Autowired
-    private ITPssrSafetyValveService tPssrSafetyValveServeice;
+    private ITPssrSafetyValveService tPssrSafetyValveService;
 
     @Autowired
     private ITPssrFrameService tPssrFrameService;
@@ -145,6 +145,12 @@ public class TPssrApproveController extends BaseController {
     @Autowired
     private ITPssrAnalyzerService tPssrAnalyzerService;
 
+    @Autowired
+    private ITPssrMeasureService tPssrMeasureService;
+
+    @Autowired
+    private ITPssrProtectionService tPssrProtectionService;
+
     /**
      * 查询pssr审批管理列表
      */
@@ -229,6 +235,7 @@ public class TPssrApproveController extends BaseController {
                 doXcwsApprove(tPssrSubcontent);
                 break;
             case "rsfh"://人身防护
+                doRsfhApprove(tPssrSubcontent);
                 break;
             case "sbqjd"://设备清洁度
                 doSbqjdApprove(tPssrSubcontent);
@@ -496,6 +503,7 @@ public class TPssrApproveController extends BaseController {
 
     /**
      * 氮气置换审批流程发起申请
+     *
      * @param sub
      */
     private void doDqzhApprove(TPssrSubcontent sub) {
@@ -838,37 +846,37 @@ public class TPssrApproveController extends BaseController {
         bleed.setApproveStatus(1L);
         bleed.setUpdatedate(new Date());
         bleed.setUpdaterCode(userId);
-        tPssrSafetyBleedServeice.updateAllBySubId(bleed);
+        tPssrSafetyBleedService.updateAllBySubId(bleed);
         TPssrSafetyBreath breath = new TPssrSafetyBreath();
         breath.setSubId(sub.getId());
         breath.setApproveStatus(1L);
         breath.setUpdatedate(new Date());
         breath.setUpdaterCode(userId);
-        tPssrSafetyBreathServeice.updateAllBySubId(breath);
+        tPssrSafetyBreathService.updateAllBySubId(breath);
         TPssrSafetyBrust brust = new TPssrSafetyBrust();
         brust.setSubId(sub.getId());
         brust.setApproveStatus(1L);
         brust.setUpdatedate(new Date());
         brust.setUpdaterCode(userId);
-        tPssrSafetyBrustServeice.updateAllBySubId(brust);
+        tPssrSafetyBrustService.updateAllBySubId(brust);
         TPssrSafetyFlamearrester flamearrester = new TPssrSafetyFlamearrester();
         flamearrester.setSubId(sub.getId());
         flamearrester.setApproveStatus(1L);
         flamearrester.setUpdatedate(new Date());
         flamearrester.setUpdaterCode(userId);
-        tPssrSafetyFlamearresterServeice.updateAllBySubId(flamearrester);
+        tPssrSafetyFlamearresterService.updateAllBySubId(flamearrester);
         TPssrSafetyValve valve = new TPssrSafetyValve();
         valve.setSubId(sub.getId());
         valve.setApproveStatus(1L);
         valve.setUpdatedate(new Date());
         valve.setUpdaterCode(userId);
-        tPssrSafetyValveServeice.updateAllBySubId(valve);
+        tPssrSafetyValveService.updateAllBySubId(valve);
 
         // 查询确认人
         TPssrSafetyBleed entity = new TPssrSafetyBleed();
         entity.setSubId(sub.getId());
         entity.setApproveStatus(1L);
-        TPssrSafetyBleed tPssrSafetyBleed = tPssrSafetyBleedServeice.selectAllConfirmedPersonBySubId(entity);
+        TPssrSafetyBleed tPssrSafetyBleed = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
         String confirmer1s = null;
         String confirmer2s = null;
         if (tPssrSafetyBleed != null) {
@@ -903,7 +911,7 @@ public class TPssrApproveController extends BaseController {
             delProcess(tPssrApprove.getProcessId(), "pssr2confirm");
             entity.setSubId(sub.getId());
             entity.setApproveStatus(3L);
-            tPssrSafetyBleed = tPssrSafetyBleedServeice.selectAllConfirmedPersonBySubId(entity);
+            tPssrSafetyBleed = tPssrSafetyBleedService.selectAllConfirmedPersonBySubId(entity);
             if (tPssrSafetyBleed != null) {
                 confirmer1s = tPssrSafetyBleed.getConfirmer1();
                 confirmer2s = tPssrSafetyBleed.getConfirmer2();
@@ -1716,6 +1724,82 @@ public class TPssrApproveController extends BaseController {
         }
     }
 
+    /**
+     * 人身防护审批流程发起申请
+     * @param sub 子表对象
+     */
+    private void doRsfhApprove(TPssrSubcontent sub) {
+        String userId = getUserId().toString();
+
+        //修改各表状态
+        TPssrMeasure measure = new TPssrMeasure();
+        measure.setSubId(sub.getId());
+        measure.setApproveStatus(1L);
+        measure.setUpdatedate(new Date());
+        measure.setUpdaterCode(userId);
+        tPssrMeasureService.updateAllBySubId(measure);
+        TPssrProtection protection = new TPssrProtection();
+        protection.setSubId(sub.getId());
+        protection.setApproveStatus(1L);
+        protection.setUpdatedate(new Date());
+        protection.setUpdaterCode(userId);
+        tPssrProtectionService.updateAllBySubId(protection);
+
+        // 查询确认人
+        TPssrProtection entity = new TPssrProtection();
+        entity.setSubId(sub.getId());
+        entity.setApproveStatus(1L);
+        TPssrProtection tPssrProtection = tPssrProtectionService.selectAllConfirmedPersonBySubId(entity);
+        String confirmer1s = null;
+        String confirmer2s = null;
+        if (tPssrProtection != null) {
+            confirmer1s = tPssrProtection.getConfirm1();
+            confirmer2s = tPssrProtection.getConfirm2();
+        }
+        logger.info("=======================confirmer1s:{}", confirmer1s);
+        logger.info("=======================confirmer2s:{}", confirmer2s);
+
+        Set<String> confirmerUsers1 = new HashSet<>();
+        Set<String> confirmerUsers2 = new HashSet<>();
+        if (StringUtils.isNotEmpty(confirmer1s)) {
+            confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+        }
+        if (StringUtils.isNotEmpty(confirmer2s)) {
+            confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+        }
+        //查询是否已存在审批流程
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveBySubId(sub.getId());
+        if (tPssrApprove == null) {
+            TPssrApprove approve = new TPssrApprove();
+            approve.setSubId(sub.getId());
+            approve.setApNo(DateUtils.dateTimeNow() + userId);
+            approve.setApproveStatus(1L);
+            approve.setSubCharge(sub.getConfirm());
+            approve.setCreaterCode(userId);
+            approve.setCreatedate(new Date());
+            tPssrApproveService.insertTPssrApprove(approve);
+
+            pssr2confirm(approve, new ArrayList<>(confirmerUsers1), new ArrayList<>(confirmerUsers2), sub.getConfirm());
+        } else {
+            delProcess(tPssrApprove.getProcessId(), "pssr2confirm");
+            entity.setSubId(sub.getId());
+            entity.setApproveStatus(3L);
+            tPssrProtection = tPssrProtectionService.selectAllConfirmedPersonBySubId(entity);
+            if (tPssrProtection != null) {
+                confirmer1s = tPssrProtection.getConfirm1();
+                confirmer2s = tPssrProtection.getConfirm2();
+            }
+
+            if (StringUtils.isNotEmpty(confirmer1s)) {
+                confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+            }
+            if (StringUtils.isNotEmpty(confirmer2s)) {
+                confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+            }
+            pssr2confirm(tPssrApprove, new ArrayList<>(confirmerUsers1), new ArrayList<>(confirmerUsers2), sub.getConfirm());
+        }
+    }
+
     /**
      * 单确认人发起流程
      */

+ 193 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialController.java

@@ -1,24 +1,25 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-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.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrMaterial;
-import com.ruoyi.project.pssr.service.ITPssrMaterialService;
 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;
+import com.ruoyi.project.pssr.domain.*;
+import com.ruoyi.project.pssr.service.ITPssrApproveService;
+import com.ruoyi.project.pssr.service.ITPssrMaterialService;
+import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
 
 /**
  * 原料Controller
@@ -28,18 +29,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/material")
-public class TPssrMaterialController extends BaseController
-{
+public class TPssrMaterialController extends BaseController {
     @Autowired
     private ITPssrMaterialService tPssrMaterialService;
 
+    @Autowired
+    private ITPssrApproveService tPssrApproveService;
+
+    @Autowired
+    private ITPssrSubcontentService tPssrSubcontentService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private HistoryService historyService;
+
     /**
      * 查询原料列表
      */
     @PreAuthorize("@ss.hasPermi('pssr:material:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrMaterial tPssrMaterial)
-    {
+    public TableDataInfo list(TPssrMaterial tPssrMaterial) {
         startPage();
         List<TPssrMaterial> list = tPssrMaterialService.selectTPssrMaterialList(tPssrMaterial);
         return getDataTable(list);
@@ -51,8 +62,7 @@ public class TPssrMaterialController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:material:export')")
     @Log(title = "原料", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrMaterial tPssrMaterial)
-    {
+    public AjaxResult export(TPssrMaterial tPssrMaterial) {
         List<TPssrMaterial> list = tPssrMaterialService.selectTPssrMaterialList(tPssrMaterial);
         ExcelUtil<TPssrMaterial> util = new ExcelUtil<TPssrMaterial>(TPssrMaterial.class);
         return util.exportExcel(list, "material");
@@ -63,8 +73,7 @@ public class TPssrMaterialController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:material:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrMaterialService.selectTPssrMaterialById(id));
     }
 
@@ -74,8 +83,7 @@ public class TPssrMaterialController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:material:add')")
     @Log(title = "原料", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrMaterial tPssrMaterial)
-    {
+    public AjaxResult add(@RequestBody TPssrMaterial tPssrMaterial) {
         return toAjax(tPssrMaterialService.insertTPssrMaterial(tPssrMaterial));
     }
 
@@ -85,8 +93,7 @@ public class TPssrMaterialController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:material:edit')")
     @Log(title = "原料", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrMaterial tPssrMaterial)
-    {
+    public AjaxResult edit(@RequestBody TPssrMaterial tPssrMaterial) {
         return toAjax(tPssrMaterialService.updateTPssrMaterial(tPssrMaterial));
     }
 
@@ -95,9 +102,166 @@ public class TPssrMaterialController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:material:remove')")
     @Log(title = "原料", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrMaterialService.deleteTPssrMaterialByIds(ids));
     }
+
+
+    /**
+     * 确认人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:material:edit')")
+    @Log(title = "人身防护", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmMaterial")
+    public AjaxResult confirmMaterial(@RequestBody TPssrMaterial tPssrMaterial) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrMaterial material = new TPssrMaterial();
+        if (tPssrMaterial.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            material.setConfirm1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrMaterial.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            material.setConfirm2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrMaterial.getIds() != null && tPssrMaterial.getIds().length > 0) {
+            for (Long id : tPssrMaterial.getIds()) {
+                material = tPssrMaterialService.selectTPssrMaterialById(id);
+                if (material.getConfirmationDate() == null && tPssrMaterial.getTaskType() == 5) {
+                    material.setConfirmationDate(new Date());
+                }
+                material.setApproveStatus(approveStatus);
+                material.setUpdatedate(new Date());
+                material.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrMaterialService.updateTPssrMaterial(material);
+            }
+        } else {
+            material.setSubId(tPssrMaterial.getSubId());
+            material.setApproveStatus(queryStatus);
+            for (TPssrMaterial item : tPssrMaterialService.selectTPssrMaterialList(material)) {
+                if (item.getConfirmationDate() == null && tPssrMaterial.getTaskType() == 5) {
+                    item.setConfirmationDate(new Date());
+                }
+                item.setApproveStatus(approveStatus);
+                item.setUpdatedate(new Date());
+                item.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrMaterialService.updateTPssrMaterial(item);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrMaterial entity = new TPssrMaterial();
+        entity.setSubId(tPssrMaterial.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrMaterial Material = tPssrMaterialService.selectAllConfirmedPersonBySubId(entity);
+        if (Material != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrMaterial.getTaskType() == 4 && StringUtils.isNotEmpty(Material.getConfirm1())) {
+                if (Material.getConfirm1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrMaterial.getTaskType() == 5 && StringUtils.isNotEmpty(Material.getConfirm2())) {
+                if (Material.getConfirm2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrMaterial.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 驳回人身防护
+     */
+    @PutMapping("/turnDownMaterial")
+    public AjaxResult turnDownMaterial(@RequestBody TPssrMaterial tPssrMaterial) {
+        if (tPssrMaterial.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrMaterial.getIds()) {
+                TPssrMaterial blind = new TPssrMaterial();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrMaterialService.updateTPssrMaterial(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrMaterial.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            // 查询确认人
+            TPssrMaterial entity = new TPssrMaterial();
+            entity.setSubId(tPssrMaterial.getSubId());
+            entity.setApproveStatus(1L);
+            TPssrMaterial PssrMaterial = tPssrMaterialService.selectAllConfirmedPersonBySubId(entity);
+            String confirmer1s = null;
+            String confirmer2s = null;
+            if (PssrMaterial != null) {
+                confirmer1s = PssrMaterial.getConfirm1();
+                confirmer2s = PssrMaterial.getConfirm2();
+            }
+            logger.info("=======================confirmer1s:{}", confirmer1s);
+            logger.info("=======================confirmer2s:{}", confirmer2s);
+
+            Set<String> confirmerUsers1 = new HashSet<>();
+            Set<String> confirmerUsers2 = new HashSet<>();
+            if (StringUtils.isNotEmpty(confirmer1s)) {
+                confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+            }
+            if (StringUtils.isNotEmpty(confirmer2s)) {
+                confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", new ArrayList<>(confirmerUsers1));
+            variables.put("confirmUsers2", new ArrayList<>(confirmerUsers2));
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
 }

+ 267 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialRawController.java

@@ -0,0 +1,267 @@
+package com.ruoyi.project.pssr.controller;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.*;
+import com.ruoyi.project.pssr.service.ITPssrApproveService;
+import com.ruoyi.project.pssr.service.ITPssrMaterialRawService;
+import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 原料Controller
+ *
+ * @author ssy
+ * @date 2024-09-18
+ */
+@RestController
+@RequestMapping("/pssr/materialRaw")
+public class TPssrMaterialRawController extends BaseController {
+    @Autowired
+    private ITPssrMaterialRawService tPssrMaterialRawService;
+
+    @Autowired
+    private ITPssrApproveService tPssrApproveService;
+
+    @Autowired
+    private ITPssrSubcontentService tPssrSubcontentService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private HistoryService historyService;
+
+    /**
+     * 查询原料列表
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TPssrMaterialRaw tPssrMaterialRaw) {
+        startPage();
+        List<TPssrMaterialRaw> list = tPssrMaterialRawService.selectTPssrMaterialRawList(tPssrMaterialRaw);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出原料列表
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:export')")
+    @Log(title = "原料", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TPssrMaterialRaw tPssrMaterialRaw) {
+        List<TPssrMaterialRaw> list = tPssrMaterialRawService.selectTPssrMaterialRawList(tPssrMaterialRaw);
+        ExcelUtil<TPssrMaterialRaw> util = new ExcelUtil<TPssrMaterialRaw>(TPssrMaterialRaw.class);
+        return util.exportExcel(list, "materialRaw");
+    }
+
+    /**
+     * 获取原料详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(tPssrMaterialRawService.selectTPssrMaterialRawById(id));
+    }
+
+    /**
+     * 新增原料
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:add')")
+    @Log(title = "原料", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TPssrMaterialRaw tPssrMaterialRaw) {
+        return toAjax(tPssrMaterialRawService.insertTPssrMaterialRaw(tPssrMaterialRaw));
+    }
+
+    /**
+     * 修改原料
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:edit')")
+    @Log(title = "原料", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TPssrMaterialRaw tPssrMaterialRaw) {
+        return toAjax(tPssrMaterialRawService.updateTPssrMaterialRaw(tPssrMaterialRaw));
+    }
+
+    /**
+     * 删除原料
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:remove')")
+    @Log(title = "原料", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tPssrMaterialRawService.deleteTPssrMaterialRawByIds(ids));
+    }
+
+
+    /**
+     * 确认人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:edit')")
+    @Log(title = "人身防护", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmMaterialRaw")
+    public AjaxResult confirmMaterialRaw(@RequestBody TPssrMaterialRaw tPssrMaterialRaw) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrMaterialRaw materialRaw = new TPssrMaterialRaw();
+        if (tPssrMaterialRaw.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            materialRaw.setConfirm1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrMaterialRaw.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            materialRaw.setConfirm2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrMaterialRaw.getIds() != null && tPssrMaterialRaw.getIds().length > 0) {
+            for (Long id : tPssrMaterialRaw.getIds()) {
+                materialRaw = tPssrMaterialRawService.selectTPssrMaterialRawById(id);
+                if (materialRaw.getConfirmationDate() == null && tPssrMaterialRaw.getTaskType() == 5) {
+                    materialRaw.setConfirmationDate(new Date());
+                }
+                materialRaw.setApproveStatus(approveStatus);
+                materialRaw.setUpdatedate(new Date());
+                materialRaw.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrMaterialRawService.updateTPssrMaterialRaw(materialRaw);
+            }
+        } else {
+            materialRaw.setSubId(tPssrMaterialRaw.getSubId());
+            materialRaw.setApproveStatus(queryStatus);
+            for (TPssrMaterialRaw item : tPssrMaterialRawService.selectTPssrMaterialRawList(materialRaw)) {
+                if (item.getConfirmationDate() == null && tPssrMaterialRaw.getTaskType() == 5) {
+                    item.setConfirmationDate(new Date());
+                }
+                item.setApproveStatus(approveStatus);
+                item.setUpdatedate(new Date());
+                item.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrMaterialRawService.updateTPssrMaterialRaw(item);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrMaterialRaw entity = new TPssrMaterialRaw();
+        entity.setSubId(tPssrMaterialRaw.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrMaterialRaw MaterialRaw = tPssrMaterialRawService.selectAllConfirmedPersonBySubId(entity);
+        if (MaterialRaw != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrMaterialRaw.getTaskType() == 4 && StringUtils.isNotEmpty(MaterialRaw.getConfirm1())) {
+                if (MaterialRaw.getConfirm1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrMaterialRaw.getTaskType() == 5 && StringUtils.isNotEmpty(MaterialRaw.getConfirm2())) {
+                if (MaterialRaw.getConfirm2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrMaterialRaw.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 驳回人身防护
+     */
+    @PutMapping("/turnDownMaterialRaw")
+    public AjaxResult turnDownMaterialRaw(@RequestBody TPssrMaterialRaw tPssrMaterialRaw) {
+        if (tPssrMaterialRaw.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrMaterialRaw.getIds()) {
+                TPssrMaterialRaw blind = new TPssrMaterialRaw();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrMaterialRawService.updateTPssrMaterialRaw(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrMaterialRaw.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            // 查询确认人
+            TPssrMaterialRaw entity = new TPssrMaterialRaw();
+            entity.setSubId(tPssrMaterialRaw.getSubId());
+            entity.setApproveStatus(1L);
+            TPssrMaterialRaw PssrMaterialRaw = tPssrMaterialRawService.selectAllConfirmedPersonBySubId(entity);
+            String confirmer1s = null;
+            String confirmer2s = null;
+            if (PssrMaterialRaw != null) {
+                confirmer1s = PssrMaterialRaw.getConfirm1();
+                confirmer2s = PssrMaterialRaw.getConfirm2();
+            }
+            logger.info("=======================confirmer1s:{}", confirmer1s);
+            logger.info("=======================confirmer2s:{}", confirmer2s);
+
+            Set<String> confirmerUsers1 = new HashSet<>();
+            Set<String> confirmerUsers2 = new HashSet<>();
+            if (StringUtils.isNotEmpty(confirmer1s)) {
+                confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+            }
+            if (StringUtils.isNotEmpty(confirmer2s)) {
+                confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", new ArrayList<>(confirmerUsers1));
+            variables.put("confirmUsers2", new ArrayList<>(confirmerUsers2));
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+}

+ 276 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMeasureController.java

@@ -0,0 +1,276 @@
+package com.ruoyi.project.pssr.controller;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrApprove;
+import com.ruoyi.project.pssr.domain.TPssrMeasure;
+import com.ruoyi.project.pssr.domain.TPssrProtection;
+import com.ruoyi.project.pssr.domain.TPssrSubcontent;
+import com.ruoyi.project.pssr.service.ITPssrApproveService;
+import com.ruoyi.project.pssr.service.ITPssrMeasureService;
+import com.ruoyi.project.pssr.service.ITPssrProtectionService;
+import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 人身防护Controller
+ *
+ * @author ssy
+ * @date 2024-11-04
+ */
+@RestController
+@RequestMapping("/pssr/measure")
+public class TPssrMeasureController extends BaseController {
+    @Autowired
+    private ITPssrMeasureService tPssrMeasureService;
+    @Autowired
+    private ITPssrProtectionService tPssrProtectionService;
+
+    @Autowired
+    private ITPssrApproveService tPssrApproveService;
+
+    @Autowired
+    private ITPssrSubcontentService tPssrSubcontentService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private HistoryService historyService;
+
+
+    /**
+     * 查询人身防护列表
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TPssrMeasure tPssrMeasure) {
+        startPage();
+        List<TPssrMeasure> list = tPssrMeasureService.selectTPssrMeasureList(tPssrMeasure);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出人身防护列表
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:export')")
+    @Log(title = "人身防护", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TPssrMeasure tPssrMeasure) {
+        List<TPssrMeasure> list = tPssrMeasureService.selectTPssrMeasureList(tPssrMeasure);
+        ExcelUtil<TPssrMeasure> util = new ExcelUtil<TPssrMeasure>(TPssrMeasure.class);
+        return util.exportExcel(list, "measure");
+    }
+
+    /**
+     * 获取人身防护详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(tPssrMeasureService.selectTPssrMeasureById(id));
+    }
+
+    /**
+     * 新增人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:add')")
+    @Log(title = "人身防护", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TPssrMeasure tPssrMeasure) {
+        tPssrMeasure.setApproveStatus(0L);
+        tPssrMeasure.setCreaterCode(String.valueOf(getUserId()));
+        tPssrMeasure.setCreatedate(new Date());
+        return toAjax(tPssrMeasureService.insertTPssrMeasure(tPssrMeasure));
+    }
+
+    /**
+     * 修改人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:edit')")
+    @Log(title = "人身防护", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TPssrMeasure tPssrMeasure) {
+        return toAjax(tPssrMeasureService.updateTPssrMeasure(tPssrMeasure));
+    }
+
+    /**
+     * 删除人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:remove')")
+    @Log(title = "人身防护", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tPssrMeasureService.deleteTPssrMeasureByIds(ids));
+    }
+
+    /**
+     * 确认人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:edit')")
+    @Log(title = "人身防护", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmMeasure")
+    public AjaxResult confirmMeasure(@RequestBody TPssrMeasure tPssrMeasure) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrMeasure measure = new TPssrMeasure();
+        if (tPssrMeasure.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            measure.setConfirm1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrMeasure.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            measure.setConfirm2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrMeasure.getIds() != null && tPssrMeasure.getIds().length > 0) {
+            for (Long id : tPssrMeasure.getIds()) {
+                measure = tPssrMeasureService.selectTPssrMeasureById(id);
+                if (measure.getConfirmationDate() == null && tPssrMeasure.getTaskType() == 5) {
+                    measure.setConfirmationDate(new Date());
+                }
+                measure.setApproveStatus(approveStatus);
+                measure.setUpdatedate(new Date());
+                measure.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrMeasureService.updateTPssrMeasure(measure);
+            }
+        } else {
+            measure.setSubId(tPssrMeasure.getSubId());
+            measure.setApproveStatus(queryStatus);
+            for (TPssrMeasure item : tPssrMeasureService.selectTPssrMeasureList(measure)) {
+                if (item.getConfirmationDate() == null && tPssrMeasure.getTaskType() == 5) {
+                    item.setConfirmationDate(new Date());
+                }
+                item.setApproveStatus(approveStatus);
+                item.setUpdatedate(new Date());
+                item.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrMeasureService.updateTPssrMeasure(item);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrProtection entity = new TPssrProtection();
+        entity.setSubId(tPssrMeasure.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrProtection Protection = tPssrProtectionService.selectAllConfirmedPersonBySubId(entity);
+        if (Protection != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrMeasure.getTaskType() == 4 && StringUtils.isNotEmpty(Protection.getConfirm1())) {
+                if (Protection.getConfirm1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrMeasure.getTaskType() == 5 && StringUtils.isNotEmpty(Protection.getConfirm2())) {
+                if (Protection.getConfirm2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrMeasure.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 驳回人身防护
+     */
+    @PutMapping("/turnDownMeasure")
+    public AjaxResult turnDownMeasure(@RequestBody TPssrMeasure tPssrMeasure) {
+        if (tPssrMeasure.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrMeasure.getIds()) {
+                TPssrMeasure blind = new TPssrMeasure();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrMeasureService.updateTPssrMeasure(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrMeasure.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            // 查询确认人
+            TPssrProtection entity = new TPssrProtection();
+            entity.setSubId(tPssrMeasure.getSubId());
+            entity.setApproveStatus(1L);
+            TPssrProtection tPssrProtection = tPssrProtectionService.selectAllConfirmedPersonBySubId(entity);
+            String confirmer1s = null;
+            String confirmer2s = null;
+            if (tPssrProtection != null) {
+                confirmer1s = tPssrProtection.getConfirm1();
+                confirmer2s = tPssrProtection.getConfirm2();
+            }
+            logger.info("=======================confirmer1s:{}", confirmer1s);
+            logger.info("=======================confirmer2s:{}", confirmer2s);
+
+            Set<String> confirmerUsers1 = new HashSet<>();
+            Set<String> confirmerUsers2 = new HashSet<>();
+            if (StringUtils.isNotEmpty(confirmer1s)) {
+                confirmerUsers1.addAll(Arrays.asList(confirmer1s.split(",")));
+            }
+            if (StringUtils.isNotEmpty(confirmer2s)) {
+                confirmerUsers2.addAll(Arrays.asList(confirmer2s.split(",")));
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", new ArrayList<>(confirmerUsers1));
+            variables.put("confirmUsers2", new ArrayList<>(confirmerUsers2));
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+}

+ 189 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrProtectionController.java

@@ -1,24 +1,28 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-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.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrProtection;
-import com.ruoyi.project.pssr.service.ITPssrProtectionService;
 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;
+import com.ruoyi.project.pssr.domain.TPssrApprove;
+import com.ruoyi.project.pssr.domain.TPssrProtection;
+import com.ruoyi.project.pssr.domain.TPssrProtection;
+import com.ruoyi.project.pssr.domain.TPssrSubcontent;
+import com.ruoyi.project.pssr.service.ITPssrApproveService;
+import com.ruoyi.project.pssr.service.ITPssrProtectionService;
+import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
 
 /**
  * 人身防护Controller
@@ -28,18 +32,28 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/protection")
-public class TPssrProtectionController extends BaseController
-{
+public class TPssrProtectionController extends BaseController {
     @Autowired
     private ITPssrProtectionService tPssrProtectionService;
 
+    @Autowired
+    private ITPssrApproveService tPssrApproveService;
+
+    @Autowired
+    private ITPssrSubcontentService tPssrSubcontentService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private HistoryService historyService;
+
     /**
      * 查询人身防护列表
      */
     @PreAuthorize("@ss.hasPermi('pssr:protection:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrProtection tPssrProtection)
-    {
+    public TableDataInfo list(TPssrProtection tPssrProtection) {
         startPage();
         List<TPssrProtection> list = tPssrProtectionService.selectTPssrProtectionList(tPssrProtection);
         return getDataTable(list);
@@ -51,8 +65,7 @@ public class TPssrProtectionController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:protection:export')")
     @Log(title = "人身防护", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrProtection tPssrProtection)
-    {
+    public AjaxResult export(TPssrProtection tPssrProtection) {
         List<TPssrProtection> list = tPssrProtectionService.selectTPssrProtectionList(tPssrProtection);
         ExcelUtil<TPssrProtection> util = new ExcelUtil<TPssrProtection>(TPssrProtection.class);
         return util.exportExcel(list, "protection");
@@ -63,8 +76,7 @@ public class TPssrProtectionController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:protection:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tPssrProtectionService.selectTPssrProtectionById(id));
     }
 
@@ -74,8 +86,10 @@ public class TPssrProtectionController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:protection:add')")
     @Log(title = "人身防护", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrProtection tPssrProtection)
-    {
+    public AjaxResult add(@RequestBody TPssrProtection tPssrProtection) {
+        tPssrProtection.setApproveStatus(0L);
+        tPssrProtection.setCreaterCode(String.valueOf(getUserId()));
+        tPssrProtection.setCreatedate(new Date());
         return toAjax(tPssrProtectionService.insertTPssrProtection(tPssrProtection));
     }
 
@@ -85,8 +99,7 @@ public class TPssrProtectionController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:protection:edit')")
     @Log(title = "人身防护", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrProtection tPssrProtection)
-    {
+    public AjaxResult edit(@RequestBody TPssrProtection tPssrProtection) {
         return toAjax(tPssrProtectionService.updateTPssrProtection(tPssrProtection));
     }
 
@@ -95,9 +108,156 @@ public class TPssrProtectionController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:protection:remove')")
     @Log(title = "人身防护", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tPssrProtectionService.deleteTPssrProtectionByIds(ids));
     }
+
+    /**
+     * 确认人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:protection:edit')")
+    @Log(title = "人身防护", businessType = BusinessType.UPDATE)
+    @PutMapping("/confirmProtection")
+    public AjaxResult confirmProtection(@RequestBody TPssrProtection tPssrProtection) {
+        long queryStatus = 0;
+        long approveStatus = 0;
+        Date date = null;
+        TPssrProtection protection = new TPssrProtection();
+        if (tPssrProtection.getTaskType() == 4) {
+            //确认人1确认
+            queryStatus = 1;
+            approveStatus = 3;
+            protection.setConfirm1(getUserId().toString());
+            date = new Date();
+        } else if (tPssrProtection.getTaskType() == 5) {
+            //确认人2确认
+            queryStatus = 3;
+            approveStatus = 2;
+            protection.setConfirm2(getUserId().toString());
+            date = new Date();
+        }
+        if (tPssrProtection.getIds() != null && tPssrProtection.getIds().length > 0) {
+            for (Long id : tPssrProtection.getIds()) {
+                protection = tPssrProtectionService.selectTPssrProtectionById(id);
+                if (protection.getConfirmationDate() == null) {
+                    protection.setConfirmationDate(new Date());
+                }
+                protection.setApproveStatus(approveStatus);
+                protection.setUpdatedate(new Date());
+                protection.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrProtectionService.updateTPssrProtection(protection);
+            }
+        } else {
+            protection.setSubId(tPssrProtection.getSubId());
+            protection.setApproveStatus(queryStatus);
+            for (TPssrProtection item : tPssrProtectionService.selectTPssrProtectionList(protection)) {
+                if (item.getConfirmationDate() == null) {
+                    item.setConfirmationDate(new Date());
+                }
+                item.setApproveStatus(approveStatus);
+                item.setUpdatedate(new Date());
+                item.setUpdaterCode(String.valueOf(getUserId()));
+                tPssrProtectionService.updateTPssrProtection(item);
+            }
+        }
+        //查询当前待审批的确认人
+        TPssrProtection entity = new TPssrProtection();
+        entity.setSubId(tPssrProtection.getSubId());
+        entity.setApproveStatus(queryStatus);
+        TPssrProtection pssrProtection = tPssrProtectionService.selectAllConfirmedPersonBySubId(entity);
+        if (pssrProtection != null) {
+            //如果当前用户还有待审批任务
+            if (tPssrProtection.getTaskType() == 4 && StringUtils.isNotEmpty(pssrProtection.getConfirm1())) {
+                if (pssrProtection.getConfirm1().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+
+            if (tPssrProtection.getTaskType() == 5 && StringUtils.isNotEmpty(pssrProtection.getConfirm2())) {
+                if (pssrProtection.getConfirm2().contains(getUserId().toString())) {
+                    return AjaxResult.success();
+                }
+            }
+        }
+        //无待审批任务结束当前用户流程
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(tPssrProtection.getSubId());
+        // 因为流程关系所以approve一定会有且只有一条数据
+        TPssrApprove tPssrApprove = tPssrApproveService.selectTPssrApproveList(approve).get(0);
+        TPssrApproveController.handleConfirmApprove(tPssrApprove, getUserId().toString());
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 驳回人身防护
+     */
+    @PutMapping("/turnDownProtection")
+    public AjaxResult turnDownProtection(@RequestBody TPssrProtection tPssrProtection) {
+        if (tPssrProtection.getIds() != null) {
+            String userId = getUserId().toString();
+            // 修改已选择数据的状态
+            for (Long id : tPssrProtection.getIds()) {
+                TPssrProtection blind = new TPssrProtection();
+                blind.setId(id);
+                blind.setApproveStatus(1L);
+                blind.setUpdatedate(new Date());
+                blind.setUpdaterCode(getUserId().toString());
+                tPssrProtectionService.updateTPssrProtection(blind);
+            }
+            // 查询当前流程
+            TPssrApprove approve = tPssrApproveService.selectTPssrApproveBySubId(tPssrProtection.getSubId());
+
+            try {
+                runtimeService.deleteProcessInstance(approve.getProcessId(), "pssr2confirm");
+                historyService.deleteHistoricProcessInstance(approve.getProcessId());
+            } catch (Exception e) {
+                logger.info("无运行时流程");
+            }
+
+            // 驳回 查询所有待审批的人员
+            TPssrProtection blind = new TPssrProtection();
+            blind.setSubId(tPssrProtection.getSubId());
+            blind.setApproveStatus(1L);
+            Set<String> confirmUsers1 = new HashSet<>();
+            Set<String> confirmUsers2 = new HashSet<>();
+            for (TPssrProtection item : tPssrProtectionService.selectTPssrProtectionList(blind)) {
+
+                // 确认人1
+                confirmUsers1.add(item.getConfirm1());
+
+                //确认人2
+                confirmUsers2.add(item.getConfirm2());
+            }
+
+            // 开始申请流程
+            long businessKey = approve.getApproveId();
+            //开始工作流、监听
+            Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+            Map<String, Object> variables = new HashMap<>();
+            variables.put("applyUser", userId);
+            variables.put("confirmUsers1", confirmUsers1);
+            variables.put("confirmUsers2", confirmUsers2);
+            variables.put("chargePerson", approve.getSubCharge());
+            //采用key来启动流程定义并设置流程变量,返回流程实例
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr2confirm", String.valueOf(businessKey), variables);
+
+            // 修改审批表和sub表
+            approve.setProcessId(pi.getProcessInstanceId());
+            approve.setApproveStatus(1L);
+            approve.setUpdatedate(new Date());
+            approve.setUpdaterCode(getUserId().toString());
+            tPssrApproveService.updateTPssrApprove(approve);
+
+            TPssrSubcontent subcontent = new TPssrSubcontent();
+            subcontent.setId(approve.getSubId());
+            subcontent.setApproveStatus(1L);
+            subcontent.setUpdatedate(new Date());
+            subcontent.setUpdaterCode(getUserId().toString());
+            tPssrSubcontentService.updateTPssrSubcontent(subcontent);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
 }

+ 5 - 5
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyController.java

@@ -94,7 +94,7 @@ public class TPssrSafetyController extends BaseController {
                 if (safetyBleed.getConfirmationTime() == null) {
                     safetyBleed.setConfirmationTime(new Date());
                 }
-                safetyBleed.setApproveStatus(2L);
+                safetyBleed.setApproveStatus(approveStatus);
                 safetyBleed.setUpdatedate(new Date());
                 safetyBleed.setUpdaterCode(String.valueOf(getUserId()));
                 tPssrSafetyBleedService.updateTPssrSafetyBleed(safetyBleed);
@@ -169,7 +169,7 @@ public class TPssrSafetyController extends BaseController {
                 if (safetyBreath.getConfirmationTime() == null) {
                     safetyBreath.setConfirmationTime(new Date());
                 }
-                safetyBreath.setApproveStatus(2L);
+                safetyBreath.setApproveStatus(approveStatus);
                 safetyBreath.setUpdatedate(new Date());
                 safetyBreath.setUpdaterCode(String.valueOf(getUserId()));
                 tPssrSafetyBreathService.updateTPssrSafetyBreath(safetyBreath);
@@ -244,7 +244,7 @@ public class TPssrSafetyController extends BaseController {
                 if (safetyBrust.getConfirmationTime() == null) {
                     safetyBrust.setConfirmationTime(new Date());
                 }
-                safetyBrust.setApproveStatus(2L);
+                safetyBrust.setApproveStatus(approveStatus);
                 safetyBrust.setUpdatedate(new Date());
                 safetyBrust.setUpdaterCode(String.valueOf(getUserId()));
                 tPssrSafetyBrustService.updateTPssrSafetyBrust(safetyBrust);
@@ -319,7 +319,7 @@ public class TPssrSafetyController extends BaseController {
                 if (safetyFlamearrester.getConfirmationTime() == null) {
                     safetyFlamearrester.setConfirmationTime(new Date());
                 }
-                safetyFlamearrester.setApproveStatus(2L);
+                safetyFlamearrester.setApproveStatus(approveStatus);
                 safetyFlamearrester.setUpdatedate(new Date());
                 safetyFlamearrester.setUpdaterCode(String.valueOf(getUserId()));
                 tPssrSafetyFlamearresterService.updateTPssrSafetyFlamearrester(safetyFlamearrester);
@@ -394,7 +394,7 @@ public class TPssrSafetyController extends BaseController {
                 if (safetyValve.getConfirmationTime() == null) {
                     safetyValve.setConfirmationTime(new Date());
                 }
-                safetyValve.setApproveStatus(2L);
+                safetyValve.setApproveStatus(approveStatus);
                 safetyValve.setUpdatedate(new Date());
                 safetyValve.setUpdaterCode(String.valueOf(getUserId()));
                 tPssrSafetyValveService.updateTPssrSafetyValve(safetyValve);

+ 48 - 6
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrMaterial.java

@@ -46,7 +46,8 @@ public class TPssrMaterial extends BaseEntity
 
     /** 确认人 */
     @Excel(name = "确认人")
-    private String confirm;
+    private String confirm1;
+    private String confirm2;
 
     /** 确认时间 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
@@ -95,6 +96,37 @@ public class TPssrMaterial extends BaseEntity
     /** 审批状态 */
     @Excel(name = "审批状态")
     private Long approveStatus;
+    private Long[] ids;
+
+    private Long taskType;
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
+    public TPssrMaterial() {
+    }
+
+    public TPssrMaterial(Long subId, String utilityQuantity, String unit, String createrCode, Date createdate, Long approveStatus) {
+        this.subId = subId;
+        this.utilityQuantity = utilityQuantity;
+        this.unit = unit;
+        this.createrCode = createrCode;
+        this.createdate = createdate;
+        this.approveStatus = approveStatus;
+    }
 
     public void setId(Long id)
     {
@@ -159,14 +191,23 @@ public class TPssrMaterial extends BaseEntity
     {
         return note;
     }
-    public void setConfirm(String confirm)
+    public void setConfirm1(String confirm1)
+    {
+        this.confirm1 = confirm1;
+    }
+
+    public String getConfirm1()
+    {
+        return confirm1;
+    }
+    public void setConfirm2(String confirm2)
     {
-        this.confirm = confirm;
+        this.confirm2 = confirm2;
     }
 
-    public String getConfirm()
+    public String getConfirm2()
     {
-        return confirm;
+        return confirm2;
     }
     public void setConfirmationDate(Date confirmationDate)
     {
@@ -260,7 +301,8 @@ public class TPssrMaterial extends BaseEntity
             .append("quantity", getQuantity())
             .append("unit", getUnit())
             .append("note", getNote())
-            .append("confirm", getConfirm())
+            .append("confirm1", getConfirm1())
+            .append("confirm2", getConfirm2())
             .append("confirmationDate", getConfirmationDate())
             .append("delFlag", getDelFlag())
             .append("createrCode", getCreaterCode())

+ 318 - 0
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrMaterialRaw.java

@@ -0,0 +1,318 @@
+package com.ruoyi.project.pssr.domain;
+
+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;
+
+/**
+ * 原料对象 t_pssr_material
+ *
+ * @author ssy
+ * @date 2024-09-23
+ */
+public class TPssrMaterialRaw extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识ID */
+    private Long id;
+
+    /** 从表id */
+    @Excel(name = "从表id")
+    private Long subId;
+
+    /** 审批id */
+    @Excel(name = "审批id")
+    private Long approveId;
+
+    /** Utility consumption quantity */
+    @Excel(name = "Raw Material")
+    private String rawMaterial;
+
+    /** Quantity */
+    @Excel(name = "Quantity")
+    private String quantity;
+
+    /** Unit */
+    @Excel(name = "Unit")
+    private String unit;
+
+    /** Note */
+    @Excel(name = "Note")
+    private String note;
+
+    /** 确认人 */
+    @Excel(name = "确认人")
+    private String confirm1;
+    private String confirm2;
+
+    /** 确认时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date confirmationDate;
+
+    /** 删除状态 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String createrCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private String updaterCode;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+    
+    private String deptName;
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 审批状态 */
+    @Excel(name = "审批状态")
+    private Long approveStatus;
+    private Long[] ids;
+
+    private Long taskType;
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
+    public TPssrMaterialRaw() {
+    }
+
+    public TPssrMaterialRaw(Long subId, String rawMaterial, String unit, String createrCode, Date createdate, Long approveStatus) {
+        this.subId = subId;
+        this.rawMaterial = rawMaterial;
+        this.unit = unit;
+        this.createrCode = createrCode;
+        this.createdate = createdate;
+        this.approveStatus = approveStatus;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setSubId(Long subId)
+    {
+        this.subId = subId;
+    }
+
+    public Long getSubId()
+    {
+        return subId;
+    }
+    public void setApproveId(Long approveId)
+    {
+        this.approveId = approveId;
+    }
+
+    public Long getApproveId()
+    {
+        return approveId;
+    }
+    public void setRawMaterial(String rawMaterial)
+    {
+        this.rawMaterial = rawMaterial;
+    }
+
+    public String getRawMaterial()
+    {
+        return rawMaterial;
+    }
+    public void setQuantity(String quantity)
+    {
+        this.quantity = quantity;
+    }
+
+    public String getQuantity()
+    {
+        return quantity;
+    }
+    public void setUnit(String unit)
+    {
+        this.unit = unit;
+    }
+
+    public String getUnit()
+    {
+        return unit;
+    }
+    public void setNote(String note)
+    {
+        this.note = note;
+    }
+
+    public String getNote()
+    {
+        return note;
+    }
+    public void setConfirm1(String confirm1)
+    {
+        this.confirm1 = confirm1;
+    }
+
+    public String getConfirm1()
+    {
+        return confirm1;
+    }
+    public void setConfirm2(String confirm2)
+    {
+        this.confirm2 = confirm2;
+    }
+
+    public String getConfirm2()
+    {
+        return confirm2;
+    }
+    public void setConfirmationDate(Date confirmationDate)
+    {
+        this.confirmationDate = confirmationDate;
+    }
+
+    public Date getConfirmationDate()
+    {
+        return confirmationDate;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setApproveStatus(Long approveStatus)
+    {
+        this.approveStatus = approveStatus;
+    }
+
+    public Long getApproveStatus()
+    {
+        return approveStatus;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("subId", getSubId())
+            .append("approveId", getApproveId())
+            .append("rawMaterial", getRawMaterial())
+            .append("quantity", getQuantity())
+            .append("unit", getUnit())
+            .append("note", getNote())
+            .append("confirm1", getConfirm1())
+            .append("confirm2", getConfirm2())
+            .append("confirmationDate", getConfirmationDate())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("deptId", getDeptId())
+            .append("remarks", getRemarks())
+            .append("approveStatus", getApproveStatus())
+            .toString();
+    }
+}

+ 330 - 0
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrMeasure.java

@@ -0,0 +1,330 @@
+package com.ruoyi.project.pssr.domain;
+
+import java.util.Date;
+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_pssr_measure
+ *
+ * @author ssy
+ * @date 2024-11-04
+ */
+public class TPssrMeasure extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 审批状态 */
+    @Excel(name = "审批状态")
+    private Long approveStatus;
+
+    /** 位号 */
+    @Excel(name = "位号")
+    private String devNo;
+
+    /** 设备名称 */
+    @Excel(name = "设备名称")
+    private String devName;
+
+    /** 防护措施 */
+    @Excel(name = "防护措施")
+    private String proMeasure;
+
+    /** 防护装置无缺失 */
+    @Excel(name = "防护装置无缺失")
+    private String noDamage;
+
+    /** 防护装置被固定,无松动 */
+    @Excel(name = "防护装置被固定,无松动")
+    private String locked;
+
+    /** 防护装置无腐蚀破损 */
+    @Excel(name = "防护装置无腐蚀破损")
+    private String noWorn;
+
+    /** 确认人1 */
+    @Excel(name = "确认人1")
+    private String confirm1;
+
+    /** 确认人2 */
+    @Excel(name = "确认人2")
+    private String confirm2;
+
+    /** 确认时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date confirmationDate;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 审批id */
+    @Excel(name = "审批id")
+    private Long approveId;
+
+    /** 唯一标识ID */
+    private Long id;
+
+    /** 从表id */
+    private Long subId;
+
+    /** 删除状态 */
+    private Long delFlag;
+
+    /** 创建人 */
+    private String createrCode;
+
+    /** 创建时间 */
+    private Date createdate;
+
+    /** 修改人 */
+    private String updaterCode;
+
+    /** 修改时间 */
+    private Date updatedate;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    private String deptName;
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+
+    private Long[] ids;
+
+    private Long taskType;
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
+    public void setApproveStatus(Long approveStatus)
+    {
+        this.approveStatus = approveStatus;
+    }
+
+    public Long getApproveStatus()
+    {
+        return approveStatus;
+    }
+    public void setDevNo(String devNo)
+    {
+        this.devNo = devNo;
+    }
+
+    public String getDevNo()
+    {
+        return devNo;
+    }
+    public void setDevName(String devName)
+    {
+        this.devName = devName;
+    }
+
+    public String getDevName()
+    {
+        return devName;
+    }
+    public void setProMeasure(String proMeasure)
+    {
+        this.proMeasure = proMeasure;
+    }
+
+    public String getProMeasure()
+    {
+        return proMeasure;
+    }
+    public void setNoDamage(String noDamage)
+    {
+        this.noDamage = noDamage;
+    }
+
+    public String getNoDamage()
+    {
+        return noDamage;
+    }
+    public void setLocked(String locked)
+    {
+        this.locked = locked;
+    }
+
+    public String getLocked()
+    {
+        return locked;
+    }
+    public void setNoWorn(String noWorn)
+    {
+        this.noWorn = noWorn;
+    }
+
+    public String getNoWorn()
+    {
+        return noWorn;
+    }
+    public void setConfirm1(String confirm1)
+    {
+        this.confirm1 = confirm1;
+    }
+
+    public String getConfirm1()
+    {
+        return confirm1;
+    }
+    public void setConfirm2(String confirm2)
+    {
+        this.confirm2 = confirm2;
+    }
+
+    public String getConfirm2()
+    {
+        return confirm2;
+    }
+    public void setConfirmationDate(Date confirmationDate)
+    {
+        this.confirmationDate = confirmationDate;
+    }
+
+    public Date getConfirmationDate()
+    {
+        return confirmationDate;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setApproveId(Long approveId)
+    {
+        this.approveId = approveId;
+    }
+
+    public Long getApproveId()
+    {
+        return approveId;
+    }
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setSubId(Long subId)
+    {
+        this.subId = subId;
+    }
+
+    public Long getSubId()
+    {
+        return subId;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    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("approveStatus", getApproveStatus())
+            .append("devNo", getDevNo())
+            .append("devName", getDevName())
+            .append("proMeasure", getProMeasure())
+            .append("noDamage", getNoDamage())
+            .append("locked", getLocked())
+            .append("noWorn", getNoWorn())
+            .append("confirm1", getConfirm1())
+            .append("confirm2", getConfirm2())
+            .append("confirmationDate", getConfirmationDate())
+            .append("remarks", getRemarks())
+            .append("approveId", getApproveId())
+            .append("id", getId())
+            .append("subId", getSubId())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 20 - 0
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrProtection.java

@@ -92,6 +92,26 @@ public class TPssrProtection extends BaseEntity
     @Excel(name = "审批状态")
     private Long approveStatus;
 
+    private Long[] ids;
+
+    private Long taskType;
+
+    public Long[] getIds() {
+        return ids;
+    }
+
+    public void setIds(Long[] ids) {
+        this.ids = ids;
+    }
+
+    public Long getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Long taskType) {
+        this.taskType = taskType;
+    }
+
     public void setId(Long id)
     {
         this.id = id;

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMaterialMapper.java

@@ -19,6 +19,7 @@ public interface TPssrMaterialMapper
      * @return 原料
      */
     public TPssrMaterial selectTPssrMaterialById(Long id);
+    public TPssrMaterial selectAllConfirmedPersonBySubId(TPssrMaterial tpssrMaterial);
 
     /**
      * 查询原料列表

+ 65 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMaterialRawMapper.java

@@ -0,0 +1,65 @@
+package com.ruoyi.project.pssr.mapper;
+
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.pssr.domain.TPssrMaterialRaw;
+
+import java.util.List;
+
+/**
+ * 原料Mapper接口
+ * 
+ * @author ssy
+ * @date 2024-09-18
+ */
+public interface TPssrMaterialRawMapper
+{
+    /**
+     * 查询原料
+     * 
+     * @param id 原料ID
+     * @return 原料
+     */
+    public TPssrMaterialRaw selectTPssrMaterialRawById(Long id);
+    public TPssrMaterialRaw selectAllConfirmedPersonBySubId(TPssrMaterialRaw tpssrMaterialRaw);
+
+    /**
+     * 查询原料列表
+     * 
+     * @param tPssrMaterialRaw 原料
+     * @return 原料集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TPssrMaterialRaw> selectTPssrMaterialRawList(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 新增原料
+     * 
+     * @param tPssrMaterialRaw 原料
+     * @return 结果
+     */
+    public int insertTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 修改原料
+     * 
+     * @param tPssrMaterialRaw 原料
+     * @return 结果
+     */
+    public int updateTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 删除原料
+     * 
+     * @param id 原料ID
+     * @return 结果
+     */
+    public int deleteTPssrMaterialRawById(Long id);
+
+    /**
+     * 批量删除原料
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTPssrMaterialRawByIds(Long[] ids);
+}

+ 64 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMeasureMapper.java

@@ -0,0 +1,64 @@
+package com.ruoyi.project.pssr.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.pssr.domain.TPssrMeasure;
+
+/**
+ * 人身防护Mapper接口
+ * 
+ * @author ssy
+ * @date 2024-11-04
+ */
+public interface TPssrMeasureMapper 
+{
+    /**
+     * 查询人身防护
+     * 
+     * @param id 人身防护ID
+     * @return 人身防护
+     */
+    public TPssrMeasure selectTPssrMeasureById(Long id);
+
+    /**
+     * 查询人身防护列表
+     * 
+     * @param tPssrMeasure 人身防护
+     * @return 人身防护集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TPssrMeasure> selectTPssrMeasureList(TPssrMeasure tPssrMeasure);
+
+    /**
+     * 新增人身防护
+     * 
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    public int insertTPssrMeasure(TPssrMeasure tPssrMeasure);
+
+    /**
+     * 修改人身防护
+     * 
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    public int updateTPssrMeasure(TPssrMeasure tPssrMeasure);
+    public int updateAllBySubId(TPssrMeasure tPssrMeasure);
+
+    /**
+     * 删除人身防护
+     * 
+     * @param id 人身防护ID
+     * @return 结果
+     */
+    public int deleteTPssrMeasureById(Long id);
+
+    /**
+     * 批量删除人身防护
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTPssrMeasureByIds(Long[] ids);
+}

+ 3 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrProtectionMapper.java

@@ -44,6 +44,7 @@ public interface TPssrProtectionMapper
      * @return 结果
      */
     public int updateTPssrProtection(TPssrProtection tPssrProtection);
+    public int updateAllBySubId(TPssrProtection tPssrProtection);
 
     /**
      * 删除人身防护
@@ -60,4 +61,6 @@ public interface TPssrProtectionMapper
      * @return 结果
      */
     public int deleteTPssrProtectionByIds(Long[] ids);
+
+    public TPssrProtection selectAllConfirmedPersonBySubId(TPssrProtection tPssrProtection);
 }

+ 63 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrMaterialRawService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.pssr.service;
+
+import com.ruoyi.project.pssr.domain.TPssrMaterialRaw;
+
+import java.util.List;
+
+/**
+ * 原料Service接口
+ * 
+ * @author ssy
+ * @date 2024-09-18
+ */
+public interface ITPssrMaterialRawService 
+{
+    /**
+     * 查询原料
+     * 
+     * @param id 原料ID
+     * @return 原料
+     */
+    public TPssrMaterialRaw selectTPssrMaterialRawById(Long id);
+    public TPssrMaterialRaw selectAllConfirmedPersonBySubId(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 查询原料列表
+     * 
+     * @param tPssrMaterialRaw 原料
+     * @return 原料集合
+     */
+    public List<TPssrMaterialRaw> selectTPssrMaterialRawList(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 新增原料
+     * 
+     * @param tPssrMaterialRaw 原料
+     * @return 结果
+     */
+    public int insertTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 修改原料
+     * 
+     * @param tPssrMaterialRaw 原料
+     * @return 结果
+     */
+    public int updateTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw);
+
+    /**
+     * 批量删除原料
+     * 
+     * @param ids 需要删除的原料ID
+     * @return 结果
+     */
+    public int deleteTPssrMaterialRawByIds(Long[] ids);
+
+    /**
+     * 删除原料信息
+     * 
+     * @param id 原料ID
+     * @return 结果
+     */
+    public int deleteTPssrMaterialRawById(Long id);
+}

+ 1 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrMaterialService.java

@@ -18,6 +18,7 @@ public interface ITPssrMaterialService
      * @return 原料
      */
     public TPssrMaterial selectTPssrMaterialById(Long id);
+    public TPssrMaterial selectAllConfirmedPersonBySubId(TPssrMaterial tPssrMaterial);
 
     /**
      * 查询原料列表

+ 62 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrMeasureService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.project.pssr.service;
+
+import java.util.List;
+import com.ruoyi.project.pssr.domain.TPssrMeasure;
+
+/**
+ * 人身防护Service接口
+ * 
+ * @author ssy
+ * @date 2024-11-04
+ */
+public interface ITPssrMeasureService 
+{
+    /**
+     * 查询人身防护
+     * 
+     * @param id 人身防护ID
+     * @return 人身防护
+     */
+    public TPssrMeasure selectTPssrMeasureById(Long id);
+
+    /**
+     * 查询人身防护列表
+     * 
+     * @param tPssrMeasure 人身防护
+     * @return 人身防护集合
+     */
+    public List<TPssrMeasure> selectTPssrMeasureList(TPssrMeasure tPssrMeasure);
+
+    /**
+     * 新增人身防护
+     * 
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    public int insertTPssrMeasure(TPssrMeasure tPssrMeasure);
+
+    /**
+     * 修改人身防护
+     * 
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    public int updateTPssrMeasure(TPssrMeasure tPssrMeasure);
+    public int updateAllBySubId(TPssrMeasure tPssrMeasure);
+
+    /**
+     * 批量删除人身防护
+     * 
+     * @param ids 需要删除的人身防护ID
+     * @return 结果
+     */
+    public int deleteTPssrMeasureByIds(Long[] ids);
+
+    /**
+     * 删除人身防护信息
+     * 
+     * @param id 人身防护ID
+     * @return 结果
+     */
+    public int deleteTPssrMeasureById(Long id);
+}

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrProtectionService.java

@@ -18,6 +18,7 @@ public interface ITPssrProtectionService
      * @return 人身防护
      */
     public TPssrProtection selectTPssrProtectionById(Long id);
+    public TPssrProtection selectAllConfirmedPersonBySubId(TPssrProtection tPssrProtection);
 
     /**
      * 查询人身防护列表
@@ -42,6 +43,7 @@ public interface ITPssrProtectionService
      * @return 结果
      */
     public int updateTPssrProtection(TPssrProtection tPssrProtection);
+    public int updateAllBySubId(TPssrProtection tPssrProtection);
 
     /**
      * 批量删除人身防护

+ 99 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrMaterialRawServiceImpl.java

@@ -0,0 +1,99 @@
+package com.ruoyi.project.pssr.service.impl;
+
+import com.ruoyi.project.pssr.domain.TPssrMaterialRaw;
+import com.ruoyi.project.pssr.mapper.TPssrMaterialRawMapper;
+import com.ruoyi.project.pssr.service.ITPssrMaterialRawService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 原料Service业务层处理
+ *
+ * @author ssy
+ * @date 2024-09-18
+ */
+@Service
+public class TPssrMaterialRawServiceImpl implements ITPssrMaterialRawService
+{
+    @Autowired
+    private TPssrMaterialRawMapper tPssrMaterialRawMapper;
+
+    /**
+     * 查询原料
+     *
+     * @param id 原料ID
+     * @return 原料
+     */
+    @Override
+    public TPssrMaterialRaw selectTPssrMaterialRawById(Long id)
+    {
+        return tPssrMaterialRawMapper.selectTPssrMaterialRawById(id);
+    }
+
+    @Override
+    public TPssrMaterialRaw selectAllConfirmedPersonBySubId(TPssrMaterialRaw tPssrMaterialRaw) {
+        return tPssrMaterialRawMapper.selectAllConfirmedPersonBySubId(tPssrMaterialRaw);
+    }
+
+    /**
+     * 查询原料列表
+     *
+     * @param tPssrMaterialRaw 原料
+     * @return 原料
+     */
+    @Override
+    public List<TPssrMaterialRaw> selectTPssrMaterialRawList(TPssrMaterialRaw tPssrMaterialRaw)
+    {
+        return tPssrMaterialRawMapper.selectTPssrMaterialRawList(tPssrMaterialRaw);
+    }
+
+    /**
+     * 新增原料
+     *
+     * @param tPssrMaterialRaw 原料
+     * @return 结果
+     */
+    @Override
+    public int insertTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw)
+    {
+        return tPssrMaterialRawMapper.insertTPssrMaterialRaw(tPssrMaterialRaw);
+    }
+
+    /**
+     * 修改原料
+     *
+     * @param tPssrMaterialRaw 原料
+     * @return 结果
+     */
+    @Override
+    public int updateTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw)
+    {
+        return tPssrMaterialRawMapper.updateTPssrMaterialRaw(tPssrMaterialRaw);
+    }
+
+    /**
+     * 批量删除原料
+     *
+     * @param ids 需要删除的原料ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTPssrMaterialRawByIds(Long[] ids)
+    {
+        return tPssrMaterialRawMapper.deleteTPssrMaterialRawByIds(ids);
+    }
+
+    /**
+     * 删除原料信息
+     *
+     * @param id 原料ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTPssrMaterialRawById(Long id)
+    {
+        return tPssrMaterialRawMapper.deleteTPssrMaterialRawById(id);
+    }
+}

+ 5 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrMaterialServiceImpl.java

@@ -31,6 +31,11 @@ public class TPssrMaterialServiceImpl implements ITPssrMaterialService
         return tPssrMaterialMapper.selectTPssrMaterialById(id);
     }
 
+    @Override
+    public TPssrMaterial selectAllConfirmedPersonBySubId(TPssrMaterial tPssrMaterial) {
+        return tPssrMaterialMapper.selectAllConfirmedPersonBySubId(tPssrMaterial);
+    }
+
     /**
      * 查询原料列表
      *

+ 105 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrMeasureServiceImpl.java

@@ -0,0 +1,105 @@
+package com.ruoyi.project.pssr.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.pssr.mapper.TPssrMeasureMapper;
+import com.ruoyi.project.pssr.domain.TPssrMeasure;
+import com.ruoyi.project.pssr.service.ITPssrMeasureService;
+
+/**
+ * 人身防护Service业务层处理
+ *
+ * @author ssy
+ * @date 2024-11-04
+ */
+@Service
+public class TPssrMeasureServiceImpl implements ITPssrMeasureService
+{
+    @Autowired
+    private TPssrMeasureMapper tPssrMeasureMapper;
+
+    /**
+     * 查询人身防护
+     *
+     * @param id 人身防护ID
+     * @return 人身防护
+     */
+    @Override
+    public TPssrMeasure selectTPssrMeasureById(Long id)
+    {
+        return tPssrMeasureMapper.selectTPssrMeasureById(id);
+    }
+
+    /**
+     * 查询人身防护列表
+     *
+     * @param tPssrMeasure 人身防护
+     * @return 人身防护
+     */
+    @Override
+    public List<TPssrMeasure> selectTPssrMeasureList(TPssrMeasure tPssrMeasure)
+    {
+        return tPssrMeasureMapper.selectTPssrMeasureList(tPssrMeasure);
+    }
+
+    /**
+     * 新增人身防护
+     *
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    @Override
+    public int insertTPssrMeasure(TPssrMeasure tPssrMeasure)
+    {
+        return tPssrMeasureMapper.insertTPssrMeasure(tPssrMeasure);
+    }
+
+    /**
+     * 修改人身防护
+     *
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    @Override
+    public int updateTPssrMeasure(TPssrMeasure tPssrMeasure)
+    {
+        return tPssrMeasureMapper.updateTPssrMeasure(tPssrMeasure);
+    }
+
+    /**
+     * 修改人身防护
+     *
+     * @param tPssrMeasure 人身防护
+     * @return 结果
+     */
+    @Override
+    public int updateAllBySubId(TPssrMeasure tPssrMeasure)
+    {
+        return tPssrMeasureMapper.updateAllBySubId(tPssrMeasure);
+    }
+
+    /**
+     * 批量删除人身防护
+     *
+     * @param ids 需要删除的人身防护ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTPssrMeasureByIds(Long[] ids)
+    {
+        return tPssrMeasureMapper.deleteTPssrMeasureByIds(ids);
+    }
+
+    /**
+     * 删除人身防护信息
+     *
+     * @param id 人身防护ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTPssrMeasureById(Long id)
+    {
+        return tPssrMeasureMapper.deleteTPssrMeasureById(id);
+    }
+}

+ 22 - 18
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrProtectionServiceImpl.java

@@ -1,11 +1,12 @@
 package com.ruoyi.project.pssr.service.impl;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.project.pssr.mapper.TPssrProtectionMapper;
 import com.ruoyi.project.pssr.domain.TPssrProtection;
+import com.ruoyi.project.pssr.mapper.TPssrProtectionMapper;
 import com.ruoyi.project.pssr.service.ITPssrProtectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 人身防护Service业务层处理
@@ -14,8 +15,7 @@ import com.ruoyi.project.pssr.service.ITPssrProtectionService;
  * @date 2024-09-18
  */
 @Service
-public class TPssrProtectionServiceImpl implements ITPssrProtectionService
-{
+public class TPssrProtectionServiceImpl implements ITPssrProtectionService {
     @Autowired
     private TPssrProtectionMapper tPssrProtectionMapper;
 
@@ -26,11 +26,15 @@ public class TPssrProtectionServiceImpl implements ITPssrProtectionService
      * @return 人身防护
      */
     @Override
-    public TPssrProtection selectTPssrProtectionById(Long id)
-    {
+    public TPssrProtection selectTPssrProtectionById(Long id) {
         return tPssrProtectionMapper.selectTPssrProtectionById(id);
     }
 
+    @Override
+    public TPssrProtection selectAllConfirmedPersonBySubId(TPssrProtection tPssrProtection) {
+        return tPssrProtectionMapper.selectAllConfirmedPersonBySubId(tPssrProtection);
+    }
+
     /**
      * 查询人身防护列表
      *
@@ -38,8 +42,7 @@ public class TPssrProtectionServiceImpl implements ITPssrProtectionService
      * @return 人身防护
      */
     @Override
-    public List<TPssrProtection> selectTPssrProtectionList(TPssrProtection tPssrProtection)
-    {
+    public List<TPssrProtection> selectTPssrProtectionList(TPssrProtection tPssrProtection) {
         return tPssrProtectionMapper.selectTPssrProtectionList(tPssrProtection);
     }
 
@@ -50,8 +53,7 @@ public class TPssrProtectionServiceImpl implements ITPssrProtectionService
      * @return 结果
      */
     @Override
-    public int insertTPssrProtection(TPssrProtection tPssrProtection)
-    {
+    public int insertTPssrProtection(TPssrProtection tPssrProtection) {
         return tPssrProtectionMapper.insertTPssrProtection(tPssrProtection);
     }
 
@@ -62,11 +64,15 @@ public class TPssrProtectionServiceImpl implements ITPssrProtectionService
      * @return 结果
      */
     @Override
-    public int updateTPssrProtection(TPssrProtection tPssrProtection)
-    {
+    public int updateTPssrProtection(TPssrProtection tPssrProtection) {
         return tPssrProtectionMapper.updateTPssrProtection(tPssrProtection);
     }
 
+    @Override
+    public int updateAllBySubId(TPssrProtection tPssrProtection) {
+        return tPssrProtectionMapper.updateAllBySubId(tPssrProtection);
+    }
+
     /**
      * 批量删除人身防护
      *
@@ -74,8 +80,7 @@ public class TPssrProtectionServiceImpl implements ITPssrProtectionService
      * @return 结果
      */
     @Override
-    public int deleteTPssrProtectionByIds(Long[] ids)
-    {
+    public int deleteTPssrProtectionByIds(Long[] ids) {
         return tPssrProtectionMapper.deleteTPssrProtectionByIds(ids);
     }
 
@@ -86,8 +91,7 @@ public class TPssrProtectionServiceImpl implements ITPssrProtectionService
      * @return 结果
      */
     @Override
-    public int deleteTPssrProtectionById(Long id)
-    {
+    public int deleteTPssrProtectionById(Long id) {
         return tPssrProtectionMapper.deleteTPssrProtectionById(id);
     }
 }

+ 25 - 6
master/src/main/resources/mybatis/pssr/TPssrMaterialMapper.xml

@@ -12,7 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="quantity"    column="quantity"    />
         <result property="unit"    column="unit"    />
         <result property="note"    column="note"    />
-        <result property="confirm"    column="confirm"    />
+        <result property="confirm1"    column="confirm1"    />
+        <result property="confirm2"    column="confirm2"    />
         <result property="confirmationDate"    column="confirmation_date"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="createrCode"    column="creater_code"    />
@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTPssrMaterialVo">
-        select d.id, d.sub_id, d.approve_id, d.utility_quantity, d.quantity, d.unit, d.note, d.confirm, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_material d
+        select d.id, d.sub_id, d.approve_id, d.utility_quantity, d.quantity, d.unit, d.note, d.confirm1,d.confirm2, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_material d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -39,7 +40,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
             <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
             <if test="note != null  and note != ''"> and note = #{note}</if>
-            <if test="confirm != null  and confirm != ''"> and confirm = #{confirm}</if>
+            <if test="confirm1 != null  and confirm1 != ''"> and confirm1 = #{confirm1}</if>
+            <if test="confirm2 != null  and confirm2 != ''"> and confirm2 = #{confirm2}</if>
             <if test="confirmationDate != null "> and confirmation_date = #{confirmationDate}</if>
             <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
             <if test="createdate != null "> and createdate = #{createdate}</if>
@@ -58,6 +60,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrMaterialVo"/>
         where id = #{id}
     </select>
+
+    <select id="selectAllConfirmedPersonBySubId" parameterType="TPssrMaterial" resultMap="TPssrMaterialResult">
+        SELECT
+        LISTAGG(CONFIRM1, ',') WITHIN GROUP (ORDER BY CONFIRM1) AS CONFIRM1,
+        LISTAGG(CONFIRM2, ',') WITHIN GROUP (ORDER BY CONFIRM2) AS CONFIRM2
+        FROM (
+        SELECT DISTINCT CONFIRM1, CONFIRM2 FROM t_pssr_material WHERE sub_id = #{subId}
+        <if test="approveStatus != null ">AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRM1, CONFIRM2 FROM t_pssr_material_raw WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+        )
+    </select>
         
     <insert id="insertTPssrMaterial" parameterType="TPssrMaterial">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
@@ -72,7 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="quantity != null">quantity,</if>
             <if test="unit != null">unit,</if>
             <if test="note != null">note,</if>
-            <if test="confirm != null">confirm,</if>
+            <if test="confirm1 != null">confirm1,</if>
+            <if test="confirm2 != null">confirm2,</if>
             <if test="confirmationDate != null">confirmation_date,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createrCode != null">creater_code,</if>
@@ -91,7 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="quantity != null">#{quantity},</if>
             <if test="unit != null">#{unit},</if>
             <if test="note != null">#{note},</if>
-            <if test="confirm != null">#{confirm},</if>
+            <if test="confirm1 != null">#{confirm1},</if>
+            <if test="confirm2 != null">#{confirm2},</if>
             <if test="confirmationDate != null">#{confirmationDate},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createrCode != null">#{createrCode},</if>
@@ -113,7 +131,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="quantity != null">quantity = #{quantity},</if>
             <if test="unit != null">unit = #{unit},</if>
             <if test="note != null">note = #{note},</if>
-            <if test="confirm != null">confirm = #{confirm},</if>
+            <if test="confirm1 != null">confirm1 = #{confirm1},</if>
+            <if test="confirm2 != null">confirm2 = #{confirm2},</if>
             <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createrCode != null">creater_code = #{createrCode},</if>

+ 160 - 0
master/src/main/resources/mybatis/pssr/TPssrMaterialRawMapper.xml

@@ -0,0 +1,160 @@
+<?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.pssr.mapper.TPssrMaterialRawMapper">
+    
+    <resultMap type="TPssrMaterialRaw" id="TPssrMaterialRawResult">
+        <result property="id"    column="id"    />
+        <result property="subId"    column="sub_id"    />
+        <result property="approveId"    column="approve_id"    />
+        <result property="rawMaterial"    column="raw_material"    />
+        <result property="quantity"    column="quantity"    />
+        <result property="unit"    column="unit"    />
+        <result property="note"    column="note"    />
+        <result property="confirm1"    column="confirm1"    />
+        <result property="confirm2"    column="confirm2"    />
+        <result property="confirmationDate"    column="confirmation_date"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="approveStatus"    column="approve_status"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTPssrMaterialRawVo">
+        select d.id, d.sub_id, d.approve_id, d.raw_material, d.quantity, d.unit, d.note, d.confirm1, d.confirm2, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_material_raw d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTPssrMaterialRawList" parameterType="TPssrMaterialRaw" resultMap="TPssrMaterialRawResult">
+        <include refid="selectTPssrMaterialRawVo"/>
+        <where>  
+            <if test="subId != null "> and sub_id = #{subId}</if>
+            <if test="approveId != null "> and approve_id = #{approveId}</if>
+            <if test="rawMaterial != null  and rawMaterial != ''"> and raw_material = #{rawMaterial}</if>
+            <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="note != null  and note != ''"> and note = #{note}</if>
+            <if test="confirm1 != null  and confirm1 != ''"> and confirm1 = #{confirm1}</if>
+            <if test="confirm2 != null  and confirm2 != ''"> and confirm2 = #{confirm2}</if>
+            <if test="confirmationDate != null "> and confirmation_date = #{confirmationDate}</if>
+            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTPssrMaterialRawById" parameterType="Long" resultMap="TPssrMaterialRawResult">
+        <include refid="selectTPssrMaterialRawVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectAllConfirmedPersonBySubId" parameterType="TPssrMaterialRaw" resultMap="TPssrMaterialRawResult">
+        SELECT
+        LISTAGG(CONFIRM1, ',') WITHIN GROUP (ORDER BY CONFIRM1) AS CONFIRM1,
+        LISTAGG(CONFIRM2, ',') WITHIN GROUP (ORDER BY CONFIRM2) AS CONFIRM2
+        FROM (
+        SELECT DISTINCT CONFIRM1, CONFIRM2 FROM t_pssr_material_raw WHERE sub_id = #{subId}
+        <if test="approveStatus != null ">AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRM1, CONFIRM2 FROM t_pssr_material_raw_raw WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+        )
+    </select>
+        
+    <insert id="insertTPssrMaterialRaw" parameterType="TPssrMaterialRaw">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_pssr_material_raw.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_pssr_material_raw
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="subId != null">sub_id,</if>
+            <if test="approveId != null">approve_id,</if>
+            <if test="rawMaterial != null">raw_material,</if>
+            <if test="quantity != null">quantity,</if>
+            <if test="unit != null">unit,</if>
+            <if test="note != null">note,</if>
+            <if test="confirm1 != null">confirm1,</if>
+            <if test="confirm2 != null">confirm2,</if>
+            <if test="confirmationDate != null">confirmation_date,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="approveStatus != null">approve_status,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="subId != null">#{subId},</if>
+            <if test="approveId != null">#{approveId},</if>
+            <if test="rawMaterial != null">#{rawMaterial},</if>
+            <if test="quantity != null">#{quantity},</if>
+            <if test="unit != null">#{unit},</if>
+            <if test="note != null">#{note},</if>
+            <if test="confirm1 != null">#{confirm1},</if>
+            <if test="confirm2 != null">#{confirm2},</if>
+            <if test="confirmationDate != null">#{confirmationDate},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="approveStatus != null">#{approveStatus},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTPssrMaterialRaw" parameterType="TPssrMaterialRaw">
+        update t_pssr_material_raw
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="subId != null">sub_id = #{subId},</if>
+            <if test="approveId != null">approve_id = #{approveId},</if>
+            <if test="rawMaterial != null">raw_material = #{rawMaterial},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="unit != null">unit = #{unit},</if>
+            <if test="note != null">note = #{note},</if>
+            <if test="confirm1 != null">confirm1 = #{confirm1},</if>
+            <if test="confirm2 != null">confirm2 = #{confirm2},</if>
+            <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTPssrMaterialRawById" parameterType="Long">
+        update t_pssr_material_raw set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTPssrMaterialRawByIds" parameterType="String">
+        update t_pssr_material_raw set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 167 - 0
master/src/main/resources/mybatis/pssr/TPssrMeasureMapper.xml

@@ -0,0 +1,167 @@
+<?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.pssr.mapper.TPssrMeasureMapper">
+    
+    <resultMap type="TPssrMeasure" id="TPssrMeasureResult">
+        <result property="approveStatus"    column="approve_status"    />
+        <result property="devNo"    column="dev_no"    />
+        <result property="devName"    column="dev_name"    />
+        <result property="proMeasure"    column="pro_measure"    />
+        <result property="noDamage"    column="no_damage"    />
+        <result property="locked"    column="locked"    />
+        <result property="noWorn"    column="no_worn"    />
+        <result property="confirm1"    column="confirm1"    />
+        <result property="confirm2"    column="confirm2"    />
+        <result property="confirmationDate"    column="confirmation_date"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="approveId"    column="approve_id"    />
+        <result property="id"    column="id"    />
+        <result property="subId"    column="sub_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTPssrMeasureVo">
+        select d.approve_status, d.dev_no, d.dev_name, d.pro_measure, d.no_damage, d.locked, d.no_worn, d.confirm1, d.confirm2, d.confirmation_date, d.remarks, d.approve_id, d.id, d.sub_id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id ,s.dept_name from t_pssr_measure d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTPssrMeasureList" parameterType="TPssrMeasure" resultMap="TPssrMeasureResult">
+        <include refid="selectTPssrMeasureVo"/>
+        <where>  
+            <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
+            <if test="devNo != null  and devNo != ''"> and dev_no = #{devNo}</if>
+            <if test="devName != null  and devName != ''"> and dev_name like concat(concat('%', #{devName}), '%')</if>
+            <if test="proMeasure != null  and proMeasure != ''"> and pro_measure = #{proMeasure}</if>
+            <if test="noDamage != null  and noDamage != ''"> and no_damage = #{noDamage}</if>
+            <if test="locked != null  and locked != ''"> and locked = #{locked}</if>
+            <if test="noWorn != null  and noWorn != ''"> and no_worn = #{noWorn}</if>
+            <if test="confirm1 != null  and confirm1 != ''"> and confirm1 = #{confirm1}</if>
+            <if test="confirm2 != null  and confirm2 != ''"> and confirm2 = #{confirm2}</if>
+            <if test="confirmationDate != null "> and confirmation_date = #{confirmationDate}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="approveId != null "> and approve_id = #{approveId}</if>
+            <if test="subId != null "> and sub_id = #{subId}</if>
+            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTPssrMeasureById" parameterType="Long" resultMap="TPssrMeasureResult">
+        <include refid="selectTPssrMeasureVo"/>
+        where id = #{id}
+    </select>
+
+    <update id="updateAllBySubId" parameterType="TPssrMeasure">
+        update T_PSSR_MEASURE
+            <trim prefix="SET" suffixOverrides=",">
+                <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+                <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+                <if test="updatedate != null">updatedate = #{updatedate},</if>
+            </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
+
+        
+    <insert id="insertTPssrMeasure" parameterType="TPssrMeasure">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_pssr_measure.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_pssr_measure
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status,</if>
+            <if test="devNo != null">dev_no,</if>
+            <if test="devName != null">dev_name,</if>
+            <if test="proMeasure != null">pro_measure,</if>
+            <if test="noDamage != null">no_damage,</if>
+            <if test="locked != null">locked,</if>
+            <if test="noWorn != null">no_worn,</if>
+            <if test="confirm1 != null and confirm1 != ''">confirm1,</if>
+            <if test="confirm2 != null and confirm2 != ''">confirm2,</if>
+            <if test="confirmationDate != null">confirmation_date,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="approveId != null">approve_id,</if>
+            <if test="id != null">id,</if>
+            <if test="subId != null">sub_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="approveStatus != null">#{approveStatus},</if>
+            <if test="devNo != null">#{devNo},</if>
+            <if test="devName != null">#{devName},</if>
+            <if test="proMeasure != null">#{proMeasure},</if>
+            <if test="noDamage != null">#{noDamage},</if>
+            <if test="locked != null">#{locked},</if>
+            <if test="noWorn != null">#{noWorn},</if>
+            <if test="confirm1 != null and confirm1 != ''">#{confirm1},</if>
+            <if test="confirm2 != null and confirm2 != ''">#{confirm2},</if>
+            <if test="confirmationDate != null">#{confirmationDate},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="approveId != null">#{approveId},</if>
+            <if test="id != null">#{id},</if>
+            <if test="subId != null">#{subId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTPssrMeasure" parameterType="TPssrMeasure">
+        update t_pssr_measure
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="devNo != null">dev_no = #{devNo},</if>
+            <if test="devName != null">dev_name = #{devName},</if>
+            <if test="proMeasure != null">pro_measure = #{proMeasure},</if>
+            <if test="noDamage != null">no_damage = #{noDamage},</if>
+            <if test="locked != null">locked = #{locked},</if>
+            <if test="noWorn != null">no_worn = #{noWorn},</if>
+            <if test="confirm1 != null and confirm1 != ''">confirm1 = #{confirm1},</if>
+            <if test="confirm2 != null and confirm2 != ''">confirm2 = #{confirm2},</if>
+            <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="approveId != null">approve_id = #{approveId},</if>
+            <if test="subId != null">sub_id = #{subId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTPssrMeasureById" parameterType="Long">
+        update t_pssr_measure set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTPssrMeasureByIds" parameterType="String">
+        update t_pssr_measure set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

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

@@ -56,7 +56,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrProtectionVo"/>
         where id = #{id}
     </select>
-        
+
+
+    <select id="selectAllConfirmedPersonBySubId" parameterType="TPssrProtection" resultMap="TPssrProtectionResult">
+        SELECT
+        LISTAGG(CONFIRM1, ',') WITHIN GROUP (ORDER BY CONFIRM1) AS CONFIRM1,
+        LISTAGG(CONFIRM2, ',') WITHIN GROUP (ORDER BY CONFIRM2) AS CONFIRM2
+        FROM (
+        SELECT DISTINCT CONFIRM1, CONFIRM2 FROM T_PSSR_PROTECTION WHERE sub_id = #{subId}
+        <if test="approveStatus != null ">AND approve_status = #{approveStatus}</if>
+
+        UNION
+        SELECT DISTINCT CONFIRM1, CONFIRM2 FROM T_PSSR_MEASURE WHERE sub_id = #{subId}
+        <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
+        )
+    </select>
+
     <insert id="insertTPssrProtection" parameterType="TPssrProtection">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_pssr_protection.NEXTVAL as id FROM DUAL
@@ -122,6 +137,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateAllBySubId" parameterType="TPssrProtection">
+        update T_PSSR_PROTECTION
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where sub_id= #{subId} and APPROVE_STATUS=0
+    </update>
+
     <update id="deleteTPssrProtectionById" parameterType="Long">
         update t_pssr_protection set del_flag = 2 where id = #{id}
     </update>

+ 20 - 1
ui/src/api/pssr/material.js

@@ -1,5 +1,24 @@
 import request from '@/utils/request'
 
+// 确认MATERIAL完成确认清单
+export function handleConfirmMaterial(data) {
+  return request({
+    url: '/pssr/material/confirmMaterial',
+    method: 'put',
+    data: data
+  })
+}
+
+// 驳回MATERIAL完成确认清单
+export function handleTurnDownMaterial(data) {
+  return request({
+    url: '/pssr/material/turnDownMaterial',
+    method: 'put',
+    data: data
+  })
+}
+
+
 // 查询原料列表
 export function listMaterial(query) {
   return request({
@@ -50,4 +69,4 @@ export function exportMaterial(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 72 - 0
ui/src/api/pssr/materialRaw.js

@@ -0,0 +1,72 @@
+import request from '@/utils/request'
+
+// 确认MATERIALRAW完成确认清单
+export function handleConfirmMaterialRaw(data) {
+  return request({
+    url: '/pssr/materialRaw/confirmMaterialRaw',
+    method: 'put',
+    data: data
+  })
+}
+
+// 驳回MATERIALRAW完成确认清单
+export function handleTurnDownMaterialRaw(data) {
+  return request({
+    url: '/pssr/materialRaw/turnDownMaterialRaw',
+    method: 'put',
+    data: data
+  })
+}
+
+
+// 查询原料列表
+export function listMaterialRaw(query) {
+  return request({
+    url: '/pssr/materialRaw/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询原料详细
+export function getMaterialRaw(id) {
+  return request({
+    url: '/pssr/materialRaw/' + id,
+    method: 'get'
+  })
+}
+
+// 新增原料
+export function addMaterialRaw(data) {
+  return request({
+    url: '/pssr/materialRaw',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改原料
+export function updateMaterialRaw(data) {
+  return request({
+    url: '/pssr/materialRaw',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除原料
+export function delMaterialRaw(id) {
+  return request({
+    url: '/pssr/materialRaw/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出原料
+export function exportMaterialRaw(query) {
+  return request({
+    url: '/pssr/materialRaw/export',
+    method: 'get',
+    params: query
+  })
+}

+ 71 - 0
ui/src/api/pssr/measure.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+// 确认MEASURE完成确认清单
+export function handleConfirmMeasure(data) {
+  return request({
+    url: '/pssr/measure/confirmMeasure',
+    method: 'put',
+    data: data
+  })
+}
+
+// 驳回MEASURE完成确认清单
+export function handleTurnDownMeasure(data) {
+  return request({
+    url: '/pssr/measure/turnDownMeasure',
+    method: 'put',
+    data: data
+  })
+}
+
+// 查询人身防护列表
+export function listMeasure(query) {
+  return request({
+    url: '/pssr/measure/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询人身防护详细
+export function getMeasure(id) {
+  return request({
+    url: '/pssr/measure/' + id,
+    method: 'get'
+  })
+}
+
+// 新增人身防护
+export function addMeasure(data) {
+  return request({
+    url: '/pssr/measure',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改人身防护
+export function updateMeasure(data) {
+  return request({
+    url: '/pssr/measure',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除人身防护
+export function delMeasure(id) {
+  return request({
+    url: '/pssr/measure/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出人身防护
+export function exportMeasure(query) {
+  return request({
+    url: '/pssr/measure/export',
+    method: 'get',
+    params: query
+  })
+}

+ 19 - 1
ui/src/api/pssr/protection.js

@@ -1,5 +1,23 @@
 import request from '@/utils/request'
 
+// 确认PROTECTION完成确认清单
+export function handleConfirmProtection(data) {
+  return request({
+    url: '/pssr/protection/confirmProtection',
+    method: 'put',
+    data: data
+  })
+}
+
+// 驳回PROTECTION完成确认清单
+export function handleTurnDownProtection(data) {
+  return request({
+    url: '/pssr/protection/turnDownProtection',
+    method: 'put',
+    data: data
+  })
+}
+
 // 查询人身防护列表
 export function listProtection(query) {
   return request({
@@ -50,4 +68,4 @@ export function exportProtection(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 0
ui/src/views/pssr/airtight/index.vue

@@ -758,6 +758,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/analyzer/index.vue

@@ -725,6 +725,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 5 - 4
ui/src/views/pssr/blind/index.vue

@@ -140,9 +140,8 @@
         <template slot-scope="scope">
           <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
           <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
-          <el-tag v-if="scope.row.approveStatus==3" type="success">已安装</el-tag>
-          <el-tag v-if="scope.row.approveStatus==4" type="success">已拆除</el-tag>
-          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
         </template>
       </el-table-column>
       <el-table-column label="区域" align="center" prop="unitNo" :show-overflow-tooltip="true" width="150"/>
@@ -546,10 +545,12 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/circuit/index.vue

@@ -781,6 +781,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/cleaning/index.vue

@@ -708,6 +708,7 @@ export default {
       handleApprove() {
         doApprove(this.subId).then(res => {
           this.msgSuccess("已发起确认流程");
+        this.getList();
         })
       },
       handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/frame/index.vue

@@ -800,6 +800,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/franklinism/index.vue

@@ -704,6 +704,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/gasdetector/index.vue

@@ -717,6 +717,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 3 - 1
ui/src/views/pssr/hygiene/index.vue

@@ -574,7 +574,8 @@ export default {
       this.ids = selection.map(item => item.id)
       this.single = selection.length!==1
       this.multiple = !selection.length
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -670,6 +671,7 @@ export default {
       handleApprove() {
         doApprove(this.subId).then(res => {
           this.msgSuccess("已发起确认流程");
+        this.getList();
         })
       },
       handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/instrumentCalibration/index.vue

@@ -734,6 +734,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 3 - 1
ui/src/views/pssr/laboratory/index.vue

@@ -562,7 +562,8 @@ export default {
     listUserNoPage({}).then(res => {
       this.userOptions = res.data
     });
-    console.log("--->" + this.isApprove)
+    this.msgSuccess("已发起确认流程");
+        this.getList();
   },
   methods: {
     /** 查询实验室列表 */
@@ -720,6 +721,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 3 - 1
ui/src/views/pssr/lock/index.vue

@@ -441,10 +441,12 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus != 2 && row.approveStatus != 0 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {

+ 240 - 284
ui/src/views/pssr/material/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="Utility consumption quantity" prop="utilityQuantity">
         <el-input
           v-model="queryParams.utilityQuantity"
@@ -55,75 +37,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="确认人" prop="confirm">
-        <el-input
-          v-model="queryParams.confirm"
-          placeholder="请输入确认人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认时间" prop="confirmationDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.confirmationDate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择确认时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -138,7 +51,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:material:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -148,7 +63,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:material:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -158,17 +75,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:material:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:material:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:material:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -176,17 +97,52 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:material:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:material:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:material:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:material:edit']"
+        >驳回
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="materialList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
-      <el-table-column label="Utility consumption quantity" align="center" prop="utilityQuantity" :show-overflow-tooltip="true"/>
+    <el-table v-loading="loading" :data="materialList" @selection-change="handleSelectionChange" :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="Utility consumption quantity" align="center" prop="utilityQuantity"
+                       :show-overflow-tooltip="true"/>
       <el-table-column label="Quantity" align="center" prop="quantity" :show-overflow-tooltip="true"/>
       <el-table-column label="Unit" align="center" prop="unit" :show-overflow-tooltip="true"/>
       <el-table-column label="Note" align="center" prop="note" :show-overflow-tooltip="true"/>
@@ -196,19 +152,6 @@
           <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <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-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -218,14 +161,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:material:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:material:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -241,119 +186,85 @@
     <!-- 添加或修改原料对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="Utility consumption quantity" prop="utilityQuantity">
-          <el-input v-model="form.utilityQuantity" placeholder="请输入Utility consumption quantity" />
+          <el-input v-model="form.utilityQuantity" placeholder="请输入Utility consumption quantity"/>
         </el-form-item>
         <el-form-item label="Quantity" prop="quantity">
-          <el-input v-model="form.quantity" placeholder="请输入Quantity" />
+          <el-input v-model="form.quantity" placeholder="请输入Quantity"/>
         </el-form-item>
         <el-form-item label="Unit" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入Unit" />
+          <el-input v-model="form.unit" placeholder="请输入Unit"/>
         </el-form-item>
         <el-form-item label="Note" prop="note">
-          <el-input v-model="form.note" placeholder="请输入Note" />
+          <el-input v-model="form.note" placeholder="请输入Note"/>
         </el-form-item>
         <el-form-item label="确认人" prop="confirm">
-          <el-input v-model="form.confirm" placeholder="请输入确认人" />
-        </el-form-item>
-        <el-form-item label="确认时间" prop="confirmationDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.confirmationDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择确认时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-input v-model="form.confirm" placeholder="请输入确认人"/>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial, exportMaterial, importTemplate} from "@/api/pssr/material";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addMaterial,
+  delMaterial,
+  exportMaterial,
+  getMaterial, handleConfirmMaterial, handleTurnDownMaterial,
+  importTemplate,
+  listMaterial,
+  updateMaterial
+} from "@/api/pssr/material";
+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 {doApprove} from "@/api/pssr/approve";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "Material",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -384,24 +295,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/material/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/material/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -424,21 +335,20 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {}
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 350
+    })
     this.getList();
     this.getTreeselect();
   },
@@ -452,12 +362,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -498,7 +408,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -541,56 +451,102 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delMaterial(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delMaterial(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有原料数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportMaterial(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportMaterial(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+        this.getList();
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmMaterial(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownMaterial(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 552 - 0
ui/src/views/pssr/materialRaw/index.vue

@@ -0,0 +1,552 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="Raw material" prop="utilityQuantity">
+        <el-input
+          v-model="queryParams.utilityQuantity"
+          placeholder="请输入Raw Material"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="Quantity" prop="quantity">
+        <el-input
+          v-model="queryParams.quantity"
+          placeholder="请输入Quantity"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="Unit" prop="unit">
+        <el-input
+          v-model="queryParams.unit"
+          placeholder="请输入Unit"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="Note" prop="note">
+        <el-input
+          v-model="queryParams.note"
+          placeholder="请输入Note"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['pssr:materialRaw:add']"
+          v-if="isApprove==0"
+        >新增
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['pssr:materialRaw:edit']"
+          v-if="isApprove==0"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['pssr:materialRaw:remove']"
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:materialRaw:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['pssr:materialRaw:export']"
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:materialRaw:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:materialRaw:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:materialRaw:edit']"
+        >驳回
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="materialRawList" @selection-change="handleSelectionChange" :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="Raw material" align="center" prop="utilityQuantity"
+                       :show-overflow-tooltip="true"/>
+      <el-table-column label="Quantity" align="center" prop="quantity" :show-overflow-tooltip="true"/>
+      <el-table-column label="Unit" align="center" prop="unit" :show-overflow-tooltip="true"/>
+      <el-table-column label="Note" align="center" prop="note" :show-overflow-tooltip="true"/>
+      <el-table-column label="确认人" align="center" prop="confirm" :show-overflow-tooltip="true"/>
+      <el-table-column label="确认时间" align="center" prop="confirmationDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['pssr:materialRaw:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['pssr:materialRaw:remove']"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改原料对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="Raw Material" prop="utilityQuantity">
+          <el-input v-model="form.utilityQuantity" placeholder="请输入Raw Material"/>
+        </el-form-item>
+        <el-form-item label="Quantity" prop="quantity">
+          <el-input v-model="form.quantity" placeholder="请输入Quantity"/>
+        </el-form-item>
+        <el-form-item label="Unit" prop="unit">
+          <el-input v-model="form.unit" placeholder="请输入Unit"/>
+        </el-form-item>
+        <el-form-item label="Note" prop="note">
+          <el-input v-model="form.note" placeholder="请输入Note"/>
+        </el-form-item>
+        <el-form-item label="确认人" prop="confirm">
+          <el-input v-model="form.confirm" placeholder="请输入确认人"/>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addMaterialRaw,
+  delMaterialRaw,
+  exportMaterialRaw,
+  getMaterialRaw, handleConfirmMaterialRaw, handleTurnDownMaterialRaw,
+  importTemplate,
+  listMaterialRaw,
+  updateMaterialRaw
+} from "@/api/pssr/materialRaw";
+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 {doApprove} from "@/api/pssr/approve";
+
+export default {
+  dicts: ['pssr_approve_status'],
+  name: "MaterialRaw",
+  components: {Treeselect},
+  props: {
+    subId: {
+      type: Number,
+      default: 0
+    },
+    isApprove: {
+      type: Number,
+      default: 0
+    },
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 原料表格数据
+      materialRawList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/materialRaw/importData"
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        subId: this.subId,
+        approveId: null,
+        utilityQuantity: null,
+        quantity: null,
+        unit: null,
+        note: null,
+        confirm: null,
+        confirmationDate: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 350
+    })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询原料列表 */
+    getList() {
+      this.loading = true;
+      listMaterialRaw(this.queryParams).then(response => {
+        this.materialRawList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        subId: this.subId,
+        approveId: null,
+        utilityQuantity: null,
+        quantity: null,
+        unit: null,
+        note: null,
+        confirm: null,
+        confirmationDate: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: 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 = "添加原料";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getMaterialRaw(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改原料";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateMaterialRaw(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addMaterialRaw(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delMaterialRaw(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有原料数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportMaterialRaw(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+        this.getList();
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmMaterialRaw(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownMaterialRaw(data).then(res => {
+          this.msgSuccess("驳回成功");
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
+    },
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
+      }
+    },
+  }
+};
+</script>

+ 603 - 0
ui/src/views/pssr/measure/index.vue

@@ -0,0 +1,603 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="位号" prop="devNo">
+        <el-input
+          v-model="queryParams.devNo"
+          placeholder="请输入位号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备名称" prop="devName">
+        <el-input
+          v-model="queryParams.devName"
+          placeholder="请输入设备名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['pssr:measure:add']"
+          v-if="isApprove==0"
+        >新增
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['pssr:measure:edit']"
+          v-if="isApprove==0"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['pssr:measure:remove']"
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:measure:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['pssr:measure:export']"
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:measure:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:measure:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:measure:edit']"
+        >驳回
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>现场管道和设备保温防护检查表</h2>
+      <br>
+      <span>填写要求:现场转动设备的防护装置符合检查内容要求的在检查项中打“✔”,不符合打“×”,如果检查不符合,并联系相关责任人按照该条检查内容的要求进行整改。如不能立即整改的,请立即汇报相关负责人并采取临时应对措施。</span>
+    </div>
+
+    <el-table v-loading="loading" :data="measureList" @selection-change="handleSelectionChange" :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true" width="120">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="设备名称" align="center" prop="devName" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="防护措施" align="center" prop="proMeasure" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="防护装置无缺失" align="center" prop="noDamage" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="防护装置被固定,无松动" align="center" prop="locked" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="防护装置无腐蚀破损" align="center" prop="noWorn" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="确认人1" align="center" prop="confirm1" :show-overflow-tooltip="true" width="180">
+        <template slot-scope="scope">
+          <span>{{ userFormat(scope.row.confirm1) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="确认人2" align="center" prop="confirm2" :show-overflow-tooltip="true" width="180">
+        <template slot-scope="scope">
+          <span>{{ userFormat(scope.row.confirm2) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="确认时间" align="center" prop="confirmationDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"  width="150"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['pssr:measure:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['pssr:measure:remove']"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改人身防护对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="位号" prop="devNo">
+          <el-input v-model="form.devNo" placeholder="请输入位号"/>
+        </el-form-item>
+        <el-form-item label="设备名称" prop="devName">
+          <el-input v-model="form.devName" placeholder="请输入设备名称"/>
+        </el-form-item>
+        <el-form-item label="防护措施" prop="proMeasure">
+          <el-input v-model="form.proMeasure" placeholder="请输入防护措施"/>
+        </el-form-item>
+        <el-form-item label="防护装置无缺失" prop="noDamage">
+          <el-input v-model="form.noDamage" placeholder="请输入防护装置无缺失"/>
+        </el-form-item>
+        <el-form-item label="防护装置被固定,无松动" prop="locked">
+          <el-input v-model="form.locked" placeholder="请输入防护装置被固定,无松动"/>
+        </el-form-item>
+        <el-form-item label="防护装置无腐蚀破损" prop="noWorn">
+          <el-input v-model="form.noWorn" placeholder="请输入防护装置无腐蚀破损"/>
+        </el-form-item>
+        <el-form-item label="确认人1" prop="confirm1">
+          <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="确认人2" prop="confirm2">
+          <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="确认时间" prop="confirmationDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.confirmationDate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择确认时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addMeasure,
+  delMeasure,
+  exportMeasure,
+  getMeasure, handleConfirmMeasure, handleTurnDownMeasure,
+  importTemplate,
+  listMeasure,
+  updateMeasure
+} from "@/api/pssr/measure";
+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 {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
+
+export default {
+  name: "Measure",
+  components: {Treeselect},
+  props: {
+    subId: {
+      type: Number,
+      default: 0
+    },
+    isApprove: {
+      type: Number,
+      default: 0
+    },
+  },
+  data() {
+    return {
+      userOptions: [],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 人身防护表格数据
+      measureList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/measure/importData"
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        approveStatus: null,
+        devNo: null,
+        devName: null,
+        proMeasure: null,
+        noDamage: null,
+        locked: null,
+        noWorn: null,
+        confirm1: null,
+        confirm2: null,
+        confirmationDate: null,
+        remarks: null,
+        approveId: null,
+        subId: this.subId,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        confirm1: [
+          {required: true, message: "确认人1不能为空", trigger: "blur"}
+        ],
+        confirm2: [
+          {required: true, message: "确认人2不能为空", trigger: "blur"}
+        ],
+      }
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 250
+    })
+    this.getList();
+    this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
+  },
+  methods: {
+    /** 查询人身防护列表 */
+    getList() {
+      this.loading = true;
+      listMeasure(this.queryParams).then(response => {
+        this.measureList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        approveStatus: 0,
+        devNo: null,
+        devName: null,
+        proMeasure: null,
+        noDamage: null,
+        locked: null,
+        noWorn: null,
+        confirm1: null,
+        confirm2: null,
+        confirmationDate: null,
+        remarks: null,
+        approveId: null,
+        id: null,
+        subId: this.subId,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: 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 = "添加人身防护";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getMeasure(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改人身防护";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateMeasure(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addMeasure(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delMeasure(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有人身防护数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportMeasure(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+        this.getList();
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmMeasure(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownMeasure(data).then(res => {
+          this.msgSuccess("驳回成功");
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
+    },
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
+      }
+    },
+  }
+};
+</script>

+ 1 - 0
ui/src/views/pssr/moc/index.vue

@@ -574,6 +574,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/motor/index.vue

@@ -717,6 +717,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/nitrogen/index.vue

@@ -546,6 +546,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

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

@@ -282,7 +282,7 @@
                  :on-progress="handleFileDocProgress"
                  :on-success="handleFileDocSuccess"
                  :auto-upload="true"
-                 drag 
+                 drag
       >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">
@@ -524,7 +524,8 @@ export default {
       }
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {
@@ -662,6 +663,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     /** 导入按钮操作 */

+ 3 - 1
ui/src/views/pssr/overhaulFilter/index.vue

@@ -553,7 +553,8 @@ export default {
       }
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {
@@ -722,6 +723,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     /** 报告附件按钮操作 */

+ 3 - 1
ui/src/views/pssr/overhaulPipe/index.vue

@@ -377,7 +377,8 @@ export default {
       }
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {
@@ -542,6 +543,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
   }

+ 3 - 1
ui/src/views/pssr/overhaulPump/index.vue

@@ -390,7 +390,8 @@ export default {
       }
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {
@@ -556,6 +557,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
   }

+ 3 - 1
ui/src/views/pssr/overhaulTower/index.vue

@@ -508,7 +508,8 @@ export default {
       }
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {
@@ -674,6 +675,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     /** 报告附件按钮操作 */

+ 3 - 1
ui/src/views/pssr/overhaulValve/index.vue

@@ -570,7 +570,8 @@ export default {
       }
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {
@@ -747,6 +748,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     /** 报告附件按钮操作 */

+ 13 - 6
ui/src/views/pssr/pipe/index.vue

@@ -381,13 +381,18 @@ export default {
         }
    },
   created() {
-    console.log(this.subId)
-    console.log(this.serialNumber)
+    this.msgSuccess("已发起确认流程");
+        this.getList();
+    this.msgSuccess("已发起确认流程");
+        this.getList();
     const id = this.$route.params.subId
     const serialNumber = this.$route.params.serialNumber
-    console.log(id)
-    console.log(serialNumber)
-    console.log(this.$route)
+    this.msgSuccess("已发起确认流程");
+        this.getList();
+    this.msgSuccess("已发起确认流程");
+        this.getList();
+    this.msgSuccess("已发起确认流程");
+        this.getList();
     this.subId = id
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
@@ -525,10 +530,12 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     checkSelectable(row) {
-      console.log(this.isApprove)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       return (row.approveStatus == 1 && this.isApprove != 0) || this.isApprove == 0
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/power/index.vue

@@ -685,6 +685,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 279 - 297
ui/src/views/pssr/protection/index.vue

@@ -1,111 +1,7 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="从表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入从表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批id" prop="approveId">
-        <el-input
-          v-model="queryParams.approveId"
-          placeholder="请输入审批id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="检查结果" prop="checkResult">
-        <el-input
-          v-model="queryParams.checkResult"
-          placeholder="请输入检查结果"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人1" prop="confirm1">
-        <el-input
-          v-model="queryParams.confirm1"
-          placeholder="请输入确认人1"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认人2" prop="confirm2">
-        <el-input
-          v-model="queryParams.confirm2"
-          placeholder="请输入确认人2"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="确认时间" prop="confirmationDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.confirmationDate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择确认时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -120,7 +16,9 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['pssr:protection:add']"
-        >新增</el-button>
+          v-if="isApprove==0"
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -130,7 +28,9 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['pssr:protection:edit']"
-        >修改</el-button>
+          v-if="isApprove==0"
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -140,17 +40,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['pssr:protection:remove']"
-        >删除</el-button>
+          v-if="isApprove==0"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:protection:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:protection:edit']"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -158,38 +62,82 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['pssr:protection:export']"
-        >导出</el-button>
+          v-if="isApprove==0"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-promotion"
+          size="mini"
+          @click="handleApprove"
+          v-if="isApprove==0"
+          v-hasPermi="['pssr:protection:edit']"
+        >发起审批
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-check"
+          size="mini"
+          v-if="isApprove==4||isApprove==5"
+          @click="handleConfirmApprove"
+          v-hasPermi="['pssr:protection:edit']"
+        >确认
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-refresh-left"
+          size="mini"
+          v-if="isApprove==2"
+          :disabled="multiple"
+          @click="handleTurnDown"
+          v-hasPermi="['pssr:protection:edit']"
+        >驳回
+        </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="protectionList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="唯一标识ID" align="center" prop="id" :show-overflow-tooltip="true"/>
-      <el-table-column label="从表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="审批id" align="center" prop="approveId" :show-overflow-tooltip="true"/>
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <h2>现场管道和设备保温防护检查表</h2>
+      <br>
+      <span>填写要求:现场管道和设备保温防护符合检查内容要求的,在检查结果中打“✔”,不符合打“×”。</span>
+      <span>如果检查不符合,并联系相关责任人按照该条检查内容的要求进行整改。如不能立即整改的,请立即汇报相关负责人并采取临时应对措施。</span>
+    </div>
+
+    <el-table v-loading="loading" :data="protectionList" @selection-change="handleSelectionChange"
+              :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="审批状态" align="center" prop="approveStatus" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
+          <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
+          <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
+          <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="检查内容" align="center" prop="checkContent" :show-overflow-tooltip="true"/>
       <el-table-column label="检查结果" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人1" align="center" prop="confirm1" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认人2" align="center" prop="confirm2" :show-overflow-tooltip="true"/>
-      <el-table-column label="确认时间" align="center" prop="confirmationDate" width="100">
+      <el-table-column label="确认人1" align="center" prop="confirm1" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirm1) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
+      <el-table-column label="确认人2" align="center" prop="confirm2" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          <span>{{ userFormat(scope.row.confirm2) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
+      <el-table-column label="确认时间" align="center" prop="confirmationDate" width="100">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <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-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -199,14 +147,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:protection:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:protection:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -222,117 +172,93 @@
     <!-- 添加或修改人身防护对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="从表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入从表id" />
-        </el-form-item>
-        <el-form-item label="审批id" prop="approveId">
-          <el-input v-model="form.approveId" placeholder="请输入审批id" />
-        </el-form-item>
         <el-form-item label="检查内容">
-          <editor v-model="form.checkContent" :min-height="192"/>
+          <el-input v-model="form.checkContent" placeholder="请输入检查内容"/>
         </el-form-item>
         <el-form-item label="检查结果" prop="checkResult">
-          <el-input v-model="form.checkResult" placeholder="请输入检查结果" />
+          <el-input v-model="form.checkResult" placeholder="请输入检查结果"/>
         </el-form-item>
         <el-form-item label="确认人1" prop="confirm1">
-          <el-input v-model="form.confirm1" placeholder="请输入确认人1" />
+          <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="确认人2" prop="confirm2">
-          <el-input v-model="form.confirm2" placeholder="请输入确认人2" />
-        </el-form-item>
-        <el-form-item label="确认时间" prop="confirmationDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.confirmationDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择确认时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
+          <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listProtection, getProtection, delProtection, addProtection, updateProtection, exportProtection, importTemplate} from "@/api/pssr/protection";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
+import {
+  addProtection,
+  delProtection,
+  exportProtection,
+  getProtection, handleConfirmProtection, handleTurnDownProtection,
+  importTemplate,
+  listProtection,
+  updateProtection
+} from "@/api/pssr/protection";
+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 Editor from '@/components/Editor';
+import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "Protection",
-  components: { Treeselect },
+  components: {Treeselect},
   // components: { Editor },
   props: {
     subId: {
@@ -346,6 +272,7 @@ export default {
   },
   data() {
     return {
+      userOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -364,24 +291,24 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/protection/importData"
-        },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/protection/importData"
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -404,22 +331,31 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        confirm1: [
+          {required: true, message: "确认人1不能为空", trigger: "change"}
+        ],
+        confirm2: [
+          {required: true, message: "确认人2不能为空", trigger: "change"}
+        ],
       }
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 350
+    })
     this.getList();
     this.getTreeselect();
+    listUserNoPage({}).then(res => {
+      this.userOptions = res.data
+    });
   },
   methods: {
     /** 查询人身防护列表 */
@@ -431,12 +367,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -476,7 +412,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -519,56 +455,102 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delProtection(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delProtection(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有人身防护数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportProtection(queryParams);
-        }).then(response => {
-          this.download(response.msg);
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportProtection(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res => {
+        this.msgSuccess("已发起确认流程");
+        this.getList();
+      })
+    },
+    handleConfirmApprove() {
+      let data = {
+        ids: this.ids,
+        subId: this.subId,
+        taskType: this.isApprove
+      }
+      handleConfirmProtection(data).then(res => {
+        this.msgSuccess("确认成功");
+        this.getList()
+        this.$emit('refreshHisList');
+      })
+    },
+    handleTurnDown(val) {
+      this.$prompt('请输入驳回原因', '提示', {
+        confirmButtonText: '确认驳回',
+        cancelButtonText: '取消',
+      }).then(({value}) => {
+        let data = {
+          ids: this.ids,
+          subId: this.subId,
+          remarks: value
+        }
+        handleTurnDownProtection(data).then(res => {
+          this.msgSuccess("驳回成功");
         })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消驳回'
+        });
+      });
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
+    userFormat(userId) {
+      for (let item of this.userOptions) {
+        if (item.userId == userId) {
+          return item.nickName
+        }
       }
+    },
   }
 };
 </script>

+ 1 - 0
ui/src/views/pssr/public/index.vue

@@ -674,6 +674,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 4 - 2
ui/src/views/pssr/region/index.vue

@@ -484,7 +484,8 @@ export default {
     },
     //合并单元格
     mergeMethod({row, column, rowIndex, columnIndex}) {
-      // console.log(row)
+      // this.msgSuccess("已发起确认流程");
+        this.getList();
       if ([1, 2, 4].includes(columnIndex)) {
         const _row = this.setTable(this.regionList).merge[rowIndex];
         const _col = _row > 0 ? 1 : 0;
@@ -496,7 +497,8 @@ export default {
     },
     //单元格整理
     setTable(tableData) {
-      //    console.log(tableData)
+      //    this.msgSuccess("已发起确认流程");
+        this.getList();
       let spanArr = [],
         concat = 0;
       tableData.forEach((item, index) => {

+ 1 - 0
ui/src/views/pssr/safetyBleed/index.vue

@@ -582,6 +582,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     /** 确认按钮操作*/

+ 1 - 0
ui/src/views/pssr/safetyBreath/index.vue

@@ -575,6 +575,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     /** 确认按钮操作*/

+ 1 - 0
ui/src/views/pssr/safetyBrust/index.vue

@@ -590,6 +590,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/safetyFlamearrester/index.vue

@@ -558,6 +558,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 1 - 0
ui/src/views/pssr/safetyValve/index.vue

@@ -580,6 +580,7 @@ export default {
     handleApprove() {
       doApprove(this.subId).then(res => {
         this.msgSuccess("已发起确认流程");
+        this.getList();
       })
     },
     handleConfirmApprove() {

+ 2 - 1
ui/src/views/pssr/subcontent/index.vue

@@ -332,7 +332,8 @@ export default {
       }
     },
     gotoSubIndex(row) {
-      console.log(row)
+      this.msgSuccess("已发起确认流程");
+        this.getList();
       this.$router.push({name: 'Subitem', params: {subId: row.id, serialNumber: row.forShort}});
     },
     /** 查询开车条件确认列表 */

+ 39 - 15
ui/src/views/pssr/subitem/index.vue

@@ -20,13 +20,20 @@
       <programme :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
     </div>
     <div v-if="sn=='mb'">
-      <blind :sub-id="Number(si)" :is-approve="Number(isApprove)"  @refreshHisList="refreshHisList"/>
+      <blind :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
     </div>
     <div v-if="sn=='qm'">
       <airtight :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
     </div>
     <div v-if="sn=='rsfh'">
-      <protection :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="现场管道和设备保温防护检查表 " name="first">
+          <protection :sub-id="Number(si)" :is-approve="Number(isApprove)"/>
+        </el-tab-pane>
+        <el-tab-pane label="现场转动设备防护措施检查表" name="second">
+          <measure :sub-id="Number(si)" :is-approve="Number(isApprove)"/>
+        </el-tab-pane>
+      </el-tabs>
     </div>
     <div v-if="sn=='aqss'">
       <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -50,11 +57,18 @@
     <div v-if="sn=='gygc'">
       <public :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
     </div>
-    <div v-if="sn=='yl'">
-      <material :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
+    <div v-if="sn=='yfl'">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="Cracker commissioning material quantity " name="first">
+          <material :sub-id="Number(si)" :is-approve="Number(isApprove)"/>
+        </el-tab-pane>
+        <el-tab-pane label="Raw materials" name="second">
+          <material-raw :sub-id="Number(si)" :is-approve="Number(isApprove)"/>
+        </el-tab-pane>
+      </el-tabs>
     </div>
     <div v-if="sn=='xcws'">
-      <hygiene :sub-id="Number(si)" :is-approve="Number(isApprove)"  @refreshHisList="refreshHisList"/>
+      <hygiene :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
     </div>
     <div v-if="sn=='sbqjd'">
       <cleaning :sub-id="Number(si)" :is-approve="Number(isApprove)" @refreshHisList="refreshHisList"/>
@@ -175,10 +189,14 @@ import PumpFill from "@/views/pssr/pumpFill/index.vue";
 import Laboratory from "@/views/pssr/laboratory/index.vue";
 import Power from "@/views/pssr/power/index.vue";
 import Moc from "@/views/pssr/moc/index.vue";
+import Measure from "@/views/pssr/measure/index.vue";
+import MaterialRaw from "@/views/pssr/materialRaw/index.vue";
 
 export default {
   name: "Subitem",
   components: {
+    MaterialRaw,
+    Measure,
     Moc,
     PumpFill,
     PumpOverhaul,
@@ -237,31 +255,37 @@ export default {
     }
   },
   created() {
-    this.sn=''
-    console.log(this.subId)
-    console.log(this.serialNumber)
+    this.sn = ''
+    this.msgSuccess("已发起确认流程");
+        this.getList();
+    this.msgSuccess("已发起确认流程");
+        this.getList();
     const id = this.$route.params.subId
     const serialNumber = this.$route.params.serialNumber
-    console.log(id)
-    console.log(serialNumber)
-    console.log(this.$route)
+    this.msgSuccess("已发起确认流程");
+        this.getList();
+    this.msgSuccess("已发起确认流程");
+        this.getList();
+    this.msgSuccess("已发起确认流程");
+        this.getList();
     if (typeof id !== 'undefined') {
       this.si = id
-    }else{
+    } else {
       this.si = this.subId
     }
     if (typeof serialNumber !== 'undefined') {
       this.sn = serialNumber
-    }else{
+    } else {
       this.sn = this.serialNumber
     }
 
-    console.log("item",this.sn)
+    this.msgSuccess("已发起确认流程");
+        this.getList();
   },
   methods: {
     handleClick(tab) {
     },
-    refreshHisList(){
+    refreshHisList() {
       this.$emit('refreshHisList')
     }
   }