Browse Source

新增工作票危险点分析及控制措施票表

zhongwei
段飞宇 2 years ago
parent
commit
0ff82bec70
  1. 67
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketInfoDanger.java
  2. 13
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.java
  3. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.xml
  4. 24
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketInfoDangerService.java
  5. 37
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketInfoDangerServiceImpl.java

67
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;
}

13
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<TicketInfoDanger> {
}

5
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/TicketInfoDangerMapper.xml

@ -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>

24
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<TicketInfoDanger> {
/**
* 根据工作票Id查询工作票危险点分析及控制措施票
* @param ticketId
* @return
*/
List<TicketInfoDanger> selectAllByTicket(Long ticketId);
}

37
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<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…
Cancel
Save