hfxc226 2 жил өмнө
parent
commit
94b75398b0
23 өөрчлөгдсөн 1752 нэмэгдсэн , 2 устгасан
  1. 17 0
      platform-dao/src/main/java/com/platform/dao/dto/light/BatchLightLogDTO.java
  2. 158 0
      platform-dao/src/main/java/com/platform/dao/dto/light/LightDTO.java
  3. 111 0
      platform-dao/src/main/java/com/platform/dao/dto/light/LightLogDTO.java
  4. 8 0
      platform-dao/src/main/java/com/platform/dao/dto/sb/SbPositionDTO.java
  5. 121 0
      platform-dao/src/main/java/com/platform/dao/entity/light/Light.java
  6. 89 0
      platform-dao/src/main/java/com/platform/dao/entity/light/LightLog.java
  7. 8 0
      platform-dao/src/main/java/com/platform/dao/entity/sb/SbPosition.java
  8. 30 0
      platform-dao/src/main/java/com/platform/dao/mapper/light/LightLogMapper.java
  9. 30 0
      platform-dao/src/main/java/com/platform/dao/mapper/light/LightMapper.java
  10. 106 0
      platform-dao/src/main/java/com/platform/dao/vo/export/light/ExportLightLogVO.java
  11. 131 0
      platform-dao/src/main/java/com/platform/dao/vo/export/light/ExportLightVO.java
  12. 82 0
      platform-dao/src/main/java/com/platform/dao/vo/query/light/LightLogVO.java
  13. 113 0
      platform-dao/src/main/java/com/platform/dao/vo/query/light/LightVO.java
  14. 8 0
      platform-dao/src/main/java/com/platform/dao/vo/sb/SbPositionVO.java
  15. 101 0
      platform-dao/src/main/resources/mapper/light/LightLogMapper.xml
  16. 150 0
      platform-dao/src/main/resources/mapper/light/LightMapper.xml
  17. 5 2
      platform-dao/src/main/resources/mapper/sb/SbPositionMapper.xml
  18. 142 0
      platform-rest/src/main/java/com/platform/rest/controller/light/LightController.java
  19. 150 0
      platform-rest/src/main/java/com/platform/rest/controller/light/LightLogController.java
  20. 42 0
      platform-service/src/main/java/com/platform/service/light/LightLogService.java
  21. 39 0
      platform-service/src/main/java/com/platform/service/light/LightService.java
  22. 61 0
      platform-service/src/main/java/com/platform/service/light/impl/LightLogServiceImpl.java
  23. 50 0
      platform-service/src/main/java/com/platform/service/light/impl/LightServiceImpl.java

+ 17 - 0
platform-dao/src/main/java/com/platform/dao/dto/light/BatchLightLogDTO.java

@@ -0,0 +1,17 @@
+package com.platform.dao.dto.light;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class BatchLightLogDTO implements Serializable {
+
+    private List<LightLogDTO> lightLogDTOList;
+
+    /**
+     * 在库ID集合
+     */
+    private List<String> toolIds;
+}

+ 158 - 0
platform-dao/src/main/java/com/platform/dao/dto/light/LightDTO.java

@@ -0,0 +1,158 @@
+package com.platform.dao.dto.light;
+
+import com.platform.common.bean.BaseDTO;
+import com.platform.common.validation.group.UpdateGroup;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.persistence.Transient;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 防雷检测点位管理DTO
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = true)
+public class LightDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 主键
+     */
+    @NotNull(groups = {UpdateGroup.class}, message = "ID不能为空")
+    private String id;
+
+    /**
+     * 防雷检测点位名称
+     */
+    private String name;
+    /**
+     * 防雷检测点位型号
+     */
+    private String ggxh;
+    /**
+     * 编号
+     */
+    private String no;
+    /**
+     * 数量
+     */
+    private Integer num;
+    /**
+     * 负责人
+     */
+    private String checkUserId;
+    /**
+     * 生产厂家
+     */
+    private String producer;
+    /**
+     * 是否合格:0否,1是
+     */
+    private String hgFlag;
+    /**
+     * 是否需要检验:0否,1是
+     */
+    private Integer checkFlag;
+    /**
+     * 检测内容
+     */
+    private String content;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 创建日期
+     */
+    private LocalDateTime createdTime;
+    /**
+     * 创建日期开始
+     */
+    private LocalDateTime createdTimeStart;
+    /**
+     * 创建日期结束
+     */
+    private LocalDateTime createdTimeEnd;
+    /**
+     * 更新日期
+     */
+    private LocalDateTime updateTime;
+    /**
+     * 更新日期开始
+     */
+    private LocalDateTime updateTimeStart;
+    /**
+     * 更新日期结束
+     */
+    private LocalDateTime updateTimeEnd;
+    /**
+     * 创建人
+     */
+    private String createdUserId;
+    /**
+     * 创建人名称
+     */
+    private String createdUserName;
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+    /**
+     * 更新人名称
+     */
+    private String updateUserName;
+    /**
+     * 存放地点:所属车间
+     */
+    private String position;
+    /**
+     * 检测日期
+     */
+    private LocalDate checkDate;
+    /**
+     * 检测日期开始
+     */
+    private LocalDate checkDateStart;
+    /**
+     * 检测日期结束
+     */
+    private LocalDate checkDateEnd;
+    /**
+     * 下次检测日期
+     */
+    private LocalDate nextCheckDate;
+    /**
+     * 下次检测日期开始
+     */
+    private LocalDate nextCheckDateStart;
+    /**
+     * 下次检测日期结束
+     */
+    private LocalDate nextCheckDateEnd;
+    /**
+     * 检测周期
+     */
+    private Integer period;
+    /**
+     * 预警天数
+     */
+    private Integer warnDay;
+    /**
+     * 关键字
+     */
+    private String keyword;
+
+    /**
+     * 筛选快到期需要检定的
+     */
+    @Transient
+    private Integer status;
+}

+ 111 - 0
platform-dao/src/main/java/com/platform/dao/dto/light/LightLogDTO.java

