Parcourir la source

从数据库生成代码

lin.liu il y a 3 semaines
Parent
commit
d9a25f7295
13 fichiers modifiés avec 1151 ajouts et 8 suppressions
  1. 128 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/CheckFormGridCycleController.java
  2. 75 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/CheckFormGridCyclePO.java
  3. 4 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/DangerCategoryPO.java
  4. 0 8
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/DangerCheckFormPO.java
  5. 57 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/CheckFormGridCycleVO.java
  6. 55 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkformgridcycle/ReqCreateCheckFormGridCycle.java
  7. 59 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkformgridcycle/ReqModifyCheckFormGridCycle.java
  8. 23 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchCheckFormGridCycle.java
  9. 14 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/CheckFormGridCycleMapper.java
  10. 100 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckFormGridCycleMapperImpl.java
  11. 212 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckFormGridCycleService.java
  12. 212 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordItemService.java
  13. 212 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/DangerCheckItemService.java

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

@@ -0,0 +1,128 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.controller;
+
+import com.customs.cq.datacenter.common.ExecutedResult;
+import com.customs.cq.datacenter.common.PagerResult;
+import com.customs.cq.datacenter.common.utils.ParameterUtil;
+import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
+import com.customs.cq.datacenter.common.validator.ParameterValidator;
+import com.customs.cq.datacenter.common.core.controller.BasicController;
+import com.customs.cq.datacenter.common.model.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+import com.customs.cq.datacenter.business.service.CheckFormGridCycleService;
+import com.customs.cq.datacenter.business.entity.request.checkformgridcycle.ReqCreateCheckFormGridCycle;
+import com.customs.cq.datacenter.business.entity.request.checkformgridcycle.ReqModifyCheckFormGridCycle;
+import com.customs.cq.datacenter.business.entity.search.SearchCheckFormGridCycle;
+import com.customs.cq.datacenter.business.domain.vo.CheckFormGridCycleVO;
+
+/**
+ * 9000.检查表-网格-频率设置
+ * @author lin.liu
+ * @description 9000.检查表-网格-频率设置
+ * @order 9000
+ */
+@RestController
+@RequestMapping(value = "checkFormGridCycle")
+public class CheckFormGridCycleController extends BasicController {
+    @Autowired
+    private CheckFormGridCycleService service;
+
+    /**
+     * 创建[检查表-网格-频率设置]
+     * @author lin.liu
+     * @description 创建[检查表-网格-频率设置]
+     */
+    @PostMapping(value = "create")
+    public ExecutedResult<Long> create(@RequestBody ReqCreateCheckFormGridCycle request) {
+        //#region 参数验证
+        ParameterValidator validator = new ParameterValidator()
+                // 非空
+                //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName())
+                // 限制最大长度
+                //.addLengthMax(ParameterUtil.named("名称"), request.getName(), Constants.LENGTH_MAX50)
+                ;
+        ParameterValidateResult result = validator.validate();
+        if (result.getIsFiled()) {
+            return failed(result.getErrorMsg());
+        }
+        //#endregion
+        return this.service.create(request);
+    }
+
+    /**
+     * 编辑[检查表-网格-频率设置]
+     * @author lin.liu
+     * @description 编辑[检查表-网格-频率设置]
+     */
+    @PostMapping(value = "modify")
+    public ExecutedResult<String> modify(@RequestBody ReqModifyCheckFormGridCycle request) {
+        //#region 参数验证
+        ParameterValidator validator = new ParameterValidator()
+                // 必须大于0
+                .addGreater(ParameterUtil.named("[检查表-网格-频率设置]id"), request.getId(), 0L)
+                // 非空
+                //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName())
+                // 限制最大长度
+                //.addLengthMax(ParameterUtil.named("名称"), request.getName(), Constants.LENGTH_MAX50)
+                ;
+        ParameterValidateResult result = validator.validate();
+        if (result.getIsFiled()) {
+            return failed(result.getErrorMsg());
+        }
+        //#endregion
+        return this.service.modify(request);
+    }
+
+    /**
+     * 获取[检查表-网格-频率设置]
+     * @author lin.liu
+     * @description 获取[检查表-网格-频率设置]
+     */
+    @GetMapping(value = "get/{id}")
+    public ExecutedResult<CheckFormGridCycleVO> get(@PathVariable Long id) {
+        return this.service.get(id);
+    }
+
+    /**
+     * 根据id批量获取[检查表-网格-频率设置]
+     * @author lin.liu
+     * @description 根据id批量获取[检查表-网格-频率设置]
+     */
+    @PostMapping(value = "getList")
+    public ExecutedResult<List<CheckFormGridCycleVO>> getList(@RequestBody ReqListId request) {
+        return this.service.getList(request.getListId());
+    }
+
+    /**
+     * 查询[检查表-网格-频率设置]
+     * @author lin.liu
+     * @description 查询[检查表-网格-频率设置]
+     */
+    @PostMapping(value = "search")
+    public ExecutedResult<PagerResult<CheckFormGridCycleVO>> search(@RequestBody SearchCheckFormGridCycle request) {
+        return this.service.search(request);
+    }
+}

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

