Jelajahi Sumber

提交隐患检查单

lin.liu 2 minggu lalu
induk
melakukan
7cdb9117ea
29 mengubah file dengan 1570 tambahan dan 88 penghapusan
  1. 14 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/GridInfoController.java
  2. 38 5
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/CheckRecordVO.java
  3. 4 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/Demo001.java
  4. 24 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResListGrid4User.java
  5. 46 12
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchCheckRecord.java
  6. 50 8
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordMapperImpl.java
  7. 11 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/DangerCheckFormMapperImpl.java
  8. 6 6
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/GridInfoMapperImpl.java
  9. 8 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/GridPersonMapperImpl.java
  10. 45 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordService.java
  11. 3 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/GridInfoService.java
  12. 1 1
      secure-producting-host/src/main/java/com/customs/cq/datacenter/host/web/controller/system/SysUserController.java
  13. 116 0
      secure-producting-host/src/test/resources/application-dev.yml
  14. 240 0
      secure-producting-host/src/test/resources/application.yml
  15. 8 0
      secure-producting-host/src/test/resources/banner.txt
  16. 48 0
      secure-producting-host/src/test/resources/h4a-config.xml
  17. TEMPAT SAMPAH
      secure-producting-host/src/test/resources/ip2region.xdb
  18. 129 0
      secure-producting-host/src/test/resources/logback-plus.xml
  19. 26 0
      secure-producting-host/src/test/resources/sdk-config.xml
  20. 32 0
      secure-producting-host/src/test/resources/smart-doc.json
  21. 28 0
      secure-producting-host/src/test/resources/spy.properties
  22. 33 0
      secure-producting-host/src/test/resources/upload_allow.json
  23. 3 3
      secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/SysDeptMapper.java
  24. 3 1
      secure-producting-system/src/main/java/com/customs/cq/datacenter/system/service/impl/SysUserServiceImpl.java
  25. 36 0
      secure-producting-vue/src/api/form/DangerCheckRecord.js
  26. 15 0
      secure-producting-vue/src/router/index.js
  27. 537 0
      secure-producting-vue/src/views/form/DangerCheckRecord.vue
  28. 58 44
      secure-producting-vue/src/views/index.vue
  29. 8 8
      sql/20240814.sql

+ 14 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/GridInfoController.java

@@ -27,11 +27,14 @@ import com.customs.cq.datacenter.business.domain.vo.GridPersonVO;
 import com.customs.cq.datacenter.business.entity.request.gridinfo.ReqCreateGridInfo;
 import com.customs.cq.datacenter.business.entity.request.gridinfo.ReqModifyGridInfo;
 import com.customs.cq.datacenter.business.entity.request.gridinfo.ReqSetListPerson;
+import com.customs.cq.datacenter.business.entity.response.check.ResListGrid4User;
 import com.customs.cq.datacenter.business.entity.search.SearchGridInfo;
+import com.customs.cq.datacenter.business.service.CheckRecordService;
 import com.customs.cq.datacenter.business.service.GridInfoService;
 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.helper.LoginHelper;
 import com.customs.cq.datacenter.common.model.ReqListId;
 import com.customs.cq.datacenter.common.utils.ParameterUtil;
 import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
@@ -52,6 +55,8 @@ import java.util.List;
 public class GridInfoController extends BasicController {
     @Autowired
     private GridInfoService service;
+    @Autowired
+    private CheckRecordService checkRecordService;
 
     /**
      * 创建[网格信息]
@@ -160,4 +165,13 @@ public class GridInfoController extends BasicController {
     public ExecutedResult<List<GridPersonVO>> getListPerson(@PathVariable Long id) {
         return this.service.getListPerson(id);
     }
+
+    /**
+     * 获取当前登录用户的所属网格列表
+     * @author lin.liu
+     */
+    @GetMapping(value = "listMine")
+    public ExecutedResult<List<ResListGrid4User>> getListMine() {
+        return checkRecordService.listGrid4User(LoginHelper.getLoginUser().getUserId());
+    }
 }

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

@@ -22,14 +22,15 @@
 */
 package com.customs.cq.datacenter.business.domain.vo;
 
-import lombok.Data;
-
+import com.customs.cq.datacenter.business.domain.CheckRecordPO;
+import com.customs.cq.datacenter.common.core.vo.BasicVO;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
-import java.util.Objects;
+import com.customs.cq.datacenter.common.utils.StringUtil;
+import lombok.Data;
 
-import com.customs.cq.datacenter.common.core.vo.BasicVO;
-import com.customs.cq.datacenter.business.domain.CheckRecordPO;
+import java.util.Objects;
 
 /**
  * 隐患检查记录
@@ -54,4 +55,36 @@ public class CheckRecordVO extends CheckRecordPO implements BasicVO {
         }
         return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime());
     }
+
+    public String getCheckTimeView() {
+        if (NumericUtil.tryParseLong(this.getCheckTime()).compareTo(0L) > 0) {
+            return LocalDateTimeUtil.toFormatString(this.getCheckTime());
+        }
+        return "";
+    }
+
+    public String getRectifySubmitTimeView() {
+        if (NumericUtil.tryParseLong(this.getRectifySubmitTime()).compareTo(0L) > 0) {
+            return LocalDateTimeUtil.toFormatString(this.getRectifySubmitTime());
+        }
+        return "";
+    }
+
+    public String getRectifyDeadlineView() {
+        if (NumericUtil.tryParseLong(this.getRectifyDeadline()).compareTo(0L) > 0) {
+            return LocalDateTimeUtil.toFormatString(this.getRectifyDeadline());
+        }
+        return "";
+    }
+
+    public String getDepartmentTxt() {
+        if (StringUtil.isNullOrEmpty(this.getDepartmentName())) {
+            return "";
+        }
+        return this.getDepartmentName().replaceAll("\\#", "").replaceAll("\\,", "/");
+    }
+
+    public String getHasDangerTxt() {
+        return EYesOrNo.getByValue(this.getHasDanger()).getDesc();
+    }
 }

+ 4 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/Demo001.java

@@ -0,0 +1,4 @@
+package com.customs.cq.datacenter.business.entity.response;
+
+public class Demo001 {
+}

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

@@ -0,0 +1,24 @@
+package com.customs.cq.datacenter.business.entity.response.check;
+
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import lombok.Data;
+
+import java.util.Objects;
+
+@Data
+public class ResListGrid4User {
+    private Long gridId;
+    private String gridName;
+    private Long checkFormId;
+    private String checkFormName;
+    private Integer checkStatus;
+
+    public String getCheckStatusTxt() {
+        EYesOrNo status = EYesOrNo.getByValue(this.getCheckStatus());
+        String txt = "未填报";
+        if (Objects.equals(this.checkStatus, EYesOrNo.YES.getValue())) {
+            txt = "已填报";
+        }
+        return txt;
+    }
+}

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

@@ -1,23 +1,57 @@
 package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+import lombok.Data;
+
+import java.util.List;
 
 /**
  * 隐患检查记录
  * @author lin.liu
  * @description 隐患检查记录
  */