@@ -0,0 +1,111 @@
+package com.platform.dao.dto.light;
+
+import com.platform.common.bean.BaseDTO;
+import com.platform.common.validation.group.UpdateGroup;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具检定记录DTO
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = true)
+public class LightLogDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 主键
+     */
+    @NotNull(groups = {UpdateGroup.class}, message = "ID不能为空")
+    private String id;
+    /**
+     * 检验人
+     */
+    private String checkUserId;
+    /**
+     * 检验说明
+     */
+    private String requirement;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 创建人
+     */
+    private String createdUserId;
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+    /**
+     * 创建人名称
+     */
+    private String createdUserName;
+    /**
+     * 更新人名称
+     */
+    private String updateUserName;
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createdTime;
+    /**
+     * 创建时间开始
+     */
+    private LocalDateTime createdTimeStart;
+    /**
+     * 创建时间结束
+     */
+    private LocalDateTime createdTimeEnd;
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+    /**
+     * 更新时间开始
+     */
+    private LocalDateTime updateTimeStart;
+    /**
+     * 更新时间结束
+     */
+    private LocalDateTime updateTimeEnd;
+    /**
+     * 工器具id
+     */
+    private String toolId;
+    /**
+     * 检测日期
+     */
+    private LocalDate checkDate;
+    /**
+     * 检测日期开始
+     */
+    private LocalDate checkDateStart;
+    /**
+     * 检测日期结束
+     */
+    private LocalDate checkDateEnd;
+    /**
+     * 检定图片路径
+     */
+    private String imgPath;
+    /**
+     * 检定文件路径
+     */
+    private String filePath;
+    /**
+     * 关键字
+     */
+    private String keyword;
+
+}

+ 8 - 0
platform-dao/src/main/java/com/platform/dao/dto/sb/SbPositionDTO.java

