From 0ff82bec70c5875328afa07a7aa41b8170ba0438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Fri, 26 May 2023 17:32:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C=E7=A5=A8?= =?UTF-8?q?=E5=8D=B1=E9=99=A9=E7=82=B9=E5=88=86=E6=9E=90=E5=8F=8A=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=8E=AA=E6=96=BD=E7=A5=A8=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ticket/twoTicket/entity/TicketInfoDanger.java | 67 ++++++++++++++++++++++ .../twoTicket/mapper/TicketInfoDangerMapper.java | 13 +++++ .../twoTicket/mapper/TicketInfoDangerMapper.xml | 5 ++ .../twoTicket/service/TicketInfoDangerService.java | 24 ++++++++ .../service/impl/TicketInfoDangerServiceImpl.java | 37 ++++++++++++ 5 files changed, 146 insertions(+) create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketInfoDanger.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.xml create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketInfoDangerService.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketInfoDangerServiceImpl.java diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketInfoDanger.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketInfoDanger.java new file mode 100644 index 0000000..0e8bc71 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketInfoDanger.java @@ -0,0 +1,67 @@ +package com.hnac.hzims.ticket.twoTicket.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * + * 工作票危险点分析及控制措施票 + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/5/25 17:03 + */ +@Data +@TableName("hzims_ticket_info_danger") +public class TicketInfoDanger { + + + /** + * 编号 + */ + private Long id; + + + /** + * 工作票编号 + */ + private Long ticketId; + + /** + * 安全措施 + */ + private String maintenance; + + + /** + * 危险点 + */ + private String dangerousPoint; + + + /** + * 创建时间 + */ + @TableField(value = "update_time", fill = FieldFill.INSERT) + private LocalDateTime createTime; + + + /** + * 更新时间 + */ + @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE) + private LocalDateTime updateTime; + + + /** + * 逻辑删除 + */ + @TableLogic + @TableField("is_deleted") + private Boolean deleted; +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.java new file mode 100644 index 0000000..29fb916 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.ticket.twoTicket.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/5/25 17:13 + */ +public interface TicketInfoDangerMapper extends BaseMapper { +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.xml new file mode 100644 index 0000000..4c6a30f --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketInfoDangerService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketInfoDangerService.java new file mode 100644 index 0000000..4b5cab6 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketInfoDangerService.java @@ -0,0 +1,24 @@ +package com.hnac.hzims.ticket.twoTicket.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/5/25 17:15 + */ +public interface TicketInfoDangerService extends IService { + + + /** + * 根据工作票Id查询工作票危险点分析及控制措施票 + * @param ticketId + * @return + */ + + List selectAllByTicket(Long ticketId); +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketInfoDangerServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketInfoDangerServiceImpl.java new file mode 100644 index 0000000..bf9f1a0 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketInfoDangerServiceImpl.java @@ -0,0 +1,37 @@ +package com.hnac.hzims.ticket.twoTicket.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger; +import com.hnac.hzims.ticket.twoTicket.mapper.TicketInfoDangerMapper; +import com.hnac.hzims.ticket.twoTicket.service.TicketInfoDangerService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/5/25 17:15 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class TicketInfoDangerServiceImpl extends ServiceImpl implements TicketInfoDangerService { + /** + * 根据工作票Id查询工作票危险点分析及控制措施票 + * + * @param ticketId + * @return + */ + @Override + public List selectAllByTicket(Long ticketId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(TicketInfoDanger::getTicketId,ticketId); + return baseMapper.selectList(queryWrapper); + } +}