| | |
| | | import com.se.simu.config.PropertiesConfig; |
| | | import com.se.simu.domain.dto.ConfigDto; |
| | | import com.se.simu.domain.po.DataPo; |
| | | import com.se.simu.helper.StringHelper; |
| | | import com.se.simu.helper.WebHelper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Resource |
| | | PropertiesConfig config; |
| | | |
| | | public void createRainFile() throws Exception { |
| | | public void createRainFile(DataPo data) throws Exception { |
| | | String filePath = config.getInPath() + File.separator + data.getInPath() + File.separator + config.getRaingage(); |
| | | String startTime = StringHelper.YMDHMS_FORMAT.format(data.getStartTime()); |
| | | |
| | | Rainfall rainfall = new Rainfall(); |
| | | rainfall.rainfall("D:/simu/in/RainGage.dat", "Tongzhou", "2024-09-29 00:00:00", 60, 0.5, 10); |
| | | rainfall.rainfall(filePath, config.getRainStation(), startTime, data.getDuration(), 0.5, config.getRainPeriod()); |
| | | } |
| | | |
| | | public void createConfig(DataPo data) throws IOException { |