@@ -29,6 +29,14 @@ public class SbPositionDTO extends BaseDTO implements Serializable {
      * 车间opc图片
      */
     private String opcImg;
+    /**
+     * 防雷标识:0否1是
+     */
+    private Integer lightFlag;
+    /**
+     * 防雷图片
+     */
+    private String lightImg;
     /**
      * 区域维修负责人
      */

+ 121 - 0
platform-dao/src/main/java/com/platform/dao/entity/light/Light.java

@@ -0,0 +1,121 @@
+package com.platform.dao.entity.light;
+
+import com.platform.common.bean.DataScope;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具管理实体类
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+@Table(name = "t_light")
+public class Light implements Serializable {
+
+    /**
+     * 主键
+     */
+    @Id
+    private String id;
+    /**
+     * 工器具名称
+     */
+    private String name;
+    /**
+     * 工器具型号
+     */
+    private String ggxh;
+    /**
+     * 编号
+     */
+    private String no;
+    /**
+     * 数量
+     */
+    private Integer num;
+    /**
+     * 负责人
+     */
+    private String checkUserId;
+    /**
+     * 生产厂家
+     */
+    private String producer;
+    /**
+     * 是否合格:0否,1是
+     */
+    private String hgFlag;
+    /**
+     * 是否需要检验:0否,1是
+     */
+    private Integer checkFlag;
+    /**
+     * 检测内容
+     */
+    private String content;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 创建日期
+     */
+    private LocalDateTime createdTime;
+    /**
+     * 更新日期
+     */
+    private LocalDateTime updateTime;
+    /**
+     * 创建人
+     */
+    private String createdUserId;
+    /**
+     * 创建人名称
+     */
+    private String createdUserName;
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+    /**
+     * 更新人名称
+     */
+    private String updateUserName;
+    /**
+     * 存放地点
+     */
+    private String position;
+    /**
+     * 检测日期
+     */
+    private LocalDate checkDate;
+    /**
+     * 下次检测日期
+     */
+    private LocalDate nextCheckDate;
+    /**
+     * 检测周期
+     */
+    private Integer period;
+    /**
+     * 预警天数
+     */
+    private Integer warnDay;
+
+    /**
+     * 数据权限
+     */
+    @Transient
+    private DataScope dataScope;
+
+}

+ 89 - 0
platform-dao/src/main/java/com/platform/dao/entity/light/LightLog.java

@@ -0,0 +1,89 @@
+package com.platform.dao.entity.light;
+
+import com.platform.common.bean.DataScope;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具检定记录实体类
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+@Table(name = "t_light_log")
+public class LightLog implements Serializable{
+
+    /**
+     * 主键
+     */
+        @Id
+    private String id;
+    /**
+     * 检验人
+     */
+    private String checkUserId;
+    /**
+     * 检验说明
+     */
+    private String requirement;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 创建人
+     */
+    private String createdUserId;
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+    /**
+     * 创建人名称
+     */
+    private String createdUserName;
+    /**
+     * 更新人名称
+     */
+    private String updateUserName;
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createdTime;
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+    /**
+     * 工器具id
+     */
+    private String toolId;
+    /**
+     * 检测日期
+     */
+    private LocalDate checkDate;
+    /**
+     * 检定图片路径
+     */
+    private String imgPath;
+    /**
+     * 检定文件路径
+     */
+    private String filePath;
+
+   /**
+    * 数据权限
+    */
+    @Transient
+    private DataScope dataScope;
+
+}

+ 8 - 0
platform-dao/src/main/java/com/platform/dao/entity/sb/SbPosition.java

@@ -28,6 +28,14 @@ public class SbPosition implements Serializable {
      * 车间opc图片
      */
     private String opcImg;
+    /**
+     * 防雷标识:0否1是
+     */
+    private Integer lightFlag;
+    /**
+     * 防雷图片
+     */
+    private String lightImg;
     /**
      * 区域维修负责人
      */

+ 30 - 0
platform-dao/src/main/java/com/platform/dao/mapper/light/LightLogMapper.java

@@ -0,0 +1,30 @@
+package com.platform.dao.mapper.light;
+
+import com.platform.dao.config.MyMapper;
+import com.platform.dao.dto.light.LightLogDTO;
+import com.platform.dao.dto.tool.ToolLogDTO;
+import com.platform.dao.entity.light.LightLog;
+import com.platform.dao.entity.tool.ToolLog;
+import com.platform.dao.vo.query.light.LightLogVO;
+import com.platform.dao.vo.query.tool.ToolLogVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * @Description 工器具检定记录 mapper
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Component
+public interface LightLogMapper extends MyMapper<LightLog> {
+    /**
+     * 分页查询
+     * @param dto
+     * @return
+     */
+    List<LightLogVO> selectList(LightLogDTO dto);
+
+}

+ 30 - 0
platform-dao/src/main/java/com/platform/dao/mapper/light/LightMapper.java

@@ -0,0 +1,30 @@
+package com.platform.dao.mapper.light;
+
+import com.platform.dao.config.MyMapper;
+import com.platform.dao.dto.light.LightDTO;
+import com.platform.dao.dto.tool.ToolDTO;
+import com.platform.dao.entity.light.Light;
+import com.platform.dao.entity.tool.Tool;
+import com.platform.dao.vo.query.light.LightVO;
+import com.platform.dao.vo.query.tool.ToolVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * @Description 工器具管理 mapper
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Component
+public interface LightMapper extends MyMapper<Light> {
+    /**
+     * 分页查询
+     * @param dto
+     * @return
+     */
+    List<LightVO> selectList(LightDTO dto);
+
+}

+ 106 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/light/ExportLightLogVO.java

@@ -0,0 +1,106 @@
+package com.platform.dao.vo.export.light;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具检定记录导出VO
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExportLightLogVO implements Serializable {
+
+    /**
+     * 主键
+     */
+    @Excel(name = "主键", orderNum = "1")
+    private String id;
+
+    /**
+     * 检验人
+     */
+    @Excel(name = "检验人", orderNum = "2")
+    private String checkUserId;
+
+    /**
+     * 检验说明
+     */
+    @Excel(name = "检验说明", orderNum = "3")
+    private String requirement;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", orderNum = "4")
+    private String remark;
+
+    /**
+     * 创建人
+     */
+    @Excel(name = "创建人", orderNum = "5")
+    private String createdUserId;
+
+    /**
+     * 更新人
+     */
+    @Excel(name = "更新人", orderNum = "6")
+    private String updateUserId;
+
+    /**
+     * 创建人名称
+     */
+    @Excel(name = "创建人名称", orderNum = "7")
+    private String createdUserName;
+
+    /**
+     * 更新人名称
+     */
+    @Excel(name = "更新人名称", orderNum = "8")
+    private String updateUserName;
+
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", orderNum = "9")
+    private LocalDateTime createdTime;
+
+    /**
+     * 更新时间
+     */
+    @Excel(name = "更新时间", orderNum = "10")
+    private LocalDateTime updateTime;
+
+    /**
+     * 工器具id
+     */
+    @Excel(name = "工器具id", orderNum = "11")
+    private String toolId;
+
+    /**
+     * 检测日期
+     */
+    @Excel(name = "检测日期", orderNum = "12")
+    private LocalDate checkDate;
+
+    /**
+     * 检定图片路径
+     */
+    @Excel(name = "检定图片路径", orderNum = "13")
+    private String imgPath;
+
+    /**
+     * 检定文件路径
+     */
+    @Excel(name = "检定文件路径", orderNum = "14")
+    private String filePath;
+
+
+}

+ 131 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/light/ExportLightVO.java

@@ -0,0 +1,131 @@
+package com.platform.dao.vo.export.light;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具管理导出VO
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExportLightVO implements Serializable {
+
+    /**
+     * 主键
+     */
+    @Excel(name = "主键", orderNum = "1")
+    private String id;
+
+    /**
+     * 工器具名称
+     */
+    @Excel(name = "工器具名称", orderNum = "2")
+    private String name;
+
+    /**
+     * 工器具型号
+     */
+    @Excel(name = "工器具型号", orderNum = "3")
+    private String ggxh;
+
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", orderNum = "4")
+    private LocalDateTime no;
+
+    /**
+     * 数量
+     */
+    @Excel(name = "数量", orderNum = "5")
+    private Integer num;
+
+    /**
+     * 负责人
+     */
+    @Excel(name = "负责人", orderNum = "6")
+    private String checkUserId;
+
+    /**
+     * 生产厂家
+     */
+    @Excel(name = "生产厂家", orderNum = "7")
+    private String producer;
+
+    /**
+     * 是否合格:0否,1是
+     */
+    @Excel(name = "是否合格", orderNum = "8", dicCode="YES_NO")
+    private String hgFlag;
+
+    /**
+     * 是否需要检验:0否,1是
+     */
+    @Excel(name = "是否需要检验", orderNum = "9", dicCode="YES_NO")
+    private Integer checkFlag;
+
+    /**
+     * 检测内容
+     */
+    @Excel(name = "检测内容", orderNum = "10")
+    private LocalDateTime content;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", orderNum = "11")
+    private String remark;
+
+    /**
+     * 创建日期
+     */
+    @Excel(name = "创建日期", orderNum = "12")
+    private LocalDateTime createdTime;
+
+    /**
+     * 更新日期
+     */
+    @Excel(name = "更新日期", orderNum = "13")
+    private LocalDateTime updateTime;
+
+    /**
+     * 存放地点
+     */
+    @Excel(name = "存放地点", orderNum = "14")
+    private String position;
+
+    /**
+     * 检测日期
+     */
+    @Excel(name = "检测日期", orderNum = "15")
+    private String checkDate;
+
+    /**
+     * 下次检测日期
+     */
+    @Excel(name = "下次检测日期", orderNum = "16")
+    private LocalDate nextCheckDate;
+
+    /**
+     * 检测周期
+     */
+    @Excel(name = "检测周期", orderNum = "17")
+    private BigDecimal period;
+
+    /**
+     * 预警天数
+     */
+    @Excel(name = "预警天数", orderNum = "18")
+    private Integer warnDay;
+
+
+}

+ 82 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/light/LightLogVO.java

@@ -0,0 +1,82 @@
+package com.platform.dao.vo.query.light;
+
+import com.platform.common.bean.BaseVO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具检定记录VO结果类
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = true)
+public class LightLogVO extends BaseVO implements Serializable{
+
+    /**
+     * 主键
+     */
+        private String id;
+        /**
+     * 检验人
+     */
+        private String checkUserId;
+        /**
+     * 检验说明
+     */
+        private String requirement;
+        /**
+     * 备注
+     */
+        private String remark;
+        /**
+     * 创建人
+     */
+        private String createdUserId;
+        /**
+     * 更新人
+     */
+        private String updateUserId;
+        /**
+     * 创建人名称
+     */
+        private String createdUserName;
+        /**
+     * 更新人名称
+     */
+        private String updateUserName;
+        /**
+     * 创建时间
+     */
+        private LocalDateTime createdTime;
+        /**
+     * 更新时间
+     */
+        private LocalDateTime updateTime;
+        /**
+     * 工器具id
+     */
+        private String toolId;
+        /**
+     * 检测日期
+     */
+        private LocalDate checkDate;
+        /**
+     * 检定图片路径
+     */
+        private String imgPath;
+        /**
+     * 检定文件路径
+     */
+        private String filePath;
+    
+
+
+}

+ 113 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/light/LightVO.java

@@ -0,0 +1,113 @@
+package com.platform.dao.vo.query.light;
+
+import com.platform.common.bean.BaseVO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工器具管理VO结果类
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = true)
+public class LightVO extends BaseVO implements Serializable {
+
+    /**
+     * 主键
+     */
+    private String id;
+    /**
+     * 工器具名称
+     */
+    private String name;
+    /**
+     * 工器具型号
+     */
+    private String ggxh;
+    /**
+     * 编号
+     */
+    private String no;
+    /**
+     * 数量
+     */
+    private Integer num;
+    /**
+     * 负责人
+     */
+    private String checkUserId;
+    /**
+     * 生产厂家
+     */
+    private String producer;
+    /**
+     * 是否合格:0否,1是
+     */
+    private String hgFlag;
+    /**
+     * 是否需要检验:0否,1是
+     */
+    private Integer checkFlag;
+    /**
+     * 检测内容
+     */
+    private String content;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 创建日期
+     */
+    private LocalDateTime createdTime;
+    /**
+     * 更新日期
+     */
+    private LocalDateTime updateTime;
+    /**
+     * 创建人
+     */
+    private String createdUserId;
+    /**
+     * 创建人名称
+     */
+    private String createdUserName;
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+    /**
+     * 更新人名称
+     */
+    private String updateUserName;
+    /**
+     * 存放地点
+     */
+    private String position;
+    /**
+     * 检测日期
+     */
+    private LocalDate checkDate;
+    /**
+     * 下次检测日期
+     */
+    private LocalDate nextCheckDate;
+    /**
+     * 检测周期
+     */
+    private Integer period;
+    /**
+     * 预警天数
+     */
+    private Integer warnDay;
+
+
+}

