13693261870
2024-09-26 def931791384c6b2a4871ea2bb67f66eab3c83b5
src/main/java/com/se/simu/domain/dto/ConfigDto.java
@@ -1,5 +1,7 @@
package com.se.simu.domain.dto;
import com.se.simu.config.PropertiesConfig;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@@ -82,7 +84,20 @@
    // 结果保存频率,相对report_step来说,比如save_step=3就表示每间隔2个report_step保存一次结果
    private Integer save_step = 1;
    public void setCalcTime(Integer minutes) {
    public void setProperties(String dirName, Integer minutes, PropertiesConfig config) {
        this.casedir = dirName;
        this.terrain_file = config.getDemFile();
        this.studyzone_file = config.getZoneName();
        this.buildings_file = config.getShpNames().get(2);
        this.nodes_file = config.getShpNames().get(0);
        this.links_file = config.getShpNames().get(1);
        this.junctions_file = config.getJunctionName();
        this.raingage_file = config.getRaingage();
        this.barrier_file = config.getBarrierName();
        this.drainage_outfile = dirName + ".h5";
        this.sww_outfile = dirName + ".sww";
        this.flow_units = config.getFlowUnits();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR, 0);