@@ -0,0 +1,75 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.domain;
+
+import lombok.Data;
+
+import com.baomidou.mybatisplus.annotation.*;
+import java.sql.Timestamp;
+import java.time.LocalDate;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Data
+@TableName("SP_CHECK_FORM_GRID_CYCLE")
+public class CheckFormGridCyclePO {
+	/**
+	 * 主键
+	 */
+	private Long id;
+	/**
+	 * 关联检查表
+	 */
+	private Long checkFormId;
+	/**
+	 * 检查表名称
+	 */
+	private String checkFormName;
+	/**
+	 * 关联网格
+	 */
+	private Long gridId;
+	/**
+	 * 网格名称
+	 */
+	private String gridName;
+	/**
+	 * 检查频率 ECheckCycle
+	 */
+	private Integer checkCycle;
+	/**
+	 * 数据创建时间
+	 */
+	private Long createTime;
+	/**
+	 * 最后更新时间
+	 */
+	private Timestamp updateTime;
+	/**
+	 * 是否删除(逻辑删除)
+	 */
+	private Integer isDelete;
+}

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

@@ -48,6 +48,10 @@ public class DangerCategoryPO {
 	 * 描述
 	 */
 	private String description;
+	/**
+	 * 检查频率 ECheckCycle
+	 */
+	private Integer checkCycle;
 	/**
 	 * 状态 EState
 	 */

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

@@ -44,14 +44,6 @@ public class DangerCheckFormPO {
 	 * 检查表名称
 	 */
 	private String name;
-	/**
-	 * 所属部门
-	 */
-	private String department;
-	/**
-	 * 部门名称
-	 */
-	private String departmentName;
 	/**
 	 * 隐患分类
 	 */

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

@@ -0,0 +1,57 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.domain.vo;
+
+import lombok.Data;
+
+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.core.vo.BasicVO;
+import com.customs.cq.datacenter.business.domain.CheckFormGridCyclePO;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Data
+public class CheckFormGridCycleVO extends CheckFormGridCyclePO implements BasicVO {
+
+    @Override
+    public String getCreateTimeView() {
+        if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) {
+            return LocalDateTimeUtil.toFormatString(this.getCreateTime());
+        }
+        return "";
+    }
+
+    @Override
+    public String getUpdateTimeView() {
+        if (Objects.isNull(this.getUpdateTime())) {
+            return "";
+        }
+        return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime());
+    }
+}

+ 55 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkformgridcycle/ReqCreateCheckFormGridCycle.java

