| | |
| | | import com.se.simu.helper.WebHelper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import com.se.simu.Rainfall; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | |
| | | @Resource |
| | | PropertiesConfig config; |
| | | |
| | | public void createRainFile() { |
| | | |
| | | public void createRainFile() throws Exception { |
| | | Rainfall rainfall = new Rainfall(); |
| | | rainfall.rainfall("D:/simu/in/RainGage.dat", "Tongzhou", "2024-09-29 00:00:00", 60, 0.5, 10); |
| | | } |
| | | |
| | | public void createConfig(DataPo data) throws IOException { |
| | | ConfigDto dto = new ConfigDto(); |
| | | dto.setProperties(data.getInPath(), data.getDuration(), config); |
| | | dto.setProperties(data.getInPath(), data.getStartTime(), data.getDuration(), config); |
| | | |
| | | String json = JSONUtil.toJsonPrettyStr(dto); |
| | | String filePath = config.getInPath() + File.separator + data.getInPath() + ".json"; |