段飞宇
2 years ago
5 changed files with 146 additions and 0 deletions
@ -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; |
||||
} |
@ -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<TicketInfoDanger> { |
||||
} |
@ -0,0 +1,5 @@
|
||||
<?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.hnac.hzims.ticket.twoTicket.mapper.TicketInfoDangerMapper"> |
||||
|
||||
</mapper> |
@ -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<TicketInfoDanger> { |
||||
|
||||
|
||||
/** |
||||
* 根据工作票Id查询工作票危险点分析及控制措施票 |
||||
* @param ticketId |
||||
* @return |
||||
*/ |
||||
|
||||
List<TicketInfoDanger> selectAllByTicket(Long ticketId); |
||||
} |
@ -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<TicketInfoDangerMapper, TicketInfoDanger> implements TicketInfoDangerService { |
||||
/** |
||||
* 根据工作票Id查询工作票危险点分析及控制措施票 |
||||
* |
||||
* @param ticketId |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List<TicketInfoDanger> selectAllByTicket(Long ticketId) { |
||||
LambdaQueryWrapper<TicketInfoDanger> queryWrapper = new LambdaQueryWrapper<>(); |
||||
queryWrapper.eq(TicketInfoDanger::getTicketId,ticketId); |
||||
return baseMapper.selectList(queryWrapper); |
||||
} |
||||
} |
Loading…
Reference in new issue