+ 8 - 0
platform-dao/src/main/java/com/platform/dao/vo/sb/SbPositionVO.java

@@ -26,6 +26,14 @@ public class SbPositionVO extends BaseVO implements Serializable {
      * 车间opc图片
      */
     private String opcImg;
+    /**
+     * 防雷标识:0否1是
+     */
+    private Integer lightFlag;
+    /**
+     * 防雷图片
+     */
+    private String lightImg;
     /**
      * 位置id
      */

+ 101 - 0
platform-dao/src/main/resources/mapper/light/LightLogMapper.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.platform.dao.mapper.light.LightLogMapper">
+    <sql id="Base_Column_List">
+        log.id,
+                                     log.check_user_id,
+                                     log.requirement,
+                                     log.remark,
+                                     log.created_user_id,
+                                     log.update_user_id,
+                                     log.created_user_name,
+                                     log.update_user_name,
+                                     log.created_time,
+                                     log.update_time,
+                                     log.tool_id,
+                                     log.check_date,
+                                     log.img_path,
+                                     log.file_path
+    </sql>
+    <sql id="Ref_Column_List">
+        log.check_user_id,
+                                     log.requirement,
+                                     log.remark,                                                                                                                                                                                                                                                                      log.tool_id,
+                                     log.check_date,
+                                     log.img_path,
+                                     log.file_path
+    </sql>
+    <sql id="List_Condition">
+        <if test="id != null and id != ''">
+            and log.id = #{id}
+        </if>
+        <if test="checkUserId != null and checkUserId != ''">
+            and log.check_user_id = #{checkUserId}
+        </if>
+        <if test="requirement != null and requirement != ''">
+            and log.requirement = #{requirement}
+        </if>
+        <if test="remark != null and remark != ''">
+            and log.remark = #{remark}
+        </if>
+        <if test="createdUserId != null and createdUserId != ''">
+            and log.created_user_id = #{createdUserId}
+        </if>
+        <if test="updateUserId != null and updateUserId != ''">
+            and log.update_user_id = #{updateUserId}
+        </if>
+        <if test="createdUserName != null and createdUserName != ''">
+            and log.created_user_name = #{createdUserName}
+        </if>
+        <if test="updateUserName != null and updateUserName != ''">
+            and log.update_user_name = #{updateUserName}
+        </if>
+        <if test="createdTimeStart != null">
+            and log.created_time <![CDATA[>=]]>; #{createdTimeStart}
+        </if>
+        <if test="createdTimeEnd != null">
+            and log.created_time <![CDATA[<=]]> #{createdTimeEnd}
+        </if>
+        <if test="createdTime != null">
+            and log.created_time = #{createdTime}
+        </if>
+        <if test="updateTimeStart != null">
+            and log.update_time <![CDATA[>=]]>; #{updateTimeStart}
+        </if>
+        <if test="updateTimeEnd != null">
+            and log.update_time <![CDATA[<=]]> #{updateTimeEnd}
+        </if>
+        <if test="updateTime != null">
+            and log.update_time = #{updateTime}
+        </if>
+        <if test="toolId != null and toolId != ''">
+            and log.tool_id = #{toolId}
+        </if>
+        <if test="checkDateStart != null">
+            and log.check_date <![CDATA[>=]]>; #{checkDateStart}
+        </if>
+        <if test="checkDateEnd != null">
+            and log.check_date <![CDATA[<=]]> #{checkDateEnd}
+        </if>
+        <if test="checkDate != null">
+            and log.check_date = #{checkDate}
+        </if>
+        <if test="imgPath != null and imgPath != ''">
+            and log.img_path = #{imgPath}
+        </if>
+        <if test="filePath != null and filePath != ''">
+            and log.file_path = #{filePath}
+        </if>
+        <if test="keyword != null and keyword != ''">
+            and log.id like concat(concat('%',#{keyword}),'%')
+        </if>
+    </sql>
+    <select id="selectList" parameterType="com.platform.dao.dto.light.LightLogDTO"
+            resultType="com.platform.dao.vo.query.light.LightLogVO">
+        select log.*
+        from t_light_log as log
+        <where>
+            <include refid="List_Condition"/>
+        </where>
+    </select>
+</mapper>

+ 150 - 0
platform-dao/src/main/resources/mapper/light/LightMapper.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.platform.dao.mapper.light.LightMapper">
+    <sql id="Base_Column_List">
+                                     light.id,
+                                     light.name,
+                                     light.ggxh,
+                                     light.no,
+                                     light.num,
+                                     light.check_user_id,
+                                     light.producer,
+                                     light.hg_flag,
+                                     light.check_flag,
+                                     light.content,
+                                     light.remark,
+                                     light.created_time,
+                                     light.update_time,
+                                     light.created_user_id,
+                                     light.created_user_name,
+                                     light.update_user_id,
+                                     light.update_user_name,
+                                     light.position,
+                                     light.check_date,
+                                     light.next_check_date,
+                                     light.period,
+                                     light.warn_day
+    </sql>
+    <sql id="Ref_Column_List">
+                                     light.name,
+                                     light.ggxh,
+                                     light.no,
+                                     light.num,
+                                     light.check_user_id,
+                                     light.producer,
+                                     light.hg_flag,
+                                     light.check_flag,
+                                     light.content,
+                                     light.remark,                                                                                                                                                                                                                                                                   light.position,
+                                     light.check_date,
+                                     light.next_check_date,
+                                     light.period,
+                                     light.warn_day
+    </sql>
+    <sql id="List_Condition">
+        <if test="id != null and id != ''">
+            and light.id = #{id}
+        </if>
+        <if test="name != null and name != ''">
+            and light.name = #{name}
+        </if>
+        <if test="ggxh != null and ggxh != ''">
+            and light.ggxh = #{ggxh}
+        </if>
+        <if test="no != null">
+            and light.no = #{no}
+        </if>
+        <if test="num != null">
+            and light.num = #{num}
+        </if>
+        <if test="checkUserId != null and checkUserId != ''">
+            and light.check_user_id = #{checkUserId}
+        </if>
+        <if test="producer != null and producer != ''">
+            and light.producer = #{producer}
+        </if>
+        <if test="hgFlag != null and hgFlag != ''">
+            and light.hg_flag = #{hgFlag}
+        </if>
+        <if test="checkFlag != null">
+            and light.check_flag = #{checkFlag}
+        </if>
+        <if test="content != null">
+            and light.content = #{content}
+        </if>
+        <if test="remark != null and remark != ''">
+            and light.remark = #{remark}
+        </if>
+        <if test="createdTimeStart != null">
+            and light.created_time <![CDATA[>=]]>; #{createdTimeStart}
+        </if>
+        <if test="createdTimeEnd != null">
+            and light.created_time <![CDATA[<=]]> #{createdTimeEnd}
+        </if>
+        <if test="createdTime != null">
+            and light.created_time = #{createdTime}
+        </if>
+        <if test="updateTimeStart != null">
+            and light.update_time <![CDATA[>=]]>; #{updateTimeStart}
+        </if>
+        <if test="updateTimeEnd != null">
+            and light.update_time <![CDATA[<=]]> #{updateTimeEnd}
+        </if>
+        <if test="updateTime != null">
+            and light.update_time = #{updateTime}
+        </if>
+        <if test="createdUserId != null and createdUserId != ''">
+            and light.created_user_id = #{createdUserId}
+        </if>
+        <if test="createdUserName != null and createdUserName != ''">
+            and light.created_user_name = #{createdUserName}
+        </if>
+        <if test="updateUserId != null and updateUserId != ''">
+            and light.update_user_id = #{updateUserId}
+        </if>
+        <if test="updateUserName != null and updateUserName != ''">
+            and light.update_user_name = #{updateUserName}
+        </if>
+        <if test="position != null and position != ''">
+            and light.position = #{position}
+        </if>
+        <if test="checkDateStart != null">
+            and light.check_date <![CDATA[>=]]>; #{checkDateStart}
+        </if>
+        <if test="checkDateEnd != null">
+            and light.check_date <![CDATA[<=]]> #{checkDateEnd}
+        </if>
+        <if test="checkDate != null and checkDate != ''">
+            and light.check_date = #{checkDate}
+        </if>
+        <if test="nextCheckDateStart != null">
+            and light.next_check_date <![CDATA[>=]]>; #{nextCheckDateStart}
+        </if>
+        <if test="nextCheckDateEnd != null">
+            and light.next_check_date <![CDATA[<=]]> #{nextCheckDateEnd}
+        </if>
+        <if test="status != null">
+            and TIMESTAMPDIFF( DAY, CURDATE( ), light.next_check_date ) <![CDATA[ <= ]]> light.warn_day
+        </if>
+        <if test="nextCheckDate != null">
+            and light.next_check_date = #{nextCheckDate}
+        </if>
+        <if test="period != null">
+            and light.period = #{period}
+        </if>
+        <if test="warnDay != null">
+            and light.warn_day = #{warnDay}
+        </if>
+        <if test="keyword != null and keyword != ''">
+            and light.name like concat(concat('%',#{keyword}),'%')
+        </if>
+    </sql>
+    <select id="selectList" parameterType="com.platform.dao.dto.light.LightDTO"
+            resultType="com.platform.dao.vo.query.light.LightVO">
+        select light.*
+        from t_tool as light
+        <where>
+            <include refid="List_Condition"/>
+        </where>
+    </select>
+</mapper>

+ 5 - 2
platform-dao/src/main/resources/mapper/sb/SbPositionMapper.xml

@@ -2,12 +2,12 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.platform.dao.mapper.sb.SbPositionMapper">
     <sql id="Base_Column_List">
-        id, no, name, type, sort, code, user_id, del_flag, parent_id, opc_flag, opc_img, remark, created_user_id, update_user_id,
+        id, no, name, type, sort, code, user_id, del_flag, parent_id, opc_flag, opc_img, light_flag, light_img, remark, created_user_id, update_user_id,
         created_time, update_time
     </sql>
 
     <sql id="Join_Column">
-        position.id, position.no, position.name, position.code, position.opc_flag, position.opc_img, position.user_id, position.type, position.sort, position.del_flag, position.parent_id,
+        position.id, position.no, position.name, position.code, position.opc_flag, position.light_flag, position.light_img, position.opc_img, position.user_id, position.type, position.sort, position.del_flag, position.parent_id,
         position.remark, position.created_user_id, position.update_user_id,
         position.created_time, position.update_time,
         p.name as parentName, user.real_name as userName
@@ -34,6 +34,9 @@
         <if test="opcFlag != null">
             and position.opc_flag = #{opcFlag}
         </if>
+        <if test="lightFlag != null">
+            and position.light_flag = #{lightFlag}
+        </if>
         <if test="userName != null and userName != ''">
             and ( user.real_name like concat('%',#{userName},'%') or
             user.username like concat('%',#{userName},'%'))

+ 142 - 0
platform-rest/src/main/java/com/platform/rest/controller/light/LightController.java

@@ -0,0 +1,142 @@
+package com.platform.rest.controller.light;
+
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.common.util.BeanConverterUtil;
+import com.platform.common.util.R;
+import com.platform.common.validation.group.AddGroup;
+import com.platform.common.validation.group.UpdateGroup;
+import com.platform.dao.dto.light.LightDTO;
+import com.platform.dao.entity.light.Light;
+import com.platform.dao.util.ExcelUtil;
+import com.platform.dao.vo.export.light.ExportLightVO;
+import com.platform.dao.vo.query.light.LightVO;
+import com.platform.rest.log.annotation.SysLog;
+import com.platform.service.light.LightService;
+import lombok.AllArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * @Description 防雷检测点位台账 控制器
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/light/lights")
+public class LightController {
+
+  private final  LightService lightService;
+
+  /**
+   * 通过id查询单条记录
+   *
+   * @param id 主键
+   * @return R
+   */
+  @GetMapping("/{id}")
+  public R<Light> getById(@PathVariable("id") String id){
+      return new R<>(lightService.getModelById(id));
+  }
+
+  /**
+   * 新增记录
+   *
+   * @param lightDTO 防雷检测点位DTO
+   * @return R
+   */
+  @SysLog("新增防雷检测点位")
+  @PostMapping
+  @PreAuthorize("@pms.hasPermission('light-lights-add')")
+  public R save(@Validated({AddGroup.class}) @RequestBody LightDTO lightDTO) {
+      return new R<>(lightService.saveModelByDTO(lightDTO));
+  }
+
+  /**
+   * 修改记录
+   *
+   * @param lightDTO 防雷检测点位DTO
+   * @return R
+   */
+  @SysLog("修改防雷检测点位")
+  @PutMapping("/{id}")
+  @PreAuthorize("@pms.hasPermission('light-lights-edit')")
+  public R update(@PathVariable("id") String id, @Validated({UpdateGroup.class}) @RequestBody LightDTO lightDTO) {
+      lightService.modModelByDTO(lightDTO);
+      return new R<>();
+  }
+
+
+                                                                                                                                      
+  /**
+   * 通过id删除一条记录
+   *
+   * @param id 主键
+   * @return R
+   */
+  @SysLog("删除防雷检测点位")
+  @DeleteMapping("/{id}")
+  @PreAuthorize("@pms.hasPermission('light-lights-del')")
+  public R removeById(@PathVariable String id){
+    lightService.deleteByPrimaryKey(id);
+    return new R<>();
+  }
+
+    /**
+     * 批量记录
+     *
+     * @param ids 主键
+     * @return R
+     */
+    @SysLog("批量删除防雷检测点位")
+    @DeleteMapping("")
+    @PreAuthorize("@pms.hasPermission('light-lights-del')")
+    public R removeIds(@RequestBody List<String> ids){
+        lightService.batchDelete(ids);
+        return new R<>();
+    }
+
+  /**
+   * 获取分页
+   *
+   * @param pageNum 当前页码
+   * @param pageSize 每页条数
+   * @param lightDTO 防雷检测点位DTO
+   * @return R
+   */
+  @GetMapping("/page")
+  public R<AbstractPageResultBean<LightVO>> query(LightDTO lightDTO, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "20") int pageSize) {
+      return new R<>(lightService.selectPageList(lightDTO, pageNum, pageSize));
+  }
+
+  /**
+   * 获取列表
+   *
+   * @param lightDTO 防雷检测点位DTO
+   * @return R
+   */
+  @GetMapping("")
+  public R query(LightDTO lightDTO) {
+      return new R<>(lightService.getModelListByDTO(lightDTO));
+  }
+
+  /**
+     * 防雷检测点位导出
+     *
+     * @param lightDTO 防雷检测点位DTO
+     * @return R
+     */
+  @GetMapping("/export")
+  @SysLog("防雷检测点位导出")
+  @PreAuthorize("@pms.hasPermission('light-lights-export')")
+  public void export(HttpServletResponse response, LightDTO lightDTO) {
+    List<Light> list = lightService.getModelListByDTO(lightDTO);
+    ExcelUtil.exportResponseDict(response, ExportLightVO.class, BeanConverterUtil.copyListProperties(list, ExportLightVO.class), "防雷检测点位");
+  }
+
+}

+ 150 - 0
platform-rest/src/main/java/com/platform/rest/controller/light/LightLogController.java

@@ -0,0 +1,150 @@
+package com.platform.rest.controller.light;
+
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.common.util.BeanConverterUtil;
+import com.platform.common.util.R;
+import com.platform.common.validation.group.AddGroup;
+import com.platform.common.validation.group.UpdateGroup;
+import com.platform.dao.dto.light.BatchLightLogDTO;
+import com.platform.dao.dto.light.LightLogDTO;
+import com.platform.dao.entity.light.LightLog;
+import com.platform.dao.util.ExcelUtil;
+import com.platform.dao.vo.export.light.ExportLightLogVO;
+import com.platform.dao.vo.query.light.LightLogVO;
+import com.platform.rest.log.annotation.SysLog;
+import com.platform.service.light.LightLogService;
+import lombok.AllArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * @Description 防雷检测点位检定记录 控制器
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/light/light-logs")
+public class LightLogController {
+
+  private final  LightLogService lightLogService;
+
+  /**
+   * 通过id查询单条记录
+   *
+   * @param id 主键
+   * @return R
+   */
+  @GetMapping("/{id}")
+  public R<LightLog> getById(@PathVariable("id") String id){
+      return new R<>(lightLogService.getModelById(id));
+  }
+
+  /**
+   * 新增记录
+   *
+   * @param lightLogDTO 防雷检测点位检定记录DTO
+   * @return R
+   */
+  @SysLog("新增防雷检测点位检定记录")
+  @PostMapping
+  @PreAuthorize("@pms.hasPermission('light-light-logs-add')")
+  public R save(@Validated({AddGroup.class}) @RequestBody LightLogDTO lightLogDTO) {
+      return new R<>(lightLogService.saveModelByDTO(lightLogDTO));
+  }
+
+  @SysLog("批量新增防雷检测点位检定记录")
+  @PostMapping("/batch")
+  public R saveLongYanBatch(@RequestBody BatchLightLogDTO batchLightLogDTO) {
+    lightLogService.saveBatchLightLog(batchLightLogDTO);
+    return new R<>();
+  }
+
+  /**
+   * 修改记录
+   *
+   * @param lightLogDTO 防雷检测点位检定记录DTO
+   * @return R
+   */
+  @SysLog("修改防雷检测点位检定记录")
+  @PutMapping("/{id}")
+  @PreAuthorize("@pms.hasPermission('light-light-logs-edit')")
+  public R update(@PathVariable("id") String id, @Validated({UpdateGroup.class}) @RequestBody LightLogDTO lightLogDTO) {
+      lightLogService.modModelByDTO(lightLogDTO);
+      return new R<>();
+  }
+
+
+                                                                                      
+  /**
+   * 通过id删除一条记录
+   *
+   * @param id 主键
+   * @return R
+   */
+  @SysLog("删除防雷检测点位检定记录")
+  @DeleteMapping("/{id}")
+  @PreAuthorize("@pms.hasPermission('light-light-logs-del')")
+  public R removeById(@PathVariable String id){
+    lightLogService.deleteByPrimaryKey(id);
+    return new R<>();
+  }
+
+    /**
+     * 批量记录
+     *
+     * @param ids 主键
+     * @return R
+     */
+    @SysLog("批量删除防雷检测点位检定记录")
+    @DeleteMapping("")
+    @PreAuthorize("@pms.hasPermission('light-light-logs-del')")
+    public R removeIds(@RequestBody List<String> ids){
+        lightLogService.batchDelete(ids);
+        return new R<>();
+    }
+
+  /**
+   * 获取分页
+   *
+   * @param pageNum 当前页码
+   * @param pageSize 每页条数
+   * @param lightLogDTO 防雷检测点位检定记录DTO
+   * @return R
+   */
+  @GetMapping("/page")
+  public R<AbstractPageResultBean<LightLogVO>> query(LightLogDTO lightLogDTO, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "20") int pageSize) {
+      return new R<>(lightLogService.selectPageList(lightLogDTO, pageNum, pageSize));
+  }
+
+  /**
+   * 获取列表
+   *
+   * @param lightLogDTO 防雷检测点位检定记录DTO
+   * @return R
+   */
+  @GetMapping("")
+  public R query(LightLogDTO lightLogDTO) {
+      return new R<>(lightLogService.getModelListByDTO(lightLogDTO));
+  }
+
+  /**
+     * 防雷检测点位检定记录导出
+     *
+     * @param lightLogDTO 防雷检测点位检定记录DTO
+     * @return R
+     */
+  @GetMapping("/export")
+  @SysLog("防雷检测点位检定记录导出")
+  @PreAuthorize("@pms.hasPermission('light-light-logs-export')")
+  public void export(HttpServletResponse response, LightLogDTO lightLogDTO) {
+    List<LightLog> list = lightLogService.getModelListByDTO(lightLogDTO);
+    ExcelUtil.exportResponseDict(response, ExportLightLogVO.class, BeanConverterUtil.copyListProperties(list, ExportLightLogVO.class), "防雷检测点位检定记录");
+  }
+
+}

+ 42 - 0
platform-service/src/main/java/com/platform/service/light/LightLogService.java

@@ -0,0 +1,42 @@
+package com.platform.service.light;
+
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.dao.dto.light.BatchLightLogDTO;
+import com.platform.dao.dto.light.LightLogDTO;
+import com.platform.dao.dto.light.BatchLightLogDTO;
+import com.platform.dao.dto.light.LightLogDTO;
+import com.platform.dao.entity.light.LightLog;
+import com.platform.dao.entity.light.LightLog;
+import com.platform.dao.vo.query.light.LightLogVO;
+import com.platform.dao.vo.query.light.LightLogVO;
+import com.platform.service.base.IBaseService;
+
+import java.util.List;
+
+/**
+ * @Description 工器具检定记录 service
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+public interface LightLogService extends IBaseService<LightLog, LightLogDTO> {
+
+   /**
+    * 批量删除
+    *
+    * @param ids :
+    * @return :
+    */
+    int batchDelete(List<String> ids);
+
+    /**
+     * 分页查询
+     * @param record
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    AbstractPageResultBean<LightLogVO> selectPageList(LightLogDTO record, int pageNum, int pageSize);
+
+    void saveBatchLightLog(BatchLightLogDTO batchLightLogDTO);
+}

+ 39 - 0
platform-service/src/main/java/com/platform/service/light/LightService.java

@@ -0,0 +1,39 @@
+package com.platform.service.light;
+
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.dao.dto.light.LightDTO;
+import com.platform.dao.dto.light.LightDTO;
+import com.platform.dao.entity.light.Light;
+import com.platform.dao.entity.light.Light;
+import com.platform.dao.vo.query.light.LightVO;
+import com.platform.dao.vo.query.light.LightVO;
+import com.platform.service.base.IBaseService;
+
+import java.util.List;
+
+/**
+ * @Description 工器具管理 service
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+public interface LightService extends IBaseService<Light, LightDTO> {
+
+   /**
+    * 批量删除
+    *
+    * @param ids :
+    * @return :
+    */
+    int batchDelete(List<String> ids);
+
+    /**
+     * 分页查询
+     * @param record
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    AbstractPageResultBean<LightVO> selectPageList(LightDTO record, int pageNum, int pageSize);
+
+                                                                                                                                                                                                                                                                            }

+ 61 - 0
platform-service/src/main/java/com/platform/service/light/impl/LightLogServiceImpl.java

@@ -0,0 +1,61 @@
+package com.platform.service.light.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.dao.bean.MyPage;
+import com.platform.dao.dto.light.BatchLightLogDTO;
+import com.platform.dao.dto.light.LightLogDTO;
+import com.platform.dao.entity.light.LightLog;
+import com.platform.dao.mapper.light.LightLogMapper;
+import com.platform.dao.vo.query.light.LightLogVO;
+import com.platform.service.base.impl.BaseServiceImpl;
+import com.platform.service.light.LightLogService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import tk.mybatis.mapper.weekend.Weekend;
+import tk.mybatis.mapper.weekend.WeekendCriteria;
+
+import java.util.List;
+
+/**
+ * @Description 工器具检定记录 service 实现类
+ * @Author xc
+ * @Date 2022-12-28 20:01:22
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@AllArgsConstructor
+@Service("lightLogService")
+public class LightLogServiceImpl extends BaseServiceImpl<LightLogMapper, LightLog, LightLogDTO> implements LightLogService {
+
+    @Override
+    public int batchDelete(List<String> ids) {
+        Weekend<LightLog> weekend = new Weekend<>(LightLog.class);
+        WeekendCriteria<LightLog, Object> weekendCriteria = weekend.weekendCriteria();
+        weekendCriteria.andIn(LightLog::getId, ids);
+        mapper.deleteByExample(weekend);
+        return 1;
+    }
+
+    @Override
+    public AbstractPageResultBean<LightLogVO> selectPageList(LightLogDTO record, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        return new MyPage(mapper.selectList(record));
+    }
+
+    @Override
+    public void saveBatchLightLog(BatchLightLogDTO batchLightLogDTO) {
+        if (!CollectionUtils.isEmpty(batchLightLogDTO.getLightLogDTOList())) {
+            batchLightLogDTO.getLightLogDTOList().forEach(item -> {
+                this.saveModelByDTO(item);
+            });
+        }
+    }
+
+    @Override
+    public AbstractPageResultBean<LightLog> selectPageInfo(LightLogDTO record, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        return new MyPage(mapper.selectList(record));
+    }
+
+                                                                                                                                                                            }

+ 50 - 0
platform-service/src/main/java/com/platform/service/light/impl/LightServiceImpl.java

@@ -0,0 +1,50 @@
+package com.platform.service.light.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.dao.bean.MyPage;
+import com.platform.dao.dto.light.LightDTO;
+import com.platform.dao.entity.light.Light;
+import com.platform.dao.mapper.light.LightMapper;
+import com.platform.dao.vo.query.light.LightVO;
+import com.platform.service.base.impl.BaseServiceImpl;
+import com.platform.service.light.LightService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import tk.mybatis.mapper.weekend.Weekend;
+import tk.mybatis.mapper.weekend.WeekendCriteria;
+
+import java.util.List;
+
+/**
+ * @Description 工器具管理 service 实现类
+ * @Author xc
+ * @Date 2022-12-28 20:00:49
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@AllArgsConstructor
+@Service("lightService")
+public class LightServiceImpl extends BaseServiceImpl<LightMapper, Light, LightDTO> implements LightService {
+
+    @Override
+    public int batchDelete(List<String> ids) {
+        Weekend<Light> weekend = new Weekend<>(Light.class);
+        WeekendCriteria<Light, Object> weekendCriteria = weekend.weekendCriteria();
+        weekendCriteria.andIn(Light::getId, ids);
+        mapper.deleteByExample(weekend);
+        return 1;
+    }
+
+    @Override
+    public AbstractPageResultBean<LightVO> selectPageList(LightDTO record, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        return new MyPage(mapper.selectList(record));
+    }
+
+    @Override
+    public AbstractPageResultBean<Light> selectPageInfo(LightDTO record, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        return new MyPage(mapper.selectList(record));
+    }
+
+                                                                                                                                                                                                                                                                            }