@@ -0,0 +1,55 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.entity.request.checkformgridcycle;
+
+import lombok.Data;
+import java.time.LocalDate;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Data
+public class ReqCreateCheckFormGridCycle {
+	/**
+	 * 关联检查表
+	 */
+	private Long checkFormId;
+	/**
+	 * 检查表名称
+	 */
+	private String checkFormName;
+	/**
+	 * 关联网格
+	 */
+	private Long gridId;
+	/**
+	 * 网格名称
+	 */
+	private String gridName;
+	/**
+	 * 检查频率 ECheckCycle
+	 */
+	private Integer checkCycle;
+}

+ 59 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkformgridcycle/ReqModifyCheckFormGridCycle.java

@@ -0,0 +1,59 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.entity.request.checkformgridcycle;
+
+import lombok.Data;
+import java.time.LocalDate;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Data
+public class ReqModifyCheckFormGridCycle {
+	/**
+	 * 主键
+	 */
+	private Long id;
+	/**
+	 * 关联检查表
+	 */
+	private Long checkFormId;
+	/**
+	 * 检查表名称
+	 */
+	private String checkFormName;
+	/**
+	 * 关联网格
+	 */
+	private Long gridId;
+	/**
+	 * 网格名称
+	 */
+	private String gridName;
+	/**
+	 * 检查频率 ECheckCycle
+	 */
+	private Integer checkCycle;
+}

+ 23 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchCheckFormGridCycle.java

@@ -0,0 +1,23 @@
+package com.customs.cq.datacenter.business.entity.search;
+
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+public class SearchCheckFormGridCycle extends SearchBasicDTO {
+	@Override
+	public String toString() {
+		return "SearchCheckFormGridCycle{" + "'" +
+			"keywords='" + getKeywords() +
+			", status =" + getStatus() +
+			", listStatus =" + getListStatus() +
+			", createTimeRange='" + getCreateTimeRange() + "'" +
+			", createTimeStart =" + getCreateTimeEnd() +
+			", createTimeEnd =" + getCreateTimeEnd() +
+			", orderBy='" + getOrderBy() + "'" +
+		'}';
+	}
+}

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

@@ -0,0 +1,14 @@
+package com.customs.cq.datacenter.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.customs.cq.datacenter.business.domain.CheckFormGridCyclePO;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Mapper
+public interface CheckFormGridCycleMapper extends BaseMapper<CheckFormGridCyclePO> {
+}

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

@@ -0,0 +1,100 @@
+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.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 org.springframework.stereotype.Repository;
+import com.customs.cq.datacenter.business.entity.search.SearchCheckFormGridCycle;
+import com.customs.cq.datacenter.business.domain.CheckFormGridCyclePO;
+import com.customs.cq.datacenter.business.mapper.CheckFormGridCycleMapper;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Repository
+public class CheckFormGridCycleMapperImpl extends BasicMapper<CheckFormGridCyclePO> {
+    public CheckFormGridCycleMapperImpl(CheckFormGridCycleMapper mapper) {
+        super(mapper);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param request 请求参数
+     */
+    @Override
+    public IPage<CheckFormGridCyclePO> search(SearchBasicDTO request) {
+        // 查询条件类型还原
+        SearchCheckFormGridCycle search = (SearchCheckFormGridCycle)request;
+
+        LambdaQueryWrapper<CheckFormGridCyclePO> queryWrapper = this.getQuery();
+        // 状态非逻辑删除
+        queryWrapper.eq(CheckFormGridCyclePO::getIsDelete, EYesOrNo.NO.getValue());
+        // 状态
+        //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, CheckFormGridCyclePO::getState, search.getStatus());
+        // 状态列表
+        //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), CheckFormGridCyclePO::getState, search.getListStatus());
+        // 数据创建时间-起始
+        queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, CheckFormGridCyclePO::getCreateTime, search.getCreateTimeStart());
+        // 数据创建时间-截止
+        queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, CheckFormGridCyclePO::getCreateTime, search.getCreateTimeEnd());
+        // 关键字
+        //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) {
+        //    queryWrapper.and(q ->
+        //        q.like(CheckFormGridCyclePO::getRealName, search.getKeywords())
+        //        .or().like(CheckFormGridCyclePO::getContactPhone, search.getKeywords())
+        //    );
+        //}
+        // 排序处理
+        if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) {
+            for (OrderByDTO item : search.getOrderBy()) {
+                EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy());
+                // 顺序排序
+                if (item.getIsAsc()) {
+                    switch (orderBy) {
+                        // 主键
+                        case ID:
+                            queryWrapper.orderByAsc(CheckFormGridCyclePO::getId);
+                            break;
+                        // 数据创建时间
+                        case CREATE_TIME:
+                            queryWrapper.orderByAsc(CheckFormGridCyclePO::getCreateTime);
+                            break;
+                        // 最后更新时间
+                        case UPDATE_TIME:
+                            queryWrapper.orderByAsc(CheckFormGridCyclePO::getUpdateTime);
+                            break;
+                    }
+                } else {
+                    // 倒叙排序
+                    switch (orderBy) {
+                        // 主键
+                        case ID:
+                            queryWrapper.orderByAsc(CheckFormGridCyclePO::getId);
+                            break;
+                            // 数据创建时间
+                        case CREATE_TIME:
+                            queryWrapper.orderByAsc(CheckFormGridCyclePO::getCreateTime);
+                            break;
+                            // 最后更新时间
+                        case UPDATE_TIME:
+                            queryWrapper.orderByAsc(CheckFormGridCyclePO::getUpdateTime);
+                            break;
+                    }
+                }
+            }
+        } else {
+            queryWrapper.orderByDesc(CheckFormGridCyclePO::getId);
+        }
+        return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
+    }
+}

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

