Browse Source

工作许可证列表查看限制空间

Wang Zi Wen 2 years ago
parent
commit
a90a673c21

+ 7 - 6
master/src/main/java/com/ruoyi/project/ticket/controller/TRestrictedSpacePermitController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.project.ticket.controller;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -48,7 +49,6 @@ public class TRestrictedSpacePermitController extends BaseController
     /**
      * 查询限制性空间进入开票列表
      */
-    @PreAuthorize("@ss.hasPermi('his:permit:list')")
     @GetMapping("/list")
     public TableDataInfo list(TRestrictedSpacePermit tRestrictedSpacePermit)
     {
@@ -60,7 +60,6 @@ public class TRestrictedSpacePermitController extends BaseController
     /**
      * 导出限制性空间进入开票列表
      */
-    @PreAuthorize("@ss.hasPermi('his:permit:export')")
     @Log(title = "限制性空间进入开票", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TRestrictedSpacePermit tRestrictedSpacePermit)
@@ -73,7 +72,6 @@ public class TRestrictedSpacePermitController extends BaseController
     /**
      * 获取限制性空间进入开票详细信息
      */
-    @PreAuthorize("@ss.hasPermi('his:permit:query')")
     @GetMapping(value = "/{cId}")
     public AjaxResult getInfo(@PathVariable("cId") Long cId)
     {
@@ -83,7 +81,6 @@ public class TRestrictedSpacePermitController extends BaseController
     /**
      * 新增限制性空间进入开票
      */
-    @PreAuthorize("@ss.hasPermi('his:permit:add')")
     @Log(title = "限制性空间进入开票", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TRestrictedSpacePermit tRestrictedSpacePermit)
@@ -94,6 +91,12 @@ public class TRestrictedSpacePermitController extends BaseController
         Long ticketId = tTicketIdController.createId(tTicketId);
         //保存限制空间许可证
         tRestrictedSpacePermit.setcId(ticketId);
+        Date bValidityStartTime = tRestrictedSpacePermit.getbValidityStartTime();
+        Date bValidityEndTime = tRestrictedSpacePermit.getbValidityEndTime();
+        bValidityStartTime.setDate(bValidityStartTime.getDate() + 1);
+        bValidityEndTime.setDate(bValidityEndTime.getDate() + 1);
+        tRestrictedSpacePermit.setbValidityStartTime(bValidityStartTime);
+        tRestrictedSpacePermit.setbValidityEndTime(bValidityEndTime);
         tRestrictedSpacePermitService.insertTRestrictedSpacePermit(tRestrictedSpacePermit);
         //保存限制空间许可证关联数据
         PermitRelation permitRelation = new PermitRelation();
@@ -108,7 +111,6 @@ public class TRestrictedSpacePermitController extends BaseController
     /**
      * 修改限制性空间进入开票
      */
-    @PreAuthorize("@ss.hasPermi('his:permit:edit')")
     @Log(title = "限制性空间进入开票", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TRestrictedSpacePermit tRestrictedSpacePermit)
@@ -119,7 +121,6 @@ public class TRestrictedSpacePermitController extends BaseController
     /**
      * 删除限制性空间进入开票
      */
-    @PreAuthorize("@ss.hasPermi('his:permit:remove')")
     @Log(title = "限制性空间进入开票", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{cIds}")
     public AjaxResult remove(@PathVariable Long[] cIds)

+ 2 - 2
master/src/main/java/com/ruoyi/project/ticket/domain/TRestrictedSpacePermit.java

@@ -97,12 +97,12 @@ public class TRestrictedSpacePermit extends BaseEntity
     private String bWorkContent;
 
     /** 有效期,开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @Excel(name = "有效期,开始时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date bValidityStartTime;
 
     /** 有效期,结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     @Excel(name = "有效期,结束时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date bValidityEndTime;
 

File diff suppressed because it is too large
+ 0 - 0
master/src/main/resources/mybatis/ticket/TRestrictedSpacePermitMapper.xml


+ 17 - 25
ui/src/views/invoicing/restrictedspace/index.vue

@@ -1748,7 +1748,7 @@
 <script>
 import { listDept } from "@/api/system/dept";
 import { listMatters } from "@/api/ehs/throughcleanbcc";
-import { addPermit } from "@/api/invoicing/restrictedspace";
+import { addPermit, getPermit } from "@/api/invoicing/restrictedspace";
 import { batchAddJobticket } from "@/api/ehs/jobticket";
 import { updateWorkcontent } from "@/api/invoice/workcontent";
 
@@ -2136,6 +2136,19 @@ export default {
     listDept(this.aConstructionsQuery).then(response => {
       this.aConstructions = response.data;
     })
+    var id = this.$route.query.cId;
+    if (id != null) {
+      getPermit(id).then(response => {
+        this.form = response.data;
+        this.value1 = [];
+        this.value1[0] = this.form.bValidityStartTime;
+        this.value1[1] = this.form.bValidityEndTime;
+        this.dataLoading(this.form);
+        this.msgSuccess(this.$t('数据加载成功'));
+        console.log('1231231-----', this.form)
+      });
+      this.cIdDisabled = true;
+    }
   },
   methods: {
     //施工单位后台数据联动
@@ -2177,30 +2190,9 @@ export default {
     },
     //数据提交时保存的数据处理
     dataSet() {
-      // //B栏有效期开始结束时间处理
-      // this.form.bValidityStartTime = this.value1[0];
-      // this.form.bValidityEndTime = this.value1[1];
-      // //C栏
-      // this.form.cIsToxic = this.cIsToxic;
-      // this.form.cIsFlammable = this.cIsFlammable;
-      // this.form.cIsOxidizing = this.cIsOxidizing;
-      // this.form.cIsExplosive = this.cIsExplosive;
-      // this.form.cIsCorrosive = this.cIsCorrosive;
-      // this.form.cIsIrritantToxic = this.cIsIrritantToxic;
-      // this.form.cIsHealthHazard = this.cIsHealthHazard;
-      // this.form.cIsCompressedGas = this.cIsCompressedGas;
-      // this.form.cIsEnvironmentalHazard = this.cIsEnvironmentalHazard;
-      // this.form.eIsSafeGoggles = this.eIsSafeGoggles;
-      // this.form.eIsFaceShield = this.eIsFaceShield;
-      // this.form.eIsProtectGloves = this.eIsProtectGloves;
-      // this.form.eIsRubberBoots = this.eIsRubberBoots;
-      // this.form.eIsRubberApron = this.eIsRubberApron;
-      // this.form.eIsProtectSuit = this.eIsProtectSuit;
-      // this.form.eIsResProtect = this.eIsResProtect;
-      // this.form.eIsFallArrest = this.eIsFallArrest;
-      // this.form.eProtectGlovesContent = this.eProtectGlovesContent;
-      // this.form.eResProtectContent = this.eResProtectContent;
-      // this.form.eProtectSuitContent = this.eProtectSuitContent;
+      //B栏有效期开始结束时间处理
+      this.form.bValidityStartTime = this.value1[0];
+      this.form.bValidityEndTime = this.value1[1];
     },
     /* 动态改变勾选 */
     selectChange(id) {

+ 6 - 1
ui/src/views/invoicing/ticketList/index.vue

@@ -157,7 +157,12 @@ export default {
         });
       }
       if (row.cId != null) {
-        alert("限制性空间进入许可证暂未开发");
+        this.$router.push({
+          path: '/ticket/restrictedspace',
+          query: {
+            cId: row.cId
+          }
+        });
       }
     },
     /** 延期操作 */

Some files were not shown because too many files changed in this diff