+@Data
 public class SearchCheckRecord extends SearchBasicDTO {
-	@Override
-	public String toString() {
-		return "SearchCheckRecord{" + "'" +
-			"keywords='" + getKeywords() +
-			", status =" + getStatus() +
-			", listStatus =" + getListStatus() +
-			", createTimeRange='" + getCreateTimeRange() + "'" +
-			", createTimeStart =" + getCreateTimeEnd() +
-			", createTimeEnd =" + getCreateTimeEnd() +
-			", orderBy='" + getOrderBy() + "'" +
-		'}';
-	}
+	/**
+	 * 检查单号
+	 */
+	private String checkFormNo;
+	/**
+	 * 网格类型
+	 */
+	private List<Long> ListGridCategory;
+	/**
+	 * 隐患分类
+	 */
+	private List<Long> listDangerCategory;
+	/**
+	 * 所属部门
+	 */
+	private List<String> listDepartment;
+	/**
+	 * 关区代码
+	 */
+	private String customs;
+	/**
+	 * 检查时间-范围(eg: 2021-01-01 00:00:00 ~ 2021-01-01 23:59:59)"
+	 */
+	private String checkTimeRange;
+	/**
+	 * 检查时间-起始
+	 * @ignore
+	 */
+	private Long checkTimeStart;
+	/**
+	 * 检查时间-截止
+	 * @ignore
+	 */
+	private Long checkTimeEnd;
+	/**
+	 * 检查人员
+	 */
+	private String checkPerson;
+	/**
+	 * 是否有隐患 EYesOrNo
+	 */
+	private Integer hasDanger;
 }

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

@@ -3,18 +3,24 @@ 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.GridPersonPO;
 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.LocalDateTimeUtil;
 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.StringUtil;
 import org.springframework.stereotype.Repository;
 import com.customs.cq.datacenter.business.entity.search.SearchCheckRecord;
 import com.customs.cq.datacenter.business.domain.CheckRecordPO;
 import com.customs.cq.datacenter.business.mapper.CheckRecordMapper;
 
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * 隐患检查记录
  * @author lin.liu
@@ -40,20 +46,46 @@ public class CheckRecordMapperImpl extends BasicMapper<CheckRecordPO> {
         // 状态非逻辑删除
         queryWrapper.eq(CheckRecordPO::getIsDelete, EYesOrNo.NO.getValue());
         // 状态
-        //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, CheckRecordPO::getState, search.getStatus());
+        queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, CheckRecordPO::getStatus, search.getStatus());
         // 状态列表
-        //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), CheckRecordPO::getState, search.getListStatus());
+        queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), CheckRecordPO::getStatus, search.getListStatus());
         // 数据创建时间-起始
         queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, CheckRecordPO::getCreateTime, search.getCreateTimeStart());
         // 数据创建时间-截止
         queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, CheckRecordPO::getCreateTime, search.getCreateTimeEnd());
         // 关键字
-        //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) {
-        //    queryWrapper.and(q ->
-        //        q.like(CheckRecordPO::getRealName, search.getKeywords())
-        //        .or().like(CheckRecordPO::getContactPhone, search.getKeywords())
-        //    );
-        //}
+        if (StringUtil.isNotNullOrEmpty(search.getKeywords())) {
+            queryWrapper.and(q ->
+                q.like(CheckRecordPO::getCheckFormNo, search.getKeywords())
+                .or().like(CheckRecordPO::getCheckFormName, search.getKeywords())
+            );
+        }
+        // 检查单号
+        queryWrapper.like(StringUtil.isNotNullOrEmpty(search.getCheckFormNo()), CheckRecordPO::getCheckFormNo, search.getCheckFormNo());
+        // 网格类型
+        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());
+        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());
+        // 检查时间-起始
+        queryWrapper.ge(NumericUtil.tryParseLong(search.getCheckTimeStart()).compareTo(0L) > 0, CheckRecordPO::getCheckTime, search.getCheckTimeStart());
+        // 检查时间-截止
+        queryWrapper.le(NumericUtil.tryParseLong(search.getCheckTimeEnd()).compareTo(0L) > 0, CheckRecordPO::getCheckTime, search.getCheckTimeEnd());
+        // 检查人员
+        queryWrapper.like(StringUtil.isNotNullOrEmpty(search.getCheckPerson()), CheckRecordPO::getCheckPerson, search.getCheckPerson());
+        // 是否有隐患
+        queryWrapper.eq(NumericUtil.tryParseInt(search.getHasDanger()).compareTo(0) > 0, CheckRecordPO::getHasDanger, search.getHasDanger());
+
         // 排序处理
         if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) {
             for (OrderByDTO item : search.getOrderBy()) {
@@ -97,4 +129,14 @@ public class CheckRecordMapperImpl extends BasicMapper<CheckRecordPO> {
         }
         return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
     }
+
+    public List<Long> checkToday4Grid(List<Long> listGridId) {
+        LambdaQueryWrapper<CheckRecordPO> where = super.getQuery();
+        where.select(CheckRecordPO.class, c -> c.getColumn().equals("GRID_ID"));
+        where.in(CheckRecordPO::getGridId, listGridId);
+
+        Long today = LocalDateTimeUtil.getTimeStamp(LocalDateTimeUtil.todayFirst()).getTime();
+        where.gt(CheckRecordPO::getCreateTime, today);
+        return mapper.selectMaps(where).stream().map(c -> NumericUtil.tryParseLong(c.get("GRID_ID"))).collect(Collectors.toList());
+    }
 }

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

