4 Commity 7b3d342cb9 ... c5c493d247

Autor SHA1 Wiadomość Data
  lin.liu c5c493d247 隐患检查 1 tydzień temu
  lin.liu 76d10319af 隐患检查 1 tydzień temu
  lin.liu dd4d402b9a 隐患检查 1 tydzień temu
  lin.liu d84ef7c2bd 隐患检查 1 tydzień temu
24 zmienionych plików z 821 dodań i 352 usunięć
  1. 32 13
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/CheckRecordController.java
  2. 5 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckRecordItemPO.java
  3. 5 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckRecordPO.java
  4. 0 5
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckRevokePO.java
  5. 6 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/bo/GridCheckFormBo.java
  6. 18 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/CheckRecordVO.java
  7. 4 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecord/ReqCreateCheckRecord.java
  8. 14 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResCheckRecordDetail.java
  9. 35 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResCheckRecordItem.java
  10. 15 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResListGrid4User.java
  11. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchCheckRecord.java
  12. 14 6
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordItemMapperImpl.java
  13. 13 3
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordMapperImpl.java
  14. 14 6
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRevokeMapperImpl.java
  15. 20 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/GridInfoMapperImpl.java
  16. 218 19
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordService.java
  17. 20 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/model/LabelValueDto.java
  18. 1 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/model/ReqAudit.java
  19. 1 0
      secure-producting-system/src/main/resources/mapper/system/SysUserMapper.xml
  20. 18 9
      secure-producting-vue/src/api/form/DangerCheckRecord.js
  21. 184 226
      secure-producting-vue/src/views/check/DangerCheckRecordMine.vue
  22. 147 28
      secure-producting-vue/src/views/grid/components/MyGridAndCheck.vue
  23. 32 35
      secure-producting-vue/src/views/grid/components/SubmitDangerCheck.vue
  24. 4 0
      sql/20240814.sql

+ 32 - 13
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/CheckRecordController.java

@@ -24,23 +24,21 @@ package com.customs.cq.datacenter.business.controller;
 
 import com.customs.cq.datacenter.business.domain.vo.CheckRecordVO;
 import com.customs.cq.datacenter.business.entity.request.checkrecord.ReqCreateCheckRecord;
+import com.customs.cq.datacenter.business.entity.response.check.ResCheckRecordDetail;
 import com.customs.cq.datacenter.business.entity.search.SearchCheckRecord;
 import com.customs.cq.datacenter.business.service.CheckRecordService;
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.PagerResult;
 import com.customs.cq.datacenter.common.core.controller.BasicController;
-import com.customs.cq.datacenter.common.core.domain.model.LoginUser;
-import com.customs.cq.datacenter.common.enums.EResultCode;
-import com.customs.cq.datacenter.common.exception.ServiceException;
-import com.customs.cq.datacenter.common.helper.LoginHelper;
+import com.customs.cq.datacenter.common.model.ReqAudit;
 import com.customs.cq.datacenter.common.model.ReqListId;
+import com.customs.cq.datacenter.common.model.ReqOperator;
 import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
 import com.customs.cq.datacenter.common.validator.ParameterValidator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
-import java.util.Objects;
 
 /**
  * 2010.隐患检查记录
@@ -81,7 +79,7 @@ public class CheckRecordController extends BasicController {
      * @description 获取[隐患检查记录]
      */
     @GetMapping(value = "get/{id}")