@@ -0,0 +1,212 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.customs.cq.datacenter.common.*;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.model.Tuple;
+import com.customs.cq.datacenter.common.utils.*;
+import com.customs.cq.datacenter.common.core.service.BasicService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import com.customs.cq.datacenter.business.mapper.impl.CheckFormGridCycleMapperImpl;
+import com.customs.cq.datacenter.business.entity.request.checkformgridcycle.ReqCreateCheckFormGridCycle;
+import com.customs.cq.datacenter.business.entity.request.checkformgridcycle.ReqModifyCheckFormGridCycle;
+import com.customs.cq.datacenter.business.entity.search.SearchCheckFormGridCycle;
+import com.customs.cq.datacenter.business.domain.CheckFormGridCyclePO;
+import com.customs.cq.datacenter.business.domain.vo.CheckFormGridCycleVO;
+
+/**
+ * 检查表-网格-频率设置
+ * @author lin.liu
+ * @description 检查表-网格-频率设置
+ */
+@Service
+public class CheckFormGridCycleService extends BasicService {
+    @Autowired
+    private CheckFormGridCycleMapperImpl dao;
+
+    public ExecutedResult<Long> create(ReqCreateCheckFormGridCycle request) {
+        // 转换po
+        CheckFormGridCyclePO item = CopierUtil.mapTo(request, CheckFormGridCyclePO.class);
+        // 设置主键
+        item.setId(SnowFlakeUtil.getId());
+        // 设置状态
+        //item.setStatus(EState.NORMAL.getValue());
+        // 设置记录创建时间
+        item.setCreateTime(LocalDateTimeUtil.nowTimeStamp());
+        // 是否删除(逻辑删除)初始值
+        item.setIsDelete(EYesOrNo.NO.getValue());
+
+        int result = this.dao.insert(item);
+        if (result != 1) {
+            return ExecutedResult.failed("创建[检查表-网格-频率设置]失败。");
+        }
+        return ExecutedResult.success(item.getId());
+    }
+
+    public ExecutedResult<String> modify(ReqModifyCheckFormGridCycle request) {
+        // 验证记录是否存在
+        ExecutedResult<CheckFormGridCyclePO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        // 转换po
+        CheckFormGridCyclePO item = CopierUtil.mapTo(request, CheckFormGridCyclePO.class);
+
+        int result = this.dao.updateById(item);
+        if (result != 1) {
+            return ExecutedResult.failed("编辑[检查表-网格-频率设置]失败。");
+        }
+        return ExecutedResult.success();
+    }
+
+    public ExecutedResult<CheckFormGridCycleVO> get(Long id) {
+        CheckFormGridCycleVO result = new CheckFormGridCycleVO();
+
+        CheckFormGridCyclePO find = dao.selectById(id);
+        if (null != find) {
+            result = CopierUtil.mapTo(find, CheckFormGridCycleVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+//    public ExecutedResult<String> stop(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckFormGridCyclePO> checkExists = this.check4Id(id);
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckFormGridCyclePO item = new CheckFormGridCyclePO();
+//        item.setId(id);
+//        item.setStatus(EState.DISABLED.getValue());
+//
+//       int result = this.dao.updateById(item);
+//       if (result != 1) {
+//           return ExecutedResult.failed("停用[检查表-网格-频率设置]失败。");
+//       }
+//       return ExecutedResult.success();
+//   }
+//
+//    public ExecutedResult<String> enable(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckFormGridCyclePO> checkExists = this.check4Id(id);
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckFormGridCyclePO item = new CheckFormGridCyclePO();
+//        item.setId(id);
+//        item.setStatus(EState.NORMAL.getValue());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("启用[检查表-网格-频率设置]失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> setSort(ReqSetSort request) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckFormGridCyclePO> checkExists = this.check4Id(request.getId());
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckFormGridCyclePO item = new CheckFormGridCyclePO();
+//        item.setId(request.getId());
+//        item.setSort(request.getSort());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("设置[检查表-网格-频率设置]排序值失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> remove(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckFormGridCyclePO> checkExists = this.check4Id(request.getId());
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckFormGridCyclePO item = new CheckFormGridCyclePO();
+//        item.setId(request.getId());
+//        item.setIsDelete(EYesOrNo.Yes.getValue());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("设置[检查表-网格-频率设置]排序值失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> removeList(List<Long> ids) {
+//        Boolean result = this.dao.removeByListId(ids);
+//        if (BooleanUtils.isFalse(result)) {
+//            return ExecutedResult.failed("删除[检查表-网格-频率设置]失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+
+    public ExecutedResult<List<CheckFormGridCycleVO>> getList(List<Long> listId) {
+        List<CheckFormGridCycleVO> result = new ArrayList<>();
+
+        List<CheckFormGridCyclePO> list = this.dao.selectBatchIds(listId);
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            result = CopierUtil.mapTo(list, CheckFormGridCycleVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<PagerResult<CheckFormGridCycleVO>> search(SearchCheckFormGridCycle search) {
+        // 处理创建时间范围-查询参数
+        Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange());
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) {
+            search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime());
+        }
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) {
+            search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime());
+        }
+
+        IPage<CheckFormGridCyclePO> pageList = dao.search(search);
+        List<CheckFormGridCycleVO> listVo = new ArrayList<>();
+        List<CheckFormGridCyclePO> list = pageList.getRecords();
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            // 转换vo
+            listVo = CopierUtil.mapTo(list, CheckFormGridCycleVO.class);
+        }
+        PagerResult<CheckFormGridCycleVO> result = new PagerResult<>(pageList.getSize(), pageList.getCurrent(), pageList.getTotal(), listVo);
+        return ExecutedResult.success(result);
+    }
+
+    protected ExecutedResult<CheckFormGridCyclePO> check4Id(Long id) {
+        CheckFormGridCyclePO exists = dao.selectById(id);
+        if (Objects.isNull(exists)) {
+            return ExecutedResult.failed("[检查表-网格-频率设置]不存在:" + id);
+        }
+        return ExecutedResult.success(exists);
+    }
+}

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