@@ -16,6 +16,10 @@ import com.customs.cq.datacenter.common.utils.ListUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import org.springframework.stereotype.Repository;
 
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 /**
  * 隐患检查表
  * @author lin.liu
@@ -115,4 +119,11 @@ public class DangerCheckFormMapperImpl extends BasicMapper<DangerCheckFormPO> {
         where.eq("DANGER_CATEGORY", dangerCategory);
         mapper.update(null, where);
     }
+
+    public Map<Long, DangerCheckFormPO> map4DangerCategory(List<Long> listDangerCategory) {
+        LambdaQueryWrapper<DangerCheckFormPO> where = this.getQuery();
+        where.in(DangerCheckFormPO::getDangerCategory, listDangerCategory);
+        List<DangerCheckFormPO> list = mapper.selectList(where);
+        return list.stream().collect(Collectors.toMap(DangerCheckFormPO::getDangerCategory, c -> c));
+    }
 }

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

@@ -3,18 +3,18 @@ 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.GridInfoPO;
+import com.customs.cq.datacenter.business.entity.search.SearchGridInfo;
+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.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 com.customs.cq.datacenter.common.utils.StringUtil;
 import org.springframework.stereotype.Repository;
-import com.customs.cq.datacenter.business.entity.search.SearchGridInfo;
-import com.customs.cq.datacenter.business.domain.GridInfoPO;
-import com.customs.cq.datacenter.business.mapper.GridInfoMapper;
 
 /**
  * 网格信息

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

@@ -16,6 +16,7 @@ import com.customs.cq.datacenter.common.utils.NumericUtil;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 网格人员
@@ -111,4 +112,11 @@ public class GridPersonMapperImpl extends BasicMapper<GridPersonPO> {
         where.eq(GridPersonPO::getGridId, gridId);
         return mapper.selectList(where);
     }
+
+    public List<Long> listGrid4User(String userGuid) {
+        LambdaQueryWrapper<GridPersonPO> where = super.getQuery();
+        where.select(GridPersonPO.class, c -> c.getColumn().equals("GRID_ID"));
+        where.eq(GridPersonPO::getUserGuid, userGuid);
+        return mapper.selectMaps(where).stream().map(c -> NumericUtil.tryParseLong(c.get("GRID_ID"))).collect(Collectors.toList());
+    }
 }

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

@@ -31,11 +31,16 @@ 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.checkrecord.ReqModifyCheckRecord;
 import com.customs.cq.datacenter.business.entity.request.checkrecorditem.ReqCreateCheckRecordItem;
+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.CheckRecordMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.DangerCheckFormMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.GridInfoMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.GridPersonMapperImpl;
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.PagerResult;
 import com.customs.cq.datacenter.common.constant.Constants;
+import com.customs.cq.datacenter.common.core.domain.entity.SysUser;
 import com.customs.cq.datacenter.common.core.domain.model.LoginUser;
 import com.customs.cq.datacenter.common.core.service.BasicService;
 import com.customs.cq.datacenter.common.enums.ECheckFormStatus;
@@ -47,6 +52,7 @@ import com.customs.cq.datacenter.common.helper.LoginHelper;
 import com.customs.cq.datacenter.common.model.Tuple;
 import com.customs.cq.datacenter.common.utils.*;
 import com.customs.cq.datacenter.system.mapper.SysDictDataMapper;
+import com.customs.cq.datacenter.system.mapper.SysUserMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -55,6 +61,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.stream.Collectors;
 
 /**
  * 隐患检查记录
@@ -67,6 +74,14 @@ public class CheckRecordService extends BasicService {
     private CheckRecordMapperImpl dao;
     @Autowired
     private SysDictDataMapper dictDataMapper;
+    @Autowired
+    private GridInfoMapperImpl gridInfoMapper;
+    @Autowired
+    private GridPersonMapperImpl gridPersonMapper;
+    @Autowired
+    private DangerCheckFormMapperImpl checkFormMapper;
+    @Autowired
+    private SysUserMapper userMapper;
 
     @Autowired
     private GridInfoService gridInfoService;
@@ -308,4 +323,34 @@ public class CheckRecordService extends BasicService {
         }
         return ExecutedResult.success(exists);
     }
+
+    // 指定用户所属网格,以及今日填报状态
+    public ExecutedResult<List<ResListGrid4User>> listGrid4User(Long userId) {
+        SysUser user = userMapper.selectById(userId);
+        // 用户所属网格列表
+        List<Long> listGridId = gridPersonMapper.listGrid4User(user.getUserGuid());
+        // 网格列表
+        List<GridInfoPO> list = gridInfoMapper.selectBatchIds(listGridId);
+        // 网格隐患分类列表
+        Map<Long, DangerCheckFormPO> mapForm = checkFormMapper.map4DangerCategory(list.stream().map(GridInfoPO::getDangerCategory).collect(Collectors.toList()));
+        // 网格今日隐患检查记录
+        List<Long> listTodayFinishGridId = dao.checkToday4Grid(listGridId);
+        List<ResListGrid4User> listVo = list.stream().map(c -> {
+            DangerCheckFormPO form = mapForm.get(c.getDangerCategory());
+
+            ResListGrid4User item = new ResListGrid4User();
+            item.setGridId(c.getId());
+            item.setGridName(c.getGridName());
+            item.setCheckFormId(0L);
+            item.setCheckFormName("没有配置检查表!");
+            if (Objects.nonNull(form)) {
+                item.setCheckFormId(form.getId());
+                item.setCheckFormName(form.getName());
+            }
+            item.setCheckStatus(listTodayFinishGridId.contains(c.getId()) ? 1 : 0);
+
+            return item;
+        }).collect(Collectors.toList());
+        return ExecutedResult.success(listVo);
+    }
 }

+ 3 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/GridInfoService.java

@@ -50,6 +50,7 @@ import com.customs.cq.datacenter.common.helper.LoginHelper;
 import com.customs.cq.datacenter.common.model.NameValueDto;
 import com.customs.cq.datacenter.common.model.Tuple;
 import com.customs.cq.datacenter.common.utils.*;
+import com.customs.cq.datacenter.system.mapper.SysUserMapper;
 import com.customs.cq.datacenter.system.service.ISysDeptService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -72,6 +73,8 @@ public class GridInfoService extends BasicService {
     private DangerCategoryMapperImpl dangerCategoryMapper;
     @Autowired
     private GridPersonMapperImpl gridPersonMapper;
+    @Autowired
+    private SysUserMapper userMapper;
 
 
     @Autowired

+ 1 - 1
secure-producting-host/src/main/java/com/customs/cq/datacenter/host/web/controller/system/SysUserController.java

@@ -240,7 +240,7 @@ public class SysUserController extends BaseController {
     /**
      * 获取部门树列表
      */
