11
13693261870
2024-11-11 138b959cc11dc9a73b0c766030b99ba1180d8650
src/main/java/com/se/simu/domain/po/DataPo.java
@@ -1,14 +1,18 @@
package com.se.simu.domain.po;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.se.simu.helper.GdalHelper;
import io.swagger.annotations.ApiModelProperty;
import org.gdal.osr.SpatialReference;
/**
 * 仿真数据实体类
 *
 * @author WWW
 * @date 2024-09-18
 */
import java.util.Date;
@SuppressWarnings("ALL")
public class DataPo {
    @ApiModelProperty("父ID")
    private Integer pid;
    @ApiModelProperty("名称")
    private String name;
@@ -17,6 +21,11 @@
    @ApiModelProperty("输出路径")
    private String outPath;
    @ApiModelProperty("开始时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    @ApiModelProperty("最小X")
    private Double minx;
@@ -79,15 +88,6 @@
        return minx + "," + miny + "," + maxx + "," + maxy;
    }
    public DataPo(String name, String inPath, String outPath, Double total, Integer duration, Integer isFlood) {
        this.name = name;
        this.inPath = inPath;
        this.outPath = outPath;
        this.total = total;
        this.duration = duration;
        this.isFlood = isFlood;
    }
    public DataPo(String name, String inPath, String outPath, Double minx, Double miny, Double maxx, Double maxy, Double total, Integer duration) {
        this.name = name;
        this.inPath = inPath;
@@ -100,33 +100,12 @@
        this.duration = duration;
    }
    public boolean setExtent(Double minx, Double miny, Double maxx, Double maxy) {
        this.minx = minx;
        this.miny = miny;
        this.maxx = maxx;
        this.maxy = maxy;
        return true;
    public Integer getPid() {
        return pid;
    }
    public boolean setFlood(Integer floodStart, Integer floodEnd, Double floodHeight, String floodType) {
        this.isFlood = 1;
        this.floodStart = floodStart;
        this.floodEnd = floodEnd;
        this.floodHeight = floodHeight;
        this.floodType = floodType;
        return true;
    }
    public boolean setFloodExtent(Double floodMinx, Double floodMiny, Double floodMaxx, Double floodMaxy) {
        this.isFlood = 1;
        this.floodMinx = floodMinx;
        this.floodMiny = floodMiny;
        this.floodMaxx = floodMaxx;
        this.floodMaxy = floodMaxy;
        return true;
    public void setPid(Integer pid) {
        this.pid = pid;
    }
    public String getName() {
@@ -151,6 +130,14 @@
    public void setOutPath(String outPath) {
        this.outPath = outPath;
    }
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Double getMinx() {
@@ -280,4 +267,8 @@
    public void setEpsg(Integer epsg) {
        this.epsg = epsg;
    }
    public SpatialReference getSpatialReference() {
        return GdalHelper.createSpatialReference(this.getEpsg());
    }
}