@@ -0,0 +1,212 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.customs.cq.datacenter.common.*;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.model.Tuple;
+import com.customs.cq.datacenter.common.utils.*;
+import com.customs.cq.datacenter.common.core.service.BasicService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import com.customs.cq.datacenter.business.mapper.impl.CheckRecordItemMapperImpl;
+import com.customs.cq.datacenter.business.entity.request.checkrecorditem.ReqCreateCheckRecordItem;
+import com.customs.cq.datacenter.business.entity.request.checkrecorditem.ReqModifyCheckRecordItem;
+import com.customs.cq.datacenter.business.entity.search.SearchCheckRecordItem;
+import com.customs.cq.datacenter.business.domain.CheckRecordItemPO;
+import com.customs.cq.datacenter.business.domain.vo.CheckRecordItemVO;
+
+/**
+ * 隐患检查-检查项
+ * @author lin.liu
+ * @description 隐患检查-检查项
+ */
+@Service
+public class CheckRecordItemService extends BasicService {
+    @Autowired
+    private CheckRecordItemMapperImpl dao;
+
+    public ExecutedResult<Long> create(ReqCreateCheckRecordItem request) {
+        // 转换po
+        CheckRecordItemPO item = CopierUtil.mapTo(request, CheckRecordItemPO.class);
+        // 设置主键
+        item.setId(SnowFlakeUtil.getId());
+        // 设置状态
+        //item.setStatus(EState.NORMAL.getValue());
+        // 设置记录创建时间
+        item.setCreateTime(LocalDateTimeUtil.nowTimeStamp());
+        // 是否删除(逻辑删除)初始值
+        item.setIsDelete(EYesOrNo.NO.getValue());
+
+        int result = this.dao.insert(item);
+        if (result != 1) {
+            return ExecutedResult.failed("创建[隐患检查-检查项]失败。");
+        }
+        return ExecutedResult.success(item.getId());
+    }
+
+    public ExecutedResult<String> modify(ReqModifyCheckRecordItem request) {
+        // 验证记录是否存在
+        ExecutedResult<CheckRecordItemPO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        // 转换po
+        CheckRecordItemPO item = CopierUtil.mapTo(request, CheckRecordItemPO.class);
+
+        int result = this.dao.updateById(item);
+        if (result != 1) {
+            return ExecutedResult.failed("编辑[隐患检查-检查项]失败。");
+        }
+        return ExecutedResult.success();
+    }
+
+    public ExecutedResult<CheckRecordItemVO> get(Long id) {
+        CheckRecordItemVO result = new CheckRecordItemVO();
+
+        CheckRecordItemPO find = dao.selectById(id);
+        if (null != find) {
+            result = CopierUtil.mapTo(find, CheckRecordItemVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+//    public ExecutedResult<String> stop(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckRecordItemPO> checkExists = this.check4Id(id);
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckRecordItemPO item = new CheckRecordItemPO();
+//        item.setId(id);
+//        item.setStatus(EState.DISABLED.getValue());
+//
+//       int result = this.dao.updateById(item);
+//       if (result != 1) {
+//           return ExecutedResult.failed("停用[隐患检查-检查项]失败。");
+//       }
+//       return ExecutedResult.success();
+//   }
+//
+//    public ExecutedResult<String> enable(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckRecordItemPO> checkExists = this.check4Id(id);
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckRecordItemPO item = new CheckRecordItemPO();
+//        item.setId(id);
+//        item.setStatus(EState.NORMAL.getValue());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("启用[隐患检查-检查项]失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> setSort(ReqSetSort request) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckRecordItemPO> checkExists = this.check4Id(request.getId());
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckRecordItemPO item = new CheckRecordItemPO();
+//        item.setId(request.getId());
+//        item.setSort(request.getSort());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("设置[隐患检查-检查项]排序值失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> remove(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<CheckRecordItemPO> checkExists = this.check4Id(request.getId());
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        CheckRecordItemPO item = new CheckRecordItemPO();
+//        item.setId(request.getId());
+//        item.setIsDelete(EYesOrNo.Yes.getValue());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("设置[隐患检查-检查项]排序值失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> removeList(List<Long> ids) {
+//        Boolean result = this.dao.removeByListId(ids);
+//        if (BooleanUtils.isFalse(result)) {
+//            return ExecutedResult.failed("删除[隐患检查-检查项]失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+
+    public ExecutedResult<List<CheckRecordItemVO>> getList(List<Long> listId) {
+        List<CheckRecordItemVO> result = new ArrayList<>();
+
+        List<CheckRecordItemPO> list = this.dao.selectBatchIds(listId);
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            result = CopierUtil.mapTo(list, CheckRecordItemVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<PagerResult<CheckRecordItemVO>> search(SearchCheckRecordItem search) {
+        // 处理创建时间范围-查询参数
+        Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange());
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) {
+            search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime());
+        }
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) {
+            search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime());
+        }
+
+        IPage<CheckRecordItemPO> pageList = dao.search(search);
+        List<CheckRecordItemVO> listVo = new ArrayList<>();
+        List<CheckRecordItemPO> list = pageList.getRecords();
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            // 转换vo
+            listVo = CopierUtil.mapTo(list, CheckRecordItemVO.class);
+        }
+        PagerResult<CheckRecordItemVO> result = new PagerResult<>(pageList.getSize(), pageList.getCurrent(), pageList.getTotal(), listVo);
+        return ExecutedResult.success(result);
+    }
+
+    protected ExecutedResult<CheckRecordItemPO> check4Id(Long id) {
+        CheckRecordItemPO exists = dao.selectById(id);
+        if (Objects.isNull(exists)) {
+            return ExecutedResult.failed("[隐患检查-检查项]不存在:" + id);
+        }
+        return ExecutedResult.success(exists);
+    }
+}

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