-    @SaCheckPermission("system:user:list")
+    //@SaCheckPermission("system:user:list")
     @GetMapping("/deptTree")
     public R<List<Tree<Long>>> deptTree(SysDept dept) {
         return R.ok(deptService.selectDeptTreeList(dept));

+ 116 - 0
secure-producting-host/src/test/resources/application-dev.yml

@@ -0,0 +1,116 @@
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 8110
+# 项目相关配置
+ruoyi:
+  # h4a登录页面
+  h4alogin-url: http://192.168.9.14:5110/h4alogin
+
+# 临时文件存储位置 避免临时文件被系统清理报错
+spring.servlet.multipart.location: /ruoyi/server/temp
+
+# 数据源配置
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
+    dynamic:
+      # 性能分析插件(有性能损耗 不建议生产环境使用)
+      p6spy: true
+      # 设置默认的数据源或者数据源组,默认值即为 master
+      primary: dm8
+      # 严格模式 匹配不到数据源则报错
+      strict: false
+      datasource:
+        dm8:
+          # type: com.alibaba.druid.pool.DruidDataSource
+          type: ${spring.datasource.type}
+          driverClassName: dm.jdbc.driver.DmDriver
+          url: jdbc:dm://localhost:5236?schema=SECURE_PRODUCTING
+          username: SECURE_PRODUCTING
+          password: SECURE_PRODUCTING.2024
+      hikari:
+        # 最大连接池数量
+        maxPoolSize: 20
+        # 最小空闲线程数量
+        minIdle: 10
+        # 配置获取连接等待超时的时间
+        connectionTimeout: 30000
+        # 校验超时时间
+        validationTimeout: 5000
+        # 空闲连接存活最大时间,默认10分钟
+        idleTimeout: 600000
+        # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
+        maxLifetime: 1800000
+        # 连接测试query(配置检测连接是否有效)
+        connectionTestQuery: SELECT 1
+        # 多久检查一次连接的活性
+        keepaliveTime: 30000
+--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
+spring:
+  redis:
+    # 地址
+    host: 192.168.9.14
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码(如没有密码请注释掉)
+    # password:
+    # 连接超时时间
+    timeout: 10s
+    # 是否开启ssl
+    ssl: false
+
+redisson:
+  # redis key前缀
+  keyPrefix:
+  # 线程池数量
+  threads: 16
+  # Netty线程池数量
+  nettyThreads: 32
+  # 单节点配置
+  singleServerConfig:
+    # 客户端名称
+    clientName: ${ruoyi.name}
+    # 最小空闲连接数
+    connectionMinimumIdleSize: 32
+    # 连接池大小
+    connectionPoolSize: 64
+    # 连接空闲超时,单位:毫秒
+    idleConnectionTimeout: 10000
+    # 命令等待超时,单位:毫秒
+    timeout: 3000
+    # 发布和订阅连接池大小
+    subscriptionConnectionPoolSize: 50
+
+# mail 邮件发送
+mail:
+  enabled: false
+  host: smtp.163.com
+  port: 465
+  # 是否需要用户名密码验证
+  auth: true
+  # 发送方,遵循RFC-822标准
+  from: xxx@163.com
+  # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
+  user: xxx@163.com
+  # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
+  pass: xxxxxxxxxx
+  # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
+  starttlsEnable: true
+  # 使用SSL安全连接
+  sslEnable: true
+  # SMTP超时时长,单位毫秒,缺省值不超时
+  timeout: 0
+  # Socket连接超时值,单位毫秒,缺省值不超时
+  connectionTimeout: 0
+
+file:
+  # 文件存储,存放路径
+  uploadBasicPath: ./logs/upload/
+  # 文件访问地址前缀(静态资源服务)
+  fileBasicUrl: http://192.168.9.14:8110/file/download
+  # 文件名生成加盐字符
+  disturbStr: com.customs.producting

+ 240 - 0
secure-producting-host/src/test/resources/application.yml

@@ -0,0 +1,240 @@
+# 项目相关配置
+ruoyi:
+  # 名称
+  name: secure-producting-grid-manage
+  # 版本
+  version: ${ruoyi-vue-plus.version}
+  # 版权年份
+  copyrightYear: 2023
+  # 实例演示开关
+  demoEnabled: true
+  # 获取ip地址开关
+  addressEnabled: true
+  # 缓存懒加载
+  cacheLazy: false
+  # 关联H4A appid
+  appId: SECURE-PRODUCTING
+
+# spring配置
+spring:
+  application:
+    name: ${ruoyi.name}
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  profiles:
+    active: dev
+  # 文件上传
+  servlet:
+    multipart:
+      # 单个文件大小
+      max-file-size: 200MB
+      # 设置总上传的文件大小
+      max-request-size: 500MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+  mvc:
+    format:
+      date-time: yyyy-MM-dd HH:mm:ss
+  jackson:
+    # 日期格式化
+    date-format: yyyy-MM-dd HH:mm:ss
+    serialization:
+      # 格式化输出
+      indent_output: false
+      # 忽略无法转换的对象
+      fail_on_empty_beans: false
+    deserialization:
+      # 允许对象忽略json中不存在的属性
+      fail_on_unknown_properties: false
+
+# 验证码
+captcha:
+  # 页面 <参数设置> 可开启关闭 验证码校验
+  # 验证码类型 math 数组计算 char 字符验证
+  type: MATH
+  # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
+  category: CIRCLE
+  # 数字验证码位数
+  numberLength: 1
+  # 字符验证码长度
+  charLength: 4
+
+# 开发环境配置
+server:
+  servlet:
+    # 应用的访问路径
+    context-path: /
+  # undertow 配置
+  undertow:
+    # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
+    max-http-post-size: -1
+    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
+    # 每块buffer的空间大小,越小的空间被利用越充分
+    buffer-size: 512
+    # 是否分配的直接内存
+    direct-buffers: true
+    threads:
+      # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
+      io: 8
+      # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
+      worker: 256
+
+# 日志配置
+logging:
+  level:
+    com.customs.cq.datacenter: info
+    org.springframework: warn
+  config: classpath:logback-plus.xml
+
+# 用户配置
+user:
+  password:
+    # 密码最大错误次数
+    maxRetryCount: 5
+    # 密码锁定时间(默认10分钟)
+    lockTime: 10
+
+# Sa-Token配置
+sa-token:
+  # token名称 (同时也是cookie名称)
+  token-name: Authorization
+  # token有效期 设为一天 (必定过期) 单位: 秒
+  timeout: 86400
+  # 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
+  # token最低活跃时间 (指定时间无操作就过期) 单位: 秒
+  active-timeout: 1800
+  # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
+  is-concurrent: true
+  # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
+  is-share: false
+  # 是否尝试从header里读取token
+  is-read-header: true
+  # 是否尝试从cookie里读取token
+  is-read-cookie: false
+  # token前缀
+  token-prefix: "Bearer"
+  # jwt秘钥
+  jwt-secret-key: abcdefghijklmnopqrstuvwxyz
+
+# security配置
+security:
+  # 排除路径
+  excludes:
+    # 静态资源
+    - /*.html
+    - /**/*.html
+    - /**/*.css
+    - /**/*.js
+    # 公共路径
+    - /favicon.ico
+    - /error
+    # swagger 文档配置
+    - /*/api-docs
+    - /*/api-docs/**
+    # actuator 监控配置
+    - /actuator
+    - /actuator/**
+    # h4a登录
+    - /h4aLogin
+    - /uLogin
+    # smart-doc接口文档
+    - /doc/**
+
+# MyBatisPlus配置
+# https://baomidou.com/config/
+mybatis-plus:
+  # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
+  # 例如 com.**.**.mapper
+  mapperPackage: com.customs.cq.datacenter.**.mapper
+  # 对应的 XML 文件位置
+  mapperLocations: classpath*:mapper/**/*Mapper.xml
+  # 实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.customs.cq.datacenter.**.domain
+  # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
+  checkConfigLocation: false
+  configuration:
+    # 自动驼峰命名规则(camel case)映射
+    mapUnderscoreToCamelCase: true
+    # MyBatis 自动映射策略
+    # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
+    autoMappingBehavior: PARTIAL
+    # MyBatis 自动映射时未知列或未知属性处理策
+    # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
+    autoMappingUnknownColumnBehavior: NONE
+    # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
+    # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
+    # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
+    logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+  global-config:
+    # 是否打印 Logo banner
+    banner: true
+    db-config:
+      # 主键类型
+      # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
+      idType: ASSIGN_ID
+      logic-delete-field: is_delete # 逻辑删除字段名
+      logic-delete-value: 1 # 逻辑已删除值
+      logic-not-delete-value: 0 # 逻辑未删除值
+      # 字段验证策略之 insert,在 insert 的时候的字段验证策略
+      # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
+      insertStrategy: NOT_NULL
+      # 字段验证策略之 update,在 update 的时候的字段验证策略
+      updateStrategy: NOT_NULL
+      # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
+      where-strategy: NOT_NULL
+
+# 数据加密
+mybatis-encryptor:
+  # 是否开启加密
+  enable: false
+  # 默认加密算法
+  algorithm: BASE64
+  # 编码方式 BASE64/HEX。默认BASE64
+  encode: BASE64
+  # 安全秘钥 对称算法的秘钥 如:AES,SM4
+  password:
+  # 公私钥 非对称算法的公私钥 如:SM2,RSA
+  publicKey:
+  privateKey:
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+# 全局线程池相关配置
+thread-pool:
+  # 是否开启线程池
+  enabled: false
+  # 队列最大长度
+  queueCapacity: 128
+  # 线程池维护线程所允许的空闲时间
+  keepAliveSeconds: 300
+
+--- # 分布式锁 lock4j 全局配置
+lock4j:
+  # 获取分布式锁超时时间,默认为 3000 毫秒
+  acquire-timeout: 3000
+  # 分布式锁的超时时间,默认为 30 秒
+  expire: 30000
+
+--- # Actuator 监控端点的配置项
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: ALWAYS
+    logfile:
+      external-file: ./logs/sys-console.log

+ 8 - 0
secure-producting-host/src/test/resources/banner.txt

@@ -0,0 +1,8 @@
+Application Version: ${ruoyi-vue-plus.version}
+Spring Boot Version: ${spring-boot.version}
+__________            _____.___.__         ____   ____                     __________.__
+\______   \__ __  ____\__  |   |__|        \   \ /   /_ __   ____          \______   \  |  __ __  ______
+ |       _/  |  \/  _ \/   |   |  |  ______ \   Y   /  |  \_/ __ \   ______ |     ___/  | |  |  \/  ___/
+ |    |   \  |  (  <_> )____   |  | /_____/  \     /|  |  /\  ___/  /_____/ |    |   |  |_|  |  /\___ \
+ |____|_  /____/ \____// ______|__|           \___/ |____/  \___  >         |____|   |____/____//____  >
+        \/             \/                                       \/                                   \/

+ 48 - 0
secure-producting-host/src/test/resources/h4a-config.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+	<module name="h4aIdentity">
+		<group name="wsCache">
+			<!-- cacheControl 值为off为开启缓存,值为on为关闭缓存 -->
+			<configValue key="cacheControl">off</configValue>
+			<configValue key="cacheTime">3000000</configValue>
+			<configValue key="cacheClearTime">100000</configValue>
+			<configValue key="initialDelay">0</configValue>
+			<configValue key="clearCachePeriod">1440</configValue>
+		</group>
+	</module>
+	<module name="passportSSO">
+		<group name="passport">
+			<configValue key="appID">dsp</configValue>
+			<configValue key="appSlidingTime">0</configValue>
+			<configValue key="idAuthenticationMode">forms</configValue>
+			<configValue key="paramT">token</configValue>
+			<configValue key="defaultAuthenticationMode">formsAuthentication</configValue>
+		</group>
+		<group name="url">
+			<configValue key="logoffAutoRedirect">true</configValue>
+			<configValue key="logoffToDefaultUriString">/index.jsp</configValue>
+			<configValue key="logOffCallBackUrl">/LogOff</configValue>
+		</group>
+		<group name="defaultAuthenticationMode">
+			<configValue key="*.jpg">Anonymous</configValue>
+			<configValue key="*.gif">Anonymous</configValue>
+			<configValue key="/WindowsAuthentication/*.jsp">formsAuthentication</configValue>
+			<configValue key="/WindowsAuthentication/test*">formsAuthentication</configValue>
+		</group>
+	</module>
+	<module name="SSOAddress">
+		<group name="ssoAddress">
+			<configValue key="PassportManager">com.customs.cq.datacenter.system.h4a.PassportSSO</configValue>
+		</group>
+	</module>
+	<module name="h4a_default">
+		<group name="wcf_default">
+			<configValue key="default_cache_max_capacity">10000</configValue>
+			<configValue key="default_BaseView">CCIC_VIEW</configValue>
+			<configValue key="default_Application_name">ORGANIZATIONS</configValue>
+		</group>
+		<group name="Intercepter_load_switch">
+			<configValue key="Intercepter_Control">false</configValue>
+		</group>
+	</module>
+</application>

TEMPAT SAMPAH
secure-producting-host/src/test/resources/ip2region.xdb


+ 129 - 0
secure-producting-host/src/test/resources/logback-plus.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.path" value="./logs"/>
+    <property name="console.log.pattern"
+              value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
+    <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 控制台输出 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${console.log.pattern}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+    </appender>
+
+    <!-- 控制台输出 -->
+    <appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sys-console.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-console.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大 1天 -->
+            <maxHistory>1</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+        </filter>
+    </appender>
+
+    <!-- 系统日志输出 -->
+    <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sys-info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sys-error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- info异步输出 -->
+    <appender name="async_info" class="ch.qos.logback.classic.AsyncAppender">
+        <!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
+        <discardingThreshold>0</discardingThreshold>
+        <!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
+        <queueSize>512</queueSize>
+        <!-- 添加附加的appender,最多只能添加一个 -->
+        <appender-ref ref="file_info"/>
+    </appender>
+
+    <!-- error异步输出 -->
+    <appender name="async_error" class="ch.qos.logback.classic.AsyncAppender">
+        <!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
+        <discardingThreshold>0</discardingThreshold>
+        <!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
+        <queueSize>512</queueSize>
+        <!-- 添加附加的appender,最多只能添加一个 -->
+        <appender-ref ref="file_error"/>
+    </appender>
+
+    <!-- 整合 skywalking 控制台输出 tid -->
+<!--    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
+<!--        <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
+<!--            <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
+<!--                <pattern>[%tid] ${console.log.pattern}</pattern>-->
+<!--            </layout>-->
+<!--            <charset>utf-8</charset>-->
+<!--        </encoder>-->
+<!--    </appender>-->
+
+    <!-- 整合 skywalking 推送采集日志 -->
+<!--    <appender name="sky_log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">-->
+<!--        <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
+<!--            <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
+<!--                <pattern>[%tid] ${console.log.pattern}</pattern>-->
+<!--            </layout>-->
+<!--            <charset>utf-8</charset>-->
+<!--        </encoder>-->
+<!--    </appender>-->
+
+    <!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="console" />
+        <appender-ref ref="async_info" />
+        <appender-ref ref="async_error" />
+        <appender-ref ref="file_console" />
+<!--        <appender-ref ref="sky_log"/>-->
+    </root>
+
+</configuration>

+ 26 - 0
secure-producting-host/src/test/resources/sdk-config.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+	<module name="h4aIdentity">
+		<group name="wsAddress">
+			<configValue key="OguReaderService">http://218.201.25.104:19019/CupaaCenterService/OguReaderService.svc</configValue>
+			<configValue key="AccreditReaderService">http://218.201.25.104:19019/CupaaCenterService/AccreditReaderService.svc</configValue>
+			<configValue key="RegisterAppService">http://218.201.25.104:19019/AppRegisterService/RegisterAppReaderService.svc</configValue>
+		</group>
+	</module>
+	<module name="passportSSO">
+		<group name="url">
+			<configValue key="authenticateUrl">http://218.201.25.104:19019/Passport/SsoLogin.aspx</configValue>
+			<configValue key="logOffUrl">http://218.201.25.104:19019/Passport/Logoff.aspx</configValue>
+		</group>
+	</module>
+	<module name="h4agis">
+		<group name="gisUrl">
+			<configValue key="url">http://218.201.25.104:19019/iserver/services/map-world/maps/World</configValue>
+			<configValue key="url1">http://218.201.25.104:19019/iserver/services/map-world/maps/World1</configValue>
+			<configValue key="url2">http://218.201.25.104:19019/iserver/services/map-world/maps/World2</configValue>
+		</group>
+		<group name="gisToken">
+			<configValue key="token">ak=HF0BeNqiq10x60lo31aU2hAE</configValue>
+		</group>
+	</module>
+</application>

+ 32 - 0
secure-producting-host/src/test/resources/smart-doc.json

@@ -0,0 +1,32 @@
+{
+  "serverUrl": "", // https://www.baidu.com/api 服务器地址,非必须。导出postman建议设置成http://{{server}}方便直接在postman直接设置环境变量
+  "outPath": "./src/main/resources/static/doc", // 指定文档的输出路径,相对路径时请用./开头,eg:./src/main/resources/static/doc
+  "allInOne": true,  //是否将文档合并到一个文件中,一般推荐为true
+  "allInOneDocFileName":"index.html",//自定义设置输出文档名称, @since 1.9.0
+  "style": "vs2015",
+  "createDebugPage": true, //@since 2.0.0 smart-doc支持创建可以测试的html页面,仅在AllInOne模式中起作用。
+  "packageFilters": "com.customs.cq.datacenter.host.web.controller.*,com.customs.cq.datacenter.business.controller.*",//controller包过滤,多个包用英文逗号隔开,2.2.2开始需要采用正则:com.test.controller.*
+  "requestExample":"true",//是否将请求示例展示在文档中,默认true,@since 1.9.0
+  "responseExample":"true"//是否将响应示例展示在文档中,默认为true,@since 1.9.0
+//    "requestHeaders": [{ //设置请求头,没有需求可以不设置
+//      "name": "Token",//请求头名称
+//      "type": "string",//请求头类型
+//      "desc": "登录后的身份令牌",//请求头描述信息
+//      "value":"123456",//不设置默认null
+//      "required": true,//是否必须
+//      "since": "-", //什么版本添加的改请求头
+//      //"pathPatterns": "/app/test/**",//请看https://gitee.com/smart-doc-team/smart-doc/wikis/请求头高级配置?sort_id=4178978
+//      "excludePathPatterns":"/file/**,/admin/user/login"//请看https://gitee.com/smart-doc-team/smart-doc/wikis/请求头高级配置?sort_id=4178978
+//    }],
+//  "dataDictionaries": [{
+//    "title": "EResultCode - 请求响应状态码",
+//    "enumClassName": "com.xxx.yyy.common.enums.EResultCode",
+//    "codeField": "code",
+//    "descField": "message"
+//  },{
+//    "title": "ESex - 性别",
+//    "enumClassName": "com.xxx.yyy.entity.enums.ESex",
+//    "codeField": "value",
+//    "descField": "desc"
+//  }]
+}

+ 28 - 0
secure-producting-host/src/test/resources/spy.properties

@@ -0,0 +1,28 @@
+# p6spy 性能分析插件配置文件
+modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
+# 自定义日志打印
+logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
+#日志输出到控制台
+appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
+# 使用日志系统记录 sql
+#appender=com.p6spy.engine.spy.appender.Slf4JLogger
+# 设置 p6spy driver 代理
+#deregisterdrivers=true
+# 取消JDBC URL前缀
+useprefix=true
+# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
+excludecategories=info,debug,result,commit,resultset
+# 日期格式
+dateformat=yyyy-MM-dd HH:mm:ss
+# SQL语句打印时间格式
+databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss
+# 实际驱动可多个
+#driverlist=org.h2.Driver
+# 是否开启慢SQL记录
+outagedetection=true
+# 慢SQL记录标准 2 秒
+outagedetectioninterval=2
+# 是否过滤 Log
+filter=true
+# 过滤 Log 时所排除的 sql 关键字,以逗号分隔
+exclude=SELECT 1

+ 33 - 0
secure-producting-host/src/test/resources/upload_allow.json

@@ -0,0 +1,33 @@
+{
+  "image/jpeg": "jpg",
+  "image/jpg": "jpg",
+  "image/gif": "gif",
+  "image/png": "png",
+  "image/bmp": "bmp",
+
+  "application/x-zip-compressed": "zip",
+  "application/x-rar": "rar",
+  "application/x-7z-compressed": "7z",
+  "application/x-gzip": "gz",
+  "application/x-tar": "tar",
+
+  "video/mpeg": "mp2",
+  "audio/mpeg": "mp3",
+  "audio/x-flac": "flac",
+  "video/x-flv": "flv",
+  "video/3gpp": "3pg",
+  "video/mp4": "mp4",
+  "video/avi": "avi",
+
+  "application/pdf": "pdf",
+
+  "application/vnd.ms-powerpoint": "ppt",
+  "application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
+  "application/msword": "doc",
+  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
+  "application/vnd.ms-excel": "xls",
+  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
+
+  "text/markdown": "md",
+  "text/plain": "txt"
+}

+ 3 - 3
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/SysDeptMapper.java

@@ -23,9 +23,9 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDeptMapper, SysDept, Sy
      * @param queryWrapper 查询条件
      * @return 部门信息集合
      */
-    @DataPermission({
-        @DataColumn(key = "deptName", value = "dept_id")
-    })
+//    @DataPermission({
+//        @DataColumn(key = "deptName", value = "dept_id")
+//    })
     List<SysDept> selectDeptList(@Param(Constants.WRAPPER) Wrapper<SysDept> queryWrapper);
 
     /**

+ 3 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/service/impl/SysUserServiceImpl.java

@@ -507,7 +507,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
                 sysUser.setUpdateTime(LocalDateTime.now());
                 sysUser.setExpirationTime(DateUtil.offset(new Date(), DateField.HOUR,24).toLocalDateTime());
                 //设置用户部门id
-                SysDept dept = deptMapper.selectOne(new LambdaQueryWrapper<SysDept>().eq(SysDept::getGuid,user.getParentGuid()));
+                LambdaQueryWrapper<SysDept> whereDept = Wrappers.lambdaQuery();
+                whereDept.eq(SysDept::getGuid,user.getParentGuid());
+                SysDept dept = deptMapper.selectOne(whereDept);
                 sysUser.setDeptId(null == dept ? null : dept.getDeptId());
                 baseMapper.insertOrUpdate(sysUser);
                 List<Role> roles = h4AService.getRolesOfUser(user.getUserGuid(),user.getParentGuid());

+ 36 - 0
secure-producting-vue/src/api/form/DangerCheckRecord.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 查询[隐患检查记录]
+export function search(data) {
+  return request({
+    url: '/checkRecord/search',
+    method: 'post',
+    data: data
+  })
+}
+
+// 获取[隐患检查记录]
+export function detail(id) {
+  return request({
+    url: '/checkRecord/get/' + id,
+    method: 'get'
+  })
+}
+
+// 提交隐患检查单
+export function submit(data) {
+  return request({
+    url: '/checkRecord/submit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 编辑[隐患检查记录]
+export function modify(data) {
+  return request({
+    url: '/checkRecord/modify',
+    method: 'post',
+    data: data
+  })
+}

+ 15 - 0
secure-producting-vue/src/router/index.js

@@ -234,6 +234,21 @@ export const dynamicRoutes = [
       }
     ]
   },
+  // 隐患检查
+  {
+    path: '/check',
+    component: Layout,
+    hidden: true,
+    permissions: ['check:index:list'],
+    children: [
+      {
+        path: 'dangerCheckRecord',
+        component: () => import('@/views/form/DangerCheckRecord'),
+        name: 'DangerCheckRecord',
+        meta: { title: '隐患检查表', activeMenu: '/form/dangerCheckRecord' }
+      }
+    ]
+  },
   {
     path: '/policy',
     component: Layout,

+ 537 - 0
secure-producting-vue/src/views/form/DangerCheckRecord.vue

@@ -0,0 +1,537 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true">
+      <el-form-item label="检查单号" prop="checkFormNo">
+        <el-input
+          v-model="queryParams.checkFormNo"
+          placeholder="请输入"
+          clearable
+          style="width: 200px"
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="关区代码" prop="customs">
+        <el-input
+          v-model="queryParams.customs"
+          placeholder="请输入"
+          clearable
+          style="width: 200px"
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="检查时间">
+        <el-date-picker
+          v-model="dateRangeCheckTime"
+          value-format="YYYY-MM-DD HH:mm:ss"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :default-time="[
+            new Date(2000, 1, 1, 0, 0, 0),
+            new Date(2000, 1, 1, 23, 59, 59),
+          ]"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="检查人员" prop="checkPerson">
+        <el-input
+          v-model="queryParams.checkPerson"
+          placeholder="请输入"
+          clearable
+          style="width: 200px"
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="是否有隐患" prop="hasDanger">
+        <el-radio-group v-model="queryParams.hasDanger">
+          <el-radio :label="0">无隐患</el-radio>
+          <el-radio :label="1">有隐患</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="检查单状态" prop="listStatus">
+        <el-select
+          v-model="queryParams.listStatus"
+          multiple
+          clearable
+          placeholder="请选择"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in checkFormStatusList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="网格类型" prop="ListGridCategory">
+        <el-select
+          v-model="queryParams.ListGridCategory"
+          multiple
+          clearable
+          placeholder="请选择"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in gridCategoryList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="隐患分类" prop="listDangerCategory">
+        <el-select
+          v-model="queryParams.listDangerCategory"
+          multiple
+          clearable
+          placeholder="请选择"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in dangerCategoryList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属部门" prop="listDepartment">
+        <el-tree-select
+          v-model="value"
+          :data="deptOptions"
+          multiple
+          check-strictly
+          :render-after-expand="false"
+          show-checkbox
+          style="width: 240px"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8" v-if="false">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="Plus"
+          @click="handleAdd"
+          >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="Edit"
+          :disabled="single"
+          @click="handleUpdate"
+          >修改</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table
+      :data="dataList"
+      @selection-change="handleSelectionChange"
+      @row-dblclick="handleDetail"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="检查时间" align="center" prop="heckTimeView" />
+      <el-table-column label="状态" align="center" prop="status">
+        <template #default="scope">
+          {{ getStatusTxt(scope.row.status) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="检查单号" align="center" prop="checkFormNo" />
+      <el-table-column label="检查表名称" align="center" prop="checkFormName" />
+      <el-table-column label="所属部门" align="center" prop="departmentTxt" />
+      <el-table-column label="所属关区" align="center" prop="customsName" />
+      <el-table-column label="检查人员" align="center" prop="checkPerson" />
+      <el-table-column label="是否有隐患" align="center" prop="hasDangerTxt" />
+      <el-table-column label="整改期限" align="center" prop="rectifyDeadlineView" />
+      <el-table-column
+        label="操作"
+        align="center"
+        width="150"
+        fixed="right"
+        class-name="small-padding fixed-width"
+      >
+        <template #default="scope">
+          <el-button
+            link
+            type="primary"
+            @click="handleDetail(scope.row)"
+            >详情</el-button>
+          <el-button
+            link
+            type="primary"
+            icon="Edit"
+            @click="handleUpdate(scope.row)"
+            >修改</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.page"
+      v-model:limit="queryParams.limit"
+      @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-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 class="dialog-footer">
+        <el-button
+          :loading="createLoading"
+          type="primary"
+          @click="submitCreate"
+          >确 定</el-button>
+        <el-button @click="cancelCreate">取 消</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"
+    >
+      <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>
+      <div class="dialog-footer">
+        <el-button
+          v-if="isDetail === false"
+          :loading="modifyLoading"
+          type="primary"
+          @click="submitModify"
+          >确 定</el-button>
+        <el-button @click="cancelModify">{{cancelModifyTxt}}</el-button>
+        <el-button type="primary" v-if="isDetail" @click="changeModify">编 辑</el-button>
+      </div>
+    </template>
+  </el-dialog>
+  </div>
+</template>
+
+<script setup name="DangerCheckRecord">
+import { deptTreeSelect } from "@/api/system/user";
+import { listAllGridCategory } from "@/api/grid/GridCategory";
+import { listAllDangerCategory } from "@/api/danger/DangerCategory";
+import { listEnumValue } from "@/api/system/base"
+import {
+  submit, detail, modify, search
+} from "@/api/form/DangerCheckRecord";
+
+const { proxy } = getCurrentInstance();
+
+const deptOptions = ref(undefined);
+const gridCategoryList = ref([]);
+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 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,
+  limit: 10,
+  listStatus: undefined,
+  checkTimeRange: "",
+  checkFormNo: undefined,
+  ListGridCategory: undefined,
+  listDangerCategory: undefined,
+  listDepartment: undefined,
+  customs: undefined,
+  hasDanger: 0
+});
+
+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' }],
+});
+
+
+
+/** 查询列表 */
+function getList() {
+  if (
+    dateRangeCheckTime &&
+    dateRangeCheckTime.value &&
+    dateRangeCheckTime.value[0]
+  ) {
+    queryParams.value.checkTimeRange = dateRangeCheckTime.value.join(" ~ ");
+  }
+  search(queryParams.value).then((response) => {
+    dataList.value = response.data.list;
+    total.value = response.data.total;
+  })
+};
+/** 搜索按钮操作 */
+function handleQuery() {
+  queryParams.value.page = 1;
+  getList();
+}
+/** 重置按钮操作 */
+function resetQuery() {
+  dateRangeCheckTime.value = [];
+  proxy.resetForm("queryRef");
+  handleQuery();
+}
+/** 选择条数  */
+function handleSelectionChange(selection) {
+  ids.value = selection.map((item) => item.id);
+  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 handleAdd() {
+  resetCreate();
+  dialogOpenCreate.value = true;
+  title.value = "提交隐患检查";
+}
+/** 新增提交 */
+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 cancelModify() {
+  dialogOpenModify.value = false;
+  resetModify();
+}
+/** 编辑表单重置 */
+function resetModify() {
+  formModify.value = {
+    id: undefined,
+    categoryName: undefined,
+    description: 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 = "修改隐患检查单";
+}
+/** 修改按钮 */
+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) => {
+    if (valid) {
+      modifyLoading.value = true;
+
+      modify(formModify.value)
+        .then((response) => {
+          proxy.$modal.msgSuccess("修改成功");
+          dialogOpenModify.value = false;
+          getList();
+        })
+        .finally(() => {
+          modifyLoading.value = false;
+        });
+    }
+  });
+}
+
+
+function getStatusTxt(status) {
+  let find = checkFormStatusList.value.filter(c => c.value === status);
+  if (find) {
+    return find.Label;
+  }
+  return '未知';
+}
+
+
+
+/** 获取检查单状态下拉树结构 */
+function getCheckFormStatus() {  
+  listEnumValue('ECheckFormStatus').then(response => {
+    checkFormStatusList.value = response.data;
+  });
+};
+/** 查询部门下拉树结构 */
+function getDeptTree() {
+  deptTreeSelect().then(response => {
+    deptOptions.value = response.data;
+  });
+};
+/** 初始化网格类型下拉框数据 */
+function initListGridCategory() {
+  listAllGridCategory().then((response) => {
+    gridCategoryList.value = response.data;
+  });
+}
+/** 初始化隐患分类下拉框数据 */
+function initListDangerCategory() {
+  listAllDangerCategory().then((response) => {
+    dangerCategoryList.value = response.data;
+  });
+}
+
+
+
+// 调用获取检查单状态下拉树结构
+getCheckFormStatus();
+// 调用初始化部门下拉框数据
+getDeptTree();
+// 调用初始化网格类型下拉框数据
+initListGridCategory();
+// 调用初始化隐患分类下拉框数据
+initListDangerCategory();
+// 调用列表查询
+getList();
+</script>

