package com.newfiber.api.pc.model.gis; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; import io.swagger.annotations.ApiModelProperty; import java.util.Date; import java.util.List; import lombok.Data; /** * * * @author : xiongk * @since : 2021-09-23 14:00 */ @Data @TableName("gis_pipeline_flaw") public class PipelineFlaw{ /** * 编号 */ @TableId(type = IdType.AUTO) @ApiModelProperty(name = "id", value = "编号", position = 10) private Integer id; /** * 分类 */ @ApiModelProperty(name = "category", value = "分类", position = 20) private String category; /** * 区域 */ @ApiModelProperty(name = "area", value = "区域", position = 30) private String area; /** * 所属区域 */ @ApiModelProperty(name = "region", value = "所属区域", position = 40) private String region; /** * 文件编号 */ @ApiModelProperty(name = "fileNumber", value = "文件编号", position = 50) private String fileNumber; /** * 起始井编号 */ @ApiModelProperty(name = "startNumber", value = "起始井编号", position = 60) private String startNumber; /** * 连接井编号 */ @ApiModelProperty(name = "connectNumber", value = "连接井编号", position = 70) private String connectNumber; /** * 路名 */ @ApiModelProperty(name = "roadName", value = "路名", position = 80) private String roadName; /** * 缺陷等级及类型 */ @ApiModelProperty(name = "grade", value = "缺陷等级及类型", position = 90) private String grade; /** * 管径(mm) */ @ApiModelProperty(name = "diameter", value = "管径(mm)", position = 100) private String diameter; /** * 管段长度(m) */ @ApiModelProperty(name = "length", value = "管段长度(m)", position = 110) private String length; /** * 缺陷距离(m) */ @ApiModelProperty(name = "distance", value = "缺陷距离(m)", position = 120) private String distance; /** * 材质 */ @ApiModelProperty(name = "texture", value = "材质", position = 130) private String texture; /** * 照片 */ @ApiModelProperty(name = "picture", value = "照片", position = 130) private String picture; /** * 备注 */ @ApiModelProperty(name = "remark", value = "备注", position = 140) private String remark; /** * */ @ApiModelProperty(name = "createDatetime", value = "", position = 150) private Date createDatetime; public static PipelineFlaw build(String category, List<Object> excelRowData){ PipelineFlaw pipelineFlaw = new PipelineFlaw(); pipelineFlaw.setCategory(category); pipelineFlaw.setArea(excelRowData.get(1).toString()); pipelineFlaw.setRegion(excelRowData.get(2).toString()); pipelineFlaw.setRoadName(excelRowData.get(3).toString()); pipelineFlaw.setGrade(excelRowData.get(4).toString()); pipelineFlaw.setDiameter(excelRowData.get(5).toString()); pipelineFlaw.setLength(excelRowData.get(6).toString()); pipelineFlaw.setDistance(excelRowData.get(7).toString()); pipelineFlaw.setTexture(excelRowData.get(8).toString()); pipelineFlaw.setFileNumber(excelRowData.get(9).toString()); pipelineFlaw.setStartNumber(excelRowData.get(10).toString()); pipelineFlaw.setConnectNumber(excelRowData.get(11).toString()); pipelineFlaw.setRemark(excelRowData.get(12).toString()); pipelineFlaw.setCreateDatetime(new Date()); return pipelineFlaw; } }