-    public ExecutedResult<CheckRecordVO> get(@PathVariable Long id) {
+    public ExecutedResult<ResCheckRecordDetail> get(@PathVariable Long id) {
         return this.service.get(id);
     }
 
@@ -102,7 +100,7 @@ public class CheckRecordController extends BasicController {
      */
     @PostMapping(value = "search")
     public ExecutedResult<PagerResult<CheckRecordVO>> search(@RequestBody SearchCheckRecord request) {
-        return this.service.search(request, Boolean.FALSE);
+        return this.service.search(request, null);
     }
 
     /**
@@ -111,12 +109,6 @@ public class CheckRecordController extends BasicController {
      */
     @PostMapping(value = "listMine")
     public ExecutedResult<PagerResult<CheckRecordVO>> listMine(@RequestBody SearchCheckRecord request) {
-        LoginUser loginUser = LoginHelper.getLoginUser();
-        if (Objects.isNull(loginUser)) {
-            throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
-        }
-        // 指定用户查询
-        request.setCheckPerson(loginUser.getUserId().toString());
         return this.service.search(request, Boolean.FALSE);
     }
 
@@ -128,4 +120,31 @@ public class CheckRecordController extends BasicController {
     public ExecutedResult<PagerResult<CheckRecordVO>> listAdminMine(@RequestBody SearchCheckRecord request) {
         return this.service.search(request, Boolean.TRUE);
     }
+
+    /**
+     * 提交到网格管理员
+     * @author lin.liu
+     */
+    @PostMapping(value = "submitAdmin/{id}")
+    public ExecutedResult<ResCheckRecordDetail> submitAdmin(@PathVariable Long id) {
+        return service.submitAdmin(id);
+    }
+
+    /**
+     * 检查单撤回申请
+     * @author lin.liu
+     */
+    @PostMapping(value = "revoke")
+    public ExecutedResult<String> revoke(@RequestBody ReqOperator request) {
+        return service.revoke(request);
+    }
+
+    /**
+     * 检查单撤回审核
+     * @author lin.liu
+     */
+    @PostMapping(value = "revokeAudit")
+    public ExecutedResult<String> revokeAudit(@RequestBody ReqAudit request) {
+        return service.revokeAudit(request);
+    }
 }

+ 5 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckRecordItemPO.java

@@ -86,6 +86,11 @@ public class CheckRecordItemPO {
 	 */
 	@TableField(value = "ITEM_NAME")
 	private String itemName;
+	/**
+	 * 检查项描述
+	 */
+	@TableField(value = "ITEM_DESCRIPTION")
+	private String itemDescription;
 	/**
 	 * 检查时间
 	 */

+ 5 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckRecordPO.java

@@ -141,6 +141,11 @@ public class CheckRecordPO {
 	 */
 	@TableField(value = "STATUS")
 	private Integer status;
+	/**
+	 * 撤回申请状态 EApprovalState
+	 */
+	@TableField(value = "REVOKE_STATUS")
+	private Integer revokeStatus;
 	/**
 	 * 备注
 	 */

+ 0 - 5
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckRevokePO.java

@@ -81,11 +81,6 @@ public class CheckRevokePO {
 	 */
 	@TableField(value = "AUDITOR_NAME")
 	private String auditorName;
-	/**
-	 * 审核结果
-	 */
-	@TableField(value = "AUDIT_RESULT")
-	private Integer auditResult;
 	/**
 	 * 审核时间
 	 */

+ 6 - 1
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/bo/GridCheckFormBo.java

@@ -38,8 +38,12 @@ public class GridCheckFormBo implements Serializable {
      * 状态 ECheckFormStatus
      */
     private Integer status;
+    /**
+     * 撤回申请状态 EApprovalState
+     */
+    private Integer revokeStatus;
 
-    public GridCheckFormBo(Long id, String checkFormNo, Long gridId, Long dangerCategory, Long checkFormId, String checkFormName, Long createTime, Integer status) {
+    public GridCheckFormBo(Long id, String checkFormNo, Long gridId, Long dangerCategory, Long checkFormId, String checkFormName, Long createTime, Integer status, Integer revokeStatus) {
         this.id = id;
         this.checkFormNo = checkFormNo;
         this.gridId = gridId;
@@ -48,5 +52,6 @@ public class GridCheckFormBo implements Serializable {
         this.checkFormName = checkFormName;
         this.createTime = createTime;
         this.status = status;
+        this.revokeStatus = revokeStatus;
     }
 }

+ 18 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/CheckRecordVO.java

@@ -24,6 +24,8 @@ package com.customs.cq.datacenter.business.domain.vo;
 
 import com.customs.cq.datacenter.business.domain.CheckRecordPO;
 import com.customs.cq.datacenter.common.core.vo.BasicVO;
+import com.customs.cq.datacenter.common.enums.EApprovalState;
+import com.customs.cq.datacenter.common.enums.ECheckFormStatus;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
@@ -39,6 +41,10 @@ import java.util.Objects;
  */
 @Data
 public class CheckRecordVO extends CheckRecordPO implements BasicVO {
+    /**
+     * 网格名称
+     */
+    private String gridName;
 
     @Override
     public String getCreateTimeView() {
@@ -87,4 +93,16 @@ public class CheckRecordVO extends CheckRecordPO implements BasicVO {
     public String getHasDangerTxt() {
         return EYesOrNo.getByValue(this.getHasDanger()).getDesc();
     }
+
+    public String getStatusTxt() {
+        return ECheckFormStatus.getByValue(this.getStatus()).getDesc();
+    }
+
+    public String getRevokeStatusTxt() {
+        EApprovalState status = EApprovalState.getByValue(this.getRevokeStatus());
+        if (Objects.isNull(status)) {
+            return "未申请";
+        }
+        return status.getDesc();
+    }
 }

+ 4 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecord/ReqCreateCheckRecord.java

@@ -66,4 +66,8 @@ public class ReqCreateCheckRecord {
 	 * 是否直接提交(提交到网格管理员/暂存) EYesOrNo
 	 */
 	private Integer isSubmit;
+	/**
+	 * 备注
+	 */
+	private String remark;
 }

+ 14 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResCheckRecordDetail.java

@@ -0,0 +1,14 @@
+package com.customs.cq.datacenter.business.entity.response.check;
+
+import com.customs.cq.datacenter.business.domain.vo.CheckRecordVO;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ResCheckRecordDetail extends CheckRecordVO {
+    /**
+     * 检查项列表
+     */
+    private List<ResCheckRecordItem> listItem;
+}

+ 35 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResCheckRecordItem.java

@@ -0,0 +1,35 @@
+package com.customs.cq.datacenter.business.entity.response.check;
+
+import lombok.Data;
+
+@Data
+public class ResCheckRecordItem {
+    /**
+     * 检查记录-检查项id
+     */
+    private Long id;
+    /**
+     * 检查项名称
+     */
+    private String itemName;
+    /**
+     * 检查项描述
+     */
+    private String itemDescription;
+    /**
+     * 检查结果 ECheckResult
+     */
+    private Integer checkResult;
+    /**
+     * 隐患描述
+     */
+    private String dangerDescription;
+    /**
+     * 整改措施
+     */
+    private String rectifyPlan;
+    /**
+     * 整改期限
+     */
+    private Long rectifyDeadline;
+}

+ 15 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResListGrid4User.java

@@ -1,8 +1,11 @@
 package com.customs.cq.datacenter.business.entity.response.check;
 
+import com.customs.cq.datacenter.common.enums.EApprovalState;
 import com.customs.cq.datacenter.common.enums.ECheckFormStatus;
 import lombok.Data;
 
+import java.util.Objects;
+
 @Data
 public class ResListGrid4User {
     /**
@@ -33,8 +36,20 @@ public class ResListGrid4User {
      * 检查单状态
      */
     private Integer status;
+    /**
+     * 撤回申请状态 EApprovalState
+     */
+    private Integer revokeStatus;
 
     public String getStatusTxt() {
         return ECheckFormStatus.getByValue(this.getStatus()).getDesc();
     }
+
+    public String getRevokeStatusTxt() {
+        EApprovalState status = EApprovalState.getByValue(this.getRevokeStatus());
+        if (Objects.isNull(status)) {
+            return "未申请";
+        }
+        return status.getDesc();
+    }
 }

+ 1 - 1
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchCheckRecord.java

@@ -37,7 +37,7 @@ public class SearchCheckRecord extends SearchBasicDTO {
 	/**
 	 * 所属部门
 	 */
-	private List<Long> listDepartment;
+	private List<String> listDepartment;
 	/**
 	 * 关区代码
 	 */

+ 14 - 6
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordItemMapperImpl.java

@@ -3,17 +3,19 @@ package com.customs.cq.datacenter.business.mapper.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.customs.cq.datacenter.business.domain.CheckRecordItemPO;
+import com.customs.cq.datacenter.business.entity.search.SearchCheckRecordItem;
+import com.customs.cq.datacenter.business.mapper.CheckRecordItemMapper;
+import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
 import com.customs.cq.datacenter.common.enums.EOrderBy;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
-import com.customs.cq.datacenter.common.utils.ListUtil;
-import com.customs.cq.datacenter.common.utils.NumericUtil;
-import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+import com.customs.cq.datacenter.common.utils.ListUtil;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
 import org.springframework.stereotype.Repository;
-import com.customs.cq.datacenter.business.entity.search.SearchCheckRecordItem;
-import com.customs.cq.datacenter.business.domain.CheckRecordItemPO;
-import com.customs.cq.datacenter.business.mapper.CheckRecordItemMapper;
+
+import java.util.List;
 
 /**
  * 隐患检查-检查项
@@ -97,4 +99,10 @@ public class CheckRecordItemMapperImpl extends BasicMapper<CheckRecordItemPO> {
         }
         return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
     }
+
+    public List<CheckRecordItemPO> list4CheckRecord(Long id) {
+        LambdaQueryWrapper<CheckRecordItemPO> queryWrapper = this.getQuery();
+        queryWrapper.eq(CheckRecordItemPO::getCheckRecordId, id);
+        return mapper.selectList(queryWrapper);
+    }
 }

+ 13 - 3
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordMapperImpl.java

@@ -69,8 +69,16 @@ public class CheckRecordMapperImpl extends BasicMapper<CheckRecordPO> {
         queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListGridCategory()), CheckRecordPO::getGridCategory, search.getListGridCategory());
         // 隐患分类
         queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListDangerCategory()), CheckRecordPO::getDangerCategory, search.getListDangerCategory());
-        // 所属部门
-        queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListDepartment()), CheckRecordPO::getDepartment, search.getListDepartment());
+        // 网格列表
+        queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListGridId()), CheckRecordPO::getGridId, search.getListGridId());
+        // 部门列表
+        if (ListUtil.isNotNullOrEmpty(search.getListDepartment())) {
+            queryWrapper.and(q -> {
+                for (String dept : search.getListDepartment()) {
+                    q.or().like(CheckRecordPO::getDepartment, "#" + dept + "#");
+                }
+            });
+        }
 
         // 关区代码
         queryWrapper.like(StringUtil.isNotNullOrEmpty(search.getCustoms()), CheckRecordPO::getCustoms, search.getCustoms());
@@ -139,6 +147,7 @@ public class CheckRecordMapperImpl extends BasicMapper<CheckRecordPO> {
         listColumn.add("CHECK_FORM_NAME");
         listColumn.add("CREATE_TIME");
         listColumn.add("STATUS");
+        listColumn.add("REVOKE_STATUS");
 
         LambdaQueryWrapper<CheckRecordPO> where = super.getQuery();
         where.select(CheckRecordPO.class, c -> listColumn.contains(c.getColumn()));
@@ -155,7 +164,8 @@ public class CheckRecordMapperImpl extends BasicMapper<CheckRecordPO> {
                 NumericUtil.tryParseLong(c.get("CHECK_FORM_ID")),
                 c.get("CHECK_FORM_NAME").toString(),
                 NumericUtil.tryParseLong(c.get("CREATE_TIME")),
-                NumericUtil.tryParseInt(c.get("STATUS"))
+                NumericUtil.tryParseInt(c.get("STATUS")),
+                NumericUtil.tryParseInt(c.get("REVOKE_STATUS"))
         )).collect(Collectors.toList());
     }
 

+ 14 - 6
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRevokeMapperImpl.java

@@ -3,17 +3,19 @@ package com.customs.cq.datacenter.business.mapper.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.customs.cq.datacenter.business.domain.CheckRevokePO;
+import com.customs.cq.datacenter.business.entity.search.SearchCheckRevoke;
+import com.customs.cq.datacenter.business.mapper.CheckRevokeMapper;
+import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
 import com.customs.cq.datacenter.common.enums.EOrderBy;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
-import com.customs.cq.datacenter.common.utils.ListUtil;
-import com.customs.cq.datacenter.common.utils.NumericUtil;
-import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+import com.customs.cq.datacenter.common.utils.ListUtil;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
 import org.springframework.stereotype.Repository;
-import com.customs.cq.datacenter.business.entity.search.SearchCheckRevoke;
-import com.customs.cq.datacenter.business.domain.CheckRevokePO;
-import com.customs.cq.datacenter.business.mapper.CheckRevokeMapper;
+
+import java.util.List;
 
 /**
  * 隐患检查单撤回申请
@@ -97,4 +99,10 @@ public class CheckRevokeMapperImpl extends BasicMapper<CheckRevokePO> {
         }
         return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
     }
+
+    public List<CheckRevokePO> list4CheckRecord(Long checkRecordId) {
+        LambdaQueryWrapper<CheckRevokePO> where = this.getQuery();
+        where.eq(CheckRevokePO::getCheckRecordId, checkRecordId);
+        return mapper.selectList(where);
+    }
 }

+ 20 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/GridInfoMapperImpl.java

@@ -9,6 +9,7 @@ import com.customs.cq.datacenter.business.mapper.GridInfoMapper;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
 import com.customs.cq.datacenter.common.enums.EOrderBy;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.model.LabelValueDto;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 import com.customs.cq.datacenter.common.utils.ListUtil;
@@ -16,6 +17,11 @@ import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.utils.StringUtil;
 import org.springframework.stereotype.Repository;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 /**
  * 网格信息
  * @author lin.liu
@@ -111,4 +117,18 @@ public class GridInfoMapperImpl extends BasicMapper<GridInfoPO> {
         }
         return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
     }
+
+    public Map<Long, LabelValueDto<Long>> map4Id(List<Long> listId) {
+        List<String> listColumn = new ArrayList<>();
+        listColumn.add("ID");
+        listColumn.add("GRID_NAME");
+
+        LambdaQueryWrapper<GridInfoPO> queryWrapper = this.getQuery();
+        queryWrapper.select(GridInfoPO.class, c -> listColumn.contains(c.getColumn()));
+        queryWrapper.in(GridInfoPO::getId, listId);
+        return mapper.selectMaps(queryWrapper)
+                .stream()
+                .map(c -> new LabelValueDto<>(c.get("GRID_NAME").toString(), NumericUtil.tryParseLong(c.get("ID"))))
+                .collect(Collectors.toMap(LabelValueDto::getValue, c -> c));
+    }
 }

+ 218 - 19
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordService.java

@@ -29,6 +29,8 @@ import com.customs.cq.datacenter.business.domain.bo.GridCheckFormBo;
 import com.customs.cq.datacenter.business.domain.vo.CheckRecordVO;
 import com.customs.cq.datacenter.business.entity.request.checkrecord.ReqCreateCheckRecord;
 import com.customs.cq.datacenter.business.entity.request.checkrecorditem.ReqCreateCheckRecordItem;
+import com.customs.cq.datacenter.business.entity.response.check.ResCheckRecordDetail;
+import com.customs.cq.datacenter.business.entity.response.check.ResCheckRecordItem;
 import com.customs.cq.datacenter.business.entity.response.check.ResListGrid4User;
 import com.customs.cq.datacenter.business.entity.search.SearchCheckRecord;
 import com.customs.cq.datacenter.business.mapper.impl.*;
@@ -41,6 +43,9 @@ import com.customs.cq.datacenter.common.core.service.BasicService;
 import com.customs.cq.datacenter.common.enums.*;
 import com.customs.cq.datacenter.common.exception.ServiceException;
 import com.customs.cq.datacenter.common.helper.LoginHelper;
+import com.customs.cq.datacenter.common.model.LabelValueDto;
+import com.customs.cq.datacenter.common.model.ReqAudit;
+import com.customs.cq.datacenter.common.model.ReqOperator;
 import com.customs.cq.datacenter.common.model.Tuple;
 import com.customs.cq.datacenter.common.utils.*;
 import com.customs.cq.datacenter.system.mapper.SysDictDataMapper;
@@ -81,6 +86,8 @@ public class CheckRecordService extends BasicService {
     private DangerCheckItemMapperImpl checkItemMapper;
     @Autowired
     private SysUserMapper userMapper;
+    @Autowired
+    private CheckRevokeMapperImpl checkRevokeMapper;
 
     @Autowired
     private GridInfoService gridInfoService;
@@ -169,7 +176,7 @@ public class CheckRecordService extends BasicService {
             checkItem.setCustomsName(item.getCustomsName());
             checkItem.setCheckTime(item.getCheckTime());
             checkItem.setCheckPerson(item.getCheckPerson());
-            checkItem.setRectifyStatus(c.getCheckResult());
+            checkItem.setCheckResult(c.getCheckResult());
             checkItem.setDangerDescription(c.getDangerDescription());
             checkItem.setRectifyPlan(c.getRectifyPlan());
             checkItem.setRectifyDeadline(c.getRectifyDeadline());
@@ -201,12 +208,15 @@ public class CheckRecordService extends BasicService {
         }
     }
 
-    public ExecutedResult<CheckRecordVO> get(Long id) {
-        CheckRecordVO result = new CheckRecordVO();
+    public ExecutedResult<ResCheckRecordDetail> get(Long id) {
+        ResCheckRecordDetail result = new ResCheckRecordDetail();
 
         CheckRecordPO find = dao.selectById(id);
         if (null != find) {
-            result = CopierUtil.mapTo(find, CheckRecordVO.class);
+            // 查找检查项
+            List<CheckRecordItemPO> list = checkRecordItemMapper.list4CheckRecord(id);
+            result = CopierUtil.mapTo(find, ResCheckRecordDetail.class);
+            result.setListItem(CopierUtil.mapTo(list, ResCheckRecordItem.class));
         }
         return ExecutedResult.success(result);
     }
@@ -221,22 +231,39 @@ public class CheckRecordService extends BasicService {
         return ExecutedResult.success(result);
     }
 
-    public ExecutedResult<PagerResult<CheckRecordVO>> search(SearchCheckRecord search, boolean isGridAdmin) {
+    public ExecutedResult<PagerResult<CheckRecordVO>> search(SearchCheckRecord search, Boolean isGridAdmin) {
         List<CheckRecordVO> listVo = new ArrayList<>();
 
-        if (isGridAdmin) {
-            LoginUser loginUser = LoginHelper.getLoginUser();
-            if (Objects.isNull(loginUser)) {
-                throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
-            }
-            // 获取用户
-            SysUser user = userMapper.selectUserById(Long.parseLong(loginUser.getLoginId()));
-            // 获取当前登录用户是网格管理员的网格id
-            List<Long> listGrid = gridPersonMapper.listGrid4AdminUser(user.getUserGuid());
-            if (ListUtil.isNullOrEmpty(listGrid)) {
-                return ExecutedResult.success(new PagerResult<>(search.getLimit(), search.getPage(), 0L, listVo));
+        if (Objects.nonNull(isGridAdmin)) {
+            if (isGridAdmin) {
+                LoginUser loginUser = LoginHelper.getLoginUser();
+                if (Objects.isNull(loginUser)) {
+                    throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
+                }
+                // 获取用户
+                SysUser user = userMapper.selectById(loginUser.getUserId());
+                // 获取当前登录用户是网格管理员的网格列表
+                List<Long> listGrid = gridPersonMapper.listGrid4AdminUser(user.getUserGuid());
+                if (ListUtil.isNullOrEmpty(listGrid)) {
+                    return ExecutedResult.success(new PagerResult<>(search.getLimit(), search.getPage(), 0L, listVo));
+                }
+                // 设置查询的网格范围
+                search.setListGridId(listGrid);
+            } else {
+                LoginUser loginUser = LoginHelper.getLoginUser();
+                if (Objects.isNull(loginUser)) {
+                    throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
+                }
+                // 获取用户
+                SysUser user = userMapper.selectById(loginUser.getUserId());
+                // 获取当前登录用户所属网格列表
+                List<Long> listGrid = gridPersonMapper.listGrid4User(user.getUserGuid());
+                if (ListUtil.isNullOrEmpty(listGrid)) {
+                    return ExecutedResult.success(new PagerResult<>(search.getLimit(), search.getPage(), 0L, listVo));
+                }
+                // 设置查询的网格范围
+                search.setListGridId(listGrid);
             }
-            search.setListGridId(listGrid);
         }
         // 处理创建时间范围-查询参数
         Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange());
@@ -258,8 +285,18 @@ public class CheckRecordService extends BasicService {
         IPage<CheckRecordPO> pageList = dao.search(search);
         List<CheckRecordPO> list = pageList.getRecords();
         if (ListUtil.isNotNullOrEmpty(list)) {
-            // 转换vo
-            listVo = CopierUtil.mapTo(list, CheckRecordVO.class);
+            List<Long> listGridId = list.stream().map(CheckRecordPO::getGridId).distinct()
+                    .collect(Collectors.toList());
+            Map<Long, LabelValueDto<Long>> map4Grid = gridInfoMapper.map4Id(listGridId);
+            for (CheckRecordPO item : list) {
+                // 转换vo
+                CheckRecordVO vo = CopierUtil.mapTo(item, CheckRecordVO.class);
+                vo.setGridName("");
+                if (map4Grid.containsKey(item.getGridId())) {
+                    vo.setGridName(map4Grid.get(item.getGridId()).getLabel());
+                }
+                listVo.add(vo);
+            }
         }
         PagerResult<CheckRecordVO> result = new PagerResult<>(pageList.getSize(), pageList.getCurrent(), pageList.getTotal(), listVo);
         return ExecutedResult.success(result);
@@ -393,6 +430,7 @@ public class CheckRecordService extends BasicService {
                 checkItem.setCustoms("");
                 checkItem.setCustomsName("");
                 checkItem.setItemName(c.getItemName());
+                checkItem.setItemDescription(c.getDescription());
                 checkItem.setCheckTime(0L);
                 checkItem.setCheckPerson("");
                 checkItem.setCheckResult(0);
@@ -428,4 +466,165 @@ public class CheckRecordService extends BasicService {
             throw new Exception("添加检查记录失败");
         }
     }
+
+    // 提交到网格管理员
+    public ExecutedResult<ResCheckRecordDetail> submitAdmin(Long id) {
+        LoginUser loginUser = LoginHelper.getLoginUser();
+        if (Objects.isNull(loginUser)) {
+            throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
+        }
+        // 获取用户
+        SysUser user = userMapper.selectById(loginUser.getUserId());
+
+        // 校验是否存在
+        ExecutedResult<CheckRecordPO> checkExists = this.check4Id(id);
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        CheckRecordPO find = checkExists.getData();
+        if (!Objects.equals(find.getStatus(), ECheckFormStatus.STAGING.getValue())) {
+            return ExecutedResult.success();
+        }
+
+        // 查询网格管理的网格员
+        List<GridPersonPO> listPerson = gridPersonMapper.list4Grid(find.getGridId());
+        if (listPerson.stream().noneMatch(c -> Objects.equals(c.getUserGuid(), user.getUserGuid()))) {
+            return ExecutedResult.failed("当前用户没有权限!");
+        }
+
+        CheckRecordPO item = new CheckRecordPO();
+        item.setId(id);
+        item.setStatus(ECheckFormStatus.SUBMITTED.getValue());
+        // 修改人信息
+        item.setUpdateBy(loginUser.getUserId().toString());
+        item.setUpdateByName(loginUser.getUsername());
+        item.setUpdateTime(LocalDateTimeUtil.getTimeStamp(LocalDateTimeUtil.nowTimeStamp()));
+
+        int result = dao.updateById(item);
+        if (result != 1) {
+            return ExecutedResult.failed("检查单提交操作失败");
+        }
+        return ExecutedResult.success();
+    }
+    private void updateRevokeStatus(Long gridId, EApprovalState status) {
+        CheckRecordPO item = new CheckRecordPO();
+        item.setId(gridId);
+        item.setRevokeStatus(status.getValue());
+
+        int rowCount = dao.updateById(item);
+        if (rowCount != 1) {
+            throw new ServiceException("修改隐患检查单状态失败", EResultCode.FAILED.getCode());
+        }
+    }
+
+    // 检查单撤回申请
+    public ExecutedResult<String> revoke(ReqOperator request) {
+        LoginUser loginUser = LoginHelper.getLoginUser();
+        if (Objects.isNull(loginUser)) {
+            throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
+        }
+        // 获取用户
+        SysUser user = userMapper.selectById(loginUser.getUserId());
+
+        // 校验是否存在
+        ExecutedResult<CheckRecordPO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        CheckRecordPO find = checkExists.getData();
+        // 检查单撤回申请状态为待审核,返回成功
+        if (Objects.equals(find.getRevokeStatus(), EApprovalState.WAITING.getValue())) {
+            return ExecutedResult.success();
+        }
+
+        // 查询网格管理的网格员
+        List<GridPersonPO> listPerson = gridPersonMapper.list4Grid(find.getGridId());
+        if (listPerson.stream().noneMatch(c -> Objects.equals(c.getUserGuid(), user.getUserGuid()))) {
+            return ExecutedResult.failed("当前用户没有权限!");
+        }
+
+        // 修改检查单撤回申请状态
+        this.updateRevokeStatus(request.getId(), EApprovalState.WAITING);
+
+        List<CheckRevokePO> list = checkRevokeMapper.list4CheckRecord(request.getId());
+        // 已有待审核的撤回申请,返回成功
+        if (list.stream().anyMatch(c -> Objects.equals(c.getStatus(), EApprovalState.WAITING.getValue()))) {
+            return ExecutedResult.success();
+        }
+
+        // 添加申请记录
+        CheckRevokePO item = new CheckRevokePO();
+        item.setCheckRecordId(request.getId());
+        item.setGridId(find.getGridId());
+        item.setCheckFormId(find.getCheckFormId());
+        item.setCheckFormName(find.getCheckFormName());
+        // 申请人信息
+        item.setApplyUser(loginUser.getUserId().toString());
+        item.setApplyUserName(loginUser.getUsername());
+        // 创建时间
+        item.setCreateTime(LocalDateTimeUtil.nowTimeStamp());
+
+        int rowCount = checkRevokeMapper.insert(item);
+        if (rowCount != 1) {
+            return ExecutedResult.failed("检查单撤回申请失败");
+        }
+        return ExecutedResult.success();
+    }
+
+    // 检查单撤回审核
+    public ExecutedResult<String> revokeAudit(ReqAudit request) {
+        LoginUser loginUser = LoginHelper.getLoginUser();
+        if (Objects.isNull(loginUser)) {
+            throw new ServiceException("尚未登陆.", EResultCode.UNAUTHORIZED.getCode());
+        }
+        // 获取用户
+        SysUser user = userMapper.selectById(loginUser.getUserId());
+
+        // 校验是否存在
+        ExecutedResult<CheckRecordPO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        CheckRecordPO find = checkExists.getData();
+        // 检查单撤回状态,非待审核,返回成功
+        if (!Objects.equals(find.getRevokeStatus(), EApprovalState.WAITING.getValue())) {
+            return ExecutedResult.success();
+        }
+
+        // 查询网格管理的网格员
+        List<GridPersonPO> listPerson = gridPersonMapper.list4Grid(find.getGridId());
+        if (listPerson.stream().noneMatch(c -> Objects.equals(c.getUserGuid(), user.getUserGuid()))) {
+            return ExecutedResult.failed("当前用户没有权限!");
+        }
+
+        // 修改检查单撤回申请状态
+        this.updateRevokeStatus(request.getId(), EApprovalState.WAITING);
+
+        List<CheckRevokePO> list = checkRevokeMapper.list4CheckRecord(request.getId());
+        // 没有待审核的撤回申请,返回成功
+        if (list.stream().noneMatch(c -> Objects.equals(c.getStatus(), EApprovalState.WAITING.getValue()))) {
+            return ExecutedResult.success();
+        }
+
+        Long now = LocalDateTimeUtil.nowTimeStamp();
+        // 修改审核结果
+        List<CheckRevokePO> listRevoke = list.stream().map(c -> {
+            CheckRevokePO item = new CheckRevokePO();
+            item.setId(c.getId());
+            // 审核人信息
+            item.setAuditor(loginUser.getUserId().toString());
+            item.setAuditorName(loginUser.getUsername());
+            // 审核信息
+            item.setStatus(Objects.equals(request.getResult(), EAuditResult.PASS.getValue()) ? EApprovalState.PASSED.getValue() : EApprovalState.REFUSED.getValue());
+            item.setAuditComment(request.getComment());
+            item.setAuditTime(now);
+
+            return item;
+        }).collect(Collectors.toList());
+        boolean insertRevoke = checkRevokeMapper.update(listRevoke);
+        if (insertRevoke) {
+            return ExecutedResult.success();
+        }
+        return ExecutedResult.failed("检查单撤回申请失败");
+    }
 }

+ 20 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/model/LabelValueDto.java

@@ -0,0 +1,20 @@
+package com.customs.cq.datacenter.common.model;
+
+import lombok.Data;
+
+@Data
+public class LabelValueDto<T> {
+    /**
+     * 名称
+     */
+    private String label;
+    /**
+     * 值
+     */
+    private T value;
+
+    public LabelValueDto(String label, T value) {
+        this.label = label;
+        this.value = value;
+    }
+}

+ 1 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/model/ReqAudit.java

@@ -12,6 +12,7 @@ public class ReqAudit {
 
     /**
      * 审核结果 EAuditResult
+     * @required
      */
     private Integer result;
 

+ 1 - 0
secure-producting-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -6,6 +6,7 @@
 
     <resultMap type="SysUser" id="SysUserResult">
         <id property="userId" column="user_id"/>
+        <result property="userGuid" column="user_guid"/>
         <result property="deptId" column="dept_id"/>
         <result property="userName" column="user_name"/>
         <result property="nickName" column="nick_name"/>

+ 18 - 9
secure-producting-vue/src/api/form/DangerCheckRecord.js

@@ -26,15 +26,6 @@ export function submit(data) {
   })
 }
 
-// 编辑[隐患检查记录]
-export function modify(data) {
-  return request({
-    url: '/checkRecord/modify',
-    method: 'post',
-    data: data
-  })
-}
-
 // 我的隐患检查
 export function listMine(data) {
   return request({
@@ -52,3 +43,21 @@ export function listAdminMine(data) {
     data: data
   })
 }
+
+// 提交到网格管理员
+export function submitAdmin(id) {
+  return request({
+    url: '/checkRecord/submitAdmin/' + id,
+    method: 'post',
+    data: {}
+  })
+}
+
+// 检查单撤回申请
+export function revoke(data) {
+  return request({
+    url: '/checkRecord/revoke',
+    method: 'post',
+    data: data
+  })
+}

+ 184 - 226
secure-producting-vue/src/views/check/DangerCheckRecordMine.vue

@@ -142,22 +142,32 @@
       @selection-change="handleSelectionChange"
       @row-dblclick="handleDetail"
     >
-      <el-table-column label="检查时间" width="96" align="center" prop="checkTimeView">
+      <el-table-column label="任务日期" width="96" align="center" prop="createTimeView">
         <template #default="scope">
-          {{ parseTime(scope.row.checkTimeView, '{y}-{m}-{d}') }}
+          {{ parseTime(scope.row.createTimeView, '{y}-{m}-{d}') }}
         </template>
       </el-table-column>
-      <el-table-column label="状态" width="60" align="center" prop="status">
+      <el-table-column label="检查表" width="200" align="left" prop="checkFormName">
         <template #default="scope">
-          {{ getStatusTxt(scope.row.status) }}
+          {{ scope.row.gridName + " - " +  scope.row.checkFormName}}
         </template>
       </el-table-column>
-      <el-table-column label="检查单号" width="231" align="center" prop="checkFormNo" />
-      <el-table-column label="检查表名称" width="300" align="left" prop="checkFormName" />
-      <el-table-column label="所属部门" align="center" prop="departmentTxt" />
+      <el-table-column label="检查时间" width="158" align="center" prop="checkTimeView" />
+      <el-table-column label="状态" width="70" align="center" prop="statusTxt" />
+        <el-table-column label="撤回申请" width="80" prop="revokeStatusTxt">
+          <template #default="scope">
+            {{ scope.row.revokeStatus === 0 ? '-' : scope.row.revokeStatusTxt }}
+          </template>
+        </el-table-column>
+      <el-table-column label="检查单号" width="231" align="left" prop="checkFormNo" />
+      <el-table-column label="所属部门" width="320" align="left" prop="departmentTxt" />
       <el-table-column label="所属关区" align="center" prop="customsName" />
       <el-table-column label="检查人员" align="center" prop="checkPersonName" />
-      <el-table-column label="是否有隐患" width="89" align="center" prop="hasDangerTxt" />
+      <el-table-column label="是否有隐患" width="89" align="center" prop="hasDangerTxt">
+        <template #default="scope">
+          {{ scope.row.status === 0 ? '-' : scope.row.hasDangerTxt}}
+        </template>
+      </el-table-column>
       <el-table-column label="整改期限" width="96" align="center" prop="rectifyDeadlineView">
         <template #default="scope">
           {{ parseTime(scope.row.rectifyDeadlineView, '{y}-{m}-{d}') }}
@@ -165,23 +175,39 @@
       </el-table-column>
       <el-table-column
         label="操作"
-        align="center"
+        align="left"
         width="150"
         fixed="right"
         class-name="small-padding fixed-width"
       >
         <template #default="scope">
           <el-button
+            v-if="scope.row.status != 0"
             link
             type="primary"
             @click="handleDetail(scope.row)"
             >详情</el-button>
           <el-button
+            v-if="(scope.row.status === 20 && (scope.row.revokeStatus == 0 || scope.row.revokeStatus === 30))"
+            link
+            type="warning"
+            icon="View"
+            @click="onRevoke(scope.row)"
+          >撤回</el-button>
+          <el-button
+            v-if="scope.row.status === 0"
             link
             type="primary"
             icon="Edit"
-            @click="handleUpdate(scope.row)"
-            >修改</el-button>
+            @click="handleDoForm(scope.row)"
+          >填报</el-button>
+          <el-button
+            v-if="scope.row.status === 10"
+            link
+            type="danger"
+            icon="Promotion"
+            @click="onSubmitAdmin(scope.row.id)"
+          >提交</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -194,101 +220,69 @@
       @pagination="getList"
     />
 
-  <!-- 添加对话框 -->
-  <el-dialog
-    :title="title"
-    v-model="dialogOpenCreate"
-    width="750px"
-    append-to-body
-  >
-    <el-form
-      ref="formCrateRef"
-      :model="formCreate"
-      :rules="rulesCreate"
-      label-width="135px"
+    <!-- 提交检查单/检查单详情模态框 -->
+    <el-dialog
+      :title="titleSubmit"
+      v-model="showSubmitCheck"
+      width="900px"
+      append-to-body
     >
-      <el-form-item label="分类名称" prop="categoryName">
-        <el-input v-model="formCreate.categoryName" placeholder="请输入分类名称" />
-      </el-form-item>
-      <el-form-item label="检查频率" prop="checkCycle">
-        <el-select
-          v-model="formCreate.checkCycle"
-          placeholder="请选择"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="item in checkCycleList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="描述" prop="description">
-        <el-input v-model="formCreate.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入描述" />
-      </el-form-item>
-    </el-form>
-    <template #footer>
+      <!-- 设置对话框内容高度 -->
+      <div style="height:70vh;">
+        <el-scrollbar>
+          <submit-danger-check
+            ref="refSubmitCheck"
+            v-if="showSubmitCheck"
+            :checkRecordId="submitItem.id"
+            :checkFormNo="submitItem.checkFormNo"
+            :isSubmit="isSubmit"
+            :showDetail="showDetail"
+            @closeCallback="submitCallBack"
+          ></submit-danger-check>
+        </el-scrollbar>
+      </div>
+      <template #footer>
       <div class="dialog-footer">
         <el-button
-          :loading="createLoading"
+          v-if="!showDetail"
+          :loading="loadingSubmitCheck"
           type="primary"
-          @click="submitCreate"
-          >确 定</el-button>
-        <el-button @click="cancelCreate">取 消</el-button>
+          @click="submitCheck"
+        >提 交</el-button>
+        <el-button @click="showSubmitCheck = false">取 消</el-button>
       </div>
-    </template>
-  </el-dialog>
-
-  <!-- 修改对话框 -->
-  <el-dialog
-    :title="title"
-    v-model="dialogOpenModify"
-    width="750px"
-    append-to-body
-  >
-    <el-form
-      :disabled="isDetail"
-      ref="formModifyRef"
-      :model="formModify"
-      :rules="rulesModify"
-      label-width="135px"
+      </template>
+    </el-dialog>
+
+    <!-- 撤回申请模态框 -->
+    <el-dialog
+      :title="titleRevoke"
+      v-model="showRevoke"
+      width="900px"
+      append-to-body
     >
-      <el-form-item label="分类名称" prop="categoryName">
-        <el-input v-model="formModify.id" type="hidden" />
-        <el-input v-model="formModify.categoryName" placeholder="请输入分类名称" />
-      </el-form-item>
-      <el-form-item label="检查频率" prop="checkCycle">
-        <el-select
-          v-model="formModify.checkCycle"
-          placeholder="请选择"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="item in checkCycleList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="描述" prop="description">
-        <el-input v-model="formModify.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入描述" />
-      </el-form-item>
-    </el-form>
-    <template #footer>
+      <el-form
+        ref="refFormRevoke"
+        :model="formRevoke"
+        :rules="rulesRevoke"
+        label-width="85px"
+      >
+        <el-form-item label="撤回理由" prop="comment">          
+          <el-input v-model="formRevoke.id" type="hidden" />
+          <el-input v-model="formRevoke.comment" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
       <div class="dialog-footer">
         <el-button
-          v-if="isDetail === false"
-          :loading="modifyLoading"
+          :loading="loadingRevoke"
           type="primary"
-          @click="submitModify"
-          >确 定</el-button>
-        <el-button @click="cancelModify">{{cancelModifyTxt}}</el-button>
-        <el-button type="primary" v-if="isDetail" @click="changeModify">编 辑</el-button>
+          @click="revokeSubmit"
+        >提 交</el-button>
+        <el-button @click="showRevoke = false">取 消</el-button>
       </div>
-    </template>
-  </el-dialog>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -298,9 +292,10 @@ import { listAllGridCategory } from "@/api/grid/GridCategory";
 import { listAllDangerCategory } from "@/api/danger/DangerCategory";
 import { listEnumValue } from "@/api/system/base"
 import {
-  submit, detail, modify, listMine, listAdminMine
+  submit, detail, listMine, listAdminMine, revoke
 } from "@/api/form/DangerCheckRecord";
 import { parseTime } from "@/utils/ruoyi"
+import SubmitDangerCheck from '@/views/grid/components/SubmitDangerCheck';
 
 const { proxy } = getCurrentInstance();
 
@@ -312,20 +307,36 @@ const dangerCategoryList = ref([]);
 const checkFormStatusList = ref([]);
 const dataList = ref([]);
 
-const createLoading = ref(false);
-const dialogOpenCreate = ref(false);
 
-const modifyLoading = ref(false);
-const dialogOpenModify = ref(false);
+const showSubmitCheck = ref(false);
+const submitItem = ref({});
+const loadingSubmitCheck = ref(false);
+const titleSubmit = ref('');
+const showDetail = ref(false);
+const isSubmit = ref(true);
+
+
+
+const titleRevoke = ref('');
+const showRevoke = ref(false);
+const loadingRevoke = ref(false);
+const formRevoke = ref({
+  id: undefined,
+  comment: undefined
+});
+const rulesRevoke = ref({
+  comment: [
+    { required: true, message: "撤回说明不能为空", trigger: "blur" },
+    { max: 500, message: '撤回说明字符长度不能超过500', trigger: 'blur' }
+  ]
+});
+
 
 const total = ref(0);
 const dateRangeCheckTime = ref([]);
 const ids = ref([]);
 const single = ref(true);
 const multiple = ref(true);
-const title = ref("");
-const cancelModifyTxt = ref("取 消");
-const isDetail = ref(false);
 
 const queryParams = ref({
   page: 1,
@@ -340,24 +351,6 @@ const queryParams = ref({
   hasDanger: undefined
 });
 
-const formCreate = ref({});
-const rulesCreate = ref({
-  categoryName: [
-    { required: true, message: "分类名称不能为空", trigger: "blur" },
-    { max: 100, message: '分类名称字符长度不能超过100', trigger: 'blur' }
-  ],
-  description: [{ max: 200, message: '分类描述字符长度不能超过200', trigger: 'blur' }],
-});
-
-const formModify = ref({});
-const rulesModify = ref({
-  categoryName: [
-    { required: true, message: "分类名称不能为空", trigger: "blur" },
-    { max: 100, message: '分类名称字符长度不能超过1200', trigger: 'blur' }
-  ],
-  description: [{ max: 200, message: '分类描述字符长度不能超过500', trigger: 'blur' }],
-});
-
 
 
 /** 查询列表 */
@@ -398,122 +391,87 @@ function handleSelectionChange(selection) {
   single.value = selection.length != 1;
   multiple.value = !selection.length;
 }
-/** 取消新增按钮 */
-function cancelCreate() {
-  dialogOpenCreate.value = false;
-  resetCreate();
-}
-/** 新增表单重置 */
-function resetCreate() {
-  formCreate.value = {
-    categoryName: undefined,
-    description: undefined,
-  };
-  proxy.resetForm("formCrateRef");
+
+/** 详情按钮 */
+function handleDetail(row) {
+  submitItem.value = row;
+  isSubmit.value = false;
+  showSubmitCheck.value = true;
+  showDetail.value = true;
+  titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;
 }
-/** 新增按钮 */
-function handleAdd() {
-  resetCreate();
-  dialogOpenCreate.value = true;
-  title.value = "提交隐患检查";
+
+
+
+/** 指定网格-填报 */
+function handleDoForm(row) {
+  if (row.checkFormId === 0) {
+    proxy.$modal.msgError("当前网格没有配置检查表!");
+    return;
+  }
+  submitItem.value = row;
+  isSubmit.value = true;
+  showSubmitCheck.value = true;
+  showDetail.value = false;
+  titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;
 }
-/** 新增提交 */
-function submitCreate() {
-  proxy.$refs["formCrateRef"].validate((valid) => {
-    if (valid) {
-      createLoading.value = true;
-
-      create(formCreate.value)
-        .then((response) => {
-          proxy.$modal.msgSuccess("提交成功");
-          dialogOpenCreate.value = false;
-          getList();
-        })
-        .finally(() => {
-          createLoading.value = false;
-        });
-    }
-  });
+
+function submitCheck() {
+  // 调用子组件的函数
+  proxy.$refs.refSubmitCheck.submitCheck();
 }
-/** 取消编辑按钮 */
-function cancelModify() {
-  dialogOpenModify.value = false;
-  resetModify();
+
+function submitCallBack() {
+  showSubmitCheck.value = false;
+  getList();
 }
-/** 编辑表单重置 */
-function resetModify() {
-  formModify.value = {
-    id: undefined,
-    categoryName: undefined,
-    description: undefined,
+
+
+
+/** 隐患检查单-撤回-按钮 */
+function onRevoke(row) {
+  formRevoke.value = {
+    id: row.id,
+    comment: undefined
   };
-  proxy.resetForm("formModifyRef");
-}
-/** 详情按钮 */
-function handleDetail(row) {
-  modifyLoading.value = true;
-  resetModify();
-  const id = row.id || ids.value[0];
-  detail(id).then((response) => {
-    isDetail.value = true;
-    modifyLoading.value = false;
-
-    formModify.value = response.data;
-    formModify.value.checkCycle = formModify.value.checkCycle + '';
-
-    dialogOpenModify.value = true;
-    title.value = "隐患检查单";
-    cancelModifyTxt.value = '关 闭';
-  });
-}
-/** 详情编辑 */
-function changeModify() {
-  isDetail.value = false;
-  title.value = "修改隐患检查单";
+  
+  showRevoke.value = true;
+  titleRevoke.value = '检查单撤回 - ' + row.checkFormNo;
 }
-/** 修改按钮 */
-function handleUpdate(row) {
-  modifyLoading.value = true;
-  resetModify();
-  const id = row.id || ids.value[0];
-  detail(id).then((response) => {
-    isDetail.value = false;
-    modifyLoading.value = false;
-
-    formModify.value = response.data;
-    formModify.value.checkCycle = formModify.value.checkCycle + '';
-
-    dialogOpenModify.value = true;
-    title.value = "修改隐患检查单";
-    cancelModifyTxt.value = '取 消';
-  });
-}
-/** 修改提交 */
-function submitModify() {
-  proxy.$refs["formModifyRef"].validate((valid) => {
+/** 隐患检查单-撤回-提交 */
+function revokeSubmit() {  
+  proxy.$refs["refFormRevoke"].validate((valid) => {
     if (valid) {
-      modifyLoading.value = true;
-
-      modify(formModify.value)
-        .then((response) => {
-          proxy.$modal.msgSuccess("修改成功");
-          dialogOpenModify.value = false;
-          getList();
-        })
-        .finally(() => {
-          modifyLoading.value = false;
-        });
+      loadingRevoke.value = true;
+      revoke(formRevoke.value).then((response) => {
+        getList();
+      })
+      .finally(() => {
+        showRevoke.value = false;
+        loadingRevoke.value = false;
+      });
     }
   });
 }
 
 
-function getStatusTxt(status) {
-  let find = checkFormStatusList.value.find(c => parseInt(c.value) === status);
-  if (find) {
-    return find.label;
-  }
-  return '未知';
+
+/** 隐患检查单,提交到网格管理员 */
+function onSubmitAdmin(id) {  
+  proxy.$modal.confirm('确认要提交到网格管理员吗?')
+  .then(() => {
+    submitAdmin(id).then((response) => {
+      getList();
+    })
+    .finally(() => {
+      //createLoading.value = false;
+    });
+  })
+  .catch((action) => {
+    if (action === 'cancel') {
+    proxy.$modal.msg('取消操作');
+    }
+  });
 }
 
 

+ 147 - 28
secure-producting-vue/src/views/grid/components/MyGridAndCheck.vue

@@ -1,22 +1,32 @@
 <template>
   <div class="app-container">
     <el-card shadow="hover" header="今日隐患检查" style="margin-bottom: 5px">
-      <el-table :data="listMineGrid" stripe style="width: 100%" empty-text="当期帐号没有网格归属,请联系管理员!">
-        <el-table-column prop="checkFormName" label="检查表信息" :show-overflow-tooltip="true">
+      <el-table :data="listMineGrid" stripe style="width: 100%" empty-text="当前帐号没有待检检查表!">
+        <el-table-column label="检查单号" width="210" prop="checkFormNo" />
+        <el-table-column label="网格" width="100" prop="gridName" />
+        <el-table-column label="检查表" width="140" prop="checkFormName" :show-overflow-tooltip="true" />
+        <el-table-column label="状态" width="70" prop="statusTxt" />
+        <el-table-column label="撤回申请" width="80" prop="revokeStatusTxt">
           <template #default="scope">
-            {{ scope.row.gridName + ' - ' + scope.row.checkFormName }}
+            {{ scope.row.revokeStatus === 0 ? '-' : scope.row.revokeStatusTxt }}
           </template>
         </el-table-column>
-        <el-table-column prop="statusTxt" label="状态" />
-        <el-table-column label="操作">
-          <template #default="scope">                                
+        <el-table-column label="操作" width="145">
+          <template #default="scope">
             <el-button
-              v-if="scope.row.status === 1"
+              v-if="scope.row.status != 0"
               link
-              type="primary"
+              type="info"
               icon="View"
               @click="handleDetail(scope.row)"
             >查看</el-button>
+            <el-button
+              v-if="(scope.row.status === 20 && (scope.row.revokeStatus == 0 || scope.row.revokeStatus === 30))"
+              link
+              type="warning"
+              icon="View"
+              @click="onRevoke(scope.row)"
+            >撤回</el-button>
             <el-button
               v-if="scope.row.status === 0"
               link
@@ -24,39 +34,78 @@
               icon="Edit"
               @click="handleDoForm(scope.row)"
             >填报</el-button>
+            <el-button
+              v-if="scope.row.status === 10"
+              link
+              type="danger"
+              icon="Promotion"
+              @click="onSubmitAdmin(scope.row.id)"
+            >提交</el-button>
           </template>
         </el-table-column>
       </el-table>
     </el-card>
 
-    <!-- 提交检查表模态框 -->
+    <!-- 提交检查单/检查单详情模态框 -->
     <el-dialog
-      title="隐患检查表"
+      :title="titleSubmit"
       v-model="showSubmitCheck"
       width="900px"
       append-to-body
     >
       <!-- 设置对话框内容高度 -->
       <div style="height:70vh;">
-          <el-scrollbar>
-            <submit-danger-check
-              ref="refSubmitCheck"
-              v-if="showSubmitCheck"
-              :gridId="submitItem.gridId"
-              :checkFormId="submitItem.checkFormId"
-              :checkFormName="submitItem.checkFormName"
-              @closeCallback="submitCallBack"
-            ></submit-danger-check>
-          </el-scrollbar>
-        </div>
+        <el-scrollbar>
+          <submit-danger-check
+            ref="refSubmitCheck"
+            v-if="showSubmitCheck"
+            :checkRecordId="submitItem.id"
+            :checkFormNo="submitItem.checkFormNo"
+            :isSubmit="isSubmit"
+            :showDetail="showDetail"
+            @closeCallback="submitCallBack"
+          ></submit-danger-check>
+        </el-scrollbar>
+      </div>
       <template #footer>
       <div class="dialog-footer">
-          <el-button
-            :loading="loadingSubmitCheck"
-            type="primary"
-            @click="submitCheck"
-          >提 交</el-button>
-          <el-button @click="showSubmitCheck = false">取 消</el-button>
+        <el-button
+          v-if="!showDetail"
+          :loading="loadingSubmitCheck"
+          type="primary"
+          @click="submitCheck"
+        >提 交</el-button>
+        <el-button @click="showSubmitCheck = false">取 消</el-button>
+      </div>
+      </template>
+    </el-dialog>
+
+    <!-- 撤回申请模态框 -->
+    <el-dialog
+      :title="titleRevoke"
+      v-model="showRevoke"
+      width="900px"
+      append-to-body
+    >
+      <el-form
+        ref="refFormRevoke"
+        :model="formRevoke"
+        :rules="rulesRevoke"
+        label-width="85px"
+      >
+        <el-form-item label="撤回理由" prop="comment">          
+          <el-input v-model="formRevoke.id" type="hidden" />
+          <el-input v-model="formRevoke.comment" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+      <div class="dialog-footer">
+        <el-button
+          :loading="loadingRevoke"
+          type="primary"
+          @click="revokeSubmit"
+        >提 交</el-button>
+        <el-button @click="showRevoke = false">取 消</el-button>
       </div>
       </template>
     </el-dialog>
@@ -65,6 +114,7 @@
 
 <script setup name="MyGridAndCheck">
 import { listMine } from '@/api/grid/GridIndex';
+import { submitAdmin, revoke } from '@/api/form/DangerCheckRecord';
 import SubmitDangerCheck from '@/views/grid/components/SubmitDangerCheck';
 
 const { proxy } = getCurrentInstance();
@@ -73,6 +123,24 @@ const listMineGrid = ref([]);
 const showSubmitCheck = ref(false);
 const submitItem = ref({});
 const loadingSubmitCheck = ref(false);
+const titleSubmit = ref('');
+const showDetail = ref(false);
+const isSubmit = ref(true);
+
+
+const titleRevoke = ref('');
+const showRevoke = ref(false);
+const loadingRevoke = ref(false);
+const formRevoke = ref({
+  id: undefined,
+  comment: undefined
+});
+const rulesRevoke = ref({
+  comment: [
+    { required: true, message: "撤回说明不能为空", trigger: "blur" },
+    { max: 500, message: '撤回说明字符长度不能超过500', trigger: 'blur' }
+  ]
+});
 
 /** 获取当前登录用户的网格和今日填报情况 */
 function getListPerson() {
@@ -84,8 +152,38 @@ function getListPerson() {
   });;
 }
 
-/** 指定网格-今日填报详情 */
+/** 隐患检查单-填报详情 */
 function handleDetail(row) {
+  isSubmit.value = true;
+  submitItem.value = row;
+  showSubmitCheck.value = true;
+  showDetail.value = true;
+  titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;
+}
+/** 隐患检查单-撤回-按钮 */
+function onRevoke(row) {
+  formRevoke.value = {
+    id: row.id,
+    comment: undefined
+  };
+  
+  showRevoke.value = true;
+  titleRevoke.value = '检查单撤回 - ' + row.checkFormNo;
+}
+/** 隐患检查单-撤回-提交 */
+function revokeSubmit() {  
+  proxy.$refs["refFormRevoke"].validate((valid) => {
+    if (valid) {
+      loadingRevoke.value = true;
+      revoke(formRevoke.value).then((response) => {
+        getListPerson();
+      })
+      .finally(() => {
+        showRevoke.value = false;
+        loadingRevoke.value = false;
+      });
+    }
+  });
 }
 
 /** 指定网格-填报 */
@@ -95,7 +193,10 @@ function handleDoForm(row) {
     return;
   }
   submitItem.value = row;
+  isSubmit.value = true;
   showSubmitCheck.value = true;
+  showDetail.value = false;
+  titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;
 }
 
 function submitCheck() {
@@ -108,5 +209,23 @@ function submitCallBack() {
   getListPerson();
 }
 
+/** 隐患检查单,提交到网格管理员 */
+function onSubmitAdmin(id) {  
+  proxy.$modal.confirm('确认要提交到网格管理员吗?')
+  .then(() => {
+    submitAdmin(id).then((response) => {
+      getListPerson();
+    })
+    .finally(() => {
+      //createLoading.value = false;
+    });
+  })
+  .catch((action) => {
+    if (action === 'cancel') {
+    proxy.$modal.msg('取消操作');
+    }
+  });
+}
+
 getListPerson();
 </script>

+ 32 - 35
secure-producting-vue/src/views/grid/components/SubmitDangerCheck.vue

@@ -4,11 +4,12 @@
       ref="refFormSubmit"
       :model="formSubmit"
       :rules="rulesSubmit"
+      :disabled="props.showDetail"
       label-width="135px"
     >
       <el-form-item label="检查表名称" prop="categoryName">
         <el-input v-model="formSubmit.id" type="hidden" />
-        {{ checkFormName }}
+        {{ formDetail.checkFormName }}
       </el-form-item>
       <el-form-item label="关区代码" prop="customs">
         <span class="form-line-left">
@@ -42,7 +43,7 @@
       </el-form-item>
       <div class="check-container">
         <el-row class="check-title">
-          <el-col :md="24" class="check-col">{{ checkFormName }}</el-col>
+          <el-col :md="24" class="check-col">{{ formDetail.checkFormName }}</el-col>
         </el-row>
         <el-row class="check-title">
           <el-col :md="2" class="check-col">序号</el-col>
@@ -66,7 +67,7 @@
             <span v-if="(item.checkResult === 1 && item.isRectify === 0)" @click="submitRectify(item)" class="opt opt-wait" title="有隐患,需要填写整改措施">待</span>
             <span>{{ item.itemName }}</span>
             </el-col>
-          <el-col :md="8" class="check-col check-item-desc" :title="item.description">{{ item.description }}</el-col>
+          <el-col :md="8" class="check-col check-item-desc" :title="item.itemDescription">{{ item.itemDescription }}</el-col>
         </el-row>
       </div>
       <el-form-item label="提交至网格管理员" prop="isSubmit">
@@ -112,7 +113,7 @@
         ref="refFormCheckItemRectify"
         :model="formCheckItemRectify"
         :rules="rulesCheckItemRectify"
-        :disabled="isDetail"
+        :disabled="props.showDetail"
         label-width="85px"
       >
         <el-form-item label="检查项" prop="itemName">
@@ -136,11 +137,12 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-            <el-button
-              type="primary"
-              @click="submitCheckItemRectify"
-            >提 交</el-button>
-            <el-button @click="dialogCheckItemRectify = false">取 消</el-button>
+          <el-button
+            v-if="!props.showDetail"
+            type="primary"
+            @click="submitCheckItemRectify"
+          >保 存</el-button>
+          <el-button @click="dialogCheckItemRectify = false">取 消</el-button>
         </div>
       </template>
     </el-dialog>
@@ -166,28 +168,31 @@
 import { getUserProfile } from '@/api/system/user.js';
 import { getToken } from '@/utils/auth';
 import { listMine } from '@/api/grid/GridIndex';
-import { detail } from "@/api/form/DangerCheckForm";
-import { submit } from "@/api/form/DangerCheckRecord";
+import { submit, detail } from "@/api/form/DangerCheckRecord";
 import { parseTime } from '@/utils/ruoyi'
 import { getDicts } from '@/api/system/dict/data'
 
 const { proxy } = getCurrentInstance();
 
 const props = defineProps({
-    // 网格id
-    gridId: {
+    // 隐患检查单id
+    checkRecordId: {
         type: String,
         default: '',
     },
-    // 隐患检查表id
-    checkFormId: {
+    checkFormNo: {
         type: String,
         default: '',
     },
-    // 隐患检查表名称
-    checkFormName: {
-        type: String,
-        default: '',
+    // 是否是填报
+    isSubmit: {
+      type: Boolean,
+      default: false
+    },
+    // 是否是查看详情
+    showDetail: {
+      type: Boolean,
+      default: false
     }
 });
 
@@ -211,8 +216,7 @@ const formDetail = ref({});
 
 const loadingSubmit = ref(false);
 const formSubmit = ref({
-  gridId: props.gridId,
-  checkFormId: props.checkFormId,
+  id: props.checkRecordId,
   customs: undefined,
   checkTime: parseTime(new Date(), '{y}-{m}-{d}'),
   checkPersonName: '',
@@ -245,7 +249,6 @@ const rulesCheckItemRectify = ref({
 });
 const dialogCheckItemRectify = ref(false);
 const titleCheckItemRectify = ref('');
-const isDetail = ref(false);
 
 
 
@@ -280,12 +283,11 @@ function onSubmitUploadExceed(files) {
 function onSubmitUploadRemove(item) {
   console.log('移除文件: ' + JSON.stringify(item));
 }
-/** 检查项存在隐患,填写整改措施 */
+/** 检查项存在隐患,填写整改措施 */
 function submitRectify(item) {
   formCheckItemRectify.value = item;
   titleCheckItemRectify.value = item.itemName + ' - 整改措施方案';
   dialogCheckItemRectify.value = true;
-  isDetail.value = false;
 }
 function submitCheckItemRectify() {
   proxy.$refs["refFormCheckItemRectify"].validate((valid) => {
@@ -303,13 +305,9 @@ function showRectify(item) {
   formCheckItemRectify.value = item;
   titleCheckItemRectify.value = item.itemName + ' - 整改措施方案';
   dialogCheckItemRectify.value = true;
-  //isDetail.value = true;
 }
 /** 提交检查表 */
 function submitCheck() {
-  let that = this;
-
-  console.log(formSubmit.value);
   proxy.$refs["refFormSubmit"].validate((valid) => {
     if (valid) {
       loadingSubmit.value = true;
@@ -350,19 +348,18 @@ function initListDictData() {
 }
 /** 检查表详情 */
 function getFormDetail() {
-  detail(props.checkFormId)
+  detail(props.checkRecordId)
   .then((response) => {
     formDetail.value = response.data;
     for (let index = 0; index < response.data.listItem.length; index++) {
       let item = response.data.listItem[index];
       let value = {...item};
-      value.checkFormId = props.checkFormId;
       //value.itemName = '';
-      //value.description = '';
-      value.checkResult = undefined;
-      value.isRectify = 0;
-      value.rectifyPlan = '';
-      value.rectifyDeadline = 0;
+      //value.itemDescription = '';
+      value.isRectify = (item.rectifyPlan && item.rectifyPlan != null && item.rectifyPlan != '') ? 1 : 0;
+      if (props.isSubmit) {
+        value.checkResult = undefined;
+      }
       formSubmit.value.listItem.push(value);
     }
   });

+ 4 - 0
sql/20240814.sql

@@ -350,6 +350,7 @@ CREATE TABLE "SECURE_PRODUCTING"."SP_CHECK_RECORD"(
   "RECTIFY_SUBMIT_TIME" BIGINT NOT NULL DEFAULT 0,
   "RECTIFY_DEADLINE" BIGINT NOT NULL DEFAULT 0,
   "STATUS" TINYINT NOT NULL DEFAULT 0,
+  "REVOKE_STATUS" TINYINT NOT NULL DEFAULT 0,
   "REMARK" VARCHAR(500) NOT NULL DEFAULT '',
   "CREATE_TIME" BIGINT NOT NULL DEFAULT 0,
   "UPDATE_TIME" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(),
@@ -396,6 +397,7 @@ COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."HAS_RECTIFY_PLAN" IS '
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."RECTIFY_SUBMIT_TIME" IS '整改措施提交时间';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."RECTIFY_DEADLINE" IS '整改期限';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."STATUS" IS '状态 ECheckFormStatus';
+COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."REVOKE_STATUS" IS '撤回申请状态 EApprovalState';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."REMARK" IS '备注';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."CREATE_TIME" IS '数据创建时间';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD"."UPDATE_TIME" IS '最后更新时间';
@@ -421,6 +423,7 @@ CREATE TABLE "SECURE_PRODUCTING"."SP_CHECK_RECORD_ITEM"(
   "CUSTOMS" VARCHAR(50) NOT NULL DEFAULT '',
   "CUSTOMS_NAME" VARCHAR(200) NOT NULL DEFAULT '',
   "ITEM_NAME" VARCHAR(200) NOT NULL DEFAULT '',
+  "ITEM_DESCRIPTION" VARCHAR(500) NOT NULL DEFAULT '',
   "CHECK_TIME" BIGINT NOT NULL DEFAULT 0,
   "CHECK_PERSON" VARCHAR(50) NOT NULL DEFAULT '',
   "CHECK_RESULT" TINYINT NOT NULL DEFAULT 0,
@@ -461,6 +464,7 @@ COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."DEPARTMENT_NAME"
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."CUSTOMS" IS '所属关区';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."CUSTOMS_NAME" IS '关区名称';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."ITEM_NAME" IS '检查项';
+COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."ITEM_DESCRIPTION" IS '检查项描述';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."CHECK_TIME" IS '检查时间';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."CHECK_PERSON" IS '检查人员';
 COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_CHECK_RECORD_ITEM"."CHECK_RESULT" IS '检查结果 ECheckResult';