+ 58 - 44
secure-producting-vue/src/views/index.vue

@@ -1,49 +1,51 @@
 <template>
-    <div class="app-container">
-        <el-row :gutter="8">
-            <el-col :md="12" :sm="24">
-                <el-card shadow="hover" :header="helloStr" style="margin-bottom: 5px">
-                    <div style="padding-left:20px;">
-                        <div v-if="isClockIn">
-                            <p>上班时间:{{attendnceRecord.workBegin}}</p>
-                            <p>下班时间:{{attendnceRecord.workEnd}}</p>
-                        </div>
-                        <div>
-                            <el-button v-if="!isClockIn" type="success" round @click="onClockIn">签 到</el-button>
-                            <el-button v-if="isClockIn && !isOffWork" type="danger" round @click="onOffWork">签 退</el-button>
-                        </div>
-                    </div>
-                </el-card>
-            </el-col>
+  <div class="app-container">
+    <el-row :gutter="8">
+      <el-col :md="12" :sm="24">
+          <el-card shadow="hover" :header="helloStr" style="margin-bottom: 5px">
+              <div style="padding-left:20px;">
+                  <div v-if="isClockIn">
+                      <p>上班时间:{{attendnceRecord.workBegin}}</p>
+                      <p>下班时间:{{attendnceRecord.workEnd}}</p>
+                  </div>
+                  <div>
+                      <el-button v-if="!isClockIn" type="success" round @click="onClockIn">签 到</el-button>
+                      <el-button v-if="isClockIn && !isOffWork" type="danger" round @click="onOffWork">签 退</el-button>
+                  </div>
+              </div>
+          </el-card>
+      </el-col>
 