@@ -0,0 +1,212 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.customs.cq.datacenter.common.*;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.model.Tuple;
+import com.customs.cq.datacenter.common.utils.*;
+import com.customs.cq.datacenter.common.core.service.BasicService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import com.customs.cq.datacenter.business.mapper.impl.DangerCheckItemMapperImpl;
+import com.customs.cq.datacenter.business.entity.request.dangercheckitem.ReqCreateDangerCheckItem;
+import com.customs.cq.datacenter.business.entity.request.dangercheckitem.ReqModifyDangerCheckItem;
+import com.customs.cq.datacenter.business.entity.search.SearchDangerCheckItem;
+import com.customs.cq.datacenter.business.domain.DangerCheckItemPO;
+import com.customs.cq.datacenter.business.domain.vo.DangerCheckItemVO;
+
+/**
+ * 隐患检查表-检查项
+ * @author lin.liu
+ * @description 隐患检查表-检查项
+ */
+@Service
+public class DangerCheckItemService extends BasicService {
+    @Autowired
+    private DangerCheckItemMapperImpl dao;
+
+    public ExecutedResult<Long> create(ReqCreateDangerCheckItem request) {
+        // 转换po
+        DangerCheckItemPO item = CopierUtil.mapTo(request, DangerCheckItemPO.class);
+        // 设置主键
+        item.setId(SnowFlakeUtil.getId());
+        // 设置状态
+        //item.setStatus(EState.NORMAL.getValue());
+        // 设置记录创建时间
+        item.setCreateTime(LocalDateTimeUtil.nowTimeStamp());
+        // 是否删除(逻辑删除)初始值
+        item.setIsDelete(EYesOrNo.NO.getValue());
+
+        int result = this.dao.insert(item);
+        if (result != 1) {
+            return ExecutedResult.failed("创建[隐患检查表-检查项]失败。");
+        }
+        return ExecutedResult.success(item.getId());
+    }
+
+    public ExecutedResult<String> modify(ReqModifyDangerCheckItem request) {
+        // 验证记录是否存在
+        ExecutedResult<DangerCheckItemPO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        // 转换po
+        DangerCheckItemPO item = CopierUtil.mapTo(request, DangerCheckItemPO.class);
+
+        int result = this.dao.updateById(item);
+        if (result != 1) {
+            return ExecutedResult.failed("编辑[隐患检查表-检查项]失败。");
+        }
+        return ExecutedResult.success();
+    }
+
+    public ExecutedResult<DangerCheckItemVO> get(Long id) {
+        DangerCheckItemVO result = new DangerCheckItemVO();
+
+        DangerCheckItemPO find = dao.selectById(id);
+        if (null != find) {
+            result = CopierUtil.mapTo(find, DangerCheckItemVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+//    public ExecutedResult<String> stop(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<DangerCheckItemPO> checkExists = this.check4Id(id);
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        DangerCheckItemPO item = new DangerCheckItemPO();
+//        item.setId(id);
+//        item.setStatus(EState.DISABLED.getValue());
+//
+//       int result = this.dao.updateById(item);
+//       if (result != 1) {
+//           return ExecutedResult.failed("停用[隐患检查表-检查项]失败。");
+//       }
+//       return ExecutedResult.success();
+//   }
+//
+//    public ExecutedResult<String> enable(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<DangerCheckItemPO> checkExists = this.check4Id(id);
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        DangerCheckItemPO item = new DangerCheckItemPO();
+//        item.setId(id);
+//        item.setStatus(EState.NORMAL.getValue());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("启用[隐患检查表-检查项]失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> setSort(ReqSetSort request) {
+//        // 验证记录是否存在
+//        ExecutedResult<DangerCheckItemPO> checkExists = this.check4Id(request.getId());
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        DangerCheckItemPO item = new DangerCheckItemPO();
+//        item.setId(request.getId());
+//        item.setSort(request.getSort());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("设置[隐患检查表-检查项]排序值失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> remove(Long id) {
+//        // 验证记录是否存在
+//        ExecutedResult<DangerCheckItemPO> checkExists = this.check4Id(request.getId());
+//        if (checkExists.isFailed()) {
+//            return ExecutedResult.failed(checkExists.getMsg());
+//        }
+//        DangerCheckItemPO item = new DangerCheckItemPO();
+//        item.setId(request.getId());
+//        item.setIsDelete(EYesOrNo.Yes.getValue());
+//
+//        int result = this.dao.updateById(item);
+//        if (result != 1) {
+//            return ExecutedResult.failed("设置[隐患检查表-检查项]排序值失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+//
+//    public ExecutedResult<String> removeList(List<Long> ids) {
+//        Boolean result = this.dao.removeByListId(ids);
+//        if (BooleanUtils.isFalse(result)) {
+//            return ExecutedResult.failed("删除[隐患检查表-检查项]失败。");
+//        }
+//        return ExecutedResult.success();
+//    }
+
+    public ExecutedResult<List<DangerCheckItemVO>> getList(List<Long> listId) {
+        List<DangerCheckItemVO> result = new ArrayList<>();
+
+        List<DangerCheckItemPO> list = this.dao.selectBatchIds(listId);
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            result = CopierUtil.mapTo(list, DangerCheckItemVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<PagerResult<DangerCheckItemVO>> search(SearchDangerCheckItem search) {
+        // 处理创建时间范围-查询参数
+        Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange());
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) {
+            search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime());
+        }
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) {
+            search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime());
+        }
+
+        IPage<DangerCheckItemPO> pageList = dao.search(search);
+        List<DangerCheckItemVO> listVo = new ArrayList<>();
+        List<DangerCheckItemPO> list = pageList.getRecords();
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            // 转换vo
+            listVo = CopierUtil.mapTo(list, DangerCheckItemVO.class);
+        }
+        PagerResult<DangerCheckItemVO> result = new PagerResult<>(pageList.getSize(), pageList.getCurrent(), pageList.getTotal(), listVo);
+        return ExecutedResult.success(result);
+    }
+
+    protected ExecutedResult<DangerCheckItemPO> check4Id(Long id) {
+        DangerCheckItemPO exists = dao.selectById(id);
+        if (Objects.isNull(exists)) {
+            return ExecutedResult.failed("[隐患检查表-检查项]不存在:" + id);
+        }
+        return ExecutedResult.success(exists);
+    }
+}