jiapeng преди 6 години
родител
ревизия
50705070fc

+ 1 - 0
src/main/java/com/ekexiu/project/storage/diacrisis/AiDiacrisisTask.java

@ -58,6 +58,7 @@ public class AiDiacrisisTask implements Runnable {
58 58
		String nextStateCode = "ERR0599";
59 59

60 60
		File file = new File(aiTaskService.getDstPath(), taskId);
61
		file = new File(file,"data_trans");
61 62
		if (file.exists() && file.isDirectory()) {
62 63
			try {
63 64
				URL u = new URL(urlPrefix + file.getAbsolutePath());

+ 3 - 1
src/main/java/com/ekexiu/project/storage/diacrisis/AiTaskService.java

@ -232,12 +232,14 @@ public class AiTaskService {
232 232
   @Post
233 233
	public String insert(@JdbcConn(true) Connection con, @LoginUser SessionUser user, final int taskType,String[] file) throws IOException, SQLException {
234 234
	   File path;
235
	   String taskId;
235 236
	   do{
236 237
		path = new File(this.dstPath,  StringUtil.buildUUID());
237 238
	   }while(path.exists());
238 239
	 	if(!path.mkdir()){
239 240
	 		throw new RuntimeException("mkdir["+path.getAbsolutePath()+"] error");	
240 241
	 	}
242
	 	taskId = path.getName();
241 243
	 	path = new File(path,"data");
242 244
	 	if(!path.mkdir()){
243 245
	 		throw new RuntimeException("mkdir["+path.getAbsolutePath()+"] error");	
@ -263,7 +265,7 @@ public class AiTaskService {
263 265
		   }
264 266
	   }
265 267
	   
266
		final String id = path.getName();
268
		final String id = taskId;
267 269
		AiTask task = new AiTask();
268 270
		task.setDataNum(id.substring(24));
269 271
		task.setTaskType(taskType);