-            
-            <el-col :md="12" :sm="24">
-                <el-card shadow="hover" header="今日巡更计划" style="margin-bottom: 5px">
-                    <el-table :data="listTodayPlan" stripe style="width: 100%">
-                        <el-table-column prop="planName" label="计划信息" :show-overflow-tooltip="true">
-                            <template #default="scope">
-                                {{ scope.row.planName + ' - ' + scope.row.routeName }}
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="needPlan" label="巡更计划">
-                            <template #default="scope">
-                                <span style="display:flex;" v-for="(item,key) in scope.row.listTime" :key="key">
-                                    {{ item }}
-                                </span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="plan" label="实际巡更">
-                            <template #default="scope">
-                                <span style="display:flex;margin:2px 0;" v-for="(item,key) in scope.row.listRecord" :key="key">
-                                    
-                                    <span class="plan-record" :style="'color:' + item.color">{{ item.result }}</span>
-                                </span>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </el-card>
-            </el-col>
-        </el-row>
+        
+      <el-col :md="12" :sm="24">
+        <el-card shadow="hover" header="隐患检查" style="margin-bottom: 5px">
+          <el-table :data="listMineGrid" stripe style="width: 100%">
+            <el-table-column prop="checkFormName" label="检查表信息" :show-overflow-tooltip="true">
+              <template #default="scope">
+                {{ scope.row.gridName + ' - ' + scope.row.checkFormName }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="checkStatusTxt" label="状态" />
+            <el-table-column label="操作">
+              <template #default="scope">                                
+                <el-button
+                  v-if="checkStatus === 1"
+                  link
+                  type="primary"
+                  @click="handleDetail(scope.row)"
+                >查看</el-button>
+                <el-button
+                  link
+                  type="primary"
+                  icon="Edit"
+                  @click="handleDoForm(scope.row)"
+                >填报</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-card>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
@@ -55,9 +57,11 @@
 import { getUserProfile } from '@/api/system/user.js';
 import { ref } from 'vue';
 import { EPatrolResult } from '@/utils/enums.js';
+import { listMine } from '@/api/grid/GridIndex.js';
 
 const { proxy } = getCurrentInstance();
 
+const listMineGrid = ref([]);
 const loginUser = ref({});
 const loginUserName = ref('');
 const helloStr = ref('');
@@ -67,6 +71,8 @@ function getLoginUser() {
   getUserProfile().then((response) => {
     loginUser.value = response.data;
     loginUserName.value = response.data.user.nickName;
+
+    helloStr.value = '您好,' + loginUserName.value + '!';
   });
 }
 
@@ -75,4 +81,12 @@ onMounted(async () => {
     // 登录信息
     getLoginUser();
 });
+
+function getListPerson() {
+  listMine().then((response) => {
+    listMineGrid.value = response.data;
+  });
+}
+
+getListPerson();
 </script>

+ 8 - 8
sql/20240814.sql

@@ -93,8 +93,8 @@ COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_DANGER_CATEGORY"."IS_DELETE" IS '是
 CREATE TABLE "SECURE_PRODUCTING"."SP_GRID_INFO"(
   "ID" BIGINT NOT NULL,
   "GRID_NAME" VARCHAR(50) NOT NULL DEFAULT '',
-  "DEPARTMENT" VARCHAR(50) NOT NULL DEFAULT '',
-  "DEPARTMENT_NAME" VARCHAR(200) NOT NULL DEFAULT '',
+  "DEPARTMENT" VARCHAR(500) NOT NULL DEFAULT '',
+  "DEPARTMENT_NAME" VARCHAR(1000) NOT NULL DEFAULT '',
   "GRID_CATEGORY" BIGINT NOT NULL DEFAULT 0,
   "DANGER_CATEGORY" BIGINT NOT NULL DEFAULT 0,
   "GRID_PERSON_DUTY" VARCHAR(500) NOT NULL DEFAULT '',
@@ -147,8 +147,8 @@ COMMENT ON COLUMN "SECURE_PRODUCTING". "SP_GRID_INFO"."IS_DELETE" IS '是否删
 -- SP_GRID_PERSON - 网格人员
 CREATE TABLE "SECURE_PRODUCTING"."SP_GRID_PERSON"(
   "ID" BIGINT NOT NULL,
-  "DEPARTMENT" VARCHAR(50) NOT NULL DEFAULT '',
-  "DEPARTMENT_NAME" VARCHAR(200) NOT NULL DEFAULT '',
+  "DEPARTMENT" VARCHAR(500) NOT NULL DEFAULT '',
+  "DEPARTMENT_NAME" VARCHAR(1000) NOT NULL DEFAULT '',
   "GRID_ID" BIGINT NOT NULL DEFAULT 0,
   "USER_GUID" VARCHAR(50) NOT NULL DEFAULT '',
   "USER_NAME" VARCHAR(50) NOT NULL DEFAULT '',
@@ -334,8 +334,8 @@ CREATE TABLE "SECURE_PRODUCTING"."SP_CHECK_RECORD"(
   "GRID_ID" BIGINT NOT NULL DEFAULT 0,
   "CHECK_FORM_ID" BIGINT NOT NULL DEFAULT 0,
   "CHECK_FORM_NAME" VARCHAR(200) NOT NULL DEFAULT '',
-  "DEPARTMENT" VARCHAR(50) NOT NULL DEFAULT '',
-  "DEPARTMENT_NAME" VARCHAR(200) NOT NULL DEFAULT '',
+  "DEPARTMENT" VARCHAR(500) NOT NULL DEFAULT '',
+  "DEPARTMENT_NAME" VARCHAR(1000) NOT NULL DEFAULT '',
   "CUSTOMS" VARCHAR(50) NOT NULL DEFAULT '',
   "CUSTOMS_NAME" VARCHAR(200) NOT NULL DEFAULT '',
   "CHECK_TIME" BIGINT NOT NULL DEFAULT 0,
@@ -412,8 +412,8 @@ CREATE TABLE "SECURE_PRODUCTING"."SP_CHECK_RECORD_ITEM"(
   "GRID_ID" BIGINT NOT NULL DEFAULT 0,
   "CHECK_FORM_ID" BIGINT NOT NULL DEFAULT 0,
   "CHECK_FORM_NAME" VARCHAR(200) NOT NULL DEFAULT '',
-  "DEPARTMENT" VARCHAR(50) NOT NULL DEFAULT '',
-  "DEPARTMENT_NAME" VARCHAR(200) NOT NULL DEFAULT '',
+  "DEPARTMENT" VARCHAR(500) NOT NULL DEFAULT '',
+  "DEPARTMENT_NAME" VARCHAR(1000) NOT NULL DEFAULT '',
   "CUSTOMS" VARCHAR(50) NOT NULL DEFAULT '',
   "CUSTOMS_NAME" VARCHAR(200) NOT NULL DEFAULT '',
   "ITEM_NAME" VARCHAR(200) NOT NULL DEFAULT '',