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); + } +}