From def931791384c6b2a4871ea2bb67f66eab3c83b5 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 26 九月 2024 14:30:57 +0800 Subject: [PATCH] 初始化ConfigDto文件 --- src/main/java/com/se/simu/domain/dto/ConfigDto.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/se/simu/domain/dto/ConfigDto.java b/src/main/java/com/se/simu/domain/dto/ConfigDto.java index 9796cc3..aab25f1 100644 --- a/src/main/java/com/se/simu/domain/dto/ConfigDto.java +++ b/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 @@ // 缁撴灉淇濆瓨棰戠巼锛岀浉瀵箁eport_step鏉ヨ锛屾瘮濡俿ave_step=3灏辫〃绀烘瘡闂撮殧2涓猺eport_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); -- Gitblit v1.9.3